Template:MaxPrice

From RuneRealm Wiki

This is the current revision of this page, as edited by Alex (talk | contribs) at 00:37, 17 October 2024 (Created page with "<includeonly>{{#invoke:GEMinMax|main|max}}</includeonly><noinclude>{{/doc}}</noinclude>"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Template documentation
This documentation is transcluded from Template:MaxPrice/doc. [edit] [history] [purge]
Template:MaxPrice invokes function main in Module:GEMinMax using Lua.
Template:MaxPrice invokes Module:GEMinMax using Lua.

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

See also:

Usage

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

{{MaxPrice|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
* {{MaxPrice|Abyssal whip|Thread|Fire rune}} (default)
* {{MaxPrice|coins=y|Abyssal whip|Thread|Fire rune}}
* {{MaxPrice|coins=n|Abyssal whip|Thread|Fire rune}}
* {{MaxPrice|coins=f|Abyssal whip|Thread|Fire rune}}

link

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

Examples
* {{MaxPrice|Abyssal whip|Thread|Fire rune}} (default)
* {{MaxPrice|link=n|Abyssal whip|Thread|Fire rune}}
* {{MaxPrice|link=p|Abyssal whip|Thread|Fire rune}}
* {{MaxPrice|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.

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

{{MaxPrice|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}}.

Abyssal whip (1958166)


The best item is Abyssal whip which costs 1958166.

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)"

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

Abyssal whip (1958166)

bracketreverse
Aliases: rb

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

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

1958166 (Abyssal whip)

wikitable
Aliases: table, t

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

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

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

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

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

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

Abyssal whip

price

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

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

1958166

none

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

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