Advertisement
Xsniper1000

Battlemaster

Apr 16th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.18 KB | None | 0 0
  1. --Lua battlemaster script!
  2. --Created by Carlsberg
  3. --Updated to make it run smoother..
  4.  
  5. local NPC_ID = 1000 -- Your NPC ID...
  6.  
  7. function BG_OnGossipTalk(pUnit, Event, player)
  8.     pUnit:GossipCreateMenu(1, player, 0)
  9.     pUnit:GossipMenuAddItem(1, "Warsong Gulch", 1, 0)
  10.     pUnit:GossipMenuAddItem(1, "Arathi Basin", 2, 0)
  11.     pUnit:GossipMenuAddItem(1, "Eye of the Storm", 3, 0)
  12.     pUnit:GossipMenuAddItem(1, "Strand of the Acients", 4, 0)
  13.     pUnit:GossipMenuAddItem(1, "Alterac Valley", 5, 0)
  14.     pUnit:GossipMenuAddItem(1, "Never mind", 6, 0)
  15.     pUnit:GossipSendMenu(player)
  16. end
  17.  
  18. function BG_OnGossipSelect(pUnit, Event, player, id, intid, code, pMisc)
  19.    if(intid == 1) then
  20.        player:SendBattlegroundWindow(2)
  21.  
  22.    elseif(intid == 2) then
  23.        player:SendBattlegroundWindow(3)
  24.  
  25.    elseif(intid == 3) then
  26.        player:SendBattlegroundWindow(7)
  27.  
  28.    elseif(intid == 4) then
  29.        player:SendBattlegroundWindow(9)
  30.  
  31.    elseif(intid == 5) then
  32.        player:SendBattlegroundWindow(1)
  33.  
  34.    elseif(intid == 6) then
  35. end
  36.        player:GossipComplete()
  37. end
  38.  
  39. RegisterUnitGossipEvent(NPC_ID, 1, "BG_OnGossipTalk")
  40. RegisterUnitGossipEvent(NPC_ID, 2, "BG_OnGossipSelect")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement