Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:CreateAuction

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

Asks the server to put an item from one of the player's backpacks up for auction.

CreateAuction(slot, backpackType, price, restriction)

Arguments

slot
number – Slot of the item inside the backpack, starting at 1.
backpackType
number – Which backpack the item is in, as an EA_Window_Backpack.TYPE_* value: 2 (TYPE_INVENTORY), 3 (TYPE_CURRENCY) or 4 (TYPE_CRAFTING).
price
number – Buy-out price in brass.
restriction
number – Who may buy the item. The stock UI passes the index selected in its restriction combo box.

Returns

Nothing.

Details

  • backpackType must be 2, 3 or 4. Any other value (including 1, the quest backpack) raises the error below and nothing is sent.
  • The client converts slot and backpackType into an absolute inventory slot before sending. slot is truncated to its low byte (0–255) first.
  • The client does not check the price, the deposit or that the slot holds an item. The stock UI does its own checks (enough money for the deposit, a price of at least 1) before calling.
  • The function needs at least four arguments and only reads the last four.

Errors

  • Error in function call 'CreateAuction': Invalid backpack type.
  • The generic Invalid Parameters message when an argument is not a number.

Example

From default/ea_auctionhousewindow/source/auctionwindowsellcontrols.lua:

local restrictionChoice = ComboBoxGetSelectedMenuItem( SELL_CONTROLS_NAME.."RestrictionComboBox" )

CreateAuction( AuctionWindowSellControls.itemInventorySlot.slot, AuctionWindowSellControls.itemInventorySlot.backpack, buyOutPrice, restrictionChoice )

See also