Set up Separate trials panel

His Dad [06-26-15 - 05:05]
Set up Separate trials panel
Filename
HistOffline.lua
data/data.lua
data/en.lua
diff --git a/HistOffline.lua b/HistOffline.lua
index f71b4f4..2a3f832 100644
--- a/HistOffline.lua
+++ b/HistOffline.lua
@@ -453,9 +453,9 @@ end
 		me.Pub_box.Redraw= "ALL"

 		-- Create Vet Dungeon Achievements Box==========================
-		me.Vet_box= iup.matrix {numcol=5, numcol_visible=5,  numlin=5, widthdef=110}
+		me.Vet_box= iup.matrix {numcol=3, numcol_visible=3,  numlin=5, widthdef=110}

-		for i=1, 5 do  -- Load headings
+		for i=1, 3 do  -- Load headings
 			me.Vet_box:setcell(0,i, Area_names[i].long)
 		end

@@ -465,8 +465,7 @@ end
 		iup.SetAttribute(me.Vet_box,  "FGCOLOR*:1", Colour_Not_Complete)
 		iup.SetAttribute(me.Vet_box,  "FGCOLOR*:2", Colour_Not_Complete)
 		iup.SetAttribute(me.Vet_box,  "FGCOLOR*:3", Colour_Not_Complete)
-		iup.SetAttribute(me.Vet_box,  "FGCOLOR*:4", Colour_Not_Complete)
-		iup.SetAttribute(me.Vet_box,  "FGCOLOR*:5", Colour_Not_Complete)
+

 		-- Need to keep track of multiple achievements in Vet dungeons. Index them by dungeon LineColumn.
 		Vet_Info={}
@@ -475,8 +474,8 @@ end
 				local C = vet_dat[id].C
 				key = tostring(L) .. tostring(C)	-- make name key
 				dname = grp_names[key]				-- Vet Dungeons are grp
-					if dname == nil then
-				dname = "key " .. key .." not found"
+				if dname == nil then
+					print("vet key " .. key .." not found")
 				end
 				Vet_Info[key] = {count = 0}
 				me.Vet_box:setcell(L,C,dname .. " (0)")
@@ -509,11 +508,52 @@ end
 			iup.SetAttribute(me.Vet_box, "FGCOLOR3:3", Colour_Heading_Complete)
 		end

+
+		-- Create Trials Achievements Box==========================
+		me.Trials_box= iup.matrix {numcol=1, numcol_visible=1,  numlin=4, widthdef=110}
+
+		-- Load headings
+		me.Trials_box:setcell(0,1, Area_names[5].long)	-- craglorn
+
+		iup.SetAttribute(me.Trials_box, "READONLY", "YES")
+		iup.SetAttribute(me.Trials_box,  "FGCOLOR*:1", Colour_Not_Complete)
+
+		-- Need to keep track of multiple achievements in Trials dungeons. Index them by dungeon LineColumn.
+		Trials_Info={}
+
+		for line,key in ipairs (trial2key) do  -- Load Dungeons Name. Info LC is the Dungeon Identifier
+				Trials_Info[key] = {count = 0}
+				me.Trials_box:setcell(line,1, "(0)")
+		end
+
+
+		for id,_ in pairs (trial_dat) do  -- For Achievements we have..
+			if thischar.ach[id] ~= nil then
+				local L = trial_dat[id].L
+				local C = trial_dat[id].C
+				--Set colour of LC
+				local colour = "FGCOLOR" .. L .. ":" .. C
+				iup.SetAttribute(me.Trials_box, colour, Colour_Complete)
+
+				key = tostring(L) .. tostring(C)	-- make name key
+				dname = trial_names[key]
+
+				-- Increment count and display
+				Trials_Info[key].count = Trials_Info[key].count+1
+				me.Trials_box:setcell(L,C, " (" .. Trials_Info[key].count ..")")
+
+				-- Add char to dungeon
+				dung.trials[key][char] = "Y"
+			end
+		end
+
+
 		if thischar.ach[1139] ~= nil 	then -- Craglorn all special.
-			iup.SetAttribute(me.Vet_box, "BGCOLOR0:5", Colour_Heading_Complete)
+			iup.SetAttribute(me.Trials_box, "BGCOLOR0:5", Colour_Heading_Complete)
 		end

-		me.Vet_box.Redraw= "ALL"
+
+

 		-- Create Locations Box==============================================
 		me.Map_box= iup.matrix {numcol=6, numcol_visible=6,  numlin=0, widthdef=70}
diff --git a/data/data.lua b/data/data.lua
index 59b6cea..03d44f1 100644
--- a/data/data.lua
+++ b/data/data.lua
@@ -107,24 +107,24 @@
 }
 trial_dat = {
 --Hel Ra Citadel
-	[991] = {L=1, C=5},
-	[1136] = {L=1, C=5},
-	[1080] = {L=1, C=5},
+	[991] = {L=1, C=1},
+	[1136] = {L=1, C=1},
+	[1080] = {L=1, C=1},

 --Aetherian Archive
-	[990] = {L=2, C=5},
-	[1137] = {L=2, C=5},
-	[1081] = {L=2, C=5},
+	[990] = {L=2, C=1},
+	[1137] = {L=2, C=1},
+	[1081] = {L=2, C=1},
 --Sanctum Ophidia

-	[1123] = {L=3, C=5},
-	[1124] = {L=3, C=5},
-	[1138] = {L=3, C=5},
+	[1123] = {L=3, C=1},
+	[1124] = {L=3, C=1},
+	[1138] = {L=3, C=1},
 -- Craglorn Trials
-	[1139] = {L=3, C=5},
+	[1139] = {L=3, C=1},
 --Dragonstar Arena
-	[992] = {L=4, C=5},
-	[1140] = {L=4, C=5},
+	[992] = {L=4, C=1},
+	[1140] = {L=4, C=1},
 }

 WB_dat = {		--World Boss Achievements
@@ -354,10 +354,10 @@ grp2key = {

 --Craglorn Trials
 trial2key = {
-"15",	-- "Hel Ra Citadel",
-"25",	-- "Aetherian Archive"
-"35",	-- "Sanctum Ophidia",
-"45", 	-- "Dragonstar Arena",
+"11",	-- "Hel Ra Citadel",
+"21",	-- "Aetherian Archive"
+"31",	-- "Sanctum Ophidia",
+"41", 	-- "Dragonstar Arena",
 }

 --list vet dungeons. Not all Grp Dungeons have veteran difficulty
diff --git a/data/en.lua b/data/en.lua
index 6b51a95..f12aea2 100644
--- a/data/en.lua
+++ b/data/en.lua
@@ -109,13 +109,15 @@ grp_names = {
 	["53"]= "Selene's Web",
 --Coldharbour
 	["54"]= "Vaults of Madness",
---Craglorn
-	["15"] = "Hel Ra Citadel",
-	["25"] = "Aetherian Archive",
-	["35"] = "Sanctum Ophidia",
-	["45"] = "Dragonstar Arena",
 }

+trial_names = {
+--Craglorn
+	["11"] = "Hel Ra Citadel",
+	["21"] = "Aetherian Archive",
+	["31"] = "Sanctum Ophidia",
+	["41"] = "Dragonstar Arena",
+}
 Locations = {
 --EP
 		["11"] = "Stonefalls",