Skip to content

merchant

This contains information related to the active merchant.

Members

This type inherits members from spawn if a merchant is active.

bool Full

Returns True if the merchant's inventory is full.

item Item[#]

Item number # on the merchant's list.

item Item[name]

Find an item by partial name on the merchant's list. Prefix with "=" for an exact match.

int Items

Number of items on the merchant.

bool ItemsReceived

True if the merchant's item list has been populated.

float Markup

The number used to calculate the buy and sell value for an item. (This is what is changed by charisma and faction). This value is capped at 1.05.

  • Amount you buy item for = Item Value * Markup
  • Amount you sell item for = Item Value * (1/Markup)

bool Open

Returns True if the merchant window is open.

item SelectedItem

The currently selected item in the merchant window. Items can be selected by using /selectitem or the SelectItem method

string (To String)

Same as Open

Methods

Name Action
Buy[#] Buys # of whatever is selected with Merchant.SelectItem[xxx]
CloseWindow Will close the merchant window
OpenWindow Will open the merchant closest to you, or if you have a merchant target
SelectItem[name] Select item by partial name match, case insensitive. Prefix name with = for EXACT match
Sell[count] Sell count of selected item. See examples

Examples

Using Sell:

/selectitem "Diamond"

Will select a "Diamond" you can also do "=Diamond" to match EXACT name. Then you can the following command to sell 100 of it:

/invoke ${Merchant.Sell[100]}