Module:Test

From Roat Pkz
Revision as of 22:36, 3 April 2024 by Hefner (talk | contribs)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Test/doc

-- Module table
local test = {}

-- Function to get price by item name
function test.getPrice(itemName)
    local jsonData = mw.loadJsonData("Module:GEPrices/data.json")
    if not jsonData then
        return nil
    end

    local price = jsonData[itemName]
    if price then
        return itemName .. ": " .. price
    else
        return "Item not found"
    end
end

return test