Hi there, i have a Rush event, but the players die so i thought i give this a shot, but wait... There are 2 teams on rush event
Blue team and red team, how do i fix it?
Blue team and red team, how do i fix it?
LUA:
local c = {
campFrom = {x = 32310, y = 31891, z = 7},
campTo = {x = 32346, y = 31967, z = 7},
newPos = {x = 32369, y = 32241, z = 7}
}
function onStatsChange(cid, attacker, type, combat, value)
if(isInRange(getThingPos(cid), c.campFrom, c.campTo)) then
if (type == STATSCHANGE_HEALTHLOSS) then
if getCreatureHealth(cid) <= value then
doTeleportThing(cid, c.newPos)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
return false
end
end
end
return true
end