FANDOM


--
-- Hiscore data grabbed by [[User:Cresbot]]
--
-- While the bot does change these numbers, they can be updated manually as well
-- Be sure to find the correct set of numbers to update
-- You can use Control + F to find the specific template that sent you here
-- Or you can read through the comments
-- ** Be sure to leave the rest of the code the way it is **
-- Skills/etc are left lower case intentionally
 
local p = {}
 
--
-- Data for 120s (includes virtual 120s)
-- [[Template:120s]]
--
local count_120s = {
    ["agility"] = "2,707",
    ["attack"] = "9,876",
    ["constitution"] = "19,308",
    ["construction"] = "2,254",
    ["cooking"] = "4,947",
    ["crafting"] = "2,671",
    ["defence"] = "19,175",
    ["divination"] = "3,118",
    ["dungeoneering"] = "36,923",
    ["farming"] = "4,219",
    ["firemaking"] = "8,739",
    ["fishing"] = "8,402",
    ["fletching"] = "3,666",
    ["herblore"] = "5,102",
    ["hunter"] = "3,808",
    ["invention"] = "44,082",
    ["magic"] = "16,544",
    ["mining"] = "8,463",
    ["prayer"] = "3,915",
    ["ranged"] = "15,362",
    ["runecrafting"] = "2,380",
    ["slayer"] = "17,883",
    ["smithing"] = "3,685",
    ["strength"] = "8,744",
    ["summoning"] = "7,520",
    ["thieving"] = "12,696",
    ["woodcutting"] = "3,674",
    -- @notes this isn't updated by [[User:Cresbot]]
    ["overall"] = "70",
    ["updated"] = "26 June 2018"
}
 
function p.get_120s ( frame )
    local skill = string.lower( frame.args[1] )
    if not count_120s[skill] then
        return 0
    end
 
    return count_120s[skill]
end
 
--
-- End 120s
--
 
--
-- Data for ironman with 120s (includes virtual 120s)
-- [[Template:Ironman with 120s]]
--
local count_120s_ironman = {
    ["agility"] = "19",
    ["attack"] = "151",
    ["constitution"] = "360",
    ["construction"] = "23",
    ["cooking"] = "35",
    ["crafting"] = "33",
    ["defence"] = "308",
    ["divination"] = "62",
    ["dungeoneering"] = "427",
    ["farming"] = "38",
    ["firemaking"] = "61",
    ["fishing"] = "84",
    ["fletching"] = "21",
    ["herblore"] = "27",
    ["hunter"] = "78",
    ["invention"] = "1,365",
    ["magic"] = "289",
    ["mining"] = "112",
    ["prayer"] = "66",
    ["ranged"] = "294",
    ["runecrafting"] = "33",
    ["slayer"] = "295",
    ["smithing"] = "27",
    ["strength"] = "138",
    ["summoning"] = "39",
    ["thieving"] = "300",
    ["woodcutting"] = "46",
    -- @notes this isn't updated by [[User:Cresbot]]
    ["overall"] = "0",
    ["updated"] = "26 June 2018"
}
 
function p.get_120s_ironman ( frame )
    local skill = string.lower( frame.args[1] )
    if not count_120s_ironman[skill] then
        return 0
    end
 
    return count_120s_ironman[skill]
end
 
--
-- End ironman with 120s
--
 
