Editing Module:Rates/Sandbox
From Ephinea PSO Wiki
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 29: | Line 29: | ||
-- @return {number} | -- @return {number} | ||
-- | -- | ||
function calcRate(dar, rdr) | |||
local mult = {} | local mult = {} | ||
mult[1] = dar | mult[1] = dar | ||
Line 135: | Line 135: | ||
:attr("title", string.format("Drop Rate: %s (%s), Rare Rate: %s (%s)", fmtRate(rate[1], "f"), fmtRate(rate[1], "p"), fmtRate(rate[2], "f", 2), fmtRate(rate[2], "p"))) | :attr("title", string.format("Drop Rate: %s (%s), Rare Rate: %s (%s)", fmtRate(rate[1], "f"), fmtRate(rate[1], "p"), fmtRate(rate[2], "f", 2), fmtRate(rate[2], "p"))) | ||
:css("border-bottom", "1px dotted") | :css("border-bottom", "1px dotted") | ||
:wikitext(string.format("%s", fmtRate(calcRate(rate[1], rate[2]), "f"))) | :wikitext(string.format("%s", calcRate(rate[1], rate[2]))) | ||
--:wikitext(string.format("%s", fmtRate(calcRate(rate[1], rate[2]), "f"))) | |||
--out = out .. fmtRate(rate, "f", 2) .. " (" .. fmtRate(rate, "p") .. ")" | --out = out .. fmtRate(rate, "f", 2) .. " (" .. fmtRate(rate, "p") .. ")" | ||
return span:allDone() | return span:allDone() |