Module:Giants Foundry experience calculator

This is the current revision of this page, as edited by Alex (talk | contribs) at 00:12, 17 October 2024 (Created page with "local p = {} local commas = require('Module:Addcommas') local paramTest = require('Module:Paramtest') function p._main(args) local quality = paramTest.default_to(tonumber(args.quality), 0) local experience = (math.floor(quality^2 / 73) + math.floor(1.5 * quality) + 1) * 30 return 'Turning in a sword with ' .. quality .. ' quality rewards ' .. commas._add(experience) .. ' Smithing experience.' end function p.main(frame) local args = frame:getParent().args..."). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Giants Foundry experience calculator/doc

local p = {}

local commas = require('Module:Addcommas')
local paramTest = require('Module:Paramtest')

function p._main(args)
	local quality = paramTest.default_to(tonumber(args.quality), 0)
	local experience = (math.floor(quality^2 / 73) + math.floor(1.5 * quality) + 1) * 30
	return 'Turning in a sword with ' .. quality .. ' quality rewards ' .. commas._add(experience) .. ' [[Smithing]] [[experience]].' 
end

function p.main(frame)
	local args = frame:getParent().args
	return p._main(args)
end

return p