diff --git a/HistOffline.lua b/HistOffline.lua index 0b5a1f5..7b0b20f 100644 --- a/HistOffline.lua +++ b/HistOffline.lua @@ -350,28 +350,28 @@ end me.Grp1N_box:setcell(0,i, Area_names[i].long) end --set lines - me.Grp_box:setcell(0,0, L.Level) - me.Grp_box:setcell(1,0, "10+") - me.Grp_box:setcell(2,0, "17+") - me.Grp_box:setcell(3,0, "24+") - me.Grp_box:setcell(4,0, "31+") - me.Grp_box:setcell(5,0, "38+") + me.Grp1N_box:setcell(0,0, L.Level) + me.Grp1N_box:setcell(1,0, "10+") + me.Grp1N_box:setcell(2,0, "17+") + me.Grp1N_box:setcell(3,0, "24+") + me.Grp1N_box:setcell(4,0, "31+") + me.Grp1N_box:setcell(5,0, "38+") - iup.SetAttribute(me.Grp_box, "READONLY", "YES") + iup.SetAttribute(me.Grp1N_box, "READONLY", "YES") -- set all text to red - iup.SetAttribute(me.Grp_box, "FGCOLOR*:1", FG_Colour_Not_Complete) - iup.SetAttribute(me.Grp_box, "FGCOLOR*:2", FG_Colour_Not_Complete) - iup.SetAttribute(me.Grp_box, "FGCOLOR*:3", FG_Colour_Not_Complete) - iup.SetAttribute(me.Grp_box, "FGCOLOR*:4", FG_Colour_Not_Complete) + iup.SetAttribute(me.Grp1N_box, "FGCOLOR*:1", FG_Colour_Not_Complete) + iup.SetAttribute(me.Grp1N_box, "FGCOLOR*:2", FG_Colour_Not_Complete) + iup.SetAttribute(me.Grp1N_box, "FGCOLOR*:3", FG_Colour_Not_Complete) + iup.SetAttribute(me.Grp1N_box, "FGCOLOR*:4", FG_Colour_Not_Complete) -- set text to black if achievement found. for id,_ in pairs (grp1N_dat) do local colour,key if thischar.ach[id] ~= nil then - colour = "FGCOLOR" .. grp1N1_dat[id].L .. ":" .. grp1N_dat[id].C - iup.SetAttribute(me.Grp_box, colour, FG_Colour_Complete) + colour = "FGCOLOR" .. grp1N_dat[id].L .. ":" .. grp1N_dat[id].C + iup.SetAttribute(me.Grp1N_box, colour, FG_Colour_Complete) -- Add char to dungeon key = tostring(grp1N_dat[id].L .. grp1N_dat[id].C) dung.grp1N[key][playerID] = "Y" @@ -380,15 +380,15 @@ end --Set background of heading if all done if thischar.ach[1073] ~= nil then --EP Vanquisher - iup.SetAttribute(me.Grp_box, "BGCOLOR0:1", Colour_Heading_Complete) + iup.SetAttribute(me.Grp1N_box, "BGCOLOR0:1", Colour_Heading_Complete) end if thischar.ach[1074] ~= nil then --DC Vanquisher - iup.SetAttribute(me.Grp_box, "BGCOLOR0:2", Colour_Heading_Complete) + iup.SetAttribute(me.Grp1N_box, "BGCOLOR0:2", Colour_Heading_Complete) end if thischar.ach[1075] ~= nil then --AD Vanquisher - iup.SetAttribute(me.Grp_box, "BGCOLOR0:3", Colour_Heading_Complete) + iup.SetAttribute(me.Grp1N_box, "BGCOLOR0:3", Colour_Heading_Complete) end -- local key = "" @@ -396,10 +396,10 @@ end local L = grp1N_dat[id].L local C = grp1N_dat[id].C local key = tostring(L).. tostring(C) -- make name key - me.Grp_box:setcell(L, C, grp_names[key]) + me.Grp1N_box:setcell(L, C, grp_names[key]) end --- me.Grp_box.Redraw= "ALL" +-- me.Grp1N_box.Redraw= "ALL" -- Create Pub Dungeon Achievements Box========================== me.Pub_box = iup.matrix {numcol=4, numcol_visible=4, numlin=5, widthdef=100} @@ -456,60 +456,7 @@ end me.Pub_box.Redraw= "ALL" - -- Create Vet Dungeon Achievements Box========================== - me.Vet_box= iup.matrix {numcol=3, numcol_visible=3, numlin=5, widthdef=110} - - for i=1, 3 do -- Load headings - me.Vet_box:setcell(0,i, Area_names[i].long) - end - - iup.SetAttribute(me.Vet_box, "READONLY", "YES") - iup.SetAttribute(me.Vet_box, "WIDTH4", "0") -- Hide Coldharbour, Empty - - iup.SetAttribute(me.Vet_box, "FGCOLOR*:1", FG_Colour_Not_Complete) - iup.SetAttribute(me.Vet_box, "FGCOLOR*:2", FG_Colour_Not_Complete) - iup.SetAttribute(me.Vet_box, "FGCOLOR*:3", FG_Colour_Not_Complete) - - - -- Need to keep track of multiple achievements in Vet dungeons. Index them by dungeon LineColumn. - Vet_Info={} - for id,_ in pairs (vet_dat) do -- Load Dungeons Name. Info LC is the Dungeon Identifier - local L = vet_dat[id].L - local C = vet_dat[id].C - local key = tostring(L) .. tostring(C) -- make name key - Vet_Info[key] = {count = 0} - me.Vet_box:setcell(L,C,grp_names[key] .. " (0)") - end - - - for id,_ in pairs (vet_dat) do -- For Achievements we have.. - if thischar.ach[id] ~= nil then - local L = vet_dat[id].L - local C = vet_dat[id].C - --Set colour of LC - local colour = "FGCOLOR" .. L .. ":" .. C - iup.SetAttribute(me.Vet_box, colour, FG_Colour_Complete) - - local key = tostring(L) .. tostring(C) -- make name key - local dname = grp_names[key] -- Vet Dungeons are grp - if dname == nil then - dname = "key " .. key .." not found" - end - -- Increment count and display - Vet_Info[key].count = Vet_Info[key].count+1 - me.Vet_box:setcell(L,C,dname .. " (" .. Vet_Info[key].count ..")") - - -- Add char to dungeon - dung.vet[key][playerID] = "Y" - end - end - - if thischar.ach[1159] ~= nil then -- Coh All special. - iup.SetAttribute(me.Vet_box, "FGCOLOR3:3", Colour_Heading_Complete) - end - - - -- Create Trials Achievements Box========================== + -- Create Trials Achievements Box========================== me.Trials_box= iup.matrix {numcol=1, numcol_visible=1, numlin=4, widthdef=110} -- Load heading @@ -920,7 +867,7 @@ end iup.Append(me.data_tabs, iup.vbox { ["tabtitle"] =L.GrpDungeon, iup.label{title=L.GrpLab,expand="HORIZONTAL"}, - me.Grp_box, + me.Grp1N_box, iup.fill{} }) @@ -930,6 +877,7 @@ end iup.fill{} }) if me.isvet then + --[[ iup.Append(me.data_tabs, iup.vbox { ["tabtitle"] =L.VetDungeon, iup.label{title=L.VetLab,expand="HORIZONTAL"}, me.Vet_box, @@ -943,7 +891,7 @@ end me.Trials_Detail_Zbox, iup.fill{} }) - +--]] end iup.Append(me.data_tabs, iup.vbox { ["tabtitle"] =L.Leveling, @@ -1000,9 +948,9 @@ iup.Append(accounts[acc].char_tabs, accounts[acc].log_tab) -- Create Pub Dungeon Character Box========================= dung.Pub_box = {} - dung.Pub_box = iup.matrix {numcol=#accounts[acc].playerIDs, numlin=#grp2key, widthdef=100} + dung.Pub_box = iup.matrix {numcol=#accounts[acc].playerIDs, numlin=#grp2tokey, widthdef=100} --Set Line titles - for i,key in ipairs(grp2key) do + for i,key in ipairs(grp2tokey) do dung.Pub_box:setcell(i, 0, pub_names[key]) end --set lines @@ -1016,7 +964,7 @@ iup.Append(accounts[acc].char_tabs, accounts[acc].log_tab) iup.SetAttribute(dung.Pub_box, "READONLY", "YES") -- Populate with character data ============================ - for line,key in ipairs(grp2key) do -- over each dungeon + for line,key in ipairs(grp2tokey) do -- over each dungeon -- does that char exist in the table. for i,playerID in ipairs(accounts[acc].playerIDs) do -- over each char in order if dung.pub[key][playerID] == nil then @@ -1038,44 +986,170 @@ iup.Append(accounts[acc].char_tabs, accounts[acc].log_tab) iup.Append(accounts[acc].dung_tabs, dung.Pub_tab) - -- Create Grp Dungeon Character Box========================= - dung.Grp_box = {} - dung.Grp_box = iup.matrix {numcol=#accounts[acc].playerIDs, numlin=#grp2key, widthdef=100} + -- Create Grp1N Dungeon Character Box========================= + + dung.Grp1N_box = {} + dung.Grp1N_box = iup.matrix {numcol=#accounts[acc].playerIDs, numlin=#grp2tokey, widthdef=100} + --Set Line titles + for i, key in ipairs(grp2tokey) do + dung.Grp1N_box:setcell(i, 0, grp_names[key]) + end + --set lines + dung.Grp1N_box:setcell(0,0, L.Location) + --Create Columns for Chars + for i,playerID in ipairs(accounts[acc].playerIDs) do + dung.Grp1N_box:setcell(0, i, playerNames[playerID]) + end + + iup.SetAttribute(dung.Grp1N_box, "READONLY", "YES") + + -- Populate with character data ============================ + for line,key in ipairs(grp2tokey) do -- over each dungeon + -- does that char exist in the table. + for i,playerID in ipairs(accounts[acc].playerIDs) do -- over each char in order + if dung.grp1N[key][playerID] == nil then + dung.Grp1N_box:setcell(line,i, "N") + iup.SetAttribute(dung.Grp1N_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Not_Complete) + else + dung.Grp1N_box:setcell(line,i, "Y") + iup.SetAttribute(dung.Grp1N_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Complete) + end + end + end + + + + -- Create Grp1N Dungeon Tab ================================== + dung.Grp1N_tab = iup.vbox { + ["tabtitle"] =L.Grp1N, + dung.Grp1N_box, + iup.fill{}, + } + iup.Append(accounts[acc].dung_tabs, dung.Grp1N_tab) + + -- Create Grp1V Dungeon Character Box========================= + + dung.Grp1V_box = {} + dung.Grp1V_box = iup.matrix {numcol=#accounts[acc].playerIDs, numlin=#grp2tokey, widthdef=100} --Set Line titles - for i, key in ipairs(grp2key) do - dung.Grp_box:setcell(i, 0, grp_names[key]) + for i, key in ipairs(grp2tokey) do + dung.Grp1V_box:setcell(i, 0, grp_names[key]) end --set lines - dung.Grp_box:setcell(0,0, L.Location) + dung.Grp1V_box:setcell(0,0, L.Location) --Create Columns for Chars for i,playerID in ipairs(accounts[acc].playerIDs) do - dung.Grp_box:setcell(0, i, playerNames[playerID]) + dung.Grp1V_box:setcell(0, i, playerNames[playerID]) end - iup.SetAttribute(dung.Grp_box, "READONLY", "YES") + iup.SetAttribute(dung.Grp1V_box, "READONLY", "YES") -- Populate with character data ============================ - for line,key in ipairs(grp2key) do -- over each dungeon + for line,key in ipairs(grp2tokey) do -- over each dungeon -- does that char exist in the table. for i,playerID in ipairs(accounts[acc].playerIDs) do -- over each char in order - if dung.grp[key][playerID] == nil then - dung.Grp_box:setcell(line,i, "N") - iup.SetAttribute(dung.Grp_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Not_Complete) + if dung.grp1V[key][playerID] == nil then + dung.Grp1V_box:setcell(line,i, "N") + iup.SetAttribute(dung.Grp1V_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Not_Complete) else - dung.Grp_box:setcell(line,i, "Y") - iup.SetAttribute(dung.Grp_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Complete) + dung.Grp1V_box:setcell(line,i, "Y") + iup.SetAttribute(dung.Grp1V_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Complete) end end end - -- Create Grp Dungeon Tab ================================== - dung.Grp_tab = iup.vbox { - ["tabtitle"] =L.Grp, - dung.Grp_box, + + + -- Create Grp1V Dungeon Tab ================================== + dung.Grp1V_tab = iup.vbox { + ["tabtitle"] =L.Grp1V, + dung.Grp1V_box, iup.fill{}, } - iup.Append(accounts[acc].dung_tabs, dung.Grp_tab) + iup.Append(accounts[acc].dung_tabs, dung.Grp1V_tab) + + -- Create Grp1VH Dungeon Character Box========================= + + dung.Grp1VH_box = {} + dung.Grp1VH_box = iup.matrix {numcol=#accounts[acc].playerIDs, numlin=#grp2tokey, widthdef=100} + --Set Line titles + for i, key in ipairs(grp2tokey) do + dung.Grp1VH_box:setcell(i, 0, grp_names[key]) + end + --set lines + dung.Grp1VH_box:setcell(0,0, L.Location) + --Create Columns for Chars + for i,playerID in ipairs(accounts[acc].playerIDs) do + dung.Grp1VH_box:setcell(0, i, playerNames[playerID]) + end + + iup.SetAttribute(dung.Grp1VH_box, "READONLY", "YES") + + -- Populate with character data ============================ + for line,key in ipairs(grp2tokey) do -- over each dungeon + -- does that char exist in the table. + for i,playerID in ipairs(accounts[acc].playerIDs) do -- over each char in order + if dung.grp1VH[key][playerID] == nil then + dung.Grp1VH_box:setcell(line,i, "N") + iup.SetAttribute(dung.Grp1VH_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Not_Complete) + else + dung.Grp1VH_box:setcell(line,i, "Y") + iup.SetAttribute(dung.Grp1VH_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Complete) + end + end + end + + + + -- Create Grp1VH Dungeon Tab ================================== + dung.Grp1VH_tab = iup.vbox { + ["tabtitle"] =L.Grp1VH, + dung.Grp1VH_box, + iup.fill{}, + } + iup.Append(accounts[acc].dung_tabs, dung.Grp1VH_tab) + + + + -- Create Grp2N Dungeon Character Box========================= + + dung.Grp2N_box = {} + dung.Grp2N_box = iup.matrix {numcol=#accounts[acc].playerIDs, numlin=#grp2tokey, widthdef=100} + --Set Line titles + for i, key in ipairs(grp2tokey) do + dung.Grp2N_box:setcell(i, 0, grp_names[key]) + end + --set lines + dung.Grp2N_box:setcell(0,0, L.Location) + --Create Columns for Chars + for i,playerID in ipairs(accounts[acc].playerIDs) do + dung.Grp2N_box:setcell(0, i, playerNames[playerID]) + end + + iup.SetAttribute(dung.Grp2N_box, "READONLY", "YES") + + -- Populate with character data ============================ + for line,key in ipairs(grp2tokey) do -- over each dungeon + -- does that char exist in the table. + for i,playerID in ipairs(accounts[acc].playerIDs) do -- over each char in order + if dung.grp2N[key][playerID] == nil then + dung.Grp2N_box:setcell(line,i, "N") + iup.SetAttribute(dung.Grp2N_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Not_Complete) + else + dung.Grp2N_box:setcell(line,i, "Y") + iup.SetAttribute(dung.Grp2N_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Complete) + end + end + end + + -- Create Grp2N Dungeon Tab ================================== + dung.Grp2N_tab = iup.vbox { + ["tabtitle"] =L.Grp2N, + dung.Grp2N_box, + iup.fill{}, + } + iup.Append(accounts[acc].dung_tabs, dung.Grp2N_tab) -- Create DLC Dungeon Character Box========================= @@ -1107,7 +1181,91 @@ iup.Append(accounts[acc].char_tabs, accounts[acc].log_tab) end end end + + -- Create Grp2V Dungeon Character Box========================= + + dung.Grp2V_box = {} + dung.Grp2V_box = iup.matrix {numcol=#accounts[acc].playerIDs, numlin=#grp2tokey, widthdef=100} + --Set Line titles + for i, key in ipairs(grp2tokey) do + dung.Grp2V_box:setcell(i, 0, grp_names[key]) + end + --set lines + dung.Grp2V_box:setcell(0,0, L.Location) + --Create Columns for Chars + for i,playerID in ipairs(accounts[acc].playerIDs) do + dung.Grp2V_box:setcell(0, i, playerNames[playerID]) + end + + iup.SetAttribute(dung.Grp2V_box, "READONLY", "YES") + -- Populate with character data ============================ + for line,key in ipairs(grp2tokey) do -- over each dungeon + -- does that char exist in the table. + for i,playerID in ipairs(accounts[acc].playerIDs) do -- over each char in order + if dung.grp2V[key][playerID] == nil then + dung.Grp2V_box:setcell(line,i, "N") + iup.SetAttribute(dung.Grp2V_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Not_Complete) + else + dung.Grp2V_box:setcell(line,i, "Y") + iup.SetAttribute(dung.Grp2V_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Complete) + end + end + end + + + + -- Create Grp2V Dungeon Tab ================================== + dung.Grp2V_tab = iup.vbox { + ["tabtitle"] =L.Grp2V, + dung.Grp2V_box, + iup.fill{}, + } + iup.Append(accounts[acc].dung_tabs, dung.Grp2V_tab) + + -- Create Grp2VH Dungeon Character Box========================= + + dung.Grp2VH_box = {} + dung.Grp2VH_box = iup.matrix {numcol=#accounts[acc].playerIDs, numlin=#grp2tokey, widthdef=100} + --Set Line titles + for i, key in ipairs(grp2tokey) do + dung.Grp2VH_box:setcell(i, 0, grp_names[key]) + end + --set lines + dung.Grp2VH_box:setcell(0,0, L.Location) + --Create Columns for Chars + for i,playerID in ipairs(accounts[acc].playerIDs) do + dung.Grp2VH_box:setcell(0, i, playerNames[playerID]) + end + + iup.SetAttribute(dung.Grp2VH_box, "READONLY", "YES") + + -- Populate with character data ============================ + for line,key in ipairs(grp2tokey) do -- over each dungeon + -- does that char exist in the table. + for i,playerID in ipairs(accounts[acc].playerIDs) do -- over each char in order + if dung.grp2VH[key][playerID] == nil then + dung.Grp2VH_box:setcell(line,i, "N") + iup.SetAttribute(dung.Grp2VH_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Not_Complete) + else + dung.Grp2VH_box:setcell(line,i, "Y") + iup.SetAttribute(dung.Grp2VH_box,"BGCOLOR" .. tostring(line) .. ":" .. tostring(i), BG_Colour_Complete) + end + end + end + + + + -- Create Grp2VH Dungeon Tab ================================== + dung.Grp2VH_tab = iup.vbox { + ["tabtitle"] =L.Grp2VH, + dung.Grp2VH_box, + iup.fill{}, + } + iup.Append(accounts[acc].dung_tabs, dung.Grp2VH_tab) + + + -- Create DLC Dungeon Tab ================================== dung.DLC_tab = iup.vbox { ["tabtitle"] =L.DLC, @@ -1121,22 +1279,23 @@ iup.Append(accounts[acc].char_tabs, accounts[acc].log_tab) if #accounts[acc].playerIDs_vet > 0 then -- skip vet and trials if no eligible chars +--[[ -- Create Vet Grp Dungeon Character Box======================= - dung.Vet_box = {} - dung.Vet_box = iup.matrix {numcol=#accounts[acc].playerIDs_vet, numlin=#vet2key, widthdef=100} + dung.Vet1_box = {} + dung.Vet1_box = iup.matrix {numcol=#accounts[acc].playerIDs_vet, numlin=#vet2tokey, widthdef=100} --Set Line titles for i,key in ipairs(vet2key) do - dung.Vet_box:setcell(i, 0, grp_names[key]) + dung.Vet1_box:setcell(i, 0, grp_names[key]) end --set lines - dung.Vet_box:setcell(0,0, L.Location) + dung.Vet1_box:setcell(0,0, L.Location) local col = 0 --Create Columns for Chars for line,playerID in ipairs(accounts[acc].playerIDs_vet) do col = col +1 - dung.Vet_box.numcol = col - dung.Vet_box:setcell(0, line, playerNames[playerID]) + dung.Vet1_box.numcol = col + dung.Vet1_box:setcell(0, line, playerNames[playerID]) end for line,key in ipairs(vet2key) do -- over each dungeon @@ -1156,18 +1315,18 @@ iup.Append(accounts[acc].char_tabs, accounts[acc].log_tab) end - iup.SetAttribute(dung.Vet_box, "READONLY", "YES") + iup.SetAttribute(dung.Vet1_box, "READONLY", "YES") -- Create Vet Dungeon Tab ================================== - dung.Vet_tab = iup.vbox { + dung.Vet1_tab = iup.vbox { ["tabtitle"] =L.Vet, - dung.Vet_box, + dung.Vet1_box, iup.fill{}, } - iup.Append(accounts[acc].dung_tabs, dung.Vet_tab) - + iup.Append(accounts[acc].dung_tabs, dung.Vet1_tab) +--]] -- Create Trials Character Box======================= diff --git a/data/Group2.lua b/data/Group2.lua index 786ee6f..4eb369f 100644 --- a/data/Group2.lua +++ b/data/Group2.lua @@ -50,7 +50,7 @@ grp2V_dat = { grp2VH_dat = { [324]= {L=1, C=1}, -- "Fearless Assaulter" [467]= {L=2, C=1}, -- "Deadly Engineer" -[-- 272]= {L=3, C=1}, -- "Arx Corinium Vanquisher" +-- 272]= {L=3, C=1}, -- "Arx Corinium Vanquisher" -- [357]= {L=4, C=1}, -- "Direfrost Keep Vanquisher" -- [393]= {L=5, C=1}, -- Blessed Crucible diff --git a/data/en/en.lua b/data/en/en.lua index 867c1a3..a2f3732 100644 --- a/data/en/en.lua +++ b/data/en/en.lua @@ -68,7 +68,12 @@ DLC_names = { Characters = "Characters", Dungeons = "Dungeons", Mode = "Showing", - Grp = "Group", + Grp1N = "Mode 1N", + Grp1V = "Mode 1V", + Grp1VH = "Mode 1VH", + Grp2N = "Mode 2N", + Grp2V = "Mode 2V", + Grp2VH = "Mode 2VH", Pub = "Public", Vet = "Veteran", Trials = "Trials", diff --git a/data/keys.lua b/data/keys.lua index 22b3aaf..7da0277 100644 --- a/data/keys.lua +++ b/data/keys.lua @@ -51,7 +51,7 @@ trial2key = { } --list vet dungeons. Not all Grp Dungeons have veteran difficulty -vet2key = { +vet2tokey = { "11", --Fungal Grotto "21", --Darkshade "12", --Spindleclutch