--
-- Data for 99s (including overall)
-- [[Template:99s]]
--
local count_99s = {
    ["agility"] = "96,159",
    ["attack"] = "207,189",
    ["constitution"] = "234,151",
    ["construction"] = "98,561",
    ["cooking"] = "202,098",
    ["crafting"] = "114,164",
    ["defence"] = "216,556",
    ["divination"] = "91,087",
    ["dungeoneering"] = "115,556",
    ["farming"] = "98,607",
    ["firemaking"] = "197,055",
    ["fishing"] = "145,908",
    ["fletching"] = "170,783",
    ["herblore"] = "158,250",
    ["hunter"] = "98,623",
    ["invention"] = "77,275",
    ["magic"] = "230,436",
    ["mining"] = "127,882",
    ["prayer"] = "160,637",
    ["ranged"] = "204,688",
    ["runecrafting"] = "101,625",
    ["slayer"] = "142,549",
    ["smithing"] = "125,514",
    ["strength"] = "231,668",
    ["summoning"] = "142,880",
    ["thieving"] = "107,155",
    ["woodcutting"] = "177,183",
    -- @notes this isn't updated by [[User:Cresbot]]
    ["overall"] = "10,000",
    -- @notes this isn't updated by [[User:Cresbot]]
    ["overall f2p"] = "8",
    ["updated"] = "22 April 2018"
}
 
function p.get_99s ( frame )
    local skill = string.lower( frame.args[1] )
    if not count_99s[skill] then
        return 0
    end
 
    return count_99s[skill]
end
 
--
-- End 99s
--
 
--
-- Data for ironman 99s
-- [[Template:Ironman with 99s]]
--
local count_99s_ironman = {
    ["agility"] = "1,362",
    ["attack"] = "2,074",
    ["constitution"] = "3,490",
    ["construction"] = "1,365",
    ["cooking"] = "1,997",
    ["crafting"] = "2,171",
    ["defence"] = "3,251",
    ["divination"] = "2,068",
    ["dungeoneering"] = "1,992",
    ["farming"] = "1,421",
    ["firemaking"] = "1,890",
    ["fishing"] = "2,128",
    ["fletching"] = "1,549",
    ["herblore"] = "1,775",
    ["hunter"] = "1,540",
    ["invention"] = "1,997",
    ["magic"] = "3,845",
    ["mining"] = "2,216",
    ["prayer"] = "1,982",
    ["ranged"] = "2,899",
    ["runecrafting"] = "1,984",
    ["slayer"] = "2,865",
    ["smithing"] = "1,514",
    ["strength"] = "1,996",
    ["summoning"] = "1,995",
    ["thieving"] = "2,178",
    ["woodcutting"] = "1,818",
    -- @notes this isn't updated by [[User:Cresbot]]
    ["overall"] = "0",
    -- @notes this isn't updated by [[User:Cresbot]]
    ["overall f2p"] = "0",
    ["updated"] = "9 February 2018"
}
 
function p.get_99s_ironman ( frame )
    local skill = string.lower( frame.args[1] )
    if not count_99s_ironman[skill] then
        return 0
    end
 
    return count_99s_ironman[skill]
end
 
--
-- End ironman 99s
--
 
--
-- Data for 200mxp
-- [[Template:200mxp]]
--
local count_200mxp = {
    ["agility"] = "732",
    ["attack"] = "1,630",
    ["constitution"] = "4,888",
    ["construction"] = "694",
    ["cooking"] = "1,682",
    ["crafting"] = "791",
    ["defence"] = "3,477",
    ["divination"] = "861",
    ["dungeoneering"] = "9,460",
    ["farming"] = "1,089",
    ["firemaking"] = "2,128",
    ["fishing"] = "1,874",
    ["fletching"] = "1,013",
    ["herblore"] = "1,134",
    ["hunter"] = "1,045",
    ["invention"] = "9,826",
    ["magic"] = "3,897",
    ["mining"] = "1,859",
    ["prayer"] = "923",
    ["ranged"] = "3,273",
    ["runecrafting"] = "734",
    ["slayer"] = "2,156",
    ["smithing"] = "947",
    ["strength"] = "1,498",
    ["summoning"] = "2,216",
    ["thieving"] = "3,558",
    ["woodcutting"] = "1,032",
    ["overall"] = "347",
    ["updated"] = "24 May 2018"
}
 
function p.get_200mxp ( frame )
    local skill = string.lower( frame.args[1] )
    if not count_200mxp[skill] then
        return 0
    end
 
    return count_200mxp[skill]
end
 
--
-- End 200mxp
--
 
