<?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%3ALootRollOptOut</id>
	<title>API:LootRollOptOut - 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%3ALootRollOptOut"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:LootRollOptOut&amp;action=history"/>
	<updated>2026-10-18T06:58:45Z</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:LootRollOptOut&amp;diff=30596&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:LootRollOptOut&amp;diff=30596&amp;oldid=prev"/>
		<updated>2026-10-16T19:47:06Z</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=Loot}}&lt;br /&gt;
Tells the server which loot the player wants to opt out of for a public quest or other objective.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LootRollOptOut(objectiveId, optOutType)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;objectiveId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Id of the objective, as in the &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; field of the objective data used by the stock trackers.&lt;br /&gt;
;optOutType : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Opt-out choice. The stock UI uses &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; (no opt-out), &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (opt out of all objective loot) and &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; (opt out of gold bags only), defined as &amp;lt;code&amp;gt;TrackerUtils.OPT_OUT_OPTION_NONE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;_ALL&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_GOLD&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The client sends the objective id and the opt-out value to the server and does nothing else. It does not check that the objective exists. Only the low byte of &amp;lt;code&amp;gt;optOutType&amp;lt;/code&amp;gt; is sent.&lt;br /&gt;
* Nothing is sent if the connection is not ready.&lt;br /&gt;
* The stock UI updates its check boxes when the server answers with &amp;lt;code&amp;gt;SystemData.Events.PUBLIC_QUEST_OPTOUT&amp;lt;/code&amp;gt; (see &amp;lt;code&amp;gt;EA_Window_CityTracker.OnQuestOptOut&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;ea_objectivetrackers/source/citytrackerwindow.lua&amp;lt;/code&amp;gt;).&lt;br /&gt;
* The function needs at least two arguments and only reads the last two.&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 missing or not a number.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/ea_objectivetrackers/source/trackerutils.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function TrackerUtils.SetOptOutOption( windowName, index, optOutValue)&lt;br /&gt;
    local checkBoxName = windowName..&amp;quot;CheckBox&amp;quot;&lt;br /&gt;
    if(ButtonGetPressedFlag(checkBoxName) == false) then&lt;br /&gt;
        local objectiveId = DataUtils.activeObjectivesData[index].id&lt;br /&gt;
        LootRollOptOut(objectiveId, optOutValue) &lt;br /&gt;
    end&lt;br /&gt;
    EA_Window_ContextMenu.HideAll()    &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetActiveObjectivesData|GetActiveObjectivesData]]&lt;br /&gt;
* [[API:GetLootRollData|GetLootRollData]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>