Violet

Auction House

On this page

Use core.auction to enter or leave the Auction House and manage the current sale listing.

Live actions

A true result means the action was submitted from a valid interface state. Confirm the result after the Auction House updates.

on_tick(stage) continues running while the Auction House is open. Use core.stage.AUCTION_HOUSE to run Auction House-specific logic without also running it in other stages.

Functions

core.auction.is_open() -> boolean

Returns whether the Auction House is currently open.


core.auction.enter() -> boolean

Requests entry into the Auction House. Returns false when entry is unavailable or it is already open.


core.auction.leave() -> boolean

Requests departure from the Auction House. Returns false when it is not open.


core.auction.submit_current_listing() -> boolean

Presses Submit on the listing the player has already prepared in the Auction House sell view, so that view must be open with a listing filled in. Takes no parameters — price, quantity and item all come from what is on screen. Returns false when the sell view is not open, no listing is ready, or another action is in progress.


core.auction.cancel_selected_listing() -> boolean

Presses Cancel on the listing currently selected in the Auction House, so that view must be open with a listing selected. Takes no parameters — the target is whatever the player has selected on screen. Returns false when there is no valid selection or another action is in progress.

lua
function on_tick(stage)
    if stage ~= core.stage.AUCTION_HOUSE then return end

    if core.auction.is_open() then
        core.auction.cancel_selected_listing()
    end
end