Advertisement
Rochet2

Untitled

Jun 26th, 2013
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.82 KB | None | 0 0
  1. local ITEM_ID = 6948
  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.         -- Northrend Locations
  31.        
  32.         {571, 3230, 5279, 47, 3},       -- Borean Tundra    intid 17
  33.         {571, 5732, 1016, 175, 3.6},        -- Crystalsong      intid 18
  34.         {571, 3547, 274, 46, 1.6},      -- Dragonblight     intid 19
  35.         {571, 3759, -2672, 177, 3},     -- Grizzly Hills    intid 20
  36.         {571, 772, -2905, 7, 5},        -- Howling Fjord    intid 21
  37.         {571, 8517, 676, 559, 4.7},     -- Icecrown     intid 22
  38.         {571, 5571, 5739, -75, 2},      -- Sholazar     intid 23
  39.         {571, 6121, -1025, 409, 4.7},       -- Storm Peaks      intid 24
  40.         {571, 5135, 2840, 408, 3},      -- Wintergrasp      intid 25
  41.         {571, 5761, -3547, 387, 5},     -- Zul'Drak     intid 26
  42.         {571, 5826, 470, 659, 1.4},     -- Dalaran      intid 27
  43.        
  44.         -- PvP Locations
  45.        
  46.         {0, -13229, 226, 33, 1},        -- Gurubashi        intid 28
  47.         {1, -3669, 1094, 160, 3},       -- Dire Maul        intid 29
  48.         {530, -1983, 6562, 12, 2},      -- Nagrand      intid 30
  49.         {530, 2910, 5976, 2, 4},        -- Blade's Edge     intid 31
  50.     }
  51.  
  52. function ItemTeleporter_Gossip(event, plr, item)
  53.     plr:GossipClearMenu()
  54.     plr:GossipMenuAddItem(0, "Hyjal Mall", 0, 1005, 0)
  55.     plr:GossipMenuAddItem(0, "Main Cities", 0, 1001, 0)
  56.     plr:GossipMenuAddItem(0, "Outlands Locations", 0, 1002, 0)
  57.     plr:GossipMenuAddItem(0, "Northrend Locations", 0, 1003, 0)
  58.     plr:GossipMenuAddItem(0, "PvP Locations", 0, 1004, 0)
  59.     plr:GossipMenuAddItem(0, "Repair", 0, 1006, 0)
  60.     plr:GossipSendMenu(1, item)
  61. end
  62.  
  63. function ItemTeleporter_Event(event, plr, item, arg2, intid)
  64.     if(intid >= 1) and (intid <= 100) then
  65.         plr:Teleport(T[intid][1], T[intid][2], T[intid][3], T[intid][4], T[intid][5])
  66.         plr:GossipComplete()
  67.     elseif(intid == 1000) then
  68.         ItemTeleporter_Gossip(event, plr, item)
  69.     elseif(intid >= 1001) and (intid <= 1006) then
  70.         if(intid == 1001) then
  71.             if(plr:GetTeam() == 1) then
  72.                 plr:GossipMenuAddItem(2, "Orgrimmar", 0, 1)
  73.                 plr:GossipMenuAddItem(2, "Undercity", 0, 2)
  74.                 plr:GossipMenuAddItem(2, "Thunderbluff", 0, 3)
  75.                 plr:GossipMenuAddItem(2, "Silvermoon", 0, 4)
  76.             else
  77.                 plr:GossipMenuAddItem(2, "Stormwind", 0, 5)
  78.                 plr:GossipMenuAddItem(2, "Ironforge", 0, 6)
  79.                 plr:GossipMenuAddItem(2, "Darnassus", 0, 7)
  80.                 plr:GossipMenuAddItem(2, "The Exodar", 0, 8)
  81.             end
  82.         elseif(intid == 1002) then
  83.             plr:GossipMenuAddItem(2, "Blade's Edge Mountains", 0, 9)
  84.             plr:GossipMenuAddItem(2, "Hellfire Peninsula", 0, 10)
  85.             plr:GossipMenuAddItem(2, "Nagrand", 0, 11)
  86.             plr:GossipMenuAddItem(2, "Netherstorm", 0, 12)
  87.             plr:GossipMenuAddItem(2, "Shadowmoon Valley", 0, 13)
  88.             plr:GossipMenuAddItem(2, "Terokkar Forest", 0, 14)
  89.             plr:GossipMenuAddItem(2, "Zangramarsh", 0, 15)
  90.             plr:GossipMenuAddItem(2, "Shattrath", 0, 16)
  91.         elseif(intid == 1003) then
  92.             plr:GossipMenuAddItem(2, "Borean Tundra", 0, 17)
  93.             plr:GossipMenuAddItem(2, "Crystalsong Forest", 0, 18)
  94.             plr:GossipMenuAddItem(2, "Dragonblight", 0, 19)
  95.             plr:GossipMenuAddItem(2, "Grizzly Hills", 0, 20)
  96.             plr:GossipMenuAddItem(2, "Howling Fjords", 0, 21)
  97.             plr:GossipMenuAddItem(2, "Icecrown Glaicer", 0, 22)
  98.             plr:GossipMenuAddItem(2, "Sholazar Basin", 0, 23)
  99.             plr:GossipMenuAddItem(2, "Storm Peaks", 0, 24)
  100.             plr:GossipMenuAddItem(2, "Wintergrasp", 0, 25)
  101.             plr:GossipMenuAddItem(2, "Zul'Drak", 0, 26)
  102.             plr:GossipMenuAddItem(2, "Dalaran", 0, 27)
  103.         elseif(intid == 1004) then
  104.             plr:GossipMenuAddItem(9, "Gurubashi Arena", 0, 28)
  105.             plr:GossipMenuAddItem(9, "Dire Maul Arena", 0, 29)
  106.             plr:GossipMenuAddItem(9, "Nagrand Arena", 0, 30)
  107.             plr:GossipMenuAddItem(9, "Blade's Edge Arena", 0, 31)
  108.         elseif(intid == 1005) then
  109.             plr:GossipComplete()
  110.             plr:Teleport(1, 4624.492188, -3838.300293, 943.627808, 4.214060)
  111.             return
  112.         elseif(intid == 1006) then
  113.             plr:GossipComplete()
  114.             plr:DurabilityRepairAll(false)
  115.             return
  116.         end
  117.         plr:GossipMenuAddItem(0, "Back", 0, 1000)
  118.         plr:GossipSendMenu(1, item)
  119.     end
  120. end
  121.  
  122. RegisterItemGossipEvent(ITEM_ID, 1, ItemTeleporter_Gossip)
  123. RegisterItemGossipEvent(ITEM_ID, 2, ItemTeleporter_Event)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement