Difference between revisions of "Template:Merchant"

(special event handling / "opens" and "closes" for more consistent formatting / automatic guild hours / formatting changes)
Line 3: Line 3:
 
}}}}| regional = [[Regional Merchant]]{{#if:{{{2|}}}|<nowiki/>
 
}}}}| regional = [[Regional Merchant]]{{#if:{{{2|}}}|<nowiki/>
 
:''[[{{{2}}}|{{{2}}} region]]''
 
:''[[{{{2}}}|{{{2}}} region]]''
}}| guild = [[{{#switch:{{lc:{{{2|}}}}}|alchemy|alchemist|alchemists' = Alchemists' Guild|bonecraft|boneworker|boneworkers' = Boneworkers' Guild|clothcraft|weaver|weavers' = Weavers' Guild|cooking|culinarian|culinarians' = Culinarians' Guild|fishing|fisherman|fishermen|fishermans' = Fishermans' Guild|goldsmithing|goldsmith|goldsmiths' = Goldsmiths' Guild|leathercraft|tanner|tanners' = Tanner's Guild|smithing|blacksmith|blacksmiths' = Blacksmiths' Guild|woodworking|carpenter|carpenters' = Carpenters' Guild|#default = Guild Merchant}}]]| | unknown | ??? = ''Unknown'' <includeonly>{{Information Needed}}</includeonly>| #default = {{{1}}}}}{{#if:{{{hours|}}}|<nowiki/>
+
}}| guild = [[{{#switch:{{lc:{{{2|}}}}}|alchemy|alchemist|alchemists' = Alchemists' Guild|bonecraft|boneworker|boneworkers' = Boneworkers' Guild|clothcraft|weaver|weavers' = Weavers' Guild|cooking|culinarian|culinarians' = Culinarians' Guild|fishing|fisherman|fishermen|fishermans' = Fishermans' Guild|goldsmithing|goldsmith|goldsmiths' = Goldsmiths' Guild|leathercraft|tanner|tanners' = Tanner's Guild|smithing|blacksmith|blacksmiths' = Blacksmiths' Guild|woodworking|carpenter|carpenters' = Carpenters' Guild|#default = Guild Merchant}}]]|special event = [[Special Event|Special Event Merchant]]{{#if:{{{2|}}}|<nowiki/>
'''Open {{{hours}}}'''
+
:''Only available during the [[{{{2|}}}]] event.''
}}{{#if:{{{holiday|}}}|<nowiki/>
+
}}| | unknown | ??? = ''Unknown'' <includeonly>{{Information Needed}}</includeonly>| #default = {{{1}}}}}{{#if:{{{opens|}}}{{{closes|}}}|<nowiki/>
''Guilds are no longer closed on certain days.''
+
:''Open {{#if:{{{opens|}}}|{{#iferror:{{#time:G:i|{{{opens}}}}}|{{#time:G:i|{{{opens}}}:00}}|{{#time:G:i|{{{opens}}}}}}}|???<includeonly>{{Information Needed}}</includeonly>}} - {{#if:{{{closes|}}}|{{#iferror:{{#time:G:i|{{{closes}}}}}|{{#time:G:i|{{{closes}}}:00}}|{{#time:G:i|{{{closes}}}}}}}|???<includeonly>{{Information Needed}}</includeonly>}}''
 +
|{{#if:{{{hours|}}}{{#if:{{{2|}}}|{{#ifeq:{{lc:{{{1|}}}}}|guild|1}}}}|<nowiki/>
 +
:''Open {{#if:{{{hours|}}}|{{{hours}}}|{{#switch:{{lc:{{{2|}}}}}|alchemy|alchemist|alchemists' = 8:00 - 23:00|bonecraft|boneworker|boneworkers' = 8:00 - 23:00|clothcraft|weaver|weavers' = 6:00 - 21:00|cooking|culinarian|culinarians' = 5:00 - 20:00|fishing|fisherman|fishermen|fishermans' = 3:00 - 18:00|goldsmithing|goldsmith|goldsmiths' = 8:00 - 23:00|leathercraft|tanner|tanners' = 3:00 - 18:00|smithing|blacksmith|blacksmiths' = 8:00 - 23:00|woodworking|carpenter|carpenters' = 6:00 - 21:00}}}}''
 +
}}}}{{#if:{{{holiday|}}}|{{#switch:{{lc:{{{1|}}}}}|guild = <!--Guilds are no longer closed on certain days.-->|#default = <nowiki/>
 +
:''Closed {{#switch:{{lc:{{{holiday|}}}}}|firesday = {{Colorlink|Fire|Firesday}}|earthsday = {{Colorlink|Earth|Earthsday}}|watersday = {{Colorlink|Water|Watersday}}|windsday = {{Colorlink|Wind|Windsday}}|iceday = {{Colorlink|Ice|Iceday}}|lightningsday = {{Colorlink|Lightning|Lightningsday}}|lightsday = {{Colorlink|Light|Lightsday}}|darksday = {{Colorlink|Dark|Darksday}}|#default = {{{holiday}}}}}.''}}
 
}}{{#switch:{{lc:{{{restocked|}}}}}|true|yes|false|no = <nowiki/>
 
}}{{#switch:{{lc:{{{restocked|}}}}}|true|yes|false|no = <nowiki/>
''{{#switch:{{lc:{{{restocked|}}}}}|true|yes = Automatically restocked.|false|yes|no = Not automatically restocked.}}''
+
:''{{#switch:{{lc:{{{restocked|}}}}}|true|yes = Automatically restocked.|false|yes|no = Not automatically restocked.}}''
 
}}{{#if:{{{note|}}}|<nowiki/>
 
}}{{#if:{{{note|}}}|<nowiki/>
''{{{note}}}''
+
:''{{{note}}}''
}}<noinclude>
+
}}<noinclude>[[Category:Templates|{{PAGENAME}}]]
 
==Usage==
 
==Usage==
 
<pre>
 
<pre>
{{Merchant|<merchant type>|<region/guild>}}
+
{{Merchant|<merchant type>|<region/guild/special event>}}
 
</pre>
 
</pre>
*The first parameter ("merchant type") will be automatically formatted for "standard", "regional", and "guild".
+
*The first parameter ("merchant type") will be automatically formatted for "standard", "regional", "guild", and "special event".
*The second parameter ("region/guild") is only used for regional and guild merchants.
+
*The second parameter ("region/guild/special event") is only used for regional, guild, and special event merchants (see examples below).
 
*The following parameters can also be used, but are optional:
 
*The following parameters can also be used, but are optional:
 
:*'''nation''', '''conquest:''' The nation and conquest standing required for this merchant to sell the item. (standard merchant only)
 
:*'''nation''', '''conquest:''' The nation and conquest standing required for this merchant to sell the item. (standard merchant only)
:*'''hours:''' The hours this shop is open.
+
:*'''opens''', '''closes:''' The time this shop opens and closes.
 
:*'''holiday:''' The day or days that this shop is closed.
 
:*'''holiday:''' The day or days that this shop is closed.
 
:*'''restocked:''' "true"/"yes" if this item will be automatically restocked every day or "false"/"no" if it is only stocked by players selling items to the merchants. Only use this parameter if the merchant has limited stock, like a guild.
 
:*'''restocked:''' "true"/"yes" if this item will be automatically restocked every day or "false"/"no" if it is only stocked by players selling items to the merchants. Only use this parameter if the merchant has limited stock, like a guild.
Line 53: Line 57:
 
| {{Merchant|Guild|Alchemists'}}
 
| {{Merchant|Guild|Alchemists'}}
 
|-
 
|-
| <code><nowiki>{{Merchant|Guild|Weavers'|hours = 6:00 - 21:00</nowiki><br><nowiki>|holiday = Firesday|restocked = true}}</nowiki></code>
+
| <code><nowiki>{{Merchant|Guild|Fishing|opens = 1:00|closes = 18:00</nowiki><br><nowiki>|holiday = Lightsday|restocked = true}}</nowiki></code>
| {{Merchant|Guild|Weavers'|hours = 6:00 - 21:00|holiday = Firesday|restocked = true}}
+
| {{Merchant|Guild|Fishing|opens = 1:00|closes = 18:00|holiday = Lightsday|restocked = true}}
 
|-
 
|-
| <code><nowiki>{{Merchant|[[Starlight Celebration|Special Event Merchant]]}}</nowiki></code>
+
| <code><nowiki>{{Merchant|Special Event}}</nowiki></code>
| {{Merchant|[[Starlight Celebration|Special Event Merchant]]}}
+
| {{Merchant|Special Event}}
 
|-
 
|-
| <code><nowiki>{{Merchant|[[Starlight Celebration|Special Event Merchant]]</nowiki><br><nowiki>|note = Only available during the Starlight Celebration event.}}</nowiki></code>
+
| <code><nowiki>{{Merchant|Special Event|Starlight Celebration}}</nowiki></code>
| {{Merchant|[[Starlight Celebration|Special Event Merchant]]|note = Only available during the Starlight Celebration event.}}
+
| {{Merchant|Special Event|Starlight Celebration}}
 +
|-
 +
| <code><nowiki>{{Merchant|[[Buffalo Ranch Merchant]]}}</nowiki></code>
 +
| {{Merchant|[[Buffalo Ranch Merchant]]}}
 +
|-
 +
| <code><nowiki>{{Merchant|[[Buffalo Ranch Merchant]]|note = Tier III stock.}}</nowiki></code>
 +
| {{Merchant|[[Buffalo Ranch Merchant]]|note = Tier III stock.}}
 
|}
 
|}
 
</noinclude>
 
</noinclude>

Revision as of 16:46, 5 April 2015

Unknown

Usage

{{Merchant|<merchant type>|<region/guild/special event>}}
  • The first parameter ("merchant type") will be automatically formatted for "standard", "regional", "guild", and "special event".
  • The second parameter ("region/guild/special event") is only used for regional, guild, and special event merchants (see examples below).
  • The following parameters can also be used, but are optional:
  • nation, conquest: The nation and conquest standing required for this merchant to sell the item. (standard merchant only)
  • opens, closes: The time this shop opens and closes.
  • holiday: The day or days that this shop is closed.
  • restocked: "true"/"yes" if this item will be automatically restocked every day or "false"/"no" if it is only stocked by players selling items to the merchants. Only use this parameter if the merchant has limited stock, like a guild.
  • note: Any additional note for the merchant.

Examples

Code Result
{{Merchant|Standard}} Standard Merchant
{{Merchant|Standard|nation = San d'Oria|conquest = 1st}} Standard Merchant
San d'Oria Conquest: 1st - citizens only
{{Merchant|Standard|nation = Windurst|conquest = 2nd}} Standard Merchant
Windurst Conquest: 1st / 2nd
{{Merchant|Regional}} Regional Merchant
{{Merchant|Regional|Zulkheim}} Regional Merchant
Zulkheim region
{{Merchant|Guild}} Guild Merchant
{{Merchant|Guild|Alchemy}} Alchemists' Guild
Open 8:00 - 23:00
{{Merchant|Guild|Alchemists'}} Alchemists' Guild
Open 8:00 - 23:00
{{Merchant|Guild|Fishing|opens = 1:00|closes = 18:00
|holiday = Lightsday|restocked = true}}
Fishermans' Guild
Open 1:00 - 18:00
Automatically restocked.
{{Merchant|Special Event}} Special Event Merchant
{{Merchant|Special Event|Starlight Celebration}} Special Event Merchant
Only available during the Starlight Celebration event.
{{Merchant|[[Buffalo Ranch Merchant]]}} Buffalo Ranch Merchant
{{Merchant|[[Buffalo Ranch Merchant]]|note = Tier III stock.}} Buffalo Ranch Merchant
Tier III stock.