Difference between revisions of "Template:Trades"
(3 intermediate revisions by the same user not shown) | |||
Line 26: | Line 26: | ||
| namespace = | | namespace = | ||
| allowcachedresults=true | | allowcachedresults=true | ||
− | | dplcache={{{1|x}}} | + | | dplcache={{{1|x}}}sells-4 |
| format =,,\n | | format =,,\n | ||
| suppresserrors=true | | suppresserrors=true | ||
Line 33: | Line 33: | ||
{{!}} | {{!}} | ||
{{#forargs:Item| ik | iv | {{#if:{{#var:iv|}}|{{#ifeq:{{#var:ik}}|{{#explode:{{#var:ik}}||0}}|<nowiki/>}}}}[[Category:Trades {{{Item{{#var:ik}}|unknown}}}]] | {{#forargs:Item| ik | iv | {{#if:{{#var:iv|}}|{{#ifeq:{{#var:ik}}|{{#explode:{{#var:ik}}||0}}|<nowiki/>}}}}[[Category:Trades {{{Item{{#var:ik}}|unknown}}}]] | ||
− | {{#if:{{{HQ{{#var:ik}}|}}}|{{ | + | {{#if:{{{HQ{{#var:ik}}|}}}|{{HQo|{{{Item{{#var:ik}}|}}}|width=30px|HQ=x}}|[[File:{{{Item{{#var:ik}}|}}} Icon.png|30px|link={{{Item{{#var:ik}}|}}}]]}}{{#if:{{{Collectability{{#var:ik}}|}}}|<span style="white-space:nowrap">{{CollectableVendor|x}}{{{Collectability{{#var:ik}}}}}</span>| <small>x</small> {{formatnum:{{{Count{{#var:ik}}|1}}}}}}}<br>}}{{#if:{{{Requirement|}}}|[[File:Red-exclamation2.png|This item will not appear for sale until after the following requirements are met: {{{Requirement|}}}.|24px|link={{#ifexist: {{{Requirement}}} | {{{Requirement|}}} |}}]]}} |
[[Category:{{Fixand|{{{1}}}}} Traded by Merchant]][[Category:Merchant]]</includeonly><noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude> | [[Category:{{Fixand|{{{1}}}}} Traded by Merchant]][[Category:Merchant]]</includeonly><noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude> |
Latest revision as of 16:24, 24 March 2020
Usage
{{Trades|TRADED ITEM NAME|Quantity=QUANTITY OF ITEM RECEIVED|Item1=REQUIRED ITEM|Count1=NUMBER OF 1ST REQUIRED ITEM|Item2=ANOTHER REQUIRED ITEM|Count2=NUMBER OF 2ND REQUIRED ITEM}}
- You may use any number of
|Item#=|Count#=
parameters. - Each
|Item#=
MUST be paired with a|Count#=
parameter, as the 'Count' parameter IS REQUIRED for the regex in the 'Traded To:' code on the Item Template to work. - The
|Quantity=
CAN be omitted, but looks sloppy. - If the item you RECEIVE from the Merchant is HQ, you must add
|HQItem=x
somewhere in the Template line (Preferably before the Item1/Count1, after the Quantity part.)
Examples
{{Trades|Augmented Ironworks Sollerets of Striking|Item1=Carbontwine|Count1=1|Item2=Ironworks Sollerets of Striking|Count2=1}}
{{Trades|Ironworks Magitek Sword|Quantity=1|Item1=Rowena's Token (Poetics)|Count1=7|Item2=Encrypted Tomestone|Count2=1}}
{{Trades|Augmented Nightsteel Sword|Quantity=1|HQItem=x|Item1=Resistance Token|Count1=15|Item2=Thavnairian Rain|Count2=4}}
{{Trades|Green Fallen Star|Quantity=2|Item1=Yellow Fallen Star|Count1=1}}
- (Last one translates to: 2 Green Fallen Stars received for trading 1 Yellow Fallen Star)