Hello friends, i have on my server, a PVP arena, on 8.4 server work fine, because have a PLAYERDEATH script, but on 8.5 servers dont have this options, when a player death on my area, him dont loot nothing, but apear this error on console.
-- Error message:
-- This DEATH on creaturescript:
-- This TAG on creaturescripts
--Plx frients help me to solve this problem... thx for all...
-- Error message:
Lua:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/Pvp_Arena.lua:onPrepareDeath
luaDoPlayerSendTextMessage(). Player not found
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/Pvp_Arena.lua:onPrepareDeath
luaGetCreatureName(). Creature not found
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/Pvp_Arena.lua:onPrepareDeath
data/creaturescripts/scripts/Pvp_Arena.lua:14: attempt to concatenate a boolean
value
stack traceback:
data/creaturescripts/scripts/Pvp_Arena.lua:14: in function <data/creatur
escripts/scripts/Pvp_Arena.lua:7>
Lua:
local arena = {
frompos = {x=499, y=489, z=9},
topos = {x=515, y=498, z=9},
exit = {x=517, y=493, z=8}
}
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
if doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid), TRUE) == TRUE then
if doTeleportThing(cid, arena.exit) == TRUE then
doSendMagicEffect(arena.exit, 10)
doPlayerSendTextMessage(mostDamageKiller,MESSAGE_STATUS_CONSOLE_BLUE,'[ARENA] Você matou '..getPlayerName(cid)..'!')
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,'[ARENA] Você foi morto por '..getPlayerName(mostDamageKiller)..'!')
return FALSE
end
end
end
end
return TRUE
end
Lua:
<event type="preparedeath" name="Arenapvp" event="script" value="Pvp_Arena.lua"/>
--Plx frients help me to solve this problem... thx for all...