Template:Rarity: Difference between revisions
(creation) |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#switch:{{{1}}}|normal=[[Item Rarity|<span style="color:#FFF;background-color:#AAA;padding:4px;">''' | <includeonly>{{#switch:{{lcfirst:{{{1}}}}}|normal=[[{{#ifexist:{{{2}}}|{{{2}}}|Item Rarity}}|<span style="color:#FFF;background-color:#AAA;padding:4px;">'''{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}'''</span>]]|magic=[[{{#ifexist:{{{2}}}|{{{2}}}|Item Rarity}}|<span style="color:#0FF;background-color:#AAA;padding:4px;">'''{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}'''</span>]]|rare=[[{{#ifexist:{{{2}}}|{{{2}}}|Item Rarity}}|<span style="color:#FF0;background-color:#AAA;padding:4px;">'''{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}'''</span>]]|soul=[[{{#ifexist:{{{2}}}|{{{2}}}|Item Rarity}}|<span style="color:#DAA949;background-color:#AAA;padding:4px;">'''{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}'''</span>]]|unique=[[{{#ifexist:{{{2}}}|{{{2}}}|Item Rarity}}|<span style="color:#050;background-color:#AAA;padding:4px;">'''{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}'''</span>]]}}</includeonly><noinclude> | ||
== Description == | == Description == | ||
<pre>{{rarity|<rarity>}}</pre> | <pre>{{rarity|<rarity>|<optional item name>}}</pre> | ||
Displays a formatted version of the rarity/quality name. | Displays a formatted version of the rarity/quality name. Links to the item page, if it exists, otherwise links to [[Item Rarity]]. | ||
=== Parameters === | === Parameters === | ||
;1 ''(unnamed parameter)'' | ;1 ''(unnamed parameter)'' | ||
: Rarity name. | : Rarity name. | ||
;2 ''(unnamed parameter)'' | |||
: Optional item name. | |||
== Examples == | == Examples == | ||
* {{rarity|normal}} is produced from <code><nowiki>{{rarity|normal}}</nowiki></code> | * {{rarity|normal}} is produced from <code><nowiki>{{rarity|normal}}</nowiki></code> | ||
* {{rarity|magic}} is produced from <code><nowiki>{{rarity| | * {{rarity|magic}} is produced from <code><nowiki>{{rarity|magic}}</nowiki></code> | ||
* {{rarity|rare}} is produced from <code><nowiki>{{rarity| | * {{rarity|rare}} is produced from <code><nowiki>{{rarity|rare}}</nowiki></code> | ||
* {{rarity|soul}} is produced from <code><nowiki>{{rarity| | * {{rarity|soul}} is produced from <code><nowiki>{{rarity|soul}}</nowiki></code> | ||
* {{rarity| | * {{rarity|Unique}} is produced from <code><nowiki>{{rarity|Unique}}</nowiki></code> | ||
* {{rarity|normal|Old Quilted Cloth Cape}} is produced from <code><nowiki>{{rarity|normal|Old Quilted Cloth Cape}}</nowiki></code> |
Latest revision as of 04:59, 24 June 2024
Description
{{rarity|<rarity>|<optional item name>}}
Displays a formatted version of the rarity/quality name. Links to the item page, if it exists, otherwise links to Item Rarity.
Parameters
- 1 (unnamed parameter)
- Rarity name.
- 2 (unnamed parameter)
- Optional item name.