Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onDeath(cid, killer)
- local pos = {x = 33165, y = 31710, z = 14}
- local toPos = {x = 33164, y = 31710, z = 14}
- local tempo = 180
- local teleportID = 1387
- local storage = 18291
- local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."
- if getGlobalStorageValue(storage) == -1 then
- setGlobalStorageValue(storage, getGlobalStorageValue(storage)+1)
- elseif getGlobalStorageValue(storage) == 0 then
- doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
- doCreateTeleport(teleportID, toPos, pos)
- setGlobalStorageValue(storage, -1)
- addEvent(removeTeleport, tempo*1000, pos, teleportID)
- end
- return true
- end
- function removeTeleport(teleport)
- local t = getTileItemById(pos, teleportID)
- if t then
- doRemoveItem(t.uid, 1)
- doSendMagicEffect(pos, CONST_ME_POFF)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement