Difference between revisions of "Template:RareItem.dpl2detailed"

Line 1: Line 1:
 +
{{#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}}
 
{{#if:
 
{{#if:
 
{{{name|}}}|{{#vardefine: craftinfo|{{CrafterInfo|{{{crafter|}}}|{{{craftText|}}} }} }}
 
{{{name|}}}|{{#vardefine: craftinfo|{{CrafterInfo|{{{crafter|}}}|{{{craftText|}}} }} }}
Line 6: Line 7:
 
{{!!}}{{#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]]}}
{{!!}}{{#vardefine: shardcount | 0}}{{
+
{{!!}}{{#vardefine: shardcount | 0}}
  #loop: i
+
{{#loop: i| 0| 27|
  | 0
+
{{#if: {{{ {{#arrayindex: shards | {{#var:i}} }} | }}} | {{#vardefine: shardcount | {{#expr: {{#var: shardcount}} + 1}} }} }}
  | 27
+
}}
  | {{#if: {{{ {{#arrayindex: shards | {{#var:i}} }} | }}} | {{#vardefine: shardcount | {{#expr: {{#var: shardcount}} + 1}} }} }}
+
{{#ifexpr: {{#var: shardcount}} > 1 | s }} || {{#vardefine:n|0}}
}}{{#ifexpr: {{#var: shardcount}} > 1 | s }} || {{#vardefine:n|0}}
+
{{#loop: i| 0| {{#arraysize: shards}}| {{#vardefine: shard | {{#arrayindex: shards | {{#var:i}} }} }}
{{
+
{{#vardefine: shardname|{{#switch: {{#var:shard}}
  #loop: i
+
| GL = Great Lakes
  | 0
+
| LA = Lake Austin
  | {{#arraysize: shards}}
+
| LS = Lake Superior
  | {{#vardefine: shard | {{#arrayindex: shards | {{#var:i}} }} }} {{#vardefine: shardname|{{#switch: {{#var:shard}}
+
| Napa = Napa Valley
| GL = Great Lakes
+
| SP = Siege Perilous
| LA = Lake Austin
+
| Test = Test Center
| LS = Lake Superior
+
| SantaSlay = Santa's Slay
| Napa = Napa Valley
+
| ShardOfScreams = Shard Of Screams
| SP = Siege Perilous
+
| ShardOfTheDead = Shard Of The Dead
| Test = Test Center
+
| ShardOfTheDead2 = Shard Of The Dead II
|SantaSlay = Santa's Slay
+
| #default = {{#var:shard}}
|ShardOfScreams = Shard Of Screams
+
}}
|ShardOfTheDead = Shard Of The Dead
+
}}
|ShardOfTheDead2 = Shard Of The Dead II
+
{{#ifeq:  {{Boolean|{{{ {{#var:shard}}|}}} }} | 1 | {{#vardefine:n|{{#expr:{{#var:n}}+1}}}}[[Category:UO:{{#var:shardname}} Rares]][[UO:{{#var:shardname}} Rares|{{#var:shardname}}]]<br/> |}}
| #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:{{#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]]|}}
 
}}
 
}}

Revision as of 06:52, 2 October 2018