<?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%3ALamp_calculator</id>
	<title>Module:Lamp 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%3ALamp_calculator"/>
	<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Lamp_calculator&amp;action=history"/>
	<updated>2026-04-27T01:33:51Z</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:Lamp_calculator&amp;diff=34192&amp;oldid=prev</id>
		<title>Alex: Created page with &quot;local p = {}  local experience = require(&#039;Module:Experience&#039;) local paramTest = require(&#039;Module:Paramtest&#039;) local scaledExperience = require(&#039;Module:ScaledExperience&#039;) local scp = require(&#039;Module:SCP&#039;)._main local addCommas = require(&#039;Module:Addcommas&#039;)._add  function p.buildTable(skill, itemData) 	local ret = &#039;&#039;  	for i, itemTable in ipairs(itemData) do 		local tabl = mw.html.create(&#039;table&#039;):addClass(&#039;wikitable&#039;):done() 		tabl:tag(&#039;tr&#039;):tag(&#039;th&#039;):wikitext(&#039;[[File:&#039;.. it...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.runerealm.org/index.php?title=Module:Lamp_calculator&amp;diff=34192&amp;oldid=prev"/>
		<updated>2024-10-15T23:24:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local p = {}  local experience = require(&amp;#039;Module:Experience&amp;#039;) local paramTest = require(&amp;#039;Module:Paramtest&amp;#039;) local scaledExperience = require(&amp;#039;Module:ScaledExperience&amp;#039;) local scp = require(&amp;#039;Module:SCP&amp;#039;)._main local addCommas = require(&amp;#039;Module:Addcommas&amp;#039;)._add  function p.buildTable(skill, itemData) 	local ret = &amp;#039;&amp;#039;  	for i, itemTable in ipairs(itemData) do 		local tabl = mw.html.create(&amp;#039;table&amp;#039;):addClass(&amp;#039;wikitable&amp;#039;):done() 		tabl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;[[File:&amp;#039;.. it...&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 experience = require(&amp;#039;Module:Experience&amp;#039;)&lt;br /&gt;
local paramTest = require(&amp;#039;Module:Paramtest&amp;#039;)&lt;br /&gt;
local scaledExperience = require(&amp;#039;Module:ScaledExperience&amp;#039;)&lt;br /&gt;
local scp = require(&amp;#039;Module:SCP&amp;#039;)._main&lt;br /&gt;
local addCommas = require(&amp;#039;Module:Addcommas&amp;#039;)._add&lt;br /&gt;
&lt;br /&gt;
function p.buildTable(skill, itemData)&lt;br /&gt;
	local ret = &amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	for i, itemTable in ipairs(itemData) do&lt;br /&gt;
		local tabl = mw.html.create(&amp;#039;table&amp;#039;):addClass(&amp;#039;wikitable&amp;#039;):done()&lt;br /&gt;
		tabl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;[[File:&amp;#039;.. itemTable.file .. &amp;#039;|link=&amp;#039; .. itemTable.link .. &amp;#039;]] [[&amp;#039; .. itemTable.link .. &amp;#039;|&amp;#039; .. itemTable.name .. &amp;#039;]] required:&amp;#039;):attr(&amp;#039;colspan&amp;#039;, 2):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(addCommas(itemTable.data.endActions)):attr(&amp;#039;colspan&amp;#039;, 2):done()&lt;br /&gt;
		&lt;br /&gt;
		tabl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;th&amp;#039;):wikitext(scp(skill, nil, &amp;#039;yes&amp;#039;)):done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Start&amp;#039;):done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;End&amp;#039;):done()&lt;br /&gt;
		:tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Earned&amp;#039;):done()&lt;br /&gt;
		&lt;br /&gt;
		tabl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Experience&amp;#039;):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(addCommas(itemTable.data.startingExp)):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(addCommas(itemTable.data.endExp)):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(addCommas(itemTable.data.endExp - itemTable.data.startingExp)):done()&lt;br /&gt;
		&lt;br /&gt;
		tabl:tag(&amp;#039;tr&amp;#039;):tag(&amp;#039;th&amp;#039;):wikitext(&amp;#039;Level&amp;#039;):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(itemTable.data.startingLevel):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(itemTable.data.endLevel):done()&lt;br /&gt;
		:tag(&amp;#039;td&amp;#039;):wikitext(itemTable.data.endLevel - itemTable.data.startingLevel):done()&lt;br /&gt;
		&lt;br /&gt;
		ret = ret .. tostring(tabl)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return tostring(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args)&lt;br /&gt;
	local skill = args.skill&lt;br /&gt;
	local inputType, currentLevel, currentExperience = args.inputType, tonumber(args.currentLevel), tonumber(args.currentExperience)&lt;br /&gt;
	local targetType, targetLevel, targetExperience = args.targetType, tonumber(args.targetLevel), tonumber(args.targetExperience)&lt;br /&gt;
	local leagueMultiplier = args.leagueMultiplier or 1&lt;br /&gt;
	&lt;br /&gt;
	-- Get the currentExperience at the current level&lt;br /&gt;
	if(inputType == &amp;#039;Level&amp;#039;) then&lt;br /&gt;
		currentExperience = experience.xp_at_level_unr({args = {currentLevel}})&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Get the targetExperience at the target level&lt;br /&gt;
	if(targetType == &amp;#039;Level&amp;#039;) then&lt;br /&gt;
		targetExperience = experience.xp_at_level_unr({args = {targetLevel}})&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Lamp multiplier: 10, Book multiplier: 15&lt;br /&gt;
	local lampData = scaledExperience.xp_to_xp_actions(currentExperience, targetExperience, (10 * leagueMultiplier))&lt;br /&gt;
	local bookData = scaledExperience.xp_to_xp_actions(currentExperience, targetExperience, (15 * leagueMultiplier))&lt;br /&gt;
	&lt;br /&gt;
	-- [&amp;#039;data&amp;#039;] is a table of 5 values endExp, endActions, endLevel, startingExp, startingLevel&lt;br /&gt;
	itemData = {&lt;br /&gt;
		{&lt;br /&gt;
			[&amp;#039;name&amp;#039;] = &amp;#039;Lamps&amp;#039;,&lt;br /&gt;
			[&amp;#039;link&amp;#039;] = &amp;#039;Lamp&amp;#039;,&lt;br /&gt;
			[&amp;#039;file&amp;#039;] = &amp;#039;Lamp.png&amp;#039;,&lt;br /&gt;
			[&amp;#039;data&amp;#039;] = lampData,&lt;br /&gt;
		},&lt;br /&gt;
		{&lt;br /&gt;
			[&amp;#039;name&amp;#039;] = &amp;#039;Books&amp;#039;,&lt;br /&gt;
			[&amp;#039;link&amp;#039;] = &amp;#039;Book_of_knowledge&amp;#039;,&lt;br /&gt;
			[&amp;#039;file&amp;#039;] = &amp;#039;Book_of_knowledge.png&amp;#039;,&lt;br /&gt;
			[&amp;#039;data&amp;#039;] = bookData,&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	return p.buildTable(skill, itemData)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	--mw.logObject(frame)&lt;br /&gt;
	local args = frame:getParent().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>