API:SendOpenPartyWorldSearch
From RoR Wiki
UI Lua API · Social functions
Version: WAR 1.4.8
Asks the server for a world-wide list of open parties and warbands that match a tier and interests.
SendOpenPartyWorldSearch(tier, interest, specificInterest1, specificInterest2, specificInterest3, specificInterest4)
Arguments
- tier
number– Tier, 1–4.- interest
number– AGameData.OpenPartyInterestvalue.- specificInterest1 … specificInterest4
number– Specific interests: zone, scenario or dungeon ids, depending oninterest.
Returns
Nothing.
Details
- Nothing is sent when
tieris outside 1–4, or when the connection is not ready. tierandinterestare sent as 8-bit values, the four specific interests as 32-bit values.- This function sends the same message as SetOpenPartyWorldInterests, with a different command value: here it asks for a search.
- The results are read with GetOpenPartyWorldList. The stock UI refreshes its list when
SystemData.Events.SOCIAL_OPENPARTY_WORLD_UPDATEDfires, and limits searches with its own refresh timer. - The function needs at least six arguments and only reads the last six.
Errors
None besides the generic Invalid Parameters message when an argument is not a number.
Example
From default/ea_openpartywindow/source/openpartywindowtabworld.lua:
function EA_Window_OpenPartyWorld.Search()
if (EA_Window_OpenPartyWorld.RequestDelay == 0)
then
local tier, interest, specificInterest1, specificInterest2, specificInterest3, specificInterest4 = GetCurrentSelections()
SendOpenPartyWorldSearch( tier, interest, specificInterest1, specificInterest2, specificInterest3, specificInterest4 )
EA_Window_OpenPartyWorld.RequestDelay = EA_Window_OpenPartyWorld.REFRESH_DELAY_TIMER
end
end
