Difference between revisions of "Template:RareItem.dpl2detailed"
Line 7: | Line 7: | ||
--> {{#if: {{{type|}}} | {{#arraydefine: types | {{{type}}} }}{{#arraysort: types|asc}}{{#arrayprint:types |, |@@@@ | {{#vardefine: itemtype |{{#replace: {{#replace: {{#replace: @@@@|Em|EM}}|Gm|GM}}|Igm|IGM}}{{#if: {{{crafter|}}}|-crafted|}} Item}}[[:Category:UO:{{#var:itemtype}}s|{{#var:itemtype}}]] }}|[[:Category:Items of unknown origin|unknown]]}} | --> {{#if: {{{type|}}} | {{#arraydefine: types | {{{type}}} }}{{#arraysort: types|asc}}{{#arrayprint:types |, |@@@@ | {{#vardefine: itemtype |{{#replace: {{#replace: {{#replace: @@@@|Em|EM}}|Gm|GM}}|Igm|IGM}}{{#if: {{{crafter|}}}|-crafted|}} Item}}[[:Category:UO:{{#var:itemtype}}s|{{#var:itemtype}}]] }}|[[:Category:Items of unknown origin|unknown]]}} | ||
{{!!}}<!-- | {{!!}}<!-- | ||
− | -->{{#arraydefine: shards| Arirang,Asuka,Atlantic,Baja,Balhae,Catskills,Chesapeake,Drachenfels,Europa,Formosa,GL,Hokuto,Izumo,LA,LS,Legends,Mizuho,Mugen,Napa,Oceania,Origin,Pacific,Sakura,SP,Sonoma,Wakoku,Yamato,NL,Test,Abyss,Baekdu,Farmageddon,Retribution,SantaSlay,ShardOfScreams,ShardOfTheDead,ShardOfTheDead2,Winterland}} | + | -->{{#arraydefine: shards| Arirang,Asuka,Atlantic,Baja,Balhae,Catskills,Chesapeake,Drachenfels,Europa,Formosa,GL,Hokuto,Izumo,LA,LS,Legends,Mizuho,Mugen,Napa,Oceania,Origin,Pacific,Sakura,SP,Sonoma,Wakoku,Yamato,NL,Test,Abyss,Baekdu,Farmageddon,Retribution,SantaSlay,ShardOfScreams,ShardOfTheDead,ShardOfTheDead2,Winterland}} |
− | + | {{#arraydefine: shardTypes| a,j,w,w,a,w,w,w,w,a,w,j,j,w,w,w,j,jh,w,a,w,w,j,wh,w,j,j,,,,,,,,,,,}} | |
− | + | {{#vardefine: n|0}}{{#vardefine: allwestern|1}}{{#vardefine: alljapan|1}}{{#vardefine: allasia|1}} | |
− | + | {{#loop: i | 0 | {{#arraysize: shards}} | | |
{{#vardefine: exist|{{Boolean|{{{ {{#arrayindex:shards|{{#var:i}}}}|}}} }} }} | {{#vardefine: exist|{{Boolean|{{{ {{#arrayindex:shards|{{#var:i}}}}|}}} }} }} | ||
{{#switch: {{#arrayindex: shardTypes|{{#var:i}}}} | {{#switch: {{#arrayindex: shardTypes|{{#var:i}}}} | ||
Line 47: | Line 47: | ||
}}<!-- | }}<!-- | ||
-->{{#ifexpr: {{#var:exist}}| {{#vardefine:n|{{#expr:{{#var:n}}+1}}}}[[UO:{{#var:shardname}} Rares|{{#var:shardname}}]]<br/>|}} | -->{{#ifexpr: {{#var:exist}}| {{#vardefine:n|{{#expr:{{#var:n}}+1}}}}[[UO:{{#var:shardname}} Rares|{{#var:shardname}}]]<br/>|}} | ||
− | }} | + | }}<!-- |
− | {{#ifexpr: {{#var:n}} = 0 and {{#var:allwestern}} = 0 and {{#var:allasia}} = 0 and {{#var:alljapan}} = 0|[[Category:UO:Rares from unknown shards]][[UO:Rares from unknown shards|unknown]]|}} | + | -->{{#ifexpr: {{#var:n}} = 0 and {{#var:allwestern}} = 0 and {{#var:allasia}} = 0 and {{#var:alljapan}} = 0|[[Category:UO:Rares from unknown shards]][[UO:Rares from unknown shards|unknown]]|}} |
{{!!}}{{#arraydefine: seasons | {{{season|}}}|,}}{{#vardefine: firstseason | {{#arrayindex:seasons|0}} }} | {{!!}}{{#arraydefine: seasons | {{{season|}}}|,}}{{#vardefine: firstseason | {{#arrayindex:seasons|0}} }} | ||
{{#if:{{{season|}}} | {{#vardefine: year |20{{padleft:{{#expr: 2+{{#var:firstseason}} }}|2}} }} [[Category:UO:Rares From {{#var: year}}]] [[UO:Rares From {{#var: year}}|{{#var: year}}]]|{{#if:{{{year|}}}| [[:Category:UO:Rares From {{{year}}}]] [[UO:Rares From {{{year}}}|{{{year}}}]]|[[Category:UO:Rares with unknown year]][[UO:Rares with unknown year|unknown]]}} }} | {{#if:{{{season|}}} | {{#vardefine: year |20{{padleft:{{#expr: 2+{{#var:firstseason}} }}|2}} }} [[Category:UO:Rares From {{#var: year}}]] [[UO:Rares From {{#var: year}}|{{#var: year}}]]|{{#if:{{{year|}}}| [[:Category:UO:Rares From {{{year}}}]] [[UO:Rares From {{{year}}}|{{{year}}}]]|[[Category:UO:Rares with unknown year]][[UO:Rares with unknown year|unknown]]}} }} |