--
-- Data for ironman with 200mxp
-- [[Template:Ironman with 200mxp]]
--
local count_200mxp_ironman = {
    ["agility"] = "6",
    ["attack"] = "38",
    ["constitution"] = "90",
    ["construction"] = "4",
    ["cooking"] = "7",
    ["crafting"] = "7",
    ["defence"] = "64",
    ["divination"] = "15",
    ["dungeoneering"] = "57",
    ["farming"] = "9",
    ["firemaking"] = "22",
    ["fishing"] = "18",
    ["fletching"] = "6",
    ["herblore"] = "7",
    ["hunter"] = "35",
    ["invention"] = "262",
    ["magic"] = "74",
    ["mining"] = "31",
    ["prayer"] = "27",
    ["ranged"] = "66",
    ["runecrafting"] = "14",
    ["slayer"] = "33",
    ["smithing"] = "9",
    ["strength"] = "33",
    ["summoning"] = "13",
    ["thieving"] = "103",
    ["woodcutting"] = "9",
    ["overall"] = "1",
    ["updated"] = "24 May 2018"
}
 
function p.get_200mxp_ironman ( frame )
    local skill = string.lower( frame.args[1] )
    if not count_200mxp_ironman[skill] then
        return 0
    end
 
    return count_200mxp_ironman[skill]
end
 
--
-- End ironman with 200mxp
--
 
--
-- Data for Hiscores lowest rank
-- [[Template:Hiscores lowest rank]]
--
local lowest_ranks = {
    ["agility"] = "15",
    ["agility.rank"] = "881,227",
    ["attack"] = "15",
    ["attack.rank"] = "1,315,698",
    ["constitution"] = "15",
    ["constitution.rank"] = "1,500,945",
    ["construction"] = "15",
    ["construction.rank"] = "727,500",
    ["cooking"] = "15",
    ["cooking.rank"] = "1,206,248",
    ["crafting"] = "15",
    ["crafting.rank"] = "1,060,795",
    ["defence"] = "15",
    ["defence.rank"] = "1,308,946",
    ["divination"] = "15",
    ["divination.rank"] = "506,313",
    ["dungeoneering"] = "15",
    ["dungeoneering.rank"] = "806,930",
    ["farming"] = "15",
    ["farming.rank"] = "659,274",
    ["firemaking"] = "15",
    ["firemaking.rank"] = "1,198,979",
    ["fishing"] = "15",
    ["fishing.rank"] = "1,130,760",
    ["fletching"] = "15",
    ["fletching.rank"] = "862,013",
    ["herblore"] = "15",
    ["herblore.rank"] = "765,861",
    ["hunter"] = "15",
    ["hunter.rank"] = "694,329",
    ["invention"] = "15",
    ["invention.rank"] = "184,872",
    ["magic"] = "15",
    ["magic.rank"] = "1,203,700",
    ["mining"] = "15",
    ["mining.rank"] = "1,223,996",
    ["prayer"] = "15",
    ["prayer.rank"] = "1,173,592",
    ["ranged"] = "15",
    ["ranged.rank"] = "1,131,284",
    ["runecrafting"] = "15",
    ["runecrafting.rank"] = "917,728",
    ["slayer"] = "15",
    ["slayer.rank"] = "816,989",
    ["smithing"] = "15",
    ["smithing.rank"] = "1,151,314",
    ["strength"] = "15",
    ["strength.rank"] = "1,307,430",
    ["summoning"] = "15",
    ["summoning.rank"] = "642,359",
    ["thieving"] = "15",
    ["thieving.rank"] = "859,929",
    ["woodcutting"] = "15",
    ["woodcutting.rank"] = "1,283,089",
    ["overall"] = "36",
    ["overall.rank"] = "1,930,165",
    ["updated"] = "12 December 2017"
}
 
function p.get_lowest_ranks ( frame )
    local skill = string.lower( frame.args[1] )
    if not lowest_ranks[skill] then
        return 0
    end
 
    return lowest_ranks[skill]
end
 
--
-- End Hiscores lowest rank
--
return p