Skip to content

GetShopBuyPrice

What a shop pays for one piece of an item now.

The price the rules give: the class’s own (SetShopBuyPrice), else sellFactor of the catalogue price when the item’s category is one the shop buys (SetShopBuyCategories) - but never more than the shop’s own price when it sells the item too, so buying from a vendor and selling back to it never makes money.

GetShopBuyPrice(shop, item)
Parameter Type
shop number the shop
item string | number the item’s key

number - Groschen a piece; 0 = the shop does not buy it

SendClientMessage(pid, COLOR_SERVER, "The smith pays " .. GetShopBuyPrice(smithy, "shortswordBroad") .. " for a broad sword.")

SetShopBuyPrice · SetShopBuyCategories · the Shops and vendors group of the index