<?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%3AGetRewardPools</id>
	<title>API:GetRewardPools - 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%3AGetRewardPools"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:GetRewardPools&amp;action=history"/>
	<updated>2026-10-18T02:10:59Z</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:GetRewardPools&amp;diff=30457&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:GetRewardPools&amp;diff=30457&amp;oldid=prev"/>
		<updated>2026-10-16T19:44:52Z</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=PublicQuest}}&lt;br /&gt;
Returns the two reward pool values and the time until the next pool shift, as shown in the stock zone control bar tooltip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
winnerPool, loserPool, isNextShift, timeUntilShift = GetRewardPools()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
;winnerPool : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – First pool value. The stock UI labels it as the winner&amp;#039;s reward pool.&lt;br /&gt;
;loserPool : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Second pool value. The stock UI labels it as the loser&amp;#039;s reward pool.&lt;br /&gt;
;isNextShift : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if a shift time is set.&lt;br /&gt;
;timeUntilShift : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Seconds from now until the stored shift time.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* All four values come from one block of data the client stores (the same block that holds the public quest results). If that block does not exist, the function returns nothing.&lt;br /&gt;
* When no shift time is set, the client stores the largest single-precision float as the time. &amp;lt;code&amp;gt;isNextShift&amp;lt;/code&amp;gt; is then &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;timeUntilShift&amp;lt;/code&amp;gt; is that huge value minus the current time. Check &amp;lt;code&amp;gt;isNextShift&amp;lt;/code&amp;gt; before using &amp;lt;code&amp;gt;timeUntilShift&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;timeUntilShift&amp;lt;/code&amp;gt; is a fraction and is not clamped; it becomes negative once the shift time has passed.&lt;br /&gt;
* The pool values are whole numbers from 0 to 255.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/easystem_threepartbar/source/ea_threepartbar.lua&amp;lt;/code&amp;gt; (tooltip, shortened):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local winnerRewardPool, loserRewardPool, isNextShift, timeUntilShift = GetRewardPools()&lt;br /&gt;
Tooltips.SetTooltipText( currentRow, 2, GetStringFormatFromTable( &amp;quot;WorldControl&amp;quot;, StringTables.WorldControl.TEXT_CONTROL_CURRENT_POOLS_DETAILS, { towstring(winnerRewardPool), towstring(loserRewardPool) } ) )&lt;br /&gt;
&lt;br /&gt;
if ( isNextShift )&lt;br /&gt;
then&lt;br /&gt;
    Tooltips.SetTooltipText( currentRow, 2, TimeUtils.FormatSeconds( timeUntilShift ) )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:GetUnderdogRatings|GetUnderdogRatings]]&lt;br /&gt;
* [[API:GetCampaignZoneData|GetCampaignZoneData]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>