function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "Undead Gladiator")
local creaturename = getCreatureName(cid)
local pos1 = {x=899, y=1296, z=7, stackpos=2}
local pos2 = {x=940, y=1272, z=7, stackpos=1}
local time_to_pass = 30 --
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "Udalo Wam sie!Macie 30 sekund na wejscie w teleport."
if creaturename == 'Undead Gladiator' then
teleport = doCreateTeleport(tpID, pos2, pos1)
doSendMagicEffect(pos1, doEffect)
addEvent(removeTeleportInBossWard, (1000*time_to_pass))
end
end
function removeTeleportInBossWard()
if getThingfromPos({x=899, y=1296, z=7, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=899, y=1296, z=7, stackpos=1}).uid,1)
doSendMagicEffect({x=899, y=1296, z=7, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end