<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ASendPlayerSearchRequest</id>
	<title>API:SendPlayerSearchRequest - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ASendPlayerSearchRequest"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:SendPlayerSearchRequest&amp;action=history"/>
	<updated>2026-10-17T16:47:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:SendPlayerSearchRequest&amp;diff=30705&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:SendPlayerSearchRequest&amp;diff=30705&amp;oldid=prev"/>
		<updated>2026-10-16T19:48:47Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Social}}&lt;br /&gt;
Asks the server for a list of players matching search criteria.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SendPlayerSearchRequest(name, guildName, careerName, zoneIds, minRank, maxRank, advisorsOnly)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;name : &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; – Player name to search for; &amp;lt;code&amp;gt;L&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; for any.&lt;br /&gt;
;guildName : &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; – Guild name to search for; &amp;lt;code&amp;gt;L&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; for any.&lt;br /&gt;
;careerName : &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; – Career name; &amp;lt;code&amp;gt;L&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; for any.&lt;br /&gt;
;zoneIds : &amp;lt;code&amp;gt;number-table&amp;lt;/code&amp;gt; – List of zone ids to search. The stock UI passes &amp;lt;code&amp;gt;{ -1 }&amp;lt;/code&amp;gt; to search all zones.&lt;br /&gt;
;minRank : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Lowest rank. Sent as an 8-bit value.&lt;br /&gt;
;maxRank : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Highest rank. Sent as an 8-bit value.&lt;br /&gt;
;advisorsOnly : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – State of the stock UI&amp;#039;s &amp;quot;include advisors only&amp;quot; check box.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The client turns &amp;lt;code&amp;gt;careerName&amp;lt;/code&amp;gt; into a career line id by matching it against the male and female career line names. An empty or unmatched name is sent as 0.&lt;br /&gt;
* If &amp;lt;code&amp;gt;minRank&amp;lt;/code&amp;gt; is greater than &amp;lt;code&amp;gt;maxRank&amp;lt;/code&amp;gt;, the two are swapped.&lt;br /&gt;
* The results are read with [[API:GetSearchList|GetSearchList]].&lt;br /&gt;
* If there is no player object, or the Lua state is not available, nothing is sent.&lt;br /&gt;
* The function needs at least seven arguments and only reads the last seven. &amp;lt;code&amp;gt;advisorsOnly&amp;lt;/code&amp;gt; must be a real boolean.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None besides the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message when an argument has the wrong type.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_socialwindow/source/socialwindowtabsearch.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local includeAdvisorsOnly = ButtonGetPressedFlag( &amp;quot;SocialWindowTabSearchIncludeAdvisorsOnlyButton&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
SendPlayerSearchRequest(SocialWindowTabSearchEditBoxPlayerName.Text,&lt;br /&gt;
                        SocialWindowTabSearchEditBoxGuildName.Text,&lt;br /&gt;
                        SocialWindowTabSearchEditBoxCareerName.Text,&lt;br /&gt;
                        SocialWindowTabSearch.ZoneID,&lt;br /&gt;
                        minRank, maxRank,&lt;br /&gt;
                        includeAdvisorsOnly)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The stock UI clamps the ranks to 1–40 first; a comment there notes that the server only ignores -1 values.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetSearchList|GetSearchList]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>