lotrointerface.com
Search Downloads

LoTROInterface SVN KragenBars

[/] [branches/] [3.0.0/] [KragenPlugs/] [KragenBars/] [BurglarBars.lua] - Rev 9

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 );

    -- class settings arent saved then load the 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
    
    if (vars.classattr:GetStance() == 1) then
                self.mischiefflag = 2;
        else
                self.mischiefflag = 0;
        end
        
        self.poison = 0;
    
    -- 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["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           SkillBar( parent:SkillWindow, x:int, y:int, width:int, height:int, active:Boolean);
    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         SkillSlot( parent:SkillBar, x:int, y:int, active:Boolean, level:int, hexcode:String );
        --                      For skills that need to be replaced with a new version you can enter level as a table
        --                                              ie.  {["start"] = 1, ["end"] = 34]}
        --                                              then set the new skill level to 34 and it will replace the old at that level
    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, 28, "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["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);
        
        self.bars["CritTier2"]:SetZOrder(-10);
        
        -- Stance Event
        AddCallback(vars.classattr, "StanceChanged", function(sender, args)
                KragenBars:StanceChange();
        end);
        
        -- Initial Checks (Setting up inital states for combat states and stances and such)
        self:InitBars();
        self:CombatChange(vars.player:IsInCombat());

end

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

        -- Double Edged
        elseif (addedeffect:GetName() == "Double Edged") then
            self.bars["CritTier3"]:SetState( true, addedeffect:GetID());
        self.skills["DoubleEdgedStrike"]:SetActive(false);
        self.bars["CritTier2"]:SetZOrder(-10);
        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(true);
                self.skills["SmallSnag"]:SetActive(true);

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

    -- Fellowship Manoeuvre Response
        elseif (addedeffect:GetName() == "Fellowship Manoeuvre Response") then
        self.bars["FMReactives"]:SetState( true, addedeffect:GetID());
        self.skills["EscapeClause"]:SetActive(true);
        self.skills["SeizeInitiative"]:SetActive(true);
        
    -- Improved Feint Attack
        elseif (addedeffect:GetName() == "Improved Feint") then
        self.skills["LIE"]:SetState( true, true, addedeffect:GetID());
                self.skills["LIE"]:SetCombat(true, true);
            self.skills["Trip"]:SetCombat(true, true);
            self.skills["Diversion"]:SetCombat(true, true);
        
    elseif (addedeffect:GetName() == "Campsite") then
        self.skills["ContactPedlar"]:SetState( true, true, addedeffect:GetID());
        
    -- Fear
        elseif (addedeffect: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

function BurglarBars:RemoveEffect( effect )

    -- Crit Response
        if (effect:GetName() == "Critical Response") 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);
                        self.bars["CritTier2"]:SetZOrder(0);
                end

        -- Double Edged
        elseif (effect:GetName() == "Double Edged") 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() == "Stunned" or effect:GetName() == "Dazed" or effect:GetName() == "Knocked Down")) then
        self.skills["FindFooting"]:SetState( false, false, effect:GetID());

    -- Fellowship Manoeuvre Response
        elseif (effect:GetName() == "Fellowship Manoeuvre Response") then
        self.bars["FMReactives"]:SetState( false, effect:GetID());
        if (not self.bars["FMReactive"].state) then
            self.skills["EscapeClause"]:SetActive(false);
                self.skills["SeizeInitiative"]:SetActive(false);
        end
        
    -- Improved Feint Attack
        elseif (effect:GetName() == "Improved Feint") 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() == "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

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( true );
                        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

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

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 = ""};

end


function BurglarBars:UpdateSettings()
        settings.vers = vars.vers;

end

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.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);
        
        self.setupqs.quickslot1: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.quickslot1cb:SetText("Marbles");
        self.setupqs.quickslot1cb:SetChecked(self.settings["Quickslots"].marbles["active"]);
        self.setupqs.quickslot1cb:SetVisible(true);
        self.setupqs.quickslot2: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.quickslot2cb:SetText("Caltrops");
        self.setupqs.quickslot2cb:SetChecked(self.settings["Quickslots"].caltrops["active"]);
        self.setupqs.quickslot2cb:SetVisible(true);
        self.setupqs.quickslot3: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.quickslot3cb:SetText("Stun Dust");
        self.setupqs.quickslot3cb:SetChecked(self.settings["Quickslots"].stundust["active"]);
        self.setupqs.quickslot3cb:SetVisible(true);

end


function BurglarBars:SetupClosing()
    settings.opacity = self.setupbb.opacityslider:GetValue() / 100;
        settings.lockslots = self.setupbb.checkboxlock:IsChecked();
        settings.snaptogrid = self.setupbb.checkboxgrid:IsChecked();
        
        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:SaveSettings();
        self:Refresh();

end


function BurglarBars:Refresh()

        self:RefreshBars();
        
        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);
        
        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"]);
    
    if (self.settings["Features"].poisonindicator and self.poison > 0) then
                self.skills["CurePoison"]:SetColor("green");
        else
                self.skills["CurePoison"]:SetColor();
        end
    
    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 08:03 PM.


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