Module:PoE

local p = {}

--All information of the current PoE & CoE information --This table is updated by User:DestinyWikiBot. DO NOT change any comments containing the HTML tag: local poe_table = { --   ["elderchallenge"] = { ["status"] = "True", ["name"] = "Challenge of the Elders", ["description"] = "Holders\ of\ the\ Elders\'\ Sigil\ may\ join\ with\ two\ other\ Guardians\ to\ face\ Challenge\ of\ the\ Elders\.", ["icon"] = "Challenge_of_the_Elders_icon.png", ["skulls"] = { = "Juggler", = "Specialist", = "Precision Kill Bonus" },       ["rounds"] = { ["1"] = {               ["boss"] = "Keksis the Betrayed", ["race"] = "Fallen", ["level"] = "310" },           ["2"] = {                ["boss"] = "Seditious Mind", ["race"] = "Vex", ["level"] = "320" },           ["3"] = {                ["boss"] = "Noru’usk, Servant of Oryx", ["race"] = "Cabal", ["level"] = "330" }       }    },    ["prisonofelders"] = { ["status"] = "True", ["1"] = {           ["title"] = "Broken Legion", ["icon"] = "Challenge_of_the_Elders_icon.png", ["level"] = "Level 32", ["rewards"] = { = {"House of Judgment", 200}, = {"Armor Core", 1} },           ["rounds"] = { ["1"] = {                   ["race"] = "Cabal", ["skulls"] = { = "Juggler"} },               ["2"] = {                    ["race"] = "Hive", ["skulls"] = { = "Lightswitch"} },               ["3"] = {                    ["race"] = "Fallen", ["skulls"] = { = "Catapult"} },               ["4"] = {                    ["race"] = "Hive", ["skulls"] = { = "Brawler"} },               ["5"] = {                    ["race"] = "Cabal", ["skulls"] = { = "Juggler"} }           }        },        ["2"] = {            ["title"] = "Urrox's Grudge", ["icon"] = "Challenge_of_the_Elders_icon.png", ["level"] = "Level 34", ["rewards"] = { = {"House of Judgment", 300}, = {"Weapon Core", 1}, = {"Etheric Light", 1} },           ["rounds"] = { ["1"] = {                   ["race"] = "Hive", ["skulls"] = { = "Trickle"} },               ["2"] = {                    ["race"] = "Cabal", ["skulls"] = { = "Small Arms"} },               ["3"] = {                    ["race"] = "Cabal", ["skulls"] = { = "Exposure"} },               ["4"] = {                    ["race"] = "Hive", ["skulls"] = { = "Arc Burn"} },               ["5"] = {                    ["race"] = "Hive", ["skulls"] = { = "Solar Burn"} }           }        },        ["3"] = {            ["title"] = "Skolas's Revenge", ["icon"] = "Challenge_of_the_Elders_icon.png", ["level"] = "Level 35", ["rewards"] = { = {"House of Judgment", 500}, = {"Armor Core", 1}, = {"Weapon Core", 1}, = {"Etheric Light", 1} },           ["rounds"] = { ["1"] = {                   ["race"] = "Hive", ["skulls"] = { = "Exposure", = "Brawler"} },               ["2"] = {                    ["race"] = "Vex", ["skulls"] = { = "Grounded", = "Airborne"} },               ["3"] = {                    ["race"] = "Cabal", ["skulls"] = { = "Catapult", = "Arc Burn"} },               ["4"] = {                    ["race"] = "Fallen", ["skulls"] = { = "Specialist", = "Juggler"} },               ["5"] = {                    ["race"] = "Fallen", ["skulls"] = { = "Trickle", = "Small Arms"} }           }        }    }

-- }

--Main page function returns values in main page friendly format function p.coe ( frame ) --Sets activity type (activity) and activity information key (info) from arguments. local poeinfo = string.lower( frame.args[1] ) --If the activity type doesn't exist, returns false if not poe_table["elderchallenge"][poeinfo] then return "Key does not exist in PoE table. See Module:PoE." end --If activity info value is a table, parses into string format if (type(poe_table["elderchallenge"][poeinfo]) == "table") then --Creates local string to return local string = "" if poeinfo == "skulls" then --for i = 1,3 do           for skullfile, skullname in pairs(poe_table["elderchallenge"][poeinfo]) do                string = string .. "20px|link=" .. skullname .. " " end else return poe_table["elderchallenge"][poeinfo][frame.args[2]][frame.args[3]] end return string end

--Adds returned information to global variable return poe_table["elderchallenge"][poeinfo] end

--Main page function returns values in main page friendly format function p.poe ( frame ) --Sets activity type (activity) and activity information key (info) from arguments. local poeround = string.lower( frame.args[1] ) local poeinfo = string.lower( frame.args[2] ) --If the activity type doesn't exist, returns false if not poe_table["prisonofelders"][poeround] then return "Key does not exist in PoE table. See Module:PoE." end --If activity info value is a table, parses into string format if (type(poe_table["prisonofelders"][poeround][poeinfo]) == "table") then --Creates local string to return local string = "" if poeinfo == "rewards" then for rewardfile, rewardinfo in pairs(poe_table["prisonofelders"][poeround][poeinfo]) do               string = string .. "*20px|link= " .. rewardinfo[1] .. " x " .. rewardinfo[2] .. "\n" end else for roundnum, roundinfo in pairs( poe_table["prisonofelders"][poeround][poeinfo]) do               string = string .. " "           end end return string end

--Adds returned information to global variable return poe_table["prisonofelders"][poeround][poeinfo] end

--Returns global variable return p