Difference between revisions of "Template:RareItem.dpl2detailed"

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

Revision as of 06:43, 2 October 2018