From Dark and Darker Wiki
(Moved code from Template:Quest Items) |
(Added Loot state to quest items) |
||
(3 intermediate revisions by 2 users not shown) | |||
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}}}}<!-- | |||
{{#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 --> | --><!-- 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_lootstate|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|1|lootstate}}<!-- | ||
{{#vardefine: | -->}}<!-- | ||
}} | -->{{#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: | -->}}<!-- | ||
{{# | -->{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}}<!-- | ||
| | -->{{#if:{{#var:isItemInArray}}<!-- | ||
{{# | -->|<!--True--><!-- | ||
{{# | -->{{#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: | -->|<!--False--><!-- | ||
-->{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}}<!-- | |||
{{#arraydefine: | -->{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}}<!-- | ||
-->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | |||
-->}}<!-- | |||
}}<!-- | -->{{#vardefine:quest_lootstate{{#var:current_item}}|{{#var:current_lootstate}}}}<!-- | ||
--><!-- | |||
-->}}<!--end is eq: fetch type --><!-- | |||
-->|}}<!-- end if: is Task N --><!-- | |||
{{#vardefine: | --><!-- | ||
{{# | --><!-- Check if Its fetch 2--><!-- | ||
-->{{#vardefine:cond2|{{#arraysearch:tasks_array|2}}}}<!-- | |||
{{# | -->{{#if:cond2<!-- | ||
-->|<!-- 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}}<!-- | |||
<!-- | -->|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_lootstate|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|2|lootstate}}<!-- | |||
-->}}<!-- | |||
-->{{#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}}}}}}<!-- | ||
{{# | -->{{#if:{{#var:isItemInArray}}<!-- | ||
-->|<!--True--><!-- | |||
-->{{#vardefine:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}}<!-- | |||
{{#vardefine:{{# | -->{{#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}}}}<!-- | |||
-->{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}}<!-- | |||
}}<!-- | -->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | ||
-->}}<!-- | |||
-->{{#vardefine:quest_lootstate{{#var:current_item}}|{{#var:current_lootstate}}}}<!-- | |||
--><!-- | |||
{{# | -->}}<!--end is eq: fetch type --><!-- | ||
{{#if: | -->|}}<!-- end if: is Task N --><!-- | ||
--><!-- | |||
{{# | --><!-- Check if Its fetch 3--><!-- | ||
-->{{#vardefine:cond3|{{#arraysearch:tasks_array|3}}}}<!-- | |||
-->{{#if:cond3<!-- | |||
<!-- | -->|<!-- 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}}<!-- | ||
-->|Fetch|<!-- | |||
{{# | --><!-- | ||
}} | --><!-- FETCH TASK Checking --><!-- | ||
{{#vardefine: | -->{{#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_lootstate|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|3|lootstate}}<!-- | |||
-->}}<!-- | |||
-->{{#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}}}}}}<!-- | |||
-->{{#if:{{#var:isItemInArray}}<!-- | |||
{{# | -->|<!--True--><!-- | ||
{{# | -->{{#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}})}}<!-- | |||
-->|<!--False--><!-- | |||
}}<!-- | -->{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}}<!-- | ||
-->{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}}<!-- | |||
-->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | |||
<!-- | -->}}<!-- | ||
{{#vardefine: | -->{{#vardefine:quest_lootstate{{#var:current_item}}|{{#var:current_lootstate}}}}<!-- | ||
--><!-- | |||
-->}}<!--end is eq: fetch type --><!-- | |||
-->|}}<!-- end if: is Task N --><!-- | |||
--><!-- | |||
--><!-- Check if Its fetch 4--><!-- | |||
<!-- | -->{{#vardefine:cond4|{{#arraysearch:tasks_array|4}}}}<!-- | ||
{{#vardefine: | -->{{#if:cond4<!-- | ||
}} | -->|<!-- True: Task array has task: 4 --><!-- | ||
{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives| | -->{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|4|type}}<!-- | ||
}} | -->|Fetch|<!-- | ||
--><!-- | |||
{{#if:{{#var:isItemInArray}} | --><!-- FETCH TASK Checking --><!-- | ||
|<!--True--> | -->{{#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:{{#var:current_item}}|{{#expr:{{#var:current_quantity}}+{{#var:{{#var:current_item}}}}}}}} | -->{{#vardefine:current_lootstate|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|4|lootstate}}<!-- | ||
{{#arraydefine: | -->}}<!-- | ||
|<!--False--> | -->{{#vardefine:current_quantity|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|4|quantity}}<!-- | ||
{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}} | -->}}<!-- | ||
{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}} | -->{{#vardefine:isItemInArray|{{#arraysearch:array_item_names|{{#var:current_item}}}}}}<!-- | ||
{{#arraydefine: | -->{{#if:{{#var:isItemInArray}}<!-- | ||
-->|<!--True--><!-- | |||
-->{{#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}})}}<!-- | ||
-->|<!--False--><!-- | |||
-->{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}}<!-- | |||
-->{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}}<!-- | |||
{{#vardefine: | -->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | ||
{{# | -->}}<!-- | ||
-->{{#vardefine:quest_lootstate{{#var:current_item}}|{{#var:current_lootstate}}}}<!-- | |||
--><!-- | |||
-->}}<!--end is eq: fetch type --><!-- | |||
-->|}}<!-- end if: is Task N --><!-- | |||
--><!-- | |||
{{# | --><!-- Check if Its fetch 5--><!-- | ||
}} | -->{{#vardefine:cond5|{{#arraysearch:tasks_array|5}}}}<!-- | ||
{{#vardefine: | -->{{#if:cond5<!-- | ||
}} | -->|<!-- True: Task array has task: 5 --><!-- | ||
{{#vardefine: | -->{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|5|type}}<!-- | ||
{{# | -->|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|5|fetch}}}}<!-- | ||
| | -->{{#vardefine:current_lootstate|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|5|lootstate}}<!-- | ||
{{# | -->}}<!-- | ||
{{# | -->{{#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}}}}}}<!-- | ||
-->{{#if:{{#var:isItemInArray}}<!-- | |||
}}<!-- | -->|<!--True--><!-- | ||
-->{{#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}})}}<!-- | |||
-->|<!--False--><!-- | |||
{{# | -->{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}}<!-- | ||
-->{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}}<!-- | |||
| | -->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | ||
{{# | -->}}<!-- | ||
-->{{#vardefine:quest_lootstate{{#var:current_item}}|{{#var:current_lootstate}}}}<!-- | |||
--><!-- | |||
<!-- | -->}}<!--end is eq: fetch type --><!-- | ||
{{#vardefine: | -->|}}<!-- end if: is Task N --><!-- | ||
}} | --><!-- | ||
{{#vardefine: | --><!-- Check if Its fetch 6--><!-- | ||
}} | -->{{#vardefine:cond6|{{#arraysearch:tasks_array|6}}}}<!-- | ||
{{#vardefine: | -->{{#if:cond6<!-- | ||
{{#if: | -->|<!-- True: Task array has task: 6 --><!-- | ||
|<!--True--> | -->{{#ifeq: {{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|6|type}}<!-- | ||
{{# | -->|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|6|fetch}}}}<!-- | ||
{{# | -->{{#vardefine:current_lootstate|{{Merchant Data|{{#arrayindex:traders_arr|{{#var:loopTr}}}}|QuestChapters|{{#arrayindex:chapters_array|{{#var:loopC}}}}|{{#arrayindex:quest_array|{{#var:loopQ}}}}|objectives|6|lootstate}}<!-- | ||
{{# | -->}}<!-- | ||
}} | -->{{#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}}}}}}<!-- | ||
-->{{#if:{{#var:isItemInArray}}<!-- | |||
-->|<!--True--><!-- | |||
-->{{#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}})}}<!-- | |||
}} | -->|<!--False--><!-- | ||
}} | -->{{#arraydefine:array_item_names|{{#arrayprint:array_item_names|,}},{{#var:current_item}}}}<!-- | ||
-->{{#vardefine:{{#var:current_item}}|{{#var:current_quantity}}}}<!-- | |||
-->{{#arraydefine:quest_giver{{#var:current_item}}|{{#var:cur_trader}} (x{{#var:current_quantity}})}}<!-- | |||
{{# | -->}}<!-- | ||
-->{{#vardefine:quest_lootstate{{#var:current_item}}|{{#var:current_lootstate}}}}<!-- | |||
--><!-- | |||
-->}}<!--end is eq: fetch type --><!-- | |||
-->|}}<!-- end if: is Task N --><!-- | |||
--><!-- | |||
--><!--}}--><!-- | |||
--><!--End loop over tasks--><!-- | |||
-->}}<!-- | |||
-->}}<!-- | |||
-->}}<!-- | |||
--><!-- Remove first empty element --><!-- | |||
-->{{#arrayslice:array_item_names|array_item_names|1|9999}}<!-- | |||
<!-- Result Table --><!-- | |||
--><table id="SumQuestItemsTable" cellspacing="0" class="wikitable sortable stripedtable jquery-tablesorter" style="width:70%; border-collapse:collapse; background:transparent; text-align:center"><!-- | |||
--><tr><!-- | --><tr><!-- | ||
--><th style="width: | --><th style="width:35%" class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Item name</th><!-- | ||
--><th style="width: | --><th style="width:10%" class="headerSort" tabindex="1" role="columnheader button" title="Quantity">Quantity</th><!-- | ||
--><th style="width: | --><th style="width:40%" class="headerSort" tabindex="2" role="columnheader button" title="Traders">Traders</th><!-- | ||
-->{{#loop:LoopTest|0|{{#arraysize:array_item_names}} | --><th style="width:20%" class="headerSort" tabindex="3" role="columnheader button" title="Traders">Loot state</th></tr><!-- | ||
|<!-- Loop --> | -->{{#loop:LoopTest|0|{{#arraysize:array_item_names}}<!-- | ||
{{#vardefine:name|{{#arrayindex:array_item_names|{{#var:LoopTest}}}}}} | -->|<!-- Loop --><!-- | ||
<tr><td>{{#var:name}}</td><td>{{#var:{{#var:name}}}}</td><td>{{#arrayprint: | -->{{#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><!-- | ||
--><td>{{#if:{{#var:quest_lootstate{{#var:name}}}}|{{#var:quest_lootstate{{#var:name}}}}|Looted}}</td></tr><!-- | |||
-->}}<!-- | |||
--></table><!-- | --></table><!-- | ||
</includeonly> | --></includeonly><!-- | ||
<noinclude> | --><noinclude><!-- | ||
{{Template:SumQuestItems}} | -->{{Template:SumQuestItems}} |