Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:LootItem

From RoR Wiki
Revision as of 19:47, 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 · Loot functions
Version: WAR 1.4.8

Asks the server to give the player one item from the open loot window.

LootItem(lootIndex)

Arguments

lootIndex
number – Position of the item in the current loot list, starting at 1.

Returns

Nothing.

Details

  • If lootIndex is outside the current loot list (less than 1 or greater than the number of entries), nothing happens.
  • Otherwise a loot request for that item is sent to the server for the object the player last interacted with (the corpse or container whose loot is open).
  • Nothing is sent if there is no such object or the connection is not ready.
  • The client does not warn about bind-on-pickup items. The stock loot window does that itself before calling LootItem.
  • Exactly one argument must be passed.

Errors

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

Example

From default/ea_lootwindow/source/lootwindow.lua:

if( EA_Window_Loot.WarnBindOnPickUp( lootIndex ) )
then
    return
end
LootItem( lootIndex )

See also