<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.roatpkz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ACurrencies</id>
	<title>Module:Currencies - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.roatpkz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ACurrencies"/>
	<link rel="alternate" type="text/html" href="https://wiki.roatpkz.com/index.php?title=Module:Currencies&amp;action=history"/>
	<updated>2026-04-28T17:57:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.roatpkz.com/index.php?title=Module:Currencies&amp;diff=288&amp;oldid=prev</id>
		<title>Hefner: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.roatpkz.com/index.php?title=Module:Currencies&amp;diff=288&amp;oldid=prev"/>
		<updated>2024-03-23T19:30:07Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:30, 23 March 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Hefner</name></author>
	</entry>
	<entry>
		<id>https://wiki.roatpkz.com/index.php?title=Module:Currencies&amp;diff=287&amp;oldid=prev</id>
		<title>Armadyl Godsword&gt;Towelcat: white-space:nowrap;</title>
		<link rel="alternate" type="text/html" href="https://wiki.roatpkz.com/index.php?title=Module:Currencies&amp;diff=287&amp;oldid=prev"/>
		<updated>2020-06-07T00:24:30Z</updated>

		<summary type="html">&lt;p&gt;white-space:nowrap;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- &amp;lt;pre&amp;gt;&lt;br /&gt;
-- Implements {{Currency}}&lt;br /&gt;
-- Variant of Module:Coins to support other currency types&lt;br /&gt;
-- Original source: http://oldschool.runescape.wiki/w/Module:Coins?action=history&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local currency_image = require(&amp;quot;Module:Currency Image&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
local function amount(a,currency)&lt;br /&gt;
	-- convert used globals to locals where possible to improve performance&lt;br /&gt;
	local math = math&lt;br /&gt;
	local string = string&lt;br /&gt;
	local table = table&lt;br /&gt;
	local mw = mw&lt;br /&gt;
        local expr = mw.ext.ParserFunctions.expr&lt;br /&gt;
&lt;br /&gt;
	local ret = {&amp;#039;&amp;lt;span class=&amp;quot;coins&amp;#039;, true, true, true, &amp;#039;&amp;lt;/span&amp;gt;&amp;#039;}&lt;br /&gt;
&lt;br /&gt;
	-- strip commas from input&lt;br /&gt;
	-- @example {{GEPrice|Foo}} -&amp;gt; &amp;#039;1,000&amp;#039;&lt;br /&gt;
	a = string.gsub(a, &amp;#039;,&amp;#039;, &amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
	-- for performance reasons, only calculate expr if required&lt;br /&gt;
	local a2 = tonumber(a)&lt;br /&gt;
	if a2 == nil then&lt;br /&gt;
		a = expr(a)&lt;br /&gt;
		a2 = tonumber(a) or 0&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- round to 2 d.p.&lt;br /&gt;
	a = math.floor(a2 * 100 + 0.5) / 100&lt;br /&gt;
&lt;br /&gt;
	local num = math.abs(a)&lt;br /&gt;
&lt;br /&gt;
	-- set a class to denote positive or negative (css sets the colour)&lt;br /&gt;
	if a &amp;gt; 0 then&lt;br /&gt;
		ret[2] = &amp;#039; coins-pos&amp;quot;&amp;#039;&lt;br /&gt;
	elseif a &amp;lt; 0 then&lt;br /&gt;
		ret[2] = &amp;#039; coins-neg&amp;quot;&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		ret[2] = &amp;#039;&amp;quot;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	ret[2] = ret[2] .. &amp;#039; data-sort-value=&amp;quot;&amp;#039; .. a .. &amp;#039;&amp;quot; style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	local currencyImage = currency_image(currency, num) or &amp;#039;&amp;#039;&lt;br /&gt;
	if not (currencyImage==&amp;#039;&amp;#039;) then&lt;br /&gt;
	    currencyImage = string.format(&amp;#039;[[File:%s|link=%s]] &amp;#039;, currencyImage, currency)&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
	ret[3] = tostring(currencyImage)&lt;br /&gt;
&lt;br /&gt;
	-- format number with commas&lt;br /&gt;
	ret[4] = mw.language.getContentLanguage():formatNum(a)&lt;br /&gt;
&lt;br /&gt;
	return table.concat( ret )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
-- {{Currency}} access point&lt;br /&gt;
--&lt;br /&gt;
function p.amount(frame)&lt;br /&gt;
	local args = frame:getParent().args&lt;br /&gt;
	local value = args[2] or &amp;#039;0&amp;#039;&lt;br /&gt;
	local currency = args[1] or &amp;#039;Coins&amp;#039;&lt;br /&gt;
	return amount(value, currency)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
-- Module access point&lt;br /&gt;
--&lt;br /&gt;
function p._amount(a, b)&lt;br /&gt;
	local value = tostring(a) or &amp;#039;0&amp;#039;&lt;br /&gt;
	local currency = b or &amp;#039;Coins&amp;#039;&lt;br /&gt;
	return amount(value, currency)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Armadyl Godsword&gt;Towelcat</name></author>
	</entry>
</feed>