Difference between revisions of "User:JenovaSPIRIT/ShieldDMGPercent"

From SpiralKnights

Jump to: navigation, search
m
m
Line 9: Line 9:
 
4. me to figure out how this coding stuff makes no errors if you enter a question mark instead of a number :x <br>
 
4. me to figure out how this coding stuff makes no errors if you enter a question mark instead of a number :x <br>
  
<nowiki>{{User:JenovaSPIRIT/ShieldDMGPercent|360|72|71}}</nowiki><br>
+
<nowiki>{{User:JenovaSPIRIT/ShieldDMGPercent|360|miau|71}}</nowiki><br>
 
to display<br>
 
to display<br>
{{User:JenovaSPIRIT/ShieldDMGPercent|360|72|71}}
+
{{User:JenovaSPIRIT/ShieldDMGPercent|360|miau|71}}
 
</noinclude>
 
</noinclude>
  
Line 20: Line 20:
 
{{#expr: round (2|1/3)}} <br>
 
{{#expr: round (2|1/3)}} <br>
 
{{#ifeq: {{{3|}}}|?|3 is a questionmark|3 is no questionmark}} <br>
 
{{#ifeq: {{{3|}}}|?|3 is a questionmark|3 is no questionmark}} <br>
 +
{{#iferror: {{#expr: 1+{{{2}}} }} |?| {{#expr: (({{{1}}}-{{{2}}})/{{{1}}}*100) round 1}}%}} - {{#iferror: {{#expr: 1+{{{3}}} }} |?| {{#expr: (({{{1}}}-{{{3}}})/{{{1}}}*100) round 1}}%}}
 +
  
 
{{#ifeq:{{{2|}}}|?|?|{{#expr: (({{{1}}}-{{{2}}})/{{{1}}}*100) round 1}}%}} - {{#ifeq:{{{3|}}}|?|?|{{#expr: (({{{1}}}-{{{3}}})/{{{1}}}*100) round 1}}%}}
 
{{#ifeq:{{{2|}}}|?|?|{{#expr: (({{{1}}}-{{{2}}})/{{{1}}}*100) round 1}}%}} - {{#ifeq:{{{3|}}}|?|?|{{#expr: (({{{1}}}-{{{3}}})/{{{1}}}*100) round 1}}%}}
  
 
</includeonly>
 
</includeonly>

Revision as of 14:05, 28 May 2017

Testing to create a template using enormous skillful mastermind coding copy-paste techniques :D
Parameters are called using {{{#}}} in the order in which they appear in templates and can be used for calculations.

This template requires:
1. the amount of pixel while the shield got max health
2. the remaining pixels at the first depth of a stratum
3. the remaining pixels at the last depth of a stratum
4. me to figure out how this coding stuff makes no errors if you enter a question mark instead of a number :x

{{User:JenovaSPIRIT/ShieldDMGPercent|360|miau|71}}
to display

? - 80.3%


Personal tools