Module:MathFormulas
From Idle Clans wiki
Documentation for this module may be created at Module:MathFormulas/doc
local p = {} function calculateSkillingTicketPercentage(levelRequirement) return 1.2 * 0.0005 * levelRequirement / 10 * 1.033 end function p.calculateTicketChance(input) local levelRequirement = tonumber(input.args.levelRequirement) or 1 local percentageChance = calculateSkillingTicketPercentage(levelRequirement) local decimalChance = percentageChance / 100 local fractionNumber = 1 / decimalChance return '1 in ' .. tostring(fractionNumber) end return p