<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://secrets.warcraftwatch.com/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ACoppercost%2Fdoc</id>
	<title>Template:Coppercost/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://secrets.warcraftwatch.com/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ACoppercost%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://secrets.warcraftwatch.com/w/index.php?title=Template:Coppercost/doc&amp;action=history"/>
	<updated>2026-05-06T21:16:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://secrets.warcraftwatch.com/w/index.php?title=Template:Coppercost/doc&amp;diff=1120&amp;oldid=prev</id>
		<title>imported&gt;Surafbrov at 13:02, 30 July 2021</title>
		<link rel="alternate" type="text/html" href="https://secrets.warcraftwatch.com/w/index.php?title=Template:Coppercost/doc&amp;diff=1120&amp;oldid=prev"/>
		<updated>2021-07-30T13:02:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This template takes a money value as one parameter, representing the value in copper, and calls the {{[[Template:Cost|Cost]]}} template to show the amount as gold, silver and copper.&lt;br /&gt;
&lt;br /&gt;
Useful to represent amounts of money which are calculated, e.g. with the parserfunction &amp;#039;&amp;#039;&amp;#039;#expr:&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The inverse of this template is {{t|costcopper}}, most commonly referenced using its {{t|sell}} alias.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{t|Coppercost|amount}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;amount&amp;#039;&amp;#039; is an amount of money, expressed as the number of copper coins. Gold, silver or copper coin numbers are only shown if they are not zero.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;amount&amp;#039;&amp;#039; is zero, the result is {{Cost|0}}.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
{| class=&amp;quot;darktable&amp;quot;&lt;br /&gt;
! Amount !! Coppercost&lt;br /&gt;
|- align=&amp;quot;right&amp;quot;&lt;br /&gt;
| 1234567 || {{coppercost|1234567}}&lt;br /&gt;
|- align=&amp;quot;right&amp;quot;&lt;br /&gt;
| 123456 || {{coppercost|123456}}&lt;br /&gt;
|- align=&amp;quot;right&amp;quot;&lt;br /&gt;
| 3456 || {{coppercost|3456}}&lt;br /&gt;
|- align=&amp;quot;right&amp;quot;&lt;br /&gt;
| 56 || {{coppercost|56}}&lt;br /&gt;
|- align=&amp;quot;right&amp;quot;&lt;br /&gt;
| 200 || {{coppercost|200}}&lt;br /&gt;
|- align=&amp;quot;right&amp;quot;&lt;br /&gt;
| 30000 || {{coppercost|30000}}&lt;br /&gt;
|- align=&amp;quot;right&amp;quot;&lt;br /&gt;
| 40056 || {{coppercost|40056}}&lt;br /&gt;
|- align=&amp;quot;right&amp;quot;&lt;br /&gt;
| 0 || {{coppercost|0}}&lt;br /&gt;
|- align=&amp;quot;right&amp;quot;&lt;br /&gt;
| &amp;amp;lt;empty&amp;amp;gt; || {{ coppercost }}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Source code explained==&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 1 {{Cost&lt;br /&gt;
 2 |g= {{ #if: {{{1|}}}&lt;br /&gt;
 3        | {{ #ifexpr: {{{1}}}=0 or {{{1}}}&amp;gt;=10000&lt;br /&gt;
 4             | {{ #expr: floor( {{{1|0}}} / 10000 ) }}&lt;br /&gt;
 5          }}&lt;br /&gt;
 6     }}&lt;br /&gt;
 7 |s= {{ #ifexpr: &lt;br /&gt;
 8         {{ #expr: floor( ({{{1|0}}} mod 10000) / 100 ) }} &amp;gt; 0&lt;br /&gt;
 9     | {{ #expr: floor( ({{{1|0}}}  mod 10000) /100) }}&lt;br /&gt;
10     }}&lt;br /&gt;
11 |c= {{ #ifexpr:&lt;br /&gt;
12         {{ #expr: ({{{1|0}}} mod 100) }} &amp;gt; 0&lt;br /&gt;
13     | {{ #expr: {{{1|0}}} mod 100) }}&lt;br /&gt;
14     }}&lt;br /&gt;
15 }}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Call the {{[[Template:Cost|Cost]]}} template.&lt;br /&gt;
#Start the gold parameter. Only fill in if there is a valid &amp;#039;&amp;#039;amount&amp;#039;&amp;#039; parameter.&lt;br /&gt;
#Test if the &amp;#039;&amp;#039;amount&amp;#039;&amp;#039; is equal to zero or is big enough to get gold (100*100=10000 copper per gold).&lt;br /&gt;
#If so, then put the value in: &amp;#039;&amp;#039;amount&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;div&amp;#039;&amp;#039;&amp;#039; 10000. Note: the &amp;#039;&amp;#039;&amp;#039;div&amp;#039;&amp;#039;&amp;#039; operator does not appear to do what it says on the tin, so we have to make do with a normal division rounded down.&lt;br /&gt;
#Close the &amp;#039;&amp;#039;&amp;#039;#ifexpr&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#Close the &amp;#039;&amp;#039;&amp;#039;#if&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#Start the silver parameter. Only show if the amount of silver is more than zero.&lt;br /&gt;
#The expression calculates the amount (0-99) of silver coins. It is essentially is ( &amp;#039;&amp;#039;amount&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;mod&amp;#039;&amp;#039;&amp;#039; 10000) &amp;#039;&amp;#039;&amp;#039;div&amp;#039;&amp;#039;&amp;#039; 100.&lt;br /&gt;
#&amp;#039;&amp;#039;True&amp;#039;&amp;#039; clause of the &amp;#039;&amp;#039;&amp;#039;#ifexpr&amp;#039;&amp;#039;&amp;#039;. Fill in the silver amount. The expression is the same as the one on the previous line.&lt;br /&gt;
#Close the &amp;#039;&amp;#039;&amp;#039;#ifexpr&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#Start the copper parameter. Only show if the amount of copper is more than zero.&lt;br /&gt;
#The expression calculates the amount (0-99) of copper coins, &amp;#039;&amp;#039;amount&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;mod&amp;#039;&amp;#039;&amp;#039; 100.&lt;br /&gt;
#&amp;#039;&amp;#039;True&amp;#039;&amp;#039; clause of the &amp;#039;&amp;#039;&amp;#039;#ifexpr&amp;#039;&amp;#039;&amp;#039;. Fill in the copper amount. This is the same expression as on the previous line.&lt;br /&gt;
#Close the &amp;#039;&amp;#039;&amp;#039;#ifexpr&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
#Close the Cost template&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;[[Category:WoW currency templates|coppercost]]&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Template documentation|coppercost]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Surafbrov</name></author>
	</entry>
</feed>