Other players
Trading
The trading post, vendors and the guild bank.
trading_post
Prices are in copper. trading_post.query asks for an item's listings; the answer comes later, in the on_trading_post_query callback.
function on_trading_post_query(result)
local best = result.sells[1]
if best then print(result.item_id, best.price, best.quantity) end
end
trading_post.query(19721)trading_post.is_active()boolean
Whether the trading post is open.
trading_post.query(item_id)boolean
Asks for an item's buy and sell listings.
Places a buy order at
price each.Lists an
Item for sale at price each.Whether you're listing too fast.
trading_post.orders()table[]?
Your orders:
{order_id, item_id, price, quantity, created, buy_order}.Cancels an order.
What's waiting to be picked up:
{coins, items}.Picks it all up.
vendor
vendor.is_open()boolean
Whether a vendor window is open.
vendor.tab()table?
The open tab:
{idx, tab_type, name, count}.Opens a tab.
vendor.items()table[]?
What the vendor sells:
{idx, item, quantity, payment}, each payment {kind = "item", item, quantity} or {kind = "currency", currency, quantity}.vendor.buy(idx [, quantity])boolean
Buys an item.
vendor.sell(item)boolean
Sells an
Item.vendor.sell_junk()boolean
Sells all junk.
Closes the vendor.
Vendor tabs
TAB_BUYTAB_SELLTAB_BUYBACKguild_bank
guild_bank.bags()table[]?
The guild bank's bags:
{slot, gold, capacity, items}, each item {slot, quantity, item}.Deposits from one of your slots.
Withdraws into one of your slots.
Deposits coins.
Withdraws coins.