Template:GEP

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Template documentation
This documentation is transcluded from Template:GEP/doc. [edit] [purge]
Template:GEP invokes function price in Module:Exchange using Lua.

{{GEP}} displays values entered into the Grand Exchange Market Watch pages that can be used to help perform calculations and display prices where the full table might be inappropriate.

This template is useful primarily in calculations because it avoids calculation errors caused by commas in the prices. It is much simpler to use {{GEP|Blue partyhat}} rather than to use {{,| {{GEPrice|Blue partyhat}}}} in a calculation.


Usage

Basic usage
{{GEP|Blue partyhat}}

will display as:

2147483647

Multiplier
{{GEP|Blue partyhat|5}}

will show the price of 5 Blue partyhats: 10737418235.

Rounding

To round the output to a specified number of decimal places, use the round parameter:

{{GEP|Blue partyhat|1.33|round=2}}

will display as:

2856153250.51

Default

If you specify an incorrect item name, a script error is thrown. You can set the dflt to a value that will be returned instead of an error. (NB: if you are looking up prices for a historical GE item, this will return the default before checking if the item is historical.) You could set this to a string to detect the error, or to a number like 0 to allow calculations to continue, ignoring the non-GE item.

{{GEP|Rainbow partyhat|dflt=error}}

{{GEP|Rainbow partyhat|dflt=0}}

error

0

See also

Template data

Show/hide template's data

The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date.

Displays values entered into the [[Grand Exchange Market Watch]] pages that can be used to help perform calculations and display prices where the full table might be inappropriate. This template is useful primarily in calculations because it avoids calculation errors caused by commas in the prices.

Template parameters

This template has custom formatting.

ParameterDescriptionTypeStatus
Item name1

The name of the item to be priced

Default
empty
Example
Blue partyhat
Auto value
empty
Stringrequired
Number2

Number of item

Default
empty
Example
5
Auto value
empty
Numberoptional
Roundinground

Number of decimal places to round to

Default
empty
Example
2
Auto value
empty
Numberoptional
Defaultdflt

A value (string, number, or otherwise) that is returned if the looked-up item doesn't exist, rather than throwing a script error.

Default
empty
Example
0
Auto value
empty
Unknownoptional