SetShopBuyCategories
The item categories a shop buys at its sell factor.
A list of the catalogue’s categories (GetItemInfo category: "MeleeWeapon", "Armor", "Food", "Herb" …).
The ones named are bought alone; a name with a leading minus is one the shop never buys ({"-Document"}: everything
but papers). nil or {} = every category. The classes of SetShopBuyPrice are bought regardless. The Sell tab and
the trade screen follow at once: the screen offers the vendor nothing else.
Syntax
Section titled “Syntax”SetShopBuyCategories(shop, categories)| Parameter | Type | |
|---|---|---|
shop |
number | the shop |
categories |
table | nil | a list of category names, - in front = never; nil = all |
Returns
Section titled “Returns”boolean - false for no such shop
Example
Section titled “Example”SetShopBuyCategories(smithy, {"MeleeWeapon", "MissileWeapon", "Armor"})SetShopBuyCategories(store, {"-Document", "-Key"}) -- anything but papers and keysSee also
Section titled “See also”GetShopBuyCategories · SetShopBuyPrice · GetItemInfo · the Shops and vendors group of the index
