Calculator:Calcvalue

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
Templates
Templates used
Calculator:Calcvalue/template

Converts wikitext strings into escaped versions for the calcvalue param in {{Infobox Item}}, or when setting using the {{Calcvalue}} for non-item pages.

Generally this strings take advantage of parser functions (specifically {{#expr: expression }}) and the various GE related templates such as {{GEP}}, {{GETotal}} and {{GETotalqty}}.


Encode wikitext string to calcvalue string:

name=str|type=string|value=|range=|entersublist=calc|size=80
name=buttoncalc|type=button|value=Submit|sublist=calc
name=calcout|type=output
calc|

parse(calcout, "{"+"{#Invoke:Calcvalue encode|main|string = <nowiki"+">" + str + "<"+"/nowiki>}}")