API:GuildRecruitmentSearch
From RoR Wiki
UI Lua API · Guild functions
Version: WAR 1.4.8
Asks the server for a list of guilds that match recruitment search criteria.
GuildRecruitmentSearch(playStyle, atmosphere, searchType, isRecruitingPlayer, minTotalPlayers, minOnlinePlayers, minGuildRank)
Arguments
- playStyle
number– AGameData.Recruitment.PlayStyleFlagvalue.- atmosphere
number– AGameData.Recruitment.AtmosphereFlagvalue.- searchType
number– AGameData.Recruitment.RecruitingFlagvalue.- isRecruitingPlayer
boolean– State of the stock UI's "is recruiting player" check box.- minTotalPlayers
number– Minimum number of members (0 = any). Sent as a 16-bit value.- minOnlinePlayers
number– Minimum number of members online (0 = any). Sent as a 16-bit value.- minGuildRank
number– Minimum guild rank. Sent as an 8-bit value.
Returns
Nothing.
Details
playStyle,atmosphereandsearchTypeare sent minus 1.- The results are not returned by this function. The stock UI receives them in its handler for
SystemData.Events.GUILD_RECRUITMENT_SEARCH_RESULTS_UPDATED, which takes a results table, and keeps its Search button disabled until they arrive. isRecruitingPlayermust be a real boolean.- The function needs at least seven arguments and only reads the last seven.
Errors
None besides the generic Invalid Parameters message when an argument has the wrong type.
Example
From default/ea_guildwindow/source/guildwindowtabrecruitsearch.lua:
GuildRecruitmentSearch( playStyle,
atmosphere,
searchType,
isRecruitingPlayer,
minTotalPlayers,
minOnlinePlayers,
minGuildRank )
-- Disable the Search Button
GuildWindowTabRecruit.Search.waitingForSearchResults = true
ButtonSetDisabledFlag( "GWRecruitSearchSearchButton", true )
