Advertisement
Barebones

Teleporter/Lua

Dec 1st, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.24 KB | None | 0 0
  1. local NPC_ID = 900001
  2.  
  3. local T =
  4. {
  5. -- Horde Cities
  6.  
  7. {1, 1503, -4415.5, 22, 0}, -- Orgrimmar intid 1
  8. {0, 1831, 238.5, 61.6, 0}, -- Undercity intid 2
  9. {1, -1278, 122, 132, 0}, -- Thunderbluff intid 3
  10. {530, 9484, -7294, 15, 0}, -- Silvermoon intid 4
  11.  
  12. -- Ally Cities
  13.  
  14. {0, -8905, 560, 94, 0.62}, -- Stormwind intid 5
  15. {0, -4795, -1117, 499, 0}, -- Ironforge intid 6
  16. {1, 9952, 2280.5, 1342, 1.6}, -- Darnassus intid 7
  17. {530, -3863, -11736, -106, 2}, -- The Exodar intid 8
  18.  
  19. -- Outlands Locations
  20.  
  21. {530, 1481, 6829, 107, 6}, -- Blade's Edge intid 9
  22. {530, -249, 947, 85, 2}, -- Hellfire intid 10
  23. {530, -1769, 7150, -9, 2}, -- Nagrand intid 11
  24. {530, 3043, 3645, 143, 2}, -- Netherstorm intid 12
  25. {530, -3034, 2937, 87, 5}, -- Shadowmoon intid 13
  26. {530, -1942, 4689, -2, 5}, -- Terokkar intid 14
  27. {530, -217, 5488, 23, 2}, -- Zangarmarsh intid 15
  28. {530, -1822, 5417, 1, 3}, -- Shattrath intid 16
  29.  
  30. -- PvP Locations
  31.  
  32. {0, -13229, 226, 33, 1}, -- Gurubashi intid 28
  33. {1, -3669, 1094, 160, 3}, -- Dire Maul intid 29
  34. {530, -1983, 6562, 12, 2}, -- Nagrand intid 30
  35. {530, 2910, 5976, 2, 4}, -- Blade's Edge intid 31
  36.  
  37. --Kalimdor
  38. {530, -4216, -12336, 4, 6} --Azuremyst Isle intid 32
  39. {1, 1007, -4446, 11, 0} --Durotar intid 33
  40. {1, -2192, -736, -13, 0} --Mulgore intid 34
  41. {1, 10111, 1557, 1324, 4} --Teldrassil intid 35
  42. {1, 3341, -4603, 92, 5} --Azshara intid 36
  43. {530, -1993, -11475, 63, 5} --Bloodmyst Isle intid 37
  44. {1, 5756, 298, 20, 6} --Darkshore intid 38
  45. {1, 48, -2715, 91, 0} --Barrens intid 39
  46. {1, 7654, -2232, 462, 6} --Moonglade intid 40
  47. {1, 1928, -2165, 93, 0} --Ashenvale intid 41
  48. {1, 1570, 1031, 137, 3} --Stonetalon Mountains intid 42
  49. {1, -606, 2211, 92, 0} --Desolace intid 43
  50. {1, -4043, -2991, 36, 3} --Dustwallow Marsh intid 44
  51. {1, -4841, 1309, 81, 1} --Feralas intid 45
  52. {1, -4969, -1726, -62, 3} --Thousand Needles intid 46
  53. {1, 4102, -1006, 272, 0} --Felwood intid 47
  54. {1, -7931., -3414, 80, 0} --Tanaris intid 48
  55. {1, -7943, -2119, -218, 6} --Un'Goro Crater intid 49
  56. {1, 6759, -4419, 763, 4} --Winterspring intid 50
  57. {1, -7426, 1005, 1, 3} --Silithus intid 51
  58.  
  59. --Eastern Kingdoms
  60.  
  61.  
  62. --Instances
  63.  
  64.  
  65. --Raids--
  66. }
  67.  
  68. function Teleporter_Gossip(event, plr, unit)
  69. plr:GossipMenuAddItem(0, "Main Cities", 0, 1001, 0)
  70. plr:GossipMenuAddItem(0, "Kalimdor Locations", 0, 1002, 0)
  71. plr:GossipMenuAddItem(0, "Eastern Kingdoms Locations", 0, 1003, 0)
  72. plr:GossipMenuAddItem(0, "Outlands Locations", 0, 1004, 0)
  73. plr:GossipMenuAddItem(0, "Dungeons", 0, 1005, 0)
  74. plr:GossipMenuAddItem(0, "Raids", 0, 1006, 0)
  75. plr:GossipMenuAddItem(0, "PvP Locations", 0, 1007, 0)
  76. plr:GossipSendMenu(1, unit)
  77. end
  78.  
  79. function Teleporter_Event(event, plr, unit, arg2, intid)
  80. if(intid >= 1) and (intid <= 100) then
  81. plr:Teleport(T[intid][1], T[intid][2], T[intid][3], T[intid][4], T[intid][5], T[intid][6], T[intid][7])
  82. elseif(intid == 1000) then
  83. Teleporter_Gossip(event, plr, unit)
  84. elseif(intid >= 1001) and (intid <= 1007) then
  85. if(intid == 1001) then
  86. if(plr:GetTeam() == 1) then
  87. plr:GossipMenuAddItem(2, "Orgrimmar", 0, 1)
  88. plr:GossipMenuAddItem(2, "Undercity", 0, 2)
  89. plr:GossipMenuAddItem(2, "Thunderbluff", 0, 3)
  90. plr:GossipMenuAddItem(2, "Silvermoon", 0, 4)
  91. plr:GossipMenuAddItem(2, "Shattrath", 0, 16)
  92. else
  93. plr:GossipMenuAddItem(2, "Stormwind", 0, 5)
  94. plr:GossipMenuAddItem(2, "Ironforge", 0, 6)
  95. plr:GossipMenuAddItem(2, "Darnassus", 0, 7)
  96. plr:GossipMenuAddItem(2, "The Exodar", 0, 8)
  97. plr:GossipMenuAddItem(2, "Shattrath", 0, 16)
  98. end
  99. elseif(intid == 1002) then
  100. plr:GossipMenuAddItem(2, "Azuremyst Isle", 0, 32)
  101. plr:GossipMenuAddItem(2, "Durotar", 0, 33)
  102. plr:GossipMenuAddItem(2, "Mulgore", 0, 34)
  103. plr:GossipMenuAddItem(2, "Teldrassil", 0, 35)
  104. plr:GossipMenuAddItem(2, "Azshara", 0, 36)
  105. plr:GossipMenuAddItem(2, "Bloodmyst Isle", 0, 37)
  106. plr:GossipMenuAddItem(2, "Darkshore", 0, 38)
  107. plr:GossipMenuAddItem(2, "Barrens", 0, 39)
  108. plr:GossipMenuAddItem(2, "Moonglade", 0, 40)
  109. plr:GossipMenuAddItem(2, "Ashenvale", 0, 41)
  110. plr:GossipMenuAddItem(2, "Stonetalon Mountains", 0, 42)
  111. plr:GossipMenuAddItem(2, "Desolace", 0, 43)
  112. plr:GossipMenuAddItem(2, "Dustwallow Marsh", 0, 44)
  113. plr:GossipMenuAddItem(2, "Feralas", 0, 45)
  114. plr:GossipMenuAddItem(2, "Thousand Needles", 0, 46)
  115. plr:GossipMenuAddItem(2, "Felwood", 0, 47)
  116. plr:GossipMenuAddItem(2, "Tanaris", 0, 48)
  117. plr:GossipMenuAddItem(2, "Un'Goro Crater", 0, 49)
  118. plr:GossipMenuAddItem(2, "Winterspring", 0, 50)
  119. plr:GossipMenuAddItem(2, "Silithus", 0, 51)
  120. elseif(intid == 1004) then
  121. plr:GossipMenuAddItem(2, "Blade's Edge Mountains", 0, 9)
  122. plr:GossipMenuAddItem(2, "Hellfire Peninsula", 0, 10)
  123. plr:GossipMenuAddItem(2, "Nagrand", 0, 11)
  124. plr:GossipMenuAddItem(2, "Netherstorm", 0, 12)
  125. plr:GossipMenuAddItem(2, "Shadowmoon Valley", 0, 13)
  126. plr:GossipMenuAddItem(2, "Terokkar Forest", 0, 14)
  127. plr:GossipMenuAddItem(2, "Zangramarsh", 0, 15)
  128. elseif(intid == 1007) then
  129. plr:GossipMenuAddItem(9, "Gurubashi Arena", 0, 28)
  130. plr:GossipMenuAddItem(9, "Dire Maul Arena", 0, 29)
  131. plr:GossipMenuAddItem(9, "Nagrand Arena", 0, 30)
  132. plr:GossipMenuAddItem(9, "Blade's Edge Arena", 0, 31)
  133. end
  134. plr:GossipMenuAddItem(0, "Back", 0, 1000)
  135. plr:GossipSendMenu(1, unit)
  136. end
  137. end
  138.  
  139. RegisterCreatureGossipEvent(NPC_ID, 1, Teleporter_Gossip)
  140. RegisterCreatureGossipEvent(NPC_ID, 2, Teleporter_Event)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement