User:Relyk/SMW/storyreward

From Guild Wars 2 Wiki
Jump to navigationJump to search
<onlyinclude>:{{experience|{{{experience|0}}}}}
{{#if:{{{coin|}}}|:{{coin|{{{coin}}}}}}}
{{#arraymap:{{{reward|}}}|,|@@@|* @@@|\n}}
{{#if:{{{choice|}}}|* One of the following: {{#arraymap:{{{choice}}}|,|@@@|[[@@@]]}}}}
{{#arraymap:guardian,warrior,ranger,engineer,thief,elementalist,necromancer,mesmer|,|@@@|
{{#if:{{{@@@|}}} | 
  {{#ifeq: {{{@@@|}}}  | {{#var:previous_reward}}
  | {{profession|@@@}}
  | One of the following: {{#var:previous_reward}}
: {{profession|@@@}} {{#vardefine:previous_reward|{{{@@@}}}}} 
  }}
}}| }} {{#varexists:previous_reward|One of the following: {{#var:previous_reward}}}}
{{#subobject:story_reward
|Rewards coin amount={{{coin|0}}}
|Has story reward={{{choice|}}}|+sep=,
|Has item choice for guardian={{{guardian|}}}|+sep=,
|Has item choice for revenant={{{revenant|}}}|+sep=,
|Has item choice for warrior={{{warrior|}}}|+sep=,
|Has item choice for ranger={{{ranger|}}}|+sep=,
|Has item choice for engineer={{{engineer|}}}|+sep=,
|Has item choice for thief={{{thief|}}}|+sep=,
|Has item choice for elementalist={{{elementalist|}}}|+sep=,
|Has item choice for necromancer={{{necromancer|}}}|+sep=,
|Has item choice for mesmer={{{mesmer|}}}|+sep=,
}}</onlyinclude>

== Test ==
{{{{FULLPAGENAME}}
|experience=1000
|coin=50
|reward=Copper Ore,Iron Ore
|choice= Commando's Chausses, Outrider's Chausses, Trooper's Chausses
}}

----
{{{{FULLPAGENAME}}
|experience=1000
|coin=50
|reward=Copper Ore,Iron Ore
|choice= Commando's Chausses, Outrider's Chausses, Trooper's Chausses
|guardian=Kraitkin
|elementalist=Howler
}}
----
{{{{FULLPAGENAME}}
|experience=1000
|coin=50
|reward=Copper Ore,Iron Ore
|choice= Commando's Chausses, Outrider's Chausses, Trooper's Chausses
|guardian=Kraitkin
|elementalist=Howler
|engineer=Howler
}}