---Keys  map what we put on a line. they are arrays (ipairs) line going down.
-- Sequence to key (Pub and grp)
grp1tokey = {
--EP
"11",
"21",
"31",
"41",
"51",
--DC
"12",
"22",
"32",
"42",
"52",
--AD
"13",
"23",
"33",
"43",
"53",
--Coldharbour
"14",
--Morrowind
}

--Some are missing
grp2tokey = {
"11",	--Fungal Grotto
"21",	--Darkshade
"12",	--Spindleclutch
"22",	--Wayrest Sewers
"32",	--Crypt of Hearts
"13",	--Banished Cells
"23",	--Elden Hollow
"33",	--City of Ash
}

pubtokey = {
--EP
"11",
"21",
"31",
"41",
"51",
--DC
"12",
"22",
"32",
"42",
"52",
--AD
"13",
"23",
"33",
"43",
"53",
--Coldharbour
"14",
--Vvardendell
"24",
"34",
"44",	-- "Karnwasten Conqueror"
"54",	-- "Sunhold Conqueror""
}
DLC2key={
--Orsinium
"11",
"21",
"31",
"41",
-- IC
"12",
"22",
"32",
"42",
--hist
"13",
"23",
"33",
"43",
--Horns
"14",
"24",
"34",
"44",

--Bones
"15",
"25",
"35",
"45",

--Wolfhunter
"16",	-- "Moon Hunter Keep Vanquisher",
"26",	-- "Moon Hunter Keep Conqueror",
"36",	-- "March of Sacrifices Vanquisher"
"46",	-- "March of Sacrifices Conqueror",
}

--Craglorn Trials

Trials2key= {}
Trials2key["N"] = {
"11",	-- "Hel Ra Citadel",
"21",	-- "Aetherian Archive"
"31",	-- "Sanctum Ophidia",
"41",	-- "Dragonstar Arena Champion",
"51",	-- "Halls of Fabrication Conqueror"
"61",	-- "Maw of Lorkhaj Completed"
"71",	-- "Cloudrest Completed"
"81",	-- "Cloudrest Contender"
"91",	-- "Cloudrest Savior"
"101",	-- "Asylum Sanctorium Redeemer", "Complete the listed achievements for Asylum Sanctorium.",
"111",	-- "Asylum Sanctorium Completed""Defeat Saint Olms the Just, Saint Llothis the Pious, and Saint Felms the Bold in Asylum Sanctorium.",
"121",	-- "Asylum Sanctorium Contender","Defeat Saint Olms the Just, Saint
}

