lotrointerface.com
Search Downloads

LoTROInterface SVN KragenBars

[/] [branches/] [3.20/] [KragenBars/] [RuneBars.lua] - Rev 133

Go to most recent revision | Compare with Previous | Blame | View Log

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

RuneBars = class( KragenPlugs.KragenBars.ClassBar );

function RuneBars: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
        
        -- DEFINE THE EFFECT LIST BASED ON CLIENT LANGUAGE
        self.DefineEffectList = function()
                self.effectlist = { };
                -- ENGLISH CLIENT
                if (settings.language == 1) then
                        self.effectlist["CalmingVerse"]         = "Calming Verse";
                        self.effectlist["MasterofWrits"]        = "Master of Writs";
                elseif (settings.language == 2) then
                        self.effectlist["CalmingVerse"]         = "Calming Verse";
                        self.effectlist["MasterofWrits"]        = "Master of Writs";
                        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["CalmingVerse"]         = "Calming Verse";
                        self.effectlist["MasterofWrits"]        = "Master of Writs";
                        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["CenterControl"]       = SkillWindow("Center: Control",                1, 1, 2, 1,     self.settings["CenterControl"]  );
    self.windows["CenterBuffs"]         = SkillWindow("Center: Buffs",                  3, 1, 2, 1,     self.settings["CenterBuffs"]    );
    self.windows["CenterDethreat"]      = SkillWindow("Center: Dethreat",               5, 1, 2, 1,     self.settings["CenterDethreat"] );
    self.windows["CenterForetell"]      = SkillWindow("Center: Foretellings",   7, 1, 4, 1,     self.settings["CenterForetell"] );
    self.windows["CenterVision"]        = SkillWindow("Center: Dmg Vision",     11, 1, 2, 1,    self.settings["CenterVision"]   );
        self.windows["CenterSelf"]              = SkillWindow("Center: Self",                   8, 2, 3, 1,     self.settings["CenterSelf"]             );
        self.windows["OffAttunement"]   = SkillWindow("Off Attunement",                 1, 2, 4, 1,     self.settings["OffAttunement"]  );
    self.windows["BattleFrost"]         = SkillWindow("Battle: Frost",                  1, 3, 5, 1,     self.settings["BattleFrost"]    );
    self.windows["BattleFlame"]         = SkillWindow("Battle: Flame",                  1, 4, 7, 1,     self.settings["BattleFlame"]    );
    self.windows["Attunement"]          = SkillWindow("Attunement",                     1, 5, 8, 1,     self.settings["Attunement"]             );
    self.windows["HealForetell"]        = SkillWindow("Heal: Foretelling",              9, 5, 4, 1,     self.settings["HealForetell"]   );
    
    -- Build Bars           SkillBar( parent:SkillWindow, x:int, y:int, width:int, height:int, active:Boolean, exclusive:boolean);
    self.bars["CenterControl"]          = SkillBar(self.windows["CenterControl"],       1, 1, 2, 1, true, false);
    self.bars["CenterBuffs"]            = SkillBar(self.windows["CenterBuffs"],         1, 1, 2, 1, true, false);
    self.bars["CenterDethreat"]         = SkillBar(self.windows["CenterDethreat"],      1, 1, 2, 1, true, false);
    self.bars["CenterForetell"]         = SkillBar(self.windows["CenterForetell"],      1, 1, 4, 1, true, false);
    self.bars["CenterVision"]           = SkillBar(self.windows["CenterVision"],        1, 1, 2, 1, true, false);
    self.bars["CenterSelf"]                     = SkillBar(self.windows["CenterSelf"],          1, 1, 3, 1, true, false);
        self.bars["BattleFrost"]                = SkillBar(self.windows["BattleFrost"],         1, 1, 5, 1, true, false);
    self.bars["BattleFlame"]            = SkillBar(self.windows["BattleFlame"],         1, 1, 7, 1, true, false);
    self.bars["OffAttunement"]          = SkillBar(self.windows["OffAttunement"],       1, 1, 3, 1, true, true);
        self.bars["BattleStorm"]        = SkillBar(self.windows["Attunement"],          1, 1, 8, 1, true, true);
        self.bars["Healing"]                    = SkillBar(self.windows["Attunement"],          1, 1, 8, 1, true, true);
    self.bars["HealForetell"]           = SkillBar(self.windows["HealForetell"],        1, 1, 4, 1, true, false);
    
        -- Build Skills         SkillSlot( parent:SkillBar, x:int, y:int, active:Boolean, level:int, hexcode:String );
    self.skills["ShockingTouch"]                        = SkillSlot(self.bars["CenterControl"],         1, 1, true, 8, "0x7000F488");
    self.skills["AbruptWords"]                          = SkillSlot(self.bars["CenterControl"],         2, 1, true, { 30, 52 }, { "0x70017EEB", "0x70018775" });
    
    self.skills["ArmourofStorm"]                        = SkillSlot(self.bars["CenterBuffs"],           1, 1, true, 10, "0x7000F33A");
    self.skills["WeaponofStorm"]                        = SkillSlot(self.bars["CenterBuffs"],           2, 1, true, { 34, 64 }, { "0x7000F33D", "0x70020DFC" });
    
    self.skills["CalmingVerse"]                         = SkillSlot(self.bars["CenterDethreat"],        1, 1, true, 26, "0x70018275");
    self.skills["DistractingWinds"]                     = SkillSlot(self.bars["CenterDethreat"],        2, 1, true, 30, "0x7000EC5D");
 
        self.skills["TheBladewillnotWound"]             = SkillSlot(self.bars["CenterForetell"],        1, 1, true, 40, "0x7000F2A1");
    self.skills["TheFangwillnotPoison"]         = SkillSlot(self.bars["CenterForetell"],        2, 1, true, 44, "0x7000F2A0");
    self.skills["DoNotFalltoStorm"]                     = SkillSlot(self.bars["CenterForetell"],        3, 1, true, 46, "0x7000F343");
    self.skills["DoNotFallThisDay"]                     = SkillSlot(self.bars["CenterForetell"],        4, 1, true, { 50, 62 }, { "0x7000F25D", "0x7001F4A0" });
    
    self.skills["FalltoStorm"]                          = SkillSlot(self.bars["CenterVision"],          1, 1, true, 8, "0x7000F340");
    self.skills["FalltoOurWrath"]                       = SkillSlot(self.bars["CenterVision"],          2, 1, self.settings["Features"].wrath, 41, "0x700180F3");
        
    self.skills["Selfmotivation"]                       = SkillSlot(self.bars["CenterSelf"],            1, 1, true, 14, "0x7000E037");
    self.skills["MasterofWrits"]                        = SkillSlot(self.bars["CenterSelf"],            2, 1, true, 40, "0x70024D37");
    self.skills["SteadyHands"]                          = SkillSlot(self.bars["CenterSelf"],            3, 1, self.settings["Features"].steady, 41, "0x700180F2");
        
    self.skills["ScribesSpark"]                         = SkillSlot(self.bars["BattleStorm"],           1, 1, true, 1, "0x7000EEAD");
    self.skills["ShockingWords"]                        = SkillSlot(self.bars["BattleStorm"],           2, 1, true, 2, "0x7000EEAE");
        self.skills["CeaselessArgument"]                = SkillSlot(self.bars["BattleStorm"],           3, 1, true, 4, "0x7000EEAC");
        self.skills["EssenceofStorm"]                   = SkillSlot(self.bars["BattleStorm"],           4, 1, true, 16, "0x7000EEAB");
    self.skills["EpicConclusion"]                       = SkillSlot(self.bars["BattleStorm"],           5, 1, true, 20, "0x7000EEAF");
    self.skills["SustainingBolt"]                       = SkillSlot(self.bars["BattleStorm"],           6, 1, true, 30, "0x70024D3A");
        self.skills["VividImagery"]                             = SkillSlot(self.bars["BattleStorm"],           7, 1, true, 56, "0x700180F9");

    self.skills["ChillingRhetoric"]                     = SkillSlot(self.bars["BattleFrost"],           1, 1, true, 6, "0x7000EE02");
    self.skills["WritofCold"]                           = SkillSlot(self.bars["BattleFrost"],           2, 1, true, 12, "0x7000EE00");
        self.skills["EssenceofWinter"]                  = SkillSlot(self.bars["BattleFrost"],           3, 1, true, 24, "0x7000EE01");
    self.skills["FrozenEpilogue"]                       = SkillSlot(self.bars["BattleFrost"],           4, 1, true, 32, "0x7000EE03");
    self.skills["FlurryofWords"]                        = SkillSlot(self.bars["BattleFrost"],           5, 1, true, 38, "0x7000EDFF");

    self.skills["FieryRidicule"]                        = SkillSlot(self.bars["BattleFlame"],           1, 1, true, 1, "0x7000E96B");
    self.skills["WritofFire"]                           = SkillSlot(self.bars["BattleFlame"],           2, 1, true, 22, "0x7000EFF0");
    self.skills["ScathingMockery"]                      = SkillSlot(self.bars["BattleFlame"],           3, 1, true, 28, "0x7000E969");
    self.skills["EssenceofFlame"]                       = SkillSlot(self.bars["BattleFlame"],           4, 1, true, 36, "0x7000EFEF");
    self.skills["SmoulderingWrath"]                     = SkillSlot(self.bars["BattleFlame"],           5, 1, true, 40, "0x7000E96D");
    self.skills["EssayofFire"]                          = SkillSlot(self.bars["BattleFlame"],           6, 1, true, 50, "0x70024D39");
    self.skills["DistractingFlame"]                     = SkillSlot(self.bars["BattleFlame"],           7, 1, true, 60, "0x700180F5");
    
    self.skills["PreludetoHope"]                        = SkillSlot(self.bars["Healing"],                       1, 1, true, 1, "0x7000EEAA");
    self.skills["RuneofRestoration"]            = SkillSlot(self.bars["Healing"],                       2, 1, true, 4, "0x7000EEA5");
    self.skills["MendingVerse"]                         = SkillSlot(self.bars["Healing"],                       3, 1, true, 10, "0x7000EEA8");
    self.skills["WritofHealth"]                         = SkillSlot(self.bars["Healing"],                       4, 1, true, 12, "0x7000EEA9");
        self.skills["RousingWords"]                             = SkillSlot(self.bars["Healing"],                       5, 1, true, 14, "0x7000EEA4");
        self.skills["EpicfortheAges"]                   = SkillSlot(self.bars["Healing"],                       6, 1, true, 18, "0x7000EEA6");
        self.skills["WordofExaltation"]                 = SkillSlot(self.bars["Healing"],                       7, 1, true, 28, "0x7000EEA7");
    self.skills["EssayofExaltation"]            = SkillSlot(self.bars["Healing"],                       8, 1, true, 42, "0x70018636");
        
        self.skills["NothingTrulyEnds"]                 = SkillSlot(self.bars["HealForetell"],          1, 1, true, 20, "0x7000EDA1");
    self.skills["OurFatesEntwined"]                     = SkillSlot(self.bars["HealForetell"],          2, 1, true, { 48, 54 }, { "0x7000EDA7", "0x70018776" });
    self.skills["GloriousForeshadowing"]        = SkillSlot(self.bars["HealForetell"],          3, 1, true, 58, "0x700180F7");
    self.skills["ThatWhichDoesNotKillUs"]       = SkillSlot(self.bars["HealForetell"],          4, 1, self.settings["Features"].killus, 45, "0x700180F4");
    
        -- SET COMBAT STATES
        self.skills["DistractingWinds"]:SetCombat(true, false);
        self.skills["WritofHealth"]:SetCombat(true, false);
        self.skills["RousingWords"]:SetCombat(true, false);
        self.skills["EpicfortheAges"]:SetCombat(true, false);
        self.skills["WordofExaltation"]:SetCombat(true, false);
        self.skills["EssayofExaltation"]:SetCombat(true, false);
        self.skills["NothingTrulyEnds"]:SetCombat(false, true);

        -- CLASS SPECIFIC SETUP/DEFAULT CODE
        
        
    -- CLASS SPECIFIC EVENTS

        -- Attunement Tracking Event
        AddCallback(vars.classattr, "AttunementChanged", function(sender, args)
                KragenBars:AttunementChanged();
        end);

        -- INITIALIZE BARS
        self:InitBars();
        self:CombatChange(vars.player:IsInCombat());
        self:AttunementChanged();
        
end


-- ADD EFFECT EVENT
function RuneBars:AddEffect( effectIndex )
        local effect = vars.player:GetEffects():Get( effectIndex );

        if (effect:GetName() == self.effectlist["CalmingVerse"] and self.settings["Features"].hidecalmingverse == true) then
                self.skills["CalmingVerse"]:SetState( true , false, effect:GetID());
                
        elseif (effect:GetName() == self.effectlist["MasterofWrits"] and self.settings["Features"].dimmaster == true) then
                self.skills["MasterofWrits"]:SetState(true , true, effect:GetID());
                self.skills["WritofFire"]:SetActive(self.skills["MasterofWrits"].state);
                self.skills["WritofCold"]:SetActive(self.skills["MasterofWrits"].state);
                self.skills["WritofHealth"]:SetActive(self.skills["MasterofWrits"].state and vars.player:IsInCombat());
                self.skills["MasterofWrits"]:SetHover(true);

                
    end
end

-- REMOVE EFFECT EVENT
function RuneBars:RemoveEffect( effect )
        if (effect:GetName() == self.effectlist["CalmingVerse"]) then
        self.skills["CalmingVerse"]:SetState( false , true, effect:GetID());

        elseif (effect:GetName() == self.effectlist["MasterofWrits"]) then
                self.skills["MasterofWrits"]:SetState(false , true, effect:GetID());
        self.skills["WritofFire"]:SetActive(self.skills["MasterofWrits"].state);
                self.skills["WritofCold"]:SetActive(self.skills["MasterofWrits"].state);
                self.skills["WritofHealth"]:SetActive(self.skills["MasterofWrits"].state and vars.player:IsInCombat());
                self.skills["MasterofWrits"]:SetHover(self.skills["MasterofWrits"].state);
                
        end
end


-- ATTUNEMENT CHANGED EVENT
function RuneBars:AttunementChanged()
        local attune = vars.classattr:GetAttunement();
        if (attune < 10) then
            self.skills["ScribesSpark"]:SetParent(self.bars["BattleStorm"]);
                self.skills["ScribesSpark"]:SetPosition((self.skills["ScribesSpark"].x - 1) * 35, (self.skills["ScribesSpark"].y - 1) * 35);
                self.skills["CeaselessArgument"]:SetParent(self.bars["BattleStorm"]);
                self.skills["CeaselessArgument"]:SetPosition((self.skills["CeaselessArgument"].x - 1) * 35, (self.skills["CeaselessArgument"].y - 1) * 35);

                self.skills["PreludetoHope"]:SetParent(self.bars["OffAttunement"]);
                self.skills["PreludetoHope"]:SetPosition(0, 0);
                self.skills["RuneofRestoration"]:SetParent(self.bars["OffAttunement"]);
                self.skills["RuneofRestoration"]:SetPosition(35, 0);
                self.skills["MendingVerse"]:SetParent(self.bars["OffAttunement"]);
                self.skills["MendingVerse"]:SetPosition(70, 0);
                self.skills["WritofHealth"]:SetParent(self.bars["OffAttunement"]);
                self.skills["WritofHealth"]:SetPosition(105, 0);
                
                self.bars["BattleStorm"]:SetZOrder(0);
        self.bars["Healing"]:SetZOrder(-5);
                        
                self.skills["PreludetoHope"]:SetActive(true);
                self.skills["RuneofRestoration"]:SetActive(true);
                self.skills["MendingVerse"]:SetActive(false);
                self.skills["WritofHealth"]:SetActive(self.skills["MasterofWrits"].state and vars.player:IsInCombat());
                self.skills["RousingWords"]:SetActive(false);
                self.skills["EpicfortheAges"]:SetActive(false);
                self.skills["WordofExaltation"]:SetActive(false);
                self.skills["EssayofExaltation"]:SetActive(false);
        elseif (attune > 10 and attune < 13) then
                self.skills["PreludetoHope"]:SetActive(true);
                self.skills["RuneofRestoration"]:SetActive(true);
                self.skills["MendingVerse"]:SetActive(true);
                self.skills["WritofHealth"]:SetActive(self.skills["MasterofWrits"].state and vars.player:IsInCombat());
                self.skills["RousingWords"]:SetActive(false);
                self.skills["EpicfortheAges"]:SetActive(false);
                self.skills["WordofExaltation"]:SetActive(false);
                self.skills["EssayofExaltation"]:SetActive(false);
        elseif (attune >= 13 and attune < 16) then
        self.skills["PreludetoHope"]:SetActive(true);
                self.skills["RuneofRestoration"]:SetActive(true);
                self.skills["MendingVerse"]:SetActive(true);
                self.skills["WritofHealth"]:SetActive(vars.player:IsInCombat());
                self.skills["RousingWords"]:SetActive(vars.player:IsInCombat());
                self.skills["EpicfortheAges"]:SetActive(false);
                self.skills["WordofExaltation"]:SetActive(false);
                self.skills["EssayofExaltation"]:SetActive(false);
        elseif (attune >= 16 and attune < 19) then
        self.skills["PreludetoHope"]:SetActive(true);
                self.skills["RuneofRestoration"]:SetActive(true);
                self.skills["MendingVerse"]:SetActive(true);
                self.skills["WritofHealth"]:SetActive(vars.player:IsInCombat());
                self.skills["RousingWords"]:SetActive(vars.player:IsInCombat());
                self.skills["EpicfortheAges"]:SetActive(vars.player:IsInCombat());
                self.skills["WordofExaltation"]:SetActive(vars.player:IsInCombat());
                self.skills["EssayofExaltation"]:SetActive(false);
        elseif (attune >= 19) then
        self.skills["PreludetoHope"]:SetActive(true);
                self.skills["RuneofRestoration"]:SetActive(true);
                self.skills["MendingVerse"]:SetActive(true);
                self.skills["WritofHealth"]:SetActive(vars.player:IsInCombat());
                self.skills["RousingWords"]:SetActive(vars.player:IsInCombat());
                self.skills["EpicfortheAges"]:SetActive(vars.player:IsInCombat());
                self.skills["WordofExaltation"]:SetActive(vars.player:IsInCombat());
                self.skills["EssayofExaltation"]:SetActive(vars.player:IsInCombat());
        end
        
        if (attune > 10) then
        self.skills["ScribesSpark"]:SetParent(self.bars["OffAttunement"]);
                self.skills["ScribesSpark"]:SetPosition(0, 0);
                self.skills["CeaselessArgument"]:SetParent(self.bars["OffAttunement"]);
                self.skills["CeaselessArgument"]:SetPosition(35, 0);

        self.skills["PreludetoHope"]:SetParent(self.bars["Healing"]);
                self.skills["PreludetoHope"]:SetPosition( (self.skills["PreludetoHope"].x - 1) * 35, (self.skills["PreludetoHope"].y - 1) * 35 );
                self.skills["RuneofRestoration"]:SetParent(self.bars["Healing"]);
                self.skills["RuneofRestoration"]:SetPosition( (self.skills["RuneofRestoration"].x - 1) * 35, (self.skills["RuneofRestoration"].y - 1) * 35 );
                self.skills["MendingVerse"]:SetParent(self.bars["Healing"]);
                self.skills["MendingVerse"]:SetPosition( (self.skills["MendingVerse"].x - 1) * 35, (self.skills["MendingVerse"].y - 1) * 35 );
                self.skills["WritofHealth"]:SetParent(self.bars["Healing"]);
        self.skills["WritofHealth"]:SetPosition( (self.skills["WritofHealth"].x - 1) * 35, (self.skills["WritofHealth"].y - 1) * 35 );
        
        self.bars["BattleStorm"]:SetZOrder(-5);
        self.bars["Healing"]:SetZOrder(0);

                self.skills["ScribesSpark"]:SetActive(true);
                self.skills["CeaselessArgument"]:SetActive(false);
                self.skills["ShockingWords"]:SetActive(false);
                self.skills["EssenceofStorm"]:SetActive(false);
                self.skills["SustainingBolt"]:SetActive(false);
                self.skills["VividImagery"]:SetActive(false);
                self.skills["EpicConclusion"]:SetActive(false);
                
                self.skills["FieryRidicule"]:SetActive(true);
                self.skills["WritofFire"]:SetActive(self.skills["MasterofWrits"].state);
                self.skills["ScathingMockery"]:SetActive(false);
                self.skills["EssenceofFlame"]:SetActive(false);
                self.skills["EssayofFire"]:SetActive(false);
                self.skills["SmoulderingWrath"]:SetActive(false);
                self.skills["DistractingFlame"]:SetActive(false);
                
                self.skills["ChillingRhetoric"]:SetActive(true);
                self.skills["WritofCold"]:SetActive(self.skills["MasterofWrits"].state);
                self.skills["FlurryofWords"]:SetActive(false);
                self.skills["EssenceofWinter"]:SetActive(false);
                self.skills["FrozenEpilogue"]:SetActive(false);
        elseif (attune < 10 and attune > 7) then
                self.skills["ScribesSpark"]:SetActive(true);
                self.skills["CeaselessArgument"]:SetActive(true);
                self.skills["ShockingWords"]:SetActive(false);
                self.skills["EssenceofStorm"]:SetActive(false);
                self.skills["SustainingBolt"]:SetActive(false);
                self.skills["VividImagery"]:SetActive(false);
                self.skills["EpicConclusion"]:SetActive(false);
                
                self.skills["FieryRidicule"]:SetActive(true);
                self.skills["WritofFire"]:SetActive(self.skills["MasterofWrits"].state);
                self.skills["ScathingMockery"]:SetActive(false);
                self.skills["EssenceofFlame"]:SetActive(false);
                self.skills["EssayofFire"]:SetActive(false);
                self.skills["SmoulderingWrath"]:SetActive(false);
                self.skills["DistractingFlame"]:SetActive(false);

                self.skills["ChillingRhetoric"]:SetActive(true);
                self.skills["WritofCold"]:SetActive(self.skills["MasterofWrits"].state);
                self.skills["FlurryofWords"]:SetActive(false);
                self.skills["EssenceofWinter"]:SetActive(false);
                self.skills["FrozenEpilogue"]:SetActive(false);
        elseif (attune <= 7 and attune > 4) then
                self.skills["ScribesSpark"]:SetActive(true);
                self.skills["CeaselessArgument"]:SetActive(true);
                self.skills["ShockingWords"]:SetActive(true);
                self.skills["EssenceofStorm"]:SetActive(true);
                self.skills["SustainingBolt"]:SetActive(false);
                self.skills["VividImagery"]:SetActive(false);
                self.skills["EpicConclusion"]:SetActive(false);
                
                self.skills["FieryRidicule"]:SetActive(true);
                self.skills["WritofFire"]:SetActive(true);
                self.skills["DistractingFlame"]:SetActive(true);
                self.skills["ScathingMockery"]:SetActive(false);
                self.skills["EssenceofFlame"]:SetActive(false);
                self.skills["EssayofFire"]:SetActive(false);
                self.skills["SmoulderingWrath"]:SetActive(false);

                self.skills["ChillingRhetoric"]:SetActive(true);
                self.skills["WritofCold"]:SetActive(true);
                self.skills["FlurryofWords"]:SetActive(true);
                self.skills["EssenceofWinter"]:SetActive(false);
                self.skills["FrozenEpilogue"]:SetActive(false);
        elseif (attune <= 4 and attune > 1) then
                self.skills["ScribesSpark"]:SetActive(true);
                self.skills["CeaselessArgument"]:SetActive(true);
                self.skills["ShockingWords"]:SetActive(true);
                self.skills["EssenceofStorm"]:SetActive(true);
                self.skills["SustainingBolt"]:SetActive(true);
                self.skills["VividImagery"]:SetActive(true);
                self.skills["EpicConclusion"]:SetActive(false);
                
                self.skills["FieryRidicule"]:SetActive(true);
                self.skills["WritofFire"]:SetActive(true);
        self.skills["DistractingFlame"]:SetActive(true);
                self.skills["ScathingMockery"]:SetActive(true);
                self.skills["EssenceofFlame"]:SetActive(true);
                self.skills["EssayofFire"]:SetActive(true);
                self.skills["SmoulderingWrath"]:SetActive(false);


                self.skills["ChillingRhetoric"]:SetActive(true);
                self.skills["WritofCold"]:SetActive(true);
                self.skills["FlurryofWords"]:SetActive(true);
                self.skills["EssenceofWinter"]:SetActive(true);
                self.skills["FrozenEpilogue"]:SetActive(false);
        elseif (attune <= 1) then
                self.skills["ScribesSpark"]:SetActive(true);
                self.skills["CeaselessArgument"]:SetActive(true);
                self.skills["ShockingWords"]:SetActive(true);
                self.skills["EssenceofStorm"]:SetActive(true);
                self.skills["SustainingBolt"]:SetActive(true);
                self.skills["VividImagery"]:SetActive(true);
                self.skills["EpicConclusion"]:SetActive(true);
                
                self.skills["FieryRidicule"]:SetActive(true);
                self.skills["WritofFire"]:SetActive(true);
                self.skills["DistractingFlame"]:SetActive(true);
                self.skills["ScathingMockery"]:SetActive(true);
                self.skills["EssenceofFlame"]:SetActive(true);
                self.skills["EssayofFire"]:SetActive(true);
                self.skills["SmoulderingWrath"]:SetActive(true);


                self.skills["ChillingRhetoric"]:SetActive(true);
                self.skills["WritofCold"]:SetActive(true);
                self.skills["FlurryofWords"]:SetActive(true);
                self.skills["EssenceofWinter"]:SetActive(true);
                self.skills["FrozenEpilogue"]:SetActive(true);
        end
        
        if (attune == 10) then
                self.skills["PreludetoHope"]:SetActive(true);
                self.skills["RuneofRestoration"]:SetActive(true);
                self.skills["MendingVerse"]:SetActive(true);
                self.skills["WritofHealth"]:SetActive(self.skills["MasterofWrits"].state and vars.player:IsInCombat());
                self.skills["RousingWords"]:SetActive(false);
                self.skills["EpicfortheAges"]:SetActive(false);
                self.skills["WordofExaltation"]:SetActive(false);
                self.skills["EssayofExaltation"]:SetActive(false);
                
                self.skills["ScribesSpark"]:SetActive(true);
                self.skills["CeaselessArgument"]:SetActive(true);
                self.skills["ShockingWords"]:SetActive(false);
                self.skills["EssenceofStorm"]:SetActive(false);
                self.skills["SustainingBolt"]:SetActive(false);
                self.skills["VividImagery"]:SetActive(false);
                self.skills["EpicConclusion"]:SetActive(false);
                
                self.skills["FieryRidicule"]:SetActive(true);
                self.skills["WritofFire"]:SetActive(self.skills["MasterofWrits"].state);
                self.skills["ScathingMockery"]:SetActive(false);
                self.skills["EssenceofFlame"]:SetActive(false);
                self.skills["EssayofFire"]:SetActive(false);
                self.skills["SmoulderingWrath"]:SetActive(false);
                self.skills["DistractingFlame"]:SetActive(false);

                self.skills["ChillingRhetoric"]:SetActive(true);
                self.skills["WritofCold"]:SetActive(self.skills["MasterofWrits"].state);
                self.skills["FlurryofWords"]:SetActive(false);
                self.skills["EssenceofWinter"]:SetActive(false);
                self.skills["FrozenEpilogue"]:SetActive(false);
                
                if (self.settings["Features"].defaultattune == 2) then
                        self.skills["ScribesSpark"]:SetParent(self.bars["OffAttunement"]);
                        self.skills["ScribesSpark"]:SetPosition(0, 0);
                        self.skills["CeaselessArgument"]:SetParent(self.bars["OffAttunement"]);
                        self.skills["CeaselessArgument"]:SetPosition(35, 0);

            self.skills["PreludetoHope"]:SetParent(self.bars["Healing"]);
                        self.skills["PreludetoHope"]:SetPosition( (self.skills["PreludetoHope"].x - 1) * 35, (self.skills["PreludetoHope"].y - 1) * 35 );
                        self.skills["RuneofRestoration"]:SetParent(self.bars["Healing"]);
                        self.skills["RuneofRestoration"]:SetPosition( (self.skills["RuneofRestoration"].x - 1) * 35, (self.skills["RuneofRestoration"].y - 1) * 35 );
                        self.skills["MendingVerse"]:SetParent(self.bars["Healing"]);
                        self.skills["MendingVerse"]:SetPosition( (self.skills["MendingVerse"].x - 1) * 35, (self.skills["MendingVerse"].y - 1) * 35 );
                        self.skills["WritofHealth"]:SetParent(self.bars["Healing"]);
                self.skills["WritofHealth"]:SetPosition( (self.skills["WritofHealth"].x - 1) * 35, (self.skills["WritofHealth"].y - 1) * 35 );
                
                self.bars["BattleStorm"]:SetZOrder(-5);
                self.bars["Healing"]:SetZOrder(0);

                else
            self.skills["ScribesSpark"]:SetParent(self.bars["BattleStorm"]);
                        self.skills["ScribesSpark"]:SetPosition((self.skills["ScribesSpark"].x - 1) * 35, (self.skills["ScribesSpark"].y - 1) * 35);
                        self.skills["CeaselessArgument"]:SetParent(self.bars["BattleStorm"]);
                        self.skills["CeaselessArgument"]:SetPosition((self.skills["CeaselessArgument"].x - 1) * 35, (self.skills["CeaselessArgument"].y - 1) * 35);
                        
                        self.skills["PreludetoHope"]:SetParent(self.bars["OffAttunement"]);
                        self.skills["PreludetoHope"]:SetPosition(0, 0);
                        self.skills["RuneofRestoration"]:SetParent(self.bars["OffAttunement"]);
                        self.skills["RuneofRestoration"]:SetPosition(35, 0);
                        self.skills["MendingVerse"]:SetParent(self.bars["OffAttunement"]);
                        self.skills["MendingVerse"]:SetPosition(70, 0);
                        self.skills["WritofHealth"]:SetParent(self.bars["OffAttunement"]);
                        self.skills["WritofHealth"]:SetPosition(105, 0);
                        
                        self.bars["BattleStorm"]:SetZOrder(0);
                self.bars["Healing"]:SetZOrder(-5);
                end
        end
        
end


-- DEFAULT SETTINGS
function RuneBars:DefaultSettings()
        self.settings = { };
        
        local windowlist = {"CenterControl", "CenterBuffs", "CenterDethreat", "CenterForetell", "CenterVision", "CenterSelf", "OffAttunement", "BattleFrost", "BattleFlame", "Attunement", "HealForetell"};
        for k,v in pairs(windowlist) do
                self.settings[v] = { active = true, x = 0, y = 0, rotate = 0 };
        end

        self.settings["Features"] = { };
        self.settings["Features"].hidecalmingverse = true;
        self.settings["Features"].wrath = false;
        self.settings["Features"].steady = false;
        self.settings["Features"].dimmaster = true;
        self.settings["Features"].defaultattune = 1;
        self.settings["Features"].killus = false;

end

-- UPDATE SETTINGS
function RuneBars:UpdateSettings()
        settings.vers = vars.vers;

end


-- DISPLAY SETUP WINDOW AND SET ALL CHECKBOXES COMBOBOXES SLIDERS AND QUICKSLOTS
function RuneBars: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("Center: Control");
        self.setupbb.checkboxbb1:SetChecked (self.settings["CenterControl"].active);
        self.setupbb.checkboxbb1:SetVisible(true);
        self.setupbb.checkboxbb2:SetText("Center: Buffs");
        self.setupbb.checkboxbb2:SetChecked (self.settings["CenterBuffs"].active);
        self.setupbb.checkboxbb2:SetVisible(true);
        self.setupbb.checkboxbb3:SetText("Center: Dethreat");
        self.setupbb.checkboxbb3:SetChecked (self.settings["CenterDethreat"].active);
        self.setupbb.checkboxbb3:SetVisible(true);
        self.setupbb.checkboxbb4:SetText("Center: Foretellings");
        self.setupbb.checkboxbb4:SetChecked (self.settings["CenterForetell"].active);
        self.setupbb.checkboxbb4:SetVisible(true);
        self.setupbb.checkboxbb5:SetText("Center: Dmg Visions");
        self.setupbb.checkboxbb5:SetChecked (self.settings["CenterVision"].active);
        self.setupbb.checkboxbb5:SetVisible(true);
        self.setupbb.checkboxbb6:SetText("Center: Self");
        self.setupbb.checkboxbb6:SetChecked (self.settings["CenterSelf"].active);
        self.setupbb.checkboxbb6:SetVisible(true);
        self.setupbb.checkboxbb7:SetText("Off Attunement");
        self.setupbb.checkboxbb7:SetChecked (self.settings["OffAttunement"].active);
        self.setupbb.checkboxbb7:SetVisible(true);
        self.setupbb.checkboxbb8:SetText("Battle: Frost");
        self.setupbb.checkboxbb8:SetChecked (self.settings["BattleFrost"].active);
        self.setupbb.checkboxbb8:SetVisible(true);
        self.setupbb.checkboxbb9:SetText("Battle: Flame");
        self.setupbb.checkboxbb9:SetChecked (self.settings["BattleFlame"].active);
        self.setupbb.checkboxbb9:SetVisible(true);
        self.setupbb.checkboxbb10:SetText("Attunement");
        self.setupbb.checkboxbb10:SetChecked (self.settings["Attunement"].active);
        self.setupbb.checkboxbb10:SetVisible(true);
        self.setupbb.checkboxbb11:SetText("Heal: Foretellings");
        self.setupbb.checkboxbb11:SetChecked (self.settings["HealForetell"].active);
        self.setupbb.checkboxbb11:SetVisible(true);

        self.setupf.checkboxf1:SetText("You Shall Fall...Wrath");
        self.setupf.checkboxf1:SetChecked (self.settings["Features"].wrath);
        self.setupf.checkboxf1:SetVisible(true);
        self.setupf.checkboxf2:SetText("Steady Hands");
        self.setupf.checkboxf2:SetChecked (self.settings["Features"].steady);
        self.setupf.checkboxf2:SetVisible(true);
        self.setupf.checkboxf3:SetText("That Which...Kill Us");
        self.setupf.checkboxf3:SetChecked (self.settings["Features"].killus);
        self.setupf.checkboxf3:SetVisible(true);
        
        self.setupf.checkboxf10:SetText("Hide Calming Verse");
        self.setupf.checkboxf10:SetChecked (self.settings["Features"].hidecalmingverse);
        self.setupf.checkboxf10:SetVisible(true);
        self.setupf.checkboxf11:SetText("Dim Master of Writs");
        self.setupf.checkboxf11:SetChecked (self.settings["Features"].dimmaster);
        self.setupf.checkboxf11:SetVisible(true);
        
        self.setupf.combo1box.listBox:ClearItems();
        self.setupf.combo1Label:SetText("Show at 0 Attune");
        self.setupf.combo1Label:SetVisible(true);
        local combolist = {"Storm", "Healing"}
        for k,v in pairs(combolist) do
                self.setupf.combo1box:AddItem(v, k);
        end
        self.setupf.combo1box:SetVisible(true);
        self.setupf.combo1box:SetSelection(self.settings["Features"].defaultattune);
        
        
end

-- SET ALL VARIABLES OFF OF SETUP WINDOW
function RuneBars:SetupClosing()
        self.settings["CenterControl"].active = self.setupbb.checkboxbb1:IsChecked();
    self.settings["CenterBuffs"].active = self.setupbb.checkboxbb2:IsChecked();
    self.settings["CenterDethreat"].active = self.setupbb.checkboxbb3:IsChecked();
    self.settings["CenterForetell"].active = self.setupbb.checkboxbb4:IsChecked();
    self.settings["CenterVision"].active = self.setupbb.checkboxbb5:IsChecked();
    self.settings["CenterSelf"].active = self.setupbb.checkboxbb6:IsChecked();
    self.settings["OffAttunement"].active = self.setupbb.checkboxbb7:IsChecked();
    self.settings["BattleFrost"].active = self.setupbb.checkboxbb8:IsChecked();
    self.settings["BattleFlame"].active = self.setupbb.checkboxbb9:IsChecked();
    self.settings["Attunement"].active = self.setupbb.checkboxbb10:IsChecked();
    self.settings["HealForetell"].active = self.setupbb.checkboxbb11:IsChecked();

        self.settings["Features"].wrath = self.setupf.checkboxf1:IsChecked();
    self.settings["Features"].steady = self.setupf.checkboxf2:IsChecked();
    self.settings["Features"].killus = self.setupf.checkboxf3:IsChecked();

    self.settings["Features"].hidecalmingverse = self.setupf.checkboxf10:IsChecked();
    self.settings["Features"].dimmaster = self.setupf.checkboxf11:IsChecked();
        
    self.settings["Features"].defaultattune = self.setupf.combo1box:GetSelection();
        
        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 RuneBars: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["FalltoOurWrath"]:SetActive(self.settings["Features"].wrath);
        self.skills["SteadyHands"]:SetActive(self.settings["Features"].steady);
        self.skills["ThatWhichDoesNotKillUs"]:SetActive(self.settings["Features"].killus);
    
    -- Refresh States
    self:CombatChange(vars.player:IsInCombat());
        self:AttunementChanged();

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

end

Go to most recent revision | Compare with Previous | Blame


All times are GMT -5. The time now is 03:10 AM.


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