From Dark and Darker Wiki
(Added quantity per trader. Adjusted merchant column for better readability with space. Renamed variable to be more explicit.) |
(Fixed gap between table and top of page.) |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#arraydefine:array_item_names}} | {{#arraydefine:array_item_names}}<!-- | ||
<!--{{#arraydefine:extracted_quantity_array}}--> | --><!--{{#arraydefine:extracted_quantity_array}}--><!-- | ||
--><!-- | |||
<!-- Loop order -> Trader -> Chapter -> Quests -> Task: Checking params --> | --><!-- Loop order -> Trader -> Chapter -> Quests -> Task: Checking params --><!-- | ||
{{#arraydefine:traders_arr|{{Merchant Data|All}}}} | -->{{#arraydefine:traders_arr|{{Merchant Data|All}}}}<!-- | ||
<!--Loop Over Traders--> | --><!--Loop Over Traders--><!-- | ||
{{#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}}<!-- | ||
}} | -->}}<!-- | ||
<!--Loop Over Chapters--> | --><!--Loop Over Chapters--><!-- | ||
{{#loop: loopC|0|{{#arraysize:chapters_array}}| | -->{{#loop: loopC|0|{{#arraysize:chapters_array}}|<!-- | ||
{{#arraydefine:quest_array| | -->{{#arraydefine:quest_array|<!-- | ||
{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|All}} | -->{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|All}}<!-- | ||
}} | -->}}<!-- | ||
<!--Loop Over Quests--> | --><!--Loop Over Quests--><!-- | ||
{{#loop: loopQ|0|{{#arraysize:quest_array}}| | -->{{#loop: loopQ|0|{{#arraysize:quest_array}}|<!-- | ||
{{#arraydefine:tasks_array| | -->{{#arraydefine:tasks_array|<!-- | ||
{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|all}} | -->{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|all}}<!-- | ||
}} | -->}}<!-- | ||
--><!-- | |||
<!--Loop Over Tasks--> | --><!--Loop Over Tasks--><!-- | ||
<!-- TOO MANY LOOOOOPS, COPY PASTE CODE FOR TASKS --> | --><!-- TOO MANY LOOOOOPS, COPY PASTE CODE FOR TASKS --><!-- | ||
<!-- Check if Its fetch 1--> | --><!-- Check if Its fetch 1--><!-- | ||
{{#vardefine:cond1|{{#arraysearch:tasks_array|1}}}} | -->{{#vardefine:cond1|{{#arraysearch:tasks_array|1}}}}<!-- | ||
{{#if:cond1 | -->{{#if:cond1<!-- | ||
|<!-- True: Task array has task: 1 --> | -->|<!-- True: Task array has task: 1 --><!-- | ||
{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|1|type}} | -->{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|1|type}}<!-- | ||
|Fetch| | -->|Fetch|<!-- | ||
--><!-- | |||
<!-- | --><!-- FETCH TASK Checking --><!-- | ||
{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|1|fetch}} | -->{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|1|fetch}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|1|quantity}} | -->{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|1|quantity}}<!-- | ||
} | -->}}<!-- | ||
{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}} | -->{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}}<!-- | ||
{{#if:{{#var:isItemInArray}} | -->{{#if:{{#var:isItemInArray}}<!-- | ||
|<!--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:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | -->{{#arraydefine:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | ||
-->|<!--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:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}} | -->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | ||
-->}}<!-- | |||
--><!-- | |||
}}<!-- | -->}}<!--end is eq: fetch type --><!-- | ||
|}}<!-- end if: is Task N --> | -->|}}<!-- end if: is Task N --><!-- | ||
--><!-- | |||
<!-- Check if Its fetch 2--> | --><!-- Check if Its fetch 2--><!-- | ||
{{#vardefine:cond2|{{#arraysearch:tasks_array|2}}}} | -->{{#vardefine:cond2|{{#arraysearch:tasks_array|2}}}}<!-- | ||
{{#if:cond2 | -->{{#if:cond2<!-- | ||
|<!-- True: Task array has task: 2 --> | -->|<!-- True: Task array has task: 2 --><!-- | ||
{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|2|type}} | -->{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|2|type}}<!-- | ||
|Fetch| | -->|Fetch|<!-- | ||
--><!-- | |||
<!-- | --><!-- FETCH TASK Checking --><!-- | ||
{ | -->{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|2|fetch}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|2|quantity}} | -->{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|2|quantity}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}} | -->{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}}<!-- | ||
{{#if:{{#var:isItemInArray}} | -->{{#if:{{#var:isItemInArray}}<!-- | ||
|<!--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:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | -->{{#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:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}} | -->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | ||
}} | -->}}<!-- | ||
--><!-- | |||
}}<!--end is eq: fetch type --> | -->}}<!--end is eq: fetch type --><!-- | ||
|}}<!-- end if: is Task N --> | -->|}}<!-- end if: is Task N --><!-- | ||
--><!-- | |||
<!-- Check if Its fetch 3--> | --><!-- Check if Its fetch 3--><!-- | ||
{{#vardefine:cond3|{{#arraysearch:tasks_array|3}}}} | -->{{#vardefine:cond3|{{#arraysearch:tasks_array|3}}}}<!-- | ||
{{#if:cond3 | -->{{#if:cond3<!-- | ||
|<!-- True: Task array has task: 3 --> | -->|<!-- True: Task array has task: 3 --><!-- | ||
{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|3|type}} | -->{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|3|type}}<!-- | ||
|Fetch| | -->|Fetch|<!-- | ||
--><!-- | |||
<!-- FETCH TASK Checking --> | --><!-- FETCH TASK Checking --><!-- | ||
{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|3|fetch}} | -->{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|3|fetch}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|3|quantity}} | -->{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|3|quantity}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}} | -->{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}}<!-- | ||
{{#if:{{#var:isItemInArray}} | -->{{#if:{{#var:isItemInArray}}<!-- | ||
|<!--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:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | -->{{#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:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}}) | -->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | ||
-->}}<!-- | |||
--><!-- | |||
}}<!-- | -->}}<!--end is eq: fetch type --><!-- | ||
|}}<!-- end if: is Task N --> | -->|}}<!-- end if: is Task N --><!-- | ||
--><!-- | |||
<!-- | --><!-- Check if Its fetch 4--><!-- | ||
{{#vardefine:cond4|{{#arraysearch:tasks_array|4}}}} | -->{{#vardefine:cond4|{{#arraysearch:tasks_array|4}}}}<!-- | ||
{{#if:cond4 | -->{{#if:cond4<!-- | ||
|<!-- True: Task array has task: 4 --> | -->|<!-- True: Task array has task: 4 --><!-- | ||
{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|4|type}} | -->{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|4|type}}<!-- | ||
|Fetch| | -->|Fetch|<!-- | ||
--><!-- | |||
<!-- FETCH TASK Checking --> | --><!-- FETCH TASK Checking --><!-- | ||
{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|4|fetch}} | -->{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|4|fetch}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|4|quantity}} | -->{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|4|quantity}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}} | -->{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}}<!-- | ||
{{#if:{{#var:isItemInArray}} | -->{{#if:{{#var:isItemInArray}}<!-- | ||
|<!--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:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | -->{{#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:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}}) | -->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | ||
-->}}<!-- | |||
--><!-- | |||
}}<!-- | -->}}<!--end is eq: fetch type --><!-- | ||
|}}<!-- end if: is Task N --> | -->|}}<!-- end if: is Task N --><!-- | ||
--><!-- | |||
<!-- | --><!-- Check if Its fetch 5--><!-- | ||
{{#vardefine:cond5|{{#arraysearch:tasks_array|5}}}} | -->{{#vardefine:cond5|{{#arraysearch:tasks_array|5}}}}<!-- | ||
{{#if:cond5 | -->{{#if:cond5<!-- | ||
|<!-- True: Task array has task: 5 --> | -->|<!-- True: Task array has task: 5 --><!-- | ||
{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|5|type}} | -->{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|5|type}}<!-- | ||
|Fetch| | -->|Fetch|<!-- | ||
--><!-- | |||
<!-- FETCH TASK Checking --> | --><!-- FETCH TASK Checking --><!-- | ||
{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|5|fetch}} | -->{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|5|fetch}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|5|quantity}} | -->{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|5|quantity}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}} | -->{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}}<!-- | ||
{{#if:{{#var:isItemInArray}} | -->{{#if:{{#var:isItemInArray}}<!-- | ||
|<!--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:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | -->{{#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:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}}) | -->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | ||
-->}}<!-- | |||
--><!-- | |||
}}<!-- | -->}}<!--end is eq: fetch type --><!-- | ||
|}}<!-- end if: is Task N --> | -->|}}<!-- end if: is Task N --><!-- | ||
--><!-- | |||
<!-- | --><!-- Check if Its fetch 6--><!-- | ||
{{#vardefine:cond6|{{#arraysearch:tasks_array|6}}}} | -->{{#vardefine:cond6|{{#arraysearch:tasks_array|6}}}}<!-- | ||
{{#if:cond6 | -->{{#if:cond6<!-- | ||
|<!-- True: Task array has task: 6 --> | -->|<!-- True: Task array has task: 6 --><!-- | ||
{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|6|type}} | -->{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|6|type}}<!-- | ||
|Fetch| | -->|Fetch|<!-- | ||
--><!-- | |||
<!-- FETCH TASK Checking --> | --><!-- FETCH TASK Checking --><!-- | ||
{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|6|fetch}} | -->{{#vardefine:current_item|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|6|fetch}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|6|quantity}} | -->{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|6|quantity}}<!-- | ||
}} | -->}}<!-- | ||
{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}} | -->{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}}<!-- | ||
{{#if:{{#var:isItemInArray}} | -->{{#if:{{#var:isItemInArray}}<!-- | ||
|<!--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:quest_giver{{#var:current_item}}|{{#arrayprint:quest_giver{{#var:current_item}}|,}},{{#var:cur_trader}} (x{{#var:current_quantity}})}} | -->{{#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:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}}) | -->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | ||
-->}}<!-- | |||
--><!-- | |||
}}<!-- | -->}}<!--end is eq: fetch type --><!-- | ||
|}}<!-- end if: is Task N --> | -->|}}<!-- end if: is Task N --><!-- | ||
--><!-- | |||
<!-- | --><!--}}--><!-- | ||
<!-- | --><!--End loop over tasks--><!-- | ||
}} | -->}}<!-- | ||
}} | -->}}<!-- | ||
}} | -->}}<!-- | ||
<!-- Remove first empty element --> | --><!-- Remove first empty element --><!-- | ||
{{#arrayslice:array_item_names|array_item_names|1|9999}} | -->{{#arrayslice:array_item_names|array_item_names|1|9999}}<!-- | ||
<!-- Result Table --><!-- | |||
<!-- Result Table --> | --><table id="SumQuestItemsTable" cellspacing="0" class="wikitable sortable jquery-tablesorter" style="width:70%; color:#eee; background:transparent; text-align:center; vertical-align:middle;"><!-- | ||
<table id="SumQuestItemsTable" cellspacing="0" class="wikitable sortable jquery-tablesorter" style="width:70%; color:#eee; background:transparent; text-align:center; vertical-align:middle;"><!-- | |||
--><tr><!-- | --><tr><!-- | ||
--><th style="width:40%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Item name</th><!-- | --><th style="width:40%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Item name</th><!-- | ||
--><th style="width:15%" class="headerSort" tabindex="1" role="columnheader button" title="Quantity">Quantity</th><!-- | --><th style="width:15%" class="headerSort" tabindex="1" role="columnheader button" title="Quantity">Quantity</th><!-- | ||
--><th style="width:50%" class="headerSort" tabindex="2" role="columnheader button" title="Traders">Traders</th></tr><!-- | --><th style="width:50%" class="headerSort" tabindex="2" role="columnheader button" title="Traders">Traders</th></tr><!-- | ||
-->{{#loop:LoopTest|0|{{#arraysize:array_item_names}} | -->{{#loop:LoopTest|0|{{#arraysize:array_item_names}}<!-- | ||
|<!-- 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:quest_giver{{#var:name}}|, }}</td></tr> | --><tr><td>{{#var:name}}</td><td>{{#var:{{#var:name}}}}</td><td>{{#arrayprint:quest_giver{{#var:name}}|, }}</td></tr><!-- | ||
}}<!-- | -->}}<!-- | ||
--></table><!-- | --></table><!-- | ||
</includeonly> | --></includeonly><!-- | ||
<noinclude> | --><noinclude><!-- | ||
{{Template:SumQuestItems}} | -->{{Template:SumQuestItems}} |