Template:ItemBox: Difference between revisions

From Melvor Idle
(New automatic ItemBox)
 
(Amend category to return 'None' if no category is found)
(8 intermediate revisions by one other user not shown)
Line 3: Line 3:
Based on [[Template:Item]], but pulling data from [[Module:Items/data]] filtered through [[Module:Items]]
Based on [[Template:Item]], but pulling data from [[Module:Items/data]] filtered through [[Module:Items]]


<onlyinclude><includeonly>{{#vardefine:item|{{{1|{{PAGENAME}}}}}}}{| class="wikitable" style="float:right; clear:right; margin: 0rem 0rem 1rem 1rem;"
<onlyinclude><includeonly>{{#vardefine:item|{{{1|{{PAGENAME}}}}}}}{| class="wikitable" style="float:right; clear:right; max-width:250px; margin-left:10px"
|-  
|-  
! {{#var:item}}
! {{#var:item}}
|-
|-
| {{#invoke:Icons|Icon|{{#var:item}}|type=item|size=250|notext=true}}
|style="text-align:center;"| {{#invoke:Icons|Icon|{{#var:item}}|type=item|size=250|notext=true}}
|-
|-
| style="text-align: center;" | Item ID: {{#invoke:Items|getItemStat|{{#var:item}}|id}}
| style="text-align: center;" | {{#invoke:Items|getItemStat|{{#var:item}}|description}}
|-
|-
| Category: [[{{#invoke:Items|getItemStat|{{#var:item}}|category}}]]
| '''Item ID:''' {{#invoke:Items|getItemStat|{{#var:item}}|id}}
|-
|-
| Type: {{#invoke:Items|getItemStat|{{#var:item}}|type}}
| '''Category:''' {{#ifeq:{{#invoke:Items|getItemStat|{{#var:item}}|category}}||None|[[{{#invoke:Items|getItemStat|{{#var:item}}|category}}]]}}
|-
|-
| Sells For: {{Icon|Coins|notext=true}} {{#invoke:Items|getItemStat|{{#var:item}}|sellsFor|formatNum=true}}
| '''Type:''' {{#invoke:Items|getItemStat|{{#var:item}}|type}}
|-
|-
| Item Sources:<br/>{{#invoke:Items|getItemSources|{{#var:item}}|asList=true}}
| '''Sells For:''' {{Icon|Coins|notext=true}} {{#invoke:Items|getItemStat|{{#var:item}}|sellsFor|formatNum=true}}{{#invoke:Items|getOtherItemBoxText|{{#var:item}}}}
|-
|-
| Item Uses:<br/>{{#invoke:Items|getItemUses|{{#var:item}}}}
| '''Item Sources:'''<br/>{{#invoke:Items/SourceTables|getItemSources|{{#var:item}}|asList=true|addCategories=true}}
|-
| '''Item Uses:'''<br/>{{#invoke:Items/UseTables|getItemUses|{{#var:item}}|addCategories=true}}
|-
| '''Part of 100% Completion''': {{#invoke:Items|getItemStat|{{#var:item}}|completionReq}}
|}{{#invoke:Items|getItemCategories|{{#var:item}}}}
|}{{#invoke:Items|getItemCategories|{{#var:item}}}}
</includeonly></onlyinclude>
</includeonly></onlyinclude>

Revision as of 19:14, 14 November 2021

Topaz
Topaz
Standard Gem
Item ID: melvorD:Topaz
Category: Gemstone
Type: Gem
Sells For: 225
Item Sources:
  • Killing: Wet Monster,Moist Monster,Sweaty Monster,Seething Horned Elite,Granite Golem,Ghost Sailor
  • Opening: Chest of Witwix,Pirate Booty,Elite Chest,Chest of Gems,Fire Chest,Old Pirate Treasure,Golden Flute
  • Pickpocketing: Princess
  • Casting: Rags to Riches I,Rags to Riches II
  • Cartography Level 1
  • Fishing Special
  • Mining Gem
Item Uses:
Part of 100% Completion: Yes


Based on Template:Item, but pulling data from Module:Items/data filtered through Module:Items