Template:Lb: Difference between revisions

From TalossaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Raw bence code (input of dollars and cents to bence; works):
Total conversion:
{{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }}
{{#ifexpr: {{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} < 59 | {{b}}{{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} | gobblegee{{b}}
 
{{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} / 60}} * 100}} mod 100}} round2}} }}
New conversion code since I have lost track of the other goddamn one:
IF Raw bence more than 59? (WORKS)
{{#ifexpr: {{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} < 59 | {{b}}{{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} | gobblegee }}
 
THEN convert to louise{{b}}bence
 
LOUISE:
 
BENCE:
(divide by 60 for louise, multiply by 100, then mod 100 for raw number of louise; works)
{{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} / 60}} * 100}} mod 100}} round2}}


bence - this should be 56: {{#expr: {{#expr: {{#expr: {{#expr: 1234 /60}} * 100}} mod 100}} round2}}


LOUISE (gobblegee above):


<!--To change the conversion rate, alter the number 0.4 above to the appropriate ratio to change bence to cents-->
{{#expr: {{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} / 60}}
 




<noinclude>===Usage===
<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 ¤).
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 change the conversion rate, alter the number 0.4 above to the appropriate ratio to change bence to cents.  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]]
Raw bence code (input of dollars and cents to bence; works):
{{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }}
</noinclude>
</noinclude>

Revision as of 17:27, 30 June 2012

Total conversion: ¤0


LOUISE (gobblegee above):

0


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 change the conversion rate, alter the number 0.4 above to the appropriate ratio to change bence to cents. To use this template (don't use it yet), just type {{Lb|dollars|cents}}. Do not include any symbols ($ or ¤).

Raw bence code (input of dollars and cents to bence; works): 0