WoW:API SetLookingForGroup: Difference between revisions

m
Move page script moved page API SetLookingForGroup to WoW:API SetLookingForGroup without leaving a redirect
(part of a API redesign proposal, please don't change the layout for the next few days)
 
m (Move page script moved page API SetLookingForGroup to WoW:API SetLookingForGroup without leaving a redirect)
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{wowapi}}__NOTOC__
{{wowapi}}__NOTOC__ {{removedapi|3.3}}
Flags yourself as LFG for up to three objectives
Flags the player as looking for group for a specific destination.
  SetLookingForGroup(category1, objective1[, category2, objective2], [category3, objective3[, message]])
  SetLookingForGroup(slot, missiontype, destination)


===Takes===
==Arguments==
: Number category1
; slot: Number - Slot index (1 to 3); there are three LFG slots, so you can look for groups for three different destinations.
: Number objective1
; missiontype: Number - Type index, corresponding to an entry in the {{api|GetLFGTypes}}() return list; the current types are "None", "Dungeon", "Raid", "Quest (Group)", "Zone", "Heroic Dungeon"
: Number category2 (optional)
; destination: Number - Destination index within the mission type -- this would be the specific zone or instance index acquired from {{api|GetLFGTypeEntries}}(missiontype).
: Number objective2 (optional)
: Number category3 (optional)
: Number objective3 (optional)


: String identifier (optional)
==Example==
::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 [[API_GetLFGResults|GetLFGResults()]] by other players.
local slot, mtype, destination = 1,3,2;
SetLookingForGroup(slot, mtype, destination);
print("Now looking for ", (select(destination, GetLFGTypeEntries(mtype))), " group");


===Returns===
==See Also==
: Nothing
ClearLookingForGroup
 
* [[API ClearLookingForGroup|ClearLookingForGroup()]]
===Details===
* [[API GetLookingForGroup|GetLookingForGroup()]]
: This function accepts up to three pairs of LFG values:
* [[API SetLFGComment|SetLFGComment()]]
:: Each category must be the index of one of the values retrieved with [[API_GetLFGTypes|GetLFGTypes()]]
:: Each objective must be the index of one of the values retrieved with [[API_GetLFGTypeEntries|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===
<dl><dd>
:This registers you only for the second objective in the category 'Zone':
SetLookingForGroup(4, 2, 0, 0, 0, 0, 'Free hat!')
</dd></dl>
 
{{User:Zelgadis/LFG_notice}}
Anonymous user