Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function removeTeleport(pos, id)
- local item = getTileItemById(pos, id)
- if item.uid > 0 then
- doRemoveItem(item.uid)
- doSendMagicEffect(pos, CONST_ME_POFF)
- end
- return true
- end
- function onDeath(cid, corpse, killer)
- local in_pos = {x = 2027, y =1035, z = 7}
- local to_pos = {x = 2087, y = 1033, z = 7}
- local time_to_pass = 30 -- in seconds
- local tpID = 5023
- if isMonster(cid) then
- if getCreatureName(cid):lower() == 'devovorga' then
- doCreateTeleport(tpID, to_pos, in_pos)
- doSendMagicEffect(in_pos, CONST_ME_TELEPORT)
- doCreatureSay(cid, "You have "..time_to_pass.." seconds to enter the teleport before it is closed.", TALKTYPE_ORANGE_1)
- addEvent(removeTeleport, (1000*time_to_pass), in_pos, tpID)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment