From Dark and Darker Wiki
(Moved code from Template:Quest Items) |
(Added quantity per trader. Adjusted merchant column for better readability with space. Renamed variable to be more explicit.) |
||
Line 8: | Line 8: | ||
{{#loop: loopTr|0|{{#arraysize:traders_arr}}|<!-- | {{#loop: loopTr|0|{{#arraysize:traders_arr}}|<!-- | ||
--> | --> | ||
{{#vardefine:cur_trader|{{#arrayindex:traders_arr|{{#var:loopTr}}}}}} | {{#vardefine:cur_trader|[[{{#arrayindex:traders_arr|{{#var:loopTr}}}}]]}} | ||
{{#arraydefine:chapters_array| | {{#arraydefine:chapters_array| | ||
{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|All}} | {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|All}} | ||
Line 41: | Line 41: | ||
|<!--True--> | |<!--True--> | ||
{{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | {{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
|<!--False--> | |<!--False--> | ||
{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | {{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | ||
{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | {{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
}} | }} | ||
Line 67: | Line 67: | ||
|<!--True--> | |<!--True--> | ||
{{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | {{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
|<!--False--> | |<!--False--> | ||
{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | {{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | ||
{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | {{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
}} | }} | ||
Line 93: | Line 93: | ||
|<!--True--> | |<!--True--> | ||
{{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | {{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
|<!--False--> | |<!--False--> | ||
{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | {{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | ||
{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | {{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
}} | }} | ||
Line 119: | Line 119: | ||
|<!--True--> | |<!--True--> | ||
{{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | {{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
|<!--False--> | |<!--False--> | ||
{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | {{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | ||
{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | {{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
}} | }} | ||
Line 145: | Line 145: | ||
|<!--True--> | |<!--True--> | ||
{{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | {{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
|<!--False--> | |<!--False--> | ||
{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | {{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | ||
{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | {{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
}} | }} | ||
Line 171: | Line 171: | ||
|<!--True--> | |<!--True--> | ||
{{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | {{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
|<!--False--> | |<!--False--> | ||
{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | {{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | ||
{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | {{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | ||
{{#arraydefine: | {{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}} | ||
}} | }} | ||
Line 198: | Line 198: | ||
|<!-- Loop --> | |<!-- Loop --> | ||
{{#vardefine:name|{{#arrayindex:array_item_names|{{#var:LoopTest}}}}}} | {{#vardefine:name|{{#arrayindex:array_item_names|{{#var:LoopTest}}}}}} | ||
<tr><td>{{#var:name}}</td><td>{{#var:{{#var:name}}}}</td><td>{{#arrayprint: | <tr><td>{{#var:name}}</td><td>{{#var:{{#var:name}}}}</td><td>{{#arrayprint:quest_giver{{#var:name}}|, }}</td></tr> | ||
}}<!-- | }}<!-- | ||
--></table><!-- | --></table><!-- |
Revision as of 11:51, 18 September 2024