Defines the client-side cw.salesmenu library, which holds the data of the salesman whose trade menu is open.

The data arrives in the Salesmenu Cable message; the getters expose the salesman entity, its sells and buys lists, stock, cash, prices and trade restrictions to the cwSalesmenu panel.

Summary

Methods

Returns whether the open salesman sells items in whole shipments (the item's batch size).
Returns the percentage of an item's cost the open salesman pays when buying it.
GetBuys()client
Returns the items the open salesman buys.
GetCash()client
Returns the cash the open salesman has to buy items with.
Returns the classes allowed to trade with the open salesman.
Returns the salesman entity the trade menu was opened for.
Returns the factions allowed to trade with the open salesman.
Returns the flags required to trade with the open salesman.
GetName()client
Returns the name of the open salesman.
Returns the salesman trade menu panel.
Returns the multiplier the open salesman applies to item costs when selling.
Returns the items the open salesman sells.
Returns the remaining stock of the open salesman.
GetText()client
Returns the responses of the open salesman.
Returns whether the salesman trade menu exists and is visible.

Methods

Returns whether the open salesman sells items in whole shipments (the item's batch size).

Returns

  • Boolean Whether items are sold in shipments

Returns the percentage of an item's cost the open salesman pays when buying it.

Returns

  • Number The buy rate, from 1 to 100

Returns the items the open salesman buys.

Returns

  • Map Item unique IDs mapped to a price override, or true to use the item's cost

Returns the cash the open salesman has to buy items with.

Returns

  • Number The salesman's cash, -1 for unlimited

Returns the classes allowed to trade with the open salesman.

Returns

  • Map Class names mapped to true; empty for no restriction

Returns the salesman entity the trade menu was opened for.

Returns

Returns the factions allowed to trade with the open salesman.

Returns

  • Map Faction names mapped to true; empty for no restriction

Returns the flags required to trade with the open salesman.

Returns

  • String The flags

Returns the name of the open salesman.

Returns

  • String The salesman's name

Returns the salesman trade menu panel.

Returns

  • Panel The cwSalesmenu panel, or nil if it was never created

Returns the multiplier the open salesman applies to item costs when selling.

Returns

  • Number The price scale, 1 when unset

Returns the items the open salesman sells.

Returns

  • Map Item unique IDs mapped to a price override, or true to use the item's cost

Returns the remaining stock of the open salesman.

Returns

  • Map Item unique IDs mapped to the amount left; items without an entry are unlimited

Returns the responses of the open salesman.

Returns

  • Map Response names such as start or noStock mapped to Maps with text, sound and bHideName

Returns whether the salesman trade menu exists and is visible.

Returns

  • Boolean true when the menu is open, otherwise nil

Defined in