Difference between revisions of "Template:RareItem.dpl2detailed"
Line 4: | Line 4: | ||
{{!!}}{{#if: {{{graphic|}}} |[[:Category:UO:Items_using_graphic_{{{graphic}}}|{{{graphic}}}]]|unknown}} | {{!!}}{{#if: {{{graphic|}}} |[[:Category:UO:Items_using_graphic_{{{graphic}}}|{{{graphic}}}]]|unknown}} | ||
{{!!}}{{#if: {{{hue|}}} |[[:Category:UO:Items_using_hue_{{{hue}}}|{{{hue}}}]]|unknown}} | {{!!}}{{#if: {{{hue|}}} |[[:Category:UO:Items_using_hue_{{{hue}}}|{{{hue}}}]]|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}}]] }}|[[UO: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: 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}} | | -->{{#loop: i | 0 | {{#arraysize: shards}} | | ||
{{#vardefine: exist|{{Boolean|{{{ {{#arrayindex:shards|{{#var:i}}}}|}}} }} }} | {{#vardefine: exist|{{Boolean|{{{ {{#arrayindex:shards|{{#var:i}}}}|}}} }} }} | ||
Line 23: | Line 23: | ||
}}<!-- | }}<!-- | ||
-->{{#loop: i | 0 | {{#arraysize: shards}} | | -->{{#loop: i | 0 | {{#arraysize: shards}} | | ||
− | {{#vardefine: shard|{{#arrayindex: shards|{{#var:i}}}} }} | + | {{#vardefine: shard|{{#arrayindex: shards|{{#var:i}}}} }}<!-- |
− | + | --> {{#vardefine: exist|{{Boolean|{{{ {{#var:shard}}|}}} }} }}<!-- | |
− | + | --> {{#switch: {{#arrayindex: shardTypes|{{#var:i}}}} | |
|j|jh = {{#ifexpr: {{#var:alljapan}} or {{#var:allasia}}| {{#vardefine: exist|0}}| }} | |j|jh = {{#ifexpr: {{#var:alljapan}} or {{#var:allasia}}| {{#vardefine: exist|0}}| }} | ||
|w|wh = {{#ifexpr: {{#var:allwestern}}| {{#vardefine: exist|0}}| }} | |w|wh = {{#ifexpr: {{#var:allwestern}}| {{#vardefine: exist|0}}| }} | ||
|a = {{#ifexpr: {{#var:allasia}}| {{#vardefine: exist|0}}| }} | |a = {{#ifexpr: {{#var:allasia}}| {{#vardefine: exist|0}}| }} | ||
− | }} | + | }}<!-- |
− | + | --> {{#vardefine: shardname | | |
{{#switch: {{#var:shard}} | {{#switch: {{#var:shard}} | ||
| GL = Great Lakes | | GL = Great Lakes | ||
Line 48: | Line 48: | ||
-->{{#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| | + | -->{{#ifexpr: {{#var:n}} = 0 and {{#var:allwestern}} = 0 and {{#var:allasia}} = 0 and {{#var:alljapan}} = 0|[[UO:Rares from unknown shards|unknown]]|}} |
− | {{!!}}{{#arraydefine: seasons | {{{season|}}}|,}}{{#vardefine: firstseason | {{#arrayindex:seasons|0}} }} | + | {{!!}}<!-- |
− | {{#if:{{{ | + | -->{{#arraydefine: seasons | {{{season|}}}|,}}{{#vardefine: firstseason | {{#arrayindex:seasons|0}} }}<!-- |
− | {{#if: {{{year_end|}}} | –}} | + | -->{{#if: {{{year|}}} |
+ | | [[UO:Rares From {{{year}}}|{{{year}}}]] | ||
+ | | {{#if: {{{season|}}} | ||
+ | | {{#vardefine: year |20{{padleft:{{#expr: 2+{{#var:firstseason}} }}|2}} }}[[UO:Rares From {{#var:year}}|{{#var:year}}]] | ||
+ | | [[UO:Rares with unknown year|unknown]] | ||
+ | }} | ||
+ | }}<!-- | ||
+ | -->{{#if: {{{year_end|}}} | –}} | ||
{{!!}}<!-- | {{!!}}<!-- | ||
− | --> {{#vardefine: month | {{#switch: {{lc:{{padleft:|3|{{{month|}}}~ }} }} | 1~1 | jan = Jan | 2~2 | feb = Feb | 3~3 | mar = Mar | 4~4 | apr = Apr | 5~5 | may = May | 6~6 | jun = Jun | 7~7 | jul = Jul | 8~8 | aug = Aug | 9~9 | sep | sept = Sep | 10~ | oct = Oct | 11~ | nov = Nov | 12~ | dec = Dec | #default = }} }}{{#var: month}}{{#if: {{{day|}}} | {{{day}}}|}} | + | --> {{#vardefine: month | {{#switch: {{lc:{{padleft:|3|{{{month|}}}~ }} }} | 1~1 | jan = Jan | 2~2 | feb = Feb | 3~3 | mar = Mar | 4~4 | apr = Apr | 5~5 | may = May | 6~6 | jun = Jun | 7~7 | jul = Jul | 8~8 | aug = Aug | 9~9 | sep | sept = Sep | 10~ | oct = Oct | 11~ | nov = Nov | 12~ | dec = Dec | #default = }} }}{{#var: month}}{{#if: {{{day|}}}| {{{day}}}|}} |
{{!!}}<!-- | {{!!}}<!-- | ||
--> {{#if: {{{quantity|}}} | {{#replace: {{{quantity}}}|*|∗}}|unknown[[Category:UO:Rares of unknown quantity]]}} | --> {{#if: {{{quantity|}}} | {{#replace: {{{quantity}}}|*|∗}}|unknown[[Category:UO:Rares of unknown quantity]]}} | ||
}} | }} |