Module:DropRate

local p = {}

function p.main(frame) local result = '{| class=wikitable\n| colspan=3| Total runs: ' .. frame.args.runs .. '\n|-\n!item||quantity||chance' local temp = {} for _, v in ipairs(frame.args) do table.insert(temp, v) end for k = 1, #temp, 2 do result = result .. '\n|-\n|' .. temp[k] .. '||' .. temp[k+1] .. '||' .. math.floor(temp[k+1]/frame.args.runs*1000+.5)/10 .. '%' end return result .. '\n|}' end

return p