Advertisement
Kaiquegabriel

Untitled

Jul 21st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. local tpId = 1387
  2. local tps = {
  3. ["Ushuriel"] = {pos = {x=33157, y=31728, z=11}, toPos = {x=33069, y=31782, z=13}, time = 40},
  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. A FUNÇÃO DE REMOVER FICARIA NESSA LINHA EU ACHO
  18. doCreateTeleport(tpId, tp.toPos, tp.pos)
  19. doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1)
  20. addEvent(removeTp, tp.time*1000, tp)
  21. end
  22. return TRUE
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement