Hello everyone! I found this script and trying edited but something doesn't work. Anyone can help me?
And how to make NOSKULL area in arena like PVPzone in RME. I don't want PVPzone because when player die then he was teleport to temple but i want teleport to X position.
*This script teleported only loser player to loser.pos but don't give him full HP and doesn't show "You have defeated ..." Player die and after relog he is in temple.
And how to make NOSKULL area in arena like PVPzone in RME. I don't want PVPzone because when player die then he was teleport to temple but i want teleport to X position.
*This script teleported only loser player to loser.pos but don't give him full HP and doesn't show "You have defeated ..." Player die and after relog he is in temple.
Code:
local arena = {
frompos = {x=1543, y=1582, z=7},
topos = {x=1552, y=1590, z=7},
loser = {x=1554, y=1574, z=7},
winer = {x=1551, y=1574, z=7}
}
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if isInArea(getPlayerPosition(cid), arena.frompos, arena.topos) then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doTeleportThing(cid, arena.loser)
doSendMagicEffect(arena.loser, 10)
doCreatureAddHealth(mostDamageKiller, getCreatureMaxHealth(cid))
doTeleportThing(mostDamageKiller, arena.winer)
doSendMagicEffect(arena.winer, 10)
doPlayerSendTextMessage(mostDamageKiller,MESSAGE_STATUS_CONSOLE_BLUE,"You have defeated "..getPlayerName(cid).."!")
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"You were defeated by "..getPlayerName(mostDamageKiller).."!")
return FALSE
end
end
return TRUE
end
Code:
[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaDoCreatureAddHealth) Creature not found
[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaDoTeleportThing) Thing not found
[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaDoPlayerSendTextMessage) Player not found
[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] (luaGetCreatureName) Creature not found
[17/07/2014 21:32:43] [Error - CreatureScript Interface]
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:onPrepareDeath
[17/07/2014 21:32:43] Description:
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:18: attempt to concatenate a boolean value
[17/07/2014 21:32:43] stack traceback:
[17/07/2014 21:32:43] data/creaturescripts/scripts/pvparena.lua:18: in function <data/creaturescripts/scripts/pvparena.lua:8>