• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Player is teleported out instead of dying.

astamor

New Member
Joined
Jul 22, 2011
Messages
42
Reaction score
2
Hello :)
I need the script that teleports player out of area. It's like arena fight in many servers. You go in some area and after you lose fight you don't die' don't lose items, exp, etc but you are teleported out.
 
Code:
function onPrepareDeath(cid, deathList)
local from = {x=500,y=600,z=7}
local to = {x=600,y=500,z=7}
if isPlayer(cid) and isInArea(getCreaturePosition(cid), from, to) then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true)
doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
doTeleportThing(cid, getCreaturePosition(cid))
doSendMagicEffect(getCreaturePosition(cid), 10)
return false
end
return true
end
 
Back
Top