Module:KarambwanToPotatoRatio

--How the fuck am I supposed to retrieve price data, not a single damn tutorial on whole internet... --Shitty code made by Shantay AKA Guardian of Karambwans --This script isn't even working btw, if you know how to fix it then feel free

local p = {}

local potatoLink = 'https://oldschool.runescape.wiki/w/Module:Exchange/Potato' local karambwanLink = 'https://oldschool.runescape.wiki/w/Module:Exchange/Raw_karambwan'

local function getPrice(linkx) local errorless, GEData = pcall(mw.loadData, linkx) if errorless then local result = GEData.price return result end error(GEData) end

function p.calculateRatio(frame) local potatoPrice = getPrice(potatoLink) local karambwanPrice = getPrice(karambwanLink) local ratio = math.floor((karambwanPrice / potatoPrice)*10)/10 return ratio end

return p

--Happy script error day, everyone!