Difference between revisions of "Template:Collectable dpl"

(Updating temporarily to fix a bug with "Unexpected operator >")
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[{{{Name}}}]]
+
<includeonly>[[{{{Name}}}]]
{{!}}{{#vardefine:shape|{{#switch:{{{Class}}}|Carpenter|CRP|Blacksmith|BSM|Armorer|ARM|Goldsmith|GSM|Leatherworker|LTW|Weaver|WVR|Alchemist|ALC|Culinarian|CUL|Armorer, Blacksmith|Blacksmith, Armorer|Goldsmith, Armorer, Blacksmith|Goldsmith, Blacksmith, Armorer|Blacksmith, Armorer, Goldsmith|Blacksmith, Goldsmith, Armorer|Armorer, Goldsmith, Blacksmith|Armorer, Blacksmith, Goldsmith=Crafters'|Botanist|BTN|Miner|MIN|Fisher|FSH=Gatherers'}}}}{{#switch:{{{Scrip}}}|Blue={{#vardefine:scrip|[[File:Blue {{#var:shape}} Scrip Icon.png|40px|link=Blue {{#var:shape}} Scrip]]}}|Red={{#vardefine:scrip|[[File:Red {{#var:shape}} Scrip Icon.png|40px|link=Red {{#var:shape}} Scrip]]}}|#default=[[File:Blue {{#var:shape}} Scrip Icon.png|40px|link=Blue {{#var:shape}} Scrip]]}}{{#vardefine:basecollectmax|{{#expr:{{{Bonus1}}}-1}}}}{{#vardefine:bonuscollectmax|{{#expr:{{{Bonus2}}}-1}}}}
+
{{!}}{{#vardefine:shape|{{#switch:{{{Class}}}|Carpenter|CRP|Blacksmith|BSM|Armorer|ARM|Goldsmith|GSM|Leatherworker|LTW|Weaver|WVR|Alchemist|ALC|Culinarian|CUL|Armorer, Blacksmith|Blacksmith, Armorer|Goldsmith, Armorer, Blacksmith|Goldsmith, Blacksmith, Armorer|Blacksmith, Armorer, Goldsmith|Blacksmith, Goldsmith, Armorer|Armorer, Goldsmith, Blacksmith|Armorer, Blacksmith, Goldsmith=Crafters'|Botanist|BTN|Miner|MIN|Fisher|FSH=Gatherers'}}}}{{#switch:{{{Scrip}}}|Blue={{#vardefine:scrip|[[File:Blue {{#var:shape}} Scrip Icon.png|40px|link=Blue {{#var:shape}} Scrip]]}}|Red={{#vardefine:scrip|[[File:Red {{#var:shape}} Scrip Icon.png|40px|link=Red {{#var:shape}} Scrip]]}}|Yellow={{#vardefine:scrip|[[File:Yellow {{#var:shape}} Scrip Icon.png|40px|link=Yellow {{#var:shape}} Scrip]]}}|#default=[[File:Blue {{#var:shape}} Scrip Icon.png|40px|link=Blue {{#var:shape}} Scrip]]}}{{#vardefine:basecollectmax|{{#expr:{{{Bonus1}}}-1}}}}{{#vardefine:bonuscollectmax|{{#expr:{{{Bonus2}}}-1}}}}
 
{{{!}} class="itembox" style="color:white; width:95%; cellpadding=0; cellspacing=1;" border=0 background-color:#D7D8DB;
 
{{{!}} class="itembox" style="color:white; width:95%; cellpadding=0; cellspacing=1;" border=0 background-color:#D7D8DB;
{{!}}  
+
{{!}} &nbsp;
 
{{!}} Rating
 
{{!}} Rating
 
{{!}} Scrips
 
{{!}} Scrips
Line 9: Line 9:
 
{{!}}width="15%"{{!}}Lv. {{{Level}}}
 
{{!}}width="15%"{{!}}Lv. {{{Level}}}
 
{{!}}width="30%"{{!}}{{{Base|0}}}-{{#var:basecollectmax}}
 
{{!}}width="30%"{{!}}{{{Base|0}}}-{{#var:basecollectmax}}
{{!}}width="20%"{{!}}{{{Base Scrip|0}}}{{#vardefine:bonus1scrip|{{#expr:{{rounddown|{{{Base Scrip}}}*1.1}}}}}}{{#vardefine:bonus2scrip|{{#expr:{{rounddown|{{{Base Scrip}}}*1.2}}}}}}
+
{{!}}width="20%"{{!}}{{{Base Scrip|0}}}{{#vardefine:bonus1scrip|{{#expr:{{rounddown|{{{Base Scrip}}}*1.15}}}}}}{{#vardefine:bonus2scrip|{{#expr:{{rounddown|{{{Base Scrip}}}*1.3}}}}}}
{{!}}width="35%"{{!}}{{{Base EXP|0}}}{{#vardefine:bonus1exp|{{#expr:{{rounddown|{{{Base EXP}}}*1.1}}}}}}{{#vardefine:bonus2exp|{{#expr:{{rounddown|{{{Base EXP}}}*1.2}}}}}}
+
{{!}}width="35%"{{!}}{{#ifeq:{{{Base EXP|0}}}|{{Information Needed}}|{{{Base EXP}}}{{#vardefine:bonus1exp|{{Information Needed}}}}{{#vardefine:bonus2exp|{{Information Needed}}}}|{{{Base EXP|0}}}{{#vardefine:bonus1exp|{{#expr:{{rounddown|{{{Base EXP|0}}}*1.15}}}}}}{{#vardefine:bonus2exp|{{#expr:{{rounddown|{{{Base EXP|0}}}*1.3}}}}}}}}
 
{{!}}-
 
{{!}}-
 
{{!}} rowspan="2"{{!}}{{#var:scrip}}
 
{{!}} rowspan="2"{{!}}{{#var:scrip}}
 
{{!}}{{{Bonus1|0}}}-{{#var:bonuscollectmax}}
 
{{!}}{{{Bonus1|0}}}-{{#var:bonuscollectmax}}
 
{{!}}{{#if:{{{Base Scrip|}}}|{{#var:bonus1scrip}}|{{{Bonus1 Scrip|0}}}}}
 
{{!}}{{#if:{{{Base Scrip|}}}|{{#var:bonus1scrip}}|{{{Bonus1 Scrip|0}}}}}
{{!}}{{#if:{{{Base EXP|}}}|{{#var:bonus1exp}}|{{{Bonus1 EXP|0}}}}}
+
{{!}}{{#var:bonus1exp}}
 
{{!}}-
 
{{!}}-
{{!}}{{{Bonus2|0}}}{{#ifexpr:{{{Base Scrip}}} >= 1|[[Category:Rewards {{{Scrip}}} Scrips]]}}
+
{{!}}{{{Bonus2|0}}}
 
{{!}}{{#if:{{{Base Scrip|}}}|{{#var:bonus2scrip}}|{{{Bonus2 Scrip|0}}}}}
 
{{!}}{{#if:{{{Base Scrip|}}}|{{#var:bonus2scrip}}|{{{Bonus2 Scrip|0}}}}}
{{!}}{{#if:{{{Base EXP|}}}|{{#var:bonus2exp}}|{{{Bonus2 EXP|0}}}}}
+
{{!}}{{#var:bonus2exp}}
 +
{{!}}-
 +
{{!}} colspan="4" align="right"{{!}}[[File:Editbutton.png|14px|Edit {{{Name|}}}/Collectable|link={{fullurl:{{{Name|}}}/Collectable|action=edit}}]]
 
{{!}}}
 
{{!}}}
 +
</includeonly><noinclude>Template for calculating the amount of Scrips received, and EXP rewarded. Used on [[Template:CollectableList]]. [[Category:Templates]]</noinclude>

Latest revision as of 14:11, 19 March 2018

Template for calculating the amount of Scrips received, and EXP rewarded. Used on Template:CollectableList.