SHOW:
|
|
- or go back to the newest paste.
1 | - | --Script made by Mönster of Ac-web |
1 | + | --[[ |
2 | - | --Support from Crow |
2 | + | Script made by Mönster of Ac-web |
3 | Support from Crow | |
4 | ||
5 | - | if (pUnit:IsInGroup() == true) and (pUnit:IsGroupFull() == true) then --Will this stuff work? :P |
5 | + | Fixed by Rochet2 |
6 | - | pUnit:GossipCreateMenu(100, pPlayer, 0) |
6 | + | |
7 | - | pUnit:GossipMenuAddItem(6, "Convert my group to Raid!", 1, 0) |
7 | + | Notes: |
8 | - | pUnit:GossipMenuAddItem(6, "Nevermind, Sorry.", 2, 0) |
8 | + | You are mixing pUnit and pPlayer in places where you should use pPlayer |
9 | - | pUnit:GossipSendMenu(pPlayer) |
9 | + | You are doing the compairing statements wrong: if(intid = 1) then; You should use == instead of = |
10 | - | else |
10 | + | Gossip does not need to be completed if a gossip menu is not created (on gossip hello) |
11 | - | pPlayer:GossipComplete() |
11 | + | It is good practice not to write: if (pPlayer:IsInGroup() == true); But if (pPlayer:IsInGroup()) instead |
12 | - | end |
12 | + | |
13 | - | end |
13 | + | Identation would be good to be in order |
14 | - | |
14 | + | ]] |
15 | ||
16 | - | if (intid = 1) then |
16 | + | |
17 | - | pUnit:ExpandToRaid() --Forcably converts to raid. |
17 | + | if (pPlayer:IsInGroup() and pPlayer:IsGroupFull()) then |
18 | - | pPlayer:GossipComplete() |
18 | + | pUnit:GossipCreateMenu(100, pPlayer, 0) |
19 | - | end |
19 | + | pUnit:GossipMenuAddItem(6, "Convert my group to Raid!", 1, 0) |
20 | - | if (intid = 2) then |
20 | + | pUnit:GossipMenuAddItem(6, "Nevermind, Sorry.", 2, 0) |
21 | - | pPlayer:GossipComplete() |
21 | + | pUnit:GossipSendMenu(pPlayer) |
22 | - | end |
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) |