Editing Module:PriceCalculator
Revision as of 08:50, 26 June 2025 by Ryan (talk | contribs) (Created page with "local p = {} -- Helper function to calculate based on type function p._calculate(price, priceType) price = tonumber(price) if not price or price < 0 then return "Invalid price" end local percent = { sell = 0.6675, minor = 0.5, major = 1.0 } local factor = percent[priceType] if not factor then return "Invalid type" end return math.floor(price * factor + 0.5) -- rounds to nearest integer end -- Exposed function for templates function p.calculate(fr...")
Warning: You are editing an out-of-date revision of this page.
If you publish it, any changes made since this revision will be lost.
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
Retrieved from "https://highspell.wiki/w/Module:PriceCalculator"