Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Script made by Mönster of Ac-web
- Support from Crow
- Fixed by Rochet2
- Notes:
- You are mixing pUnit and pPlayer in places where you should use pPlayer
- You are doing the compairing statements wrong: if(intid = 1) then; You should use == instead of =
- Gossip does not need to be completed if a gossip menu is not created (on gossip hello)
- It is good practice not to write: if (pPlayer:IsInGroup() == true); But if (pPlayer:IsInGroup()) instead
- Identation would be good to be in order
- ]]
- function RaidGroup(pUnit, event, pPlayer)
- if (pPlayer:IsInGroup() and pPlayer:IsGroupFull()) then
- pUnit:GossipCreateMenu(100, pPlayer, 0)
- pUnit:GossipMenuAddItem(6, "Convert my group to Raid!", 1, 0)
- pUnit:GossipMenuAddItem(6, "Nevermind, Sorry.", 2, 0)
- pUnit:GossipSendMenu(pPlayer)
- end
- end
- function RaidGroup_OnGossipSelect(pUnit, event, pPlayer, id, intid, code)
- if (intid == 1) then
- pPlayer:ExpandToRaid() -- Force group to raid
- end
- pPlayer:GossipComplete()
- end
- RegisterUnitGossipEvent(90091, 1, RaidGroup)
- RegisterUnitGossipEvent(90091, 2, RaidGroup_OnGossipSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement