Template:GEP

From Old School RuneScape Wiki
Jump to: navigation, search
Template documentation
This documentation is transcluded from Template:GEP/doc. [edit] [history] [purge]
Template:GEP invokes function price in Module:Exchange using Lua.
Template:GEP invokes 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

{{GEP|Blue partyhat}}

will display as:

6787

{{GEP|Blue partyhat|5}}

will show the price of 5 Blue partyhats: 33935.

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:

9026.71

Default

If you specify an item name that does not exist on the Grand Exchange, 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