Hello guys, i have an TFS 0.3.6 8.6
And i have an creaturescripts with event preparedeath
Everything works right
creaturescripts.xml
arenadeath.lua
the problemn is lastHitKiller and mostDamageKiller is null on arenadeath.lua, they are simply empty, what is wrong?
And i have an creaturescripts with event preparedeath
Everything works right
creaturescripts.xml
Code:
<event type="preparedeath" name="Arenadeath" event="script" value="arenadeath.lua"/>
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
local area = {x = 32349, y = 32257, z = 9}
local area2 = {x = 32352, y = 32259, z = 9}
if isInArea(getCreaturePosition(cid), area, area2) then
doCreatureSetDropLoot(cid, false)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid) + 65500, true)
doTeleportThing(cid, {x = 32345, y = 32255, z =9})
doPlayerSendTextMessage(cid, 27, "Você perdeu!")
doTeleportThing(lastHitKiller, {x = 32356, y = 32255, z =9})
doPlayerSendTextMessage(lastHitKiller, 27, "Parabens, você ganhou!")
end
return true
end
the problemn is lastHitKiller and mostDamageKiller is null on arenadeath.lua, they are simply empty, what is wrong?