Trials2key["V"] = {
"11",	-- "Hel Ra Citadel",
"21",	-- "Aetherian Archive"
"31",	-- "Sanctum Ophidia",
"41", 	-- "Dragonstar Arena",
"51",	-- "Time Trial: Aetherian Archive", "Completed the Aetherian Archive within a time limit of 33 minutes.",
"61",	-- "Sanctum Ophidia Completed", "Defeat the Celestial Serpent."
"71",	-- "Time Trial: Sanctum Ophidia", "Completed the Sanctum Ophidia within a time limit of 33 minutes.",
"81",	-- "Dragonstar Arena Champion",  "Conquer all challengers and earn the title of Dragonstar Arena Champion!",
"91",	-- "Halls of Fabrication Conqueror", "Defeat the Assembly General in Veteran Halls of Fabrication.",
"101",	-- "Time Trial: Halls of Fabrication", "Complete Veteran Halls of Fabrication within a time limit of 40 minutes. Your trial begins when you enter Abanabi Cave beneath Tel Fyr.",
"111",	-- "Well-Oiled Machine", "Complete Veteran Halls of Fabrication without suffering a group member death.",
"121",	-- "Power House", "Defeat the Pinnacle Factotum without ever using energy from the generator to break a Refabricated Sphere's shield, in Veteran Halls of Fabrication.",
"131",	-- "Planned Obsolescence", ,"Defeat the Refabrication Committee in Veteran Halls of Fabrication without ever allowing the Reclaimer to overcharge a Ruined Factotum.",
"141",	-- "Environmentally Conscious", "Defeat the Assembly General in Veteran Halls of Fabrication without any group member dying to traps and hazards.",
"151", 	-- "Terminal Terminator", "Defeat the Assembly General in Veteran Halls of Fabrication without letting any Terminals complete their activation sequence.",
"161",	-- "Stress Tested","Complete Veteran Halls of Fabrication after resetting the circuit breaker and empowering the Assembly General, all without suffering a group member death.",
"171",	-- "Like Clockwork""Complete Veteran Halls of Fabrication after resetting the circuit breaker and empowering the Assembly General, all within 40 minutes of entering Abanabi Cave and without suffering a group member death.",
"181",	-- "Kill Process", "Defeat one Hunter-Killer Fabricant while the other still has at least half of its health remaining, before defeating the remaining Fabricant in Veteran Halls of Fabrication.",
"191",	-- "Arc-Custodian",, "In Veteran Halls of Fabrication, defeat the Archcustodian using six or fewer Shock Pylons without ever missing an opportunity to disable it with one.",
"201",	-- "Maw of Lorkhaj Conqueror", "Defeat Rakkhat, Fang of Lorkhaj and his legions of dro-m'Athra in Veteran Maw of Lorkhaj.",
"211",	-- "Time Trial: Maw of Lorkhaj", "Complete Veteran Maw of Lorkhaj within a time limit of 40 minutes. Your trial begins when you cross the threshold of the Temple of Seven Riddles.",
"221",	-- "Maw of Lorkhaj: Unchained Ambush", "Use both chain switches within ten seconds in Veteran Maw of Lorkhaj, then defeat the dro-m'Athra invaders.",
"231",	-- "Maw of Lorkhaj: Stainless Souls", "Defeat Rakkhat without anyone dying while afflicted by the Breath of Lorkhaj.",
"241",	-- "Maw of Lorkhaj: Two-Moons Dance", "In Veteran Maw of Lorkhaj, force Rakkhat into his final phase within two lunar cycles, then defeat him.",
"251",	-- "Maw of Lorkhaj: Void Avoided", "Defeat Rakkhat in Veteran Maw of Lorkhaj, with a maximum of two players ever being afflicted by the Breath of Lorkhaj.",
"261",	-- "Maw of Lorkhaj: Fang Focused", "Defeat Rakkhat in Veteran Maw of Lorkhaj, with at least three dro-m'Athra Dreadstalkers still alive.",
"271",	-- "Maw of Lorkhaj: Moons' Champion", "Complete all achievements related to defeating Rakkhat, Fang of Lorkhaj in Veteran Maw of Lorkhaj.",
"281",	-- "Maw of Lorkhaj: Spotless Triumph",, "Complete Veteran Maw of Lorkhaj without suffering a group member death.",
"291",	-- "Cloudrest Conqueror", "Defeat Z'Maja, Siroria, Relequen, and Galenwe in Veteran Cloudrest.",
"301",	-- "Speedy Sload Slayer","Defeat Z'Maja, Siroria, Relequen, and Galenwe within a time limit of 15 minutes in Veteran Cloudrest. Timer starts when players enter the Cloudrest Aerie.",
"311",	-- "A Sload and Her Shadow", "Defeat Z'Maja with one Welkynar shadow fighting by her side in Veteran Cloudrest.",
"321",	-- "Cloudrest Vanquisher", "Defeat Z'Maja, Siroria, Relequen, and Galenwe in the same fight in Veteran Cloudrest.",
"331",	-- "Surviving the Shadows","Defeat Z'Maja, Siroria, Relequen, and Galenwe without suffering a group member death in Veteran Cloudrest.",
"341",  -- "The Path to Alaxon", "Defeat Z'Maja, Siroria, Relequen, and Galenwe in the same battle without suffering a group member death within 15 minutes of entering the Cloudrest Aerie in Veteran Cloudrest.",
"351",	-- "One Core, No More", "Defeat Z'Maja with each group member picking up and destroying only one Malevolent Core in Veteran Cloudrest.",
"361",  -- "Misery Loves Company", "While battling Z'Maja with all three of the Welkynars' shadows by her side, a player with the Hoarfrost affliction and two other players with the Voltaic Overload affliction share the damage of the Roaring Flare eruption in Veteran Cloudrest.",
"371",	-- "Flares and Deadly Shadows", "While battling Z'Maja with Siroria's shadow by her side, utilize a Roaring Flare attack and achieve 20 killing blows against Shadow's of the Fallen in Cloudrest.",
"381",	-- "Core Coordination""While battling Z'Maja, after activating a single Welkynar's Light, activate two more Welkynar's Lights and destroy three Malevolent Cores within the next 5 seconds in Cloudrest.",
"391",	-- "The Mystic's Ice" "Have Galenwe's shadow destroy 20 roaming Hoarfrost cyclones with his Spiked Ice attack in Cloudrest.",
"401",	-- "Shocking Instinct", "While battling Relequen's shadow by itself, no player is hit by Voltaic Overload and no player spreads Voltaic Current to other players throughout the entire encounter in Cloudrest.",
"411", 	-- "Valorous Combustion""While battling Siroria's shadow by itself, every Roaring Flare throughout the entire encounter must be split between at least 6 players in Cloudrest.",
"421",	-- "Asylum Sanctorium Conqueror", "Defeat Saint Olms the Just, Saint Llothis the Pious, and Saint Felms the Bold in Veteran Asylum Sanctorium.",
"431",	-- "Asylum Sanctorium Vanquisher", "Defeat Saint Olms the Just, Saint Llothis the Pious, and Saint Felms the Bold in the same fight in Veteran Asylum Sanctorium.",
"441",	-- "Sanctified" "Defeat Saint Olms the Just, Saint Llothis the Pious, and Saint Felms the Bold without suffering a group member death in Veteran Asylum Sanctorium.",
"451",	-- "Swift Mercy" "Defeat Saint Olms the Just, Saint Llothis the Pious, and Saint Felms the Bold within a time limit of 15 minutes in Veteran Asylum Sanctorium. Timer starts when players enter the Sanctuary Atrium.",
"461",	-- "Beatific Beatdown", "Defeat Saint Olms the Just, Saint Llothis the Pious, and Saint Felms the Bold at the same time without allowing Saint Felms or Saint Llothis to enrage during the fight in Veteran Asylum Sanctorium.",
"471",	-- "Placid Projections", "Defeat Saint Felms the Bold without allowing either of his Pneuma Projections to enrage in Veteran Asylum Sanctorium.",
"481",	-- "Imperfect Attendance,"Defeat Saint Llothis the Pious without dismantling his Imperfect Attendants in Veteran Asylum Sanctorium.",
"491", 	-- "Righteous Condemnation""Defeat Saint Olms the Just and Saint Llothis the Pious in the same battle in Veteran Asylum Sanctorium.",
"501",	-- "Executioners' Judgement""Defeat Saint Olms the Just and Saint Felms the Bold in the same battle in Veteran Asylum Sanctorium.",
"511",	-- "Perfect Purification" Defeat Saint Olms the Just, Saint Llothis the Pious, and Saint Felms the Bold in the same battle without suffering a group member
}
Trials2key["VH"] = {
"11",	-- "Hel Ra Citadel",
"21",	-- "Aetherian Archive"
"31",	-- "Sanctum Ophidia",
"41",	-- "Halls of Fabrication Vanquisher", "Defeat the Assembly General after empowering it by resetting the circuit breaker in Veteran Halls of Fabrication.",
"51",	-- "Thieves Guild: "Maw of Lorkhaj Difficult Mode"
"61",	-- "Craglorn Trials Conqueror",,"Complete Hel Ra Citadel, Aetherian Archive, and Sanctum Ophidia at their highest difficulties.",
}

