Template:SoundEffect: Difference between revisions

From A KoL Wiki
imported>Wrldwzrd89
m Silly template syntax isn't intuitive
imported>Wrldwzrd89
Enhancing template to handle cold
Line 1: Line 1:
<includeonly>{{#ifeq: {{{type}}}|player|'''<span style="color:blue">{{{sound}}}</span>'''|'''<span style="color:red">{{{sound}}}</span>'''}}</includeonly><noinclude>
<includeonly>{{#ifeq: {{{type}}}|player|'''<span style="color:blue">{{{sound}}}</span>'''|{{#ifeq: {{{type}}}|cold|'''<span style="color:blue">{{#switch:{{{num}}}|1=Brr.|2=Brrrr.|3=Brrrrrr.|4=Brrrrrrrr.|5=Brrrrrrrrrr.|6=Brrrrrrrrrrrr.|7=Brrrrrrrrrrrrrr.|8=Brrrrrrrrrrrrrrrr.|9=Brrrrrrrrrrrrrrrrrr.|10=Brrrrrrrrrrrrrrrrrrrr.}}</span>'''|'''<span style="color:red">{{{sound}}}</span>'''}}}}</includeonly><noinclude>
{{Code2}}
{{Code2}}
This template should be used on the [[Sound Effects]] page and any other page that includes a custom sound effect.
This template should be used on the [[Sound Effects]] page and any other page that includes a custom sound effect.
Line 13: Line 13:
appears as
appears as
:{{SoundEffect|sound=Eek!}}
:{{SoundEffect|sound=Eek!}}
----
:<nowiki>{{SoundEffect|type=cold|num=1}}</nowiki>
appears as
:{{SoundEffect|type=cold|num=1}}
----
:<nowiki>{{SoundEffect|type=cold|num=5}}</nowiki>
appears as
:{{SoundEffect|type=cold|num=5}}
----


:<nowiki>{{SoundEffect|type=cold|num=10}}</nowiki>
appears as
:{{SoundEffect|type=cold|num=10}}
[[Category:Standardization Templates]]</noinclude>
[[Category:Standardization Templates]]</noinclude>

Revision as of 01:21, 15 February 2012

{{#ifeq: {{{type}}}|player|'''<span style="color:blue">{{{sound}}}</span>'''|{{#ifeq: {{{type}}}|cold|'''<span style="color:blue">{{#switch:{{{num}}}|1=Brr.|2=Brrrr.|3=Brrrrrr.|4=Brrrrrrrr.|5=Brrrrrrrrrr.|6=Brrrrrrrrrrrr.|7=Brrrrrrrrrrrrrr.|8=Brrrrrrrrrrrrrrrr.|9=Brrrrrrrrrrrrrrrrrr.|10=Brrrrrrrrrrrrrrrrrrrr.}}</span>'''|'''<span style="color:red">{{{sound}}}</span>'''}}}}

This template should be used on the Sound Effects page and any other page that includes a custom sound effect.

Usage

{{SoundEffect|type=player|sound=BAM!}}

appears as

BAM!

{{SoundEffect|sound=Eek!}}

appears as

Eek!

{{SoundEffect|type=cold|num=1}}

appears as

Brr.

{{SoundEffect|type=cold|num=5}}

appears as

Brrrrrrrrrr.

{{SoundEffect|type=cold|num=10}}

appears as

Brrrrrrrrrrrrrrrrrrrr.