loading... | 加入收藏夹
当前位置:新开魔力私服 >> 魔力宝贝sf装备展示 >> 正文

魔力LUA赚钱的方法

时间: 来源:http://www.xkmlsf.com 作者:新开魔力私服

   为避免在游戏中走弯路浪费时间,最重要的就是帮助大家获得更好的游戏优势,在职业属性强化方面得到更完美的优势,下面就来为大家介绍老玩家在游戏中的作战经验和技巧,帮助新手玩家更快的适应游戏节奏。
1、老玩家在进行作战的时候从来都是有条不紊,并且能够从其他玩家身上学习很多的经验,所以比较善于组团作战在挑战各种任务的时候都愿意和其他玩家进行组团作战,在这个过程中不仅可以得到更好装备的作战优势,而且能够让自己更好的适应游戏节奏,每一个细节都不要放过获得更好的经验,自然就会让自己在游戏中变得越来越厉害,获得的经验奖励也开始更多。
2、老玩家在进行游戏的时候从来都不会跳过做任务这个环节,哪怕自己的等级已经非常高但是依然会做好有些安排的主线任务,主线任务对于每一个玩家不同时期的发展都具有非常重要的影响,而且等级越高做主线任务得到的奖励就越高,所以在这个过程中就会让大家得到更好的优势,不仅可以满足大家在作战过程中的能力水平要求,而且可以让自己个人的作战优势得到展现。
魔力私服老玩

Delegate.RegInit("GOLD_WIN_NPC_init");
local GOLD_WIN_INFO={}
local GOLD_NUM={500,1000,2000,5000,10000}
if(A_MODEL_NPC ~= nil)then
 Char.SetData(A_MODEL_NPC, %对象_名字%, "");
 Char.SetData(A_MODEL_NPC, %对象_形象%, 0);   
 Char.SetData(A_MODEL_NPC, %对象_原形%, 0);
 NLG.UpChar(A_MODEL_NPC);
end 
if(B_MODEL_NPC ~= nil)then
 Char.SetData(B_MODEL_NPC, %对象_名字%, "");
 Char.SetData(B_MODEL_NPC, %对象_形象%, 0);   
 Char.SetData(B_MODEL_NPC, %对象_原形%, 0);
 NLG.UpChar(B_MODEL_NPC);
end
function GOLD_WIN_NPCTalked( _MePtr, _PlayerPtr)
 --这里检查玩家是否站在NPC面前
 if(NLG.CanTalk(_MePtr,_PlayerPtr) == false) then
  return ;
 end
 -- Easy_Talk(_PlayerPtr,_MePtr,"嘿嘿,这位客官,刚开服,你有钱么?等你长大了,再来找我赌钱吧。");
 -- if(1)then
 --  return
 -- end

 local window_info="1\n来来来,买定离手啦~~(20秒下注时间)"..
      "\n1.大(8~12点,1赔1.95)"..
      "\n2.小(2~6点,1赔1.95)"..
      "\n3.豹子(7点,1赔3.85)";      


 NLG.ShowWindowTalked(_PlayerPtr, _MePtr, %窗口_选择框%, %按钮_关闭%,0,window_info);
 return ;
end

