Advertisement
Kaiquegabriel

Untitled

Jul 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. local tpId = 5023
  2. local tps = {
  3. ["Hellgorak"] = {pos = {x=33104, y=31735, z=11}, toPos = {x=33106, y=31735, z=11}, time = 30},
  4. }
  5.  
  6. function removeTp(tp)
  7. local t = getTileItemById(tp.pos, tpId)
  8. if t then
  9. doRemoveItem(t.uid, 1)
  10. doSendMagicEffect(tp.pos, CONST_ME_POFF)
  11. end
  12. end
  13.  
  14. function onDeath(cid)
  15. local tp = tps[getCreatureName(cid)]
  16. if tp then
  17. doCreateTeleport(tpId, tp.toPos, tp.pos)
  18. doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1)
  19. addEvent(removeTp, tp.time*1000, tp)
  20. end
  21. return TRUE
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement