Difference between revisions of "Template:RareItem.dpl2detailed"

Line 1: Line 1:
 
{{#if: {{{name|}}}|{{#vardefine: craftinfo|{{CrafterInfo|{{{crafter|}}}|{{{craftText|}}} }} }}
 
{{#if: {{{name|}}}|{{#vardefine: craftinfo|{{CrafterInfo|{{{crafter|}}}|{{{craftText|}}} }} }}
{{UOImage|{{{graphic|}}}|{{{hue|}}}|{{{image|}}}|{{{%PAGE%}}} }}
+
    {{UOImage|{{{graphic|}}}|{{{hue|}}}|{{{image|}}}|{{{%PAGE%}}} }}
{{!!}}[[{{{%PAGE%}}}|{{{name}}} {{#var: craftinfo}}{{{engraving|}}}]]
+
    {{!!}}[[{{{%PAGE%}}}|{{{name}}} {{#var: craftinfo}}{{{engraving|}}}]]
{{!!}}{{#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}}]] }}|[[: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, Test, Wakoku,Yamato,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, Test, Wakoku,Yamato,Abyss,Baekdu,Farmageddon,Retribution,SantaSlay,ShardOfScreams,ShardOfTheDead,ShardOfTheDead2,Winterland}}
{{#vardefine: n | 0}}
+
        {{#vardefine: n | 0}}
{{#loop: i | 0 | {{#arraysize: shards}} | {{#vardefine: shard | {{#arrayindex: shards | {{#var:i}} }} }}
+
        {{#loop: i | 0 | {{#arraysize: shards}} | {{#vardefine: shard | {{#arrayindex: shards | {{#var:i}} }} }}
{{#vardefine: shardname |
+
            {{#vardefine: shardname |
{{#switch: {{#var:shard}}
+
                {{#switch: {{#var:shard}}
| GL = Great Lakes
+
                    | GL = Great Lakes
| LA = Lake Austin
+
                    | LA = Lake Austin
| LS = Lake Superior
+
                    | LS = Lake Superior
| Napa = Napa Valley
+
                    | Napa = Napa Valley
| SP = Siege Perilous
+
                    | SP = Siege Perilous
| Test = Test Center
+
                    | Test = Test Center
| SantaSlay = Santa's Slay
+
                    | SantaSlay = Santa's Slay
| ShardOfScreams = Shard Of Screams
+
                    | ShardOfScreams = Shard Of Screams
| ShardOfTheDead = Shard Of The Dead
+
                    | ShardOfTheDead = Shard Of The Dead
| ShardOfTheDead2 = Shard Of The Dead II
+
                    | ShardOfTheDead2 = Shard Of The Dead II
| #default = {{#var:shard}}
+
                    | #default = {{#var:shard}}
}}
+
                }}
}}
+
            }}
{{#ifeq: {{Boolean|{{{ {{#var:shard}}|}}} }} | 1 | {{#vardefine:n|{{#expr:{{#var:n}}+1}}}}[[Category:UO:{{#var:shardname}} Rares]][[UO:{{#var:shardname}} Rares|{{#var:shardname}}]]<br/> |}}
+
            {{#ifeq: {{Boolean|{{{ {{#var:shard}}|}}} }} | 1 | {{#vardefine:n|{{#expr:{{#var:n}}+1}}}}[[Category:UO:{{#var:shardname}} Rares]][[UO:{{#var:shardname}} Rares|{{#var:shardname}}]]<br/> |}}
}}
+
        }}
{{#ifeq:{{#var:n}}|0|[[Category:UO:Rares from unknown shards]][[UO:Rares from unknown shards|unknown]]|}}
+
        {{#ifeq:{{#var:n}}|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}} }}
{{#vardefine: month | {{#switch: {{lc:{{padleft:|3|{{{month|}}}~ }} }}
+
        {{#vardefine: month | {{#switch: {{lc:{{padleft:|3|{{{month|}}}~ }} }}
| 1~1 | jan = January | 2~2 | feb = February | 3~3 | mar = March | 4~4 | apr = April | 5~5 | may = May | 6~6 | jun = June | 7~7 | jul = July | 8~8 | aug = August | 9~9 | sep | sept = September | 10~ | oct = October | 11~ | nov = November | 12~ | dec = December | #default = }}
+
            | 1~1 | jan = January | 2~2 | feb = February | 3~3 | mar = March | 4~4 | apr = April | 5~5 | may = May | 6~6 | jun = June | 7~7 | jul = July | 8~8 | aug = August | 9~9 | sep | sept = September | 10~ | oct = October | 11~ | nov = November | 12~ | dec = December | #default = }}
}}
+
        }}
{{#var: month}}
+
        {{#var: month}}
{{#if: {{{day|}}} |&nbsp;{{{day}}}, |}}
+
        {{#if: {{{day|}}} |&nbsp;{{{day}}}, |}}
{{#if:{{{season|}}} | {{#vardefine: year |20{{padleft:{{#expr: 2+{{#var:firstseason}} }}|2}} }} [[Category:UO:Rares From {{#var: year}}]]&nbsp;[[UO:Rares From {{#var: year}}|{{#var: year}}]]|{{#if:{{{year|}}}| [[Category:UO:Rares From {{{year}}}]]&nbsp;[[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}}]]&nbsp;[[UO:Rares From {{#var: year}}|{{#var: year}}]]|{{#if:{{{year|}}}| [[Category:UO:Rares From {{{year}}}]]&nbsp;[[UO:Rares From {{{year}}}|{{{year}}}]]|[[Category:UO:Rares with unknown year]][[UO:Rares with unknown year|unknown]]}} }}
{{#if: {{{year_end|}}} | &#8211; }}
+
        {{#if: {{{year_end|}}} | &#8211; }}
{{!!}}
+
    {{!!}}
{{#if: {{{quantity|}}} |{{#replace: {{{quantity}}}|*|&lowast;}}|unknown[[Category:UO:Rares of unknown quantity]]}}
+
        {{#if: {{{quantity|}}} |{{#replace: {{{quantity}}}|*|&lowast;}}|unknown[[Category:UO:Rares of unknown quantity]]}}
 
}}
 
}}

Revision as of 08:00, 2 October 2018