Michaelcain6

Raid Conversion

Apr 23rd, 2012
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1. --Script made by Mönster of Ac-web
  2. --Support from Crow
  3.  
  4. function RaidGroup(pUnit, event, pPlayer)
  5. if (pUnit:IsInGroup() == true) and (pUnit:IsGroupFull() == true) then                                                           --Will this stuff work? :P
  6.                         pUnit:GossipCreateMenu(100, pPlayer, 0)
  7.                         pUnit:GossipMenuAddItem(6, "Convert my group to Raid!", 1, 0)
  8.                         pUnit:GossipMenuAddItem(6, "Nevermind, Sorry.", 2, 0)
  9.                         pUnit:GossipSendMenu(pPlayer)
  10.                         else
  11.                         pPlayer:GossipComplete()
  12.                         end
  13.                         end
  14.                        
  15. function RaidGroup_OnGossipSelect(pUnit, event, pPlayer, id, intid, code)
  16.         if (intid = 1) then
  17.          pUnit:ExpandToRaid()   --Forcably converts to raid.
  18.          pPlayer:GossipComplete()
  19.          end
  20.         if (intid = 2) then
  21.         pPlayer:GossipComplete()
  22.          end
  23. end
  24.  
  25.  
  26.  
  27. RegisterUnitGossipEvent(90091, 1, RaidGroup)
  28. RegisterUnitGossipEvent(90091, 2, RaidGroup_OnGossipSelect)
Advertisement
Add Comment
Please, Sign In to add comment