Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. local config = {
  2. entry =
  3. {
  4. {x = 1000, y = 1000, z = 7}, -- player 1
  5. {x = 1000, y = 1002, z = 7} -- player 2
  6. },
  7. destination =
  8. {
  9. {x = 1000, y = 1002, z = 7}, --player 1 ny plats
  10. {x = 1000, y = 1000, z = 7} --player 2 ny plats
  11. }
  12. }
  13.  
  14. function onUse(cid, item, fromPosition, itemEx, toPosition)
  15. if(item.itemid == 1946) then
  16. if(config.daily) then
  17. doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
  18. else
  19. doTransformItem(item.uid, item.itemid - 1)
  20. end
  21.  
  22. return true
  23. end
  24.  
  25. if(item.itemid ~= 1945) then
  26. return true
  27. end
  28.  
  29. local players = {}
  30. for _, position in ipairs(config.entry) do
  31. local pid = getTopCreature(position).uid
  32. end
  33. end
  34.  
  35. for i, pid in ipairs(players) do
  36. doSendMagicEffect(config.entry[i], CONST_ME_POFF)
  37. doTeleportThing(pid, config.destination[i], false)
  38. doSendMagicEffect(config.destination[i], CONST_ME_ENERGYAREA)
  39. end
  40.  
  41. doTransformItem(item.uid, item.itemid + 1)
  42. return true
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement