烈焰服务端增加安全区泡点脚本代码(原版地图和雷霆地图)
发表时间:2016-07-24 00:31点击人气:责任编辑:admin
烈焰服务端增加安全区泡点脚本代码2个地图模式(精准判断)
烈焰城地图:1为原版地图、2为雷霆地图
根据自身地图的不同 设置. 玩家在安全区范围内自动开启泡点.
function aqpd(hour,min)
local ybsl = math.random(100,1000); --默认元宝数量:100-1000随机
local jysl = math.random(1000000,10000000); --默认元宝数量:100W-1000W随机
local pdsj = 1; --间隔时间:1分钟
local dt = 2; --烈焰城地图:1为原版地图、2为雷霆地图
local bl = 265; --泡点变量:变量
if min%pdsj == 0 then
if dt == 1 then --原版烈焰城判断
for w,f in pairs(GetPlayersInWorld()) do
local x,y = 0,0;
local x = math.abs(f:GetX() - 116);
local y = math.abs(f:GetY() - 115);
if f:GetMapId() == 12 and x + y <= 18 then
local i = math.random(1,2);
if i == 1 then
f:add_exp(jysl);
f:alert(10,0,0,"泡点获得:"..jysl.."经验");
g_alert("玩家【<font color='#FF0000'>"..f:GetName().."</font>】在泡点获得:"..jysl.."经验",2,1000,0,1);
else
f:add_vcoin(ybsl);
f:alert(10,0,0,"泡点获得:"..ybsl.."元宝");
g_alert("玩家【<font color='#FF0000'>"..f:GetName().."</font>】在泡点获得:"..ybsl.."元宝",2,1000,0,1);
end
else
f:alert(10,0,0,"离开安全区,停止泡点");
end
end
else --雷霆烈焰城判断
for w,f in pairs(GetPlayersInWorld()) do
local x,y = 0,0;
local x = math.abs(f:GetX() - 118);
local y = math.abs(f:GetY() - 102);
if f:GetMapId() == 12 and x + y <= 17 then
local i = math.random(1,2);
if i == 1 then
f:add_exp(jysl);
f:alert(10,0,0,"泡点获得:"..jysl.."经验");
g_alert("玩家【<font color='#FF0000'>"..f:GetName().."</font>】在泡点获得:"..jysl.."经验",2,1000,0,1);
else
f:add_vcoin(ybsl);
f:alert(10,0,0,"泡点获得:"..ybsl.."元宝");
g_alert("玩家【<font color='#FF0000'>"..f:GetName().."</font>】在泡点获得:"..ybsl.."元宝",2,1000,0,1);
end
else
f:alert(10,0,0,"离开安全区,停止泡点");
end
end
end
end
end
local ybsl = math.random(100,1000); --默认元宝数量:100-1000随机
local jysl = math.random(1000000,10000000); --默认元宝数量:100W-1000W随机
local pdsj = 1; --间隔时间:1分钟
local dt = 2; --烈焰城地图:1为原版地图、2为雷霆地图
local bl = 265; --泡点变量:变量
if min%pdsj == 0 then
if dt == 1 then --原版烈焰城判断
for w,f in pairs(GetPlayersInWorld()) do
local x,y = 0,0;
local x = math.abs(f:GetX() - 116);
local y = math.abs(f:GetY() - 115);
if f:GetMapId() == 12 and x + y <= 18 then
local i = math.random(1,2);
if i == 1 then
f:add_exp(jysl);
f:alert(10,0,0,"泡点获得:"..jysl.."经验");
g_alert("玩家【<font color='#FF0000'>"..f:GetName().."</font>】在泡点获得:"..jysl.."经验",2,1000,0,1);
else
f:add_vcoin(ybsl);
f:alert(10,0,0,"泡点获得:"..ybsl.."元宝");
g_alert("玩家【<font color='#FF0000'>"..f:GetName().."</font>】在泡点获得:"..ybsl.."元宝",2,1000,0,1);
end
else
f:alert(10,0,0,"离开安全区,停止泡点");
end
end
else --雷霆烈焰城判断
for w,f in pairs(GetPlayersInWorld()) do
local x,y = 0,0;
local x = math.abs(f:GetX() - 118);
local y = math.abs(f:GetY() - 102);
if f:GetMapId() == 12 and x + y <= 17 then
local i = math.random(1,2);
if i == 1 then
f:add_exp(jysl);
f:alert(10,0,0,"泡点获得:"..jysl.."经验");
g_alert("玩家【<font color='#FF0000'>"..f:GetName().."</font>】在泡点获得:"..jysl.."经验",2,1000,0,1);
else
f:add_vcoin(ybsl);
f:alert(10,0,0,"泡点获得:"..ybsl.."元宝");
g_alert("玩家【<font color='#FF0000'>"..f:GetName().."</font>】在泡点获得:"..ybsl.."元宝",2,1000,0,1);
end
else
f:alert(10,0,0,"离开安全区,停止泡点");
end
end
end
end
end