--Generalised Location keys for square Grids

Locations2Key = {   -- Used for WB and SQ,
--Area is the heading  L.Area_Names[Area]

--EP
{ key="1:1",L=1,C=1,Area=1},		--	name="Stonefalls"},
{ key="2:1",L=2,C=1,Area=1},		--	name="Deshaan"},
{ key="3:1",L=3,C=1,Area=1},		--	name="Shadowfen"},
{ key="4:1",L=4,C=1,Area=1},		--	name="Eastmarch"},
{ key="5:1",L=5,C=1,Area=1},		--	name="The Rift"},	5
--DC
{ key="1:2",L=1,C=2,Area=2},		--	name="Glenumbra"},
{ key="2:2",L=2,C=2,Area=2},		--	name="Stormhaven"},
{ key="3:2",L=3,C=2,Area=2},		--	name="Rivenspire"},
{ key="4:2",L=4,C=2,Area=2},		--	name="Alik'r Desert"},
{ key="5:2",L=5,C=2,Area=2},		--	name="Bangkorai"},	10
--AD
{ key="1:3",L=1,C=3,Area=3},		--	name="Auridon"},
{ key="2:3",L=2,C=3,Area=3},		--	name="Grahtwood"},
{ key="3:3",L=3,C=3,Area=3},--	--	name="Greenshade"},
{ key="4:3",L=4,C=3,Area=3},--	--	name="Malabal-Tor"},
{ key="5:3",L=5,C=3,Area=3},--	--	name="Reaper's March"},	15
--Coldharbour
{ key="1:4",L=1,C=4,Area=4},		--	name="Coldharbour}, --16
{ key="2:4",L=2,C=4,Area=4},		--	name="Dark Brotherhood"},  17
{ key="3:4",L=3,C=4,Area=4},		--	name="Thieves Guild"},	18
{ key="4:4",L=4,C=4,Area=4},		--	name="Imperial City"},	19
{ key="5:4",L=5,C=4,Area=4},		--	name="VVardenfell"},	20

{ key="1:5",L=1,C=5,Area=4},		--	name="Orsinium"},	21
{ key="2:5",L=2,C=5,Area=4},		--	name="Clockwork City"},	22
{ key="3:5",L=3,C=5,Area=4},		--	name="Summerset"},	23
{ key="4:5",L=4,C=5,Area=4},		--	name="Murkmire"},	24
}