Skip to content

SetItemClassPrice

Sets what every item of a kind is worth, for every player.

price is in Groschen per piece at the best quality and condition, 0 to 1,000,000, in place of the game’s own (GetItemInfo price, which is in tenths). It holds for every player and every item of the class: the game’s item panel and its own traders work from it - an item of a lower quality or a worn one is worth less, by the game’s own scaling, as with the game’s own price - and the server’s shops pay their sell factor of it (CreateShop; a shop’s own price for the class, SetShopBuyPrice, still comes first). A tagged item with a price of its own (SetPlayerItemPrice) keeps it. nil gives the class its own back. At most 1024 classes have a rule.

SetItemClassPrice(item, price)
Parameter Type
item string | number the item class - its name, id, English name or GUID
price number | nil Groschen per piece; nil = the class’s own

boolean - false for an unknown item, a price outside 0..1,000,000, or a 1025th class

SetItemClassPrice("bsmt_ironGood", 12) -- iron is dear this season

GetItemClassPrice · SetItemClassWeight · SetPlayerItemPrice · CreateShop · the Items and inventory group of the index