From Arx Libertatis Wiki
Jump to navigation Jump to search

The setblacksmith script command is used to show the repair cost when hovering over the entity with an item selected for combining for an entity.

The repair price is also available as the ^repairprice_<entity> system variable. If the <entity> is not an item or has a maximum durability of 0 or is fully repaired then the repair price is -1, otherwise it is calculated as:

price · multiplier · (max_durability - durability) / max_durability

If the shop multiplier is 0 then it is ignored. If the repair price is not zero then it is clamped to always be at least 1 gold. For display, the repair price is rounded down to the next integer but the fractional price is available via the system variable.

This command only causes the repair price to be shown when hovering over this entity when hovering the cursor over this entity with an item selected for combining. It does not alter what happens if the player clicks to combine the item with this entity, meaning that the repair and gold deduction needs to be manually done in the combine event.

The calling entity does not need to be a shop for the repair price to be shown.


setblacksmith <enable>

Context: Any Entity


enable bool Should the repair cost be displayed when about to combine and item with this entity NPCs