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 SPECIFIC VARIABLES
self.poison = 0;
self.stance = 0;
self.effectlist['CriticalResponse'] = Effect();
self.effectlist['DoubleEdged'] = Effect();
self.effectlist['FMResponse'] = Effect();
self.effectlist['ImprovedFeint'] = Effect();
self.effectlist['Campsite'] = Effect();
self.effectlist['Stunned'] = Effect();
self.effectlist['Dazed'] = Effect();
self.effectlist['KnockedDown'] = Effect();
self.effectlist['KnockedOut'] = Effect();
self.effectlist['Mischief'] = Effect();
self.effectlist['QuietKnife'] = Effect();
self.effectlist['Gambler'] = Effect();
-- DEFINE THE EFFECT LIST BASED ON CLIENT LANGUAGE
self.DefineEffectList = function()
-- ENGLISH CLIENT
if (settings.language == 1) then
self.effectlist['CriticalResponse'] :SetName('Critical Response');
self.effectlist['DoubleEdged'] :SetName('Double Edged');
self.effectlist['FMResponse'] :SetName('Fellowship Manoeuvre Response');
self.effectlist['ImprovedFeint'] :SetName('Improved Feint');
self.effectlist['Campsite'] :SetName('Campsite');
self.effectlist['Stunned'] :SetName('Stunned');
self.effectlist['Dazed'] :SetName('Dazed');
self.effectlist['KnockedDown'] :SetName('Knocked Down');
self.effectlist['KnockedOut'] :SetName('Knocked Out');
self.effectlist['Mischief'] :SetName('Mischievous');
self.effectlist['QuietKnife'] :SetName('Quiet Knife');
self.effectlist['Gambler'] :SetName('Gambler');
-- FRENCH CLIENT
elseif (settings.language == 2) then
self.effectlist['CriticalResponse'] :SetName('Critical Response');
self.effectlist['DoubleEdged'] :SetName('Double Edged');
self.effectlist['FMResponse'] :SetName('Fellowship Manoeuvre Response');
self.effectlist['ImprovedFeint'] :SetName('Improved Feint');
self.effectlist['Campsite'] :SetName('Campsite');
self.effectlist['Stunned'] :SetName('Etourdissement');
self.effectlist['Dazed'] :SetName('Hébété');
self.effectlist['KnockedDown'] :SetName('Renversé');
self.effectlist['KnockedOut'] :SetName('Knocked Out');
self.effectlist['Mischief'] :SetName('Mischievous');
self.effectlist['QuietKnife'] :SetName('Quiet Knife');
self.effectlist['Gambler'] :SetName('Gambler');
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'] :SetName('Kritische Erwiderung');
self.effectlist['DoubleEdged'] :SetName('Zweischneidiger Schlag');
self.effectlist['FMResponse'] :SetName('Erwiderung "Gefährtenmanöver"');
self.effectlist['ImprovedFeint'] :SetName('Improved Feint');
self.effectlist['Campsite'] :SetName('Campsite');
self.effectlist['Stunned'] :SetName('Bewusstlos geschlagen');
self.effectlist['Dazed'] :SetName('Benommenheit');
self.effectlist['KnockedDown'] :SetName('Zu Boden geschlagen');
self.effectlist['KnockedOut'] :SetName('Knocked Out');
self.effectlist['Mischief'] :SetName('Mischievous');
self.effectlist['QuietKnife'] :SetName('Quiet Knife');
self.effectlist['Gambler'] :SetName('Gambler');
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 Bars
self.bars["CritTier1"] = SkillBar(self.windows["Crit"], 1, 1, 1, 1, true, true);
self.bars["CritTier2"] = SkillBar(self.windows["Crit"], 2, 1, 1, 1, true, true);
-- Build Skills
self.skills["BurglarsAdvantage"] = SkillSlot(self.bars["CritTier1"], 1, 1, false, 2, "0x70003F0B");
self.skills["DoubleEdgedStrike"] = SkillSlot(self.bars["CritTier2"], 1, 1, false, 6, "0x70003F0C");
self.skills["ExposedThroat"] = SkillSlot(self.bars["Legendary"], 1, 1, false, 41, "0x70000F80");
self.skills["FlashingBlades"] = SkillSlot(self.bars["Legendary"], 2, 1, false, 41, "0x70000F5D");
self.skills["LuckyStrike"] = SkillSlot(self.bars["Capstones"], 1, 1, self.settings.traits["DealingsDone"].active, 56, "0x7000FD86");
self.skills["FeintAttack"] = SkillSlot(self.bars["Capstones"], 2, 1, self.settings.traits["PracticedBluff"].active, 58, "0x7000FB71");
self.skills["SmallSnag"] = SkillSlot(self.bars["Capstones"], 3, 1, self.settings.traits["LittleAnnoyances"].active, 60, "0x7000FB73");
self.skills["EscapeClause"] = SkillSlot(self.bars["FMReactives"], 1, 1, false, 48, "0x7000D443");
self.skills["FindFooting"] = SkillSlot(self.bars["Stunned"], 1, 1, false, 32, "0x70003F14");
self.skills["SurpriseStrike"] = SkillSlot(self.bars["Melee"], 1, 1, true, 1, "0x70003F08");
self.skills["CunningAttack"] = SkillSlot(self.bars["Melee"], 2, 1, true, 1, "0x70003F09");
self.skills["SubtleStab"] = SkillSlot(self.bars["Melee"], 3, 1, true, { 1, 72}, { "0x700031D3", "0x7002837D" });
self.skills["Disable"] = SkillSlot(self.bars["Tricks"], 1, 1, true, 4, "0x700031FA");
self.skills["DITE"] = SkillSlot(self.bars["Tricks"], 2, 1, true, 16, "0x700031E7");
self.skills["CounterDefences"] = SkillSlot(self.bars["Tricks"], 3, 1, true, { 24, 68 }, { "0x70003200", "0x7002837A" });
self.skills["Enrage"] = SkillSlot(self.bars["Tricks"], 4, 1, true, 38, "0x70003218");
self.skills["Riddle"] = SkillSlot(self.bars["Control"], 1, 1, true, { 8, 66}, { "0x700031D8", "0x70028385" });
self.skills["Addle"] = SkillSlot(self.bars["Control"], 2, 1, true, 14, "0x70003F0E");
self.skills["Provoke"] = SkillSlot(self.bars["Control"], 3, 1, true, 34, "0x70003F0A");
self.skills["Confound"] = SkillSlot(self.bars["Control"], 4, 1, vars.classattr:GetStance() == 1, 46, "0x7000D441");
self.skills["Sneak"] = SkillSlot(self.bars["Stealth"], 1, 1, true, 4, "0x70003212");
self.skills["Diversion"] = SkillSlot(self.bars["Stealth"], 2, 1, true, 18, "0x700031F5");
self.skills["ShareTheFun"] = SkillSlot(self.bars["Stealth"], 3, 1, true, 42, "0x7000D448");
self.skills["HideInPlainSight"] = SkillSlot(self.bars["HIPS"], 1, 1, true, { 30, 54 }, { "0x7000320D", "0x70015A02" });
self.skills["MischieviousGlee"] = SkillSlot(self.bars["Removals"], 1, 1, true, {10, 64}, { "0x70003F10", "0x70020DD0" });
self.skills["StartlingTwist"] = SkillSlot(self.bars["Removals"], 2, 1, true, {20, 52, 74}, { "0x70003F0F", "0x70015A04", "0x70028383" });
self.skills["CleverRetort"] = SkillSlot(self.bars["Removals"], 3, 1, self.settings.traits["HonedWit"].active or vars.classattr:GetStance() == 1, 30, "0x7000D440");
self.skills["ExploitOpening"] = SkillSlot(self.bars["FMStarters"], 1, 1, true, 12, "0x70003F0D");
self.skills["Trip"] = SkillSlot(self.bars["FMStarters"], 2, 1, true, 28, "0x70003F07");
self.skills["Marbles"] = ItemSlot(self.bars["FMStarters"], 3, 1, true, self.settings.quickslots["Marbles"]);
self.skills["Aim"] = SkillSlot(self.bars["Buffs"], 1, 1, true, 12, "0x700031E1");
self.skills["RevealWeakness"] = SkillSlot(self.bars["Buffs"], 2, 1, true, 22, "0x70003F11");
self.skills["LIE"] = SkillSlot(self.bars["Buffs"], 3, 1, true, 50, "0x7000D445");
self.skills["WellPlacedStrike"] = SkillSlot(self.bars["Induction"], 1, 1, true, 40, "0x7000D43E");
self.skills["Caltrops"] = ItemSlot(self.bars["ClassItems"], 1, 1, true, self.settings.quickslots["Caltrops"]);
self.skills["StunDust"] = ItemSlot(self.bars["ClassItems"], 2, 1, true, self.settings.quickslots["StunDust"]);
self.skills["Knives"] = ItemSlot(self.bars["ClassItems"], 3, 1, true, self.settings.quickslots["Knives"]);
self.skills["TouchAndGo"] = SkillSlot(self.bars["SelfBuffs"], 1, 1, true, 6, "0x70003F13");
self.skills["ReadyAndAble"] = SkillSlot(self.bars["SelfBuffs"], 2, 1, true, 36, "0x70003F12");
self.skills["KnivesOut"] = SkillSlot(self.bars["SelfBuffs"], 3, 1, true, 44, "0x7000D444");
self.skills["CurePoison"] = SkillSlot(self.bars["Cure"], 1, 1, true, { 26, 62 }, {"0x70003F17", "0x7001F4A4" });
self.skills["Burgle"] = SkillSlot(self.bars["Utility"], 1, 1, true, 14, "0x70003F16");
self.skills["ContactPedlar"] = SkillSlot(self.bars["Utility"], 2, 1, false, 26, "0x7000D442");
self.skills["TrackTreasure"] = SkillSlot(self.bars["Utility"], 3, 1, true, 20, "0x70003F15");
self.skills["SafeFall"] = SkillSlot(self.bars["Utility"], 4, 1, true, 18, "0x7002613D");
-- Build Stance Slot
self.multi["Stances"] = SkillMultiSlot(self.bars["Stance"], 1, 1, true);
self.multi["Stances"]:AddShortCut("Mischief", 20, "0x7000D4A4");
self.multi["Stances"]:AddShortCut("QuietKnife", 20, "0x7002613C");
self.multi["Stances"]:AddShortCut("Gambler", 20, "0x7002613B");
self.multi["Stances"]:LevelCheck();
-- SET COMBAT STATES
self.multi["Stances"]: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.skills["TrackTreasure"]:SetCombat(false, true);
-- ITEM MANAGER
--self.itemmanager = ItemManager();
--self.itemmanager:RegisterItem("Bag of Marbles", { "Tiny","Small","Medium","Large","Big","Giant" }, {"Recipe"}, self.skills["Marbles"]);
--self.itemmanager:RegisterItem("Caltrops", { "Caltrops","Improved","Sharp","Deadly","Lethal","Crippling" }, {"Recipe"}, self.skills["Caltrops"]);
--self.itemmanager:RegisterItem("Stun Dust", { "Stun Dust","Improved","Blinding","Overpowering","Paralyzing", "Incapacitating" }, {"Recipe"}, self.skills["StunDust"]);
--self.itemmanager:RegisterItem("Serrated Knife", { "Ancient Steel","Precise Ancient Steel","Sellsword","Precise Sellsword" }, {"Recipe"}, self.skills["Knives"]);
--self.itemmanager:ParseItems();
-- CLASS SPECIFIC SETUP/DEFAULT CODE
-- Stance Event
AddCallback(vars.classattr, "StanceChanged", function(sender, args)
KragenBars:StanceChange();
end);
-- INITIALIZE BARS
self:InitBars();
self:StanceChange();
self:CombatChange(vars.player:IsInCombat());
end
-- ADD EFFECT EVENT
function BurglarBars:AddEffect( effectIndex )
local effect = vars.player:GetEffects():Get( effectIndex );
local name = effect:GetName();
local id = effect:GetID();
-- Crit Response
if (name == self.effectlist["CriticalResponse"]:GetName()) then
if (self.effectlist["CriticalResponse"]:SetState(true, id)) then
self.skills["BurglarsAdvantage"]:SetActive(true);
end
-- Double Edged
elseif (name == self.effectlist["DoubleEdged"]:GetName()) then
if (self.effectlist["DoubleEdged"]:SetState(true, id)) then
self.skills["DoubleEdgedStrike"]:SetActive(false);
self.skills["ExposedThroat"]:SetActive(self.settings.traits["ExposedThroat"].active);
self.skills["FlashingBlades"]:SetActive(self.settings.traits["FlashingBlades"].active);
self.skills["LuckyStrike"]:SetActive(true);
self.skills["FeintAttack"]:SetActive(self.stance ~= 1);
self.skills["SmallSnag"]:SetActive(true);
end
-- Stunned, Dazed, Knocked Down
elseif (name == self.effectlist["Stunned"]:GetName() or name == self.effectlist["Dazed"]:GetName() or name == self.effectlist["KnockedDown"]:GetName() or name == self.effectlist["KnockedOut"]:GetName()) then
if (self.effectlist["Stunned"]:SetState(true, id)) then
self.skills["FindFooting"]:SetActive( true );
end
-- Fellowship Manoeuvre Response
elseif (name == self.effectlist["FMResponse"]:GetName()) then
if (self.effectlist["FMResponse"]:SetState(true, id)) then
self.skills["EscapeClause"]:SetActive(true);
end
-- Improved Feint Attack
elseif (name == self.effectlist["ImprovedFeint"]:GetName()) then
if (self.effectlist["ImprovedFeint"]:SetState(true, id)) then
self.skills["LIE"]:SetActive( true );
self.skills["LIE"]:SetCombat(true, true);
self.skills["Trip"]:SetCombat(true, true);
self.skills["Diversion"]:SetCombat(true, true);
end
elseif (name == self.effectlist["Campsite"]:GetName()) then
if (self.effectlist["Campsite"]:SetState(true, id)) then
self.skills["ContactPedlar"]:SetActive( true );
end
elseif (name == self.effectlist["Mischief"]:GetName() or name == self.effectlist["QuietKnife"]:GetName() or name == self.effectlist["Gambler"]:GetName()) then
if (self.effectlist["Mischief"]:SetState(true, id)) then
if (name == self.effectlist["Mischief"]:GetName()) then
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 );
self.stance = 1;
else
self.skills["Sneak"]:SetActive( true );
self.skills["ShareTheFun"]:SetActive( true );
self.skills["Confound"]:SetActive( false );
self.skills["CleverRetort"]:SetActive( self.settings.traits["HonedWit"].active );
self.skills["FeintAttack"]:SetActive( self.effectlist["DoubleEdged"]:GetState() );
self.skills["LIE"]:SetActive( true );
self.skills["Diversion"]:SetActive( true );
self.skills["Burgle"]:SetActive( true );
self.skills["Trip"]:SetActive( true );
if (name == self.effectlist["QuietKnife"]:GetName()) then
self.stance = 2
elseif (name == self.effectlist["Gambler"]:GetName()) then
self.stance = 3
end
end
self:StanceChange();
end
-- Fear
elseif (effect:GetCategory() == Turbine.Gameplay.EffectCategory.Poison ) then
self.poison = self.poison + 1;
if (settings.skilldata["CurePoison"].parent ~= nil and vars.playerlevel >= self.skills["CurePoison"].level[1] and self.settings.features["PoisonIndicator"].active) then
if (self.settings.userconf[settings.skilldata["CurePoison"].parent].active) then
self.skills["CurePoison"]:SetColor("green");
end
end
end
end
-- REMOVE EFFECT EVENT
function BurglarBars:RemoveEffect( effect )
local name = effect:GetName();
local id = effect:GetID();
-- Crit Response
if (name == self.effectlist["CriticalResponse"]:GetName()) then
if (not self.effectlist["CriticalResponse"]:SetState(false, id)) then
self.skills["BurglarsAdvantage"]:SetActive(false);
self.skills["DoubleEdgedStrike"]:SetActive(true);
self.skills["DoubleEdgedStrike"]:StartTimer(5, false);
-- Begin Ugly Hack because Turbine removed "Double-Edged" buff
if (self.settings.traits["ExposedThroat"].active) then
self.skills["ExposedThroat"]:SetActive(true)
self.skills["ExposedThroat"]:StartTimer(10, false);
end
if (self.settings.traits["FlashingBlades"].active) then
self.skills["FlashingBlades"]:SetActive(true)
self.skills["FlashingBlades"]:StartTimer(10, false);
end
if (not self.settings.traits["DealingsDone"].active) then
self.skills["LuckyStrike"]:SetActive(true)
self.skills["LuckyStrike"]:StartTimer(10, false);
else
self.skills["LuckyStrike"]:SetActive(self.settings.traits["DealingsDone"].active);
end
if (not self.settings.traits["PracticedBluff"].active) then
if (self.stance ~= 1) then
self.skills["FeintAttack"]:SetActive(true)
self.skills["FeintAttack"]:StartTimer(10, false);
end
else
self.skills["FeintAttack"]:SetActive(self.settings.traits["PracticedBluff"].active and self.stance ~=1);
end
if (not self.settings.traits["LittleAnnoyances"].active) then
self.skills["SmallSnag"]:SetActive(true)
self.skills["SmallSnag"]:StartTimer(10, false);
else
self.skills["SmallSnag"]:SetActive(self.settings.traits["LittleAnnoyances"].active);
end
-- End Ugly Hack
end
-- Double Edged
elseif (name == self.effectlist["DoubleEdged"]:GetName()) then
if (not self.effectlist["DoubleEdged"]:SetState(false, id)) then
self.skills["ExposedThroat"]:SetActive(false);
self.skills["FlashingBlades"]:SetActive(false);
self.skills["LuckyStrike"]:SetActive(self.settings.traits["DealingsDone"].active);
self.skills["FeintAttack"]:SetActive(self.settings.traits["PracticedBluff"].active and self.stance ~= 1);
self.skills["SmallSnag"]:SetActive(self.settings.traits["LittleAnnoyances"].active);
end
-- Stunned, Dazed or Knocked Down
elseif ((name == self.effectlist["Stunned"]:GetName() or name == self.effectlist["Dazed"]:GetName() or name == self.effectlist["KnockedDown"]:GetName() or name == self.effectlist["KnockedOut"]:GetName())) then
if (not self.effectlist["Stunned"]:SetState(false, id)) then
self.skills["FindFooting"]:SetActive(false);
end
-- Fellowship Manoeuvre Response
elseif (name == self.effectlist["FMResponse"]:GetName()) then
if (not self.effectlist["FMResponse"]:SetState(false, id)) then
self.skills["EscapeClause"]:SetActive(false);
end
-- Improved Feint Attack
elseif (name == self.effectlist["ImprovedFeint"]:GetName()) then
if (not self.effectlist["ImprovedFeint"]:SetState(false, id)) then
self.skills["LIE"]:SetCombat(false, true);
self.skills["Diversion"]:SetCombat(false, true);
self.skills["Trip"]:SetCombat(false, true);
end
elseif (name == self.effectlist["Campsite"]:GetName()) then
if (not self.effectlist["Campsite"]:SetState(false, id)) then
self.skills["ContactPedlar"]:SetActive(false);
end
elseif (name == self.effectlist["Mischief"]:GetName() or name == self.effectlist["QuietKnife"]:GetName() or name == self.effectlist["Gambler"]:GetName()) then
if (not self.effectlist["Mischief"]:SetState(false, id)) then
self.stance = 0;
self.skills["Sneak"]:SetActive( true );
self.skills["ShareTheFun"]:SetActive( true );
self.skills["Confound"]:SetActive( false );
self.skills["CleverRetort"]:SetActive( self.settings.traits["HonedWit"].active );
self.skills["FeintAttack"]:SetActive( self.effectlist["DoubleEdged"]:GetState() );
self.skills["LIE"]:SetActive( true );
self.skills["Diversion"]:SetActive( true );
self.skills["Burgle"]:SetActive( true );
self.skills["Trip"]:SetActive( true );
self:StanceChange();
end
-- 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()
-- PRIMARY STANCE SWITCHING
if (self.settings.features["StancePriority"].active) then
if (self.stance == self.settings.defaults["PrimaryStance"].selected) then
self.multi["Stances"]:SetIndex(self.settings.defaults["SecondaryStance"].selected);
else
self.multi["Stances"]:SetIndex(self.settings.defaults["PrimaryStance"].selected);
end
end
-- HOVER/DISAPPEAR SWITCHING
if (self.stance == 0) then
self.multi["Stances"]:SetHover( false );
self.multi["Stances"]:SetActive( true );
else
self.multi["Stances"]:SetActive( self.settings.defaults["StanceActive"].selected ~= 3);
self.multi["Stances"]:SetHover( self.settings.defaults["StanceActive"].selected == 2 );
end
end
-- CRIT CHANGED EVENT
function BurglarBars:CritChange(tier, state)
end
-- DEFAULT SETTINGS
function BurglarBars:DefaultSettings()
self.settings = { preconf = { }, userconf = { }, traits = { }, features = { }, defaults = { }, quickslots = { } };
self.settings.preconf["Crit"] = { id = 1, name = "Crit Reactives", defpos = {1,2}, size={2,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Legendary"] = { id = 2, name = "Legendary", defpos = {3,2}, size={2,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Capstones"] = { id = 3, name = "Capstones", defpos = {5,2}, size={3,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Melee"] = { id = 4, name = "Melee", defpos = {1,4}, size={3,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Tricks"] = { id = 5, name = "Tricks", defpos = {4,4}, size={4,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Control"] = { id = 6, name = "Control", defpos = {8,4}, size={4,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Stance"] = { id = 7, name = "Stance", defpos = {12,4}, size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Removals"] = { id = 8, name = "Removals", defpos = {4,3}, size={3,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["FMStarters"] = { id = 9, name = "FM Starters", defpos = {7,3}, size={3,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["FMReactives"] = { id = 10, name = "FM Reactives", defpos = {10,2}, size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Buffs"] = { id = 11, name = "Battle Buffs", defpos = {1,3}, size={3,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Induction"] = { id = 12, name = "Induction", defpos = {8,2}, size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Stealth"] = { id = 13, name = "Stealth", defpos = {10,3}, size={3,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["HIPS"] = { id = 14, name = "HIPS", defpos = {12,2}, size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["SelfBuffs"] = { id = 15, name = "Self Buffs", defpos = {1,1}, size={3,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Stunned"] = { id = 16, name = "Stun", defpos = {4,1}, size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Cure"] = { id = 17, name = "Poison Cure", defpos = {5,1}, size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["ClassItems"] = { id = 18, name = "Class Items", defpos = {6,1}, size={3,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.userconf["Utility"] = { id = 19, name = "Utility", defpos = {9,1}, size={4,1}, pos = {0,0}, combat = {true,true}, active = true };
self.settings.traits["ExposedThroat"] = { id = 1, name = 'Exposed Throat', active = false };
self.settings.traits["FlashingBlades"] = { id = 2, name = 'Flashing Blades', active = false };
self.settings.traits["HonedWit"] = { id = 3, name = 'Honed Wit', active = false };
self.settings.traits["PracticedBluff"] = { id = 4, name = 'Practiced Bluff', active = false };
self.settings.traits["LittleAnnoyances"] = { id = 5, name = 'Little Annoyances', active = false };
self.settings.traits["DealingsDone"] = { id = 6, name = 'Dealings Done', active = false };
self.settings.features["PoisonIndicator"] = { id = 1, name = 'Poison Indicator', active = true };
self.settings.features["StancePriority"] = { id = 2, name = 'Stance Priority', active = true };
self.settings.defaults["PrimaryStance"] = { id = 1, name = 'Primary Stance', selected = 1, list = { "Mischief", "Quiet Knife", "Gambler" } };
self.settings.defaults["SecondaryStance"] = { id = 2, name = 'Secondary Stance', selected = 2, list = { "Mischief", "Quiet Knife", "Gambler" } };
self.settings.defaults["StanceActive"] = { id = 3, name = 'Stance Active', selected = 2, list = { "None", "Dim", "Hide" } };
self.settings.quickslots["Marbles"] = {id = 1, name = "Marbles", active = false, type = 0, data = ""};
self.settings.quickslots["Caltrops"] = {id = 2, name = "Caltops",active = false, type = 0, data = ""};
self.settings.quickslots["StunDust"] = {id = 3, name = "StunDust", active = false, type = 0, data = ""};
self.settings.quickslots["Knives"] = {id = 4, name = "Knives/Hatchets", 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
if (settings.vers < 4.00) then
self:DefaultSettings();
end
if (settings.vers < 4.1) then
if (settings.skilldata["Mischief"] ~= nil) then
settings.multidata["Stances"] = { };
settings.multidata["Stances"].parent = settings.skilldata["Mischief"].parent;
settings.multidata["Stances"].pos = { };
settings.multidata["Stances"].pos[1] = settings.skilldata["Mischief"].pos[1];
settings.multidata["Stances"].pos[2] = settings.skilldata["Mischief"].pos[2];
settings.multidata["Stances"].current = { 1 };
settings.multidata["Stances"].lock = false;
settings.multidata["Stances"].layer = 1;
settings.skilldata["Mischief"] = nil;
end
settings.skilldata["SafeFall"] = {parent = nil, pos = {1,1}};
end
if (settings.vers < 4.13) then
self.settings.features["StancePriority"] = { id = 2, name = 'Stance Priority', active = true };
self.settings.defaults["PrimaryStance"] = { id = 1, name = 'Primary Stance', selected = 1, list = { "Mischief", "Quiet Knife", "Gambler" } };
self.settings.defaults["SecondaryStance"] = { id = 2, name = 'Secondary Stance', selected = 2, list = { "Mischief", "Quiet Knife", "Gambler" } };
self.settings.defaults["StanceActive"] = { id = 3, name = 'Stance Active', selected = 2, list = { "None", "Dim", "Hide" } };
end
if (settings.vers < 5.00) then
self.settings.traits["PracticedBluff"] = { id = 4, name = 'Practiced Bluff', active = false };
self.settings.traits["LittleAnnoyances"] = { id = 5, name = 'Little Annoyances', active = false };
self.settings.traits["DealingsDone"] = { id = 6, name = 'Dealings Done', active = false };
settings.skilldata["SeizeInitiative"] = nil;
end
settings.vers = vars.vers;
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.effectlist["DoubleEdged"]:GetState() and self.settings.traits["ExposedThroat"].active);
self.skills["FlashingBlades"]:SetActive(self.effectlist["DoubleEdged"]:GetState() and self.settings.traits["FlashingBlades"].active);
self.skills["CleverRetort"]:SetActive(self.settings.traits["HonedWit"].active or vars.classattr:GetStance() == 1);
self.skills["LuckyStrike"]:SetActive(self.settings.traits["DealingsDone"].active);
self.skills["FeintAttack"]:SetActive(self.settings.traits["PracticedBluff"].active and self.stance ~= 1);
self.skills["SmallSnag"]:SetActive(self.settings.traits["LittleAnnoyances"].active);
-- Set Poison Indicator
if (settings.skilldata["CurePoison"].parent ~= nil and vars.playerlevel >= self.skills["CurePoison"].level[1] and self.settings.features["PoisonIndicator"].active and self.poison > 0) then
if (self.settings.userconf[settings.skilldata["CurePoison"].parent].active) then
self.skills["CurePoison"]:SetColor("green");
end
else
self.skills["CurePoison"]:SetColor();
end
-- Refresh States
self:StanceChange();
self:CombatChange(vars.player:IsInCombat());
--Turbine.Shell.WriteLine("KragenBars: Burglar Bars refresh completed successfully.");
end