lotrointerface.com
Search Downloads

LoTROInterface SVN KragenBars

[/] [branches/] [3.21/] [KragenBars/] [BurglarBars.lua] - Rev 72

Compare with Previous | Blame | View Log

import "Turbine.UI";
import "Turbine.UI.Lotro";
import "Turbine.Gameplay";
import "KragenPlugs.Utils";
import "KragenPlugs.KragenBars";

BurglarBars = class( KragenPlugs.KragenBars.ClassBar );

function BurglarBars:Constructor()

    KragenPlugs.KragenBars.ClassBar.Constructor( self );

    -- 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
    self.mischiefflag = 0;
        self.poison = 0;
        
        -- DEFINE THE EFFECT LIST BASED ON CLIENT LANGUAGE
        self.DefineEffectList = function()
                self.effectlist = {};
                -- ENGLISH CLIENT
                if (settings.language == 1) then
                        self.effectlist['CriticalResponse']             = 'Critical Response';
                        self.effectlist['DoubleEdged']                          = 'Double Edged';
                        self.effectlist['FMResponse']                           = 'Fellowship Manoeuvre Response';
                        self.effectlist['ImprovedFeint']                        = 'Improved Feint';
                        self.effectlist['Campsite']                             = 'Campsite';
                        self.effectlist['Stunned']                                      = 'Stunned';
                        self.effectlist['Dazed']                                        = 'Dazed';      
                        self.effectlist['KnockedDown']                          = 'Knocked Down';
                        self.effectlist['KnockedOut']                           = 'Knocked Out';
                        
                -- FRENCH CLIENT
                elseif (settings.language == 2) then
                        self.effectlist['CriticalResponse']             = 'Critical Response';
                        self.effectlist['DoubleEdged']                          = 'Double Edged';
                        self.effectlist['FMResponse']                           = 'Fellowship Manoeuvre Response';
                        self.effectlist['ImprovedFeint']                        = 'Improved Feint';
                        self.effectlist['Campsite']                             = 'Campsite';
                        self.effectlist['Stunned']                                      = 'Etourdissement';
                        self.effectlist['Dazed']                                        = 'Hébété';     
                        self.effectlist['KnockedDown']                          = 'Renversé';
                        self.effectlist['KnockedOut']                           = 'Knocked Out';
                        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");
                        
                -- GERMAN CLIENT
                elseif (settings.language == 3) then
                        self.effectlist['CriticalResponse']             = 'Kritische Erwiderung';
                        self.effectlist['DoubleEdged']                          = 'Zweischneidiger Schlag';
                        self.effectlist['FMResponse']                           = 'Erwiderung "Gefährtenmanöver"';
                        self.effectlist['ImprovedFeint']                        = 'Improved Feint';
                        self.effectlist['Campsite']                             = 'Campsite';
                        self.effectlist['Stunned']                                      = 'Bewusstlos geschlagen';
                        self.effectlist['Dazed']                                        = 'Benommenheit';       
                        self.effectlist['KnockedDown']                          = 'Zu Boden geschlagen';
                        self.effectlist['KnockedOut']                           = 'Knocked Out';
                        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 --
        
    -- Build Windows
    self.windows["QuickBar8"]   = SkillWindow("KB: Bar8",                       7, 1, 6, 1,     self.settings["QuickBar8"]              );
        self.windows["QuickBar7"]       = SkillWindow("KB: Bar7",                       1, 1, 6, 1,     self.settings["QuickBar7"]              );
        self.windows["QuickBar6"]       = SkillWindow("KB: Bar6",                       7, 2, 6, 1,     self.settings["QuickBar6"]              );
        self.windows["QuickBar5"]       = SkillWindow("KB: Bar5",                       1, 2, 6, 1,     self.settings["QuickBar5"]              );
        self.windows["QuickBar4"]       = SkillWindow("KB: Bar4",                       7, 3, 6, 1,     self.settings["QuickBar4"]              );
        self.windows["QuickBar3"]       = SkillWindow("KB: Bar3",                       1, 3, 6, 1,     self.settings["QuickBar3"]              );
        self.windows["QuickBar2"]       = SkillWindow("KB: Bar2",                       7, 4, 6, 1,     self.settings["QuickBar2"]              );
        self.windows["QuickBar1"]       = SkillWindow("KB: Bar1",                       1, 4, 6, 1,     self.settings["QuickBar1"]              );
        
        self.windows["FMReactives"]     = SkillWindow("FM Reactives",                   7, 1, 2, 1,     self.settings["FMReactives"]    );
    self.windows["Crit"]                = SkillWindow("Crit Reactives",                 1, 2, 3, 2,     self.settings["Crit"]                   );
    self.windows["Stunned"]             = SkillWindow("Stun",                                   12, 2, 1, 1,    self.settings["Stunned"]                );
    self.windows["Stance"]              = SkillWindow("Stance",                                 11, 3, 2, 1,    self.settings["Stance"]                 );

    -- Build Bars
    self.bars["CritTier3"]                      = SkillBar(self.windows["Crit"],                1, 1, 3, 2, true, true);
    self.bars["CritTier1"]                      = SkillBar(self.windows["Crit"],                1, 2, 1, 1, true, true);
        self.bars["CritTier2"]                  = SkillBar(self.windows["Crit"],                1, 2, 1, 1, true, true);
    
    self.bars["Stance"]                         = SkillBar(self.windows["Stance"],              1, 1, 2, 1, true, true);
    self.bars["Stunned"]            = SkillBar(self.windows["Stunned"],         1, 1, 1, 1, true, false);
    self.bars["FMReactives"]            = SkillBar(self.windows["FMReactives"], 1, 1, 2, 1, true, true);
    
        self.bars["QuickBar1"]          = SkillBar(self.windows["QuickBar1"],   1, 1, 6, 1, true, false);
        self.bars["QuickBar2"]          = SkillBar(self.windows["QuickBar2"],   1, 1, 6, 1, true, false);
        self.bars["QuickBar3"]          = SkillBar(self.windows["QuickBar3"],   1, 1, 6, 1, true, false);
        self.bars["QuickBar4"]          = SkillBar(self.windows["QuickBar4"],   1, 1, 6, 1, true, false);
        self.bars["QuickBar5"]          = SkillBar(self.windows["QuickBar5"],   1, 1, 6, 1, true, false);
        self.bars["QuickBar6"]          = SkillBar(self.windows["QuickBar6"],   1, 1, 6, 1, true, false);
        self.bars["QuickBar7"]          = SkillBar(self.windows["QuickBar7"],   1, 1, 6, 1, true, false);
        self.bars["QuickBar8"]          = SkillBar(self.windows["QuickBar8"],   1, 1, 6, 1, true, false);
    
        -- Build Skills
    self.skills["BurglarsAdvantage"]            = SkillSlot(self.bars["CritTier1"],     1, 1, false, 2, "0x70003F0B");
    self.skills["DoubleEdgedStrike"]            = SkillSlot(self.bars["CritTier2"],     1, 1, false, 24, "0x70003F0C");
    self.skills["ExposedThroat"]                        = SkillSlot(self.bars["CritTier3"],     2, 2, false, 41, "0x70000F80");
    self.skills["FlashingBlades"]                       = SkillSlot(self.bars["CritTier3"],     3, 2, false, 41, "0x70000F5D");
    self.skills["LuckyStrike"]                          = SkillSlot(self.bars["CritTier3"],     1, 1, false, 56, "0x7000FD86");
    self.skills["FeintAttack"]                          = SkillSlot(self.bars["CritTier3"],     2, 1, false, 58, "0x7000FB71");
    self.skills["SmallSnag"]                            = SkillSlot(self.bars["CritTier3"],     3, 1, false, 60, "0x7000FB73");
    
    self.skills["SeizeInitiative"]                      = SkillSlot(self.bars["FMReactives"],   1, 1, false, 44, "0x7000D447");
    self.skills["EscapeClause"]                         = SkillSlot(self.bars["FMReactives"],   2, 1, false, 48, "0x7000D443");
    
    self.skills["Sneak"]                                        = SkillSlot(self.bars["Stance"],                1, 1, true, 4, "0x70003212");
    self.skills["Mischief"]                                     = SkillSlot(self.bars["Stance"],                2, 1, true, 20, "0x7000D4A4");

    self.skills["FindFooting"]                          = SkillSlot(self.bars["Stunned"],               1, 1, false, 32, "0x70003F14");

    self.skills["SurpriseStrike"]                       = SkillSlot(self.bars["QuickBar1"],             1, 1, true, 1, "0x70003F08");
    self.skills["CunningAttack"]                        = SkillSlot(self.bars["QuickBar1"],             2, 1, true, 1, "0x70003F09");
    self.skills["SubtleStab"]                           = SkillSlot(self.bars["QuickBar1"],             3, 1, true, 1, "0x700031D3");
        self.skills["Disable"]                                  = SkillSlot(self.bars["QuickBar1"],             4, 1, true, 4, "0x700031FA");
        self.skills["DITE"]                                             = SkillSlot(self.bars["QuickBar1"],             5, 1, true, 16, "0x700031E7");
    self.skills["CounterDefences"]                      = SkillSlot(self.bars["QuickBar1"],             6, 1, true, 26, "0x70003200");
    
    self.skills["Riddle"]                                       = SkillSlot(self.bars["QuickBar2"],             1, 1, true, 8, "0x700031D8");
    self.skills["Addle"]                                        = SkillSlot(self.bars["QuickBar2"],             2, 1, true, 14, "0x70003F0E");
    self.skills["Provoke"]                                      = SkillSlot(self.bars["QuickBar2"],     3, 1, true, 34, "0x70003F0A");
    self.skills["Diversion"]                            = SkillSlot(self.bars["QuickBar2"],     4, 1, true, 18, "0x700031F5");
        self.skills["HideInPlainSight"]                 = SkillSlot(self.bars["QuickBar2"],     5, 1, true, { 30, 54 }, { "0x7000320D", "0x70015A02" });
    self.skills["ShareTheFun"]                          = SkillSlot(self.bars["QuickBar2"],     6, 1, true, 42, "0x7000D448");

    self.skills["MischieviousGlee"]                     = SkillSlot(self.bars["QuickBar3"],             4, 1, true, {10, 64}, { "0x70003F10", "0x70020DD0" });
    self.skills["StartlingTwist"]                       = SkillSlot(self.bars["QuickBar3"],             5, 1, true, {20, 52}, { "0x70003F0F", "0x70015A04" });
    self.skills["CleverRetort"]                         = SkillSlot(self.bars["QuickBar3"],             6, 1, self.settings["Features"].honedwit or vars.classattr:GetStance() == 1, 30, "0x7000D440");

    self.skills["Enrage"]                                       = SkillSlot(self.bars["QuickBar4"],             1, 1, true, 38, "0x70003218");
        self.skills["ExploitOpening"]                   = SkillSlot(self.bars["QuickBar4"],     2, 1, true, 12, "0x70003F0D");
    self.skills["Trip"]                                         = SkillSlot(self.bars["QuickBar4"],     3, 1, true, 28, "0x70003F07");

    
    self.skills["Aim"]                                          = SkillSlot(self.bars["QuickBar5"],             4, 1, true, 12, "0x700031E1");
    self.skills["LIE"]                                          = SkillSlot(self.bars["QuickBar5"],     5, 1, true, 50, "0x7000D445");
    self.skills["RevealWeakness"]                       = SkillSlot(self.bars["QuickBar5"],             6, 1, true, 22, "0x70003F11");
    
    self.skills["WellPlacedStrike"]                     = SkillSlot(self.bars["QuickBar6"],             1, 1, true, 40, "0x7000D43E");
    self.skills["Confound"]                                     = SkillSlot(self.bars["QuickBar6"],             2, 1, vars.classattr:GetStance() == 1, 46, "0x7000D441");
    self.skills["Marbles"]                                      = ItemSlot(self.bars["QuickBar6"],      3, 1, self.settings["Quickslots"].marbles["active"], self.settings["Quickslots"].marbles["type"], self.settings["Quickslots"].marbles["data"]);
    self.skills["Caltrops"]                                     = ItemSlot(self.bars["QuickBar6"],  4, 1, self.settings["Quickslots"].caltrops["active"], self.settings["Quickslots"].caltrops["type"], self.settings["Quickslots"].caltrops["data"]);
    self.skills["StunDust"]                                     = ItemSlot(self.bars["QuickBar6"],  5, 1, self.settings["Quickslots"].stundust["active"], self.settings["Quickslots"].stundust["type"], self.settings["Quickslots"].stundust["data"]);
        self.skills["Knives"]                                   = ItemSlot(self.bars["QuickBar6"],  6, 1, self.settings["Quickslots"].knives["active"], self.settings["Quickslots"].knives["type"], self.settings["Quickslots"].knives["data"]);

    self.skills["TouchAndGo"]                           = SkillSlot(self.bars["QuickBar7"],     1, 1, true, 6, "0x70003F13");
    self.skills["CurePoison"]                           = SkillSlot(self.bars["QuickBar7"],     2, 1, true, { 26, 62 }, {"0x70003F17", "0x7001F4A4" });
    self.skills["ReadyAndAble"]                         = SkillSlot(self.bars["QuickBar7"],     3, 1, true, 36, "0x70003F12");
    self.skills["KnivesOut"]                            = SkillSlot(self.bars["QuickBar7"],     4, 1, true, 42, "0x7000D444");
    
        self.skills["Burgle"]                                   = SkillSlot(self.bars["QuickBar8"],     4, 1, true, 14, "0x70003F16");
    self.skills["ContactPedlar"]                        = SkillSlot(self.bars["QuickBar8"],     5, 1, false, 26, "0x7000D442");
    self.skills["TrackTreasure"]                        = SkillSlot(self.bars["QuickBar8"],     6, 1, true, 20, "0x70003F15");
        
        -- SET COMBAT STATES
        self.skills["Mischief"]:SetCombat(false, true);
        self.skills["Sneak"]:SetCombat(false, true);
        self.skills["ShareTheFun"]:SetCombat(false, true);
        self.skills["ContactPedlar"]:SetCombat(false, true);
        self.skills["Burgle"]:SetCombat(false, true);
        self.skills["Trip"]:SetCombat(false, true);
        self.skills["Diversion"]:SetCombat(false, true);
        self.skills["LIE"]:SetCombat(false, true);
        
        -- CLASS SPECIFIC SETUP/DEFAULT CODE
        self.bars["CritTier2"]:SetZOrder(-10);
        
        if (vars.classattr:GetStance() == 1) then
                self.mischiefflag = 2;
        else
                self.mischiefflag = 0;
        end
        
        -- CLASS SPECIFIC EVENTS
        
        -- Stance Event
        AddCallback(vars.classattr, "StanceChanged", function(sender, args)
                KragenBars:StanceChange();
        end);
        
        -- INITIALIZE BARS
        self:InitBars();
        self:CombatChange(vars.player:IsInCombat());

end

-- ADD EFFECT EVENT
function BurglarBars:AddEffect( effectIndex )
        local effect = vars.player:GetEffects():Get( effectIndex );
                
    -- Crit Response
        if (effect:GetName() == self.effectlist["CriticalResponse"]) then
        self.bars["CritTier1"]:SetState( true, effect:GetID());
        self.skills["BurglarsAdvantage"]:SetActive(true);

        -- Double Edged
        elseif (effect:GetName() == self.effectlist["DoubleEdged"]) then
            self.bars["CritTier3"]:SetState( true, effect:GetID());
        self.bars["CritTier2"]:SetZOrder(-10);
                self.skills["DoubleEdgedStrike"]:SetActive(false);
        self.skills["ExposedThroat"]:SetActive(self.settings["Features"].exposedthroat);
                self.skills["FlashingBlades"]:SetActive(self.settings["Features"].flashingblades);
                self.skills["LuckyStrike"]:SetActive(true);
                self.skills["FeintAttack"]:SetActive(vars.classattr:GetStance() == 0);
                self.skills["SmallSnag"]:SetActive(true);

        -- Stunned, Dazed, Knocked Down
        elseif (effect:GetName() == self.effectlist["Stunned"] or effect:GetName() == self.effectlist["Dazed"] or effect:GetName() == self.effectlist["KnockedDown"] or effect:GetName() == self.effectlist["KnockedOut"]) then
        self.skills["FindFooting"]:SetState( true, true, effect:GetID());

    -- Fellowship Manoeuvre Response
        elseif (effect:GetName() == self.effectlist["FMResponse"]) then
        self.bars["FMReactives"]:SetState( true, effect:GetID());
        self.skills["EscapeClause"]:SetActive(true);
        self.skills["SeizeInitiative"]:SetActive(true);
        
    -- Improved Feint Attack
        elseif (effect:GetName() == self.effectlist["ImprovedFeint"]) then
        self.skills["LIE"]:SetState( true, true, effect:GetID());
                self.skills["LIE"]:SetCombat(true, true);
            self.skills["Trip"]:SetCombat(true, true);
            self.skills["Diversion"]:SetCombat(true, true);
        
    elseif (effect:GetName() == self.effectlist["Campsite"]) then
        self.skills["ContactPedlar"]:SetState( true, true, effect:GetID());
        
    -- Fear
        elseif (effect:GetCategory() == Turbine.Gameplay.EffectCategory.Poison ) then
                self.poison = self.poison + 1;
                if (self.settings["Features"].poisonindicator) then
                        self.skills["CurePoison"]:SetColor("green");
                end

    end
        
end

-- REMOVE EFFECT EVENT
function BurglarBars:RemoveEffect( effect )
    -- Crit Response
        if (effect:GetName() == self.effectlist["CriticalResponse"]) then
        self.bars["CritTier1"]:SetState( false, effect:GetID());
        if (not self.bars["CritTier1"].state) then
                        self.skills["BurglarsAdvantage"]:SetActive(false);
                        self.skills["DoubleEdgedStrike"]:SetActive(true);
                        self.skills["DoubleEdgedStrike"]:StartTimer(5, false);
                        if (vars.playerlevel > 24) then
                                self.bars["CritTier2"]:SetZOrder(0);
                        end
                end

        -- Double Edged
        elseif (effect:GetName() == self.effectlist["DoubleEdged"]) then
        self.bars["CritTier3"]:SetState( false, effect:GetID());
        if (not self.bars["CritTier3"].state) then
            self.skills["ExposedThroat"]:SetActive(false);
                        self.skills["FlashingBlades"]:SetActive(false);
                        self.skills["LuckyStrike"]:SetActive(false);
                        self.skills["FeintAttack"]:SetActive(false);
                        self.skills["SmallSnag"]:SetActive(false);
                end


-- Stunned, Dazed or Knocked Down
        elseif ((effect:GetName() == self.effectlist["Stunned"] or effect:GetName() == self.effectlist["Dazed"] or effect:GetName() == self.effectlist["KnockedDown"] or effect:GetName() == self.effectlist["KnockedOut"])) then
        self.skills["FindFooting"]:SetState( false, false, effect:GetID());

    -- Fellowship Manoeuvre Response
        elseif (effect:GetName() == self.effectlist["FMResponse"]) then
        self.bars["FMReactives"]:SetState( false, effect:GetID());
        if (not self.bars["FMReactives"].state) then
            self.skills["EscapeClause"]:SetActive(false);
                self.skills["SeizeInitiative"]:SetActive(false);
        end
        
    -- Improved Feint Attack
        elseif (effect:GetName() == self.effectlist["ImprovedFeint"]) then
        self.skills["LIE"]:SetState( false, true, effect:GetID());
        if (not self.skills["LIE"].state) then
                        self.skills["LIE"]:SetCombat(false, true);
                    self.skills["Diversion"]:SetCombat(false, true);
                    self.skills["Trip"]:SetCombat(false, true);
                end
        
    elseif (effect:GetName() == self.effectlist["Campsite"]) then
        self.skills["ContactPedlar"]:SetState( false, false, effect:GetID());
        
    -- Poison
        elseif (effect:GetCategory() == Turbine.Gameplay.EffectCategory.Poison ) then
                self.poison = self.poison - 1;
                if (self.poison == 0) then
                        self.skills["CurePoison"]:SetColor();
                end

        end

end

-- STANCE CHANGED EVENT
function BurglarBars:StanceChange()
    if(vars.classattr:GetStance() == 1) then
                self.mischiefflag = self.mischiefflag + 1;
                self.skills["Mischief"]:SetHover( true );
                self.skills["Sneak"]:SetActive( false );
                self.skills["ShareTheFun"]:SetActive( false );
                self.skills["Confound"]:SetActive( true );
                self.skills["CleverRetort"]:SetActive( true );
        self.skills["FeintAttack"]:SetActive( false );
        self.skills["LIE"]:SetActive( false );
        self.skills["Diversion"]:SetActive( false );
        self.skills["Burgle"]:SetActive( false );
        self.skills["Trip"]:SetActive( false );
        else
                if (self.mischiefflag == 2) then
                self.skills["Mischief"]:SetHover( false );
                        self.skills["Sneak"]:SetActive( true );
                        self.skills["ShareTheFun"]:SetActive( true );
                        self.skills["Confound"]:SetActive( false );
                        self.skills["CleverRetort"]:SetActive( self.settings["Features"].honedwit );
                        self.skills["FeintAttack"]:SetActive( self.bars["CritTier3"].state );
                        self.skills["LIE"]:SetActive( true );
                self.skills["Diversion"]:SetActive( true );
                self.skills["Burgle"]:SetActive( true );
                self.skills["Trip"]:SetActive( true );
                        self.mischiefflag = 0;
                end
        end
end

-- CRIT CHANGED EVENT
function BurglarBars:CritChange(tier, state)
        if (tier == 2) then
                self.bars["CritTier1"]:SetVisible( not state and vars.classattr:IsCriticalTier1Available() );
                self.bars["CritTier2"]:SetVisible( state );
        elseif (tier == 3) then
                self.bars["CritTier3"]:SetVisible( state );
        end
end

-- DEFAULT SETTINGS
function BurglarBars:DefaultSettings()
        self.settings = { };
        
        self.settings["Crit"] = { active = true, x=0, y=0, rotate=0 };
    self.settings["FMReactives"] = { active = true, x=0, y=0, rotate=0 };
    self.settings["Stance"] = { active = true, x=0, y=0, rotate=0 };
        self.settings["Stunned"] = { active = true, x=0, y=0, rotate=0 };

        self.settings["QuickBar1"] = { active = true, x=0, y=0, rotate=0 };
        self.settings["QuickBar2"] = { active = true, x=0, y=0, rotate=0 };
        self.settings["QuickBar3"] = { active = true, x=0, y=0, rotate=0 };
        self.settings["QuickBar4"] = { active = true, x=0, y=0, rotate=0 };
        self.settings["QuickBar5"] = { active = true, x=0, y=0, rotate=0 };
        self.settings["QuickBar6"] = { active = true, x=0, y=0, rotate=0 };
        self.settings["QuickBar7"] = { active = true, x=0, y=0, rotate=0 };
        self.settings["QuickBar8"] = { active = true, x=0, y=0, rotate=0 };

        
        self.settings["Features"] = { };
    self.settings["Features"].exposedthroat = false;
    self.settings["Features"].flashingblades = false;
        self.settings["Features"].honedwit = false;
        self.settings["Features"].poisonindicator = true;
        
        self.settings["Quickslots"] = { };
        self.settings["Quickslots"].marbles = {active = false, type = 0, data = ""};
        self.settings["Quickslots"].caltrops = {active = false, type = 0, data = ""};
        self.settings["Quickslots"].stundust = {active = false, type = 0, data = ""};
        self.settings["Quickslots"].knives = {active = false, type = 0, data = ""};

end

-- UPDATE SETTINGS
function BurglarBars:UpdateSettings()
        if (settings.vers < 3.20) then
                self.settings["Quickslots"].knives = {active = false, type = 0, data = ""};
        end
        settings.vers = vars.vers;

end


-- DISPLAY SETUP WINDOW AND SET ALL CHECKBOXES COMBOBOXES SLIDERS AND QUICKSLOTS
function BurglarBars: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("Crit Response");
        self.setupbb.checkboxbb1:SetChecked (self.settings["Crit"].active);
        self.setupbb.checkboxbb1:SetVisible(true);
        self.setupbb.checkboxbb2:SetText("FM Reactives");
        self.setupbb.checkboxbb2:SetChecked (self.settings["FMReactives"].active);
        self.setupbb.checkboxbb2:SetVisible(true);
        self.setupbb.checkboxbb3:SetText("Stun Response");
        self.setupbb.checkboxbb3:SetChecked (self.settings["Stunned"].active);
        self.setupbb.checkboxbb3:SetVisible(true);
        self.setupbb.checkboxbb4:SetText("Mischief/Stealth");
        self.setupbb.checkboxbb4:SetChecked (self.settings["Stance"].active);
        self.setupbb.checkboxbb4:SetVisible(true);

    self.setupbb.checkboxbb5:SetText("Bar1");
        self.setupbb.checkboxbb5:SetChecked (self.settings["QuickBar1"].active);
        self.setupbb.checkboxbb5:SetVisible(true);
        self.setupbb.checkboxbb6:SetText("Bar2");
        self.setupbb.checkboxbb6:SetChecked (self.settings["QuickBar2"].active);
        self.setupbb.checkboxbb6:SetVisible(true);
        self.setupbb.checkboxbb7:SetText("Bar3");
        self.setupbb.checkboxbb7:SetChecked (self.settings["QuickBar3"].active);
        self.setupbb.checkboxbb7:SetVisible(true);
        self.setupbb.checkboxbb8:SetText("Bar4");
        self.setupbb.checkboxbb8:SetChecked (self.settings["QuickBar4"].active);
        self.setupbb.checkboxbb8:SetVisible(true);
        self.setupbb.checkboxbb9:SetText("Bar5");
        self.setupbb.checkboxbb9:SetChecked (self.settings["QuickBar5"].active);
        self.setupbb.checkboxbb9:SetVisible(true);
        self.setupbb.checkboxbb10:SetText("Bar6");
        self.setupbb.checkboxbb10:SetChecked (self.settings["QuickBar6"].active);
        self.setupbb.checkboxbb10:SetVisible(true);
        self.setupbb.checkboxbb11:SetText("Bar7");
        self.setupbb.checkboxbb11:SetChecked (self.settings["QuickBar7"].active);
        self.setupbb.checkboxbb11:SetVisible(true);
        self.setupbb.checkboxbb12:SetText("Bar8");
        self.setupbb.checkboxbb12:SetChecked (self.settings["QuickBar8"].active);
        self.setupbb.checkboxbb12:SetVisible(true);
        
        self.setupf.checkboxf1:SetText("Exposed Throat");
        self.setupf.checkboxf1:SetChecked (self.settings["Features"].exposedthroat);
        self.setupf.checkboxf1:SetVisible(true);
        self.setupf.checkboxf2:SetText("Flashing Blades");
        self.setupf.checkboxf2:SetChecked (self.settings["Features"].flashingblades);
        self.setupf.checkboxf2:SetVisible(true);
        self.setupf.checkboxf3:SetText("Honed Wit");
        self.setupf.checkboxf3:SetChecked (self.settings["Features"].honedwit);
        self.setupf.checkboxf3:SetVisible(true);
        
        self.setupf.checkboxf10:SetText("Poison Indicator");
        self.setupf.checkboxf10:SetChecked (self.settings["Features"].poisonindicator);
        self.setupf.checkboxf10:SetVisible(true);
        
        pcall(function() self.setupqs.quickslot1:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].marbles["type"], self.settings["Quickslots"].marbles["data"] ) ); end);
        self.setupqs.quickslot1:SetVisible(true);
        self.setupqs.quickslot1cb:SetText("Marbles");
        self.setupqs.quickslot1cb:SetChecked(self.settings["Quickslots"].marbles["active"]);
        self.setupqs.quickslot1cb:SetVisible(true);
        
        pcall(function() self.setupqs.quickslot2:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].caltrops["type"], self.settings["Quickslots"].caltrops["data"] ) ); end);
        self.setupqs.quickslot2:SetVisible(true);
        self.setupqs.quickslot2cb:SetText("Caltrops");
        self.setupqs.quickslot2cb:SetChecked(self.settings["Quickslots"].caltrops["active"]);
        self.setupqs.quickslot2cb:SetVisible(true);
        
        pcall(function() self.setupqs.quickslot3:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].stundust["type"], self.settings["Quickslots"].stundust["data"] ) ); end);
        self.setupqs.quickslot3:SetVisible(true);
        self.setupqs.quickslot3cb:SetText("Stun Dust");
        self.setupqs.quickslot3cb:SetChecked(self.settings["Quickslots"].stundust["active"]);
        self.setupqs.quickslot3cb:SetVisible(true);
        
        pcall(function() self.setupqs.quickslot4:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].knives["type"], self.settings["Quickslots"].knives["data"] ) ); end);
        self.setupqs.quickslot4:SetVisible(true);
        self.setupqs.quickslot4cb:SetText("Knives/Hatchets");
        self.setupqs.quickslot4cb:SetChecked(self.settings["Quickslots"].knives["active"]);
        self.setupqs.quickslot4cb:SetVisible(true);

end

-- SET ALL VARIABLES OFF OF SETUP WINDOW
function BurglarBars:SetupClosing()
    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.settings["Crit"].active = self.setupbb.checkboxbb1:IsChecked();
    self.settings["FMReactives"].active = self.setupbb.checkboxbb2:IsChecked();
    self.settings["Stunned"].active = self.setupbb.checkboxbb3:IsChecked();
    self.settings["Stance"].active = self.setupbb.checkboxbb4:IsChecked();
    
        self.settings["QuickBar1"].active = self.setupbb.checkboxbb5:IsChecked();
        self.settings["QuickBar2"].active = self.setupbb.checkboxbb5:IsChecked();
        self.settings["QuickBar3"].active = self.setupbb.checkboxbb5:IsChecked();
        self.settings["QuickBar4"].active = self.setupbb.checkboxbb5:IsChecked();
        self.settings["QuickBar5"].active = self.setupbb.checkboxbb5:IsChecked();
        self.settings["QuickBar6"].active = self.setupbb.checkboxbb5:IsChecked();
        self.settings["QuickBar7"].active = self.setupbb.checkboxbb5:IsChecked();
        self.settings["QuickBar8"].active = self.setupbb.checkboxbb5:IsChecked();

        self.settings["Features"].exposedthroat = self.setupf.checkboxf1:IsChecked();
    self.settings["Features"].flashingblades = self.setupf.checkboxf2:IsChecked();
    self.settings["Features"].honedwit = self.setupf.checkboxf3:IsChecked();

        self.settings["Features"].poisonindicator = self.setupf.checkboxf10:IsChecked();
    
    self.settings["Quickslots"].marbles = { active = self.setupqs.quickslot1cb:IsChecked(), type = self.setupqs.quickslot1:GetShortcut():GetType(), data = self.setupqs.quickslot1:GetShortcut():GetData() };
    self.settings["Quickslots"].caltrops = { active = self.setupqs.quickslot2cb:IsChecked(), type = self.setupqs.quickslot2:GetShortcut():GetType(), data = self.setupqs.quickslot2:GetShortcut():GetData() };
    self.settings["Quickslots"].stundust = { active = self.setupqs.quickslot3cb:IsChecked(), type = self.setupqs.quickslot3:GetShortcut():GetType(), data = self.setupqs.quickslot3:GetShortcut():GetData() };
        self.settings["Quickslots"].knives = { active = self.setupqs.quickslot4cb:IsChecked(), type = self.setupqs.quickslot4:GetShortcut():GetType(), data = self.setupqs.quickslot4:GetShortcut():GetData() };
        
        self:SaveSettings();
        self:Refresh();

