View Full Version : Super simple macro question: quit party
What is the macro command to quit your party? And if there is one, what is the macro command to kick a party member?
Heenan
11-19-2008, 07:45 PM
From the wiki: http://www.wowwiki.com/World_of_Warcraft_API#Group_Functions
Group Functions
See also: Raid Functions
AcceptGroup() - Accept the invitation to party.
CheckReadyCheckTime() - Unknown, called from UIParent's OnUpdate!
ConfirmReadyCheck(isReady) - Indicate if you are ready or not.
ConvertToRaid() - Converts party to raid.
DeclineGroup() - Decline the invitation to a party.
DoReadyCheck() - Initiate a ready check.
GetLookingForGroup()
GetLootMethod() - Return the currently active lootMethod
GetLootThreshold() - Return the current loot threshold (for group/master loot)
GetMasterLootCandidate(index) - Return the name of a player who is eligible to receive loot in master mode
GetNumPartyMembers() - Returns the number of party members
GetPartyLeaderIndex() - Returns the index of the party leader (1-4) if not yourself.
GetPartyMember(index) - Returns 1 if the party member at the given index exists, nil otherwise..
InviteUnit("name" or "unit") - Invites the specified player to the group you are currently in (new for WoW 2.0)
IsPartyLeader() - Returns true if the player is the party leader.
LeaveParty() - Quit the party
PromoteByName("name") - Promotes by name the target.
PromoteToLeader("unit") - Promote a unit to party leader.
SetLootMethod("lootMethod"[, "masterPlayer" or threshold]) - Set the current loot method
SetLootThreshold(itemQuality) - Set the threshold for group/master loot
UninviteUnit("unit" or "name") - Kick a unit from the party if player is group leader.
UnitInParty("unit") - Returns true if the unit is a member of your party.
UnitIsPartyLeader("unit") - Returns true if the unit is the leader of its party.
Tasty
11-19-2008, 08:25 PM
/script UninviteUnit("alt1")
/script UninviteUnit("alt 2")
etc
/script LeaveParty()
Golle
11-20-2008, 09:50 AM
GetPartyLeaderIndex() - Returns the index of the party leader (1-4) if not yourself.
Would that work in a raid aswell? I am thinking about creating a macro which autowhispers the raidleader, asking him to give me leader (good for ex. AB, so I can put me chars in the same group).
The reason im asking is because I cannot test it atm.
Bettysue
11-20-2008, 10:12 AM
GetPartyLeaderIndex() will return 0 if the leader is not in your party, so unfortunately that will not work. IsRaidLeader() only checks yourself as the leader, what you need to use is
GetRaidRosterInfo(index)
the second agrument (rank) will return 2 if they are the leader. The index is a number 1-40.
Here's how to find the leaders name and whisper them using the default language for your faction.
/run for i=1,40 do local n,r,_,_,_,_,_,_,_,_,_ = GetRaidRosterInfo(i);if (r==2)then SendChatMessage("Please Promote Me", "WHISPER", nil, n);
Golle
11-20-2008, 12:27 PM
Haha awsome, I still cannot try it out atm, but it's looking pretty good. Thank you for your help :love:
Edit: I'm trying to udnerstand you code, and this has made me confused:" _,_,_,_,_,_,_,_,_". What is the porpuse of variables named _ when they are not even being used? And why so many?
Bettysue
11-20-2008, 07:24 PM
GetRaidRosterInfo() has several parameters name, rank, subgroup, level, class, fileName, zone, online, isDead, role, and isML. The LUA function automatically defines all of these parameters, so it is best to store them somewhere so they don't mess up later code, I store them all as "_" which is never a character I store needed variables in. If I were to need class and nothing else from all of the members of the raid I might use _,_,_,_,c,_,_,_,_,_. This scenario might help you understand the underscores better if I were to not use them I would define a variable for all the arguments prior to the one i really need, thereby, using up local variable names and a bit of memory while my script is being run. If I simply used blanks I have a possibility of one being nil and throwing off the place of the rest of the arguments.
In the macro I showed since the first 2 arguments are the only ones of interest you could omit the trailing underscores for the sake of saving characters.
Hope it helps
For an uninvite macro not dependent on names (nice when you have multiple teams) try something like
/run for i=1,4 do UninviteUnit("Party"..i);
this will unvite everyone and you yourself do not have to leave because you can't have a party of 1.
Golle
11-22-2008, 05:34 PM
Aha, that explains all the "_,_,_" thanks.
vBulletin® v4.2.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.