User:YangTheWarrior/Tp total placeholder
This template creates an element which is used by Template:tp total calculate to calculate and display the total value of a given materials list. (Please note that tp total calculate should only be used once per page)== Usage ==
{{tp total placeholder|info = buys|
<item 1 quantity>; <item 1 name>
<item 2 quantity>; <item 2 name>
<item 3 quantity>; <item 3 name>
}}
Now supports inline "direct cost = XXX" anywhere in the item list (e.g., first or last line) for variable-based receipts. Handles variations like "directcost=XXX" (no spaces, case-insensitive). The named "direct cost" param still works for compatibility.=== Parameters ===
- 1 (unnamed parameter)
- Item quantity and name.
- Use semi-colons to separate the item quantity, item name and item fallback value (value is optional, and could for example be a vendor price).
- Use new lines to separate different items.
- Can include a line like "direct cost = 50000" anywhere.
- info
- "buys" (default, highest buy offer), "sells" (lowest sell offer), "sellst" (lowest sell offer including trading post cost).
- direct cost
- Allows an additional vendor cost to be specified, e.g. when trading Grandmaster Huntsman's Mark, an additional 5
is incurred (direct cost = 50000). - sep
- Optional, by default new line is used.
- placeholder
- Optional. This parameter specifies the placeholder text until the trading post data was loaded. Defaults to
….== Example with inline direct cost in variable ==
{{#vardefine:reciept96259| 30;Ancient Wood Log 30;Orichalcum Ore 10;Chunk of Petrified Echovald Resin 5;Glob of Ectoplasm 4;Orichalcum Ore 6;Ancient Wood Log direct cost = 50000 }} {{User:YangTheWarrior/Tp total placeholder| {{#var:reciept96259}} }} It would cost a total of {{User:YangTheWarrior/Tp total placeholder| 50;Orichalcum Ingot 50;Elder Wood Plank direct cost = 50000 }} to craft a random item using the buy it now price. {{tp total calculate}}
…
It would cost a total of … to craft a random item using the buy it now price.
== See also ==Template:tp total calculate — the widget wrapper that makes this placeholder template work