最新最全最权威的各类手游,端游,页游游戏信息开服信息,尽在游民之家. 订阅微信

烈焰里增加每次挖宝的挖宝间隔限制[YEYO6原创脚本]

发表时间:2015-03-09 21:02点击人气:责任编辑:admin

打开treasure.lua脚本

脚本代码

function OnLuckDraw(player, draw_count)
if player:get_param(283)>0 then
player:SendChatMessageToPlayer(2,0,"距离下次挖宝间隔"..player:get_param(283).."秒",player);
end
 local t = tonumber(os.date("%m%d",os.time()));
 local i,count,flag =0,0,0;
 count = player:get_param(268)/1;
 count = math.floor(count);
 if count >=draw_count then
 if player:get_param(283)>0 then
  count = 0;
  else
  count = draw_count;
  end
 else
  flag = 2;
 end


 if count > 0 then
 player:set_param(268,player:get_param(268) -count);
 player:set_param(261,player:get_param(261) + count);
 player:set_param(283,3*count);
 player:set_timer(7,3*count);
 player:alert(10,0,0,"开启宝藏:"..count.." 次, 宝藏钥匙剩余数量:"..player:get_param(268).." 把");
 end


 打开Player.lua脚本

 

脚本代码function OnSetTimer(player,index)里增加这个变量数
if index == 7 then
if player:get_param(283)>0 then
player:set_param(283,0);
end
end


以上脚本由页游咯YEYO6.COM原创首发,转载请注明出处