<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://addonstudio.org/mw1/index.php?action=history&amp;feed=atom&amp;title=WoW%3AUSERAPI_PLAYER_MONEY</id>
	<title>WoW:USERAPI PLAYER MONEY - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://addonstudio.org/mw1/index.php?action=history&amp;feed=atom&amp;title=WoW%3AUSERAPI_PLAYER_MONEY"/>
	<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_PLAYER_MONEY&amp;action=history"/>
	<updated>2026-05-22T13:55:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_PLAYER_MONEY&amp;diff=20559&amp;oldid=prev</id>
		<title>Move page script: Move page script moved page USERAPI PLAYER MONEY to WoW:USERAPI PLAYER MONEY without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_PLAYER_MONEY&amp;diff=20559&amp;oldid=prev"/>
		<updated>2023-08-15T04:49:13Z</updated>

		<summary type="html">&lt;p&gt;Move page script moved page &lt;a href=&quot;/wiki/WoW:USERAPI_PLAYER_MONEY&quot; title=&quot;WoW:USERAPI PLAYER MONEY&quot;&gt;USERAPI PLAYER MONEY&lt;/a&gt; to &lt;a href=&quot;/wiki/WoW:USERAPI_PLAYER_MONEY&quot; title=&quot;WoW:USERAPI PLAYER MONEY&quot;&gt;USERAPI PLAYER MONEY&lt;/a&gt; without leaving a redirect&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 04:49, 15 August 2023&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>Move page script</name></author>
	</entry>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_PLAYER_MONEY&amp;diff=20558&amp;oldid=prev</id>
		<title>Bear: Celess22 moved page User:Egingell/PLAYER MONEY to User:USEREVENT PLAYER MONEY</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_PLAYER_MONEY&amp;diff=20558&amp;oldid=prev"/>
		<updated>2013-09-21T02:29:03Z</updated>

		<summary type="html">&lt;p&gt;Celess22 moved page &lt;a href=&quot;/mw1/index.php?title=User:Egingell/PLAYER_MONEY&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:Egingell/PLAYER MONEY (page does not exist)&quot;&gt;User:Egingell/PLAYER MONEY&lt;/a&gt; to &lt;a href=&quot;/mw1/index.php?title=User:USEREVENT_PLAYER_MONEY&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:USEREVENT PLAYER MONEY (page does not exist)&quot;&gt;User:USEREVENT PLAYER MONEY&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{userfunc}} &amp;lt;!-- Leave this line in! --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Output when you gain or lose money and the amount to the chat frame.&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
 local function FormatMoney(money)&lt;br /&gt;
     local ret = &amp;quot;&amp;quot;&lt;br /&gt;
     local gold = floor(money / (COPPER_PER_SILVER * SILVER_PER_GOLD));&lt;br /&gt;
     local silver = floor((money - (gold * COPPER_PER_SILVER * SILVER_PER_GOLD)) / COPPER_PER_SILVER);&lt;br /&gt;
     local copper = mod(money, COPPER_PER_SILVER);&lt;br /&gt;
     if gold &amp;gt; 0 then&lt;br /&gt;
         ret = gold .. &amp;quot; gold &amp;quot;&lt;br /&gt;
     end&lt;br /&gt;
     if silver &amp;gt; 0 or gold &amp;gt; 0 then&lt;br /&gt;
         ret = ret .. silver .. &amp;quot; silver &amp;quot;&lt;br /&gt;
     end&lt;br /&gt;
     ret = ret .. copper .. &amp;quot; copper&amp;quot;&lt;br /&gt;
     return ret&lt;br /&gt;
 end&lt;br /&gt;
 &lt;br /&gt;
 local frame = CreateFrame(&amp;quot;Frame&amp;quot;)&lt;br /&gt;
 frame:RegisterEvent(&amp;quot;PLAYER_MONEY&amp;quot;)&lt;br /&gt;
 frame:RegisterEvent(&amp;quot;PLAYER_ENTERING_WORLD&amp;quot;)&lt;br /&gt;
 frame:SetScript(&amp;quot;OnEvent&amp;quot;, function(self, event, ...)&lt;br /&gt;
     local tmpMoney = GetMoney()&lt;br /&gt;
     if self.CurrentMoney then&lt;br /&gt;
         self.DiffMoney = tmpMoney - self.CurrentMoney&lt;br /&gt;
     else&lt;br /&gt;
         self.DiffMoney = 0&lt;br /&gt;
     end&lt;br /&gt;
     self.CurrentMoney = tmpMoney&lt;br /&gt;
     if self.DiffMoney &amp;gt; 0 then&lt;br /&gt;
         ChatFrame1:AddMessage(&amp;quot;You gained&amp;quot; .. FormatMoney(self.DiffMoney) .. &amp;quot;.&amp;quot;)&lt;br /&gt;
     elseif self.DiffMoney &amp;lt; 0 then&lt;br /&gt;
         ChatFrame1:AddMessage(&amp;quot;You lost&amp;quot; .. FormatMoney(self.DiffMoney * -1) .. &amp;quot;.&amp;quot;)&lt;br /&gt;
     end&lt;br /&gt;
 end)&lt;/div&gt;</summary>
		<author><name>Bear</name></author>
	</entry>
</feed>