Advertisement
Barebones

New tele

Dec 4th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. local UnitEntry = 900001
  2.  
  3. local T = {
  4. [1] = { "Horde Cities",
  5. {"Orgrimmar", 1, 1503, -4415.5, 22, 0},
  6. {"Undercity", 0, 1831, 238.5, 61.6, 0},
  7. {"Thunderbluff", 1, -1278, 122, 132, 0},
  8. {"Silvermoon", 530, 9484, -7294, 15, 0},
  9. },
  10. [2] = { "Alliance Cities",
  11. {"Stormwind", 0, -8905, 560, 94, 0.62},
  12. {"Ironforge", 0, -4795, -1117, 499, 0},
  13. {"Darnassus", 1, 9952, 2280.5, 1342, 1.6},
  14. {"The Exodar", 530, -3863, -11736, -106, 2},
  15. },
  16. [3] = { "Kalimdor Locations",
  17. {"Azuremyst Isle", 530, -4216, -12336, 4, 6},
  18. {"Durotar", 1, 1007, -4446, 11, 0},
  19. {"Mulgore", 1, -2192, -736, -13, 0},
  20. {"Teldrassil", 1, 10111, 1557, 1324, 4},
  21. {"Azshara", 1, 3341, -4603, 92, 5},
  22. {"Bloodmyst Isle", 530, -1993, -11475, 63, 5},
  23. {"Darkshore", 1, 5756, 298, 20, 6},
  24. {"Barrens", 1, 48, -2715, 91, 0},
  25. {"Moonglade", 1, 7654, -2232, 462, 6},
  26. {"Ashenvale", 1, 1928, -2165, 93, 0},
  27. {"Stonetalon Mountains", 1, 1570, 1031, 137, 3},
  28. {"Desolace", 1, -606, 2211, 92, 0},
  29. {"Dustwallow Marsh", 1, -4043, -2991, 36, 3},
  30. {"Feralas", 1, -4841, 1309, 81, 1},
  31. {"Thousand Needles", 1, -4969, -1726, -62, 3},
  32. {"Felwood", 1, 4102, -1006, 272, 0},
  33. {"Tanaris", 1, -7931., -3414, 80, 0},
  34. {"Un'Goro Crater", 1, -7943, -2119, -218, 6},
  35. {"Winterspring", 1, 6759, -4419, 763, 4},
  36. {"Silithus", 1, -7426, 1005, 1, 3},
  37. },
  38. [4] = { "Eastern Kingdom Locations",
  39.  
  40. },
  41. [5] = { "Outlands Locations",
  42. {"Blade's Edge Mountains", 530, 1481, 6829, 107, 6},
  43. {"Hellfire Peninsula", 530, -249, 947, 85, 2},
  44. {"Nagrand", 530, -1769, 7150, -9, 2},
  45. {"Netherstorm", 530, 3043, 3645, 143, 2},
  46. {"Shadowmoon Valley", 530, -3034, 2937, 87, 5},
  47. {"Terokkar Forest", 530, -1942, 4689, -2, 5},
  48. {"Zangarmarsh", 530, -217, 5488, 23, 2},
  49. {"Shattrath", 530, -1822, 5417, 1, 3},
  50. },
  51. [6] = { "Instances",
  52.  
  53. },
  54. [7] = { "Raids",
  55.  
  56. },
  57. [8] = { "PvP Locations",
  58. {"Gurubashi Arena", 0, -13229, 226, 33, 1},
  59. {"Dire Maul Arena", 1, -3669, 1094, 160, 3},
  60. {"Nagrand Arena", 530, -1983, 6562, 12, 2},
  61. {"Blade's Edge Arena", 530, 2910, 5976, 2, 4},
  62. },
  63. };
  64.  
  65. --[[ CODE STUFFS! DO NOT EDIT BELOW ]]--
  66. --[[ UNLESS YOU KNOW WHAT YOU'RE DOING! ]]--
  67.  
  68. function Teleporter_Gossip(event, player, unit)
  69. if (#T <= 10) then
  70. for i, v in ipairs(T) do
  71. player:GossipMenuAddItem(0, v[1], 0, i)
  72. end
  73. player:GossipSendMenu(1, unit)
  74. else
  75. print("This teleporter only supports 10 different menus.")
  76. end
  77. end
  78.  
  79. function Teleporter_Event(event, player, unit, sender, intid, code)
  80. if(intid == 0) then
  81. Teleporter_Gossip(event, player, unit)
  82. elseif(intid <= 10) then
  83. for i, v in ipairs(T[intid]) do
  84. if (i > 1) then
  85. player:GossipMenuAddItem(0, v[1], 0, intid..i)
  86. end
  87. end
  88. player:GossipMenuAddItem(0, "Back", 0, 0)
  89. player:GossipSendMenu(1, unit)
  90. elseif(intid > 10) then
  91. for i = 1, #T do
  92. for j, v in ipairs(T[i]) do
  93. if(intid == tonumber(i..j)) then
  94. player:GossipComplete()
  95. player:Teleport(v[2], v[3], v[4], v[5], v[6], v[7], v[8])
  96. end
  97. end
  98. end
  99. end
  100. end
  101.  
  102. RegisterGameObjectGossipEvent(UnitEntry, 1, Teleporter_Gossip)
  103. RegisterGameObjectGossipEvent(UnitEntry, 2, Teleporter_Event)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement