WoW API: SetLookingForGroup

From AddOn Studio
Revision as of 18:23, 3 September 2006 by WoWWiki>WoWWiki-Zelgadis (part of a API redesign proposal, please don't change the layout for the next few days)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < SetLookingForGroup

Flags yourself as LFG for up to three objectives

SetLookingForGroup(category1, objective1[, category2, objective2], [category3, objective3[, message]])

Takes

Number category1
Number objective1
Number category2 (optional)
Number objective2 (optional)
Number category3 (optional)
Number objective3 (optional)
String identifier (optional)
An additional message that both gets transferred to the server and is stored locally. Might be a little comment or message that is retrieved with GetLFGResults() by other players.

Returns

Nothing

Details

This function accepts up to three pairs of LFG values:
Each category must be the index of one of the values retrieved with GetLFGTypes()
Each objective must be the index of one of the values retrieved with GetLFGTypeEntries(category)
The first invalid value pair you specify will prevent all following value pairs from being parsed.
This function, much like any other LFG function, has highly inconsistent code. For instance it checks for argument 4 being a string after having processed all value-pairs. If this evaluates to true, it pushes argument 7 onto the return stack. This suggests that the function once had the prototype SetLookingForGroup(category, objective, unknown, message) and that this check hasn't been adjusted yet.

Example

This registers you only for the second objective in the category 'Zone':
SetLookingForGroup(4, 2, 0, 0, 0, 0, 'Free hat!')

User:Zelgadis/LFG notice