Difference between revisions of "Template:Acquired from test"

From Stoneshard wiki
Jump to navigation Jump to search
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
--><!-- Check if item has data in Armor data or Weapon data, define appropriate data page as variable --><!--
--><!-- Check if item has data in Armor data or Weapon data, define appropriate data page as variable --><!--
-->{{#vardefine:Datapage|{{#ifeq:{{:Weapon_data|{{ROOTPAGENAME}}|Slot}}|Data does not exist.|Armor_data|Weapon_data}}}}<!--
-->{{#vardefine:Datapage|{{#ifeq:{{:Weapon_data|{{ROOTPAGENAME}}|LVL}}|Data does not exist.|Armor_data|Weapon_data}}}}<!--
--><!-- Load item data into variables --><!--
--><!-- Load item data into variables --><!--
-->{{#vardefine:Material|{{lc:{{:{{#var:Datapage}}|{{ROOTPAGENAME}}|Material}}}}}}<!--
-->{{#vardefine:Material|{{lc:{{:{{#var:Datapage}}|{{ROOTPAGENAME}}|Material}}}}}}<!--
Line 7: Line 7:
-->{{#vardefine:LVL|{{:{{#var:Datapage}}|{{ROOTPAGENAME}}|LVL}}}}<!--
-->{{#vardefine:LVL|{{:{{#var:Datapage}}|{{ROOTPAGENAME}}|LVL}}}}<!--
--><!-- RINGS and AMULETS are only sold by JEWELERS, GENERAL MERCHANTS, PAWNSHOP and DOCK ELF, define a variable to easily skip others --><!--
--><!-- RINGS and AMULETS are only sold by JEWELERS, GENERAL MERCHANTS, PAWNSHOP and DOCK ELF, define a variable to easily skip others --><!--
-->{{#vardefine:Jewelry|{{#pos: ring|{{lc:{{:{{#var:Datapage}}|{{ROOTPAGENAME}}|Slot}}}}}}{{#pos: amulet|{{lc:{{:{{#var:Datapage}}|{{ROOTPAGENAME}}|Slot}}}}}}}}<!--
-->{{#vardefine:Jewelry|{{#pos: ring|{{lc:{{:{{#var:Datapage}}|{{ROOTPAGENAME}}|ArmorType}}}}}}{{#pos: amulet|{{lc:{{:{{#var:Datapage}}|{{ROOTPAGENAME}}|ArmorType}}}}}}}}<!--
--><!-- Define LVL adjustments at reputation levels into variables --><!--
--><!-- Define LVL adjustments at reputation levels into variables --><!--
-->{{#vardefine:Hatred|-4}}<!--
-->{{#vardefine:Hatred|-4}}<!--
Line 17: Line 17:
--><!-- List all the merchants and remove lines based on variables. --><!--
--><!-- List all the merchants and remove lines based on variables. --><!--
--><!-- Check if item is JEWELRY --><!--
--><!-- Check if item is JEWELRY --><!--
-->{{#if: {{#var:Jewelry}}
-->{{#if: {{#var:Jewelry}}||<!-- Using pos to check if item's material type is sold by the merchant. --><!--
||<!-- Using pos to check if item's material type is sold by the merchant. --><!--
--><!-- TAILORS only sell CLOTH and LEATHER --><!--
--><!-- TAILORS only sell CLOTH and LEATHER --><!--
-->{{#if: {{#pos: cloth leather leather2|{{#var:Material}}}}
-->{{#if: {{#pos: cloth leather leather2|{{#var:Material}}}}
Line 30: Line 29:
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Amity}} and {{#var:LVL}} < (6 + {{#var:Amity}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Amity}} and {{#var:LVL}} < (6 + {{#var:Amity}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Respect}} and {{#var:LVL}} < (6 + {{#var:Respect}})|respect}}<!--
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Respect}} and {{#var:LVL}} < (6 + {{#var:Respect}})|respect}}<!--
-->}}
-->}}<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
Line 40: Line 38:
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:AmityBrynn}} and {{#var:LVL}} < (14 + {{#var:AmityBrynn}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:AmityBrynn}} and {{#var:LVL}} < (14 + {{#var:AmityBrynn}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:RespectBrynn}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})|respect}}<!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:RespectBrynn}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})|respect}}<!--
-->}}
-->}}}}<!-- SMITHS only sell METAL --><!--
}}<!--
--><!-- SMITHS only sell METAL --><!--
-->{{#if: {{#pos: metal|{{#var:Material}}}}
-->{{#if: {{#pos: metal|{{#var:Material}}}}
|<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
|<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
Line 53: Line 49:
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Amity}} and {{#var:LVL}} < (6 + {{#var:Amity}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Amity}} and {{#var:LVL}} < (6 + {{#var:Amity}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Respect}} and {{#var:LVL}} < (6 + {{#var:Respect}})|respect}}<!--
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Respect}} and {{#var:LVL}} < (6 + {{#var:Respect}})|respect}}<!--
-->}}
-->}}<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Hatred}} and {{#var:LVL}} < (6 + {{#var:Respect}})
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Hatred}} and {{#var:LVL}} < (6 + {{#var:Respect}})
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
Line 63: Line 58:
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Amity}} and {{#var:LVL}} < (12 + {{#var:Amity}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Amity}} and {{#var:LVL}} < (12 + {{#var:Amity}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Respect}} and {{#var:LVL}} < (12 + {{#var:Respect}})|respect}}<!--
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Respect}} and {{#var:LVL}} < (12 + {{#var:Respect}})|respect}}<!--
-->}}
-->}}<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
Line 73: Line 67:
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:AmityBrynn}} and {{#var:LVL}} < (14 + {{#var:AmityBrynn}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:AmityBrynn}} and {{#var:LVL}} < (14 + {{#var:AmityBrynn}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:RespectBrynn}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})|respect}}<!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:RespectBrynn}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})|respect}}<!--
-->}}
-->}}}}<!-- CARPENTERS only sell WOOD --><!--
}}<!--
--><!-- CARPENTERS only sell WOOD --><!--
-->{{#if: {{#pos: wood|{{#var:Material}}}}
-->{{#if: {{#pos: wood|{{#var:Material}}}}
|<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
|<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
Line 86: Line 78:
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Amity}} and {{#var:LVL}} < (6 + {{#var:Amity}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Amity}} and {{#var:LVL}} < (6 + {{#var:Amity}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Respect}} and {{#var:LVL}} < (6 + {{#var:Respect}})|respect}}<!--
-->{{#ifexpr: {{#var:LVL}} > (1 + {{#var:Respect}} and {{#var:LVL}} < (6 + {{#var:Respect}})|respect}}<!--
-->}}
-->}}<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Hatred}} and {{#var:LVL}} < (6 + {{#var:Respect}})
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Hatred}} and {{#var:LVL}} < (6 + {{#var:Respect}})
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
Line 96: Line 87:
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Amity}} and {{#var:LVL}} < (12 + {{#var:Amity}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Amity}} and {{#var:LVL}} < (12 + {{#var:Amity}})|amity }}<!--
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Respect}} and {{#var:LVL}} < (12 + {{#var:Respect}})|respect}}<!--
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Respect}} and {{#var:LVL}} < (12 + {{#var:Respect}})|respect}}<!--
-->}}
-->}}<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
Line 107: Line 97:
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:RespectBrynn}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})|respect}}<!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:RespectBrynn}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})|respect}}<!--
-->}}
-->}}
}}<!--
}}<!-- Using pos to check if item's origin and rarity tags can be sold by the merchant. --><!--
--><!-- Using pos to check if item's origin and rarity tags can be sold by the merchant. --><!--
--><!-- Explode the variable to check place of origin first (ie. aldor). If matched, check for rarity second. --><!--
--><!-- Explode the variable to check place of origin first (ie. aldor). If matched, check for rarity second. --><!--
--><!-- MERCHANTS with TAGS --><!--
--><!-- MERCHANTS with TAGS --><!--
Line 124: Line 113:
-->}}}}
-->}}}}
{{#if: {{#pos: aldor brynn aldwynn maen common uncommon rare|{{#explode:{{#var:Tags}}| |0}}}}|{{#if: {{#pos: aldor brynn aldwynn maen common uncommon rare|{{#explode:{{#var:Tags}}| |-1}}}}
{{#if: {{#pos: aldor brynn aldwynn maen common uncommon rare|{{#explode:{{#var:Tags}}| |0}}}}|{{#if: {{#pos: aldor brynn aldwynn maen common uncommon rare|{{#explode:{{#var:Tags}}| |-1}}}}
|<!--
|<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
--><!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
-->{{#ifexpr: {{#var:LVL}} > (4 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
Line 137: Line 125:
-->}}}}
-->}}}}
{{#if: {{#pos: aldor magic|{{#explode:{{#var:Tags}}| |0}}}}|{{#if: {{#pos: aldor magic|{{#explode:{{#var:Tags}}| |-1}}}}
{{#if: {{#pos: aldor magic|{{#explode:{{#var:Tags}}| |0}}}}|{{#if: {{#pos: aldor magic|{{#explode:{{#var:Tags}}| |-1}}}}
|<!--
|<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
--><!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
-->{{#ifexpr: {{#var:LVL}} > (6 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
Line 150: Line 137:
-->}}}}
-->}}}}
{{#if: {{#pos: common uncommon elven rare|{{#explode:{{#var:Tags}}| |0}}}}|{{#if: {{#pos: common uncommon elven rare|{{#explode:{{#var:Tags}}| |-1}}}}
{{#if: {{#pos: common uncommon elven rare|{{#explode:{{#var:Tags}}| |0}}}}|{{#if: {{#pos: common uncommon elven rare|{{#explode:{{#var:Tags}}| |-1}}}}
|<!--
|<!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
--><!-- First check item's LVL is between merchant's minimum LVL at Hatred and maximum LVL at Respect. --><!--
-->{{#ifexpr: {{#var:LVL}} > (2 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
-->{{#ifexpr: {{#var:LVL}} > (2 + {{#var:Hatred}} and {{#var:LVL}} < (14 + {{#var:RespectBrynn}})
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--
|<!-- If true, merchant can sell the item, list the merchant. Now check each reputation individually. --><!--

Revision as of 18:00, 16 December 2022

This template has no documentation. If you know how to use this template, please add some.