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.
Syntax
Section titled “Syntax”GetShopBuyPrice(shop, item)| Parameter | Type | |
|---|---|---|
shop |
number | the shop |
item |
string | number | the item’s key |
Returns
Section titled “Returns”number - Groschen a piece; 0 = the shop does not buy it
Example
Section titled “Example”SendClientMessage(pid, COLOR_SERVER, "The smith pays " .. GetShopBuyPrice(smithy, "shortswordBroad") .. " for a broad sword.")See also
Section titled “See also”SetShopBuyPrice · SetShopBuyCategories · the Shops and vendors group of the index
