Difference between revisions of "Template:Currency"

From WildStar Wiki
Jump to: navigation, search
 
Line 5: Line 5:
 
{{#vardefine:copper|{{#expr:{{{1}}}mod100}}}}
 
{{#vardefine:copper|{{#expr:{{{1}}}mod100}}}}
 
|{{#vardefine:gold|0}}{{#vardefine:silver|0}}{{#vardefine:copper|0}}
 
|{{#vardefine:gold|0}}{{#vardefine:silver|0}}{{#vardefine:copper|0}}
}} }}<span style="white-space:nowrap;">{{#ifexpr:{{#var:platinum}}+{{#var:gold}}+{{#var:silver}}+{{#var:copper}}>0 <!--We also display copper if 0 value-->
+
}}<span style="white-space:nowrap;">{{#ifexpr:{{#var:platinum}}+{{#var:gold}}+{{#var:silver}}+{{#var:copper}}>0 <!--We also display copper if 0 value-->
 
| {{#ifexpr:{{#var:platinum}}>0 | {{#var:platinum}} {{Platinum}} }}<!--
 
| {{#ifexpr:{{#var:platinum}}>0 | {{#var:platinum}} {{Platinum}} }}<!--
 
-->{{#ifexpr:{{#var:gold}}>0 | {{#ifexpr:{{#var:platinum}}>0|&nbsp;}}{{#var:gold}} {{Gold}} }}<!--
 
-->{{#ifexpr:{{#var:gold}}>0 | {{#ifexpr:{{#var:platinum}}>0|&nbsp;}}{{#var:gold}} {{Gold}} }}<!--
Line 11: Line 11:
 
-->{{#ifexpr:{{#var:copper}}>0 | {{#ifexpr:{{#var:platinum}}>0 or {{#var:gold}}>0 or {{#var:silver}}>0|&nbsp;}}{{#var:copper}} {{Copper}} }}
 
-->{{#ifexpr:{{#var:copper}}>0 | {{#ifexpr:{{#var:platinum}}>0 or {{#var:gold}}>0 or {{#var:silver}}>0|&nbsp;}}{{#var:copper}} {{Copper}} }}
 
| {{copper|0}}
 
| {{copper|0}}
}}</span></includeonly><noinclude>
+
}}</span> }}</includeonly><noinclude>
 
{{doc}}
 
{{doc}}
   

Latest revision as of 21:24, 11 July 2016

Template-info.png Documentation

Mimics the display of coin in the game.

Usage

{{Currency|<value>}}

Examples

{{currency|10}}

10 UI CRB Coin Copper.png

{{currency|1052}}

10 UI CRB Coin Silver.png 52 UI CRB Coin Copper.png

{{currency|105237}}

10 UI CRB Coin Gold.png 52 UI CRB Coin Silver.png 37 UI CRB Coin Copper.png

{{currency|10523706}}

10 UI CRB Coin Platinum.png 52 UI CRB Coin Gold.png 37 UI CRB Coin Silver.png 6 UI CRB Coin Copper.png

{{currency|10|renown}}

10 UI CRB Coin Reknown.png