function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "yalahari")
local creaturename = getCreatureName(cid)
local yalahari_in_position = {x=1002, y=443, z=7, stackpos=2}
local yalahari_to_position = {x=990, y=497, z=7, stackpos=1}
local time_to_pass = 60
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 60 seconds to exit this room through the teleporter. It will bring you to the reward room only during his time or the teleporter will disappear."
if creaturename == 'Yalahari Boss' then
teleport = doCreateTeleport(tpID, yalahari_to_position, yalahari_in_position)
doSendMagicEffect(yalahari_in_position, CONST_ME_ENERGYHIT)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInYalahariBossWard, (1000*time_to_pass))
end
end
function removeTeleportInYalahariBossWard()
if getThingfromPos({x=1002, y=443, z=7, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=1002, y=443, z=7, stackpos=1}).uid,1)
doSendMagicEffect({x=1002, y=443, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end