Anonymous

Template:ThievingTarget: Difference between revisions

From Melvor Idle
Change to Lua powered template
(Max hit added)
(Change to Lua powered template)
Line 1: Line 1:
{| class="wikitable" style="float:right; clear:right;"
Usage: {{T|ThievingTarget|name=<NPC_Name>}}. If the '''name''' parameter is omitted, the page name is used instead.
 
For example, {{T|ThievingTarget|Chef}} returns:
{{ThievingTarget|name=Chef}}
 
<onlyinclude><includeonly>
{{#vardefine:npc|{{{name|{{PAGENAME}}}}}}}
<!-- Manual override below for Goblin -->
{{#ifeq:{{#var:npc}}|Golbin (thieving)|{{#vardefine:npc|Golbin}}}}
 
{{#vardefine:itemDrops|{{#invoke:Skills|getThievingNPCStat|{{#var:npc}}|lootTable}}}}
{{#vardefine:itemDropsText|{{#ifeq:{{#var:itemDrops}}|||75% chance for:<br/>{{#var:itemDrops}}<br/>}}}}
 
<!-- Generate the box -->
{| class="wikitable" style="float:right; clear:right; max-width:250px; margin-left:10px"
|-  
|-  
! {{{name}}}
! {{#var:npc}}
|-
|-
| [[File:{{{name}}}_(thieving).svg|250px]]
| {{#invoke:Icons|Icon|{{#var:npc}}|type=thieving|size=250|notext=true}}
|-
|-
| Level {{{level}}} [[File:Thieving (skill).svg|25px]][[Thieving]]
| '''Requirement:''' {{#invoke:Skills|getThievingNPCStat|{{#var:npc}}|requirements}}
|-
|-
| Max Hit: {{{maxHit}}}
| '''Max Hit:''' {{#invoke:Skills|getThievingNPCStat|{{#var:npc}}|maxHit}}
|-
|-
| {{{xp}}} xp
| '''Experience:''' {{#invoke:Skills|getThievingNPCStat|{{#var:npc}}|xp}} XP
|-
|-
| Drops:
| '''Drops:'''
{{{drops}}}
* {{GP|1|{{#invoke:Skills|getThievingNPCStat|{{#var:npc}}|maxCoins}}}}
|}
{{#var:itemDropsText}}
0.83% chance for:
* {{ItemIcon|Bobby's Pocket}}
 
0.01% chance for:
* {{ItemIcon|Chapeau Noir}}
|}</includeonly></onlyinclude>