Quests

His Dad [05-05-15 - 04:09]
Quests
Filename
HistOffline.lua
data/data.lua
data/en.lua
data/fr.lua
diff --git a/HistOffline.lua b/HistOffline.lua
index 4cb235d..0966844 100644
--- a/HistOffline.lua
+++ b/HistOffline.lua
@@ -550,9 +550,76 @@ btn_archive = iup.button{title="Archive", FGCOLOR = "#FF0000"}
 		end
 		end

+-- Create SkillQuest Achievements Box==========================
+		accounts[acc].name[char].SQ_box= iup.matrix {numcol=4, numcol_visible=4,  numlin=6, widthdef=110}
+
+		for i=1, 4 do  -- Load headings, not craglorn
+			accounts[acc].name[char].SQ_box:setcell(0,i, Area_names[i].medium)
+		end
+		accounts[acc].name[char].SQ_box:setcell(0,0, L.Zone)
+		accounts[acc].name[char].SQ_box:setcell(1,0, "1")
+		accounts[acc].name[char].SQ_box:setcell(2,0, "2")
+		accounts[acc].name[char].SQ_box:setcell(3,0, "3")
+		accounts[acc].name[char].SQ_box:setcell(4,0, "4")
+		accounts[acc].name[char].SQ_box:setcell(5,0, "5")
+		iup.SetAttribute(accounts[acc].name[char].SQ_box, "READONLY", "YES")
+		iup.SetAttribute(accounts[acc].name[char].SQ_box, "ALIGNMENT0", "ACENTER")
+
+		iup.SetAttribute(accounts[acc].name[char].SQ_box,  "FGCOLOR*:1", Colour_Not_Complete)
+		iup.SetAttribute(accounts[acc].name[char].SQ_box,  "FGCOLOR*:2", Colour_Not_Complete)
+		iup.SetAttribute(accounts[acc].name[char].SQ_box,  "FGCOLOR*:3", Colour_Not_Complete)
+		iup.SetAttribute(accounts[acc].name[char].SQ_box,  "FGCOLOR*:4", Colour_Not_Complete)
+		iup.SetAttribute(accounts[acc].name[char].SQ_box,  "FGCOLOR*:5", Colour_Not_Complete)
+
+		-- Need to keep track of multiple achievements for SQ in Zones. Index them by zone LineColumn.
+		SQ_Info={}
+		SQ_Area={}
+		for id,_ in pairs (SQ_dat) do  -- Load World Boss Name. Info LC is the ZONE Identifier
+				local L = SQ_dat[id].L
+				local C = SQ_dat[id].C
+				key = tostring(L) .. tostring(C)	-- make name key
+				dname = Locations[key]				-- Zone Locations
+					if dname == nil then
+				dname = "key " .. key .." not found"
+				end
+				SQ_Info[key] = {count = 0}
+				SQ_Area[C] =0
+				accounts[acc].name[char].SQ_box:setcell(L,C,dname .. " (0)")
+		end
+
+
+		for id,_ in pairs (SQ_dat) do  -- For Achievements we have..
+			if thischar.ach[id] ~= nil then
+				local L = SQ_dat[id].L
+				local C = SQ_dat[id].C
+				--Set colour of LC
+				local colour_cell = "FGCOLOR" .. L .. ":" .. C
+
+				key = tostring(L) .. tostring(C)	-- make name key
+				dname = Locations[key]				-- Zone Locations
+				if dname == nil then
+					dname = "SQ key " .. key .." not found"
+				end
+				-- Increment count and display
+				SQ_Info[key].count = SQ_Info[key].count+1
+				accounts[acc].name[char].SQ_box:setcell(L,C,dname .. " (" .. SQ_Info[key].count ..")")
+				--Check if done
+				if  SQ_Info[key].count >= 6 then
+					iup.SetAttribute(accounts[acc].name[char].SQ_box, colour_cell , Colour_Complete)
+				end
+				--Add to Area Completion
+				SQ_Area[C] = SQ_Area[C] +1
+			end
+		end
+		--Set Column Colours if 30 done.
+		for i,j in pairs (SQ_Area) do
+		if j > 29 then
+			iup.SetAttribute(accounts[acc].name[char].SQ_box,  "BGCOLOR0:".. tostring(i), Colour_Heading_Complete)
+		end
+		end


-	--	accounts[acc].name[char].WB_box.Redraw= "ALL" -- Doesnt seem to be needed.
+	--	accounts[acc].name[char].SQ_box.Redraw= "ALL" -- Doesnt seem to be needed.



@@ -605,6 +672,11 @@ btn_archive = iup.button{title="Archive", FGCOLOR = "#FF0000"}
 												accounts[acc].name[char].WB_box,
 												iup.fill{}
 											},
+									iup.vbox {	["tabtitle"] =L.SkillQuests,
+												iup.label{title=L.SkillLab,expand="HORIZONTAL"},
+												accounts[acc].name[char].SQ_box,
+												iup.fill{}
+											},
 								},	-- end of tabs for dungeons
 							},
 					}  -- end of tabs for characters vbox
diff --git a/data/data.lua b/data/data.lua
index b24a596..55620d2 100644
--- a/data/data.lua
+++ b/data/data.lua
@@ -242,31 +242,30 @@ WB_dat = {		--World Boss Achievements
 }

 --Quests that have skill points
-Quests = {
+SQ_dat = {
 --StoneFalls
 [201] = {L=1, C=1,
-		"link" ="http://www.uesp.net/wiki/Online:The_Death_of_Balreth" },
+		["link"] ="http://www.uesp.net/wiki/Online:The_Death_of_Balreth" },
 [204] = {L=1, C=1,
-		"link" = "http://www.uesp.net/wiki/Online:The_General%27s_Demise"},
+		["link"] = "http://www.uesp.net/wiki/Online:The_General%27s_Demise"},

 --Alik'r Desert
 [517]	={L=4, C=2,
-		 "link" = "http://www.uesp.net/wiki/Online:Alasan%27s_Plot" },
+		 ["link"] = "http://www.uesp.net/wiki/Online:Alasan%27s_Plot" },
 [518]	={L=4, C=2,
-		"link" = "http://www.uesp.net/wiki/Online:Amputating_the_Hand"},
+		["link"] = "http://www.uesp.net/wiki/Online:Amputating_the_Hand"},

  --Deshaan

 [365] = {L=2, C=1,
-		"link" ="http://www.uesp.net/wiki/Online:The_Judgment_of_Veloth"},
+		["link"] ="http://www.uesp.net/wiki/Online:The_Judgment_of_Veloth"},

 --Shadowfen
 [950] = {L=3, C=1,
-		"link" = "http://www.uesp.net/wiki/Online:The_Dream_of_the_Hist"},
+		["link"] = "http://www.uesp.net/wiki/Online:The_Dream_of_the_Hist"},

 --Glenumbra
 [31] = {L=1, C=2,
-		"link" = "http://www.uesp.net/wiki/Online:Angof_the_Gravesinger_%28quest%29"},
-
+		["link"] = "http://www.uesp.net/wiki/Online:Angof_the_Gravesinger_%28quest%29"},

 }
\ No newline at end of file
diff --git a/data/en.lua b/data/en.lua
index 560e0b4..6ab5fa4 100644
--- a/data/en.lua
+++ b/data/en.lua
@@ -50,6 +50,8 @@ Area_names = {
 		Location = "Location",
 		WBosses = "World Bosses",
 		Zone = "Zone",
+		SkillQuests = "SkillQuests",
+		SkillLab = "Quests Awarding a Skill Point",
 	}

 pub_names = {
diff --git a/data/fr.lua b/data/fr.lua
index 114fc5a..7cc6c27 100644
--- a/data/fr.lua
+++ b/data/fr.lua
@@ -49,6 +49,8 @@ Area_names = {
 		Location = "Location",
 		WBosses = "World Bosses",
 		Zone = "Zone",
+		SkillQuests = "SkillQuests",
+		SkillLab = "Quests Awarding a Skill Point",
 	}

 pub_names = {