I'm new script, trying to do one where you kill the player in area X you win an item.
but it is giving this error
[23:57:36.841] [Error - CreatureScript Interface]
[23:57:36.842] data/creaturescripts/scripts/monster.lua
nPrepareDeath
[23:57:36.843] Description:
[23:57:36.844] (luaDoPlayerAddItem) Player not found
but it is giving this error
[23:57:36.841] [Error - CreatureScript Interface]
[23:57:36.842] data/creaturescripts/scripts/monster.lua
[23:57:36.843] Description:
[23:57:36.844] (luaDoPlayerAddItem) Player not found
local arena = {
frompos = {x=32499, y=32369, z=7},
topos = {x=32567, y=32418, z=7},
exit = {x=32370, y=32231, z=5}
}
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
doPlayerAddItem(lastHitKiller, 2160,10)
end
end
return TRUE
end