Skip to content

Commit d15dc3c

Browse files
committed
Latest including Arms Warrior
1 parent 923c4ec commit d15dc3c

File tree

12 files changed

+997
-1883
lines changed

12 files changed

+997
-1883
lines changed

Rotations/Rogue/Subtlety/SubtletyCuteOne.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ local function markPickPocketResult(thisUnit, success, lootMsg, errorMsg)
297297
end
298298

299299
-- Event handler for Pick Pocket detection
300-
local pickPocketFrame = pickPocketFrame or br._G.CreateFrame("Frame")
300+
local pickPocketFrame = br._G.CreateFrame("Frame")
301301
pickPocketFrame:RegisterEvent("UI_ERROR_MESSAGE")
302302
pickPocketFrame:RegisterEvent("CHAT_MSG_LOOT")
303303
pickPocketFrame:RegisterEvent("CHAT_MSG_MONEY")

Rotations/Warrior/Arms/ArmsCuteOne.lua

Lines changed: 387 additions & 1426 deletions
Large diffs are not rendered by default.

Rotations/Warrior/Initial/InitialWarrior.lua

Lines changed: 137 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,33 @@ local function createOptions()
3737
-----------------------
3838
section = br.ui:createSection(br.ui.window.profile, "General")
3939
-- Basic Trinket Module
40-
br.player.module.BasicTrinkets(nil, section)
40+
-- br.player.module.BasicTrinkets(nil, section)
4141
-- Battle Shout
42-
br.ui:createCheckbox(section, "Battle Shout")
42+
-- br.ui:createCheckbox(section, "Battle Shout")
4343
-- Charge
4444
br.ui:createCheckbox(section, "Charge")
4545
-- Hamstring
46-
br.ui:createCheckbox(section, "Hamstring")
46+
-- br.ui:createCheckbox(section, "Hamstring")
4747
-- Heroic Throw
48-
br.ui:createCheckbox(section, "Heroic Throw")
48+
-- br.ui:createCheckbox(section, "Heroic Throw")
4949
-- Victory Rush
5050
br.ui:createCheckbox(section, "Victory Rush")
5151
br.ui:checkSectionState(section)
5252
-------------------------
5353
--- DEFENSIVE OPTIONS ---
5454
-------------------------
5555
section = br.ui:createSection(br.ui.window.profile, "Defensive")
56+
-- Basic Healing Module
57+
-- br.player.module.BasicHealing(section)
5658
-- Shield Block
57-
br.ui:createSpinner(section, "Shield Block", 30, 0, 100, 5, "|cffFFFFFFPet Health Percent to Cast At")
59+
-- br.ui:createSpinner(section, "Shield Block", 30, 0, 100, 5, "|cffFFFFFFPet Health Percent to Cast At")
5860
br.ui:checkSectionState(section)
5961
-------------------------
6062
--- INTERRUPT OPTIONS ---
6163
-------------------------
6264
section = br.ui:createSection(br.ui.window.profile, "Interrupt")
63-
-- Basic Healing Module
64-
br.player.module.BasicHealing(section)
6565
-- Pummel
66-
br.ui:createCheckbox(section, "Pummel", "|cffFFFFFFUse Pummel")
66+
-- br.ui:createCheckbox(section, "Pummel", "|cffFFFFFFUse Pummel")
6767
-- Interrupt Percentage
6868
br.ui:createSpinnerWithout(section, "Interrupt At", 0, 0, 95, 5,
6969
"|cffFFFFFFCast Percent to Cast At (0 is random)")
@@ -78,8 +78,6 @@ local function createOptions()
7878
br.ui:createDropdownWithout(section, "Defensive Mode", br.ui.dropOptions.Toggle, 6)
7979
-- Interrupts Key Toggle
8080
br.ui:createDropdownWithout(section, "Interrupt Mode", br.ui.dropOptions.Toggle, 6)
81-
-- Pause Toggle
82-
br.ui:createDropdown(section, "Pause Mode", br.ui.dropOptions.Toggle, 6)
8381
br.ui:checkSectionState(section)
8482
end
8583
optionTable = { {
@@ -102,9 +100,9 @@ local module
102100
local ui
103101
local unit
104102
local units
103+
local var
105104
-- General Locals
106-
local haltProfile
107-
local profileStop
105+
108106
-- Profile Specific Locals
109107
local actionList = {}
110108

@@ -113,22 +111,22 @@ local actionList = {}
113111
--------------------
114112
-- Action List -Extras
115113
actionList.Extras = function()
116-
-- Battle Shout
117-
if ui.checked("Battle Shout") then
118-
if cast.able.battleShout() and buff.battleShout.refresh() and not unit.resting() then
119-
if cast.battleShout() then
120-
ui.debug("Casting Battle Shout")
121-
return true
122-
end
123-
end
124-
end
125-
-- Hamstring
126-
if ui.checked("Hamstring") and cast.able.hamstring("target") and not unit.facing("target", "player") and unit.moving("target") then
127-
if cast.hamstring("target") then
128-
ui.debug("Casting Hamstring")
129-
return true
130-
end
131-
end
114+
-- -- Battle Shout
115+
-- if ui.checked("Battle Shout") then
116+
-- if cast.able.battleShout() and buff.battleShout.refresh() and not unit.resting() then
117+
-- if cast.battleShout() then
118+
-- ui.debug("Casting Battle Shout")
119+
-- return true
120+
-- end
121+
-- end
122+
-- end
123+
-- -- Hamstring
124+
-- if ui.checked("Hamstring") and cast.able.hamstring("target") and not unit.facing("target", "player") and unit.moving("target") then
125+
-- if cast.hamstring("target") then
126+
-- ui.debug("Casting Hamstring")
127+
-- return true
128+
-- end
129+
-- end
132130
end -- End Action List -Extras
133131

134132
-- Action List - Defensive
@@ -137,52 +135,66 @@ actionList.Defensive = function()
137135
-- Basic Healing Module
138136
module.BasicHealing()
139137
--Shield Block
140-
if ui.checked("Shield Block") and cast.able.shieldBlock() and unit.exists("target")
141-
and unit.distance("target") < 5 and unit.hp() < ui.value("Shield Block")
142-
then
143-
if cast.shieldBlock() then
144-
ui.debug("Casting Shield Block")
145-
return true
146-
end
147-
end
138+
-- if ui.checked("Shield Block") and cast.able.shieldBlock() and unit.exists("target")
139+
-- and unit.distance("target") < 5 and unit.hp() < ui.value("Shield Block")
140+
-- then
141+
-- if cast.shieldBlock() then
142+
-- ui.debug("Casting Shield Block")
143+
-- return true
144+
-- end
145+
-- end
148146
end
149147
end -- End Action List - Defensive
150148

151149
-- Action List - Interrupt
152150
actionList.Interrupt = function()
153151
if ui.useInterrupt() then
154152
-- Pummel
155-
if ui.checked("Pummel") then
156-
for i = 1, #enemies.yards5f do
157-
local thisUnit = enemies.yards5f[i]
158-
if cast.able.pummel(thisUnit) and unit.interruptable(thisUnit, ui.value("Interrupt At")) then
159-
if cast.pummel(thisUnit) then
160-
ui.debug("Casting Pummel on " .. unit.name(thisUnit))
161-
return true
162-
end
163-
end
164-
end
165-
end
153+
-- if ui.checked("Pummel") then
154+
-- for i = 1, #enemies.yards5f do
155+
-- local thisUnit = enemies.yards5f[i]
156+
-- if cast.able.pummel(thisUnit) and unit.interruptable(thisUnit, ui.value("Interrupt At")) then
157+
-- if cast.pummel(thisUnit) then
158+
-- ui.debug("Casting Pummel on " .. unit.name(thisUnit))
159+
-- return true
160+
-- end
161+
-- end
162+
-- end
163+
-- end
166164
end
167165
end -- End Action List - Interrupt
168166

169167
-- Action List - Pre-Combat
170168
actionList.PreCombat = function()
171169
if not unit.inCombat() and not unit.mounted() and unit.valid("target") then
172-
-- Whirlwind
173-
if ui.useAOE(8, 2) and unit.level() >= 9 and cast.able.whirlwind() then
174-
if cast.whirlwind() then
175-
ui.debug("Casting Whirlwind")
170+
-- Execute
171+
if unit.hp("target") < 20 and cast.able.execute() then
172+
if cast.execute("target") then
173+
ui.debug("Casting Execute [Precombat]")
174+
return true
175+
end
176+
end
177+
-- Victory Rush
178+
if ui.checked("Victory Rush") and cast.able.victoryRush("target") and buff.victorious.exists() then
179+
if cast.victoryRush("target") then
180+
ui.debug("Casting Victory Rush [Precombat]")
176181
return true
177182
end
178183
end
179-
-- Slam
180-
if (ui.useST(8, 2) or unit.level() < 9) and cast.able.slam("target") then
181-
if cast.slam("target") then
182-
ui.debug("Casting Slam")
184+
-- Heroic Strike
185+
if cast.able.heroicStrike("target") then
186+
if cast.heroicStrike("target") then
187+
ui.debug("Casting Heroic Strike [Precombat]")
183188
return true
184189
end
185190
end
191+
-- -- Attack
192+
-- if cast.able.attack("target") then
193+
-- if cast.attack("target") then
194+
-- ui.debug("Casting Attack [Precombat]")
195+
-- return true
196+
-- end
197+
-- end
186198
-- Start Attack
187199
if cast.able.autoAttack("target") then
188200
if cast.autoAttack("target") then
@@ -195,77 +207,61 @@ end -- End Action List - PreCombat
195207

196208
-- Action List - Combat
197209
actionList.Combat = function()
198-
if unit.valid("target") and cd.global.remain() == 0 then
199-
if unit.exists(units.dyn40) and unit.distance(units.dyn40) < 40 then
200-
-- Charge
201-
if mode.mover == 1 and ui.checked("Charge") and cast.able.charge("target")
202-
and unit.distance("target") >= 8 and unit.distance("target") <= 25
203-
then
204-
if cast.charge("target") then
205-
ui.debug("Casting Charge")
210+
if (unit.inCombat() or (not unit.inCombat() and unit.valid(units.dyn5))) and not var.profileStop
211+
and unit.exists(units.dyn5) and cd.global.remain() == 0
212+
then
213+
-- Charge
214+
if mode.mover == 1 and ui.checked("Charge") and cast.able.charge("target")
215+
and unit.distance("target") >= 8 and unit.distance("target") <= 25
216+
then
217+
if cast.charge("target") then
218+
ui.debug("Casting Charge")
219+
return true
220+
end
221+
end
222+
-- Interrupts
223+
if actionList.Interrupt() then return true end
224+
if unit.inCombat() then
225+
-- Basic Trinkets Module
226+
module.BasicTrinkets()
227+
-- Execute
228+
if unit.hp("target") < 20 and cast.able.execute("target") then
229+
if cast.execute() then
230+
ui.debug("Casting Execute")
206231
return true
207232
end
208233
end
209-
-- Heroic Throw
210-
if ui.checked("Heroic Throw") and cast.able.heroicThrow("target")
211-
and unit.distance("target") >= 8 and unit.distance("target") <= 25
212-
then
213-
if cast.heroicThrow("target") then
214-
ui.debug("Casting Heroic Throw")
234+
-- Victory Rush
235+
if ui.checked("Victory Rush") and cast.able.victoryRush("target") and buff.victorious.exists() then
236+
if cast.victoryRush("target") then
237+
ui.debug("Casting Victory Rush")
215238
return true
216239
end
217240
end
218-
-- Interrupts
219-
if actionList.Interrupt() then return true end
220-
-- Execute
221-
if unit.inCombat() then
222-
if unit.hp("target") < 20 and cast.able.execute() then
223-
if cast.execute() then
224-
ui.debug("Casting Execute")
225-
return true
226-
end
227-
end
228-
-- Victory Rush
229-
if ui.checked("Victory Rush") and cast.able.victoryRush("target") and buff.victorious.exists() then
230-
if cast.victoryRush("target") then
231-
ui.debug("Casting Victory Rush")
232-
return true
233-
end
234-
end
235-
-- Start Attack
236-
if not cast.auto.autoAttack(units.dyn5) and unit.exists(units.dyn5) and unit.distance(units.dyn5) < 5 then
237-
if cast.autoAttack(units.dyn5) then
238-
ui.debug("Casting Auto Attack")
239-
return true
240-
end
241-
end
242-
-- Basic Trinkets Module
243-
module.BasicTrinkets()
244-
-- Shield Slam
245-
if cast.able.shieldSlam() then
246-
if cast.shieldSlam() then
247-
ui.debug("Casting Shield Slam")
248-
return true
249-
end
250-
end
251-
-- Whirlwind
252-
if ui.useAOE(8, 2) and unit.level() >= 9 and cast.able.whirlwind() then
253-
if cast.whirlwind() then
254-
ui.debug("Casting Whirlwind")
255-
return true
256-
end
241+
-- Heroic Strike
242+
if cast.able.heroicStrike() then
243+
if cast.heroicStrike() then
244+
ui.debug("Casting Heroic Strike")
245+
return true
257246
end
258-
-- Slam
259-
if (ui.useST(8, 2) or unit.level() < 9) and cast.able.slam() then
260-
if cast.slam() then
261-
ui.debug("Casting Slam")
262-
return true
263-
end
247+
end
248+
-- Attack
249+
-- if cast.able.attack() then
250+
-- if cast.attack() then
251+
-- ui.debug("Casting Attack")
252+
-- return true
253+
-- end
254+
-- end
255+
-- Start Attack
256+
if not cast.auto.autoAttack(units.dyn5) and unit.exists(units.dyn5) and unit.distance(units.dyn5) < 5 then
257+
if cast.autoAttack(units.dyn5) then
258+
ui.debug("Casting Auto Attack")
259+
return true
264260
end
265261
end
266262
end -- End In Combat Rotation
267263
end
268-
end -- End Action List - Combat
264+
end -- End Action List - Combat
269265

270266
----------------
271267
--- ROTATION ---
@@ -275,36 +271,44 @@ local function runRotation()
275271
--- Define Locals ---
276272
---------------------
277273
-- BR API Locals
278-
buff = br.player.buff
279-
cast = br.player.cast
280-
cd = br.player.cd
281-
enemies = br.player.enemies
282-
mode = br.player.ui.mode
283-
module = br.player.module
284-
ui = br.player.ui
285-
unit = br.player.unit
286-
units = br.player.units
287-
-- General Locals
288-
profileStop = profileStop or false
289-
haltProfile = (unit.inCombat() and profileStop) or unit.mounted() or br.functions.misc:pause() or mode.rotation == 2
274+
if not br.player.initialized then
275+
buff = br.player.buff
276+
cast = br.player.cast
277+
cd = br.player.cd
278+
enemies = br.player.enemies
279+
mode = br.player.ui.mode
280+
module = br.player.module
281+
ui = br.player.ui
282+
unit = br.player.unit
283+
units = br.player.units
284+
var = br.player.variables
285+
-- General Locals
286+
var.profileStop = false
287+
288+
br.player.initialized = true
289+
end
290+
-- haltProfile = (unit.inCombat() and profileStop) or unit.mounted() or br.functions.misc:pause() or mode.rotation == 2
290291
-- Units
291292
units.get(5) -- Makes a variable called, units.dyn5
292293
units.get(40) -- Makes a variable called, units.dyn40
293294
units.get(40, true)
294295
-- Enemies
295296
enemies.get(5, "player", false, true) -- Makes a variable called, enemies.yards5f
296297

298+
if not unit.inCombat() then
299+
if var.profileStop then var.profileStop = false end
300+
end
301+
297302
-- Pause Timer
298303
if br.pauseTime == nil then br.pauseTime = ui.time() end
299304

300305
---------------------
301306
--- Begin Profile ---
302307
---------------------
303-
-- Profile Stop | Pause
304-
if not unit.inCombat() and not unit.exists("target") and profileStop then
305-
profileStop = false
306-
elseif haltProfile then
307-
br.pauseTime = ui.time()
308+
-- * Profile Stop | Pause
309+
if not unit.inCombat() and not unit.exists("target") and var.profileStop then
310+
var.profileStop = false
311+
elseif (unit.inCombat() and var.profileStop) or ui.pause() then
308312
return true
309313
else
310314
---------------------------------
@@ -318,6 +322,7 @@ local function runRotation()
318322
--- Defensive ---
319323
-----------------
320324
if actionList.Defensive() then return true end
325+
if ui.mode.rotation == 2 then return true end
321326
------------------
322327
--- Pre-Combat ---
323328
------------------

0 commit comments

Comments
 (0)