烈焰服务端根据充值金额的一定比例给予道具返利脚本
发表时间:2016-03-10 10:28点击人气:责任编辑:admin
--放充值触发处
lbsl=remain_time/100000
if remain_time/100000 < 30 and player:num_bag_black() >= lbsl then
player:add_item(10130,lbsl,0);
player:alert(10,0,0,"获得神魔礼包x"..lbsl.."");
elseif remain_time/100000 >= 30 and remain_time/100000 < 50 then
player:add_item(10403,math.floor(lbsl/30),0);
player:add_item(10130,lbsl%30,0);
player:alert(10,0,0,"获得神魔礼包x"..(math.floor(lbsl/30)+lbsl%30).."");
elseif remain_time/100000 >= 50 and remain_time/100000 < 99 then
player:add_item(10404,math.floor(lbsl/50),0);
player:add_item(10403,math.floor((lbsl%50)/30),0);
player:add_item(10130,((lbsl%99)%50)%30,0);
player:alert(10,0,0,"获得神魔礼包x"..(math.floor(lbsl/50)*50+math.floor((lbsl%50)/30)*30+((lbsl%99)%50)%30).."");
elseif remain_time/100000 >= 99 then
player:add_item(10405,math.floor(lbsl/99),0);
player:add_item(10404,math.floor((lbsl%99)/50),0);
player:add_item(10403,math.floor(((lbsl%99)%50)/30),0);
player:add_item(10130,((lbsl%99)%50)%30,0);
player:alert(10,0,0,"获得神魔礼包x"..(math.floor(lbsl/99)*99+math.floor((lbsl%99)/50)*50+math.floor(((lbsl%99)%50)/30)*30+((lbsl%99)%50)%30).."");
else
player:alert(10,0,0,""..remain_time.."获得神魔礼包x0");
end
lbsl=remain_time/100000
if remain_time/100000 < 30 and player:num_bag_black() >= lbsl then
player:add_item(10130,lbsl,0);
player:alert(10,0,0,"获得神魔礼包x"..lbsl.."");
elseif remain_time/100000 >= 30 and remain_time/100000 < 50 then
player:add_item(10403,math.floor(lbsl/30),0);
player:add_item(10130,lbsl%30,0);
player:alert(10,0,0,"获得神魔礼包x"..(math.floor(lbsl/30)+lbsl%30).."");
elseif remain_time/100000 >= 50 and remain_time/100000 < 99 then
player:add_item(10404,math.floor(lbsl/50),0);
player:add_item(10403,math.floor((lbsl%50)/30),0);
player:add_item(10130,((lbsl%99)%50)%30,0);
player:alert(10,0,0,"获得神魔礼包x"..(math.floor(lbsl/50)*50+math.floor((lbsl%50)/30)*30+((lbsl%99)%50)%30).."");
elseif remain_time/100000 >= 99 then
player:add_item(10405,math.floor(lbsl/99),0);
player:add_item(10404,math.floor((lbsl%99)/50),0);
player:add_item(10403,math.floor(((lbsl%99)%50)/30),0);
player:add_item(10130,((lbsl%99)%50)%30,0);
player:alert(10,0,0,"获得神魔礼包x"..(math.floor(lbsl/99)*99+math.floor((lbsl%99)/50)*50+math.floor(((lbsl%99)%50)/30)*30+((lbsl%99)%50)%30).."");
else
player:alert(10,0,0,""..remain_time.."获得神魔礼包x0");
end
脚本内的道具entry 请自行修改,还有充值比例,默认1:10000
- 上一篇:给烈焰增加玩家自助刷怪的脚本代码
- 下一篇:烈焰私服仿官方九幽传送员脚本代码