<?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%3AUnfinished_potion_creation_calculator</id>
	<title>Module:Unfinished potion creation 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%3AUnfinished_potion_creation_calculator"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Unfinished_potion_creation_calculator&amp;action=history"/>
	<updated>2026-04-25T18:51:22Z</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:Unfinished_potion_creation_calculator&amp;diff=35209&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;local p = {}  local coins = require(&#039;Module:Coins&#039;)._amount local gePrices = mw.loadJsonData(&#039;Module:GEPrices/data.json&#039;)  local UnfinishedPotions = { 	{ [&#039;potion&#039;] = &#039;Guam potion (unf)&#039;, [&#039;herblore&#039;] = 3, [&#039;herb&#039;] = &#039;Guam leaf&#039;, [&#039;container&#039;] = &#039;Vial of water&#039; }, 	{ [&#039;potion&#039;] = &#039;Marrentill potion (unf)&#039;, [&#039;herblore&#039;] = 5, [&#039;herb&#039;] = &#039;Marrentill&#039;, [&#039;container&#039;] = &#039;Vial of water&#039; }, 	{ [&#039;potion&#039;] = &#039;Tarromin potion (unf)&#039;, [&#039;herblore&#039;] = 12, [&#039;herb&#039;] = &#039;Tarromin&#039;, [&#039;cont...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Unfinished_potion_creation_calculator&amp;diff=35209&amp;oldid=prev"/>
		<updated>2024-10-16T23:13:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  local coins = require(&amp;#039;Module:Coins&amp;#039;)._amount local gePrices = mw.loadJsonData(&amp;#039;Module:GEPrices/data.json&amp;#039;)  local UnfinishedPotions = { 	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Guam potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 3, [&amp;#039;herb&amp;#039;] = &amp;#039;Guam leaf&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; }, 	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Marrentill potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 5, [&amp;#039;herb&amp;#039;] = &amp;#039;Marrentill&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; }, 	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Tarromin potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 12, [&amp;#039;herb&amp;#039;] = &amp;#039;Tarromin&amp;#039;, [&amp;#039;cont...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
local coins = require(&amp;#039;Module:Coins&amp;#039;)._amount&lt;br /&gt;
local gePrices = mw.loadJsonData(&amp;#039;Module:GEPrices/data.json&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local UnfinishedPotions = {&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Guam potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 3, [&amp;#039;herb&amp;#039;] = &amp;#039;Guam leaf&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Marrentill potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 5, [&amp;#039;herb&amp;#039;] = &amp;#039;Marrentill&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Tarromin potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 12, [&amp;#039;herb&amp;#039;] = &amp;#039;Tarromin&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Harralander potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 22, [&amp;#039;herb&amp;#039;] = &amp;#039;Harralander&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Ranarr potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 30, [&amp;#039;herb&amp;#039;] = &amp;#039;Ranarr weed&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Toadflax potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 34, [&amp;#039;herb&amp;#039;] = &amp;#039;Toadflax&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Irit potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 45, [&amp;#039;herb&amp;#039;] = &amp;#039;Irit leaf&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Avantoe potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 50, [&amp;#039;herb&amp;#039;] = &amp;#039;Avantoe&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Kwuarm potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 55, [&amp;#039;herb&amp;#039;] = &amp;#039;Kwuarm&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Snapdragon potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 63, [&amp;#039;herb&amp;#039;] = &amp;#039;Snapdragon&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Cadantine potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 66, [&amp;#039;herb&amp;#039;] = &amp;#039;Cadantine&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Lantadyme potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 69, [&amp;#039;herb&amp;#039;] = &amp;#039;Lantadyme&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Dwarf weed potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 72, [&amp;#039;herb&amp;#039;] = &amp;#039;Dwarf weed&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Torstol potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 78, [&amp;#039;herb&amp;#039;] = &amp;#039;Torstol&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of water&amp;#039; },&lt;br /&gt;
	{ [&amp;#039;potion&amp;#039;] = &amp;#039;Cadantine blood potion (unf)&amp;#039;, [&amp;#039;herblore&amp;#039;] = 80, [&amp;#039;herb&amp;#039;] = &amp;#039;Cadantine&amp;#039;, [&amp;#039;container&amp;#039;] = &amp;#039;Vial of blood&amp;#039; },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-- add xp? &lt;br /&gt;
function createRow(potionData, isGrimy, perHour)&lt;br /&gt;
	local herbName = isGrimy and &amp;#039;Grimy &amp;#039; .. potionData.herb:lower() or potionData.herb&lt;br /&gt;
	local profitPer = gePrices[potionData.potion] - gePrices[herbName] - gePrices[potionData.container]&lt;br /&gt;
	local netProfit = profitPer * perHour&lt;br /&gt;
	&lt;br /&gt;
	return mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(&amp;#039;[[File:&amp;#039; .. potionData.potion .. &amp;#039;.png]]&amp;#039;):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(&amp;#039; [[&amp;#039; .. potionData.potion .. &amp;#039;]]&amp;#039;):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(potionData.herblore):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(&amp;#039;[[File:&amp;#039; .. herbName .. &amp;#039;.png]]&amp;#039;):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(&amp;#039; [[&amp;#039; .. herbName .. &amp;#039;]]&amp;#039;):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(coins(gePrices[herbName])):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(coins(gePrices[potionData.potion])):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(coins(profitPer)):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(coins(netProfit)):done()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function createHeader()&lt;br /&gt;
	local ret = mw.html.create(&amp;#039;table&amp;#039;):addClass(&amp;#039;wikitable sortable align-center-1 align-center-4&amp;#039;):done()&lt;br /&gt;
	ret:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Unfinished potion&amp;#039;):attr(&amp;#039;colspan&amp;#039;, 2):done()&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Level&amp;#039;):done()&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Herb&amp;#039;):attr(&amp;#039;colspan&amp;#039;, 2):done()&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Herb cost&amp;#039;):done()&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Potion cost&amp;#039;):done()&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Net profit&amp;#039;):done()&lt;br /&gt;
			:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Hourly profit&amp;#039;):done()&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local retClean = createHeader()&lt;br /&gt;
	local retGrimy = createHeader()&lt;br /&gt;
	for _, potionData in ipairs(UnfinishedPotions) do&lt;br /&gt;
		retClean:node(createRow(potionData, false, tonumber(args.potionsPerHour)))&lt;br /&gt;
		retGrimy:node(createRow(potionData, true, tonumber(args.potionsPerHourGrimy)))&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return &amp;#039;\n==Clean herb to unfinished potion==\n&amp;#039; .. tostring(retClean) .. &amp;#039;\n==Grimy herb to unfinished potion==\n&amp;#039; .. tostring(retGrimy)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- DEBUG&lt;br /&gt;
-- args = {[&amp;#039;potionsPerHour&amp;#039;] = 3000, [&amp;#039;potionsPerHourGrimy&amp;#039;] = 1500 }&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	--mw.logObject(args)&lt;br /&gt;
	return p._main(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Alex</name></author>
	</entry>
</feed>