Advertisement
Rochet2

Group to Raid

Apr 24th, 2012
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2. Script made by Mönster of Ac-web
  3. Support from Crow
  4.  
  5. Fixed by Rochet2
  6.  
  7. Notes:
  8. You are mixing pUnit and pPlayer in places where you should use pPlayer
  9. You are doing the compairing statements wrong: if(intid = 1) then; You should use == instead of =
  10. Gossip does not need to be completed if a gossip menu is not created (on gossip hello)
  11. It is good practice not to write: if (pPlayer:IsInGroup() == true); But if (pPlayer:IsInGroup()) instead
  12.  
  13. Identation would be good to be in order
  14. ]]
  15.  
  16. function RaidGroup(pUnit, event, pPlayer)
  17.     if (pPlayer:IsInGroup() and pPlayer:IsGroupFull()) then
  18.         pUnit:GossipCreateMenu(100, pPlayer, 0)
  19.         pUnit:GossipMenuAddItem(6, "Convert my group to Raid!", 1, 0)
  20.         pUnit:GossipMenuAddItem(6, "Nevermind, Sorry.", 2, 0)
  21.         pUnit:GossipSendMenu(pPlayer)
  22.     end
  23. end
  24.  
  25. function RaidGroup_OnGossipSelect(pUnit, event, pPlayer, id, intid, code)
  26.     if (intid == 1) then
  27.         pPlayer:ExpandToRaid() -- Force group to raid
  28.     end
  29.     pPlayer:GossipComplete()
  30. end
  31.  
  32. RegisterUnitGossipEvent(90091, 1, RaidGroup)
  33. RegisterUnitGossipEvent(90091, 2, RaidGroup_OnGossipSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement