import "Turbine.UI";
import "Turbine.UI.Lotro";
import "Turbine.Gameplay";
import "KragenPlugs.Utils";
import "KragenPlugs.KragenBars";
LoreBars = class( KragenPlugs.KragenBars.ClassBar );
function LoreBars:Constructor()
KragenPlugs.KragenBars.ClassBar.Constructor( self );
self.setuppets = self.setup.setuplmpets;
-- SET AND UPDATE DEFAULT SETTINGS
if (not settings.class) then
settings.class = vars.playerclass;
self:DefaultSettings();
self:ShowSetup();
else
self.settings = settings.classinfo;
if (settings.vers ~= vars.vers) then
self:UpdateSettings();
end
end
-- CLASS SPECIFIC VARIABLES
-- DEFINE THE EFFECT LIST BASED ON CLIENT LANGUAGE
self.DefineEffectList = function()
self.effectlist = { };
-- ENGLISH CLIENT
if (settings.language == 1) then
self.effectlist["AncientWisdom"] = "Ancient Wisdom";
self.effectlist["CombatSummoning"] = "Combat Summoning";
elseif (settings.language == 2) then
self.effectlist["AncientWisdom"] = "Ancient Wisdom";
self.effectlist["CombatSummoning"] = "Combat Summoning";
Turbine.Shell.WriteLine("Some features may not function with the French Client. If you would like to help with French effect names goto http://www.lotrointerface.com/downloads/info384-KragenBars.html");
elseif (settings.language == 3) then
self.effectlist["AncientWisdom"] = "Ancient Wisdom";
self.effectlist["CombatSummoning"] = "Combat Summoning";
Turbine.Shell.WriteLine("Some features may not function with the German Client. If you would like to help with German effect names goto http://www.lotrointerface.com/downloads/info384-KragenBars.html");
end
end
-- BUILD WINDOWS BARS SKILLS AND MULTIS --
-- ALL X, Y, WIDTH, HEIGHT values are in quickslot (ie: 1 width = the width of one quickslot: 35 px);
-- Build Windows SkillWindow( name:String, defaultx:int, defaulty:int, width:int, height:int, settings:table);
self.windows["Debuffs"] = SkillWindow("Debuffs", 1, 1, 7, 1, self.settings["Debuffs"] );
self.windows["BattleBuffs"] = SkillWindow("BattleBuffs", 8, 1, 3, 1, self.settings["BattleBuffs"] );
self.windows["Cures"] = SkillWindow("Cures", 11, 1, 3, 1, self.settings["Cures"] );
self.windows["AncientWisdom"] = SkillWindow("AncientWisdom", 9, 2, 1, 1, self.settings["AncientWisdom"] );
self.windows["Rez"] = SkillWindow("Rez", 10, 1, 1, 1, self.settings["Rez"] );
self.windows["CrowdControl"] = SkillWindow("CrowdControl", 1, 3, 3, 1, self.settings["CrowdControl"] );
self.windows["Heal"] = SkillWindow("Heal", 4, 3, 2, 1, self.settings["Heal"] );
self.windows["Damage"] = SkillWindow("Damage", 1, 2, 8, 1, self.settings["Damage"] );
self.windows["Self"] = SkillWindow("Self", 6, 3, 4, 1, self.settings["Self"] );
self.windows["KotLM"] = SkillWindow("KotLM", 10, 3, 1, 1, self.settings["KotLM"] );
self.windows["Power"] = SkillWindow("Power", 11, 3, 1, 1, self.settings["Power"] );
self.windows["DoTs"] = SkillWindow("DoTs", 1, 4, 3, 1, self.settings["DoTs"] );
self.windows["PetBuffs"] = SkillWindow("PetBuffs", 9, 4, 2, 1, self.settings["PetBuffs"] );
self.windows["Melee"] = SkillWindow("Melee", 4, 4, 2, 1, self.settings["Melee"] );
self.windows["StaticDebuffs"] = SkillWindow("StaticDebuffs", 6, 4, 2, 1, self.settings["StaticDebuffs"] );
self.windows["Pets"] = SkillWindow("Pets", 8, 4, 1, 1, self.settings["Pets"] );
-- Build Bars SkillBar( parent:SkillWindow, x:int, y:int, width:int, height:int, active:Boolean, exclusive:boolean);
self.bars["Debuffs"] = SkillBar(self.windows["Debuffs"], 1, 1, 7, 1, true, false);
self.bars["BattleBuffs"] = SkillBar(self.windows["BattleBuffs"], 1, 1, 3, 1, true, false);
self.bars["Cures"] = SkillBar(self.windows["Cures"], 1, 1, 3, 1, true, false);
self.bars["AncientWisdom"] = SkillBar(self.windows["AncientWisdom"], 1, 1, 1, 1, true, false);
self.bars["Rez"] = SkillBar(self.windows["Rez"], 1, 1, 1, 1, true, false);
self.bars["CrowdControl"] = SkillBar(self.windows["CrowdControl"], 1, 1, 3, 1, true, false);
self.bars["Heal"] = SkillBar(self.windows["Heal"], 1, 1, 2, 1, true, false);
self.bars["Damage"] = SkillBar(self.windows["Damage"], 1, 1, 8, 1, true, false);
self.bars["Self"] = SkillBar(self.windows["Self"], 1, 1, 4, 1, true, false);
self.bars["KotLM"] = SkillBar(self.windows["KotLM"], 1, 1, 1, 1, true, false);
self.bars["Power"] = SkillBar(self.windows["Power"], 1, 1, 1, 1, true, false);
self.bars["DoTs"] = SkillBar(self.windows["DoTs"], 1, 1, 3, 1, true, false);
self.bars["PetBuffs"] = SkillBar(self.windows["PetBuffs"], 1, 1, 2, 1, true, false);
self.bars["Melee"] = SkillBar(self.windows["Melee"], 1, 1, 2, 1, true, false);
self.bars["StaticDebuffs"] = SkillBar(self.windows["StaticDebuffs"], 1, 1, 3, 1, true, false);
self.bars["Pets"] = SkillBar(self.windows["Pets"], 1, 1, 1, 1, true, false);
-- Build Skills SkillSlot( parent:SkillBar, x:int, y:int, active:Boolean, level:int, hexcode:String );
self.skills["SignCommand"] = SkillSlot(self.bars["Debuffs"], 1, 1, true, 1, "0x70003EBB");
self.skills["Firelore"] = SkillSlot(self.bars["Debuffs"], 2, 1, true, 12, "0x70003EBE");
self.skills["Windlore"] = SkillSlot(self.bars["Debuffs"], 3, 1, true, 12, "0x70003EBF");
self.skills["Frostlore"] = SkillSlot(self.bars["Debuffs"], 4, 1, true, 40, "0x70024BE7");
self.skills["AncientCraft"] = SkillSlot(self.bars["Debuffs"], 5, 1, true, 42, "0x7000B627");
self.skills["DispelCorruption"] = SkillSlot(self.bars["Debuffs"], 6, 1, true, 52, "0x7000F7FE");
self.skills["SignSeeAllEnds"] = SkillSlot(self.bars["Debuffs"], 7, 1, true, 58, "0x7000F801");
self.skills["SignRighteousness"] = SkillSlot(self.bars["BattleBuffs"], 1, 1, true, 24, "0x70003EBC");
self.skills["SignVigilance"] = SkillSlot(self.bars["BattleBuffs"], 2, 1, true, 32, "0x70003EBD");
self.skills["Airlore"] = SkillSlot(self.bars["BattleBuffs"], 3, 1, true, { 44, 64 }, { "0x7000B8AC", "0x70020DF7" });
self.skills["Leechcraft"] = SkillSlot(self.bars["Cures"], 1, 1, true, 10, "0x70003132");
self.skills["TendtheSick"] = SkillSlot(self.bars["Cures"], 2, 1, true, 16, "0x70003158");
self.skills["AncientKnowledgeofCures"] = SkillSlot(self.bars["Cures"], 3, 1, true, 62, "0x7001F45F");
self.skills["AncientWisdom"] = SkillSlot(self.bars["AncientWisdom"], 1, 1, true, 28, "0x7000315F");
self.skills["BackfromtheBrink"] = SkillSlot(self.bars["Rez"], 1, 1, true, 32, "0x7000BFC2");
self.skills["BlindingFlash"] = SkillSlot(self.bars["CrowdControl"], 1, 1, true, 10, "0x70003152");
self.skills["BaneFlare"] = SkillSlot(self.bars["CrowdControl"], 2, 1, true, 18, "0x7000B60D");
self.skills["Herblore"] = SkillSlot(self.bars["CrowdControl"], 3, 1, true, 36, "0x70003EC0");
self.skills["BeaconofHope"] = SkillSlot(self.bars["Heal"], 1, 1, true, 8, "0x70003123");
self.skills["SharethePower"] = SkillSlot(self.bars["Heal"], 2, 1, true, 22, "0x7000316B");
self.skills["BurningEmbers"] = SkillSlot(self.bars["Damage"], 1, 1, true, 1, "0x70003EB4");
self.skills["TestofWill"] = SkillSlot(self.bars["Damage"], 2, 1, true, 6, "0x70003EB9");
self.skills["GustofWind"] = SkillSlot(self.bars["Damage"], 3, 1, true, 8, "0x70003EB7");
self.skills["CrackedEarth"] = SkillSlot(self.bars["Damage"], 4, 1, true, 14, "0x70003143");
self.skills["LightoftheRisingDawn"] = SkillSlot(self.bars["Damage"], 5, 1, true, 18, "0x70003EC2");
self.skills["Stormlore"] = SkillSlot(self.bars["Damage"], 6, 1, true, 48, "0x7000B63C");
self.skills["LightningStorm"] = SkillSlot(self.bars["Damage"], 7, 1, true, 50, "0x7000B726");
self.skills["MarchoftheEnts"] = SkillSlot(self.bars["Damage"], 8, 1, self.settings["Damage"].ents, 41, "0x70000FA7");
self.skills["InnerFlame"] = SkillSlot(self.bars["Self"], 1, 1, true, 4, "0x70003EB6");
self.skills["WisdomoftheCouncil"] = SkillSlot(self.bars["Self"], 2, 1, true, 20, "0x7000314B");
self.skills["CalltotheValar"] = SkillSlot(self.bars["Self"], 3, 1, true, 34, "0x70003EC1");
self.skills["CombatSummoning"] = SkillSlot(self.bars["Self"], 4, 1, self.settings["Pets"].bogtrait, 58, "0x70024948");
self.skills["KotLM"] = SkillSlot(self.bars["KotLM"], 1, 1, true, 20, "0x7000C588");
self.skills["PowerofKnowledge"] = SkillSlot(self.bars["Power"], 1, 1, true, 16, "0x70003116");
self.skills["SignWizardry"] = SkillSlot(self.bars["DoTs"], 1, 1, true, 2, "0x70003EBA");
self.skills["SignWizardsFire"] = SkillSlot(self.bars["DoTs"], 2, 1, true, 54, "0x7000F7FF");
self.skills["StickyGourd"] = SkillSlot(self.bars["DoTs"], 3, 1, true, 60, "0x7000F74D");
self.skills["Staffstrike"] = SkillSlot(self.bars["Melee"], 1, 1, true, 1, "0x7000310D");
self.skills["Staffsweep"] = SkillSlot(self.bars["Melee"], 2, 1, true, 30, "0x70024824");
self.skills["StickyTar"] = SkillSlot(self.bars["StaticDebuffs"], 2, 1, true, 46, "0x7000B62B");
-- Build MultiSlots SkillMultiSlot( parent:SkillBar, x:int, y:int, active:Boolean );
-- multi:AddShortCut(name:String, level:int, hex:String);
self.multi["WardingSlot"] = SkillMultiSlot(self.bars["StaticDebuffs"], 1, 1, true);
self.multi["WardingSlot"]:AddShortCut("WardingDead", 26, "0x7000B625");
self.multi["WardingSlot"]:AddShortCut("WardingNature", 38, "0x7000B623");
self.multi["WardingSlot"]:AddShortCut("WardingDrakes", 40, "0x7000B624");
self.multi["WardingSlot"]:LevelCheck();
self.multi["PetBuffsSlot"] = SkillMultiSlot(self.bars["PetBuffs"], 1, 1, true);
self.multi["PetBuffsSlot"]:AddShortCut("SignRage", 4, "0x70003139");
self.multi["PetBuffsSlot"]:AddShortCut("SignProtection",6, "0x7000312B");
self.multi["PetBuffsSlot"]:LevelCheck();
self.multi["PetFoodSlot"] = ItemMultiSlot(self.bars["PetBuffs"], 2, 1, true);
self.multi["PetFoodSlot"]:AddShortCut("Crumbs", self.settings["Quickslots"].crumbs["active"], self.settings["Quickslots"].crumbs["type"], self.settings["Quickslots"].crumbs["data"]);
self.multi["PetFoodSlot"]:AddShortCut("Oats", self.settings["Quickslots"].oats["active"], self.settings["Quickslots"].oats["type"], self.settings["Quickslots"].oats["data"]);
self.multi["PetFoodSlot"]:AddShortCut("Meat", self.settings["Quickslots"].meat["active"], self.settings["Quickslots"].meat["type"], self.settings["Quickslots"].meat["data"]);
self.multi["PetFoodSlot"]:AddShortCut("Water", self.settings["Quickslots"].water["active"], self.settings["Quickslots"].water["type"], self.settings["Quickslots"].water["data"]);
self.multi["PetsSlot"] = SkillMultiSlot(self.bars["Pets"], 1, 1, true);
if (self.settings["Pets"].raven) then self.multi["PetsSlot"]:AddShortCut("Ravenlore", 2, "0x70003EB5", 1); end
if (self.settings["Pets"].ravenb) then self.multi["PetsSlot"]:AddShortCut("Bloodraven", 2, "0x70024A63", 1); end
if (self.settings["Pets"].ravenm) then self.multi["PetsSlot"]:AddShortCut("Mottledwingraven", 2, "0x70024A60", 1); end
if (self.settings["Pets"].ravenf) then self.multi["PetsSlot"]:AddShortCut("Frostraven", 2, "0x70024A62", 1); end
if (self.settings["Pets"].ravens) then self.multi["PetsSlot"]:AddShortCut("Stormraven", 2, "0x70024A5F", 1); end
if (self.settings["Pets"].ravenw) then self.multi["PetsSlot"]:AddShortCut("Weatheredraven", 2, "0x70024A5D", 1); end
if (self.settings["Pets"].bear) then self.multi["PetsSlot"]:AddShortCut("FriendofBears", 14, "0x70003EB8", 2); end
if (self.settings["Pets"].bearb) then self.multi["PetsSlot"]:AddShortCut("BlackBear", 14, "0x70024A6E", 2); end
if (self.settings["Pets"].bearp) then self.multi["PetsSlot"]:AddShortCut("PolarBear", 14, "0x70024A6C", 2); end
if (self.settings["Pets"].bearwp) then self.multi["PetsSlot"]:AddShortCut("WildpawBear", 14, "0x70024A65", 2); end
if (self.settings["Pets"].beartc) then self.multi["PetsSlot"]:AddShortCut("TundraBearCub", 14, "0x70024A69", 2); end
if (self.settings["Pets"].bearbp) then self.multi["PetsSlot"]:AddShortCut("BlackpawBear", 14, "0x70024A68", 2); end
if (self.settings["Pets"].bearw) then self.multi["PetsSlot"]:AddShortCut("WeatheredBear", 14, "0x70024A66", 2); end
if (self.settings["Pets"].lynx) then self.multi["PetsSlot"]:AddShortCut("Lynxspeech", 30, "0x7000B8D3", 3); end
if (self.settings["Pets"].lynxs) then self.multi["PetsSlot"]:AddShortCut("SpottedLynx", 30, "0x70024A73", 3); end
if (self.settings["Pets"].lynxo) then self.multi["PetsSlot"]:AddShortCut("OnyxLynx", 30, "0x70024A7A", 3); end
if (self.settings["Pets"].lynxt) then self.multi["PetsSlot"]:AddShortCut("TundraLynx", 30, "0x70024A74", 3); end
if (self.settings["Pets"].lynxg) then self.multi["PetsSlot"]:AddShortCut("GreyLynx", 30, "0x70024A75", 3); end
if (self.settings["Pets"].lynxm) then self.multi["PetsSlot"]:AddShortCut("MountainLynx", 30, "0x70024A79", 3); end
if (self.settings["Pets"].eagle and self.settings["Pets"].eagletrait) then self.multi["PetsSlot"]:AddShortCut("Eaglefriend", 45, "0x70000FB2", 4); end
if (self.settings["Pets"].eaglea and self.settings["Pets"].eagletrait) then self.multi["PetsSlot"]:AddShortCut("AshenEagle", 45, "0x70024A7E", 4); end
if (self.settings["Pets"].eagles and self.settings["Pets"].eagletrait) then self.multi["PetsSlot"]:AddShortCut("SnowcrestEagle", 45, "0x70024A80", 4); end
if (self.settings["Pets"].eaglee and self.settings["Pets"].eagletrait) then self.multi["PetsSlot"]:AddShortCut("EmberEagle", 45, "0x70024A84", 4); end
if (self.settings["Pets"].eaglet and self.settings["Pets"].eagletrait) then self.multi["PetsSlot"]:AddShortCut("TundraEagle", 45, "0x70024A82", 4); end
if (self.settings["Pets"].saber) then self.multi["PetsSlot"]:AddShortCut("FriendofFelineHunters", 56, "0x7000F530", 5); end
if (self.settings["Pets"].saberd) then self.multi["PetsSlot"]:AddShortCut("DuskySabercat", 56, "0x70024A8D", 5); end
if (self.settings["Pets"].sabersp) then self.multi["PetsSlot"]:AddShortCut("SpottedSabercat", 56, "0x70024A89", 5); end
if (self.settings["Pets"].saberg) then self.multi["PetsSlot"]:AddShortCut("GreySabercat", 56, "0x70024A8F", 5); end
if (self.settings["Pets"].saberdw) then self.multi["PetsSlot"]:AddShortCut("DeepwoodSabercat", 56, "0x70024A8B", 5); end
if (self.settings["Pets"].sabers) then self.multi["PetsSlot"]:AddShortCut("StripedSabercat", 56, "0x70024A8A", 5); end
if (self.settings["Pets"].sabero) then self.multi["PetsSlot"]:AddShortCut("OnyxSabercat", 56, "0x70024A87", 5); end
if (self.settings["Pets"].bog and self.settings["Pets"].bogtrait) then self.multi["PetsSlot"]:AddShortCut("Naturefriend", 58, "0x7000F54D", 6); end
if (self.settings["Pets"].bogs and self.settings["Pets"].bogtrait) then self.multi["PetsSlot"]:AddShortCut("SwampGuardian", 58, "0x70024A93", 6); end
if (self.settings["Pets"].bogm and self.settings["Pets"].bogtrait) then self.multi["PetsSlot"]:AddShortCut("MountainGuardian", 58, "0x70024A95", 6); end
if (self.settings["Pets"].bogt and self.settings["Pets"].bogtrait) then self.multi["PetsSlot"]:AddShortCut("TundraGuardian", 58, "0x70024A91", 6); end
self.multi["PetsSlot"]:LevelCheck();
-- SET COMBAT STATES
self.multi["PetsSlot"]:SetCombat(false, true);
self.skills["BackfromtheBrink"]:SetCombat(false, true);
-- CLASS SPECIFIC SETUP/DEFAULT CODE
-- EVENTS;
-- INITIALIZE BARS
self:InitBars();
self:CombatChange(vars.player:IsInCombat());
end
-- ADD EFFECT EVENT
function LoreBars:AddEffect( effectIndex )
local effect = vars.player:GetEffects():Get( effectIndex );
if (effect:GetName() == self.effectlist["AncientWisdom"]) then
self.skills["AncientWisdom"]:SetState(true , false, effect:GetID());
self.skills["AncientWisdom"]:SetHover(true);
if (self.settings["AncientWisdom"].earlywarning) then
self.skills["AncientWisdom"]:StartTimer(effect:GetDuration() * .70, true);
end
elseif (effect:GetName() == self.effectlist["CombatSummoning"]) then
self.multi["PetsSlot"]:SetState(true, true, effect:GetID());
self.multi["PetsSlot"]:SetCombat(true, true);
end
end
-- REMOVE EFFECT EVENT
function LoreBars:RemoveEffect( effect )
-- SetState can be called on both bars and skills
-- it will store the incoming effect id and flag the state as well as trigger visibility
-- SetState(effectstate:Boolean, visibility:Boolean, effectid:int);
if (effect:GetName() == self.effectlist["AncientWisdom"]) then
self.skills["AncientWisdom"]:SetState(false, true, effect:GetID());
self.skills["AncientWisdom"]:SetHover(false);
elseif (effect:GetName() == self.effectlist["CombatSummoning"]) then
self.multi["PetSlot"]:SetState(false, true, effect:GetID());
self.multi["PetSlot"]:SetCombat(false, true);
end
end
-- DEFAULT SETTINGS
function LoreBars:DefaultSettings()
self.settings = { };
local windowlist = {"Debuffs", "BattleBuffs", "Cures", "AncientWisdom", "Rez", "CrowdControl", "Heal", "Damage", "Self", "KotLM", "Power", "DoTs", "PetBuffs", "Melee", "StaticDebuffs", "Pets"};
for k,v in pairs(windowlist) do
self.settings[v] = { active = true, x = 0, y = 0, rotate = 0 };
end
self.settings["AncientWisdom"].earlywarning = true;
self.settings["Damage"].ents = false;
self.settings["Pets"].bogtrait = false;
self.settings["Pets"].eagletrait = false;
self.settings["Pets"].raven = true;
self.settings["Pets"].ravenb = false;
self.settings["Pets"].ravenm = false;
self.settings["Pets"].ravenf = false;
self.settings["Pets"].ravens = false;
self.settings["Pets"].ravenw = false;
self.settings["Pets"].bear = true;
self.settings["Pets"].bearb = false;
self.settings["Pets"].bearp = false;
self.settings["Pets"].bearwp = false;
self.settings["Pets"].beartc = false;
self.settings["Pets"].bearbp = false;
self.settings["Pets"].bearw = false;
self.settings["Pets"].lynx = true;
self.settings["Pets"].lynxs = false;
self.settings["Pets"].lynxo = false;
self.settings["Pets"].lynxt = false;
self.settings["Pets"].lynxg = false;
self.settings["Pets"].lynxm = false;
self.settings["Pets"].bog = false;
self.settings["Pets"].bogs = false;
self.settings["Pets"].bogm = false;
self.settings["Pets"].bogt = false;
self.settings["Pets"].eagle = false;
self.settings["Pets"].eaglea = false;
self.settings["Pets"].eagles = false;
self.settings["Pets"].eaglee = false;
self.settings["Pets"].eaglet = false;
self.settings["Pets"].saber = true;
self.settings["Pets"].saberd = false;
self.settings["Pets"].sabersp = false;
self.settings["Pets"].saberg = false;
self.settings["Pets"].saberdw = false;
self.settings["Pets"].sabers = false;
self.settings["Pets"].sabero = false;
self.settings["Quickslots"] = { };
self.settings["Quickslots"].crumbs = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
self.settings["Quickslots"].oats = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
self.settings["Quickslots"].meat = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
self.settings["Quickslots"].water = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
end
-- UPDATE SETTINGS
function LoreBars:UpdateSettings()
if(settings.vers < 3.20) then
self.settings["Quickslots"] = { };
self.settings["Quickslots"].crumbs = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
self.settings["Quickslots"].oats = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
self.settings["Quickslots"].meat = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
self.settings["Quickslots"].water = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
end
settings.vers = vars.vers;
end
-- DISPLAY SETUP WINDOW AND SET ALL CHECKBOXES COMBOBOXES SLIDERS AND QUICKSLOTS
function LoreBars:ShowSetup()
self.setup:SetVisible(true);
self.setupbb.opacityslider:SetValue(settings.opacity * 100);
self.setupbb.checkboxlock:SetChecked(settings.lockslots);
self.setupbb.checkboxgrid:SetChecked(settings.snaptogrid);
self.setupbb.combolangbox:SetSelection(settings.language);
self.setupbb.checkboxbb1:SetText("Debuffs");
self.setupbb.checkboxbb1:SetChecked (self.settings["Debuffs"].active);
self.setupbb.checkboxbb1:SetVisible(true);
self.setupbb.checkboxbb2:SetText("Battle Buffs");
self.setupbb.checkboxbb2:SetChecked (self.settings["BattleBuffs"].active);
self.setupbb.checkboxbb2:SetVisible(true);
self.setupbb.checkboxbb3:SetText("Cures");
self.setupbb.checkboxbb3:SetChecked (self.settings["Cures"].active);
self.setupbb.checkboxbb3:SetVisible(true);
self.setupbb.checkboxbb4:SetText("Ancient Wisdom");
self.setupbb.checkboxbb4:SetChecked (self.settings["AncientWisdom"].active);
self.setupbb.checkboxbb4:SetVisible(true);
self.setupbb.checkboxbb5:SetText("Rez");
self.setupbb.checkboxbb5:SetChecked (self.settings["Rez"].active);
self.setupbb.checkboxbb5:SetVisible(true);
self.setupbb.checkboxbb6:SetText("Crowd Control");
self.setupbb.checkboxbb6:SetChecked (self.settings["CrowdControl"].active);
self.setupbb.checkboxbb6:SetVisible(true);
self.setupbb.checkboxbb7:SetText("Heal");
self.setupbb.checkboxbb7:SetChecked (self.settings["Heal"].active);
self.setupbb.checkboxbb7:SetVisible(true);
self.setupbb.checkboxbb8:SetText("Damage");
self.setupbb.checkboxbb8:SetChecked (self.settings["Damage"].active);
self.setupbb.checkboxbb8:SetVisible(true);
self.setupbb.checkboxbb9:SetText("Self");
self.setupbb.checkboxbb9:SetChecked (self.settings["Self"].active);
self.setupbb.checkboxbb9:SetVisible(true);
self.setupbb.checkboxbb10:SetText("KotLM");
self.setupbb.checkboxbb10:SetChecked (self.settings["KotLM"].active);
self.setupbb.checkboxbb10:SetVisible(true);
self.setupbb.checkboxbb11:SetText("Power");
self.setupbb.checkboxbb11:SetChecked (self.settings["Power"].active);
self.setupbb.checkboxbb11:SetVisible(true);
self.setupbb.checkboxbb12:SetText("DoTs");
self.setupbb.checkboxbb12:SetChecked (self.settings["DoTs"].active);
self.setupbb.checkboxbb12:SetVisible(true);
self.setupbb.checkboxbb13:SetText("Pet Buffs");
self.setupbb.checkboxbb13:SetChecked (self.settings["PetBuffs"].active);
self.setupbb.checkboxbb13:SetVisible(true);
self.setupbb.checkboxbb14:SetText("Melee");
self.setupbb.checkboxbb14:SetChecked (self.settings["Melee"].active);
self.setupbb.checkboxbb14:SetVisible(true);
self.setupbb.checkboxbb15:SetText("Static Debuffs");
self.setupbb.checkboxbb15:SetChecked (self.settings["StaticDebuffs"].active);
self.setupbb.checkboxbb15:SetVisible(true);
self.setupbb.checkboxbb16:SetText("Pets");
self.setupbb.checkboxbb16:SetChecked (self.settings["Pets"].active);
self.setupbb.checkboxbb16:SetVisible(true);
self.setupf.checkboxf1:SetText("March of the Ents");
self.setupf.checkboxf1:SetChecked (self.settings["Damage"].ents);
self.setupf.checkboxf1:SetVisible(true);
self.setupf.checkboxf2:SetText("Nature-friend");
self.setupf.checkboxf2:SetChecked (self.settings["Pets"].bogtrait);
self.setupf.checkboxf2:SetVisible(true);
self.setupf.checkboxf3:SetText("Eagle-friend");
self.setupf.checkboxf3:SetChecked (self.settings["Pets"].eagletrait);
self.setupf.checkboxf3:SetVisible(true);
self.setupf.checkboxf10:SetText("Anc. Wis. Early Warn");
self.setupf.checkboxf10:SetChecked (self.settings["AncientWisdom"].earlywarning);
self.setupf.checkboxf10:SetVisible(true);
self.setupqs.quickslot1:SetVisible(true);
pcall(function() self.setupqs.quickslot1:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].crumbs["type"], self.settings["Quickslots"].crumbs["data"] ) ); end);
self.setupqs.quickslot1cb:SetText("Bag of Crumbs");
self.setupqs.quickslot1cb:SetChecked(self.settings["Quickslots"].crumbs["active"]);
self.setupqs.quickslot1cb:SetVisible(true);
self.setupqs.quickslot2:SetVisible(true);
pcall(function() self.setupqs.quickslot2:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].oats["type"], self.settings["Quickslots"].oats["data"] ) ); end);
self.setupqs.quickslot2cb:SetText("Pot of Honey and Oats");
self.setupqs.quickslot2cb:SetChecked(self.settings["Quickslots"].oats["active"]);
self.setupqs.quickslot2cb:SetVisible(true);
self.setupqs.quickslot3:SetVisible(true);
pcall(function() self.setupqs.quickslot3:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].meat["type"], self.settings["Quickslots"].meat["data"] ) ); end);
self.setupqs.quickslot3cb:SetText("Cut of Meat");
self.setupqs.quickslot3cb:SetChecked(self.settings["Quickslots"].meat["active"]);
self.setupqs.quickslot3cb:SetVisible(true);
self.setupqs.quickslot4:SetVisible(true);
pcall(function() self.setupqs.quickslot4:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].water["type"], self.settings["Quickslots"].water["data"] ) ); end);
self.setupqs.quickslot4cb:SetText("Bowl of Water");
self.setupqs.quickslot4cb:SetChecked(self.settings["Quickslots"].water["active"]);
self.setupqs.quickslot4cb:SetVisible(true);
self.setup.buttons[4]:SetVisible(true);
self.setuppets.checkboxlmr1:SetChecked(self.settings["Pets"].raven);
self.setuppets.checkboxlmr2:SetChecked(self.settings["Pets"].ravenb);
self.setuppets.checkboxlmr3:SetChecked(self.settings["Pets"].ravenm);
self.setuppets.checkboxlmr4:SetChecked(self.settings["Pets"].ravenf);
self.setuppets.checkboxlmr5:SetChecked(self.settings["Pets"].ravens);
self.setuppets.checkboxlmr6:SetChecked(self.settings["Pets"].ravenw);
self.setuppets.checkboxlmb1:SetChecked(self.settings["Pets"].bear);
self.setuppets.checkboxlmb2:SetChecked(self.settings["Pets"].bearb);
self.setuppets.checkboxlmb3:SetChecked(self.settings["Pets"].bearp);
self.setuppets.checkboxlmb4:SetChecked(self.settings["Pets"].bearwp);
self.setuppets.checkboxlmb5:SetChecked(self.settings["Pets"].beartc);
self.setuppets.checkboxlmb6:SetChecked(self.settings["Pets"].bearbp);
self.setuppets.checkboxlmb7:SetChecked(self.settings["Pets"].bearw);
self.setuppets.checkboxlml1:SetChecked(self.settings["Pets"].lynx);
self.setuppets.checkboxlml2:SetChecked(self.settings["Pets"].lynxs);
self.setuppets.checkboxlml3:SetChecked(self.settings["Pets"].lynxo);
self.setuppets.checkboxlml4:SetChecked(self.settings["Pets"].lynxt);
self.setuppets.checkboxlml5:SetChecked(self.settings["Pets"].lynxg);
self.setuppets.checkboxlml6:SetChecked(self.settings["Pets"].lynxm);
self.setuppets.checkboxlmbg1:SetChecked(self.settings["Pets"].bog);
self.setuppets.checkboxlmbg2:SetChecked(self.settings["Pets"].bogs);
self.setuppets.checkboxlmbg3:SetChecked(self.settings["Pets"].bogm);
self.setuppets.checkboxlmbg4:SetChecked(self.settings["Pets"].bogt);
self.setuppets.checkboxlme1:SetChecked(self.settings["Pets"].eagle);
self.setuppets.checkboxlme2:SetChecked(self.settings["Pets"].eaglea);
self.setuppets.checkboxlme3:SetChecked(self.settings["Pets"].eagles);
self.setuppets.checkboxlme4:SetChecked(self.settings["Pets"].eaglee);
self.setuppets.checkboxlme5:SetChecked(self.settings["Pets"].eaglet);
self.setuppets.checkboxlms1:SetChecked(self.settings["Pets"].saber);
self.setuppets.checkboxlms2:SetChecked(self.settings["Pets"].saberd);
self.setuppets.checkboxlms3:SetChecked(self.settings["Pets"].sabersp);
self.setuppets.checkboxlms4:SetChecked(self.settings["Pets"].saberg);
self.setuppets.checkboxlms5:SetChecked(self.settings["Pets"].saberdw);
self.setuppets.checkboxlms6:SetChecked(self.settings["Pets"].sabers);
self.setuppets.checkboxlms7:SetChecked(self.settings["Pets"].sabero);
end
-- SET ALL VARIABLES OFF OF SETUP WINDOW
function LoreBars:SetupClosing()
self.settings["Debuffs"].active = self.setupbb.checkboxbb1:IsChecked();
self.settings["BattleBuffs"].active = self.setupbb.checkboxbb2:IsChecked();
self.settings["Cures"].active = self.setupbb.checkboxbb3:IsChecked();
self.settings["AncientWisdom"].active = self.setupbb.checkboxbb4:IsChecked();
self.settings["Rez"].active = self.setupbb.checkboxbb5:IsChecked();
self.settings["CrowdControl"].active = self.setupbb.checkboxbb6:IsChecked();
self.settings["Heal"].active = self.setupbb.checkboxbb7:IsChecked();
self.settings["Damage"].active = self.setupbb.checkboxbb8:IsChecked();
self.settings["Self"].active = self.setupbb.checkboxbb9:IsChecked();
self.settings["KotLM"].active = self.setupbb.checkboxbb10:IsChecked();
self.settings["Power"].active = self.setupbb.checkboxbb11:IsChecked();
self.settings["DoTs"].active = self.setupbb.checkboxbb12:IsChecked();
self.settings["PetBuffs"].active = self.setupbb.checkboxbb13:IsChecked();
self.settings["Melee"].active = self.setupbb.checkboxbb14:IsChecked();
self.settings["StaticDebuffs"].active = self.setupbb.checkboxbb15:IsChecked();
self.settings["Pets"].active = self.setupbb.checkboxbb16:IsChecked();
self.settings["Damage"].ents = self.setupf.checkboxf1:IsChecked();
self.settings["Pets"].bogtrait = self.setupf.checkboxf2:IsChecked();
self.settings["Pets"].eagletrait = self.setupf.checkboxf3:IsChecked();
self.settings["AncientWisdom"].earlywarning = self.setupf.checkboxf10:IsChecked();
if (self.setupqs.quickslot1:GetShortcut():GetData() ~= "" ) then
self.settings["Quickslots"].crumbs = { active = self.setupqs.quickslot1cb:IsChecked(), type = self.setupqs.quickslot1:GetShortcut():GetType(), data = self.setupqs.quickslot1:GetShortcut():GetData() };
else
self.settings["Quickslots"].crumbs = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
end
if (self.setupqs.quickslot2:GetShortcut():GetData() ~= "" ) then
self.settings["Quickslots"].oats = { active = self.setupqs.quickslot2cb:IsChecked(), type = self.setupqs.quickslot2:GetShortcut():GetType(), data = self.setupqs.quickslot2:GetShortcut():GetData() };
else
self.settings["Quickslots"].oats = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
end
if (self.setupqs.quickslot2:GetShortcut():GetData() ~= "" ) then
self.settings["Quickslots"].meat = { active = self.setupqs.quickslot3cb:IsChecked(), type = self.setupqs.quickslot3:GetShortcut():GetType(), data = self.setupqs.quickslot3:GetShortcut():GetData() };
else
self.settings["Quickslots"].meat = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
end
if (self.setupqs.quickslot4:GetShortcut():GetData() ~= "" ) then
self.settings["Quickslots"].water = { active = self.setupqs.quickslot4cb:IsChecked(), type = self.setupqs.quickslot4:GetShortcut():GetType(), data = self.setupqs.quickslot4:GetShortcut():GetData() };
else
self.settings["Quickslots"].water = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
end
self.settings["Pets"].raven = self.setuppets.checkboxlmr1:IsChecked();
self.settings["Pets"].ravenb = self.setuppets.checkboxlmr2:IsChecked();
self.settings["Pets"].ravenm = self.setuppets.checkboxlmr3:IsChecked();
self.settings["Pets"].ravenf = self.setuppets.checkboxlmr4:IsChecked();
self.settings["Pets"].ravens = self.setuppets.checkboxlmr5:IsChecked();
self.settings["Pets"].ravenw = self.setuppets.checkboxlmr6:IsChecked();
self.settings["Pets"].bear = self.setuppets.checkboxlmb1:IsChecked();
self.settings["Pets"].bearb = self.setuppets.checkboxlmb2:IsChecked();
self.settings["Pets"].bearp = self.setuppets.checkboxlmb3:IsChecked();
self.settings["Pets"].bearwp = self.setuppets.checkboxlmb4:IsChecked();
self.settings["Pets"].beartc = self.setuppets.checkboxlmb5:IsChecked();
self.settings["Pets"].bearbp = self.setuppets.checkboxlmb6:IsChecked();
self.settings["Pets"].bearw = self.setuppets.checkboxlmb7:IsChecked();
self.settings["Pets"].lynx = self.setuppets.checkboxlml1:IsChecked();
self.settings["Pets"].lynxs = self.setuppets.checkboxlml2:IsChecked();
self.settings["Pets"].lynxo = self.setuppets.checkboxlml3:IsChecked();
self.settings["Pets"].lynxt = self.setuppets.checkboxlml4:IsChecked();
self.settings["Pets"].lynxg = self.setuppets.checkboxlml5:IsChecked();
self.settings["Pets"].lynxm = self.setuppets.checkboxlml6:IsChecked();
self.settings["Pets"].bog = self.setuppets.checkboxlmbg1:IsChecked();
self.settings["Pets"].bogs = self.setuppets.checkboxlmbg2:IsChecked();
self.settings["Pets"].bogm = self.setuppets.checkboxlmbg3:IsChecked();
self.settings["Pets"].bogt = self.setuppets.checkboxlmbg4:IsChecked();
self.settings["Pets"].eagle = self.setuppets.checkboxlme1:IsChecked();
self.settings["Pets"].eaglea = self.setuppets.checkboxlme2:IsChecked();
self.settings["Pets"].eagles = self.setuppets.checkboxlme3:IsChecked();
self.settings["Pets"].eaglee = self.setuppets.checkboxlme4:IsChecked();
self.settings["Pets"].eaglet = self.setuppets.checkboxlme5:IsChecked();
self.settings["Pets"].saber = self.setuppets.checkboxlms1:IsChecked();
self.settings["Pets"].saberd = self.setuppets.checkboxlms2:IsChecked();
self.settings["Pets"].sabersp = self.setuppets.checkboxlms3:IsChecked();
self.settings["Pets"].saberg = self.setuppets.checkboxlms4:IsChecked();
self.settings["Pets"].saberdw = self.setuppets.checkboxlms5:IsChecked();
self.settings["Pets"].sabers = self.setuppets.checkboxlms6:IsChecked();
self.settings["Pets"].sabero = self.setuppets.checkboxlms7:IsChecked();
settings.opacity = (self.setupbb.opacityslider:GetValue() / 100);
settings.lockslots = self.setupbb.checkboxlock:IsChecked();
settings.snaptogrid = self.setupbb.checkboxgrid:IsChecked();
settings.language = self.setupbb.combolangbox:GetSelection();
self:SaveSettings();
self:Refresh();
end
-- REFRESH SKILLS AND BARS
function LoreBars:Refresh()
-- GENERIC REFRESH (Required for all classes)
self:RefreshBars();
-- REDEFINE EFFECTLIST IN CASE OF LANGUAGE CHANGE
self.DefineEffectList();
-- CLASS SPECIFIC REFRESH
-- Setup Features
self.skills["MarchoftheEnts"]:SetActive(self.settings["Damage"].ents);
-- Build Multi Slots
self.multi["WardingSlot"]:Clear();
self.multi["WardingSlot"]:AddShortCut("WardingDead", 26, "0x7000B625");
self.multi["WardingSlot"]:AddShortCut("WardingNature", 38, "0x7000B623");
self.multi["WardingSlot"]:AddShortCut("WardingDrakes", 40, "0x7000B624");
self.multi["WardingSlot"]:LevelCheck();
self.multi["PetBuffsSlot"]:Clear();
self.multi["PetBuffsSlot"]:AddShortCut("SignRage", 4, "0x70003139");
self.multi["PetBuffsSlot"]:AddShortCut("SignProtection",6, "0x7000312B");
self.multi["PetBuffsSlot"]:LevelCheck();
self.multi["PetFoodSlot"]:Clear();
self.multi["PetFoodSlot"]:AddShortCut("Crumbs", self.settings["Quickslots"].crumbs["active"], self.settings["Quickslots"].crumbs["type"], self.settings["Quickslots"].crumbs["data"]);
self.multi["PetFoodSlot"]:AddShortCut("Oats", self.settings["Quickslots"].oats["active"], self.settings["Quickslots"].oats["type"], self.settings["Quickslots"].oats["data"]);
self.multi["PetFoodSlot"]:AddShortCut("Meat", self.settings["Quickslots"].meat["active"], self.settings["Quickslots"].meat["type"], self.settings["Quickslots"].meat["data"]);
self.multi["PetFoodSlot"]:AddShortCut("Water", self.settings["Quickslots"].water["active"], self.settings["Quickslots"].water["type"], self.settings["Quickslots"].water["data"]);
self.multi["PetFoodSlot"]:Refresh();
self.multi["PetsSlot"]:Clear();
if (self.settings["Pets"].raven) then self.multi["PetsSlot"]:AddShortCut("Ravenlore", 2, "0x70003EB5", 1); end
if (self.settings["Pets"].ravenb) then self.multi["PetsSlot"]:AddShortCut("Bloodraven", 2, "0x70024A63", 1); end
if (self.settings["Pets"].ravenm) then self.multi["PetsSlot"]:AddShortCut("Mottledwingraven", 2, "0x70024A60", 1); end
if (self.settings["Pets"].ravenf) then self.multi["PetsSlot"]:AddShortCut("Frostraven", 2, "0x70024A62", 1); end
if (self.settings["Pets"].ravens) then self.multi["PetsSlot"]:AddShortCut("Stormraven", 2, "0x70024A5F", 1); end
if (self.settings["Pets"].ravenw) then self.multi["PetsSlot"]:AddShortCut("Weatheredraven", 2, "0x70024A5D", 1); end
if (self.settings["Pets"].bear) then self.multi["PetsSlot"]:AddShortCut("FriendofBears", 14, "0x70003EB8", 2); end
if (self.settings["Pets"].bearb) then self.multi["PetsSlot"]:AddShortCut("BlackBear", 14, "0x70024A6E", 2); end
if (self.settings["Pets"].bearp) then self.multi["PetsSlot"]:AddShortCut("PolarBear", 14, "0x70024A6C", 2); end
if (self.settings["Pets"].bearwp) then self.multi["PetsSlot"]:AddShortCut("WildpawBear", 14, "0x70024A65", 2); end
if (self.settings["Pets"].beartc) then self.multi["PetsSlot"]:AddShortCut("TundraBearCub", 14, "0x70024A69", 2); end
if (self.settings["Pets"].bearbp) then self.multi["PetsSlot"]:AddShortCut("BlackpawBear", 14, "0x70024A68", 2); end
if (self.settings["Pets"].bearw) then self.multi["PetsSlot"]:AddShortCut("WeatheredBear", 14, "0x70024A66", 2); end
if (self.settings["Pets"].lynx) then self.multi["PetsSlot"]:AddShortCut("Lynxspeech", 30, "0x7000B8D3", 3); end
if (self.settings["Pets"].lynxs) then self.multi["PetsSlot"]:AddShortCut("SpottedLynx", 30, "0x70024A73", 3); end
if (self.settings["Pets"].lynxo) then self.multi["PetsSlot"]:AddShortCut("OnyxLynx", 30, "0x70024A7A", 3); end
if (self.settings["Pets"].lynxt) then self.multi["PetsSlot"]:AddShortCut("TundraLynx", 30, "0x70024A74", 3); end
if (self.settings["Pets"].lynxg) then self.multi["PetsSlot"]:AddShortCut("GreyLynx", 30, "0x70024A75", 3); end
if (self.settings["Pets"].lynxm) then self.multi["PetsSlot"]:AddShortCut("MountainLynx", 30, "0x70024A79", 3); end
if (self.settings["Pets"].eagle and self.settings["Pets"].eagletrait) then self.multi["PetsSlot"]:AddShortCut("Eaglefriend", 45, "0x70000FB2", 4); end
if (self.settings["Pets"].eaglea and self.settings["Pets"].eagletrait) then self.multi["PetsSlot"]:AddShortCut("AshenEagle", 45, "0x70024A7E", 4); end
if (self.settings["Pets"].eagles and self.settings["Pets"].eagletrait) then self.multi["PetsSlot"]:AddShortCut("SnowcrestEagle", 45, "0x70024A80", 4); end
if (self.settings["Pets"].eaglee and self.settings["Pets"].eagletrait) then self.multi["PetsSlot"]:AddShortCut("EmberEagle", 45, "0x70024A84", 4); end
if (self.settings["Pets"].eaglet and self.settings["Pets"].eagletrait) then self.multi["PetsSlot"]:AddShortCut("TundraEagle", 45, "0x70024A82", 4); end
if (self.settings["Pets"].saber) then self.multi["PetsSlot"]:AddShortCut("FriendofFelineHunters", 56, "0x7000F530", 5); end
if (self.settings["Pets"].saberd) then self.multi["PetsSlot"]:AddShortCut("DuskySabercat", 56, "0x70024A8D", 5); end
if (self.settings["Pets"].sabersp) then self.multi["PetsSlot"]:AddShortCut("SpottedSabercat", 56, "0x70024A89", 5); end
if (self.settings["Pets"].saberg) then self.multi["PetsSlot"]:AddShortCut("GreySabercat", 56, "0x70024A8F", 5); end
if (self.settings["Pets"].saberdw) then self.multi["PetsSlot"]:AddShortCut("DeepwoodSabercat", 56, "0x70024A8B", 5); end
if (self.settings["Pets"].sabers) then self.multi["PetsSlot"]:AddShortCut("StripedSabercat", 56, "0x70024A8A", 5); end
if (self.settings["Pets"].sabero) then self.multi["PetsSlot"]:AddShortCut("OnyxSabercat", 56, "0x70024A87", 5); end
if (self.settings["Pets"].bog and self.settings["Pets"].bogtrait) then self.multi["PetsSlot"]:AddShortCut("Naturefriend", 58, "0x7000F54D", 6); end
if (self.settings["Pets"].bogs and self.settings["Pets"].bogtrait) then self.multi["PetsSlot"]:AddShortCut("SwampGuardian", 58, "0x70024A93", 6); end
if (self.settings["Pets"].bogm and self.settings["Pets"].bogtrait) then self.multi["PetsSlot"]:AddShortCut("MountainGuardian", 58, "0x70024A95", 6); end
if (self.settings["Pets"].bogt and self.settings["Pets"].bogtrait) then self.multi["PetsSlot"]:AddShortCut("TundraGuardian", 58, "0x70024A91", 6); end
self.multi["PetsSlot"]:LevelCheck();
-- Refresh States
self:CombatChange(vars.player:IsInCombat());
Turbine.Shell.WriteLine("KragenBars: Loremaster Bars refresh completed successfully.");
end