function GOLD_WIN_NPC_WinTalked( _MePtr, _PlayerPtr, _Seqno, _Select, _Data)
 if _Seqno==0 and _Data =="1" then
  if check_chongfu(_PlayerPtr) then
   Easy_Talk(_PlayerPtr,_MePtr,"你已经下注!不能重复下注!")
   return
  end
  if GOLD_WIN_INFO[_PlayerPtr] == nil then
   GOLD_WIN_INFO[_PlayerPtr]={};
  end
  GOLD_WIN_INFO[_PlayerPtr].TYPE=1;
  local window_info="1\n请选择下注金额?"..
      "\n"..GOLD_NUM[1]..
      "\n"..GOLD_NUM[2]..
      "\n"..GOLD_NUM[3]..
      "\n"..GOLD_NUM[4]..
      "\n"..GOLD_NUM[5];
      -- "\n"..GOLD_NUM[6]..
      -- "\n"..GOLD_NUM[7]..
      -- "\n"..GOLD_NUM[8];
  NLG.ShowWindowTalked(_PlayerPtr, _MePtr, %窗口_选择框%, %按钮_无%,1,window_info);
  return
 end
 if _Seqno==0 and _Data =="2" then
  
  if check_chongfu(_PlayerPtr) then
   Easy_Talk(_PlayerPtr,_MePtr,"你已经下注!不能重复下注!")
   return
  end
  if GOLD_WIN_INFO[_PlayerPtr] == nil then
   GOLD_WIN_INFO[_PlayerPtr]={};
  end
  GOLD_WIN_INFO[_PlayerPtr].TYPE=2;
  local window_info="1\n请选择下注金额?"..
      "\n"..GOLD_NUM[1]..
      "\n"..GOLD_NUM[2]..
      "\n"..GOLD_NUM[3]..
      "\n"..GOLD_NUM[4]..
      "\n"..GOLD_NUM[5];
      -- "\n"..GOLD_NUM[6]..
      -- "\n"..GOLD_NUM[7]..
      -- "\n"..GOLD_NUM[8];

  NLG.ShowWindowTalked(_PlayerPtr, _MePtr, %窗口_选择框%,%按钮_无% ,2,window_info);

  return
 end
 if _Seqno==0 and _Data =="3" then
  
  if check_chongfu(_PlayerPtr) then
   Easy_Talk(_PlayerPtr,_MePtr,"你已经下注!不能重复下注!")
   return
  end
  if GOLD_WIN_INFO[_PlayerPtr] == nil then
   GOLD_WIN_INFO[_PlayerPtr]={};
  end
  GOLD_WIN_INFO[_PlayerPtr].TYPE=3;
  local window_info="1\n请选择下注金额?"..
      "\n"..GOLD_NUM[1]..
      "\n"..GOLD_NUM[2]..
      "\n"..GOLD_NUM[3]..
      "\n"..GOLD_NUM[4]..
      "\n"..GOLD_NUM[5];
      -- "\n"..GOLD_NUM[6]..
      -- "\n"..GOLD_NUM[7]..
      -- "\n"..GOLD_NUM[8];

  NLG.ShowWindowTalked(_PlayerPtr, _MePtr, %窗口_选择框%,%按钮_无% ,3,window_info);

  return
 end
 if _Seqno==1  then
  if Char.GetGold(_PlayerPtr) < GOLD_NUM[tonumber(_Data)] then
   Easy_Talk(_PlayerPtr,_MePtr,"你的魔币不足"..GOLD_NUM[tonumber(_Data)].."!");
   return
  end
  local check_gold=1000000 - (GOLD_NUM[tonumber(_Data)]*1.95);
  if Char.GetGold(_PlayerPtr) > check_gold then
   Easy_Talk(_PlayerPtr,_MePtr,"你的身上携带魔币不能超过"..check_gold.."!");
   return
  end
  if GOLD_WIN_INFO[_PlayerPtr] == nil then
   Easy_Talk(_PlayerPtr,_MePtr,"已经开赌了!请重新选择!");
   return
  end
  GOLD_WIN_INFO[_PlayerPtr].GOLD_NUM=GOLD_NUM[tonumber(_Data)];
  GOLD_WIN_INFO[_PlayerPtr].PLAYER_INDEX=_PlayerPtr;
  GOLD_WIN_INFO[_PlayerPtr].PLAYER_CDKEY=Char.GetData(_PlayerPtr,%对象_账号%);
  Char.AddGold(_PlayerPtr,-GOLD_WIN_INFO[_PlayerPtr].GOLD_NUM);
  Easy_Talk(_PlayerPtr,_MePtr,"你已经下注买 大 !下注额 "..GOLD_WIN_INFO[_PlayerPtr].GOLD_NUM.." 金币!")
  return
 end
 if _Seqno==2  then
  if Char.GetGold(_PlayerPtr) < GOLD_NUM[tonumber(_Data)] then
   Easy_Talk(_PlayerPtr,_MePtr,"你的魔币不足"..GOLD_NUM[tonumber(_Data)].."!");
   return
  end
  local check_gold=1000000 - (GOLD_NUM[tonumber(_Data)]*1.95);
  if Char.GetGold(_PlayerPtr) > check_gold then
   Easy_Talk(_PlayerPtr,_MePtr,"你的身上携带魔币不能超过"..check_gold.."!");
   return
  end
  if GOLD_WIN_INFO[_PlayerPtr] == nil then
   Easy_Talk(_PlayerPtr,_MePtr,"已经开赌了!请重新选择!");
   return
  end
  GOLD_WIN_INFO[_PlayerPtr].GOLD_NUM=GOLD_NUM[tonumber(_Data)];
  GOLD_WIN_INFO[_PlayerPtr].PLAYER_INDEX=_PlayerPtr;
  GOLD_WIN_INFO[_PlayerPtr].PLAYER_CDKEY=Char.GetData(_PlayerPtr,%对象_账号%);
  Char.AddGold(_PlayerPtr,-GOLD_WIN_INFO[_PlayerPtr].GOLD_NUM);
  Easy_Talk(_PlayerPtr,_MePtr,"你已经下注买 小 !下注额 "..GOLD_WIN_INFO[_PlayerPtr].GOLD_NUM.." 金币!")
  return
 end
 if _Seqno==3  then
  if Char.GetGold(_PlayerPtr) < GOLD_NUM[tonumber(_Data)] then
   Easy_Talk(_PlayerPtr,_MePtr,"你的魔币不足"..GOLD_NUM[tonumber(_Data)].."!");
   return
  end
  local check_gold=1000000 - (GOLD_NUM[tonumber(_Data)]*3.85);
  if Char.GetGold(_PlayerPtr) > check_gold then
   Easy_Talk(_PlayerPtr,_MePtr,"你的身上携带魔币不能超过"..check_gold.."!");
   return
  end
  if GOLD_WIN_INFO[_PlayerPtr] == nil then
   Easy_Talk(_PlayerPtr,_MePtr,"已经开赌了!请重新选择!");
   return
  end
  GOLD_WIN_INFO[_PlayerPtr].GOLD_NUM=GOLD_NUM[tonumber(_Data)];
  GOLD_WIN_INFO[_PlayerPtr].PLAYER_INDEX=_PlayerPtr;
  GOLD_WIN_INFO[_PlayerPtr].PLAYER_CDKEY=Char.GetData(_PlayerPtr,%对象_账号%);
  Char.AddGold(_PlayerPtr,-GOLD_WIN_INFO[_PlayerPtr].GOLD_NUM);
  Easy_Talk(_PlayerPtr,_MePtr,"你已经下注买 豹子 !下注额 "..GOLD_WIN_INFO[_PlayerPtr].GOLD_NUM.." 金币!")
  return
 end
end

function GOLD_WIN_NPC_LoopEvent( _MePtr)
 update_tab();
 if table_is_empty(GOLD_WIN_INFO) then
  if(A_MODEL_NPC ~= nil)then
   Char.SetData(A_MODEL_NPC, %对象_名字%, "");
   Char.SetData(A_MODEL_NPC, %对象_形象%, 0);   
   Char.SetData(A_MODEL_NPC, %对象_原形%, 0);
   NLG.UpChar(A_MODEL_NPC);
  end 
  if(B_MODEL_NPC ~= nil)then
   Char.SetData(B_MODEL_NPC, %对象_名字%, "");
   Char.SetData(B_MODEL_NPC, %对象_形象%, 0);   
   Char.SetData(B_MODEL_NPC, %对象_原形%, 0);
   NLG.UpChar(B_MODEL_NPC);
  end
  return
 end

 local A_ITEM=math.random(1,6);
 local B_ITEM=math.random(1,6);
 local A_MODEL=26516+A_ITEM;
 local B_MODEL=26516+B_ITEM;

 if(A_MODEL_NPC == nil)then
  A_MODEL_NPC = NL.CreateNpc("./lua/System/BaseModule/Base.lua", "Myinit");
  Char.SetData(A_MODEL_NPC, %对象_MAP%, 0);
  Char.SetData(A_MODEL_NPC, %对象_地图%, 1000);     
  Char.SetData(A_MODEL_NPC, %对象_X%, 235);         
  Char.SetData(A_MODEL_NPC, %对象_Y%, 59);        
  Char.SetData(A_MODEL_NPC, %对象_名字%, A_ITEM);
  Char.SetData(A_MODEL_NPC, %对象_形象%, A_MODEL);   
  Char.SetData(A_MODEL_NPC, %对象_原形%, A_MODEL);   
  NLG.UpChar(A_MODEL_NPC);
 end

 if(B_MODEL_NPC == nil)then
  B_MODEL_NPC = NL.CreateNpc("./lua/System/BaseModule/Base.lua", "Myinit");
  Char.SetData(B_MODEL_NPC, %对象_MAP%, 0);    
  Char.SetData(B_MODEL_NPC, %对象_地图%, 1000);     
  Char.SetData(B_MODEL_NPC, %对象_X%, 235);         
  Char.SetData(B_MODEL_NPC, %对象_Y%, 61);        
  Char.SetData(B_MODEL_NPC, %对象_名字%, B_ITEM);
  Char.SetData(B_MODEL_NPC, %对象_形象%, B_MODEL);   
  Char.SetData(B_MODEL_NPC, %对象_原形%, B_MODEL);   
  NLG.UpChar(B_MODEL_NPC);
 end
 
 if(A_MODEL_NPC ~= nil)then
  Char.SetData(A_MODEL_NPC, %对象_名字%, A_ITEM);
  Char.SetData(A_MODEL_NPC, %对象_形象%, A_MODEL);   
  Char.SetData(A_MODEL_NPC, %对象_原形%, A_MODEL);
  NLG.UpChar(A_MODEL_NPC);
 end 
 if(B_MODEL_NPC ~= nil)then
  Char.SetData(B_MODEL_NPC, %对象_名字%, B_ITEM);
  Char.SetData(B_MODEL_NPC, %对象_形象%, B_MODEL);   
  Char.SetData(B_MODEL_NPC, %对象_原形%, B_MODEL);
  NLG.UpChar(B_MODEL_NPC);
 end

 local SUM_ITEM=A_ITEM+B_ITEM;
 --update_Index();
 if SUM_ITEM > 7 then
  for k,v in pairs(GOLD_WIN_INFO) do
   if check_index(v.PLAYER_INDEX) then
    if Field.Get(v.PLAYER_INDEX,"@WIN_NPC_GOLD") == nil then
     Field.Set(v.PLAYER_INDEX,"@WIN_NPC_GOLD",0);
    end
    Easy_Talk(v.PLAYER_INDEX,_MePtr,"来来来,买定离手,买的多赔多多啦~");
    if v.TYPE == 1 then
     Easy_Talk(v.PLAYER_INDEX,_MePtr,A_ITEM.." "..B_ITEM.." 开大!恭喜你赢了!");
     local reward=v.GOLD_NUM * 1.95;
     Char.AddGold(v.PLAYER_INDEX,reward);
     local WIN_NPC_GOLD=tonumber(Field.Get(v.PLAYER_INDEX,"@WIN_NPC_GOLD"))-(v.GOLD_NUM * 0.95);
     Field.Set(v.PLAYER_INDEX,"@WIN_NPC_GOLD",WIN_NPC_GOLD);
     NLG.SystemMessage(v.PLAYER_INDEX,"赢得了"..reward.."金币!");
    else
     local WIN_NPC_GOLD=tonumber(Field.Get(v.PLAYER_INDEX,"@WIN_NPC_GOLD"))+v.GOLD_NUM;
     Field.Set(v.PLAYER_INDEX,"@WIN_NPC_GOLD",WIN_NPC_GOLD);
     Easy_Talk(v.PLAYER_INDEX,_MePtr,A_ITEM.." "..B_ITEM.." 开大!你输了!");
    end
   end
  end
  GOLD_WIN_INFO={};
  return
 elseif SUM_ITEM ==7  then
  for k,v in pairs(GOLD_WIN_INFO) do
   if check_index(v.PLAYER_INDEX) then
    if Field.Get(v.PLAYER_INDEX,"@WIN_NPC_GOLD") == nil then
     Field.Set(v.PLAYER_INDEX,"@WIN_NPC_GOLD",0);
    end
    Easy_Talk(v.PLAYER_INDEX,_MePtr,"来来来,买定离手,买的多赔多多啦~");
    if v.TYPE == 3 then
     Easy_Talk(v.PLAYER_INDEX,_MePtr,A_ITEM.." "..B_ITEM.." 开出了豹子!恭喜你赢了!");
     local reward=v.GOLD_NUM * 3.85;
     Char.AddGold(v.PLAYER_INDEX,reward);
     local WIN_NPC_GOLD=tonumber(Field.Get(v.PLAYER_INDEX,"@WIN_NPC_GOLD"))-(v.GOLD_NUM * 2.85);
     Field.Set(v.PLAYER_INDEX,"@WIN_NPC_GOLD",WIN_NPC_GOLD);
     NLG.SystemMessage(v.PLAYER_INDEX,"赢得了"..reward.."金币!");
    else
     local WIN_NPC_GOLD=tonumber(Field.Get(v.PLAYER_INDEX,"@WIN_NPC_GOLD"))+v.GOLD_NUM;
     Field.Set(v.PLAYER_INDEX,"@WIN_NPC_GOLD",WIN_NPC_GOLD);
     Easy_Talk(v.PLAYER_INDEX,_MePtr,A_ITEM.." "..B_ITEM.." 开出了豹子!你输了!");
    end
   end
  end
  GOLD_WIN_INFO={};
  return
 else
  for k,v in pairs(GOLD_WIN_INFO) do
   if check_index(v.PLAYER_INDEX) then
    if Field.Get(v.PLAYER_INDEX,"@WIN_NPC_GOLD") == nil then
     Field.Set(v.PLAYER_INDEX,"@WIN_NPC_GOLD",0);
    end
    Easy_Talk(v.PLAYER_INDEX,_MePtr,"来来来,买定离手,买的多赔多多啦~");
    if v.TYPE == 2 then
     Easy_Talk(v.PLAYER_INDEX,_MePtr,A_ITEM.." "..B_ITEM.." 开小!恭喜你赢了!");
     local reward=v.GOLD_NUM * 1.95;
     Char.AddGold(v.PLAYER_INDEX,reward);
     local WIN_NPC_GOLD=tonumber(Field.Get(v.PLAYER_INDEX,"@WIN_NPC_GOLD"))-(v.GOLD_NUM * 0.95);
     Field.Set(v.PLAYER_INDEX,"@WIN_NPC_GOLD",WIN_NPC_GOLD);
     NLG.SystemMessage(v.PLAYER_INDEX,"赢得了"..reward.."金币!");
    else
     local WIN_NPC_GOLD=tonumber(Field.Get(v.PLAYER_INDEX,"@WIN_NPC_GOLD"))+v.GOLD_NUM;
     Field.Set(v.PLAYER_INDEX,"@WIN_NPC_GOLD",WIN_NPC_GOLD);
     Easy_Talk(v.PLAYER_INDEX,_MePtr,A_ITEM.." "..B_ITEM.." 开小!你输了!");
    end
   end
  end
  GOLD_WIN_INFO={};
  return
 end
