vendor
Opens the shop window of a vendor, as a vendor does.
Source: src/Moongate.Server.Ultima/Modules/VendorModule.cs
Functions
Section titled “Functions”vendor.buys(vendor) -> booleanWhether 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.
| Parameter | Type | Default |
|---|---|---|
vendor | integer |
Returns boolean.
open_buy
Section titled “open_buy”vendor.open_buy(vendor, player) -> booleanOpens 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.
| Parameter | Type | Default |
|---|---|---|
vendor | integer | |
player | integer |
Returns boolean.
open_buy_once
Section titled “open_buy_once”vendor.open_buy_once(vendor, player) -> booleanOpens 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.
| Parameter | Type | Default |
|---|---|---|
vendor | integer | |
player | integer |
Returns boolean.
open_sell
Section titled “open_sell”vendor.open_sell(vendor, player) -> booleanOffers 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.
| Parameter | Type | Default |
|---|---|---|
vendor | integer | |
player | integer |
Returns boolean.
open_sell_once
Section titled “open_sell_once”vendor.open_sell_once(vendor, player) -> booleanOffers 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.
| Parameter | Type | Default |
|---|---|---|
vendor | integer | |
player | integer |
Returns boolean.
vendor.sells(vendor) -> booleanWhether 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.
| Parameter | Type | Default |
|---|---|---|
vendor | integer |
Returns boolean.
Made with ❤️ by Tom
