function restore(cid, pos, seconds)
if not isCreature(cid) then return true end
if seconds == 0 then
doTeleportThing(cid, pos)
doCreatureSay(cid, "Imortaly", TALKTYPE_ORANGE_1)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
mayNotMove(cid, false)
setPlayerStorageValue(cid, 56982, 0)
end
addEvent(restore, 1000, cid, pos, seconds -1)
end
function onPrepareDeath(cid, deathList)
local um = math.random(130, 212) -- Posição X
local dois = math.random(587, 660) -- Posição Y
local positions = --Areas onde os monstros nascerão randomicamente..
{
{x = um, y = dois, z = 8},
{x = um, y = dois, z = 8},
{x = um, y = dois, z = 8}
}
local pos = positions[math.random(1, #positions)]
local posArena = {x=pos.x, y=pos.y, z=pos.z} -- Posição randomizada que o player será teleportado
if getPlayerStorageValue(cid, 56982) == 1 and getPlayerLevel(cid) >= 600 then
if getTileArena(getCreaturePosition(cid)) == true then
return true
end
restore(cid, getThingPos(cid), 5)
addEvent(doCreatureAddHealth, 100, cid, getCreatureMaxHealth(cid))
doTeleportThing(cid, posArena)
mayNotMove(cid, true)
return false
end
return true
end