end

function update_Index()
 if table_is_empty(GOLD_WIN_INFO) then
  return
 end
 local TMP_TABLE=GOLD_WIN_INFO;
 for k,v in pairs(TMP_TABLE) do
  if check_index(v.PLAYER_INDEX) == false then
   local up_user_index=NLG.FindUser(v.PLAYER_CDKEY);
   if check_index(up_user_index) then
    GOLD_WIN_INFO[up_user_index]={};
    GOLD_WIN_INFO[up_user_index].TYPE=v.TYPE;
    GOLD_WIN_INFO[up_user_index].GOLD_NUM=v.GOLD_NUM;
    GOLD_WIN_INFO[up_user_index].PLAYER_INDEX=up_user_index;
    GOLD_WIN_INFO[up_user_index].PLAYER_CDKEY=v.PLAYER_CDKEY;
    GOLD_WIN_INFO[v.PLAYER_INDEX]=nil;
   end
  end
 end
 return
end

function update_tab()
 if table_is_empty(GOLD_WIN_INFO) then
  return
 end
 local TMP_TABLE=GOLD_WIN_INFO;
 for k,v in pairs(TMP_TABLE) do
  if v.GOLD_NUM == nil then
   GOLD_WIN_INFO[k]=nil;
  end
 end
 return
