<?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%3ARequestItemSet</id>
	<title>API:RequestItemSet - 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%3ARequestItemSet"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:RequestItemSet&amp;action=history"/>
	<updated>2026-10-18T04:53:53Z</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:RequestItemSet&amp;diff=30670&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:RequestItemSet&amp;diff=30670&amp;oldid=prev"/>
		<updated>2026-10-16T19:48:14Z</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=Item}}&lt;br /&gt;
Publishes the client&amp;#039;s cached data for an item set to &amp;lt;code&amp;gt;GameData.UpdatedItemSet&amp;lt;/code&amp;gt; and raises &amp;lt;code&amp;gt;ITEM_SET_DATA_ARRIVED&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RequestItemSet(itemSetId)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;itemSetId : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – ID of the item set. Must not be 0.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing useful. See Details.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* If the client has data for this set, it is written to &amp;lt;code&amp;gt;GameData.UpdatedItemSet&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SystemData.Events.ITEM_SET_DATA_ARRIVED&amp;lt;/code&amp;gt; is raised. The fields written are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Key !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; || number || Item set ID.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; || wstring || Name of the set.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;castingLevel&amp;lt;/code&amp;gt; || number || The set&amp;#039;s casting level value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;itemNames[1]&amp;lt;/code&amp;gt; … &amp;lt;code&amp;gt;itemNames[21]&amp;lt;/code&amp;gt; || wstring || Names of the set&amp;#039;s pieces. Unused entries are empty.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;bonuses[1]&amp;lt;/code&amp;gt; … &amp;lt;code&amp;gt;bonuses[10]&amp;lt;/code&amp;gt; || table || One table per bonus rank, with the fields below.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;bonuses[n].piecesRequired&amp;lt;/code&amp;gt; || number || Number of pieces needed for this bonus. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for an unused rank.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;bonuses[n].rankType&amp;lt;/code&amp;gt; || number || Bonus rank type.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;bonuses[n].statType&amp;lt;/code&amp;gt; || number || Stat the bonus applies to.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;bonuses[n].statValue&amp;lt;/code&amp;gt; || number || Size of the bonus.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;bonuses[n].isPercentage&amp;lt;/code&amp;gt; || boolean || &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;statValue&amp;lt;/code&amp;gt; is a percentage.&lt;br /&gt;
|}&lt;br /&gt;
* If the client has no data for the set, nothing happens. The function does not send a request to the server.&lt;br /&gt;
* Nothing happens if the player object does not exist yet.&lt;br /&gt;
* When the player object exists, the function reports one return value without pushing one, so Lua receives the value on top of the stack, which is the last argument passed. Do not rely on this.&lt;br /&gt;
* Exactly one argument must be passed.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;RequestItemSet&amp;#039;: ItemSetId must be valid.&amp;lt;/code&amp;gt; (argument missing or not a number, in addition to the generic &amp;#039;&amp;#039;Invalid Parameters&amp;#039;&amp;#039; message)&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;RequestItemSet&amp;#039;: IteSetId cannot be 0.&amp;lt;/code&amp;gt; (sic)&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;default/easystem_utils/source/datautils.lua&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;DataUtils.UpdateItemSets&amp;lt;/code&amp;gt; handles &amp;lt;code&amp;gt;ITEM_SET_DATA_ARRIVED&amp;lt;/code&amp;gt; and copies &amp;lt;code&amp;gt;GameData.UpdatedItemSet&amp;lt;/code&amp;gt; into its own table:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function DataUtils.GetItemSetData (itemSetId)&lt;br /&gt;
    if (itemSetId ~= nil) then&lt;br /&gt;
        if (ItemSetData[itemSetId] ~= nil) then&lt;br /&gt;
            return ItemSetData[itemSetId];&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        -- Otherwise, we need to request this from the client...&lt;br /&gt;
        RequestItemSet (itemSetId);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return nil;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:RequestMoveItem|RequestMoveItem]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>