Skip to content

vendor

Opens the shop window of a vendor, as a vendor does.

Source: src/Moongate.Server.Ultima/Modules/VendorModule.cs

vendor.buys(vendor) -> boolean

Whether the NPC has a shop that buys something from a player. False for an NPC with no shop, for a player and for a serial that is no mobile.

ParameterTypeDefault
vendorinteger

Returns boolean.

vendor.open_buy(vendor, player) -> boolean

Opens the vendor's shop window for the player. False when the vendor has no shop or nothing in stock, is more than 10 tiles away or out of sight, when the player is dead or not in the world, or a murderer in a guarded place.

ParameterTypeDefault
vendorinteger
playerinteger

Returns boolean.

vendor.open_buy_once(vendor, player) -> boolean

Opens the vendor's shop window for words the player said, unless a vendor opened one for the player within half a second: several vendors side by side hear the same words in the same moment, and a vendor that cannot serve does not stop the others. False when nothing was opened.

ParameterTypeDefault
vendorinteger
playerinteger

Returns boolean.

vendor.open_sell(vendor, player) -> boolean

Offers the player the list of what the player carries that the vendor buys. False when the vendor has no shop that buys, is more than 10 tiles away or out of sight, the player has nothing to sell (the vendor says so), is dead or not in the world, or a murderer in a guarded place.

ParameterTypeDefault
vendorinteger
playerinteger

Returns boolean.

vendor.open_sell_once(vendor, player) -> boolean

Offers the player the sell list for words the player said, unless a vendor opened a window for the player within half a second. False when nothing was opened.

ParameterTypeDefault
vendorinteger
playerinteger

Returns boolean.

vendor.sells(vendor) -> boolean

Whether the NPC has a shop with something to sell to a player. False for an NPC with no shop, for a player and for a serial that is no mobile.

ParameterTypeDefault
vendorinteger

Returns boolean.

Made with ❤️ by Tom

Buy me a coffee