end

function  check_chongfu(index)
 local user_cdkey=Char.GetData(index,%对象_账号%);
 for k,v in pairs(GOLD_WIN_INFO) do
  if v.PLAYER_CDKEY == user_cdkey then
   return true;
  end
 end
 return false;
end

--买定离手
function init_GOLD_WIN_NPC()
 if(GOLD_WIN_NPC == nil)then
  GOLD_WIN_NPC = NL.CreateNpc("./lua/System/BaseModule/Base.lua", "Myinit");
  Char.SetData(GOLD_WIN_NPC, %对象_MAP%, 0);    
  Char.SetData(GOLD_WIN_NPC, %对象_地图%, 1000);     
  Char.SetData(GOLD_WIN_NPC, %对象_X%, 236);         
  Char.SetData(GOLD_WIN_NPC, %对象_Y%, 60);    
  -- Char.SetData(GOLD_WIN_NPC, %对象_地图%, 6437);     
  -- Char.SetData(GOLD_WIN_NPC, %对象_X%, 0);         
  -- Char.SetData(GOLD_WIN_NPC, %对象_Y%, 8);   
  Char.SetData(GOLD_WIN_NPC, %对象_方向%, %右下%);   
  Char.SetData(GOLD_WIN_NPC, %对象_名字%, "爱赌钱的莱克");
  Char.SetData(GOLD_WIN_NPC, %对象_形象%, 14002);   
  Char.SetData(GOLD_WIN_NPC, %对象_原形%, 14002);   
  NLG.UpChar(GOLD_WIN_NPC);
  Char.SetTalkedEvent(nil,"GOLD_WIN_NPCTalked",GOLD_WIN_NPC);
  Char.SetWindowTalkedEvent(nil,"GOLD_WIN_NPC_WinTalked",GOLD_WIN_NPC);
  Char.SetLoopEvent(nil, "GOLD_WIN_NPC_LoopEvent", GOLD_WIN_NPC, 1000 * 20);
  get_npc_name_print(GOLD_WIN_NPC);
 else
  NL.DelNpc(GOLD_WIN_NPC);
  GOLD_WIN_NPC=nil;
 end 
end
--NPC生成提示
function get_npc_name_print(index)
 local name = Char.GetData(index, %对象_名字%);
 print(name.."生成成功!");
end

function check_index(ptr)
 local rs = false;
 for i,k in pairs(tbl_player) do
  if k.Player_Index == ptr then
   rs=true;
   return rs;
  end
 end
 return rs;
end

--判断是否为空TABLE
function table_is_empty(t)
        return _G.next( t ) == nil
end

function GOLD_WIN_NPC_init()
 init_GOLD_WIN_NPC();
end

新开魔力私服网是一家专门为魔力宝贝私服管理员提供发布开服游戏相关信息的网站, 我们有严格的审核发布程序,那些烟花骗钱服将严禁在本站发布广告,避免玩家受到损失。

本站所有的魔力宝贝sf开服信息都是来妖城技术论坛, 本站只是为喜欢研究魔力sf技术的GM代理发布并无修改制作, 如果侵犯了您的权利请来信xkmlsf@hotmail.com告知!

Copyright © 2017 - 2018 新开魔力私服 All Rights Reserved.