<?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%3ASendGuildAllianceCommand</id>
	<title>API:SendGuildAllianceCommand - 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%3ASendGuildAllianceCommand"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:SendGuildAllianceCommand&amp;action=history"/>
	<updated>2026-10-18T19:24:21Z</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:SendGuildAllianceCommand&amp;diff=30695&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:SendGuildAllianceCommand&amp;diff=30695&amp;oldid=prev"/>
		<updated>2026-10-16T19:48:38Z</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=Guild}}&lt;br /&gt;
Sends an alliance poll command to the server: start a vote to kick a guild from the alliance, cancel a vote, or cast a vote.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SendGuildAllianceCommand(command, guildId, pollId, vote)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;command : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – 1 to create a kick poll, 2 to cancel a poll, 3 to vote. The stock UI names these &amp;lt;code&amp;gt;GuildWindowTabAlliance.COMMAND_POLL_CREATE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;COMMAND_POLL_CANCEL&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;COMMAND_POLL_VOTE&amp;lt;/code&amp;gt;.&lt;br /&gt;
;guildId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Id of the guild the poll is about. Used by command 1 only.&lt;br /&gt;
;pollId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Poll id (8-bit), the key in [[API:GetGuildPollData|GetGuildPollData]]. Used by commands 2 and 3.&lt;br /&gt;
;vote : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – 1 for yes, 0 for no (8-bit). Used by command 3 only.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Any other &amp;lt;code&amp;gt;command&amp;lt;/code&amp;gt; value sends nothing.&lt;br /&gt;
* All four arguments must be numbers even when unused; the stock UI passes 0.&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 four arguments and only reads the last four.&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 is not a number.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_guildwindow/source/guildwindowtaballiance.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-- These are used to determine what the subtype of message is. These must match the switch statement in war_interface::LuaSendGuildAllianceCommand&lt;br /&gt;
GuildWindowTabAlliance.COMMAND_POLL_CREATE  = 1&lt;br /&gt;
GuildWindowTabAlliance.COMMAND_POLL_CANCEL  = 2&lt;br /&gt;
GuildWindowTabAlliance.COMMAND_POLL_VOTE    = 3&lt;br /&gt;
...&lt;br /&gt;
SendGuildAllianceCommand(GuildWindowTabAlliance.COMMAND_POLL_CREATE, guild.id, 0, 0)&lt;br /&gt;
...&lt;br /&gt;
SendGuildAllianceCommand(GuildWindowTabAlliance.COMMAND_POLL_VOTE, 0, pollId, 1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetGuildPollData|GetGuildPollData]]&lt;br /&gt;
* [[API:GetAllianceMemberData|GetAllianceMemberData]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>