Kaiquegabriel

Untitled

Jul 21st, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. local teleportID = 1387
  2. local monsters = {
  3. ["Hellgorak"] = {pos = {x=33165, y=31726, z=11}, toPos = {x=33165, y=31726, z=11}, time = 180},
  4. ["Annihilon"] = {pos = {x=33165, y=31727, z=11}, toPos = {x=33164, y=31726, z=11}, time = 180},
  5. ["Madareth"] = {pos = {x=33165, y=31728, z=11}, toPos = {x=33163, y=31726, z=11}, time = 180},
  6. ["Ushuriel"] = {pos = {x=33165, y=31729, z=11}, toPos = {x=33162, y=31726, z=11}, time = 180},
  7. ["Zugurosh"] = {pos = {x=33165, y=31730, z=11}, toPos = {x=33161, y=31726, z=11}, time = 180}
  8. }
  9.  
  10. function onDeath(cid)
  11. local tp = monsters[getCreatureName(cid)]
  12. if tp then
  13. doCreateTeleport(teleportID, tp.toPos, tp.pos)
  14. doCreatureSay(cid, "O teleport irรก sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1)
  15. addEvent(removeTeleport, tp.time*1000, tp)
  16. end
  17. return TRUE
  18. end
  19.  
  20. function removeTeleport(teleport)
  21. local t = getTileItemById(tp.pos, teleportID)
  22. if t then
  23. doRemoveItem(t.uid, 1)
  24. doSendMagicEffect(tp.pos, CONST_ME_POFF)
  25. end
  26. end
Add Comment
Please, Sign In to add comment