Magictibiaman
New Member
- Joined
- May 25, 2009
- Messages
- 371
- Reaction score
- 0
This code executes properly i have no ingame problems with it.
Altough keep getting this error in my dos window.
Its an annoying error and i don't want it to fill up my dos window.
Altough keep getting this error in my dos window.
[Error - CreatureScripts Interface] data/creaturescripts/scripts/Ctfkill.lua : onStatsChange Description (luaGetCreatureStorage) Creature not found
Its an annoying error and i don't want it to fill up my dos window.
Code:
function onStatsChange(cid, attacker, type, combat, value)
local destinations = {
{x = 32466, y = 31502, z = 7} ,
{x = 32466, y = 31494, z = 7}
}
if isPlayer(cid) == true then
if getPlayerStorageValue(cid, 57463) == 1 then
if getPlayerStorageValue(cid, 3513) == 1 and getPlayerStorageValue(attacker, 3514) == 1 then
if getCreatureHealth(cid) <= value then
if (isPlayer(attacker) == true) then
if type == 1 then
doTeleportThing(cid, destinations[1])
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
return false
end
end
end
elseif getPlayerStorageValue(cid, 3514) == 1 and getPlayerStorageValue(attacker, 3513) == 1 then
if getCreatureHealth(cid) <= value then
if (isPlayer(attacker) == true) then
if type == 1 then
doTeleportThing(cid, destinations[2])
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
return false
end
end
end
else
return true
end
end
end
return true
end
Last edited: