<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ASupercompost_profit_calculator</id>
	<title>Module:Supercompost profit calculator - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.runerealm.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ASupercompost_profit_calculator"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Supercompost_profit_calculator&amp;action=history"/>
	<updated>2026-05-05T16:28:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.runerealm.org/index.php?title=Module:Supercompost_profit_calculator&amp;diff=35175&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;local Coins = require( &#039;Module:Coins&#039; ) local gePrice = require(&#039;Module:Exchange&#039;)._price  local p = {}  local bin = 15 local bigBin = 30   function p.invoke_main( frame ) 	return p.main(frame:getParent().args.ingredient, frame:getParent().args.cocomilk_offset, frame:getParent().args.bucket_offset, frame:getParent().args.grimy_herbs) end  function p.main( item, cocomilk, bucket, grimy ) 	--List of herbs-- 	local herbs = { &quot;Avantoe&quot;, &quot;Cadantine&quot;, &quot;Dwarf weed&quot;, &quot;Kwuarm&quot;, &quot;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Supercompost_profit_calculator&amp;diff=35175&amp;oldid=prev"/>
		<updated>2024-10-16T23:13:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local Coins = require( &amp;#039;Module:Coins&amp;#039; ) local gePrice = require(&amp;#039;Module:Exchange&amp;#039;)._price  local p = {}  local bin = 15 local bigBin = 30   function p.invoke_main( frame ) 	return p.main(frame:getParent().args.ingredient, frame:getParent().args.cocomilk_offset, frame:getParent().args.bucket_offset, frame:getParent().args.grimy_herbs) end  function p.main( item, cocomilk, bucket, grimy ) 	--List of herbs-- 	local herbs = { &amp;quot;Avantoe&amp;quot;, &amp;quot;Cadantine&amp;quot;, &amp;quot;Dwarf weed&amp;quot;, &amp;quot;Kwuarm&amp;quot;, &amp;quot;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local Coins = require( &amp;#039;Module:Coins&amp;#039; )&lt;br /&gt;
local gePrice = require(&amp;#039;Module:Exchange&amp;#039;)._price&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local bin = 15&lt;br /&gt;
local bigBin = 30&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function p.invoke_main( frame )&lt;br /&gt;
	return p.main(frame:getParent().args.ingredient, frame:getParent().args.cocomilk_offset, frame:getParent().args.bucket_offset, frame:getParent().args.grimy_herbs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main( item, cocomilk, bucket, grimy )&lt;br /&gt;
	--List of herbs--&lt;br /&gt;
	local herbs = { &amp;quot;Avantoe&amp;quot;, &amp;quot;Cadantine&amp;quot;, &amp;quot;Dwarf weed&amp;quot;, &amp;quot;Kwuarm&amp;quot;, &amp;quot;Lantadyme&amp;quot;, &amp;quot;Snapdragon&amp;quot;, &amp;quot;Toadflax&amp;quot;, &amp;quot;Torstol&amp;quot;}&lt;br /&gt;
	&lt;br /&gt;
	--Gets cost of ingredients and value of a bin/big bin of compost&lt;br /&gt;
	if item == &amp;#039;Coconut shell&amp;#039; and cocomilk == &amp;#039;true&amp;#039; then&lt;br /&gt;
		price = gePrice(&amp;#039;Coconut&amp;#039;) + gePrice(&amp;#039;Vial&amp;#039;) - gePrice(&amp;#039;Coconut milk&amp;#039;)&lt;br /&gt;
	elseif item == &amp;#039;Coconut shell&amp;#039; then&lt;br /&gt;
		price = gePrice(&amp;#039;Coconut&amp;#039;)&lt;br /&gt;
	elseif item == &amp;#039;White tree fruit&amp;#039; or item == &amp;#039;Tenti pineapple&amp;#039; or item == nil then&lt;br /&gt;
		price = 0&lt;br /&gt;
	elseif grimy == &amp;#039;true&amp;#039; then&lt;br /&gt;
		price = gePrice(item)&lt;br /&gt;
		for i, h in ipairs(herbs) do&lt;br /&gt;
			if item == h then&lt;br /&gt;
				price = gePrice(&amp;quot;Grimy &amp;quot; .. item:lower())&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		price = gePrice(item)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	--Calculates profits&lt;br /&gt;
	local superPrice = gePrice(&amp;#039;Supercompost&amp;#039;)&lt;br /&gt;
	local profit = (superPrice * bin) - (price * bin)&lt;br /&gt;
	local bigProfit = (superPrice * bigBin) - (price * bigBin)&lt;br /&gt;
	if bucket == &amp;#039;true&amp;#039; then&lt;br /&gt;
		bucketPrice = gePrice(&amp;#039;Bucket&amp;#039;)&lt;br /&gt;
		profit = profit - bucketPrice&lt;br /&gt;
		bigProfit = bigProfit - bucketPrice&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return p.resultsTable({(price * bin), (price * bigBin), profit, bigProfit})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Creates table&lt;br /&gt;
function p.resultsTable(results)&lt;br /&gt;
	local resultsTable = mw.html.create(&amp;#039;table&amp;#039;)&lt;br /&gt;
	local header = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
	header:tag( &amp;#039;th&amp;#039; )&lt;br /&gt;
		:wikitext( &amp;#039;&amp;lt;small&amp;gt;Cost and profit&amp;lt;br/&amp;gt;per bin and big bin&amp;lt;/small&amp;gt;&amp;#039; )&lt;br /&gt;
	:done()&lt;br /&gt;
	:tag( &amp;#039;th&amp;#039; )&lt;br /&gt;
		:wikitext( &amp;#039;Cost&amp;#039; )&lt;br /&gt;
	:done()&lt;br /&gt;
	:tag( &amp;#039;th&amp;#039; )&lt;br /&gt;
		:wikitext( &amp;#039;Profit&amp;#039; )&lt;br /&gt;
	:done()&lt;br /&gt;
	&lt;br /&gt;
	local bin = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		bin:tag( &amp;#039;th&amp;#039; )&lt;br /&gt;
		:tag( &amp;#039;b&amp;#039; )&lt;br /&gt;
			:wikitext( &amp;#039;Bin&amp;#039; )&lt;br /&gt;
		:done()&lt;br /&gt;
		:tag( &amp;#039;td&amp;#039; )&lt;br /&gt;
			:wikitext(Coins._amount(results[1] * -1))&lt;br /&gt;
		:done()&lt;br /&gt;
		:tag( &amp;#039;td&amp;#039; )&lt;br /&gt;
			:wikitext(Coins._amount(results[3]))&lt;br /&gt;
		:done()&lt;br /&gt;
&lt;br /&gt;
	local bigbin = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		bigbin:tag( &amp;#039;th&amp;#039; )&lt;br /&gt;
			:tag( &amp;#039;b&amp;#039; )&lt;br /&gt;
				:wikitext( &amp;#039;Big bin&amp;#039; )&lt;br /&gt;
			:done()&lt;br /&gt;
		&lt;br /&gt;
		:tag( &amp;#039;td&amp;#039; )&lt;br /&gt;
			:wikitext(Coins._amount(results[2] * -1))&lt;br /&gt;
		:done()&lt;br /&gt;
		:tag( &amp;#039;td&amp;#039; )&lt;br /&gt;
			:wikitext(Coins._amount(results[4]))&lt;br /&gt;
		:done()&lt;br /&gt;
&lt;br /&gt;
	resultsTable:addClass( &amp;#039;wikitable&amp;#039; ):addClass( &amp;#039;align-center-1&amp;#039; )&lt;br /&gt;
		:node(header)&lt;br /&gt;
		:node(bin)&lt;br /&gt;
		:node(bigbin)&lt;br /&gt;
	:done()&lt;br /&gt;
&lt;br /&gt;
	return resultsTable&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>