Magictibiaman
New Member
- Joined
- May 25, 2009
- Messages
- 371
- Reaction score
- 0
The creaturescript configures fine.
When i attack the other player down past red the server crashs.
Why it should teleport him away.
Help please using Frank Farmers .3.6.
When i attack the other player down past red the server crashs.
Why it should teleport him away.
Help please using Frank Farmers .3.6.
<event type="statschange" name="CTF Kill" event="script" value="CTF Kill.lua"/>
function onStatsChange(cid, attacker, type, combat, value)
local destinations = {
{x = 32466, y = 31502, z = 7} ,
{x = 32466, y = 31494, z = 7}
}
if getPlayerStorageValue(cid, 3513) == 1 and getPlayerStorageValue(attacker, 3514) == 1 then
if getCreatureHealth(cid) <= value then
if (isPlayer(attacker) == true) then
doTeleportThing(cid, destinations[1])
end
end
elseif getPlayerStorageValue(cid, 3514) == 1 and getPlayerStorageValue(attacker, 3513) == 1 then
if getCreatureHealth(cid) <= value then
if (isPlayer(attacker) == true) then
doTeleportThing(cid, destinations[2])
end
end
else
dobroadcastmessage("Problem with CTF combat. Contact Gamemaster. Error 1")
return false
end
return true
end