Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SendCustomizeItemIcon

From RoR Wiki
Revision as of 19:48, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Item functions
Version: WAR 1.4.8

Asks the server to give an equipped item the appearance of another item, or to remove a custom appearance.

SendCustomizeItemIcon(equipSlot, sourceSlot, sourceLocation)

Arguments

equipSlot
number – Equipment slot of the item to change.
sourceSlot
number – Slot of the item whose appearance is copied, starting at 1. 0 removes the custom appearance.
sourceLocation
number – Location of that item, as a GameData.ItemLocs value. 0 when removing.

Returns

Nothing.

Details

  • GameData.ItemLocs.BANK is handled as a source. So are INVENTORY, QUEST_ITEM, CRAFTING_ITEM, CURRENCY_ITEM and EQUIPPED.
  • The request is sent when the source converts to a valid slot, or when sourceSlot is 0. With an unsupported source location and a non-zero sourceSlot, nothing is sent.
  • The client does not check that the two items fit the same equipment slot. The stock UI checks this (and asks for confirmation) before calling.
  • If there is no player object, nothing happens.
  • The function needs at least three arguments and only reads the last three.

Errors

None besides the generic Invalid Parameters message when an argument is not a number.

Example

From default/ea_characterwindow/source/characterwindowitemappearance.lua:

local function ApplyItemAppearance()
    -- Try to customize the item in the slot
    SendCustomizeItemIcon( slot, sourceSlot, source )
end

Removing the custom appearance, from the same file:

local function RemoveItemAppearance()
    -- Try to remove the item's customized icon
    SendCustomizeItemIcon( slot, 0, 0 )
end

See also