end

-- REFRESH SKILLS AND BARS
function BurglarBars: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["ExposedThroat"]:SetActive(self.bars["CritTier3"].state and self.settings["Features"].exposedthroat);
        self.skills["FlashingBlades"]:SetActive(self.bars["CritTier3"].state and self.settings["Features"].flashingblades);
        self.skills["CleverRetort"]:SetActive(self.settings["Features"].honedwit or vars.classattr:GetStance() == 1);
        
        -- Setup Quickslots
        self.skills["Marbles"]:SetQuickslot(self.settings["Quickslots"].marbles["active"], self.settings["Quickslots"].marbles["type"], self.settings["Quickslots"].marbles["data"]);
    self.skills["Caltrops"]:SetQuickslot(self.settings["Quickslots"].caltrops["active"], self.settings["Quickslots"].caltrops["type"], self.settings["Quickslots"].caltrops["data"]);
    self.skills["StunDust"]:SetQuickslot(self.settings["Quickslots"].stundust["active"], self.settings["Quickslots"].stundust["type"], self.settings["Quickslots"].stundust["data"]);
        self.skills["Knives"]:SetQuickslot(self.settings["Quickslots"].knives["active"], self.settings["Quickslots"].knives["type"], self.settings["Quickslots"].knives["data"]);
    
        -- Set Poison Indicator
    if (self.settings["Features"].poisonindicator and self.poison > 0) then
                self.skills["CurePoison"]:SetColor("green");
        else
                self.skills["CurePoison"]:SetColor();
        end
    
        -- Refresh States
    self:CombatChange(vars.player:IsInCombat());

        Turbine.Shell.WriteLine("KragenBars: Burglar Bars refresh completed successfully.");

end

Compare with Previous | Blame


All times are GMT -5. The time now is 06:05 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui