Template:GEP

From RuneRealm Wiki

This is the current revision of this page, as edited by Alex (talk | contribs) at 02:06, 12 October 2024 (Created page with "<includeonly>{{#invoke:Exchange|price|format=no}}</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: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:

55000000

{{GEP|Blue partyhat|5}}

will show the price of 5 Blue partyhats: 275000000.

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:

73150000

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}}

75000000

75000000

See also