Difference between revisions of "Quest table body"

m
m
Line 3: Line 3:
 
-->|@ <!-- item quantity
 
-->|@ <!-- item quantity
 
-->{{#vardefine:reward name|{{#arrayindex:reward names|{{#expr:{{#var:index}}+1}}}}}}<!-- get reward name at index
 
-->{{#vardefine:reward name|{{#arrayindex:reward names|{{#expr:{{#var:index}}+1}}}}}}<!-- get reward name at index
-->{{#ifeq:{{#var:reward name}}|Experience|{{#explode:@| |0}} {{icon|Experience Icon.png|Experience}}<!-- if experience
+
-->{{#ifeq:{{#var:reward name}}|Experience|{{icon|Experience Icon.png|Experience}}<!-- if experience
-->|{{#ifeq:{{#var:reward name}}|Gold|{{#explode:@| |0}} {{icon|Gold Icon.png|Gold}}<!-- if gold
+
-->|{{#ifeq:{{#var:reward name}}|Gold|{{icon|Gold Icon.png|Gold}}<!-- if gold
 
-->|{{item<!-- create item
 
-->|{{item<!-- create item
 
-->|{{#var:reward name}}<!-- item name
 
-->|{{#var:reward name}}<!-- item name

Revision as of 21:42, 16 February 2024

Description

Creates a recipe table using the parameters provided in the original inline query. Used in conjunction with Quest table header.

Usage

e.g. To display the quests that give 'Campfire' as a reward:

{{#ask: [[Has reward::?;Campfire]]
|?Has quest giver
|?Has reward|+index=2
|?Has reward|+index=3
|?Has reward|+index=4
|format=template
|introtemplate=quest table header
|template=quest table body
|outrotemplate=table footer
}}

Parameters

Arrow.png1: The page to query.
Required.
Arrow.png2: The quest giver.
Required.
Arrow.png3: A comma-separated list of quest reward quantities.
Required.
Arrow.png4: A comma-separated list of quest reward names.
Required.
Arrow.png5: A comma-separated list of quest reward qualities.
Required.