Skip to content

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.

SetShopBuyCategories(shop, categories)
Parameter Type
shop number the shop
categories table | nil a list of category names, - in front = never; nil = all

boolean - false for no such shop

SetShopBuyCategories(smithy, {"MeleeWeapon", "MissileWeapon", "Armor"})
SetShopBuyCategories(store, {"-Document", "-Key"}) -- anything but papers and keys

GetShopBuyCategories · SetShopBuyPrice · GetItemInfo · the Shops and vendors group of the index