Michaelcain6

Lua Teleporter Arcemu

Jun 11th, 2013
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. function Hello(pUnit, event, pPlayer)
  2.  pUnit:GossipCreateMenu(100, player, 0)
  3.  pUnit:GossipMenuAddItem(0, "Event Easy", 1, 0) -- intid is 1
  4.  pUnit:GossipMenuAddItem(0, "Event Med", 2, 0)
  5.  pUnit:GossipSendMenu(pPlayer)
  6.  
  7. end
  8.  
  9. --[[
  10. You'll definatly need to replace all the text after the = sign with your MapID, X, Y, Z, and Orientation. Delete that text!
  11. For example,
  12. local map = 1
  13. local x = 123.455
  14. local y = -123.455
  15. local z = 1234.566
  16. local o = 2.4434
  17. ]]
  18.  
  19. local map1 = first map
  20. local x1 = first x position here
  21. local y1 = first y position here
  22. local z1 = first z position here
  23. local o1 = first orientation here
  24.  
  25. local map2 = second map
  26. local x2 = second x position here
  27. local y2 = second y position here
  28. local z2 = second z position here
  29. local o2 = second orientation here
  30.  
  31.  
  32. function Teleport(pUnit, event, pPlayer, id, intid, code)
  33.  
  34. if(intid = 1) then
  35.     pPlayer:Teleport(map1, x1, y1, z1, o1)
  36.     end
  37. if(intid = 2) then
  38.     pPlayer:Teleport(map2, x2, y2, z2, o2)
  39.     end
  40. end
  41.  
  42. RegisterUnitGossipEvent(90001, 1, Hello)
  43. RegisterUnitGossipEvent(90001, 2, Teleport)
Advertisement
Add Comment
Please, Sign In to add comment