Editing Quest info
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 48: | Line 48: | ||
{{#if:{{{rewards|}}}|{{InfoboxRow|'''Rewards'''|<!-- rewards row | {{#if:{{{rewards|}}}|{{InfoboxRow|'''Rewards'''|<!-- rewards row | ||
-->{{#arrayprint:rewards|<br><!-- print rewards array, separated by line breaks | -->{{#arrayprint:rewards|<br><!-- print rewards array, separated by line breaks | ||
− | -->|@|{{ | + | -->|@|{{#vardefine:name|{{#explode:{{#sub:@|{{#pos:@| }}}}|#|0}}}}<!-- get name |
− | --> | + | -->{{#ifeq:{{lc:{{#var:name}}}}|experience|{{#explode:@| |0}} {{icon|Experience Icon.png|Experience}}<!-- if experience |
− | -->|{{#explode:@| |0}}<!-- | + | -->|{{#ifeq:{{lc:{{#var:name}}}}|gold|{{#explode:@| |0}} {{icon|Gold Icon.png|Gold}}<!-- if gold |
− | -->|{{#if:{{#explode:@|#|1}}|{{#explode:@|#|1}}}}<!-- | + | -->|{{#ifeq:{{lc:{{#var:name}}}}|item choice|<span class="quality-common">[[File:Item Choice.png|25px]]</span><!-- if item choice |
− | -->}}}}}}}} | + | -->|{{#explode:@| |0}} <!-- item quantity |
+ | -->{{item<!-- create an item | ||
+ | -->|{{#var:name}}<!-- item name | ||
+ | -->|quality={{#if:{{#explode:@|#|1}}<!-- if quality is specified | ||
+ | -->|{{#explode:@|#|1}}}}}}<!-- use specified quality | ||
+ | -->}}}}}}}}}}}} | ||
|}</div><!-- | |}</div><!-- | ||
DESCRIPTION | DESCRIPTION | ||
Line 59: | Line 64: | ||
-->{{#if:{{{name|}}}{{NAMESPACE}}|<!-- if there is a name parameter or namespace don't set any properties | -->{{#if:{{{name|}}}{{NAMESPACE}}|<!-- if there is a name parameter or namespace don't set any properties | ||
-->|{{#if:{{{quest giver|}}}|{{#set:Has quest giver={{{quest giver}}}}}}}<!-- set 'Has quest giver' property | -->|{{#if:{{{quest giver|}}}|{{#set:Has quest giver={{{quest giver}}}}}}}<!-- set 'Has quest giver' property | ||
+ | |||
+ | rewards | ||
+ | -->{{#arrayprint:rewards||@|<!-- for all rewards | ||
+ | -->{{#ifeq:{{lc:@}}|item choice||<!-- if item choice do nothing | ||
+ | -->{{#set:Has reward=<!-- set 'Has reward' property | ||
+ | -->{{#vardefineecho:index|{{#expr:{{#var:index|0}}+1}}}}<!-- recursively define reward index | ||
+ | -->;{{#explode:@| |0}}<!-- set reward quantity | ||
+ | -->;{{#explode:{{#sub:@|{{#pos:@| }}}}|#|0}}<!-- set reward name | ||
+ | -->;{{#explode:@|#|1}}}}}}}}<!-- set reward quality | ||
-->{{#if:{{{previous|}}}|{{#set:Has previous={{{previous}}}}}}}<!-- set 'Has previous' property | -->{{#if:{{{previous|}}}|{{#set:Has previous={{{previous}}}}}}}<!-- set 'Has previous' property | ||
-->}}</includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude> | -->}}</includeonly><noinclude>{{{{PAGENAME}}/Documentation}}</noinclude> |