Skip to content

Latest commit

 

History

History
83 lines (56 loc) · 2.36 KB

File metadata and controls

83 lines (56 loc) · 2.36 KB
tags
datatype

merchant

This contains information related to the active merchant.

Members

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

{{ renderMember(type='bool', name='Full') }}

: Returns True if the merchant's inventory is full.

{{ renderMember(type='item', name='Item', params='#') }}

: Item number # on the merchant's list.

{{ renderMember(type='item', name='Item', params='name') }}

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

{{ renderMember(type='int', name='Items') }}

: Number of items on the merchant.

{{ renderMember(type='bool', name='ItemsReceived') }}

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

{{ renderMember(type='float', name='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)

{{ renderMember(type='bool', name='Open') }}

: Returns True if the merchant window is open.

{{ renderMember(type='item', name='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]}