Template:MinPrice

From RuneRealm Wiki
Jump to navigation Jump to search
Template documentation
This documentation is transcluded from Template:MinPrice/doc. [edit] [history] [purge]
Template:MinPrice invokes function main in Module:GEMinMax using Lua.
Template:MinPrice invokes Module:GEMinMax using Lua.

Given a list of items, outputs the item with the lowest price as well as the price in a few formats.

See also:

Usage

{{MinPrice|item1|item2|item3|...|itemN}}

{{MinPrice|item1|item2|item3|...|itemN|coins=coins type|link=link type|format=format|var=variables}}

Unnamed parameters

All unnamed parameters are considered to be the item names. There is currently no limit on the number of items.

coins

By default the output value is unformatted. The coins param can be set to format the number:

Examples
* {{MinPrice|Abyssal whip|Thread|Fire rune}} (default)
* {{MinPrice|coins=y|Abyssal whip|Thread|Fire rune}}
* {{MinPrice|coins=n|Abyssal whip|Thread|Fire rune}}
* {{MinPrice|coins=f|Abyssal whip|Thread|Fire rune}}

link

By default the item name is linked. This can be changed by:

Examples
* {{MinPrice|Abyssal whip|Thread|Fire rune}} (default)
* {{MinPrice|link=n|Abyssal whip|Thread|Fire rune}}
* {{MinPrice|link=p|Abyssal whip|Thread|Fire rune}}
* {{MinPrice|link=plp|Abyssal whip|Thread|Fire rune}}

var

Defining var will use that as the basis as names for two variables containing the price and name for later reuse. The variables will contain the formatting exactly as prescribed by the template (i.e. things will be linked or in coins, following the link and coins parameters). The variables are named X_item and X_price, where X is the value of the var parameter supplied.

This can be done with any format option, though the format=none option can be used to do entirely custom formatting.

{{MinPrice|var=example|Abyssal whip|Thread|Fire rune}}

{{MinPrice|format=none|coins=y|link=p|var=example2|Nature rune|Huge bladed rune salvage|Staff of Sliske}}

The best item is {{#var:example_item}} which costs {{#var:example_price}}.

Another option is {{#var:example2_item}} which costs {{#var:example2_price}}.

Fire rune (5)


The best item is Fire rune which costs 5.

Another option is Nature rune which costs 208.

format

The format of the output can be changed with this parameter. Currently the following formats are supported:

bracket
Aliases: b, <nothing>

Bracket is the default format, it outputs the as "item (price)"

{{MinPrice|format=b|Abyssal whip|Thread|Fire rune}}

Fire rune (5)

bracketreverse
Aliases: rb

Similar to bracket, but outputs with the item in the brackets: "price (item)"

{{MinPrice|format=rb|Abyssal whip|Thread|Fire rune}}

5 (Fire rune)

wikitable
Aliases: table, t

Outputs using pipes, suitable for usage in a wikitable: "| item<newline>| price".

{| class="wikitable"
! example
! item
! price
|-
| best item
{{MinPrice|format=t|Abyssal whip|Thread|Fire rune}}
|}
example item price
best item Fire rune 5
wikitablereverse
Aliases: table, t

Similar to wikitable, but the item and price are swapped: "| price<newline>| item".

{| class="wikitable"
! example
! price
! item
|-
| best item
{{MinPrice|format=t|Abyssal whip|Thread|Fire rune}}
|}
example price item
best item 5 Fire rune
item

Outputs just the formatted item name (per the link param).

{{MinPrice|format=item|Abyssal whip|Thread|Fire rune}}

Fire rune

price

Outputs just the formatted price (per the coins param). You should consider using Template:Min, if you aren't using variable export.

{{MinPrice|format=price|Abyssal whip|Thread|Fire rune}}

5

none

Outputs nothing at all. This should only be used with variable export.

{{MinPrice|format=none|Abyssal whip|Thread|Fire rune}}