1 |
6 |
Kragenwar-3044 |
import "Turbine.UI"; |
2 |
|
Kragenwar-3044 |
import "Turbine.UI.Lotro"; |
3 |
|
Kragenwar-3044 |
import "Turbine.Gameplay"; |
4 |
|
Kragenwar-3044 |
import "KragenPlugs.Utils"; |
5 |
|
Kragenwar-3044 |
import "KragenPlugs.KragenBars"; |
6 |
|
Kragenwar-3044 |
|
7 |
|
Kragenwar-3044 |
HunterBars = class( KragenPlugs.KragenBars.ClassBar ); |
8 |
|
Kragenwar-3044 |
|
9 |
|
Kragenwar-3044 |
function HunterBars:Constructor() |
10 |
|
Kragenwar-3044 |
|
11 |
|
Kragenwar-3044 |
KragenPlugs.KragenBars.ClassBar.Constructor( self ); |
12 |
|
Kragenwar-3044 |
|
13 |
48 |
Kragenwar-3044 |
-- CLASS SPECIFIC VARIABLES |
14 |
80 |
Valdacil-446 |
self.poison = 0; |
15 |
110 |
Valdacil-446 |
self.swiftcount = 0; |
16 |
80 |
Valdacil-446 |
|
17 |
|
Valdacil-446 |
self.effectlist["ParryResponse"] = Effect(); |
18 |
|
Valdacil-446 |
self.effectlist["FindthePath"] = Effect(); |
19 |
|
Valdacil-446 |
self.effectlist["SwiftStroke"] = Effect(); |
20 |
|
Valdacil-446 |
self.effectlist["SimpleFireoil"] = Effect(); |
21 |
|
Valdacil-446 |
self.effectlist["Fireoil"] = Effect(); |
22 |
|
Valdacil-446 |
self.effectlist["RefinedFireoil"] = Effect(); |
23 |
|
Valdacil-446 |
self.effectlist["PureFireoil"] = Effect(); |
24 |
|
Valdacil-446 |
self.effectlist["SimpleLightoil"] = Effect(); |
25 |
|
Valdacil-446 |
self.effectlist["Lightoil"] = Effect(); |
26 |
|
Valdacil-446 |
self.effectlist["RefinedLightoil"] = Effect(); |
27 |
|
Valdacil-446 |
self.effectlist["PureLightoil"] = Effect(); |
28 |
|
Valdacil-446 |
self.effectlist["BowChant"] = Effect(); |
29 |
110 |
Valdacil-446 |
self.effectlist["SwiftMercy"] = Effect(); |
30 |
122 |
Valdacil-446 |
self.effectlist["StanceEndurance"] = Effect(); |
31 |
48 |
Kragenwar-3044 |
|
32 |
|
Kragenwar-3044 |
|
33 |
|
Kragenwar-3044 |
-- DEFINE THE EFFECT LIST BASED ON CLIENT LANGUAGE |
34 |
|
Kragenwar-3044 |
self.DefineEffectList = function() |
35 |
|
Kragenwar-3044 |
-- ENGLISH CLIENT |
36 |
|
Kragenwar-3044 |
if (settings.language == 1) then |
37 |
80 |
Valdacil-446 |
self.effectlist["ParryResponse"] :SetName("Parry Response"); |
38 |
|
Valdacil-446 |
self.effectlist["FindthePath"] :SetName("Find the Path"); |
39 |
|
Valdacil-446 |
self.effectlist["SwiftStroke"] :SetName("Swift Stroke"); |
40 |
|
Valdacil-446 |
self.effectlist["SimpleFireoil"] :SetName("Simple Fire-oil"); |
41 |
|
Valdacil-446 |
self.effectlist["Fireoil"] :SetName("Fire-oil"); |
42 |
|
Valdacil-446 |
self.effectlist["RefinedFireoil"] :SetName("Refined Fire-oil"); |
43 |
|
Valdacil-446 |
self.effectlist["PureFireoil"] :SetName("Pure Fire-oil"); |
44 |
|
Valdacil-446 |
self.effectlist["SimpleLightoil"] :SetName("Simple Light-oil"); |
45 |
|
Valdacil-446 |
self.effectlist["Lightoil"] :SetName("Light-oil"); |
46 |
|
Valdacil-446 |
self.effectlist["RefinedLightoil"] :SetName("Refined Light-oil"); |
47 |
|
Valdacil-446 |
self.effectlist["PureLightoil"] :SetName("Pure Light-oil"); |
48 |
|
Valdacil-446 |
self.effectlist["BowChant"] :SetName("Bow Chant"); |
49 |
110 |
Valdacil-446 |
self.effectlist["SwiftMercy"] :SetName("Swift Mercy"); |
50 |
122 |
Valdacil-446 |
self.effectlist["StanceEndurance"] :SetName("Stance: Endurance"); |
51 |
48 |
Kragenwar-3044 |
elseif (settings.language == 2) then |
52 |
80 |
Valdacil-446 |
self.effectlist["ParryResponse"] :SetName("Parry Response"); |
53 |
|
Valdacil-446 |
self.effectlist["FindthePath"] :SetName("Find the Path"); |
54 |
|
Valdacil-446 |
self.effectlist["SwiftStroke"] :SetName("Swift Stroke"); |
55 |
|
Valdacil-446 |
self.effectlist["SimpleFireoil"] :SetName("Simple Fire-oil"); |
56 |
|
Valdacil-446 |
self.effectlist["Fireoil"] :SetName("Fire-oil"); |
57 |
|
Valdacil-446 |
self.effectlist["RefinedFireoil"] :SetName("Refined Fire-oil"); |
58 |
|
Valdacil-446 |
self.effectlist["PureFireoil"] :SetName("Pure Fire-oil"); |
59 |
|
Valdacil-446 |
self.effectlist["SimpleLightoil"] :SetName("Simple Light-oil"); |
60 |
|
Valdacil-446 |
self.effectlist["Lightoil"] :SetName("Light-oil"); |
61 |
|
Valdacil-446 |
self.effectlist["RefinedLightoil"] :SetName("Refined Light-oil"); |
62 |
|
Valdacil-446 |
self.effectlist["PureLightoil"] :SetName("Pure Light-oil"); |
63 |
|
Valdacil-446 |
self.effectlist["BowChant"] :SetName("Bow Chant"); |
64 |
110 |
Valdacil-446 |
self.effectlist["SwiftMercy"] :SetName("Swift Mercy"); |
65 |
122 |
Valdacil-446 |
self.effectlist["StanceEndurance"] :SetName("Stance: Endurance"); |
66 |
49 |
Kragenwar-3044 |
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"); |
67 |
48 |
Kragenwar-3044 |
elseif (settings.language == 3) then |
68 |
80 |
Valdacil-446 |
self.effectlist["ParryResponse"] :SetName("Parry Response"); |
69 |
|
Valdacil-446 |
self.effectlist["FindthePath"] :SetName("Find the Path"); |
70 |
|
Valdacil-446 |
self.effectlist["SwiftStroke"] :SetName("Swift Stroke"); |
71 |
|
Valdacil-446 |
self.effectlist["SimpleFireoil"] :SetName("Simple Fire-oil"); |
72 |
|
Valdacil-446 |
self.effectlist["Fireoil"] :SetName("Fire-oil"); |
73 |
|
Valdacil-446 |
self.effectlist["RefinedFireoil"] :SetName("Refined Fire-oil"); |
74 |
|
Valdacil-446 |
self.effectlist["PureFireoil"] :SetName("Pure Fire-oil"); |
75 |
|
Valdacil-446 |
self.effectlist["SimpleLightoil"] :SetName("Simple Light-oil"); |
76 |
|
Valdacil-446 |
self.effectlist["Lightoil"] :SetName("Light-oil"); |
77 |
|
Valdacil-446 |
self.effectlist["RefinedLightoil"] :SetName("Refined Light-oil"); |
78 |
|
Valdacil-446 |
self.effectlist["PureLightoil"] :SetName("Pure Light-oil"); |
79 |
|
Valdacil-446 |
self.effectlist["BowChant"] :SetName("Bow Chant"); |
80 |
110 |
Valdacil-446 |
self.effectlist["SwiftMercy"] :SetName("Swift Mercy"); |
81 |
122 |
Valdacil-446 |
self.effectlist["StanceEndurance"] :SetName("Stance: Endurance"); |
82 |
49 |
Kragenwar-3044 |
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"); |
83 |
48 |
Kragenwar-3044 |
end |
84 |
45 |
Valdacil-446 |
end |
85 |
|
Valdacil-446 |
|
86 |
6 |
Kragenwar-3044 |
-- BUILD WINDOWS BARS SKILLS AND MULTIS -- |
87 |
80 |
Valdacil-446 |
|
88 |
6 |
Kragenwar-3044 |
-- Build Skills SkillSlot( parent:SkillBar, x:int, y:int, active:Boolean, level:int, hexcode:String ); |
89 |
|
Kragenwar-3044 |
self.skills["AgileRejoinder"] = SkillSlot(self.bars["Parry"], 1, 1, false, 24, "0x70003F3C"); |
90 |
|
Kragenwar-3044 |
|
91 |
|
Kragenwar-3044 |
self.skills["SwiftStroke"] = SkillSlot(self.bars["Melee"], 1, 1, true, 1, "0x70003F38"); |
92 |
|
Kragenwar-3044 |
self.skills["Blindside"] = SkillSlot(self.bars["Melee"], 4, 1, true, 1, "0x70003F3B"); |
93 |
127 |
Valdacil-446 |
self.skills["ScourgingBlow"] = SkillSlot(self.bars["Melee"], 2, 1, true, { 4, 72 }, { "0x70003F3A", "0x70029859" }); |
94 |
6 |
Kragenwar-3044 |
self.skills["LowCut"] = SkillSlot(self.bars["Melee"], 3, 1, true, 16, "0x70003F39"); |
95 |
|
Kragenwar-3044 |
self.skills["DazingBlow"] = SkillSlot(self.bars["Melee"], 5, 1, true, { 48, 52 }, { "0x70021D0E", "0x70021D18" }); |
96 |
|
Kragenwar-3044 |
|
97 |
127 |
Valdacil-446 |
self.skills["QuickShot"] = SkillSlot(self.bars["BowInduct"], 1, 1, true, { 1, 74 }, { "0x70003F32", "0x70029856" }); |
98 |
6 |
Kragenwar-3044 |
self.skills["BarbedArrow"] = SkillSlot(self.bars["BowInduct"], 2, 1, true, 4, "0x70003F33"); |
99 |
|
Kragenwar-3044 |
self.skills["SwiftBow"] = SkillSlot(self.bars["BowInduct"], 3, 1, true, { 10, 54 }, { "0x70003F34", "0x700153E2" }); |
100 |
127 |
Valdacil-446 |
self.skills["SplitShot"] = SkillSlot(self.bars["BowInduct"], 4, 1, true, 26, "0x700292DC"); |
101 |
|
Valdacil-446 |
self.skills["HeartSeeker"] = SkillSlot(self.bars["BowInduct"], 5, 1, true, 50, "0x7000A2D3"); |
102 |
|
Valdacil-446 |
self.skills["DistractingShot"] = SkillSlot(self.bars["BowInduct"], 6, 1, true, 58, "0x7000F9AB"); |
103 |
6 |
Kragenwar-3044 |
|
104 |
127 |
Valdacil-446 |
self.skills["PenetratingShot"] = SkillSlot(self.bars["BowFocus"], 1, 1, true, { 2, 68 }, { "0x70003F35", "0x7002984F" }); |
105 |
6 |
Kragenwar-3044 |
self.skills["RainofArrows"] = SkillSlot(self.bars["BowFocus"], 2, 1, true, 20, "0x70003F36"); |
106 |
|
Kragenwar-3044 |
self.skills["MercifulShot"] = SkillSlot(self.bars["BowFocus"], 3, 1, true, { 30, 52 }, { "0x70003F37", "0x700153E5" }); |
107 |
127 |
Valdacil-446 |
self.skills["HuntersArt"] = SkillSlot(self.bars["BowFocus"], 4, 1, true, 40, "0x7002958E"); |
108 |
|
Valdacil-446 |
self.skills["BloodArrow"] = SkillSlot(self.bars["BowFocus"], 5, 1, true, 44, "0x70021D0D"); |
109 |
|
Valdacil-446 |
self.skills["RainofThorns"] = SkillSlot(self.bars["BowFocus"], 6, 1, self.settings.traits["RainofThorns"].active, 41, "0x700010F4"); |
110 |
6 |
Kragenwar-3044 |
|
111 |
|
Kragenwar-3044 |
self.skills["BeneathNotice"] = SkillSlot(self.bars["Dethreat"], 1, 1, true, { 38, 64 }, { "0x700030EC", "0x70020DF8" }); |
112 |
|
Kragenwar-3044 |
|
113 |
|
Kragenwar-3044 |
self.skills["DesperateFlight"] = SkillSlot(self.bars["Utility"], 1, 1, true, 20, "0x70003F40"); |
114 |
|
Kragenwar-3044 |
self.skills["BrightCampfire"] = SkillSlot(self.bars["Utility"], 2, 1, true, 22, "0x70003F3F"); |
115 |
|
Kragenwar-3044 |
self.skills["Camouflage"] = SkillSlot(self.bars["Utility"], 3, 1, true, 40, "0x70003F48"); |
116 |
|
Kragenwar-3044 |
|
117 |
|
Kragenwar-3044 |
self.skills["CryofthePredator"] = SkillSlot(self.bars["Fear"], 1, 1, true, 12, "0x70003F49"); |
118 |
80 |
Valdacil-446 |
self.skills["BardsArrow"] = SkillSlot(self.bars["Fear"], 2, 1, self.settings.traits["BardsArrow"].active, 41, "0x700010D3"); |
119 |
6 |
Kragenwar-3044 |
|
120 |
|
Kragenwar-3044 |
self.skills["FindthePath"] = SkillSlot(self.bars["Stance"], 2, 1, true, 14, "0x70003F3D"); |
121 |
|
Kragenwar-3044 |
|
122 |
127 |
Valdacil-446 |
self.skills["Focus"] = SkillSlot(self.bars["Focus"], 1, 1, true, { 8, 66} , { "0x70003F4C", "0x70029854" }); |
123 |
6 |
Kragenwar-3044 |
self.skills["IntentConcentration"] = SkillSlot(self.bars["Focus"], 2, 1, true, 20, "0x700030DE"); |
124 |
|
Kragenwar-3044 |
self.skills["NeedfulHaste"] = SkillSlot(self.bars["Focus"], 3, 1, true, 34, "0x700030F3"); |
125 |
110 |
Valdacil-446 |
self.skills["Fleetness"] = SkillSlot(self.bars["Focus"], 4, 1, true, 56, "0x70010065"); |
126 |
|
Valdacil-446 |
self.skills["BurnHot"] = SkillSlot(self.bars["Focus"], 5, 1, true, 60, "0x7000F835"); |
127 |
6 |
Kragenwar-3044 |
|
128 |
|
Kragenwar-3044 |
self.skills["PurgePoison"] = SkillSlot(self.bars["Restoration"],1, 1, true, 16, "0x70003F3E"); |
129 |
127 |
Valdacil-446 |
self.skills["StrengthoftheEarth"] = SkillSlot(self.bars["Restoration"],2, 1, true, { 42, 70 }, { "0x7000A2D4", "0x70010007" }); |
130 |
80 |
Valdacil-446 |
self.skills["PressOnward"] = SkillSlot(self.bars["Restoration"],3, 1, self.settings.traits["PressOnward"].active, 41, "0x700010E5"); |
131 |
6 |
Kragenwar-3044 |
|
132 |
|
Kragenwar-3044 |
-- Build Quickslots ItemSlot( parent:SkillBar, x:int, y:int, active:Boolean, type:int, data:String ); |
133 |
81 |
Valdacil-446 |
self.skills["FireOil"] = ItemSlot(self.bars["Oils"], 1, 1, true, self.settings.quickslots["FireOil"]); |
134 |
|
Valdacil-446 |
self.skills["LightOil"] = ItemSlot(self.bars["Oils"], 2, 1, true, self.settings.quickslots["LightOil"]); |
135 |
|
Valdacil-446 |
self.skills["BowChant"] = ItemSlot(self.bars["Oils"], 3, 1, true, self.settings.quickslots["BowChant"]); |
136 |
6 |
Kragenwar-3044 |
|
137 |
46 |
Valdacil-446 |
self.multi["TrapsSlot"] = ItemMultiSlot(self.bars["Trapping"], 2, 1, true); |
138 |
81 |
Valdacil-446 |
self.multi["TrapsSlot"]:AddShortCut("Trap1", self.settings.quickslots["Trap1"]); |
139 |
|
Valdacil-446 |
self.multi["TrapsSlot"]:AddShortCut("Trap2", self.settings.quickslots["Trap2"]); |
140 |
|
Valdacil-446 |
self.multi["TrapsSlot"]:AddShortCut("Trap3", self.settings.quickslots["Trap3"]); |
141 |
46 |
Valdacil-446 |
|
142 |
6 |
Kragenwar-3044 |
-- Build MultiSlots SkillMultiSlot( parent:SkillBar, x:int, y:int, active:Boolean ); |
143 |
|
Kragenwar-3044 |
-- multi:AddShortCut(name:String, level:int, hex:String); |
144 |
|
Kragenwar-3044 |
self.multi["TrackingSlot"] = SkillMultiSlot(self.bars["Tracking"], 1, 1, true); |
145 |
|
Kragenwar-3044 |
self.multi["TrackingSlot"]:AddShortCut("PassageofNature", 12, "0x70003F45"); |
146 |
|
Kragenwar-3044 |
self.multi["TrackingSlot"]:AddShortCut("PassageofFoes", 22, "0x70003F46"); |
147 |
|
Kragenwar-3044 |
self.multi["TrackingSlot"]:AddShortCut("PassageofShadow", 32, "0x70003F47"); |
148 |
|
Kragenwar-3044 |
self.multi["TrackingSlot"]:LevelCheck(); |
149 |
|
Kragenwar-3044 |
|
150 |
|
Kragenwar-3044 |
self.multi["StanceSlot"] = SkillMultiSlot(self.bars["Stance"], 1, 1, true); |
151 |
|
Kragenwar-3044 |
self.multi["StanceSlot"]:AddShortCut("StrengthStance", 6, "0x70003F4E"); |
152 |
|
Kragenwar-3044 |
self.multi["StanceSlot"]:AddShortCut("PrecisionStance", 18, "0x70003F4D"); |
153 |
|
Kragenwar-3044 |
self.multi["StanceSlot"]:AddShortCut("EnduranceStance", 28, "0x70003F4F"); |
154 |
|
Kragenwar-3044 |
self.multi["StanceSlot"]:LevelCheck(); |
155 |
80 |
Valdacil-446 |
self.multi["StanceSlot"]:SetIndex(self.settings.defaults["PrimaryStance"].selected); |
156 |
6 |
Kragenwar-3044 |
|
157 |
|
Kragenwar-3044 |
self.multi["TrappingSlot"] = SkillMultiSlot(self.bars["Trapping"], 1, 1, true); |
158 |
|
Kragenwar-3044 |
self.multi["TrappingSlot"]:AddShortCut("SetTrap", 6, "0x700030BB"); |
159 |
|
Kragenwar-3044 |
self.multi["TrappingSlot"]:AddShortCut("SetSnare", 36, "0x7000A6B1"); |
160 |
|
Kragenwar-3044 |
self.multi["TrappingSlot"]:LevelCheck(); |
161 |
14 |
Valdacil-446 |
|
162 |
|
Valdacil-446 |
self.multi["PortsSlot"] = SkillMultiSlot(self.bars["Ports"], 1, 1, true); |
163 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoMichelDelving", 22, "0x7000A2C3"); |
164 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoThorinsHall", 24, "0x70003F41"); |
165 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("ReturntoCamp", 26, "0x7000A2C1"); |
166 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoOstGuruth", 26, "0x7000A2C2"); |
167 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoBree", 32, "0x70003F42"); |
168 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoEsteldin", 34, "0x70003F43"); |
169 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoEvendim", 36, "0x7000A2C4"); |
170 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoWestAngmar", 44, "0x7000A2C5"); |
171 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoRivendell", 46, "0x70003F44"); |
172 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoSuriKyla", 48, "0x70017C82"); |
173 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoEastAngmar", 48, "0x7000A2C6"); |
174 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoEchadDunann", 50, "0x70017C81"); |
175 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoTwentyFirstHall",56, "0x70017C7A"); |
176 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoMirkEaves", 62, "0x7001F459"); |
177 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoHarndirion", 62, "0x700235EF"); |
178 |
|
Valdacil-446 |
self.multi["PortsSlot"]:LevelCheck(); |
179 |
6 |
Kragenwar-3044 |
|
180 |
14 |
Valdacil-446 |
|
181 |
48 |
Kragenwar-3044 |
-- SET COMBAT STATES |
182 |
6 |
Kragenwar-3044 |
self.skills["Focus"]:SetCombat(false, true); |
183 |
|
Kragenwar-3044 |
self.skills["Camouflage"]:SetCombat(false, true); |
184 |
|
Kragenwar-3044 |
self.skills["BrightCampfire"]:SetCombat(false, true); |
185 |
|
Kragenwar-3044 |
self.multi["TrackingSlot"]:SetCombat(false, true); |
186 |
80 |
Valdacil-446 |
self.multi["TrappingSlot"]:SetCombat(self.settings.traits["CombatTraps"].active, true); |
187 |
127 |
Valdacil-446 |
self.multi["PortsSlot"]:SetCombat(false, true); |
188 |
6 |
Kragenwar-3044 |
|
189 |
48 |
Kragenwar-3044 |
-- CLASS SPECIFIC SETUP/DEFAULT CODE |
190 |
6 |
Kragenwar-3044 |
|
191 |
48 |
Kragenwar-3044 |
|
192 |
6 |
Kragenwar-3044 |
-- EVENTS |
193 |
|
Kragenwar-3044 |
|
194 |
|
Kragenwar-3044 |
-- Stance Change Event |
195 |
|
Kragenwar-3044 |
AddCallback(vars.classattr, "StanceChanged", function(sender, args) |
196 |
|
Kragenwar-3044 |
KragenBars:StanceChange(vars.classattr:GetStance()); |
197 |
|
Kragenwar-3044 |
end); |
198 |
|
Kragenwar-3044 |
|
199 |
|
Kragenwar-3044 |
-- Focus Change Event |
200 |
|
Kragenwar-3044 |
AddCallback(vars.classattr, "FocusChanged", function(sender, args) |
201 |
|
Kragenwar-3044 |
KragenBars:FocusChange(vars.classattr:GetFocus()); |
202 |
|
Kragenwar-3044 |
end); |
203 |
|
Kragenwar-3044 |
|
204 |
|
Kragenwar-3044 |
|
205 |
|
Kragenwar-3044 |
-- INITIALIZE BARS |
206 |
|
Kragenwar-3044 |
self:InitBars(); |
207 |
|
Kragenwar-3044 |
self:CombatChange(vars.player:IsInCombat()); |
208 |
|
Kragenwar-3044 |
self:StanceChange(vars.classattr:GetStance()); |
209 |
|
Kragenwar-3044 |
self:FocusChange(vars.classattr:GetFocus()); |
210 |
|
Kragenwar-3044 |
|
211 |
|
Kragenwar-3044 |
end |
212 |
|
Kragenwar-3044 |
|
213 |
|
Kragenwar-3044 |
|
214 |
|
Kragenwar-3044 |
-- ADD EFFECT EVENT |
215 |
|
Kragenwar-3044 |
function HunterBars:AddEffect( effectIndex ) |
216 |
45 |
Valdacil-446 |
local effect = vars.player:GetEffects():Get( effectIndex ); |
217 |
80 |
Valdacil-446 |
local name = effect:GetName(); |
218 |
|
Valdacil-446 |
local id = effect:GetID(); |
219 |
6 |
Kragenwar-3044 |
|
220 |
80 |
Valdacil-446 |
if (effect:GetName() == self.effectlist["ParryResponse"]:GetName()) then |
221 |
|
Valdacil-446 |
if (self.effectlist["ParryResponse"]:SetState(true, id)) then |
222 |
|
Valdacil-446 |
self.skills["AgileRejoinder"]:SetActive(true); |
223 |
|
Valdacil-446 |
end |
224 |
122 |
Valdacil-446 |
|
225 |
|
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["StanceEndurance"]:GetName()) then |
226 |
|
Valdacil-446 |
if (self.effectlist["StanceEndurance"]:SetState(true, id)) then |
227 |
|
Valdacil-446 |
self:StanceChange(vars.classattr:GetStance()); |
228 |
|
Valdacil-446 |
end |
229 |
|
Valdacil-446 |
|
230 |
80 |
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["FindthePath"]:GetName()) then |
231 |
|
Valdacil-446 |
if (self.effectlist["FindthePath"]:SetState(true, id)) then |
232 |
|
Valdacil-446 |
if (self.settings.defaults["FindPathActive"].selected == 1) then |
233 |
|
Valdacil-446 |
self.skills["FindthePath"]:SetActive(true); |
234 |
|
Valdacil-446 |
elseif (self.settings.defaults["FindPathActive"].selected == 2) then |
235 |
|
Valdacil-446 |
self.skills["FindthePath"]:SetActive(true); |
236 |
|
Valdacil-446 |
self.skills["FindthePath"]:SetHover(true); |
237 |
|
Valdacil-446 |
else |
238 |
|
Valdacil-446 |
self.skills["FindthePath"]:SetActive(false); |
239 |
|
Valdacil-446 |
end |
240 |
6 |
Kragenwar-3044 |
end |
241 |
46 |
Valdacil-446 |
|
242 |
80 |
Valdacil-446 |
elseif (string.find(effect:GetName(), self.effectlist["BowChant"]:GetName()) ~= nil) then |
243 |
|
Valdacil-446 |
if (self.effectlist["BowChant"]:SetState(true, id)) then |
244 |
|
Valdacil-446 |
self.skills["BowChant"]:SetActive(false); |
245 |
|
Valdacil-446 |
self.skills["BowChant"]:SetHover(true); |
246 |
|
Valdacil-446 |
self.skills["BowChant"]:StartTimer(effect:GetDuration() * .85, true); |
247 |
|
Valdacil-446 |
end |
248 |
|
Valdacil-446 |
|
249 |
|
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["SwiftStroke"]:GetName() and self.settings.features["DimSwiftStroke"].active) then |
250 |
|
Valdacil-446 |
if (self.effectlist["SwiftStroke"]:SetState(true, id)) then |
251 |
|
Valdacil-446 |
self.skills["SwiftStroke"]:SetActive(true); |
252 |
|
Valdacil-446 |
self.skills["SwiftStroke"]:SetHover(true); |
253 |
|
Valdacil-446 |
end |
254 |
6 |
Kragenwar-3044 |
|
255 |
110 |
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["SwiftMercy"]:GetName()) then |
256 |
|
Valdacil-446 |
if (self.swiftcount < 6) then |
257 |
|
Valdacil-446 |
self.swiftcount = self.swiftcount + 1; |
258 |
|
Valdacil-446 |
self:FocusChange(vars.classattr:GetFocus()); |
259 |
|
Valdacil-446 |
end |
260 |
|
Valdacil-446 |
self.effectlist["SwiftMercy"]:SetState(true, id) |
261 |
|
Valdacil-446 |
|
262 |
80 |
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["SimpleFireoil"]:GetName() or effect:GetName() == self.effectlist["Fireoil"]:GetName() or effect:GetName() == self.effectlist["RefinedFireoil"]:GetName() or effect:GetName() == self.effectlist["PureFireoil"]:GetName()) then |
263 |
110 |
Valdacil-446 |
if (self.effectlist["Fireoil"]:SetState(true, id)) then |
264 |
80 |
Valdacil-446 |
self.skills["FireOil"]:SetActive(false); |
265 |
|
Valdacil-446 |
self.skills["FireOil"]:SetHover(true); |
266 |
|
Valdacil-446 |
self.skills["FireOil"]:StartTimer(effect:GetDuration() * .85, true); |
267 |
|
Valdacil-446 |
self.skills["LightOil"]:SetHover(true); |
268 |
|
Valdacil-446 |
end |
269 |
6 |
Kragenwar-3044 |
|
270 |
80 |
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["SimpleLightoil"]:GetName() or effect:GetName() == self.effectlist["Lightoil"]:GetName() or effect:GetName() == self.effectlist["RefinedLightoil"]:GetName() or effect:GetName() == self.effectlist["PureLightoil"]:GetName()) then |
271 |
110 |
Valdacil-446 |
if (self.effectlist["Lightoil"]:SetState(true, id)) then |
272 |
80 |
Valdacil-446 |
self.skills["LightOil"]:SetActive(false); |
273 |
|
Valdacil-446 |
self.skills["LightOil"]:SetHover(true); |
274 |
|
Valdacil-446 |
self.skills["LightOil"]:StartTimer(effect:GetDuration() * .85, true); |
275 |
|
Valdacil-446 |
self.skills["FireOil"]:SetHover(true); |
276 |
|
Valdacil-446 |
end |
277 |
|
Valdacil-446 |
|
278 |
|
Valdacil-446 |
elseif (effect:GetCategory() == Turbine.Gameplay.EffectCategory.Poison ) then |
279 |
|
Valdacil-446 |
self.poison = self.poison + 1; |
280 |
127 |
Valdacil-446 |
if (settings.skilldata["PurgePoison"].parent ~= nil and vars.playerlevel >= self.skills["PurgePoison"].level[1] and self.settings.features["PoisonIndicator"].active) then |
281 |
|
Valdacil-446 |
if (self.settings.userconf[settings.skilldata["PurgePoison"].parent].active) then |
282 |
|
Valdacil-446 |
self.skills["PurgePoison"]:SetColor("green"); |
283 |
|
Valdacil-446 |
end |
284 |
80 |
Valdacil-446 |
end |
285 |
|
Valdacil-446 |
|
286 |
6 |
Kragenwar-3044 |
end |
287 |
|
Kragenwar-3044 |
end |
288 |
|
Kragenwar-3044 |
|
289 |
|
Kragenwar-3044 |
|
290 |
|
Kragenwar-3044 |
-- REMOVE EFFECT EVENT |
291 |
|
Kragenwar-3044 |
function HunterBars:RemoveEffect( effect ) |
292 |
80 |
Valdacil-446 |
local name = effect:GetName(); |
293 |
|
Valdacil-446 |
local id = effect:GetID(); |
294 |
6 |
Kragenwar-3044 |
|
295 |
80 |
Valdacil-446 |
if (effect:GetName() == self.effectlist["ParryResponse"]:GetName()) then |
296 |
|
Valdacil-446 |
if (not self.effectlist["ParryResponse"]:SetState(false, id)) then |
297 |
|
Valdacil-446 |
self.skills["AgileRejoinder"]:SetActive(false); |
298 |
|
Valdacil-446 |
end |
299 |
122 |
Valdacil-446 |
|
300 |
|
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["StanceEndurance"]:GetName()) then |
301 |
|
Valdacil-446 |
if (not self.effectlist["StanceEndurance"]:SetState(false, id)) then |
302 |
|
Valdacil-446 |
self:StanceChange(vars.classattr:GetStance()); |
303 |
|
Valdacil-446 |
end |
304 |
|
Valdacil-446 |
|
305 |
80 |
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["FindthePath"]:GetName()) then |
306 |
|
Valdacil-446 |
if (not self.effectlist["FindthePath"]:SetState(false, id)) then |
307 |
|
Valdacil-446 |
self.skills["FindthePath"]:SetActive(true); |
308 |
|
Valdacil-446 |
self.skills["FindthePath"]:SetHover(false); |
309 |
|
Valdacil-446 |
end |
310 |
6 |
Kragenwar-3044 |
|
311 |
80 |
Valdacil-446 |
elseif (string.find(effect:GetName(), self.effectlist["BowChant"]:GetName()) ~= nil) then |
312 |
|
Valdacil-446 |
if (not self.effectlist["BowChant"]:SetState(false, id)) then |
313 |
|
Valdacil-446 |
self.skills["BowChant"]:SetActive(true); |
314 |
|
Valdacil-446 |
self.skills["BowChant"]:SetHover(false); |
315 |
|
Valdacil-446 |
end |
316 |
6 |
Kragenwar-3044 |
|
317 |
80 |
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["SwiftStroke"]:GetName()) then |
318 |
|
Valdacil-446 |
if (not self.effectlist["SwiftStroke"]:SetState(false, id)) then |
319 |
|
Valdacil-446 |
self.skills["SwiftStroke"]:SetActive(true); |
320 |
|
Valdacil-446 |
self.skills["SwiftStroke"]:SetHover(false); |
321 |
|
Valdacil-446 |
end |
322 |
110 |
Valdacil-446 |
|
323 |
|
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["SwiftMercy"]:GetName()) then |
324 |
|
Valdacil-446 |
if (not self.effectlist["SwiftMercy"]:SetState(false, id)) then |
325 |
|
Valdacil-446 |
self.swiftcount = 0; |
326 |
|
Valdacil-446 |
end |
327 |
46 |
Valdacil-446 |
|
328 |
80 |
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["SimpleFireoil"]:GetName() or effect:GetName() == self.effectlist["Fireoil"]:GetName() or effect:GetName() == self.effectlist["RefinedFireoil"]:GetName() or effect:GetName() == self.effectlist["PureFireoil"]:GetName()) then |
329 |
110 |
Valdacil-446 |
if (not self.effectlist["Fireoil"]:SetState(false, id)) then |
330 |
80 |
Valdacil-446 |
self.skills["FireOil"]:SetActive(true); |
331 |
|
Valdacil-446 |
self.skills["LightOil"]:SetHover(false); |
332 |
|
Valdacil-446 |
self.skills["FireOil"]:SetHover(false); |
333 |
|
Valdacil-446 |
end |
334 |
6 |
Kragenwar-3044 |
|
335 |
80 |
Valdacil-446 |
elseif (effect:GetName() == self.effectlist["SimpleLightoil"]:GetName() or effect:GetName() == self.effectlist["Lightoil"]:GetName() or effect:GetName() == self.effectlist["RefinedLightoil"]:GetName() or effect:GetName() == self.effectlist["PureLightoil"]:GetName()) then |
336 |
110 |
Valdacil-446 |
if (not self.effectlist["Lightoil"]:SetState(false, id)) then |
337 |
80 |
Valdacil-446 |
self.skills["LightOil"]:SetActive(true); |
338 |
|
Valdacil-446 |
self.skills["FireOil"]:SetHover(false); |
339 |
|
Valdacil-446 |
self.skills["LightOil"]:SetHover(false); |
340 |
|
Valdacil-446 |
end |
341 |
6 |
Kragenwar-3044 |
|
342 |
80 |
Valdacil-446 |
elseif (effect:GetCategory() == Turbine.Gameplay.EffectCategory.Poison ) then |
343 |
|
Valdacil-446 |
self.poison = self.poison - 1; |
344 |
|
Valdacil-446 |
if (self.poison == 0) then |
345 |
|
Valdacil-446 |
self.skills["PurgePoison"]:SetColor(); |
346 |
|
Valdacil-446 |
end |
347 |
|
Valdacil-446 |
|
348 |
6 |
Kragenwar-3044 |
end |
349 |
|
Kragenwar-3044 |
end |
350 |
|
Kragenwar-3044 |
|
351 |
|
Kragenwar-3044 |
|
352 |
|
Kragenwar-3044 |
function HunterBars:FocusChange(focus) |
353 |
|
Kragenwar-3044 |
|
354 |
110 |
Valdacil-446 |
if (focus >= (6 - self.swiftcount)) then |
355 |
|
Valdacil-446 |
self.skills["MercifulShot"]:SetActive(true); |
356 |
|
Valdacil-446 |
else |
357 |
|
Valdacil-446 |
self.skills["MercifulShot"]:SetActive(false); |
358 |
|
Valdacil-446 |
end |
359 |
|
Valdacil-446 |
|
360 |
6 |
Kragenwar-3044 |
if (focus == 0) then |
361 |
|
Kragenwar-3044 |
self.skills["PenetratingShot"]:SetActive(false); |
362 |
|
Kragenwar-3044 |
self.skills["BloodArrow"]:SetActive(false); |
363 |
|
Kragenwar-3044 |
self.skills["RainofArrows"]:SetActive(false); |
364 |
127 |
Valdacil-446 |
self.skills["HuntersArt"]:SetActive(false); |
365 |
6 |
Kragenwar-3044 |
self.skills["NeedfulHaste"]:SetActive(false); |
366 |
110 |
Valdacil-446 |
self.skills["Fleetness"]:SetActive(false); |
367 |
6 |
Kragenwar-3044 |
self.skills["RainofThorns"]:SetActive(false); |
368 |
127 |
Valdacil-446 |
elseif (focus > 0 and focus < 3) then |
369 |
6 |
Kragenwar-3044 |
self.skills["PenetratingShot"]:SetActive(false); |
370 |
|
Kragenwar-3044 |
self.skills["BloodArrow"]:SetActive(false); |
371 |
|
Kragenwar-3044 |
self.skills["RainofArrows"]:SetActive(false); |
372 |
127 |
Valdacil-446 |
self.skills["HuntersArt"]:SetActive(false); |
373 |
6 |
Kragenwar-3044 |
self.skills["NeedfulHaste"]:SetActive(false); |
374 |
110 |
Valdacil-446 |
self.skills["Fleetness"]:SetActive(false); |
375 |
6 |
Kragenwar-3044 |
self.skills["RainofThorns"]:SetActive(false); |
376 |
|
Kragenwar-3044 |
elseif (focus >= 3 and focus < 6) then |
377 |
|
Kragenwar-3044 |
self.skills["PenetratingShot"]:SetActive(true); |
378 |
|
Kragenwar-3044 |
self.skills["BloodArrow"]:SetActive(true); |
379 |
|
Kragenwar-3044 |
self.skills["RainofArrows"]:SetActive(true); |
380 |
127 |
Valdacil-446 |
self.skills["HuntersArt"]:SetActive(true); |
381 |
6 |
Kragenwar-3044 |
self.skills["NeedfulHaste"]:SetActive(true); |
382 |
110 |
Valdacil-446 |
self.skills["Fleetness"]:SetActive(false); |
383 |
6 |
Kragenwar-3044 |
self.skills["RainofThorns"]:SetActive(false); |
384 |
|
Kragenwar-3044 |
elseif (focus >= 6) then |
385 |
|
Kragenwar-3044 |
self.skills["PenetratingShot"]:SetActive(true); |
386 |
|
Kragenwar-3044 |
self.skills["BloodArrow"]:SetActive(true); |
387 |
|
Kragenwar-3044 |
self.skills["RainofArrows"]:SetActive(true); |
388 |
127 |
Valdacil-446 |
self.skills["HuntersArt"]:SetActive(true); |
389 |
6 |
Kragenwar-3044 |
self.skills["NeedfulHaste"]:SetActive(true); |
390 |
110 |
Valdacil-446 |
self.skills["Fleetness"]:SetActive(true); |
391 |
80 |
Valdacil-446 |
self.skills["RainofThorns"]:SetActive(self.settings.traits["RainofThorns"].active); |
392 |
6 |
Kragenwar-3044 |
|
393 |
|
Kragenwar-3044 |
end |
394 |
|
Kragenwar-3044 |
end |
395 |
|
Kragenwar-3044 |
|
396 |
|
Kragenwar-3044 |
|
397 |
|
Kragenwar-3044 |
function HunterBars:StanceChange(stance) |
398 |
|
Kragenwar-3044 |
local stancenew = 0; |
399 |
|
Kragenwar-3044 |
|
400 |
|
Kragenwar-3044 |
-- Hack because Turbine put the stances in the wrong order |
401 |
|
Kragenwar-3044 |
if (stance == 1) then |
402 |
|
Kragenwar-3044 |
stancenew = 2; |
403 |
|
Kragenwar-3044 |
elseif (stance == 2) then |
404 |
|
Kragenwar-3044 |
stancenew = 1; |
405 |
|
Kragenwar-3044 |
else |
406 |
|
Kragenwar-3044 |
stancenew = stance; |
407 |
|
Kragenwar-3044 |
end |
408 |
|
Kragenwar-3044 |
|
409 |
122 |
Valdacil-446 |
-- Hack because Turbine broke Endurance Stance |
410 |
|
Valdacil-446 |
if (self.effectlist["StanceEndurance"]:GetState()) then |
411 |
|
Valdacil-446 |
stancenew = 3; |
412 |
|
Valdacil-446 |
end |
413 |
|
Valdacil-446 |
|
414 |
80 |
Valdacil-446 |
if (stancenew ~= self.settings.defaults["PrimaryStance"].selected) then |
415 |
|
Valdacil-446 |
self.multi["StanceSlot"]:SetIndex(self.settings.defaults["PrimaryStance"].selected); |
416 |
6 |
Kragenwar-3044 |
else |
417 |
80 |
Valdacil-446 |
self.multi["StanceSlot"]:SetIndex(self.settings.defaults["SecondaryStance"].selected); |
418 |
14 |
Valdacil-446 |
end |
419 |
|
Valdacil-446 |
|
420 |
122 |
Valdacil-446 |
if (stancenew == 0) then |
421 |
14 |
Valdacil-446 |
self.multi["StanceSlot"]:SetHover( false ); |
422 |
|
Valdacil-446 |
self.multi["StanceSlot"]:SetActive( true ); |
423 |
|
Valdacil-446 |
else |
424 |
80 |
Valdacil-446 |
self.multi["StanceSlot"]:SetActive( self.settings.defaults["StanceActive"].selected ~= 3); |
425 |
|
Valdacil-446 |
self.multi["StanceSlot"]:SetHover( self.settings.defaults["StanceActive"].selected == 2 ); |
426 |
14 |
Valdacil-446 |
end |
427 |
6 |
Kragenwar-3044 |
|
428 |
14 |
Valdacil-446 |
|
429 |
6 |
Kragenwar-3044 |
end |
430 |
|
Kragenwar-3044 |
|
431 |
|
Kragenwar-3044 |
-- DEFAULT SETTINGS |
432 |
|
Kragenwar-3044 |
function HunterBars:DefaultSettings() |
433 |
80 |
Valdacil-446 |
self.settings = { preconf = { }, userconf = { }, traits = { }, features = { }, defaults = { }, quickslots = { } }; |
434 |
6 |
Kragenwar-3044 |
|
435 |
80 |
Valdacil-446 |
self.settings.userconf["Parry"] = { id = 1, name = "Parry", defpos = {1,1}, size={1,1}, pos = {0,0}, combat = {true,true}, active = true }; |
436 |
|
Valdacil-446 |
self.settings.userconf["Melee"] = { id = 2, name = "Melee", defpos = {2,1}, size={5,1}, pos = {0,0}, combat = {true,true}, active = true }; |
437 |
127 |
Valdacil-446 |
self.settings.userconf["BowInduct"] = { id = 3, name = "Bow: Induction", defpos = {1,2}, size={6,1}, pos = {0,0}, combat = {true,true}, active = true }; |
438 |
|
Valdacil-446 |
self.settings.userconf["BowFocus"] = { id = 4, name = "Bow: Focus", defpos = {1,3}, size={6,1}, pos = {0,0}, combat = {true,true}, active = true }; |
439 |
|
Valdacil-446 |
self.settings.userconf["Dethreat"] = { id = 5, name = "Dethreat", defpos = {9,2}, size={1,1}, pos = {0,0}, combat = {true,true}, active = true }; |
440 |
80 |
Valdacil-446 |
self.settings.userconf["Utility"] = { id = 6, name = "Utility", defpos = {1,4}, size={3,1}, pos = {0,0}, combat = {true,true}, active = true }; |
441 |
|
Valdacil-446 |
self.settings.userconf["Tracking"] = { id = 7, name = "Tracking", defpos = {4,4}, size={1,1}, pos = {0,0}, combat = {true,true}, active = true }; |
442 |
127 |
Valdacil-446 |
self.settings.userconf["Fear"] = { id = 8, name = "Fear", defpos = {7,2}, size={2,1}, pos = {0,0}, combat = {true,true}, active = true }; |
443 |
80 |
Valdacil-446 |
self.settings.userconf["Stance"] = { id = 9, name = "Stance", defpos = {7,4}, size={2,1}, pos = {0,0}, combat = {true,true}, active = true }; |
444 |
110 |
Valdacil-446 |
self.settings.userconf["Focus"] = { id = 10, name = "Focus", defpos = {1,5}, size={5,1}, pos = {0,0}, combat = {true,true}, active = true }; |
445 |
80 |
Valdacil-446 |
self.settings.userconf["Restoration"] = { id = 11, name = "Restoration", defpos = {5,5}, size={3,1}, pos = {0,0}, combat = {true,true}, active = true }; |
446 |
|
Valdacil-446 |
self.settings.userconf["Trapping"] = { id = 12, name = "Trapping", defpos = {5,4}, size={2,1}, pos = {0,0}, combat = {true,true}, active = true }; |
447 |
|
Valdacil-446 |
self.settings.userconf["Oils"] = { id = 13, name = "Oils", defpos = {9,3}, size={4,1}, pos = {0,0}, combat = {true,true}, active = true }; |
448 |
|
Valdacil-446 |
self.settings.userconf["Ports"] = { id = 14, name = "Ports", defpos = {8,5}, size={1,1}, pos = {0,0}, combat = {true,true}, active = true }; |
449 |
|
Valdacil-446 |
|
450 |
|
Valdacil-446 |
self.settings.traits["CombatTraps"] = { id = 1, name = "Combat Traps", active = false }; |
451 |
127 |
Valdacil-446 |
self.settings.traits["RainofThorns"] = { id = 2, name = "Rain of Thorns", active = false }; |
452 |
|
Valdacil-446 |
self.settings.traits["BardsArrow"] = { id = 3, name = "Bard's Arrow", active = false }; |
453 |
80 |
Valdacil-446 |
self.settings.traits["PressOnward"] = { id = 4, name = "Press Onward", active = false }; |
454 |
|
Valdacil-446 |
|
455 |
|
Valdacil-446 |
self.settings.features["PoisonIndicator"] = { id = 1, name = 'Poison Indicator', active = true }; |
456 |
|
Valdacil-446 |
self.settings.features["DimSwiftStroke"] = { id = 2, name = 'Dim Swift Stroke', active = true }; |
457 |
|
Valdacil-446 |
|
458 |
110 |
Valdacil-446 |
self.settings.defaults["PrimaryStance"] = { id = 1, name = 'Primary Stance', selected = 1, list = { "Strength", "Precision", "Endurance" } }; |
459 |
|
Valdacil-446 |
self.settings.defaults["SecondaryStance"] = { id = 2, name = 'Secondary Stance', selected = 3, list = { "Strength", "Precision", "Endurance" } }; |
460 |
80 |
Valdacil-446 |
self.settings.defaults["StanceActive"] = { id = 3, name = 'Stance Active', selected = 2, list = { "None", "Dim", "Hide" } }; |
461 |
110 |
Valdacil-446 |
self.settings.defaults["FindPathActive"] = { id = 4, name = 'Find Path Active', selected = 3, list = { "None", "Dim", "Hide" } }; |
462 |
80 |
Valdacil-446 |
|
463 |
|
Valdacil-446 |
self.settings.quickslots["FireOil"] = {id = 1, name = "Fire-Oil", active = false, type = 0, data = ""}; |
464 |
|
Valdacil-446 |
self.settings.quickslots["LightOil"] = {id = 2, name = "Light-Oil",active = false, type = 0, data = ""}; |
465 |
|
Valdacil-446 |
self.settings.quickslots["BowChant"] = {id = 3, name = "Bow Chant", active = false, type = 0, data = ""}; |
466 |
|
Valdacil-446 |
self.settings.quickslots["Trap1"] = {id = 4, name = "Crafted Trap", active = false, type = 0, data = ""}; |
467 |
|
Valdacil-446 |
self.settings.quickslots["Trap2"] = {id = 5, name = "Crafted Trap", active = false, type = 0, data = ""}; |
468 |
|
Valdacil-446 |
self.settings.quickslots["Trap3"] = {id = 6, name = "Crafted Trap", active = false, type = 0, data = ""}; |
469 |
6 |
Kragenwar-3044 |
|
470 |
|
Kragenwar-3044 |
end |
471 |
|
Kragenwar-3044 |
|
472 |
|
Kragenwar-3044 |
|
473 |
|
Kragenwar-3044 |
-- UPDATE SETTINGS |
474 |
|
Kragenwar-3044 |
function HunterBars:UpdateSettings() |
475 |
14 |
Valdacil-446 |
|
476 |
|
Valdacil-446 |
if (settings.vers < 3.10) then |
477 |
|
Valdacil-446 |
self.settings["Features"].stanceactive = 2; |
478 |
|
Valdacil-446 |
self.settings["Ports"] = { active = true, x = 0, y = 0, rotate = 0 }; |
479 |
46 |
Valdacil-446 |
self.settings["Quickslots"].bowchant = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" }; |
480 |
|
Valdacil-446 |
self.settings["Quickslots"].trap1 = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" }; |
481 |
|
Valdacil-446 |
self.settings["Quickslots"].trap2 = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" }; |
482 |
|
Valdacil-446 |
self.settings["Quickslots"].trap3 = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" }; |
483 |
|
Valdacil-446 |
elseif (settings.vers < 3.20) then |
484 |
|
Valdacil-446 |
self.settings["Quickslots"].bowchant = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" }; |
485 |
|
Valdacil-446 |
self.settings["Quickslots"].trap1 = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" }; |
486 |
|
Valdacil-446 |
self.settings["Quickslots"].trap2 = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" }; |
487 |
80 |
Valdacil-446 |
self.settings["Quickslots"].trap3 = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" }; |
488 |
14 |
Valdacil-446 |
end |
489 |
|
Valdacil-446 |
|
490 |
113 |
Kragenwar-3044 |
if (settings.vers < 4.00) then |
491 |
80 |
Valdacil-446 |
local oldclassinfo = self.settings; |
492 |
|
Valdacil-446 |
self:DefaultSettings(); |
493 |
|
Valdacil-446 |
for k,v in pairs(oldclassinfo) do |
494 |
|
Valdacil-446 |
if (k ~= "Features" and k ~= "Quickslots") then |
495 |
|
Valdacil-446 |
if (self.settings.preconf[k] == nil) then |
496 |
|
Valdacil-446 |
if (self.settings.userconf[k] ~= nil) then |
497 |
|
Valdacil-446 |
self.settings.userconf[k].pos = { v.x, v.y }; |
498 |
|
Valdacil-446 |
self.settings.userconf[k].combat = { true, true }; |
499 |
|
Valdacil-446 |
self.settings.userconf[k].active = v.active; |
500 |
|
Valdacil-446 |
end |
501 |
|
Valdacil-446 |
else |
502 |
|
Valdacil-446 |
self.settings.preconf[k].pos = { v.x, v.y }; |
503 |
|
Valdacil-446 |
self.settings.preconf[k].combat = { true, true }; |
504 |
|
Valdacil-446 |
self.settings.preconf[k].active = v.active; |
505 |
|
Valdacil-446 |
end |
506 |
|
Valdacil-446 |
elseif (k == "Features") then |
507 |
|
Valdacil-446 |
for key, value in pairs(v) do |
508 |
|
Valdacil-446 |
if (key == 'combattraps') then |
509 |
|
Valdacil-446 |
self.settings.traits["CombatTraps"].active = value; |
510 |
|
Valdacil-446 |
elseif (key == 'strongdraw') then |
511 |
|
Valdacil-446 |
self.settings.traits["StrongDraw"].active = value; |
512 |
|
Valdacil-446 |
elseif (key == 'arrowstorm') then |
513 |
|
Valdacil-446 |
self.settings.traits["ArrowStorm"].active = value; |
514 |
|
Valdacil-446 |
elseif (key == 'thorns') then |
515 |
|
Valdacil-446 |
self.settings.traits["RainofThorns"].active = value; |
516 |
|
Valdacil-446 |
elseif (key == 'bards') then |
517 |
|
Valdacil-446 |
self.settings.traits["BardsArrow"].active = value; |
518 |
|
Valdacil-446 |
elseif (key == 'pressonward') then |
519 |
|
Valdacil-446 |
self.settings.traits["PressOnward"].active = value; |
520 |
|
Valdacil-446 |
elseif (key == 'dimswiftstroke') then |
521 |
|
Valdacil-446 |
self.settings.features["DimSwiftStroke"].active = value; |
522 |
|
Valdacil-446 |
elseif (key == 'stanceactive') then |
523 |
|
Valdacil-446 |
self.settings.defaults["StanceActive"].selected = value; |
524 |
|
Valdacil-446 |
elseif (key == 'findpathactive') then |
525 |
|
Valdacil-446 |
self.settings.defaults["FindPathActive"].selected = value; |
526 |
|
Valdacil-446 |
elseif (key == 'primarystance') then |
527 |
|
Valdacil-446 |
self.settings.defaults["PrimaryStance"].selected = value; |
528 |
|
Valdacil-446 |
elseif (key == 'secondarystance') then |
529 |
|
Valdacil-446 |
self.settings.defaults["SecondaryStance"].selected = value; |
530 |
|
Valdacil-446 |
end |
531 |
|
Valdacil-446 |
end |
532 |
|
Valdacil-446 |
elseif (k == "Quickslots") then |
533 |
|
Valdacil-446 |
for key, value in pairs(v) do |
534 |
|
Valdacil-446 |
if (key == 'fireoil') then |
535 |
|
Valdacil-446 |
self.settings.quickslots["FireOil"].active = value.active; |
536 |
|
Valdacil-446 |
self.settings.quickslots["FireOil"].type = value.type; |
537 |
|
Valdacil-446 |
self.settings.quickslots["FireOil"].data = value.data; |
538 |
|
Valdacil-446 |
elseif (key == 'lightoil') then |
539 |
|
Valdacil-446 |
self.settings.quickslots["LightOil"].active = value.active; |
540 |
|
Valdacil-446 |
self.settings.quickslots["LightOil"].type = value.type; |
541 |
|
Valdacil-446 |
self.settings.quickslots["LightOil"].data = value.data; |
542 |
|
Valdacil-446 |
elseif (key == 'bowchant') then |
543 |
|
Valdacil-446 |
self.settings.quickslots["BowChant"].active = value.active; |
544 |
|
Valdacil-446 |
self.settings.quickslots["BowChant"].type = value.type; |
545 |
|
Valdacil-446 |
self.settings.quickslots["BowChant"].data = value.data; |
546 |
|
Valdacil-446 |
elseif (key == 'trap1') then |
547 |
|
Valdacil-446 |
self.settings.quickslots["Trap1"].active = value.active; |
548 |
|
Valdacil-446 |
self.settings.quickslots["Trap1"].type = value.type; |
549 |
|
Valdacil-446 |
self.settings.quickslots["Trap1"].data = value.data; |
550 |
|
Valdacil-446 |
elseif (key == 'trap2') then |
551 |
|
Valdacil-446 |
self.settings.quickslots["Trap2"].active = value.active; |
552 |
|
Valdacil-446 |
self.settings.quickslots["Trap2"].type = value.type; |
553 |
|
Valdacil-446 |
self.settings.quickslots["Trap2"].data = value.data; |
554 |
|
Valdacil-446 |
elseif (key == 'trap3') then |
555 |
|
Valdacil-446 |
self.settings.quickslots["Trap3"].active = value.active; |
556 |
|
Valdacil-446 |
self.settings.quickslots["Trap3"].type = value.type; |
557 |
|
Valdacil-446 |
self.settings.quickslots["Trap3"].data = value.data; |
558 |
|
Valdacil-446 |
end |
559 |
|
Valdacil-446 |
end |
560 |
|
Valdacil-446 |
end |
561 |
|
Valdacil-446 |
end |
562 |
|
Valdacil-446 |
end |
563 |
|
Valdacil-446 |
|
564 |
110 |
Valdacil-446 |
if (settings.vers < 4.10) then |
565 |
|
Valdacil-446 |
local vartemp = nil; |
566 |
|
Valdacil-446 |
settings.skilldata["Fleetness"] = {parent = nil, pos = {1,1}}; |
567 |
|
Valdacil-446 |
if (settings.multidata["StanceSlot"].current[1] == 4) then |
568 |
|
Valdacil-446 |
settings.multidata["StanceSlot"].current[1] = 1; |
569 |
|
Valdacil-446 |
end |
570 |
|
Valdacil-446 |
if (self.settings.defaults["PrimaryStance"].selected == 4) then |
571 |
|
Valdacil-446 |
vartemp = 1; |
572 |
|
Valdacil-446 |
else |
573 |
|
Valdacil-446 |
vartemp = self.settings.defaults["PrimaryStance"].selected; |
574 |
|
Valdacil-446 |
end |
575 |
|
Valdacil-446 |
self.settings.defaults["PrimaryStance"] = { }; |
576 |
|
Valdacil-446 |
self.settings.defaults["PrimaryStance"] = { id = 1, name = 'Primary Stance', selected = vartemp, list = { "Strength", "Precision", "Endurance" } }; |
577 |
|
Valdacil-446 |
if (self.settings.defaults["SecondaryStance"].selected == 4) then |
578 |
|
Valdacil-446 |
vartemp = 1; |
579 |
|
Valdacil-446 |
else |
580 |
|
Valdacil-446 |
vartemp = self.settings.defaults["SecondaryStance"].selected; |
581 |
|
Valdacil-446 |
end |
582 |
|
Valdacil-446 |
self.settings.defaults["SecondaryStance"] = { }; |
583 |
|
Valdacil-446 |
self.settings.defaults["SecondaryStance"] = { id = 2, name = 'Secondary Stance', selected = vartemp, list = { "Strength", "Precision", "Endurance" } }; |
584 |
|
Valdacil-446 |
self.settings.traits["CombatPressOnward"] = nil; |
585 |
|
Valdacil-446 |
vartemp = self.settings.traits["BardsArrow"].active; |
586 |
|
Valdacil-446 |
self.settings.traits["BardsArrow"] = { }; |
587 |
|
Valdacil-446 |
self.settings.traits["BardsArrow"] = { id = 5, name = "Bard's Arrow", active = vartemp }; |
588 |
|
Valdacil-446 |
vartemp = self.settings.traits["RainofThorns"].active; |
589 |
|
Valdacil-446 |
self.settings.traits["RainofThorns"] = { }; |
590 |
|
Valdacil-446 |
self.settings.traits["RainofThorns"] = { id = 6, name = "Rain of Thorns", active = vartemp }; |
591 |
|
Valdacil-446 |
end |
592 |
127 |
Valdacil-446 |
|
593 |
|
Valdacil-446 |
if (settings.vers < 5.00) then |
594 |
|
Valdacil-446 |
self.settings.traits["StrongDraw"] = nil; |
595 |
|
Valdacil-446 |
self.settings.traits["ArrowStorm"] = nil; |
596 |
|
Valdacil-446 |
self.settings.traits["RainofThorns"].id = 2; |
597 |
|
Valdacil-446 |
self.settings.traits["BardsArrow"].id = 3; |
598 |
|
Valdacil-446 |
if (self.settings.userconf["BowInduct"] ~= nil) then |
599 |
|
Valdacil-446 |
self.settings.userconf["BowInduct"].size[1] = self.settings.userconf["BowInduct"].size[1] + 1; |
600 |
|
Valdacil-446 |
settings.skilldata["SplitShot"] = { parent = "BowInduct", pos = { self.settings.userconf["BowInduct"].size[1], 1 } }; |
601 |
|
Valdacil-446 |
end |
602 |
|
Valdacil-446 |
if (self.settings.userconf["BowFocus"] ~= nil) then |
603 |
|
Valdacil-446 |
self.settings.userconf["BowFocus"].size[1] = self.settings.userconf["BowFocus"].size[1] + 1; |
604 |
|
Valdacil-446 |
settings.skilldata["HuntersArt"] = { parent = "BowFocus", pos = { self.settings.userconf["BowFocus"].size[1], 1 } }; |
605 |
|
Valdacil-446 |
end |
606 |
|
Valdacil-446 |
if (self.settings.userconf["Fear"] ~= nil) then |
607 |
|
Valdacil-446 |
self.settings.userconf["Fear"].defpos = {7,2}; |
608 |
|
Valdacil-446 |
end |
609 |
|
Valdacil-446 |
if (self.settings.userconf["Dethreat"] ~= nil) then |
610 |
|
Valdacil-446 |
self.settings.userconf["Dethreat"].defpos = {9,2}; |
611 |
|
Valdacil-446 |
end |
612 |
|
Valdacil-446 |
end |
613 |
|
Valdacil-446 |
|
614 |
6 |
Kragenwar-3044 |
settings.vers = vars.vers; |
615 |
|
Kragenwar-3044 |
|
616 |
|
Kragenwar-3044 |
end |
617 |
|
Kragenwar-3044 |
|
618 |
|
Kragenwar-3044 |
|
619 |
|
Kragenwar-3044 |
-- REFRESH SKILLS AND BARS |
620 |
|
Kragenwar-3044 |
function HunterBars:Refresh() |
621 |
|
Kragenwar-3044 |
|
622 |
|
Kragenwar-3044 |
-- GENERIC REFRESH (Required for all classes) |
623 |
|
Kragenwar-3044 |
self:RefreshBars(); |
624 |
49 |
Kragenwar-3044 |
|
625 |
|
Kragenwar-3044 |
-- REDEFINE EFFECTLIST IN CASE OF LANGUAGE CHANGE |
626 |
48 |
Kragenwar-3044 |
self.DefineEffectList(); |
627 |
6 |
Kragenwar-3044 |
|
628 |
|
Kragenwar-3044 |
-- CLASS SPECIFIC REFRESH |
629 |
|
Kragenwar-3044 |
-- Setup Features |
630 |
80 |
Valdacil-446 |
self.skills["RainofThorns"]:SetActive(self.settings.traits["RainofThorns"].active); |
631 |
|
Valdacil-446 |
self.skills["BardsArrow"]:SetActive(self.settings.traits["BardsArrow"].active); |
632 |
|
Valdacil-446 |
self.skills["PressOnward"]:SetActive(self.settings.traits["PressOnward"].active); |
633 |
6 |
Kragenwar-3044 |
|
634 |
80 |
Valdacil-446 |
self.skills["FireOil"]:SetQuickslot(self.settings.quickslots["FireOil"]); |
635 |
|
Valdacil-446 |
self.skills["LightOil"]:SetQuickslot(self.settings.quickslots["LightOil"]); |
636 |
|
Valdacil-446 |
self.skills["BowChant"]:SetQuickslot(self.settings.quickslots["BowChant"]); |
637 |
6 |
Kragenwar-3044 |
|
638 |
46 |
Valdacil-446 |
self.multi["TrapsSlot"]:Clear(); |
639 |
81 |
Valdacil-446 |
self.multi["TrapsSlot"]:AddShortCut("Trap1", self.settings.quickslots["Trap1"]); |
640 |
|
Valdacil-446 |
self.multi["TrapsSlot"]:AddShortCut("Trap2", self.settings.quickslots["Trap2"]); |
641 |
|
Valdacil-446 |
self.multi["TrapsSlot"]:AddShortCut("Trap3", self.settings.quickslots["Trap3"]); |
642 |
49 |
Kragenwar-3044 |
self.multi["TrapsSlot"]:Refresh(true); |
643 |
46 |
Valdacil-446 |
|
644 |
6 |
Kragenwar-3044 |
self.multi["TrackingSlot"]:Clear(); |
645 |
|
Kragenwar-3044 |
self.multi["TrackingSlot"]:AddShortCut("PassageofNature", 12, "0x70003F45"); |
646 |
|
Kragenwar-3044 |
self.multi["TrackingSlot"]:AddShortCut("PassageofFoes", 22, "0x70003F46"); |
647 |
|
Kragenwar-3044 |
self.multi["TrackingSlot"]:AddShortCut("PassageofShadow", 32, "0x70003F47"); |
648 |
|
Kragenwar-3044 |
self.multi["TrackingSlot"]:LevelCheck(); |
649 |
|
Kragenwar-3044 |
|
650 |
|
Kragenwar-3044 |
self.multi["StanceSlot"]:Clear(); |
651 |
|
Kragenwar-3044 |
self.multi["StanceSlot"]:AddShortCut("StrengthStance", 6, "0x70003F4E"); |
652 |
|
Kragenwar-3044 |
self.multi["StanceSlot"]:AddShortCut("PrecisionStance", 18, "0x70003F4D"); |
653 |
|
Kragenwar-3044 |
self.multi["StanceSlot"]:AddShortCut("EnduranceStance", 28, "0x70003F4F"); |
654 |
|
Kragenwar-3044 |
self.multi["StanceSlot"]:LevelCheck(); |
655 |
|
Kragenwar-3044 |
|
656 |
|
Kragenwar-3044 |
self.multi["TrappingSlot"]:Clear(); |
657 |
|
Kragenwar-3044 |
self.multi["TrappingSlot"]:AddShortCut("SetTrap", 6, "0x700030BB"); |
658 |
|
Kragenwar-3044 |
self.multi["TrappingSlot"]:AddShortCut("SetSnare", 36, "0x7000A6B1"); |
659 |
|
Kragenwar-3044 |
self.multi["TrappingSlot"]:LevelCheck(); |
660 |
14 |
Valdacil-446 |
|
661 |
|
Valdacil-446 |
self.multi["PortsSlot"]:Clear(); |
662 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoMichelDelving", 22, "0x7000A2C3"); |
663 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoThorinsHall", 24, "0x70003F41"); |
664 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("ReturntoCamp", 26, "0x7000A2C1"); |
665 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoOstGuruth", 26, "0x7000A2C2"); |
666 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoBree", 32, "0x70003F42"); |
667 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoEsteldin", 34, "0x70003F43"); |
668 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoEvendim", 36, "0x7000A2C4"); |
669 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoWestAngmar", 44, "0x7000A2C5"); |
670 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoRivendell", 46, "0x70003F44"); |
671 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoSuriKyla", 48, "0x70017C82"); |
672 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoEastAngmar", 48, "0x7000A2C6"); |
673 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoEchadDunann", 50, "0x70017C81"); |
674 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoTwentyFirstHall",56, "0x70017C7A"); |
675 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoMirkEaves", 62, "0x7001F459"); |
676 |
|
Valdacil-446 |
self.multi["PortsSlot"]:AddShortCut("GuidetoHarndirion", 62, "0x700235EF"); |
677 |
|
Valdacil-446 |
self.multi["PortsSlot"]:LevelCheck(); |
678 |
|
Valdacil-446 |
|
679 |
80 |
Valdacil-446 |
if (self.settings.defaults["FindPathActive"].selected == 1) then |
680 |
6 |
Kragenwar-3044 |
self.skills["FindthePath"]:SetActive(true); |
681 |
|
Kragenwar-3044 |
self.skills["FindthePath"]:SetHover(false); |
682 |
80 |
Valdacil-446 |
elseif (self.settings.defaults["FindPathActive"].selected == 2) then |
683 |
6 |
Kragenwar-3044 |
self.skills["FindthePath"]:SetActive(true); |
684 |
80 |
Valdacil-446 |
self.skills["FindthePath"]:SetHover(self.effectlist["FindthePath"]:GetState()); |
685 |
6 |
Kragenwar-3044 |
else |
686 |
80 |
Valdacil-446 |
self.skills["FindthePath"]:SetActive(not self.effectlist["FindthePath"]:GetState()); |
687 |
6 |
Kragenwar-3044 |
end |
688 |
80 |
Valdacil-446 |
self.multi["TrappingSlot"]:SetCombat(self.settings.traits["CombatTraps"].active, true); |
689 |
6 |
Kragenwar-3044 |
|
690 |
127 |
Valdacil-446 |
if (settings.skilldata["PurgePoison"].parent ~= nil and vars.playerlevel >= self.skills["PurgePoison"].level[1] and self.settings.features["PoisonIndicator"].active and self.poison > 0) then |
691 |
|
Valdacil-446 |
if (self.settings.userconf[settings.skilldata["PurgePoison"].parent].active) then |
692 |
|
Valdacil-446 |
self.skills["PurgePoison"]:SetColor("green"); |
693 |
|
Valdacil-446 |
end |
694 |
|
Valdacil-446 |
else |
695 |
|
Valdacil-446 |
self.skills["PurgePoison"]:SetColor(); |
696 |
|
Valdacil-446 |
end |
697 |
|
Valdacil-446 |
|
698 |
6 |
Kragenwar-3044 |
-- Refresh States |
699 |
|
Kragenwar-3044 |
self:CombatChange(vars.player:IsInCombat()); |
700 |
|
Kragenwar-3044 |
self:StanceChange(vars.classattr:GetStance()); |
701 |
|
Kragenwar-3044 |
self:FocusChange(vars.classattr:GetFocus()); |
702 |
|
Kragenwar-3044 |
|
703 |
|
Kragenwar-3044 |
end |