Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tpId = 1387
- local tps = {
- ["Ushuriel"] = {pos = {x=33157, y=31727, z=11}, toPos = {x=33167, y=31728, z=11}, time = 40},
- }
- function removeTp(tp)
- local t = getTileItemById(tp.pos, tpId)
- if t then
- doRemoveItem(t.uid, 1)
- doSendMagicEffect(tp.pos, CONST_ME_POFF)
- end
- end
- function onDeath(cid)
- local tp = tps[getCreatureName(cid)]
- if tp then
- doCreateTeleport(tpId, tp.toPos, tp.pos)
- doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1)
- addEvent(removeTp, tp.time*1000, tp)
- end
- return TRUE
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement