Script:shopmultiply: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
(Created page with "{{ScriptCommandPage |description=set the price multiplier for items bought from or sold to a shop inventory |context=any |parameters= multiplier number* Price multiplier for this shop |intro=<br> For the shop multiplier to have an effect the entity must be set to be a shop using {{Command|setshop}}. To buy an item from this shop the player must pay: floor(floor(price · multiplier · ...")
 
mNo edit summary
Line 13: Line 13:
When selling a (stack of) item(s) to this shop the player will be paid:
When selling a (stack of) item(s) to this shop the player will be paid:


  floor(floor([[Script:setprice|price]] · [[Script:shopmultiply|multiplier]] · [[Script:setdurability|(durability / max_durability)]]) / 3 * [[Script:setcount|count]] * (1 - [[Skills|full_intuition]] / 200))
  floor(floor([[Script:setprice|price]] · [[Script:shopmultiply|multiplier]] · [[Script:setdurability|(durability / max_durability)]]) / 3 * [[Script:setcount|count]] * (1 + [[Skills|full_intuition]] / 200))


}}
}}

Revision as of 10:55, 26 June 2022

The shopmultiply script command is used to set the price multiplier for items bought from or sold to a shop inventory for an entity.
For the shop multiplier to have an effect the entity must be set to be a shop using setshop.

To buy an item from this shop the player must pay:

floor(floor(price · multiplier · (durability / max_durability)) * (1 - full_intuition / 200))

When selling a (stack of) item(s) to this shop the player will be paid:

floor(floor(price · multiplier · (durability / max_durability)) / 3 * count * (1 + full_intuition / 200))

Usage

shopmultiply <multiplier*>

Context: Any Entity

Parameters:

ParameterTypeDescription
multiplier number or variable Price multiplier for this shop