Template:Lb: Difference between revisions

From TalossaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
TEMPLATE BROKEN PLEASE REMOVE
<noinclude>$20USD = </noinclude>{{#expr:floor {{#expr: {{formatnum:{{{1|<noinclude>20</noinclude>}}}|R}} / 1.50}}}}¤{{#expr: {{#expr: {{#expr: {{#expr:floor {{#expr: {{formatnum:{{{1|<noinclude>20</noinclude>}}}|R}} / 1.50}}}} - {{#expr: {{formatnum:{{{1|<noinclude>20</noinclude>}}}|R}} / 1.50}} }} * -60}} round0}}<noinclude>
{{#ifexpr: {{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} < 59 |{{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} / 60}} round2 }}¤{{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} / 60}} round2 }} mod 100}}|¤{{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} }}
===Usage===
 
This template automatically converts United States dollars (USD) to the Talossan bent and louis, the base unit of currency for Talossa.  The conversion is accurate within a fraction to one bence.  To use this template, just type <nowiki>{{Lb|amountinUSD}}</nowiki>.  Do not include any symbols ($ or ¤).
<!--To change the conversion rate, alter the number 0.4 above to the appropriate ratio to change bence to cents-->
 
Raw bence code:
{{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }}
 
<noinclude>===Usage===
This template automatically converts United States dollars (USD) to the Talossan bent and louis, the base unit of currency for Talossa.  Since the template author has no goddamn idea what the current rate might be, he has put in a temporary arbitrary sum while he works out the ridiculous parser logic required.  To use this template (don't use it yet), just type <nowiki>{{Lb|dollars|cents}}</nowiki>.  Do not include any symbols ($ or ¤).
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 21:17, 9 July 2012

$20USD = 13¤20

Usage

This template automatically converts United States dollars (USD) to the Talossan bent and louis, the base unit of currency for Talossa. The conversion is accurate within a fraction to one bence. To use this template, just type {{Lb|amountinUSD}}. Do not include any symbols ($ or ¤).