├── IsMounted
├── localization.de.lua
├── localization.fr.lua
├── localization.en.lua
├── IsMounted.toc
├── IsMounted.xml
├── IsMounted.txt
└── IsMounted.lua
├── Fury.toc
├── Fury.xml
├── Bindings.xml
├── README.md
├── Localization.lua
└── Fury.lua
/IsMounted/localization.de.lua:
--------------------------------------------------------------------------------
1 | -- Version : German ( by Isakur )
2 | -- last update :
3 |
4 | if ( GetLocale() == "deDE" ) then
5 | ISMOUNTED_SPEED_INCREASED_BY = "Erh\195\182ht Tempo um (%d+)%%.";
6 | end
--------------------------------------------------------------------------------
/IsMounted/localization.fr.lua:
--------------------------------------------------------------------------------
1 | -- Version : French ( by Tinou )
2 | -- last update :
3 |
4 | if ( GetLocale() == "frFR" ) then
5 | ISMOUNTED_SPEED_INCREASED_BY = "Augmente la vitesse de (%d+)%%.";
6 | end
--------------------------------------------------------------------------------
/IsMounted/localization.en.lua:
--------------------------------------------------------------------------------
1 | --------------------------------------------------
2 | -- localization.lua (English)
3 | --------------------------------------------------
4 |
5 | ISMOUNTED_SPEED_INCREASED_BY = "Increases speed by (%d+)%%.";
6 |
7 |
--------------------------------------------------------------------------------
/IsMounted/IsMounted.toc:
--------------------------------------------------------------------------------
1 | ## Interface: 11200
2 | ## Title: IsMounted
3 | ## Title-deDE: IsMounted
4 | ## Author: AnduinLothar
5 | ## Notes: Mini-Library that maintains a list of who's mounted.
6 | ## Notes-deDE: Eine kleine Funktionsbibliothek zum Reiten, die von manchen anderen AddOns verwendet wird.
7 | IsMounted.xml
8 |
--------------------------------------------------------------------------------
/Fury.toc:
--------------------------------------------------------------------------------
1 | ## Interface: 11200
2 | ## Title: Fury
3 | ## Notes: To make Warrior combat easier.
4 | ## Author: CubeNicke (Orig. Bhaerau)
5 | ## eMail: cubenicke@gmail.com (Orig bhaerau@gmail.com)
6 | ## DefaultState: enabled
7 | ## SavedVariables: Fury_Configuration, Fury_Runners, Fury_ImmuneDisarm
8 | ## OptionalDeps: IsMounted, Outfitter
9 | IsMounted\IsMounted.xml
10 | Fury.xml
--------------------------------------------------------------------------------
/IsMounted/IsMounted.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Fury.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | Fury_OnLoad();
17 |
18 |
19 | Fury_OnEvent(event);
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Bindings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Fury()
4 |
5 |
6 | Fury_SlashCommand("aoe")
7 |
8 |
9 | Fury_SlashCommand("ability Whirlwind")
10 |
11 |
12 | Fury_SlashCommand("threat")
13 |
14 |
15 | Fury_SlashCommand("ability Death Wish")
16 |
17 |
18 | Fury_SlashCommand("charge")
19 |
20 |
21 | Fury_SlashCommand("block")
22 |
23 |
24 | Fury_SlashCommand("shoot")
25 |
26 |
27 | Fury_SlashCommand("attack")
28 |
29 |
30 | Fury_SlashCommand("prot")
31 |
32 |
33 | Fury_SlashCommand("ability Demoralizing Shout")
34 |
35 |
--------------------------------------------------------------------------------
/IsMounted/IsMounted.txt:
--------------------------------------------------------------------------------
1 | IsMounted is a mini-library with one purpose: Quickly and efficiently detect if any friendly unit is mounted.
Essentially this is done by buff tooltip scan, but it is also augmented with events that allow for the storage of predictibly consistant unit mount information storage. This means if it has been checked before and you ask again before the unit or its buffs' change the result will be as efficient as a table lookup! Feel free to use it as frequently as you like.
There are tons of instances where having this information at your fingertips might be useful: macros, casting, auto-follow, macros, flight-path unmount, etc. The opportunities are limited only by your imagination!
Your new best friends:
Macro Slash Command: /dismount
--
-- UnitIsMounted( string unit )
--
-- EX: if (UnitIsMounted("player")) then doSomething(); end
--
-- Returns:
-- (Boolean isMounted)
-- isMounted - 1 if mounted, else nil
--
--
-- Dismount()
--
-- EX: if (Dismount()) then print("I'm Dismounting"); end
--
-- Returns:
-- (Boolean wasMounted)
-- wasMounted - 1 if was mounted, else nil
--
--
-- UnitMountSpeed( string unit )
--
-- EX: local speed = UnitMountSpeed("target")
--
-- Returns:
-- (Number speed)
-- speed - percent speed increase of the mount (60 or 100) if unit is mounted,
-- false if mount is not found
--
--
-- UnitMountBuffID( string unit )
--
-- EX: local id = UnitMountBuffID("target")
--
-- Returns:
-- (Number id)
-- id - the buff id id of the mount, nil if mount is not found or unit doesn't exist
--
--
-- IsMounted.GetMountBuffInfo( string unit )
--
-- EX: local speed, slot = IsMounted.GetMountBuffInfo("player")
--
-- Returns:
-- (Number speed, Number slot)
-- speed - percent speed increase of the mount (60 or 100) if unit is mounted,
-- false if mount is not found
-- slot - the buff slot id of the mount, nil if mount is not found or unit doesn't exist
--
Note: Information gathered from this addon is only correct for friendly units or units that you can see the buffs of.
2 |
3 | This addon is embedable:
4 | 1) Drop the IsMounted fodler in your addon folder
5 | 2) Either add the following to your xml file:
6 |
7 | Or add this line to your toc file:
8 | IsCasting\IsCasting.xml
9 |
--------------------------------------------------------------------------------
/IsMounted/IsMounted.lua:
--------------------------------------------------------------------------------
1 | --------------------------------------------------------------------------
2 | -- IsMounted.lua
3 | --------------------------------------------------------------------------
4 | --[[
5 | IsMounted
6 |
7 | author: AnduinLothar KarlKFI@cosmosui.org
8 |
9 | -Mini-Library that maintains a list of who's mounted.
10 |
11 | Note: Information gathered from this addon is only correct for friendly units or units that you can see the buffs of.
12 |
13 | Change Log:
14 | v1.7
15 | -Now Embeddable
16 | v1.62
17 | -Updated tooltip anchoring for 1.10
18 | v1.61
19 | -Fixed nil find string error
20 | v1.6
21 | -Player mounted check now uses the PlayerBuff functions rather than UnitBuff.
22 | -Player Buff ID returned now coresponds to the buff index returned from GetPlayerBuff(i, "HELPFUL|PASSIVE") and can be used directly by CancelPlayerBuff.
23 | -Dismount now works correctly with debuffs.
24 | -Localed a few internal functions for quicker indexing
25 | v1.5
26 | - Mounted status now accurate when called from PLAYER_AURAS_CHANGED and not cleared on UNIT_AURA
27 | (UNIT_AURA w/ arg1=="player" is always called after PLAYER_AURAS_CHANGED.)
28 | v1.4
29 | - Changed tooltip scan to use IsShown to work with 1.9
30 | v1.3
31 | - Added French and German Localizations
32 | v1.2
33 | - Added Function: Dismount()
34 | - Added Function: UnitMountSpeed(unit)
35 | - Added Function: UnitMountBuffID( string unit )
36 | - Changed all refrences of 'buff slot' to 'id'
37 | Note: id is the id of the buff in terms of Tooltip/Texture index that starts at 1 while the Buff/Frame index starts at 0. So you might have to subtract 1 till blizz fixes it next patch, depending on your usage.
38 | v1.1
39 | - Fixed but that would throw error when UNIT_AURA triggered for 'mouseover' unit. (I Didn't know it caught mouseover O.o)
40 | v1.0
41 | - Initial Release
42 | ]]--
43 |
44 | local ISMOUNTED_NAME = "IsMounted"
45 | local ISMOUNTED_VERSION = 1.7
46 | local ISMOUNTED_LAST_UPDATED = "August 6, 2006"
47 | local ISMOUNTED_AUTHOR = "AnduinLothar"
48 | local ISMOUNTED_EMAIL = "karlkfi@cosmosui.org"
49 | local ISMOUNTED_WEBSITE = "http://www.wowwiki.com/Telepathy"
50 |
51 | ------------------------------------------------------------------------------
52 | --[[ Embedded Sub-Library Load Algorithm ]]--
53 | ------------------------------------------------------------------------------
54 |
55 | if (not IsMounted) then
56 | IsMounted = {};
57 | end
58 | local isBetterInstanceLoaded = (IsMounted.version and IsMounted.version >= ISMOUNTED_VERSION);
59 |
60 | if (not isBetterInstanceLoaded) then
61 |
62 | IsMounted.version = ISMOUNTED_VERSION;
63 |
64 |
65 | --------------------------------------------------
66 | -- Predictibly consistant units
67 | --------------------------------------------------
68 |
69 | IsMounted.UnitTable = {
70 | player = {};
71 | target = {};
72 | }
73 | for i=1, 4 do IsMounted.UnitTable["party"..i] = {} end
74 | for i=1, 40 do IsMounted.UnitTable["raid"..i] = {} end
75 |
76 |
77 | --------------------------------------------------
78 | -- Internal Functions
79 | --------------------------------------------------
80 |
81 | function IsMounted.OnLoad()
82 | IsMountedFrame:RegisterEvent("PLAYER_AURAS_CHANGED");
83 | IsMountedFrame:RegisterEvent("UNIT_AURA");
84 | IsMountedFrame:RegisterEvent("PLAYER_TARGET_CHANGED");
85 | IsMountedFrame:RegisterEvent("PARTY_MEMBERS_CHANGED");
86 | IsMountedFrame:RegisterEvent("RAID_ROSTER_UPDATE");
87 | IsMountedFrame:RegisterEvent("PLAYER_ENTERING_WORLD");
88 | end
89 |
90 | -- Nils predictibly consistant stored values when the unit or its buffs change
91 | function IsMounted.OnEvent()
92 | if (event == "PLAYER_ENTERING_WORLD") then
93 | IsMounted.UnitTable["player"].speed = nil;
94 | IsMounted.UnitTable["player"].id = nil;
95 | elseif (event == "PLAYER_AURAS_CHANGED") then
96 | --Sea.io.print("player IsMounted mount state nilled.");
97 | IsMounted.UnitTable["player"].speed = nil;
98 | IsMounted.UnitTable["player"].id = nil;
99 | elseif (event == "UNIT_AURA") then
100 | if (not IsMounted.UnitTable[arg1]) then
101 | --Triggered by 'mouseover' buff change
102 | --Sea.io.print("UNIT_AURA: ", arg1);
103 | elseif (arg1 ~= "player") then
104 | --Sea.io.print(arg1, " IsMounted mount state nilled.");
105 | IsMounted.UnitTable[arg1].speed = nil;
106 | IsMounted.UnitTable[arg1].id = nil;
107 | end
108 | elseif (event == "PLAYER_TARGET_CHANGED") then
109 | IsMounted.UnitTable["target"].speed = nil;
110 | IsMounted.UnitTable["target"].id = nil;
111 | elseif (event == "PARTY_MEMBERS_CHANGED") then
112 | for i=1, 4 do
113 | IsMounted.UnitTable["party"..i].speed = nil;
114 | IsMounted.UnitTable["party"..i].id = nil;
115 | end
116 | elseif (event == "RAID_ROSTER_UPDATE") then
117 | for i=1, 40 do
118 | IsMounted.UnitTable["raid"..i].speed = nil;
119 | IsMounted.UnitTable["raid"..i].id = nil;
120 | end
121 | end
122 | end
123 |
124 | -- Sets stored values of predictibly consistant units and returns the speed and id of the mount buff.
125 | local GetUpdatedUnitTable = function(unit)
126 | local speed, id = IsMounted.GetUpdatedMountBuffInfo(unit);
127 | if (IsMounted.UnitTable[unit]) then
128 | --Sea.io.print("Updating UnitTable for ".. unit..": ", speed, ", ", id); -- debug msg
129 | IsMounted.UnitTable[unit].speed = speed;
130 | IsMounted.UnitTable[unit].id = id;
131 | end
132 | return speed, id;
133 | end
134 |
135 |
136 | -- Gets speed and id of player mount buff according to GetPlayerBuff
137 | local GetPlayerMountBuffInfo = function()
138 | -- Check the tooltips of the player's active buffs for the key string.
139 | local text, buffIndex, untilCancelled, _, speed;
140 | IsMountedTooltip:SetOwner(UIParent, "ANCHOR_NONE");
141 | for i = 0, 23 do
142 | buffIndex, untilCancelled = GetPlayerBuff(i, "HELPFUL|PASSIVE");
143 | if ( buffIndex < 0 ) then
144 | break;
145 | elseif ( untilCancelled ) then
146 | IsMountedTooltip:SetPlayerBuff(buffIndex);
147 | if (IsMountedTooltipTextLeft2:IsShown()) then
148 | text = IsMountedTooltipTextLeft2:GetText();
149 | if (text) then
150 | _, _, speed = string.find(text, ISMOUNTED_SPEED_INCREASED_BY);
151 | if (speed) then
152 | IsMountedTooltip:Hide();
153 | return tonumber(speed), buffIndex;
154 | end
155 | end
156 | end
157 | end
158 | end
159 | IsMountedTooltip:Hide();
160 | return false;
161 | end
162 |
163 | -- Gets speed and id of non-player mount buff according to UnitBuff
164 | local GetNonPlayerMountBuffInfo = function(unit)
165 | -- Check the tooltips of the unit's active buffs for the key string.
166 | local text, _, speed;
167 | IsMountedTooltip:SetOwner(UIParent, "ANCHOR_NONE");
168 | for i = 1, 24 do
169 | if (not UnitBuff(unit, i)) then
170 | break;
171 | end
172 | IsMountedTooltip:SetUnitBuff(unit, i);
173 | if (IsMountedTooltipTextLeft2:IsShown()) then
174 | text = IsMountedTooltipTextLeft2:GetText();
175 | if (text) then
176 | --Sea.io.print("Checking text: ".. text); -- debug msg
177 | _, _, speed = string.find(text, ISMOUNTED_SPEED_INCREASED_BY);
178 | if (speed) then
179 | IsMountedTooltip:Hide();
180 | return tonumber(speed), i;
181 | end
182 | end
183 | end
184 | end
185 | IsMountedTooltip:Hide();
186 | return false;
187 | end
188 |
189 |
190 | --------------------------------------------------
191 | -- User Functions
192 | --------------------------------------------------
193 |
194 | --
195 | -- UnitIsMounted( string unit )
196 | --
197 | -- EX: if (UnitIsMounted("player")) then doSomething(); end
198 | --
199 | -- Returns:
200 | -- (Boolean isMounted)
201 | -- isMounted - 1 if mounted, else nil
202 | --
203 | function UnitIsMounted(unit)
204 | if (IsMounted.GetMountBuffInfo(unit)) then
205 | return 1;
206 | end
207 | end
208 |
209 | --
210 | -- Dismount()
211 | --
212 | -- EX: if (Dismount()) then print("I'm Dismounting"); end
213 | -- Macro EX: /dismount
214 | --
215 | -- Returns:
216 | -- (Boolean wasMounted)
217 | -- wasMounted - 1 if was mounted, else nil
218 | --
219 | function Dismount()
220 | local speed, id = IsMounted.GetMountBuffInfo("player");
221 | if (speed) then
222 | CancelPlayerBuff(id);
223 | return 1;
224 | end
225 | end
226 |
227 | SlashCmdList["DISMOUNT"] = Dismount;
228 | SLASH_DISMOUNT1 = "/dismount";
229 |
230 | --
231 | -- UnitMountSpeed( string unit )
232 | --
233 | -- EX: local speed = UnitMountSpeed("target")
234 | --
235 | -- Returns:
236 | -- (Number speed)
237 | -- speed - percent speed increase of the mount (60 or 100) if unit is mounted,
238 | -- false if mount is not found
239 | --
240 | function UnitMountSpeed(unit)
241 | local speed, id = IsMounted.GetMountBuffInfo(unit);
242 | return speed;
243 | end
244 |
245 | --
246 | -- UnitMountBuffID( string unit )
247 | --
248 | -- EX: local id = UnitMountBuffID("target")
249 | --
250 | -- Returns:
251 | -- (Number id)
252 | -- id - the buff id id of the mount, nil if mount is not found or unit doesn't exist
253 | --
254 | function UnitMountBuffID(unit)
255 | local speed, id = IsMounted.GetMountBuffInfo(unit);
256 | return id;
257 | end
258 |
259 | --
260 | -- IsMounted.GetMountBuffInfo( string unit )
261 | --
262 | -- EX: local speed, id = IsMounted.GetMountBuffInfo("player")
263 | --
264 | -- Returns:
265 | -- (Number speed, Number id)
266 | -- speed - percent speed increase of the mount (60 or 100) if unit is mounted,
267 | -- false if mount is not found
268 | -- id - the buff id id of the mount, nil if mount is not found or unit doesn't exist
269 | --
270 | function IsMounted.GetMountBuffInfo(unit)
271 | if (IsMounted.UnitTable[unit]) and (IsMounted.UnitTable[unit].speed ~= nil) then
272 | return IsMounted.UnitTable[unit].speed, IsMounted.UnitTable[unit].id;
273 | end
274 | return GetUpdatedUnitTable(unit);
275 | end
276 |
277 | --
278 | -- IsMounted.GetUpdatedMountBuffInfo( string unit )
279 | --
280 | -- Gets Updated Mount Buff Info (duh!)
281 | --
282 | -- Returns:
283 | -- (Number speed, Number id)
284 | -- speed - percent speed increase of the mount (60 or 100) if unit is mounted,
285 | -- false if mount is not found (so that we know it's been checked since last changed)
286 | -- id - the buff id id of the mount, nil if mount is not found or unit doesn't exist
287 | --
288 | function IsMounted.GetUpdatedMountBuffInfo(unit)
289 | if (UnitIsPlayer(unit)) then
290 | if ( (not IsMounted.UnitTable[unit]) or (unit == "target") ) and (UnitIsFriend("player", unit)) then
291 | -- This unit check will always check 46 stored tables for saved speed, but it should hopefully still be faster than setting and checking the tooltips of the unit's active buffs.
292 | for u, i in IsMounted.UnitTable do
293 | if (i.speed ~= nil) and (UnitIsUnit(unit, u)) then
294 | --Sea.io.print(unit, " is ", u); -- debug msg
295 | if (unit == "target") then
296 | --only store the info for the unit if it is predictibly consistant
297 | IsMounted.UnitTable.target.speed = i.speed;
298 | IsMounted.UnitTable.target.id = i.id;
299 | end
300 | return i.speed, i.id;
301 | end
302 | end
303 | end
304 |
305 | if (unit == "player") then
306 | return GetPlayerMountBuffInfo();
307 | else
308 | return GetNonPlayerMountBuffInfo(unit);
309 | end
310 | end
311 | return false;
312 | end
313 |
314 |
315 | ------------------------------------------------------------------------------
316 | --[[ Frame Script Assignment ]]--
317 | ------------------------------------------------------------------------------
318 |
319 | --Event Driver
320 | if (not IsMountedFrame) then
321 | CreateFrame("Frame", "IsMountedFrame");
322 | end
323 | IsMountedFrame:Hide();
324 | --Frame Scripts
325 | IsMountedFrame:SetScript("OnEvent", IsMounted.OnEvent);
326 | --OnLoad Call (this masked)
327 | local tempThis = this;
328 | this = IsMountedFrame;
329 | IsMounted.OnLoad();
330 | this = tempThis;
331 |
332 | --Mining Tooltip
333 | if (not IsMountedTooltip) then
334 | CreateFrame("GameTooltip", "IsMountedTooltip", nil, "GameTooltipTemplate");
335 | end
336 | IsMountedTooltip:SetOwner(IsMountedTooltip, "ANCHOR_NONE");
337 |
338 | end
339 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Fury
2 | Fury Addon originally by Bhaerau, modifications/expanded by cubenicke. Purpose for the addon is to make a Warriors life easier while raiding/Farming in vanilla wow.
3 | Fury makes one button for the Warrior rotation, but still makes it possible to adapt the rotation with manual settings to make it adapt for each fight. Also gives some aid with mid-fight buffs
4 | like Jujus and poison cleaning.
5 |
6 | ## Usage
7 | In key bindings, bind these actions to some keys available to you mid fight (Same commands can also be created as macros - to create a button on action bar). Easiest way to get going
8 | is to bind keys to Attack and Charge. Those two will work in most situations and just use charge to initiate fights (2-3 presses) then spam use Attack. When You want to have more control over
9 | the logic you can go into the other keybinds or even macros to finetune your playstyle and handle certain mechanics.
10 |
11 | ### KeyBinds
12 | Attack - One button Fury Warrior rotation. Spam it!
13 | Block - Enter Defensive Stance and do Shield Block
14 | Charge - Will charge or intercept, sometimes builds rage and or switch stance to be able to charge/intercept.
15 | Shoot - Will use currently equipped ranged weapon (Bow, Thrown or Gun)
16 | Toggle HS or Cleave - Dump excessing rage with Heroic Strike or Cleave. Useful in threat situations and for a AoE with single mob prio.
17 | Toggle WW - Stops using Whirlwind during normal rotation, toggle it in CC situations. or Kel'Thuzad to don't do damage on Mind Controlled people.
18 | Toggle DW - Enable it a bit into fights when you want your first Death Wish to fire off (Also controls Orc racial Blood Fury).
19 | Toggle AoE - Just use AoE attacks
20 | Toggle Auto Attack - When in raiding it's important to have same target.
21 | Toggle Demoralizing Shout - Usable when not pulling close mobs
22 | Toggle Tank mode
23 |
24 | ### Usage as Macros
25 | Some commands exists as key bindings, but for most commands one has to write a macro to make them usable during combat.
26 | To get a button to press on the action bar, create a macro
27 |
28 | /fury juju power
29 |
30 | To get the correct Icon for the macro, edit the macro file in a text editor **WTF///macros-cache.txt**, change the icon name to the correct one. See below for some icon names.
31 |
32 | MACRO 16777224 "Power" INV_Misc_MonsterScales_11
33 | /fury juju power
34 | END
35 |
36 | ## Reference
37 |
38 | ### Abilities
39 | **Name, Icon**
40 |  [Battle Shout](https://classicdb.ch/?spell=25959)
41 |  [Berserker Rage](https://classicdb.ch/?spell=18449)
42 |  [Blood Fury](https://classicdb.ch/?spell=20572)
43 |  [Bloodrage](https://classicdb.ch/?spell=2687)
44 |  [Bloodthirst](https://classicdb.ch/?spell=23900)
45 |  [Charge](https://classicdb.ch/?spell=11578)
46 |  [Cleave](https://classicdb.ch/?spell=20569)
47 |  [Death Wish](https://classicdb.ch/?spell=12328)
48 |  [Demoralizing Shout](https://classicdb.ch/?spell=11556)
49 |  [Disarm](https://classicdb.ch/?spell=676)
50 |  [Execute](https://classicdb.ch/?spell=20662)
51 |  [Hamstring](https://classicdb.ch/?spell=7373)
52 |  [Heroic Strike](https://classicdb.ch/?spell=25286)
53 |  [Intercept](https://classicdb.ch/?spell=20252)
54 |  [Mortal Strike](https://classicdb.ch/?spell=21553)
55 |  [Overpower](https://classicdb.ch/?spell=11585)
56 |  [Pummel](https://classicdb.ch/?spell=6552)
57 |  [Piercing Howl](https://classicdb.ch/?spell=12323)
58 |  [Rend](https://classicdb.ch/?spell=11574)
59 |  [Revenge](https://classicdb.ch/?spell=25288)
60 |  [Shield Bash](https://classicdb.ch/?spell=72)
61 |  [Shield Slam](https://classicdb.ch/?spell=23925)
62 |  [Shoot Bow,Crossbow,Gun](https://classicdb.ch/?spell=3018)
63 |  [Stoneform](https://classicdb.ch/?spell=20594)
64 |  [Sunder Armor](https://classicdb.ch/?spell=11597)
65 |  [Sweeping Strikes](https://classicdb.ch/?spell=26654)
66 |  [Thunder Clap](https://classicdb.ch/?spell=11581)
67 |  [Throw](https://classicdb.ch/?spell=2764)
68 |  [Whirlwind](https://classicdb.ch/?spell=1680)
69 |
70 | ### Items in rotation
71 |
72 | #### On cooldown
73 |  [Earthstrike](https://classicdb.ch/?item=21180)
74 |  [Kiss of the Spider](https://classicdb.ch/?item=22954)
75 |  [Slayer's Crest](https://classicdb.ch/?item=23041)
76 |
77 | #### For rage calculations
78 |  [Knight-Lieutenant's Plate Gauntlets](https://classicdb.ch/?item=16406)
79 |  [Marshal's Plate Gauntlets](https://classicdb.ch/?item=16484)
80 |  [Blood Guard's Plate Gloves](https://classicdb.ch/?item=16510)
81 |  [General's Plate Gauntlets](https://classicdb.ch/?item=16548)
82 |  [Rage of Mugamba](https://classicdb.ch/?item=19577)
83 |
84 | #### Situational
85 |  [Insignia of the Alliance](https://classicdb.ch/?item=18854)
86 |  [Insignia of the Horde](https://classicdb.ch/?item=18834)
87 |  [Spider Belt](https://classicdb.ch/?item=4328)
88 |  [Ornate Mithril Boots](https://classicdb.ch/?item=7936)
89 |  [Tidal Charm](https://classicdb.ch/?item=1404)
90 |  [Linken's Boomerang](https://classicdb.ch/?item=11905)
91 |  [Heart of Noxxion](https://classicdb.ch/?item=17744)
92 |
93 | ### Consumables
94 | *  [Elixir of Poison Resistance](https://classicdb.ch/?item=3386)
95 | *  [Juju Chill](https://classicdb.ch/?item=12457) (Only on Kel'Thuzad and Sapphiron)
96 | *  [Juju Ember](https://classicdb.ch/?item=12455)
97 | *  [Juju Flurry](https://classicdb.ch/?item=12450)
98 | *  [Juju Might](https://classicdb.ch/?item=12460) (Doesn't overrride  [Winterfall Firewater](https://classicdb.ch/?item=12820))
99 | *  [Juju Power](https://classicdb.ch/?item=12451) (Doesn't overrride  [Elixir of Giants](https://classicdb.ch/?item=9206))
100 | *  [Jungle Remedy](https://classicdb.ch/?item=2633)
101 | *  [Oil of Immolation](https://classicdb.ch/?item=8956)
102 | *  [Powerful Anti-Venom](https://classicdb.ch/?item=19440)
103 | *  [Purification Potion](https://classicdb.ch/?item=13462)
104 | *  [Restorative Potion](https://classicdb.ch/?item=9030)
105 |
106 | ### operational Control
107 | ```
108 | /fury - uses Fury
109 | /fury block - Enter Defensive Stance and do Shield Block
110 | /fury charge - uses Intercept or Charge sequence
111 | /fury shoot - fires ranged weapon
112 | /fury aoe - enables cleave and whirlwind, disables overpower, bloodhtirst, Heroic Strike (Switched off when fewer than 2 enemies)
113 | /fury toggle - toggles Fury on/off
114 | /fury threat - enables Cleave or Heroic Strike based on current settings, use on threat critical fights to decrease threat build up
115 | /fury juju flurry|power|might|ember|chill - enables buff on every cooldown, chill only on Kel'Thuzad and Sapphiron
116 | /fury prot - enables shield block and sunder and makes Defensive Stance default stance.
117 | /fury ooi - enables Oil of Immolation whenever OoI buff is not up
118 | /fury Earthstrike - toggles use of Earthstrike on every cooldown
119 | /fury Slayer's Crest - toggles use of Slayer's Crest on every cooldown
120 | /fury kots - toggles use of KotS on every cooldown
121 | /fury ability - toggles the use of abilities. Must use correct names with capitalization, ie. Heroic Strike, Rend etc.
122 | /fury attack - toggles the use of auto select target.
123 | /fury cons - will report enabled consumables
124 | ```
125 | ### Setup commands
126 | ```
127 | /fury dance - sets rage allowed to be wasted when switching stance ("dancing")
128 | /fury attackrage - sets minimum rage required when using Heroic Strike or Cleave
129 | /fury rage - sets maximum rage allowed when using abilities to gain rage
130 | /fury bloodrage - sets minimum percent of health required when using Bloodrage
131 | /fury debuff - Try remove debuff in rotation, might use consumables
132 | /fury default - Reset all configuration settings to default
133 | /fury flurrytrigger - Set rage level, when to start using Hamstring when Flurry isn't up
134 | /fury hamstring - sets maximum percent of health allowed when using Hamstring on NPCs
135 | /fury berserk - sets minimum percent of health required when using Berserk
136 | /fury deathwish - sets minimum percent of health required when using Death Wish
137 | /fury demodiff - If Target is x levels below Demoralizing Shout is not used
138 | /fury executeswap - Toggles use of Outfitter addon, name the item set 'Execute'.
139 | /fury stance - sets stance to return to after switching stance. If default is selected it will return to your last used stance. If no stance is selected it will disable stance switching. Must use correct names with capitalization.
140 | /fury talents - Rescan range spells and talent tree (needed after action bar buttons have moved)
141 | ```
142 | Oufitter addon can be downloaded [here](https://github.com/isitLoVe/Outfitter)!
143 |
144 | ### Debugging
145 | ```
146 | /fury help [command] - prints help text
147 | /fury debug - toggles debug mode
148 | /fury distance - show distance to target
149 | /fury log [on|off] - Start a new channel for logging commands will be saved to Logs folder
150 | /fury unit [player|target] - shows buffs and debuffs for player or target
151 | /fury where - info about whereabouts
152 | ```
--------------------------------------------------------------------------------
/Localization.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | Fury - English Localization
3 | Extended by: Cubenicke
4 | By: Bhaerau
5 | ]]--
6 |
7 | BINDING_NAME_FURY = "Attack"
8 | BINDING_NAME_FURY_AOE = "Toggle AoE"
9 | BINDING_NAME_FURY_WW = "Toggle Whirlwind"
10 | BINDING_NAME_FURY_THREAT = "Toggle HS or Cleave"
11 | BINDING_NAME_FURY_DW = "Toggle Death Wish"
12 | BINDING_HEADER_FURY = "Fury"
13 | BINDING_NAME_FURY_CHARGE = "Charge"
14 | BINDING_NAME_FURY_BLOCK = "Block"
15 | BINDING_NAME_FURY_SHOOT = "Shoot"
16 | BINDING_NAME_FURY_AUTOATTACK = "Auto Attack"
17 | BINDING_NAME_FURY_TANKMODE = "Toggle Tank setup"
18 | BINDING_NAME_FURY_DEMOSHOUT = "Toggle Demoralizing Shout"
19 |
20 | CLASS_DRUID_FURY = "Druid"
21 | CLASS_HUNTER_FURY = "Hunter"
22 | CLASS_MAGE_FURY = "Mage"
23 | CLASS_PALADIN_FURY = "Paladin"
24 | CLASS_PRIEST_FURY = "Priest"
25 | CLASS_ROGUE_FURY = "Rogue"
26 | CLASS_SHAMAN_FURY = "Shaman"
27 | CLASS_WARLOCK_FURY = "Warlock"
28 | CLASS_WARRIOR_FURY = "Warrior"
29 |
30 | RACE_ORC = "Orc"
31 | RACE_TROLL = "Troll"
32 | RACE_DWARF = "Dwarf"
33 |
34 | ABILITY_BATTLE_SHOUT_FURY = "Battle Shout"
35 | ABILITY_BATTLE_STANCE_FURY = "Battle Stance"
36 | ABILITY_BERSERKER_RAGE_FURY = "Berserker Rage"
37 | ABILITY_BERSERKER_STANCE_FURY = "Berserker Stance"
38 | ABILITY_BLOODRAGE_FURY = "Bloodrage"
39 | ABILITY_BLOODTHIRST_FURY = "Bloodthirst"
40 | --ABILITY_CHALLENGING_SHOUT_FURY = "Challenging Shout"
41 | ABILITY_CHARGE_FURY = "Charge"
42 | ABILITY_CLEAVE_FURY = "Cleave"
43 | --ABILITY_CONCUSSION_BLOW_FURY = "Concussion Blow"
44 | ABILITY_DEATH_WISH_FURY = "Death Wish"
45 | ABILITY_DEFENSIVE_STANCE_FURY = "Defensive Stance"
46 | ABILITY_DEMORALIZING_SHOUT_FURY = "Demoralizing Shout"
47 | ABILITY_DISARM_FURY = "Disarm"
48 | ABILITY_EXECUTE_FURY = "Execute"
49 | ABILITY_HAMSTRING_FURY = "Hamstring"
50 | ABILITY_HEROIC_STRIKE_FURY = "Heroic Strike"
51 | ABILITY_INTERCEPT_FURY = "Intercept"
52 | --ABILITY_INTIMIDATING_SHOUT_FURY = "Intimidating Shout"
53 | --ABILITY_LAST_STAND_FURY = "Last Stand"
54 | --ABILITY_MOCKING_BLOW_FURY = "Mocking Blow"
55 | ABILITY_MORTAL_STRIKE_FURY = "Mortal Strike"
56 | ABILITY_OVERPOWER_FURY = "Overpower"
57 | ABILITY_PIERCING_HOWL_FURY = "Piercing Howl"
58 | ABILITY_PUMMEL_FURY = "Pummel"
59 | --ABILITY_RECKLESSNESS_FURY = "Recklessness"
60 | ABILITY_REND_FURY = "Rend"
61 | --ABILITY_RETALIATION_FURY = "Retaliation"
62 | ABILITY_REVENGE_FURY = "Revenge"
63 | ABILITY_SHIELD_BASH_FURY = "Shield Bash"
64 | ABILITY_SHIELD_BLOCK_FURY = "Shield Block"
65 | ABILITY_SHIELD_SLAM_FURY = "Shield Slam"
66 | --ABILITY_SHIELD_WALL_FURY = "Shield Wall"
67 | --ABILITY_SLAM_FURY = "Slam"
68 | ABILITY_SHOOT_BOW_FURY = "Shoot Bow"
69 | ABILITY_SHOOT_CROSSBOW_FURY = "Shoot Crossbow"
70 | ABILITY_SHOOT_GUN_FURY = "Shoot Gun"
71 | ABILITY_STONEFORM_FURY = "Stoneform"
72 | ABILITY_SUNDER_ARMOR_FURY = "Sunder Armor"
73 | ABILITY_SWEEPING_STRIKES_FURY = "Sweeping Strikes"
74 | --ABILITY_TAUNT_FURY = "Taunt"
75 | ABILITY_THUNDER_CLAP_FURY = "Thunder Clap"
76 | ABILITY_THROW_FURY = "Throw"
77 | ABILITY_WHIRLWIND_FURY = "Whirlwind"
78 |
79 | RACIAL_BERSERKING_FURY = "Berserking"
80 | RACIAL_BLOOD_FURY = "Blood Fury"
81 | RACIAL_STONEFORM_FURY = "Stoneform"
82 |
83 | CHAT_OVERPOWER1_FURY = "You attack.(.+) dodges."
84 | CHAT_OVERPOWER2_FURY = "Your (.+) was dodged by (.+)."
85 | CHAT_OVERPOWER3_FURY = "Your Overpower crits (.+) for (%d+)."
86 | CHAT_OVERPOWER4_FURY = "Your Overpower hits (.+) for (%d+)."
87 | CHAT_OVERPOWER5_FURY = "Your Overpower missed (.+)."
88 | CHAT_RUNNER_FURY = "%s attempts to run away in fear!"
89 | CHAT_CAST_FURY = "(.+) begins to cast (.+)."
90 | CHAT_INTERRUPT1_FURY = "You interrupt (.+)."
91 | CHAT_INTERRUPT2_FURY = "Your Pummel was (.+) by (.+)."
92 | CHAT_INTERRUPT3_FURY = "Your Shield Bash was (.+) by (.+)."
93 | CHAT_INTERRUPT4_FURY = "Your Pummel missed (.+)."
94 | CHAT_INTERRUPT5_FURY = "Your Shield Bash missed (.+)."
95 | CHAT_WHIRLWIND_FURY = "Your Whirlwind (.+)."
96 | CHAT_CLEAVE_FURY = "Your Cleave (.+)."
97 | CHAT_DODGE_FURY = "You dodge"
98 | CHAT_PARRY_FURY = "You parry"
99 | CHAT_BLOCK_FURY = "You block"
100 | CHAT_FEAR_FURY = "You are afflicted by Fear."
101 | CHAT_INTIMIDATING_SHOUT_FURY = "You are afflicted by Intimidating Shout."
102 | CHAT_PSYCHIC_SCREAM_FURY = "You are afflicted by Psychic Scream."
103 | CHAT_PANIC_FURY = "You are afflicted by Panic."
104 | CHAT_BELLOWING_ROAR_FURY = "You are afflicted by Bellowing Roar."
105 | CHAT_ANCIENT_DESPAIR_FURY = "You are afflicted by Ancient Despair."
106 | CHAT_TERRIFYING_SCREECH_FURY = "You are afflicted by Terrifying Screech."
107 | CHAT_HOWL_OF_TERROR_FURY = "You are afflicted by Howl of Terror."
108 | CHAT_SAP_FURY = "You are afflicted by Sap."
109 | CHAT_GOUGE_FURY = "You are afflicted by Gouge."
110 | CHAT_REPENTANCE_FURY = "You are afflicted by Repentance."
111 | CHAT_ROCKET_HELM_FURY = "You are afflicted by Reckless Charge."
112 | CHAT_FEAR2_FURY = "Fear fades from you."
113 | CHAT_INTIMIDATING_SHOUT2_FURY = "Intimidating Shout fades from you."
114 | CHAT_PSYCHIC_SCREAM2_FURY = "Psychic Scream fades from you."
115 | CHAT_PANIC2_FURY = "Panic fades from you."
116 | CHAT_BELLOWING_ROAR2_FURY = "Bellowing Roar fades from you."
117 | CHAT_ANCIENT_DESPAIR2_FURY = "Ancient Despair fades from you."
118 | CHAT_TERRIFYING_SCREECH2_FURY = "Terrifying Screech fades from you."
119 | CHAT_HOWL_OF_TERROR2_FURY = "Howl of Terror fades from you."
120 | CHAT_SAP2_FURY = "Sap fades from you."
121 | CHAT_GOUGE2_FURY = "Gouge fades from you."
122 | CHAT_REPENTANCE2_FURY = "Repentance fades from you."
123 | CHAT_ROCKET_HELM2_FURY = "Reckless Charge fades from you."
124 | CHAT_LOST_FLURRY_FURY = "Flurry fades from you."
125 | CHAT_GAINED_FLURRY_FURY = "You gain Flurry."
126 | CHAT_DISARM_IMMUNE_FURY = "Your Disarm failed. (.+) is immune."
127 |
128 | ITEM_GAUNTLETS1_FURY = "Knight-Lieutenant's Plate Gauntlets"
129 | ITEM_GAUNTLETS2_FURY = "Marshal's Plate Gauntlets"
130 | ITEM_GAUNTLETS3_FURY = "Blood Guard's Plate Gloves"
131 | ITEM_GAUNTLETS4_FURY = "General's Plate Gauntlets"
132 | ITEM_TRINKET_INSIGNIA_OF_THE_ALLIANCE_FURY = "Insignia of the Alliance"
133 | ITEM_TRINKET_INSIGNIA_OF_THE_HORDE_FURY = "Insignia of the Horde"
134 | ITEM_TRINKET_LINKENS_BOOMERANG_FURY = "Linken's Boomerang"
135 | ITEM_TRINKET_TIDAL_CHARM = "Tidal Charm"
136 | ITEM_TRINKET_EARTHSTRIKE = "Earthstrike"
137 | ITEM_TRINKET_KOTS = "Kiss of the Spider"
138 | ITEM_TRINKET_SLAYERS_CREST = "Slayer's Crest"
139 | ITEM_TRINKET_HEART_OF_NOXXION = "Heart of Noxxion"
140 | ITEM_NECK_RAGE_OF_MUGAMBA_FURY = "Rage of Mugamba"
141 | ITEM_BELT_SPIDER_BELT_FURY = "Spider Belt"
142 | ITEM_BOOTS_ORNATE_MITHRIL_BOOTS_FURY = "Ornate Mithril Boots"
143 |
144 | ITEM_TYPE_SHIELDS_FURY = "Shields"
145 | ITEM_TYPE_BOWS_FURY = "Bows"
146 | ITEM_TYPE_CROSSBOWS_FURY = "Crossbows"
147 | ITEM_TYPE_GUNS_FURY = "Guns"
148 | ITEM_TYPE_THROWN_FURY = "Thrown"
149 |
150 | ITEM_DEBUFF_TYPE_POISON = "Poison"
151 | ITEM_DEBUFF_TYPE_DISEASE = "Disease"
152 | ITEM_DEBUFF_TYPE_CURSE = "Curse"
153 | ITEM_DEBUFF_TYPE_MAGIC = "Magic"
154 |
155 | ITEM_CONS_JUJU_FLURRY = "Juju Flurry"
156 | ITEM_CONS_JUJU_POWER = "Juju Power"
157 | ITEM_CONS_JUJU_MIGHT = "Juju Might"
158 | ITEM_CONS_JUJU_EMBER = "Juju Ember"
159 | ITEM_CONS_JUJU_CHILL = "Juju Chill"
160 | ITEM_CONS_OIL_OF_IMMOLATION = "Oil of Immolation"
161 | ITEM_CONS_JUNGLE_REMEDY = "Jungle Remedy"
162 | ITEM_CONS_POWERFUL_ANTIVENOM = "Powerful Anti-Venom"
163 | ITEM_CONS_ELIXIR_OF_POISION_RESISTANCE = "Elixir of Poison Resistance"
164 | ITEM_CONS_PURIFICATION_POTION = "Purification Potion"
165 |
166 | BOSS_NAX_GOTHIK_THE_HARVESTER_FURY = "Gothik the Harvester"
167 | BOSS_NAX_GRAND_WIDOW_FAERLINA_FURY = "Grand Widow Faerlina"
168 | BOSS_NAX_GROBBULUS_FURY = "Grobbulus"
169 | BOSS_NAX_HEIGAN_THE_UNCLEAN_FURY = "Heigan the Unclean"
170 | BOSS_NAX_KEL_THUZAD_FURY = "Kel'Thuzad"
171 | BOSS_NAX_LADY_BLAUMEUX_FURY = "Lady Blaumeux"
172 | BOSS_NAX_LOATHEB_FURY = "Loatheb"
173 | BOSS_NAX_SAPPHIRON_FURY = "Sapphiron"
174 | BOSS_NAX_SIR_ZELIEK_FURY = "Sir Zeliek"
175 | BOSS_NAX_THANE_KORTH_AZZ_FURY = "Thane Korth'azz"
176 | BOSS_AQ40_EMPEROR_VEK_LOR_FURY = "Emperor Vek'lor"
177 | BOSS_AQ40_PRINCE_HUHURAN_FURY = "Princess Huhuran"
178 | BOSS_AQ40_THE_PROPHET_SKERAM_FURY = "The Prophet Skeram"
179 | BOSS_AQ40_VISCIDUS_FURY = "Viscidus"
180 | BOSS_MC_MAGMADAR_FURY = "Magmadar"
181 | BOXX_MC_RAGNAROS_FURY = "Ragnaros"
182 | BOSS_MC_SHAZZRATH_FURY = "Shazzrath"
183 | BOSS_ONYXIA_FURY = "Onyxia"
184 | BOSS_STRAT_BARON_RIVENDERE_FURY = "Baron Rivendare"
185 |
186 | MODE_HEADER_AOE = "AoE"
187 | MODE_HEADER_DEBUFF = "Debuff"
188 | MODE_HEADER_PROT = "Prot"
189 |
190 | SLASH_FURY_ATTACKRAGE = "Minimum rage required when using Heroic Strike or Cleave set to dump rage "
191 | SLASH_FURY_AUTOATTACK = "Autoattack"
192 | SLASH_FURY_DANCE = "Rage allowed to be wasted when switching stance set to "
193 | SLASH_FURY_DEBUG = "Debug"
194 | SLASH_FURY_DEMODIFF = "Max target difference in levels for using Demoralizing Shout is set to "
195 | SLASH_FURY_VERSION = "Version"
196 | SLASH_FURY_RAGE = "Maximum rage when using rage increasing abilities "
197 | SLASH_FURY_BLOODRAGE = "Minimum percent of health required when using Bloodrage set to "
198 | SLASH_FURY_DEATHWISH = "Minimum percent of health required when using Death Wish set to "
199 | SLASH_FURY_HAMSTRING = "Maximum percent of health allowed when using Hamstring on NPCs set to "
200 | SLASH_FURY_LOWTHREAT = "Low threat enabled, enabled Cleave."
201 | SLASH_FURY_HIGHTHREAT = "High threat enabled, enabled Heroic Strike."
202 | SLASH_FURY_HELP = "use /fury help to get more help, commands are: "
203 | SLASH_FURY_TROLL = "Maximum percent of health allowed when using Berserking set to "
204 | SLASH_FURY_STANCE = "Primary stance set to "
205 | SLASH_FURY_NOSTANCE = "Stance switching "
206 |
207 | TEXT_FURY_ENABLED = "enabled"
208 | TEXT_FURY_DISABLED = "disabled"
209 | TEXT_FURY_DEFAULT = "default"
210 | TEXT_FURY_DISTANCE = "Distance"
211 | TEXT_FURY_YARDS = "yards"
212 | TEXT_FURY_NO_ATTACKABLE_TARGET = "You need to have an attackable target"
213 | TEXT_FURY_NOT_FOUND = "not found"
214 | TEXT_FURY_DISABLING_AOE = "AoE disabled."
215 | TEXT_FURY_IMMUNE_TO_DISARM1 = "Added "
216 | TEXT_FURY_IMMUNE_TO_DISARM2 = " to immune disarm list"
217 | TEXT_FURY_FLURRY = "Flurry: "
218 | TEXT_FURY_LOGGING_CHANNEL_ON = "Logging to channel turned on"
219 | TEXT_FURY_LOGGING_CHANNEL_OFF = "Logging to channel turned off"
220 | TEXT_FURY_HAVE_DEBUFF = "Have treatable debuff"
221 | TEXT_FURY_MAP_ZONETEXT = "GetMinimapZoneText "
222 | TEXT_FURY_REAL_ZONETEXT = "GetRealZoneText "
223 | TEXT_FURY_SUB_ZONETEXT = "GetSubZoneText "
224 | TEXT_FURY_PVP_INFO = "GetZonePVPInfo "
225 | TEXT_FURY_ZONETEXT = "GetZoneText "
226 | TEXT_FURY_NAME = "Name: "
227 | TEXT_FURY_CLASS = " Class: "
228 | TEXT_FURY_CLASSIFICATION = " Classification: "
229 | TEXT_FURY_RACE = "Race: "
230 | TEXT_FURY_TYPE = "Type: "
231 |
232 | CHAT_IS_ON_CD_FURY = "is on CD, replace?"
233 | CHAT_DISABLING_AOE_FURY = "Disabling AoE"
234 | CHAT_BUFFS_FURY = "Buffs:"
235 | CHAT_DEBUFFS_FURY = "Debuffs:"
236 | CHAT_KICKED_FURY = "Kicked"
237 | CHAT_TALENTS_RESCAN_FURY = "Rescanning talent tree and actionbars"
238 | CHAT_MISSING_SPELL_SHOOT_THROW_FURY = "Missing spell on action bar Shoot or Throw"
239 | CHAT_MISSING_SPELL_INTERCEPT_CHARGE_FURY = "Missing spell on action bar Intercept or Charge"
240 | CHAT_MISSING_SPELL_THUNDERCLAP_FURY = "Missing spell on action bar Thunder Clap"
241 | CHAT_MISSING_SPELL_PUMMEL_FURY = "Missing spell on action bar (any close combat spell, like Pummel)"
242 |
243 | HELP_AOE = "/fury aoe - disables bloodthirst/mortal strike and enables Cleave"
244 | HELP_ATTACK = "/fury attack - toggles the use of autoattack. Experimental."
245 | HELP_ATTACKRAGE = "/fury attackrage - sets minimum rage required when using Heroic Strike or Cleave"
246 | HELP_ABILITY = "/fury ability - toggles the use of abilities. Must use correct names with capitalization, ie. Heroic Strike, Rend etc."
247 | HELP_BERSERK = "/fury berserk - sets minimum percent of health required when using Berserk"
248 | HELP_BLOCK = "/fury block - Shifts to defensive and activates block"
249 | HELP_BLOODRA = "/fury bloodrage - sets minimum percent of health required when using Bloodrage"
250 | HELP_CHARGE = "/fury charge - will use charge or intercept sequence"
251 | HELP_CONS = "/fury cons - will report enabled consumables"
252 | HELP_DANCE = "/fury dance - sets rage allowed to be wasted when switching stance (dancing)"
253 | HELP_DEBUFF = "/fury debuff - toggles use of debuff spells/cons"
254 | HELP_DEBUG = "/fury debug - writes commands in log"
255 | HELP_DEFAULT = "/fury default - Reset all settings to DEFAULT"
256 | HELP_DEMODIFF = "/fury demodiff - sets maximum level differrence to use Demoralizing Shout"
257 | HELP_DISTANCE = "/fury distance - Gives distance to target"
258 | HELP_EARTHSTRIKE = "/fury Earthstrike -- toggles use of trinket on every cooldown"
259 | HELP_EXECUTESWAP = "/fury executeswap -- toggles use of swap weapon when Execute is used (Uses Outfitter, Execute)"
260 | HELP_FLURRYTRIGGER = "/fury flurrytrigger - Set rage level, when to start using Hamstring when Flurry isn't up"
261 | HELP_HAMSTRING = "/fury hamstring - sets maximum percent of health allowed when using Hamstring on NPCs"
262 | HELP_HELP = "/fury help - outputs available commands"
263 | HELP_JUJU = "/fury juju - Supports flurry, power, might, chill and ember toggles use of the on cooldown"
264 | HELP_KOTS = "/fury kots - toggles use of trinket on every cooldown"
265 | HELP_LOG = "/fury log [on|off] - Create a channel and log to \\Logs\\WowChatLog.txt"
266 | HELP_OOI = "/fury ooi - toggle use of Oil of Immolation"
267 | HELP_PROT = "/fury prot - toggle default stance, sunder, revenge and shield block"
268 | HELP_RAGE = "/fury rage - sets maximum rage allowed when using abilities to gain rage"
269 | HELP_SHOOT = "/fury shoot - Fires equipped ranged weapon"
270 | HELP_SLAYERS_CREST = "/fury Slayer's Crest - toggle use of Slayer's Crest"
271 | HELP_STANCE = "/fury stance <1|2|3|name> - sets stance to return to after switching stance. If default is selected it will return to your last used stance. If no stance is selected it will disable stance switching. (Must use correct names with capitalization.)"
272 | HELP_TALENTS = "/fury talents - Rescan spells and talents (needed after movement in action bar)"
273 | HELP_THREAT = "/fury threat - enables Cleave or Heroic Strike based on current settings"
274 | HELP_TOGGLE = "/fury toggle - toggle if addon is active"
275 | HELP_UNIT = "/fury unit - debug info"
276 | HELP_UNKNOWN = "Unknown command /fury help - for list of commands"
277 | HELP_WHERE = "/fury where - debug info"
278 |
--------------------------------------------------------------------------------
/Fury.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | Fury
3 |
4 | Extended By: CubeNicke
5 | Originally By: Bhaerau
6 | ]]--
7 |
8 | --------------------------------------------------
9 | --
10 | -- Variables
11 | --
12 | --------------------------------------------------
13 | -- Setup configuration to default or only new ones
14 | local function DoUpdateConfiguration(defaults)
15 | local configs = {
16 |
17 | {"AutoAttack", true}, -- Set to false to disable auto-attack
18 | {"BerserkHealth", 60}, -- Set this to the minimum percent of health to have when using Berserk
19 | {"BloodrageHealth", 50}, -- Set this to the minimum percent of health to have when using Bloodrage
20 | {"DeathWishHealth", 60}, -- Set this to the minimum percent of health to have when using Death Wish
21 | {"Debug", false}, -- Set to true to enable debugging feedback
22 | {"DebugChannel", nil}, -- Channel to log to
23 | {"DemoDiff", 7}, -- When level difference is greater don't do Demoralizing Shout
24 | {"Enabled", true}, -- Set to false to disable the addon
25 | {"ExecuteSwap", false}, -- Swap weapon at execute
26 | {"ExecuteSwapped", false}, -- If execute outfit is equipped
27 | {"FlurryTriggerRage", 52}, -- Set this to the minimum rage to use Hamtring to trigger Flurry
28 | {"HamstringHealth", 40}, -- Set this to the maximum percent of health allowed when using Hamstring on NPCs
29 | {"InstantBuildTime", 2}, -- Set the time to spend building rage for upcoming 31 point instant attacks
30 | {"MaximumRage", 60}, -- Set this to the maximum amount of rage allowed when using abilities to increase rage
31 | {"NextAttackRage", 30}, -- Set this to the minimum rage to have to use next attack abilities (Cleave and Heroic Strike)
32 | {"StanceChangeRage", 25}, -- Set this to the amount of rage allowed to be wasted when switching stances
33 | {"PrimaryStance", false}, -- Set this to the stance to fall back to after performing an attack requiring another stance
34 |
35 | {MODE_HEADER_PROT, false }, -- Use threat and defensive abilities
36 | {MODE_HEADER_AOE, false}, -- Disable auto use of aoe (Disables OP, HS, BT, Exe, Enablse Cleave, Whirlwind)
37 | {MODE_HEADER_DEBUFF, false}, -- use cures when player have a debuff
38 |
39 | {ABILITY_BATTLE_SHOUT_FURY, true}, -- Set to false to disable use of ability
40 | {ABILITY_BERSERKER_RAGE_FURY, true}, -- Used to counter fears
41 | {ABILITY_BLOODRAGE_FURY, true}, -- Gives extra rage
42 | {ABILITY_BLOODTHIRST_FURY, true}, -- Fury main attack
43 | {ABILITY_CHARGE_FURY, true}, -- Charge when out of combat
44 | {ABILITY_CLEAVE_FURY, false}, -- Cleave to lower threat and on used in aoe situations
45 | {ABILITY_DEMORALIZING_SHOUT_FURY, true}, -- Decreases enemy attack power
46 | {ABILITY_DISARM_FURY, true}, -- Used in pvp against hard hitters
47 | {ABILITY_EXECUTE_FURY, true}, -- Execute
48 | {ABILITY_HAMSTRING_FURY, true}, -- Hamstring
49 | {ABILITY_PIERCING_HOWL_FURY, true}, -- Piercing Howl
50 | {ABILITY_HEROIC_STRIKE_FURY, true}, -- HS, to dump rage and at low levels
51 | {ABILITY_INTERCEPT_FURY, true}, -- in combat charge
52 | {ABILITY_MORTAL_STRIKE_FURY, true}, -- Arms main attack
53 | {ABILITY_SWEEPING_STRIKES_FURY, true}, -- Aoe for arms
54 | {ABILITY_OVERPOWER_FURY, true}, -- Counterattack dodge
55 | {ABILITY_PUMMEL_FURY, true}, -- Counter spellcast
56 | {ABILITY_REND_FURY, true}, -- Counter rogues vanish
57 | {ABILITY_SHIELD_BASH_FURY, true}, -- Prot
58 | {ABILITY_SHIELD_SLAM_FURY, true}, -- Prot
59 | {ABILITY_DEATH_WISH_FURY, true}, -- Death wish on cooldown
60 | {ABILITY_THUNDER_CLAP_FURY, true}, -- slow enemies
61 | {ABILITY_WHIRLWIND_FURY, true}, -- Fury rotation and aoe
62 | {ABILITY_REVENGE_FURY, false}, -- Prot
63 |
64 | {ITEM_CONS_JUJU_CHILL, true}, -- use on cooldown for bosses with frost dmg
65 | {ITEM_CONS_JUJU_EMBER, true}, -- use on cooldown for bosses with fire dmg
66 | {ITEM_CONS_JUJU_FLURRY, false}, -- use on cooldown
67 | {ITEM_CONS_JUJU_MIGHT, false}, -- use on cooldown
68 | {ITEM_CONS_JUJU_POWER, false}, -- use on cooldown
69 | {ITEM_CONS_OIL_OF_IMMOLATION, false}, -- use on cooldown
70 |
71 | {ITEM_TRINKET_EARTHSTRIKE, true}, -- use on cooldown
72 | {ITEM_TRINKET_KOTS, true}, -- use on cooldown
73 | {ITEM_TRINKET_SLAYERS_CREST, true}, -- use on cooldown
74 |
75 | {RACIAL_BERSERKING_FURY, true}, -- Racial
76 | {RACIAL_BLOOD_FURY, true}, -- Racial
77 | {RACIAL_STONEFORM_FURY, true}, -- Racial
78 | }
79 |
80 | for _, v in pairs(configs) do
81 | if defaults
82 | or Fury_Configuration[v[1]] == nil then
83 | Fury_Configuration[v[1]] = v[2]
84 | end
85 | end
86 | end
87 |
88 | --------------------------------------------------
89 | -- Init function
90 | local function Fury_Configuration_Init()
91 |
92 | FURY_VERSION = "1.17.4"
93 |
94 | if not Fury_Configuration then
95 | Fury_Configuration = { }
96 | end
97 | if not Fury_Runners then
98 | Fury_Runners = { }
99 | end
100 | if not Fury_ImmuneDisarm then
101 | Fury_ImmuneDisarm = { }
102 | end
103 | DoUpdateConfiguration(false) -- Set to value if nil
104 | end
105 |
106 | --------------------------------------------------
107 | --
108 | -- Normal Functions
109 | --
110 | --------------------------------------------------
111 | -- Print msg to console
112 | local function Print(msg)
113 | if not DEFAULT_CHAT_FRAME then
114 | return
115 | end
116 | DEFAULT_CHAT_FRAME:AddMessage(BINDING_HEADER_FURY..": "..(msg or ""))
117 | end
118 |
119 | --------------------------------------------------
120 | -- Output debug info to console
121 | local function Debug(msg)
122 | if (msg
123 | or "") == "" then
124 | FuryRageDumped = nil
125 | return
126 | end
127 | if Fury_Configuration
128 | and Fury_Configuration["Debug"] then
129 | Print(msg)
130 | end
131 | if Fury_Configuration["DebugChannel"]
132 | and UnitLevel("player") >= 10 then
133 | if GetTime() > FuryLastLog + 0.1 then
134 | SendChatMessage(msg..(FuryLogMsg or ""), "CHANNEL", nil, Fury_Configuration["DebugChannel"])
135 | FuryLastLog = GetTime()
136 | FuryLogMsg = nil
137 | else
138 | FuryLogMsg = (FuryLogMsg or "")..", "..msg
139 | end
140 | end
141 | FuryRageDumped = nil
142 | end
143 |
144 | --------------------------------------------------
145 | -- Log fury debug to channel and log file
146 | local function LogToFile(enable)
147 | if enable then
148 | LoggingChat(1)
149 | LoggingCombat(1)
150 | if Fury_Configuration["DebugChannel"] == nil then
151 | local channel = "Fury_"..tostring(GetTime() * 1000)
152 | JoinChannelByName(channel, "test", nil, 1)
153 | local id, _ = GetChannelName(channel)
154 | Fury_Configuration["DebugChannel"] = id
155 | else
156 | local _, channel = GetChannelName(Fury_Configuration["DebugChannel"])
157 | if channel ~= nil then
158 | Print("Joining channel : "..channel)
159 | JoinChannelByName(channel, "test", nil, 1)
160 | else
161 | Fury_Configuration["DebugChannel"] = nil
162 | LogToFile(enable)
163 | end
164 | end
165 | Print(TEXT_FURY_LOGGING_CHANNEL_ON)
166 | else
167 | LoggingChat(0)
168 | LoggingCombat(0)
169 | Fury_Configuration["DebugChannel"] = nil
170 | Print(TEXT_FURY_LOGGING_CHANNEL_OFF)
171 | end
172 | end
173 |
174 | --------------------------------------------------
175 | -- Check if unit has debuff of specific type
176 | local function HasDebuffType(unit, type)
177 | local id = 1
178 | if not type then
179 | return nil
180 | end
181 | while UnitDebuff(unit, id) do
182 | local _,_,debuffType = UnitDebuff(unit, id)
183 | if type
184 | and debuffType == type then
185 | return true
186 | end
187 | id = id + 1
188 | end
189 | return nil
190 | end
191 |
192 | --------------------------------------------------
193 |
194 | local function DoShapeShift(stance)
195 | local stances = {ABILITY_BATTLE_STANCE_FURY, ABILITY_DEFENSIVE_STANCE_FURY, ABILITY_BERSERKER_STANCE_FURY}
196 | CastShapeshiftForm(stance)
197 | FuryLastStanceCast = GetTime()
198 | Debug("Changed to "..stances[stance])
199 | end
200 |
201 | --------------------------------------------------
202 | -- Print unit buffs and debuffs
203 | local function PrintEffects(unit)
204 | local id = 1
205 | if UnitBuff(unit, id) then
206 | Print(SLASH_BUFFS_FURY)
207 | while (UnitBuff(unit, id)) do
208 | Print(UnitBuff(unit, id))
209 | id = id + 1
210 | end
211 | id = 1
212 | end
213 | if HasDebuffType(unit) then
214 | Print(TEXT_FURY_HAVE_DEBUFF)
215 | end
216 | if UnitDebuff(unit, id) then
217 | Print(CHAT_DEBUFFS_FURY)
218 | while UnitDebuff(unit, id) do
219 | Print(UnitDebuff(unit, id))
220 | id = id + 1
221 | end
222 | end
223 | end
224 |
225 | --------------------------------------------------
226 | -- list of targets where resistance is useful
227 | local res = {
228 | ["fire"] = {
229 | BOSS_NAX_GRAND_WIDOW_FAERLINA_FURY,
230 | BOSS_NAX_THANE_KORTH_AZZ_FURY,
231 | BOXX_MC_RAGNAROS_FURY,
232 | BOSS_ONYXIA_FURY
233 | },
234 | ["frost"] = {
235 | BOSS_NAX_KEL_THUZAD_FURY,
236 | BOSS_NAX_SAPPHIRON_FURY
237 | },
238 | ["nature"] = {
239 | BOSS_NAX_HEIGAN_THE_UNCLEAN_FURY,
240 | BOSS_NAX_LOATHEB_FURY,
241 | BOSS_AQ40_PRINCESS_HUHURAN_FURY,
242 | BOSS_AQ40_VISCIDUS_FURY,
243 | },
244 | ["shadow"] = {
245 | BOSS_NAX_LOATHEB_FURY,
246 | BOSS_STRAT_BARON_RIVENDERE_FURY,
247 | BOSS_NAX_LADY_BLAUMEUX_FURY
248 | },
249 | ["arcane"] = {
250 | BOSS_NAX_GOTHIK_THE_HARVESTER_FURY,
251 | BOSS_AQ40_THE_PROPHET_SKERAM_FURY,
252 | BOSS_AQ40_EMPEROR_VEK_LOR_FURY,
253 | BOSS_MC_SHAZZRATH_FURY
254 | },
255 | ["holy"] = {
256 | BOSS_NAX_SIR_ZELIEK_FURY
257 | }
258 | }
259 |
260 | --------------------------------------------------
261 | -- Check if boss 'requires' resistance of specific type
262 | local function IsUseRes(type)
263 | for _, name in pairs(res[type]) do
264 | if UnitName("target") == name then
265 | return true
266 | end
267 | end
268 | return false
269 | end
270 |
271 | --------------------------------------------------
272 | --
273 | -- Distance handling
274 | --
275 | --------------------------------------------------
276 | -- Detect spells on action bars, to be used for range checks
277 | local function Fury_InitDistance()
278 | local found = 0
279 | yard30 = nil
280 | yard25 = nil
281 | yard10 = nil
282 | yard08 = nil
283 | yard05 = nil
284 | for i = 1, 120 do
285 | t = GetActionTexture(i)
286 | if t then
287 | if not yard30 then
288 | if string.find(t, "Ability_Marksmanship") -- Shoot
289 | or string.find(t, "Ability_Throw") then -- Throw
290 | yard30 = i
291 | Debug("30 yard: "..t)
292 | found = found + 1
293 | end
294 | end
295 | if not yard25 then
296 | if string.find(t, "Ability_Warrior_Charge") -- Charge
297 | or string.find(t, "Ability_Rogue_Sprint") then -- Intercept
298 | yard25 = i
299 | Debug("25 yard: "..t)
300 | found = found + 1
301 | end
302 | end
303 | if not yard10 then
304 | if string.find(t, "Ability_GolemThunderClap")
305 | or string.find(t, "Spell_Nature_ThunderClap") then -- Thunder Clap
306 | yard10 = i
307 | Debug("10 yard: "..t)
308 | found = found + 1
309 | end
310 | end
311 | if not yard08 then
312 | if string.find(t, "Ability_Marksmanship") -- Shoot
313 | or string.find(t, "Ability_Throw") then -- Throw
314 | yard08 = i
315 | Debug("8 yard: "..t)
316 | found = found + 1
317 | end
318 | end
319 | if not yard05 then
320 | if string.find(t, "Ability_Warrior_Sunder") -- Sunder Armor
321 | or string.find(t, "Ability_Warrior_DecisiveStrike") -- Slam
322 | or string.find(t, "Ability_Warrior_Disarm") -- Disarm
323 | or string.find(t, "INV_Gauntlets_04") -- Pummel
324 | or string.find(t, "Ability_MeleeDamage") -- Overpower
325 | or string.find(t, "Ability_Warrior_PunishingBlow") -- Mocking blow
326 | or string.find(t, "Ability_Warrior_Revenge") -- Revenge
327 | or string.find(t, "Ability_Gouge") -- Rend
328 | or string.find(t, "INV_Sword_48") -- Execute
329 | or string.find(t, "ability_warrior_savageblow") -- Mortal Strike
330 | or string.find(t, "INV_Shield_05") -- Shield Slam
331 | or string.find(t, "Ability_ShockWave") -- Hamtstring
332 | or string.find(t, "Spell_Nature_Bloodlust") then -- Bloodthirst
333 | yard05 = i
334 | Debug("5 yard: "..t)
335 | found = found + 1
336 | end
337 | end
338 | if found == 5 then
339 | Debug("Found all distance check spells ("..i..")")
340 | return
341 | end
342 | end
343 | end
344 | -- Print message if any distance check spell is missing
345 | if not yard30
346 | or not yard08 then
347 | Print(CHAT_MISSING_SPELL_SHOOT_THROW_FURY)
348 | end
349 | if not yard25 then
350 | Print(CHAT_MISSING_SPELL_INTERCEPT_CHARGE_FURY)
351 | end
352 | if not yard10 then
353 | Print(CHAT_MISSING_SPELL_THUNDERCLAP_FURY)
354 | end
355 | if not yard05 then
356 | Print(CHAT_MISSING_SPELL_PUMMEL_FURY)
357 | end
358 | end
359 |
360 | --------------------------------------------------
361 | -- Detect distance to target
362 | local function Fury_Distance()
363 | if not UnitCanAttack("player", "target") then
364 | return 100 -- invalid target
365 | elseif yard05
366 | and IsActionInRange(yard05) == 1 then
367 | return 5 -- 0 - 5 yards
368 | elseif yard10
369 | and IsActionInRange(yard10) == 1 then
370 | if yard08
371 | and IsActionInRange(yard08) == 0 then
372 | return 7 -- 6 - 7 yards
373 | end
374 | return 10 -- 8 - 10 yards
375 | elseif yard25
376 | and IsActionInRange(yard25) == 1 then
377 | return 25 -- 11 - 25 yards
378 | elseif yard30
379 | and IsActionInRange(yard30) == 1 then
380 | return 30 -- 26 - 30 yards
381 | end
382 | return 100 -- 31 - yards
383 | end
384 |
385 | --------------------------------------------------
386 | -- Get spell id from name
387 | local function SpellId(spellname)
388 | local id = 1
389 | for i = 1, GetNumSpellTabs() do
390 | local _, _, _, numSpells = GetSpellTabInfo(i)
391 | for j = 1, numSpells do
392 | local spellName = GetSpellName(id, BOOKTYPE_SPELL)
393 | if spellName == spellname then
394 | return id
395 | end
396 | id = id + 1
397 | end
398 | end
399 | return nil
400 | end
401 |
402 | --------------------------------------------------
403 | -- Check remaining cooldown on spell (0 - Ready)
404 | local function IsSpellReadyIn(spellname)
405 | local id = SpellId(spellname)
406 | if id then
407 | local start, duration = GetSpellCooldown(id, 0)
408 | if start == 0
409 | and duration == 0
410 | and FuryLastSpellCast + 1 <= GetTime() then
411 | return 0
412 | end
413 | local remaining = duration - (GetTime() - start)
414 | if remaining >= 0 then
415 | return remaining
416 | end
417 | end
418 | return 86400 -- return max time (i.e not ready)
419 | end
420 |
421 | --------------------------------------------------
422 | -- Return if spell is ready
423 | local function IsSpellReady(spellname)
424 | return IsSpellReadyIn(spellname) == 0
425 | end
426 |
427 | --------------------------------------------------
428 | -- Detect if unit has specific number of debuffs
429 | local function HasDebuff(unit, texturename, amount)
430 | local id = 1
431 | while UnitDebuff(unit, id) do
432 | local debuffTexture, debuffAmount = UnitDebuff(unit, id)
433 | if string.find(debuffTexture, texturename) then
434 | if (amount
435 | or 1) <= debuffAmount then
436 | return true
437 | else
438 | return false
439 | end
440 | end
441 | id = id + 1
442 | end
443 | return nil
444 | end
445 |
446 | --------------------------------------------------
447 | -- Detect if unit has buff
448 | local function HasBuff(unit, texturename)
449 | local id = 1
450 | while UnitBuff(unit, id) do
451 | local buffTexture = UnitBuff(unit, id)
452 | if string.find(buffTexture, texturename) then
453 | return true
454 | end
455 | id = id + 1
456 | end
457 | return nil
458 | end
459 | --------------------------------------------------
460 | -- Detect if unit has buff id
461 | local function HasBuffId(unit, spellId)
462 | for i = 1, 40 do
463 | if select(11, UnitBuff(unit, i)) == spellid then
464 | return true
465 | end
466 | end
467 | return nil
468 | end
469 |
470 | --------------------------------------------------
471 | -- Use item on player
472 | local function UseContainerItemByNameOnPlayer(name)
473 | for bag = 0, 4 do
474 | for slot = 1,GetContainerNumSlots(bag) do
475 | local item = GetContainerItemLink(bag, slot)
476 | if item then
477 | local _, _, itemCode = strfind(item, "(%d+):")
478 | local itemName = GetItemInfo(itemCode)
479 | if itemName == name then
480 | UseContainerItem(bag, slot)
481 | if SpellIsTargeting() then
482 | SpellTargetUnit("player")
483 | end
484 | end
485 | end
486 | end
487 | end
488 | end
489 |
490 | --------------------------------------------------
491 | -- Return active stance
492 | local function GetActiveStance()
493 | --Detect the active stance
494 | for i = 1, 3 do
495 | local _, _, active = GetShapeshiftFormInfo(i)
496 | if active then
497 | return i
498 | end
499 | end
500 | return nil
501 | end
502 |
503 | --------------------------------------------------
504 | -- Detect if a suitable weapon (not a skinning knife/mining pick and not broken) is present
505 | local function HasWeapon()
506 | if HasDebuff("player", "Ability_Warrior_Disarm") then
507 | return nil
508 | end
509 | local item = GetInventoryItemLink("player", 16)
510 | if item then
511 | local _, _, itemCode = strfind(item, "(%d+):")
512 | local itemName, itemLink, _, _, itemType = GetItemInfo(itemCode)
513 | if itemLink ~= "item:7005:0:0:0" -- Skining knife
514 | and itemLink ~= "item:2901:0:0:0" -- Mining pick
515 | and not GetInventoryItemBroken("player", 16) then
516 | return true
517 | end
518 | end
519 | return nil
520 | end
521 |
522 | --------------------------------------------------
523 | -- Detect if a shield is present
524 | local function HasShield()
525 | if HasDebuff("player", "Ability_Warrior_Disarm") then
526 | return nil
527 | end
528 | local item = GetInventoryItemLink("player", 17)
529 | if item then
530 | local _, _, itemCode = strfind(item, "(%d+):")
531 | local _, _, _, _, _, itemType = GetItemInfo(itemCode)
532 | if itemType == ITEM_TYPE_SHIELDS_FURY
533 | and not GetInventoryItemBroken("player", 17) then
534 | return true
535 | end
536 | end
537 | return nil
538 | end
539 |
540 | --------------------------------------------------
541 | -- Return trinket slot if trinket is equipped and not on cooldown
542 | local function IsTrinketEquipped(name)
543 | for slot = 13, 14 do
544 | local item = GetInventoryItemLink("player", slot)
545 | if item then
546 | local _, _, itemCode = strfind(item, "(%d+):")
547 | local itemName = GetItemInfo(itemCode)
548 | if itemName == name
549 | and GetInventoryItemCooldown("player", slot) == 0 then
550 | return slot
551 | end
552 | end
553 | end
554 | return nil
555 | end
556 | --------------------------------------------------
557 |
558 | local function Ranged()
559 | --Detect if a ranged weapon is equipped and return type
560 | local item = GetInventoryItemLink("player", 18)
561 | if item then
562 | local _, _, itemCode = strfind(item, "(%d+):")
563 | local _, _, _, _, _, itemType = GetItemInfo(itemCode)
564 | return itemType
565 | end
566 | return nil
567 | end
568 | --------------------------------------------------
569 |
570 | local function HamstringCost()
571 | -- Calculate the cost of Hamstring based on gear
572 | local i = 0
573 | local item = GetInventoryItemLink("player", 10)
574 | if item then
575 | local _, _, itemCode = strfind(item, "(%d+):")
576 | local itemName = GetItemInfo(itemCode)
577 | if itemName == ITEM_GAUNTLETS1_FURY
578 | or itemName == ITEM_GAUNTLETS2_FURY
579 | or itemName == ITEM_GAUNTLETS3_FURY
580 | or itemName == ITEM_GAUNTLETS4_FURY then
581 | i = i + 3
582 | end
583 | end
584 | item = GetInventoryItemLink("player", 2)
585 | if item then
586 | local _, _, itemCode = strfind(item, "(%d+):")
587 | local itemName = GetItemInfo(itemCode)
588 | if itemName == ITEM_NECK_RAGE_OF_MUGAMBA_FURY then
589 | i = i + 2
590 | end
591 | end
592 | return 10 - i
593 | end
594 | --------------------------------------------------
595 | local function CheckDebuffs(unit, list)
596 | for _, v in pairs(list) do
597 | if HasDebuff(unit, v) then
598 | return true
599 | end
600 | end
601 | return nil
602 | end
603 | --------------------------------------------------
604 | local function HasAntiStealthDebuff()
605 | --Detect anti-stealth debuffs
606 | --Rend, Deep Wounds, Serpent Sting, Immolate, Curse of Agony , Garrote, Rupture, Deadly Poison, Fireball, Ignite, Pyroblast, Corruption, Siphon Life, Faerie Fire, Moonfire, Rake, Rip, Pounce, Insect Swarm, Holy Fire, Wyvern Sting, Devouring Plague
607 | return CheckDebuffs("target", {
608 | "Ability_Gouge",
609 | "Ability_Hunter_Quickshot",
610 | "Spell_Fire_Immolation",
611 | "Spell_Shadow_CurseOfSargeras",
612 | "Ability_Rogue_Garrote",
613 | "Ability_Rogue_Rupture",
614 | "Ability_Rogue_DualWeild",
615 | "Spell_Shadow_ShadowWordPain",
616 | "Spell_Fire_FlameBolt",
617 | "Spell_Fire_Incinerate",
618 | "Spell_Fire_Fireball02",
619 | "Spell_Shadow_AbominationExplosion",
620 | "Spell_Shadow_Requiem",
621 | "Spell_Nature_FaerieFire",
622 | "Spell_Nature_StarFall",
623 | "Ability_Druid_Disembowel",
624 | -- "Ability_GhoulFrenzy", -- triggered on fury warrs Flurry
625 | "Ability_Druid_SurpriseAttack",
626 | "Spell_Nature_InsectSwarm",
627 | "Spell_Holy_SearingLight",
628 | "INV_Spear_02",
629 | "Spell_Shadow_BlackPlague"
630 | })
631 | end
632 | --------------------------------------------------
633 |
634 | local function HasImmobilizingDebuff()
635 | return CheckDebuffs("player", {
636 | "Spell_Frost_FrostNova",
637 | "spell_Nature_StrangleVines"
638 | })
639 | end
640 | --------------------------------------------------
641 |
642 | local function SnareDebuff(unit)
643 | -- Detect snaring debuffs
644 | -- Hamstring, Wing Clip, Curse of Exhaustion, Crippling Poison, Frostbolt, Cone of Cold, Frost Shock, Piercing Howl
645 | return CheckDebuffs(unit, {
646 | "Ability_ShockWave",
647 | "Ability_Rogue_Trip",
648 | "Spell_Shadow_GrimWard",
649 | "Ability_PoisonSting",
650 | "Spell_Frost_FrostBolt02",
651 | "Spell_Frost_Glacier",
652 | "Spell_Shadow_DeathScream",
653 | "Spell_Frost_FrostShock"
654 | })
655 | end
656 | --------------------------------------------------
657 |
658 | local function Fury_RunnerDetect(arg1, arg2)
659 | -- Thanks to HateMe
660 | if arg1 == CHAT_RUNNER_FURY then
661 | Fury_Runners[arg2] = true
662 | FuryFleeing = true
663 | end
664 | end
665 | --------------------------------------------------
666 |
667 | local function ItemExists(itemName)
668 | for bag = 4, 0, -1 do
669 | for slot = 1, GetContainerNumSlots(bag) do
670 | local _, itemCount = GetContainerItemInfo(bag, slot)
671 | if itemCount then
672 | local itemLink = GetContainerItemLink(bag,slot)
673 | local _, _, itemParse = strfind(itemLink, "(%d+):")
674 | local queryName, _, _, _, _, _ = GetItemInfo(itemParse)
675 | if queryName
676 | and queryName ~= "" then
677 | if queryName == itemName then
678 | return true
679 | end
680 | end
681 | end
682 | end
683 | end
684 | return false
685 | end
686 | --------------------------------------------------
687 |
688 | local function IsItemReady(item)
689 | if ItemExists(item) == false then
690 | return false
691 | end
692 | local _, duration, _ = GetItemCooldown(item)
693 | if duration == 0 then
694 | return true
695 | end
696 | return false
697 | end
698 | --------------------------------------------------
699 |
700 | local function IsEquippedAndReady(slot, name)
701 | local item = GetInventoryItemLink("player", slot)
702 | if item then
703 | local _, _, itemCode = strfind(item, "(%d+):")
704 | local itemName = GetItemInfo(itemCode)
705 | if itemName == name
706 | and GetInventoryItemCooldown("player", slot) == 0 then
707 | return true
708 | end
709 | end
710 | return nil
711 | end
712 | --------------------------------------------------
713 |
714 | local function CheckCooldown(slot)
715 | local start, duration = GetInventoryItemCooldown("player", slot)
716 | if duration > 30 then
717 | -- Alllow duration for 30 seconds since it's when you equip the item
718 | local item = GetInventoryItemLink("player", slot)
719 | if item then
720 | local _, _, itemCode = strfind(item, "(%d+):")
721 | local itemName = GetItemInfo(itemCode)
722 | return itemName
723 | end
724 | end
725 | return nil
726 | end
727 | --------------------------------------------------
728 |
729 | local function Fury_SetEnemies(count)
730 | for i = 5, 1, -1 do
731 | WWEnemies.Hist[i] = WWEnemies.Hist[i - 1]
732 | end
733 | WWEnemies.Hist[0] = Enemies
734 | end
735 | --------------------------------------------------
736 |
737 | local function AddEnemyCount(Enemies)
738 | Fury_SetEnemies(Enemies)
739 | Debug("Enemies "..Enemies)
740 | if Enemies < 2
741 | and Fury_Configuration[MODE_HEADER_AOE] then
742 | Print(TEXT_FURY_DISABLING_AOE)
743 | Fury_Configuration[MODE_HEADER_AOE] = false
744 | end
745 | end
746 | --------------------------------------------------
747 |
748 | local function Fury_GetEnemies()
749 | return WWEnemies.Hist[0] or 0
750 | end
751 | --------------------------------------------------
752 |
753 | local function Fury_Shoot()
754 | local ranged_type = Ranged()
755 | local spell
756 | if ranged_type == ITEM_TYPE_BOWS_FURY then
757 | spell = ABILITY_SHOOT_BOW_FURY
758 | elseif ranged_type == ITEM_TYPE_CROSSBOWS_FURY then
759 | spell = ABILITY_SHOOT_CROSSBOW_FURY
760 | elseif ranged_type == ITEM_TYPE_GUNS_FURY then
761 | spell = ABILITY_SHOOT_GUN_FURY
762 | elseif ranged_type == ITEM_TYPE_THROWN_FURY then
763 | spell = ABILITY_THROW_FURY
764 | else
765 | return false
766 | end
767 | if IsSpellReady(spell) then
768 | Debug(spell)
769 | CastSpellByName(spell)
770 | FuryLastSpellCast = GetTime()
771 | end
772 | return true
773 | end
774 | --------------------------------------------------
775 | -- Treat debuff on player
776 | local function Fury_TreatDebuffPlayer()
777 | local allowCombatCooldown = true
778 | if UnitName("target") == BOSS_NAX_LOATHEB_FURY
779 | or UnitName("target") == BOSS_NAX_SAPPHIRON_FURY then
780 | allowCombatCooldown = false -- Save for Shadow/frost Protection Potion
781 | end
782 | -- add Restorative Potion (magic, poison curse or disease)
783 | if HasDebuffType("player", ITEM_DEBUFF_TYPE_POISON) then
784 | if UnitName("target") == BOSS_NAX_GROBBULUS_FURY then
785 | return false
786 | end
787 | if IsTrinketEquipped(ITEM_TRINKET_HEART_OF_NOXXION) then
788 | local slot = IsTrinketEquipped(ITEM_TRINKET_HEART_OF_NOXXION)
789 | UseInventoryItem(slot)
790 |
791 | elseif UnitRace("player") == RACE_DWARF
792 | and Fury_Configuration[RACIAL_STONEFORM_FURY]
793 | and IsSpellReady(RACIAL_STONEFORM_FURY) then
794 | CastSpellByName(RACIAL_STONEFORM_FURY)
795 |
796 | elseif allowCombatCooldown
797 | and IsItemReady(ITEM_CONS_JUNGLE_REMEDY) then
798 | Print(ITEM_CONS_JUNGLE_REMEDY)
799 | UseContainerItemByNameOnPlayer(ITEM_CONS_JUNGLE_REMEDY)
800 |
801 | elseif IsItemReady(ITEM_CONS_POWERFUL_ANTIVENOM) then
802 | Print(ITEM_CONS_POWERFUL_ANTIVENOM)
803 | UseContainerItemByNameOnPlayer(ITEM_CONS_POWERFUL_ANTIVENOM)
804 |
805 | elseif IsItemReady(ITEM_CONS_ELIXIR_OF_POISION_RESISTANCE) then
806 | Print(ITEM_CONS_ELIXIR_OF_POISION_RESISTANCE)
807 | UseContainerItemByNameOnPlayer(ITEM_CONS_ELIXIR_OF_POISION_RESISTANCE)
808 |
809 | elseif allowCombatCooldown
810 | and IsItemReady(ITEM_CONS_PURIFICATION_POTION) then
811 | Print(ITEM_CONS_PURIFICATION_POTION)
812 | UseContainerItemByNameOnPlayer(ITEM_CONS_PURIFICATION_POTION)
813 |
814 | elseif allowCombatCooldown
815 | and IsItemReady(ITEM_CONS_RESTORATIVE_POTION) then
816 | Print(ITEM_CONS_RESTORATIVE_POTION_POTION)
817 | UseContainerItemByNameOnPlayer(ITEM_CONS_RESTORATIVE_POTION_POTION)
818 |
819 | else
820 | return false
821 |
822 | end
823 | Print(ITEM_DEBUFF_TYPE_POISON)
824 | elseif HasDebuffType("player", ITEM_DEBUFF_TYPE_DISEASE) then
825 | if UnitRace("player") == RACE_DWARF
826 | and IsSpellReady(ABILITY_STONEFORM_FURY) then
827 | CastSpellByName(ABILITY_STONEFORM_FURY)
828 |
829 | elseif allowCombatCooldown
830 | and IsItemReady(ITEM_CONS_JUNGLE_REMEDY) then
831 | Print(ITEM_CONS_JUNGLE_REMEDY)
832 | UseContainerItemByNameOnPlayer(ITEM_CONS_JUNGLE_REMEDY)
833 |
834 | elseif allowCombatCooldown
835 | and IsItemReady(ITEM_CONS_RESTORATIVE_POTION) then
836 | Print(ITEM_CONS_RESTORATIVE_POTION_POTION)
837 | UseContainerItemByNameOnPlayer(ITEM_CONS_RESTORATIVE_POTION_POTION)
838 |
839 | else
840 | return false
841 | end
842 | Print(ITEM_DEBUFF_TYPE_DISEASE)
843 | elseif HasDebuffType("player", ITEM_DEBUFF_TYPE_CURSE) then
844 | if allowCombatCooldown
845 | and IsItemReady(ITEM_CONS_PURIFICATION_POTION) then
846 | Print(ITEM_CONS_PURIFICATION_POTION)
847 | UseContainerItemByNameOnPlayer(ITEM_CONS_PURIFICATION_POTION)
848 |
849 | elseif allowCombatCooldown
850 | and IsItemReady(ITEM_CONS_RESTORATIVE_POTION) then
851 | Print(ITEM_CONS_RESTORATIVE_POTION_POTION)
852 | UseContainerItemByNameOnPlayer(ITEM_CONS_RESTORATIVE_POTION_POTION)
853 |
854 | else
855 | return false
856 | end
857 | Print(ITEM_DEBUFF_TYPE_CURSE)
858 | elseif HasDebuffType("player", ITEM_DEBUFF_TYPE_MAGIC) then
859 |
860 | if allowCombatCooldown
861 | and IsItemReady(ITEM_CONS_RESTORATIVE_POTION) then
862 | Print(ITEM_CONS_RESTORATIVE_POTION_POTION)
863 | UseContainerItemByNameOnPlayer(ITEM_CONS_RESTORATIVE_POTION_POTION)
864 |
865 | else
866 | return false
867 | end
868 | Print(ITEM_DEBUFF_TYPE_MAGIC)
869 | else
870 | return false
871 |
872 | end
873 | return true
874 | end
875 |
876 | --------------------------------------------------
877 |
878 | -- Fury - Handles the combat sequence
879 |
880 | --------------------------------------------------
881 |
882 | function Fury()
883 | if Fury_Configuration["Enabled"]
884 | and not UnitIsCivilian("target")
885 | and UnitClass("player") == CLASS_WARRIOR_FURY
886 | and FuryTalents then
887 | local debuffImmobilizing = HasImmobilizingDebuff()
888 |
889 | -- 1, Auto attack closest target
890 | if Fury_Configuration["AutoAttack"]
891 | and not FuryAttack then
892 | AttackTarget()
893 | end
894 |
895 | -- 2, Overpower
896 | if FuryOverpower then
897 | if (GetTime() - FuryOverpower) > 4 then
898 | FuryOverpower = nil
899 | end
900 | end
901 |
902 | -- 3, Spell interrupts
903 | if FurySpellInterrupt then
904 | if (GetTime() - FurySpellInterrupt) > 2 then
905 | FurySpellInterrupt = nil
906 | end
907 | end
908 |
909 | -- 4, Add number of enemies
910 | if WWEnemies.CleaveCount ~= nil
911 | and (GetTime() - WWEnemies.CleaveTime ) > 1 then
912 | AddEnemyCount(WWEnemies.CleaveCount)
913 | WWEnemies.CleaveCount = nil
914 | elseif WWEnemies.WWCount ~= nil
915 | and (GetTime() - WWEnemies.WWTime) > 1 then
916 | AddEnemyCount(WWEnemies.WWCount)
917 | WWEnemies.WWCount = nil
918 | end
919 |
920 | -- 5, Dismount if mounted
921 | if FuryMount then
922 | Debug("5. Dismount")
923 | Dismount()
924 | FuryMount = nil
925 |
926 | -- 6, Use Berserker rage to interrupt fears and....
927 | elseif Fury_Configuration[ABILITY_BERSERKER_RAGE_FURY]
928 | and (FuryIncapacitate
929 | or FuryFear)
930 | and GetActiveStance() == 3
931 | and IsSpellReady(ABILITY_BERSERKER_RAGE_FURY) then
932 | Debug("6. Berserker Rage")
933 | CastSpellByName(ABILITY_BERSERKER_RAGE_FURY)
934 |
935 | -- 7, Spider Belt, remove existing immobilizing effects
936 | elseif debuffImmobilizing
937 | and IsEquippedAndReady(6, ITEM_BELT_SPIDER_BELT_FURY) then
938 | Debug("7. Spider Belt")
939 | UseInventoryItem(6)
940 |
941 | -- 8, Ornate Mithril Boots, remove existing immobilizing effects
942 | elseif debuffImmobilizing
943 | and IsEquippedAndReady(8, ITEM_BOOTS_ORNATE_MITHRIL_BOOTS_FURY) then
944 | Debug("8. Ornate Mithril Boots")
945 | UseInventoryItem(8)
946 |
947 | -- 9, PVP Trinket, Horde
948 | elseif (FuryFear
949 | or FuryIncapacitate
950 | or debuffImmobilizing)
951 | and IsTrinketEquipped(ITEM_TRINKET_INSIGNIA_OF_THE_HORDE_FURY) then
952 | slot = IsTrinketEquipped(ITEM_TRINKET_INSIGNIA_OF_THE_HORDE_FURY)
953 | Debug("9. Insignia of the Horde")
954 | UseInventoryItem(slot)
955 |
956 | -- PVP Trinket, Alliance
957 | elseif (FuryFear
958 | or FuryIncapacitate
959 | or debuffImmobilizing)
960 | and IsTrinketEquipped(ITEM_TRINKET_INSIGNIA_OF_THE_ALLIANCE_FURY) then
961 | slot = IsTrinketEquipped(ITEM_TRINKET_INSIGNIA_OF_THE_ALLIANCE_FURY)
962 | Debug("10. Insignia of the Alliance")
963 | UseInventoryItem(slot)
964 |
965 | -- Execute, this will stance dance in prot mode?
966 | elseif Fury_Configuration[ABILITY_EXECUTE_FURY]
967 | and HasWeapon()
968 | and not Fury_Configuration[MODE_HEADER_AOE]
969 | and UnitMana("player") >= FuryExecuteCost
970 | and (GetActiveStance() ~= 2
971 | or (Fury_Configuration["PrimaryStance"] ~= 2
972 | and UnitMana("player") <= (FuryTacticalMastery + Fury_Configuration["StanceChangeRage"])
973 | and Fury_Configuration["PrimaryStance"] ~= 0))
974 | and (UnitHealth("target") / UnitHealthMax("target") * 100) <= 20
975 | and IsSpellReady(ABILITY_EXECUTE_FURY) then
976 | if GetActiveStance() == 2 then
977 | Debug("11. Berserker Stance (Execute)")
978 | if not FuryOldStance then
979 | FuryOldStance = GetActiveStance()
980 | end
981 | DoShapeShift(1)
982 | else
983 | Debug("11. Execute")
984 | if FuryOldStance == GetActiveStance() then
985 | FuryDanceDone = true
986 | end
987 | end
988 | CastSpellByName(ABILITY_EXECUTE_FURY)
989 | FuryLastSpellCast = GetTime()
990 |
991 | -- Overpower when available
992 | elseif Fury_Configuration[ABILITY_OVERPOWER_FURY]
993 | and FuryOverpower
994 | and HasWeapon()
995 | and not Fury_Configuration[MODE_HEADER_AOE]
996 | and UnitMana("player") >= 5
997 | and (GetActiveStance() == 1
998 | or (((Fury_Configuration["PrimaryStance"] ~= 2
999 | and (UnitHealth("target") / UnitHealthMax("target") * 100) > 20
1000 | and not (Flurry and HasBuff("player", "Ability_GhoulFrenzy")))
1001 | or UnitIsPlayer("target"))
1002 | and UnitMana("player") <= (FuryTacticalMastery + Fury_Configuration["StanceChangeRage"])
1003 | and Fury_Configuration["PrimaryStance"] ~= 0))
1004 | and IsSpellReady(ABILITY_OVERPOWER_FURY) then
1005 | if GetActiveStance() ~= 1 then
1006 | Debug("12. Battle Stance (Overpower)")
1007 | if not FuryOldStance then
1008 | FuryOldStance = GetActiveStance()
1009 | end
1010 | DoShapeShift(1)
1011 | else
1012 | Debug("12. Overpower")
1013 | CastSpellByName(ABILITY_OVERPOWER_FURY)
1014 | FuryLastSpellCast = GetTime()
1015 | end
1016 |
1017 | -- Pummel if casting
1018 | elseif Fury_Configuration[ABILITY_PUMMEL_FURY]
1019 | and FurySpellInterrupt
1020 | and UnitMana("player") >= 10
1021 | and (not UnitIsPlayer("target")
1022 | or (UnitIsPlayer("target")
1023 | and (UnitClass("target") ~= CLASS_ROGUE_FURY
1024 | and UnitClass("target") ~= CLASS_WARRIOR_FURY
1025 | and UnitClass("target") ~= CLASS_HUNTER_FURY)))
1026 | and (GetActiveStance() == 3
1027 | or (UnitMana("player") <= (FuryTacticalMastery + Fury_Configuration["StanceChangeRage"])
1028 | and Fury_Configuration["PrimaryStance"] ~= 0))
1029 | and IsSpellReady(ABILITY_PUMMEL_FURY) then
1030 | if GetActiveStance() ~= 3 then
1031 | Debug("13. Berserker Stance (Pummel)")
1032 | if not FuryOldStance then
1033 | FuryOldStance = GetActiveStance()
1034 | end
1035 | FuryLastSpellCast = GetTime()
1036 | if UnitName("target") == BOSS_NAX_KEL_THUZAD_FURY then
1037 | SendChatMessage(CHAT_KICKED_FURY ,"SAY" ,"common")
1038 | end
1039 | DoShapeShift(3)
1040 | else
1041 | Debug("13. Pummel")
1042 | end
1043 | CastSpellByName(ABILITY_PUMMEL_FURY)
1044 | if UnitName("target") == BOSS_NAX_KEL_THUZAD_FURY then
1045 | SendChatMessage(CHAT_KICKED_FURY ,"SAY" ,"common")
1046 | end
1047 |
1048 | -- Shield bash to interrupt
1049 | elseif Fury_Configuration[ABILITY_SHIELD_BASH_FURY]
1050 | and FurySpellInterrupt
1051 | and not Fury_Configuration[MODE_HEADER_AOE]
1052 | and UnitMana("player") >= 10
1053 | and HasShield()
1054 | and (not UnitIsPlayer("target")
1055 | or (UnitIsPlayer("target")
1056 | and (UnitClass("target") ~= CLASS_ROGUE_FURY
1057 | and UnitClass("target") ~= CLASS_WARRIOR_FURY
1058 | and UnitClass("target") ~= CLASS_HUNTER_FURY)))
1059 | and (GetActiveStance() ~= 3
1060 | or (UnitMana("player") <= (FuryTacticalMastery + Fury_Configuration["StanceChangeRage"])))
1061 | and IsSpellReady(ABILITY_SHIELD_BASH_FURY) then
1062 | if GetActiveStance() == 3 then
1063 | if not FuryOldStance then
1064 | FuryOldStance = GetActiveStance()
1065 | end
1066 | Debug("14. Battle Stance (Shield Bash)")
1067 | DoShapeShift(1)
1068 | CastSpellByName(ABILITY_SHIELD_BASH_FURY)
1069 | else
1070 | Debug("14. Shield Bash (interrupt)")
1071 | end
1072 | FuryDanceDone = true
1073 | CastSpellByName(ABILITY_SHIELD_BASH_FURY)
1074 | FuryLastSpellCast = GetTime()
1075 | if UnitName("target") == BOSS_NAX_KEL_THUZAD_FURY then
1076 | SendChatMessage(CHAT_KICKED_FURY ,"SAY" ,"common")
1077 | end
1078 |
1079 | -- Cast hamstring to stop runners
1080 | elseif Fury_Configuration[ABILITY_HAMSTRING_FURY]
1081 | and (UnitIsPlayer("target")
1082 | or (Fury_Runners[UnitName("target")]
1083 | and (UnitHealth("target") / UnitHealthMax("target") * 100) <= tonumber(Fury_Configuration["HamstringHealth"])))
1084 | and HasWeapon()
1085 | and (not SnareDebuff("target")
1086 | or (FuryImpHamstring
1087 | and UnitMana("player") < 30))
1088 | and FuryAttack == true
1089 | and not HasBuff("target", "INV_Potion_04")
1090 | and not HasBuff("target", "Spell_Holy_SealOfValor")
1091 | and Fury_Distance() == 5
1092 | and UnitMana("player") >= HamstringCost()
1093 | and (GetActiveStance() ~= 2
1094 | or (UnitMana("player") <= (FuryTacticalMastery + Fury_Configuration["StanceChangeRage"])
1095 | and Fury_Configuration["PrimaryStance"] ~= 0))
1096 | and IsSpellReady(ABILITY_HAMSTRING_FURY) then
1097 | if GetActiveStance() ~= 2 then
1098 | Debug("15. Hamstring")
1099 | if FuryOldStance == 2 then
1100 | FuryDanceDone = true
1101 | end
1102 | else
1103 | if not FuryOldStance then
1104 | FuryOldStance = GetActiveStance()
1105 | end
1106 | Debug("15. Berserker Stance (Hamstring)")
1107 | if Fury_Configuration["PrimaryStance"] == 3 then
1108 | DoShapeShift(3);
1109 | else
1110 | DoShapeShift(1);
1111 | end
1112 | end
1113 | CastSpellByName(ABILITY_HAMSTRING_FURY)
1114 |
1115 | -- Rend to antistealth
1116 | elseif Fury_Configuration[ABILITY_REND_FURY]
1117 | and UnitIsPlayer("target")
1118 | and HasWeapon()
1119 | and (UnitClass("target") == CLASS_ROGUE_FURY
1120 | or UnitClass("target") == CLASS_HUNTER_FURY)
1121 | and UnitMana("player") >= 10
1122 | and not HasAntiStealthDebuff()
1123 | and (GetActiveStance() ~= 3
1124 | or (UnitMana("player") <= (FuryTacticalMastery + Fury_Configuration["StanceChangeRage"])
1125 | and Fury_Configuration["PrimaryStance"] ~= 0))
1126 | and IsSpellReady(ABILITY_REND_FURY) then
1127 | if GetActiveStance() ~= 3 then
1128 | Debug("16. Rend")
1129 | if FuryOldStance == 3 then
1130 | FuryDanceDone = true
1131 | end
1132 | else
1133 | if not FuryOldStance then
1134 | FuryOldStance = GetActiveStance()
1135 | end
1136 | Debug("16. Battle Stance (Rend)")
1137 | DoShapeShift(1)
1138 | end
1139 | CastSpellByName(ABILITY_REND_FURY)
1140 |
1141 | -- slow target
1142 | elseif Fury_Configuration[ABILITY_PIERCING_HOWL_FURY]
1143 | and FuryPiercingHowl
1144 | and (UnitIsPlayer("target")
1145 | or (Fury_Runners[UnitName("target")]
1146 | and (UnitHealth("target") / UnitHealthMax("target") * 100) <= tonumber(Fury_Configuration["HamstringHealth"])))
1147 | and Fury_Distance() <= 10
1148 | and FuryAttack == true
1149 | and not SnareDebuff("target")
1150 | and not HasBuff("target", "INV_Potion_04")
1151 | and not HasBuff("target", "Spell_Holy_SealOfValor")
1152 | and UnitMana("player") >= 10
1153 | and IsSpellReady(ABILITY_PIERCING_HOWL_FURY) then
1154 | Debug("17. Piercing Howl")
1155 | CastSpellByName(ABILITY_PIERCING_HOWL_FURY)
1156 | FuryLastSpellCast = GetTime()
1157 |
1158 | -- Rooted
1159 | elseif debuffImmobilizing
1160 | and Fury_Distance() >= 8 then
1161 | if GetActiveStance() ~= 2 then
1162 | Debug("18. Defensive Stance (Rooted)")
1163 | DoShapeShift(2)
1164 | else
1165 | if FuryOldStance == 2 then
1166 | FuryDanceDone = true
1167 | end
1168 | end
1169 | local slot = IsTrinketEquipped(ITEM_TRINKET_LINKENS_BOOMERANG_FURY)
1170 | if slot ~= nil
1171 | and (FurySpellInterrupt
1172 | or UnitClass("target") == CLASS_HUNTER_FURY) then
1173 | Debug("18. Linken's Boomerang")
1174 | UseInventoryItem(slot)
1175 | else
1176 | slot = IsTrinketEquipped(ITEM_TRINKET_TIDAL_CHARM)
1177 | if slot ~= nil
1178 | and FurySpellInterrupt then
1179 | Debug("18. Tidal Charm")
1180 | UseInventoryItem(slot)
1181 | else
1182 | Fury_Shoot()
1183 | end
1184 | end
1185 |
1186 | -- Berserker rage
1187 | elseif Fury_Configuration[ABILITY_BERSERKER_RAGE_FURY]
1188 | and FuryBerserkerRage
1189 | and not UnitIsPlayer("target")
1190 | and UnitName("target") ~= BOSS_MC_MAGMADAR_FURY
1191 | and UnitMana("player") <= Fury_Configuration["MaximumRage"]
1192 | and (GetActiveStance() == 3
1193 | or (Fury_Configuration["PrimaryStance"] ~= 2
1194 | and UnitMana("player") <= FuryTacticalMastery
1195 | and Fury_Configuration["PrimaryStance"] ~= 0))
1196 | and IsSpellReady(ABILITY_BERSERKER_RAGE_FURY) then
1197 | if GetActiveStance() ~= 3 then
1198 | Debug("19. Berserker Stance (Berserker Rage)")
1199 | if not FuryOldStance then
1200 | FuryOldStance = GetActiveStance()
1201 | end
1202 | DoShapeShift(3)
1203 | else
1204 | Debug("19. Berserker Rage")
1205 | if FuryOldStance ~= 3 then
1206 | FuryDanceDone = true
1207 | end
1208 | end
1209 | CastSpellByName(ABILITY_BERSERKER_RAGE_FURY)
1210 |
1211 | -- Stance dance
1212 | elseif Fury_Configuration["PrimaryStance"]
1213 | and Fury_Configuration["PrimaryStance"] ~= false
1214 | and not FuryOldStance
1215 | and not FuryDanceDone
1216 | and (Fury_Configuration["PrimaryStance"] ~= 3
1217 | or FuryBerserkerStance)
1218 | and ((FuryLastStanceCast
1219 | and FuryLastStanceCast + 1 <= GetTime())
1220 | or not FuryLastStanceCast)
1221 | and Fury_Configuration["PrimaryStance"] ~= GetActiveStance()
1222 | and UnitMana("player") <= (FuryTacticalMastery + Fury_Configuration["StanceChangeRage"])
1223 | and Fury_Configuration["PrimaryStance"] ~= 0 then
1224 | -- Initiate stance dance
1225 | Debug("20. Primary Stance ("..Fury_Configuration["PrimaryStance"]..")")
1226 | DoShapeShift(Fury_Configuration["PrimaryStance"])
1227 |
1228 | -- Disarm (PVP only)
1229 | elseif Fury_Configuration[ABILITY_DISARM_FURY]
1230 | and HasWeapon()
1231 | and UnitIsPlayer("target")
1232 | and (UnitClass("target") == CLASS_HUNTER_FURY
1233 | or UnitClass("target") == CLASS_PALADIN_FURY
1234 | or UnitClass("target") == CLASS_ROGUE_FURY
1235 | or UnitClass("target") == CLASS_SHAMAN_FURY
1236 | or UnitClass("target") == CLASS_WARRIOR_FURY)
1237 | and UnitMana("player") >= 20
1238 | and Fury_ImmuneDisarm[UnitName("target")] == nil
1239 | and (GetActiveStance() == 2
1240 | or (UnitMana("player") <= (FuryTacticalMastery + Fury_Configuration["StanceChangeRage"])
1241 | and Fury_Configuration["PrimaryStance"] ~= 0))
1242 | and IsSpellReady(ABILITY_DISARM_FURY) then
1243 | if GetActiveStance() ~= 2 then
1244 | if not FuryOldStance then
1245 | FuryOldStance = GetActiveStance()
1246 | end
1247 | Debug("21. Defensive Stance (Disarm)")
1248 | DoShapeShift(2)
1249 | else
1250 | Debug("21. Disarm")
1251 | if FuryOldStance ~= 2 then
1252 | FuryDanceDone = true
1253 | end
1254 | end
1255 | CastSpellByName(ABILITY_DISARM_FURY)
1256 | FuryLastSpellCast = GetTime()
1257 |
1258 | -- Sweeping Strikes
1259 | elseif FurySweepingStrikes
1260 | and Fury_Configuration[ABILITY_SWEEPING_STRIKES_FURY]
1261 | and Fury_GetEnemies() > 1
1262 | and UnitMana("player") >= 30
1263 | and IsSpellReady(ABILITY_SWEEPING_STRIKES_FURY) then
1264 | Debug("22. Sweeping Strikes")
1265 | CastSpellByName(ABILITY_SWEEPING_STRIKES_FURY)
1266 |
1267 | -- Bloodthirst
1268 | elseif FuryBloodthirst
1269 | and Fury_Configuration[ABILITY_BLOODTHIRST_FURY]
1270 | and not Fury_Configuration[MODE_HEADER_AOE]
1271 | and UnitMana("player") >= 30
1272 | and IsSpellReady(ABILITY_BLOODTHIRST_FURY) then
1273 | Debug("23. Bloodthirst")
1274 | CastSpellByName(ABILITY_BLOODTHIRST_FURY)
1275 | FuryLastSpellCast = GetTime()
1276 |
1277 | -- Mortal Strike
1278 | elseif FuryMortalStrike
1279 | and Fury_Configuration[ABILITY_MORTAL_STRIKE_FURY]
1280 | and HasWeapon()
1281 | and not Fury_Configuration[MODE_HEADER_AOE]
1282 | and UnitMana("player") >= 30
1283 | and IsSpellReady(ABILITY_MORTAL_STRIKE_FURY) then
1284 | Debug("24. Mortal Strike")
1285 | CastSpellByName(ABILITY_MORTAL_STRIKE_FURY)
1286 | FuryLastSpellCast = GetTime()
1287 |
1288 | -- Whirlwind
1289 | elseif (Fury_Configuration[ABILITY_WHIRLWIND_FURY]
1290 | or Fury_Configuration[MODE_HEADER_AOE])
1291 | and Fury_Distance() <= 10
1292 | and HasWeapon()
1293 | and UnitMana("player") >= 25
1294 | and (GetActiveStance() == 3
1295 | or (Fury_Configuration["PrimaryStance"] ~= 2
1296 | and UnitMana("player") <= (FuryTacticalMastery + Fury_Configuration["StanceChangeRage"])
1297 | and Fury_Configuration["PrimaryStance"] ~= 0))
1298 | and IsSpellReady(ABILITY_WHIRLWIND_FURY) then
1299 | if GetActiveStance() ~= 3 then
1300 | if not FuryOldStance then
1301 | FuryOldStance = GetActiveStance()
1302 | end
1303 | Debug("25. Berserker Stance (Whirlwind)")
1304 | DoShapeShift(3)
1305 | else
1306 | Debug("25. Whirlwind")
1307 | if FuryOldStance ~= 3 then
1308 | FuryDanceDone = true
1309 | end
1310 | end
1311 | CastSpellByName(ABILITY_WHIRLWIND_FURY)
1312 | WWEnemies.WWCount = 0
1313 | FuryLastSpellCast = GetTime()
1314 | WWEnemies.WWTime = GetTime()
1315 |
1316 | -- Shield Slam
1317 | elseif Fury_Configuration[ABILITY_SHIELD_SLAM_FURY]
1318 | and FuryShieldSlam
1319 | and HasShield()
1320 | and UnitMana("player") >= 20
1321 | and IsSpellReady(ABILITY_SHIELD_SLAM_FURY) then
1322 | Debug("26. Shield Slam")
1323 | CastSpellByName(ABILITY_SHIELD_SLAM_FURY)
1324 | FuryLastSpellCast = GetTime()
1325 |
1326 | -- Sunder Armor (until 5)
1327 | elseif Fury_Configuration[ABILITY_SUNDER_ARMOR_FURY]
1328 | and not HasDebuff("target", "Ability_Warrior_Sunder", 5)
1329 | and UnitMana("player") >= 15
1330 | and IsSpellReady(ABILITY_SUNDER_ARMOR_FURY) then
1331 | Debug("27. Sunder Armor (not 5)")
1332 | CastSpellByName(ABILITY_SUNDER_ARMOR_FURY)
1333 | FuryLastSunder = GetTime()
1334 | FuryLastSpellCast = GetTime()
1335 |
1336 | -- Battle Shout
1337 | elseif Fury_Configuration[ABILITY_BATTLE_SHOUT_FURY]
1338 | and not HasBuff("player", "Ability_Warrior_BattleShout")
1339 | and UnitMana("player") >= 10
1340 | and IsSpellReady(ABILITY_BATTLE_SHOUT_FURY) then
1341 | Debug("28. Battle Shout")
1342 | CastSpellByName(ABILITY_BATTLE_SHOUT_FURY)
1343 | FuryLastSpellCast = GetTime()
1344 |
1345 | -- Demoralizing Shout (PVE only)
1346 | elseif Fury_Configuration[ABILITY_DEMORALIZING_SHOUT_FURY]
1347 | and not HasDebuff("target", "Ability_Warrior_WarCry")
1348 | and not HasDebuff("target", "Ability_Druid_DemoralizingRoar")
1349 | and UnitMana("player") >= 10
1350 | and not UnitIsPlayer("target")
1351 | and not FuryFleeing
1352 | and (UnitClass("target") == CLASS_WARRIOR_FURY
1353 | or UnitClass("target") == CLASS_ROGUE_FURY)
1354 | and UnitLevel("Player") - UnitLevel("Target") < Fury_Configuration["DemoDiff"]
1355 | and FuryAttack == true
1356 | and IsSpellReady(ABILITY_DEMORALIZING_SHOUT_FURY) then
1357 | Debug("29. Demoralizing Shout")
1358 | CastSpellByName(ABILITY_DEMORALIZING_SHOUT_FURY)
1359 | FuryLastSpellCast = GetTime()
1360 |
1361 | -- Revenge
1362 | elseif Fury_Configuration[ABILITY_REVENGE_FURY]
1363 | and FuryCombat
1364 | and UnitMana("player") >= 5
1365 | and FuryRevengeReadyUntil > GetTime()
1366 | and IsSpellReady(ABILITY_REVENGE_FURY) then
1367 | Debug("30. Revenge")
1368 | CastSpellByName(ABILITY_REVENGE_FURY)
1369 |
1370 | -- Sunder Armor (Refresh)
1371 | elseif Fury_Configuration[ABILITY_SUNDER_ARMOR_FURY]
1372 | and HasDebuff("target", "Ability_Warrior_Sunder", 5)
1373 | and UnitMana("player") >= 15
1374 | and GetTime() > FuryLastSunder + 25
1375 | and IsSpellReady(ABILITY_SUNDER_ARMOR_FURY) then
1376 | Debug("31. Sunder Armor (refresh)")
1377 | CastSpellByName(ABILITY_SUNDER_ARMOR_FURY)
1378 | FuryLastSunder = GetTime()
1379 | FuryLastSpellCast = GetTime()
1380 |
1381 | -- Shield Block
1382 | elseif Fury_Configuration[ABILITY_SHIELD_BLOCK_FURY]
1383 | and HasShield()
1384 | and FuryCombat
1385 | and GetActiveStance() == 2
1386 | and UnitName("targettarget") == UnitName("player")
1387 | and UnitLevel("Target") > UnitLevel("Player") - Fury_Configuration["DemoDiff"]
1388 | and UnitMana("player") >= 10
1389 | and IsSpellReady(ABILITY_SHIELD_BLOCK_FURY) then
1390 | Debug("32. Shield Block")
1391 | CastSpellByName(ABILITY_SHIELD_BLOCK_FURY)
1392 |
1393 | -- Stance dance (part 2)
1394 | elseif FuryDanceDone
1395 | and FuryOldStance
1396 | and FuryLastStanceCast + 1.5 <= GetTime()
1397 | and UnitMana("player") <= (FuryTacticalMastery + Fury_Configuration["StanceChangeRage"]) then
1398 | -- Initiate stance dance
1399 | if not Fury_Configuration["PrimaryStance"] then
1400 | Debug("33. Old Stance ("..FuryOldStance..")")
1401 | DoShapeShift(FuryOldStance)
1402 | elseif Fury_Configuration["PrimaryStance"] ~= 0 then
1403 | Debug("33. Primary Stance ("..Fury_Configuration["PrimaryStance"]..")")
1404 | DoShapeShift(Fury_Configuration["PrimaryStance"])
1405 | end
1406 | if FuryOldStance == GetActiveStance()
1407 | or Fury_Configuration["PrimaryStance"] == GetActiveStance() then
1408 | Debug("33. Variables cleared (Dance done)")
1409 | FuryOldStance = nil
1410 | FuryDanceDone = nil
1411 | end
1412 |
1413 | -- Juju Flurry
1414 | elseif FuryCombat
1415 | and Fury_Configuration[ITEM_CONS_JUJU_FLURRY]
1416 | and not HasBuff("player", "INV_Misc_MonsterScales_17")
1417 | and FuryAttack == true
1418 | and IsItemReady(ITEM_CONS_JUJU_FLURRY) then
1419 | Debug("34. "..ITEM_CONS_JUJU_FLURRY)
1420 | UseContainerItemByNameOnPlayer(ITEM_CONS_JUJU_FLURRY)
1421 |
1422 | -- Juju Chill
1423 | elseif FuryCombat
1424 | and FuryAttack == true
1425 | and Fury_Configuration[ITEM_CONS_JUJU_CHILL]
1426 | and not HasBuff("player", "INV_Misc_MonsterScales_09")
1427 | and IsUseRes("frost")
1428 | and IsItemReady(ITEM_CONS_JUJU_CHILL) then
1429 | Debug("35. "..ITEM_CONS_JUJU_CHILL)
1430 | UseContainerItemByNameOnPlayer(ITEM_CONS_JUJU_CHILL)
1431 |
1432 | -- Juju Ember
1433 | elseif FuryCombat
1434 | and Fury_Configuration[ITEM_CONS_JUJU_EMBER]
1435 | and not HasBuff("player", "INV_Misc_MonsterScales_15")
1436 | and IsUseRes("fire")
1437 | and IsItemReady(ITEM_CONS_JUJU_EMBER) then
1438 | Debug("36. "..ITEM_CONS_JUJU_EMBER)
1439 | UseContainerItemByNameOnPlayer(ITEM_CONS_JUJU_EMBER)
1440 |
1441 | -- Juju Might
1442 | elseif FuryCombat
1443 | and FuryAttack == true
1444 | and Fury_Configuration[ITEM_CONS_JUJU_MIGHT]
1445 | and not HasBuff("player", "INV_Misc_MonsterScales_07")
1446 | and not HasBuff("player", "INV_Potion_92") -- Winterfall Firewater
1447 | and IsItemReady(ITEM_CONS_JUJU_MIGHT) then
1448 | Debug("37. "..ITEM_CONS_JUJU_MIGHT)
1449 | UseContainerItemByNameOnPlayer(ITEM_CONS_JUJU_MIGHT)
1450 |
1451 | -- Juju Power
1452 | elseif FuryCombat
1453 | and FuryAttack == true
1454 | and Fury_Configuration[ITEM_CONS_JUJU_POWER]
1455 | and not HasBuff("player", "INV_Misc_MonsterScales_11")
1456 | and not HasBuff("player", "INV_Potion_61") -- Elixir of Giants
1457 | and IsItemReady(ITEM_CONS_JUJU_POWER) then
1458 | Debug("38. "..ITEM_CONS_JUJU_POWER)
1459 | UseContainerItemByNameOnPlayer(ITEM_CONS_JUJU_POWER)
1460 |
1461 | -- Immolation potion
1462 | elseif FuryCombat
1463 | and Fury_Configuration[ITEM_CONS_OIL_OF_IMMOLATION]
1464 | and not HasBuff("player", "Spell_Fire_Immolation")
1465 | and IsItemReady(ITEM_CONS_OIL_OF_IMMOLATION) then
1466 | Debug("39. "..ITEM_CONS_OIL_OF_IMMOLATION)
1467 | UseContainerItemByNameOnPlayer(ITEM_CONS_OIL_OF_IMMOLATION)
1468 |
1469 | -- Racial berserking
1470 | elseif FuryRacialBerserking
1471 | and Fury_Configuration[RACIAL_BERSERKING_FURY]
1472 | and UnitMana("player") >= 5
1473 | and (UnitHealth("player") / UnitHealthMax("player") * 100) <= tonumber(Fury_Configuration["BerserkHealth"])
1474 | and not HasBuff("player", "Racial_Berserk")
1475 | and IsSpellReady(RACIAL_BERSERKING_FURY) then
1476 | Debug("40. Berserking")
1477 | CastSpellByName(RACIAL_BERSERKING_FURY)
1478 | FuryLastSpellCast = GetTime()
1479 |
1480 | -- Blood Fury (Orc racial ability)
1481 | elseif FuryRacialBloodFury
1482 | and Fury_Configuration[RACIAL_BLOOD_FURY]
1483 | and FuryAttack == true
1484 | and GetActiveStance() ~= 2
1485 | and FuryCombat
1486 | and (UnitHealth("player") / UnitHealthMax("player") * 100) >= tonumber(Fury_Configuration["DeathWishHealth"])
1487 | and IsSpellReady(RACIAL_BLOOD_FURY) then
1488 | Debug("41. Blood Fury")
1489 | CastSpellByName(RACIAL_BLOOD_FURY)
1490 |
1491 | -- Death Wish
1492 | elseif FuryDeathWish
1493 | and Fury_Configuration[ABILITY_DEATH_WISH_FURY]
1494 | and UnitMana("player") >= 10
1495 | and FuryAttack == true
1496 | and GetActiveStance() ~= 2
1497 | and FuryCombat
1498 | and (UnitHealth("player") / UnitHealthMax("player") * 100) >= tonumber(Fury_Configuration["DeathWishHealth"])
1499 | and IsSpellReady(ABILITY_DEATH_WISH_FURY) then
1500 | Debug("42. Death Wish")
1501 | CastSpellByName(ABILITY_DEATH_WISH_FURY)
1502 |
1503 | -- Earthstrike
1504 | elseif Fury_Configuration[ITEM_TRINKET_EARTHSTRIKE]
1505 | and FuryCombat
1506 | and FuryAttack == true
1507 | and IsTrinketEquipped(ITEM_TRINKET_EARTHSTRIKE) then
1508 | Debug("43. Earthstrike")
1509 | UseInventoryItem(IsTrinketEquipped(ITEM_TRINKET_EARTHSTRIKE))
1510 |
1511 | -- Slayer's Crest
1512 | elseif Fury_Configuration[ITEM_TRINKET_SLAYERS_CREST]
1513 | and FuryCombat
1514 | and FuryAttack == true
1515 | and IsTrinketEquipped(ITEM_TRINKET_SLAYERS_CREST) then
1516 | Debug("44. Slayer's Crest")
1517 | UseInventoryItem(IsTrinketEquipped(ITEM_TRINKET_SLAYERS_CREST))
1518 |
1519 | -- Kiss of the Spider
1520 | elseif Fury_Configuration[ITEM_TRINKET_KOTS]
1521 | and FuryCombat
1522 | and FuryAttack == true
1523 | and IsTrinketEquipped(ITEM_TRINKET_KOTS) then
1524 | Debug("45. Kiss of the Spider")
1525 | UseInventoryItem(IsTrinketEquipped(ITEM_TRINKET_KOTS))
1526 |
1527 | -- Bloodrage
1528 | elseif Fury_Configuration[ABILITY_BLOODRAGE_FURY]
1529 | and UnitMana("player") <= tonumber(Fury_Configuration["MaximumRage"])
1530 | and (UnitHealth("player") / UnitHealthMax("player") * 100) >= tonumber(Fury_Configuration["BloodrageHealth"])
1531 | and IsSpellReady(ABILITY_BLOODRAGE_FURY) then
1532 | Debug("46. Bloodrage")
1533 | CastSpellByName(ABILITY_BLOODRAGE_FURY)
1534 |
1535 | -- Treat debuffs (poisons)
1536 | elseif Fury_Configuration[MODE_HEADER_DEBUFF]
1537 | and Fury_TreatDebuffPlayer() then
1538 | Debug("47. Treated debuff")
1539 |
1540 | -- Swap to Execute weapon
1541 | elseif Fury_Configuration[ABILITY_EXECUTE_FURY]
1542 | and HasWeapon()
1543 | and not Fury_Configuration[MODE_HEADER_AOE]
1544 | and (UnitHealth("target") / UnitHealthMax("target") * 100) <= 21
1545 | and Fury_Configuration["ExecuteSwap"]
1546 | and Fury_Configuration["ExecuteSwapped"]
1547 | and Outfitter_ExecuteCommand then
1548 | Debug("48. Swap to Execute Profile in Outfitter")
1549 | Outfitter_ExecuteCommand("wear Execute")
1550 | Fury_Configuration["ExecuteSwapped"] = true
1551 |
1552 | -- Swap back to normal weapons
1553 | elseif Fury_Configuration["ExecuteSwapped"]
1554 | and Outfitter_ExecuteCommand
1555 | and (((UnitHealth("target") / UnitHealthMax("target") * 100) > 21)
1556 | or (UnitHealth("target") == 0)
1557 | or not FuryCombat) then
1558 | Debug("49. unwear Execute weapon")
1559 | Outfitter_ExecuteCommand("unwear Execute")
1560 | Fury_Configuration["ExecuteSwapped"] = false
1561 |
1562 | -- Dump rage with Heroic Strike or Cleave
1563 | elseif (Fury_Configuration[MODE_HEADER_AOE]
1564 | or Fury_Configuration["PrimaryStance"] == 2
1565 | or ((Fury_Configuration[ABILITY_MORTAL_STRIKE_FURY]
1566 | and FuryMortalStrike
1567 | and not IsSpellReady(ABILITY_MORTAL_STRIKE_FURY))
1568 | or not Fury_Configuration[ABILITY_MORTAL_STRIKE_FURY]
1569 | or not FuryMortalStrike)
1570 | and ((Fury_Configuration[ABILITY_BLOODTHIRST_FURY]
1571 | and FuryBloodthirst
1572 | and not IsSpellReady(ABILITY_BLOODTHIRST_FURY))
1573 | or not Fury_Configuration[ABILITY_BLOODTHIRST_FURY]
1574 | or not FuryBloodthirst)
1575 | and ((Fury_Configuration[ABILITY_WHIRLWIND_FURY]
1576 | and not IsSpellReady(ABILITY_WHIRLWIND_FURY))
1577 | or not Fury_Configuration[ABILITY_WHIRLWIND_FURY]
1578 | or not FuryWhirlwind)) then
1579 |
1580 | -- Will try to lessen the amounts of Heroic Strike, when instanct attacks (MS, BT, WW) are enabled
1581 | -- Hamstring
1582 | if Fury_Configuration[ABILITY_HAMSTRING_FURY]
1583 | and HasWeapon()
1584 | and UnitMana("player") >= HamstringCost()
1585 | and UnitMana("player") >= tonumber(Fury_Configuration["FlurryTriggerRage"])
1586 | and ((FuryFlurry
1587 | and not HasBuff("player", "Ability_GhoulFrenzy"))
1588 | or FuryImpHamstring
1589 | or FurySwordSpec
1590 | or FuryMaceSpec)
1591 | and IsSpellReady(ABILITY_HAMSTRING_FURY) then
1592 | -- Try trigger...
1593 | -- stun,imp attack speed, extra swing
1594 | Debug("51. Hamstring (Trigger ...)")
1595 | CastSpellByName(ABILITY_HAMSTRING_FURY)
1596 | FuryLastSpellCast = GetTime()
1597 |
1598 | -- Heroic Strike
1599 | elseif Fury_Configuration[ABILITY_HEROIC_STRIKE_FURY]
1600 | and HasWeapon()
1601 | and not Fury_Configuration[MODE_HEADER_AOE]
1602 | and UnitMana("player") >= FuryHeroicStrikeCost
1603 | and (UnitMana("player") >= tonumber(Fury_Configuration["NextAttackRage"])
1604 | or (not FuryMortalStrike
1605 | and not FuryWhirlwind
1606 | and not FuryBloodthirst)
1607 | or Fury_Configuration["PrimaryStance"] == 2)
1608 | and IsSpellReady(ABILITY_HEROIC_STRIKE_FURY) then
1609 | Debug("52. Heroic Strike")
1610 | CastSpellByName(ABILITY_HEROIC_STRIKE_FURY)
1611 | FuryLastSpellCast = GetTime()
1612 | -- No global cooldown, added anyway to prevent Heroic Strike from being spammed over other abilities
1613 |
1614 | -- Cleave
1615 | elseif (Fury_Configuration[ABILITY_CLEAVE_FURY]
1616 | or Fury_Configuration[MODE_HEADER_AOE])
1617 | and HasWeapon()
1618 | and UnitMana("player") >= 20
1619 | and ((UnitMana("player") >= tonumber(Fury_Configuration["NextAttackRage"]))
1620 | or (Fury_Configuration[MODE_HEADER_AOE] and UnitMana("player") >= 25)
1621 | or Fury_Configuration["PrimaryStance"] == 2)
1622 | and IsSpellReady(ABILITY_CLEAVE_FURY) then
1623 | Debug("53. Cleave")
1624 | CastSpellByName(ABILITY_CLEAVE_FURY)
1625 | FuryLastSpellCast = GetTime()
1626 | -- No global cooldown, added anyway to prevent Cleave from being spammed over other abilities
1627 | elseif not FuryRageDumped then
1628 | --Debug("54. Rage: "..tostring(UnitMana("player")))
1629 | FuryRageDumped = true
1630 | end
1631 | elseif not FuryRageDumped then
1632 | -- Debug("55. Rage: "..tostring(UnitMana("player")))
1633 | FuryRageDumped = true
1634 | end
1635 | end
1636 | end
1637 |
1638 | --------------------------------------------------
1639 | --
1640 | -- Handle Block command
1641 | --
1642 | --------------------------------------------------
1643 |
1644 | local function Fury_Block()
1645 | if GetActiveStance() ~= 2 then
1646 | if FuryLastStanceCast + 1.5 <= GetTime() then
1647 | if not FuryOldStance then
1648 | FuryOldStance = GetActiveStance()
1649 | end
1650 | Debug("B1. Defensive Stance (Block")
1651 | DoShapeShift(2)
1652 | end
1653 | end
1654 | if Fury_Configuration[ABILITY_SHIELD_BLOCK_FURY]
1655 | and HasShield()
1656 | and UnitMana("player") >= 10
1657 | and IsSpellReady(ABILITY_SHIELD_BLOCK_FURY) then
1658 | CastSpellByName(ABILITY_SHIELD_BLOCK_FURY)
1659 | Debug("B2. Shield Block")
1660 | FuryDanceDone = true
1661 | FuryLastSpellCast = GetTime()
1662 | elseif Fury_Configuration[ABILITY_BLOODRAGE_FURY]
1663 | and UnitMana("player") < 10
1664 | and IsSpellReady(ABILITY_BLOODRAGE_FURY) then
1665 | Debug("B3. Bloodrage")
1666 | CastSpellByName(ABILITY_BLOODRAGE_FURY)
1667 | end
1668 | end
1669 |
1670 | --------------------------------------------------
1671 | --
1672 | -- Handle charge command
1673 | --
1674 | --------------------------------------------------
1675 |
1676 | local function Fury_Charge()
1677 | local dist = Fury_Distance()
1678 | if not UnitExists("target") and
1679 | not FuryCombat then
1680 | if Fury_Configuration["PrimaryStance"]
1681 | and Fury_Configuration["PrimaryStance"] ~= 0
1682 | and GetActiveStance() ~= Fury_Configuration["PrimaryStance"] then
1683 | DoShapeShift(Fury_Configuration["PrimaryStance"])
1684 | end
1685 | Debug("No target")
1686 | return
1687 | end
1688 | if FuryMount
1689 | and dist <= 25 then
1690 | -- Dismount as a first step
1691 | Debug("Dismounting")
1692 | Dismount()
1693 | FuryMount = nil
1694 | end
1695 | if FuryCombat then
1696 | if Fury_Configuration["AutoAttack"]
1697 | and not FuryAttack then
1698 | -- Auto attack closest target
1699 | AttackTarget()
1700 | end
1701 | if Fury_Configuration[ABILITY_THUNDER_CLAP_FURY]
1702 | and FuryLastChargeCast + 0.6 <= GetTime()
1703 | and dist <= 7
1704 | and not SnareDebuff("target")
1705 | and UnitMana("player") >= FuryThunderClapCost
1706 | and IsSpellReady(ABILITY_THUNDER_CLAP_FURY) then
1707 | if GetActiveStance() ~= 1 then
1708 | if FuryOldStance == nil then
1709 | FuryOldStance = GetActiveStance()
1710 | end
1711 | Debug("C1.Arms Stance, Thunder Clap")
1712 | DoShapeShift(1)
1713 | else
1714 | Debug("C1.Thunder Clap")
1715 | if FuryOldStance == 1 then
1716 | FuryDanceDone = true
1717 | end
1718 | CastSpellByName(ABILITY_THUNDER_CLAP_FURY)
1719 | FuryLastSpellCast = GetTime()
1720 | end
1721 |
1722 | elseif Fury_Configuration[ABILITY_INTERCEPT_FURY]
1723 | and GetActiveStance() == 3
1724 | and dist <= 25
1725 | and dist > 7
1726 | and UnitMana("player") >= 10
1727 | and FuryLastChargeCast + 1 < GetTime()
1728 | and IsSpellReady(ABILITY_INTERCEPT_FURY) then
1729 | Debug("C2. Intercept")
1730 | CastSpellByName(ABILITY_INTERCEPT_FURY)
1731 | FuryLastChargeCast = GetTime()
1732 |
1733 | elseif Fury_Configuration[ABILITY_BLOODRAGE_FURY]
1734 | and GetActiveStance() == 3
1735 | and UnitMana("player") < 10
1736 | and dist <= 25
1737 | and IsSpellReady(ABILITY_INTERCEPT_FURY)
1738 | and IsSpellReady(ABILITY_BLOODRAGE_FURY) then
1739 | Debug("C3. Bloodrage")
1740 | CastSpellByName(ABILITY_BLOODRAGE_FURY)
1741 |
1742 | elseif Fury_Configuration[ABILITY_BERSERKER_RAGE_FURY]
1743 | and FuryBerserkerRage
1744 | and GetActiveStance() == 3
1745 | and UnitMana("player") < 10
1746 | and not IsSpellReady(ABILITY_BLOODRAGE_FURY)
1747 | and IsSpellReady(ABILITY_INTERCEPT_FURY)
1748 | and IsSpellReady(ABILITY_BERSERKER_RAGE_FURY) then
1749 | Debug("C4. Berserker Rage")
1750 | CastSpellByName(ABILITY_BERSERKER_RAGE_FURY)
1751 |
1752 | elseif Fury_Configuration[ABILITY_INTERCEPT_FURY]
1753 | and GetActiveStance() ~= 3
1754 | and UnitMana("player") >= 10
1755 | and FuryLastChargeCast + 1 < GetTime()
1756 | and IsSpellReadyIn(ABILITY_INTERCEPT_FURY) <= 3 then
1757 | Debug("C5. Berserker Stance (Intercept)")
1758 | if FuryOldStance == nil then
1759 | FuryOldStance = GetActiveStance()
1760 | elseif FuryOldStance == 3 then
1761 | FuryDanceDone = true
1762 | end
1763 | DoShapeShift(3)
1764 |
1765 | end
1766 | else
1767 | if Fury_Configuration[ABILITY_CHARGE_FURY]
1768 | and GetActiveStance() == 1
1769 | and dist <= 25
1770 | and dist > 7
1771 | and FuryLastChargeCast + 0.5 < GetTime()
1772 | and IsSpellReady(ABILITY_CHARGE_FURY) then
1773 | Debug("O1. Charge")
1774 | CastSpellByName(ABILITY_CHARGE_FURY)
1775 | FuryLastChargeCast = GetTime()
1776 |
1777 | elseif Fury_Configuration[ABILITY_INTERCEPT_FURY]
1778 | and GetActiveStance() == 3
1779 | and dist <= 25
1780 | and dist > 7
1781 | and UnitMana("player") >= 10
1782 | and FuryLastChargeCast + 2 < GetTime()
1783 | and IsSpellReady(ABILITY_INTERCEPT_FURY) then
1784 | Debug("O2. Intercept")
1785 | CastSpellByName(ABILITY_INTERCEPT_FURY)
1786 | FuryLastChargeCast = GetTime()
1787 | FuryLastSpellCast = GetTime()
1788 |
1789 | elseif Fury_Configuration[ABILITY_THUNDER_CLAP_FURY]
1790 | and GetActiveStance() == 1
1791 | and dist <= 5
1792 | and not SnareDebuff("target")
1793 | and UnitMana("player") >= FuryThunderClapCost
1794 | and IsSpellReady(ABILITY_THUNDER_CLAP_FURY) then
1795 | Debug("O3. Thunder Clap")
1796 | CastSpellByName(ABILITY_THUNDER_CLAP_FURY)
1797 | FuryLastSpellCast = GetTime()
1798 |
1799 | elseif Fury_Configuration[ABILITY_INTERCEPT_FURY]
1800 | and not IsSpellReady(ABILITY_CHARGE_FURY)
1801 | and UnitMana("player") >= 10
1802 | and FuryBerserkerStance
1803 | and FuryLastChargeCast + 1 < GetTime()
1804 | and IsSpellReady(ABILITY_INTERCEPT_FURY) then
1805 | if GetActiveStance() ~= 3 then
1806 | Debug("Berserker Stance (Intercept)")
1807 | if FuryOldStance == nil then
1808 | FuryOldStance = GetActiveStance()
1809 | end
1810 | DoShapeShift(3)
1811 |
1812 | else
1813 | if FuryOldStance == 3 then
1814 | FuryDanceDone = true
1815 | end
1816 | CastSpellByName(ABILITY_INTERCEPT_FURY)
1817 | FuryLastSpellCast = GetTime()
1818 | end
1819 |
1820 | elseif Fury_Configuration[ABILITY_BERSERKER_RAGE_FURY]
1821 | and FuryBerserkerRage
1822 | and GetActiveStance() == 3
1823 | and IsSpellReady(ABILITY_INTERCEPT_FURY)
1824 | and not IsSpellReady(ABILITY_CHARGE_FURY)
1825 | and dist <= 25
1826 | and UnitMana("player") < 10
1827 | and not IsSpellReady(ABILITY_BLOODRAGE_FURY)
1828 | and IsSpellReady(ABILITY_BERSERKER_RAGE_FURY) then
1829 | Debug("O5. Berserker Rage")
1830 | CastSpellByName(ABILITY_BERSERKER_RAGE_FURY)
1831 |
1832 | elseif Fury_Configuration[ABILITY_BLOODRAGE_FURY]
1833 | and GetActiveStance() == 3
1834 | and dist <= 25
1835 | and IsSpellReady(ABILITY_INTERCEPT_FURY)
1836 | and not IsSpellReady(ABILITY_CHARGE_FURY)
1837 | and UnitMana("player") < 10
1838 | and IsSpellReady(ABILITY_BLOODRAGE_FURY) then
1839 | Debug("O6. Bloodrage")
1840 | CastSpellByName(ABILITY_BLOODRAGE_FURY)
1841 |
1842 | elseif Fury_Configuration[ABILITY_CHARGE_FURY]
1843 | and GetActiveStance() ~= 1
1844 | and dist > 7
1845 | and IsSpellReadyIn(ABILITY_CHARGE_FURY) <= 5 then
1846 | Debug("O7. Arm Stance (Charge)")
1847 | if Fury_Configuration["PrimaryStance"] ~= 1
1848 | and FuryOldStance == nil then
1849 | FuryOldStance = GetActiveStance()
1850 | elseif FuryOldstance == 1 then
1851 | FuryOldStance = nil
1852 | FuryDanceDone = true
1853 | end
1854 | DoShapeShift(1)
1855 | end
1856 | end
1857 | end
1858 |
1859 | --------------------------------------------------
1860 | -- Scan spell book and talents
1861 | local function Fury_ScanTalents()
1862 | local i = 1
1863 | Debug("Scanning Spell Book")
1864 | while true do
1865 | local spellName, spellRank = GetSpellName(i, BOOKTYPE_SPELL)
1866 | if not spellName then
1867 | break
1868 | end
1869 | if spellName == ABILITY_BERSERKER_STANCE_FURY then
1870 | FuryBerserkerStance = true
1871 | Debug(ABILITY_BERSERKER_STANCE_FURY)
1872 | elseif spellName == ABILITY_DEFENSIVE_STANCE_FURY then
1873 | FuryDefensiveStance = true
1874 | Debug(ABILITY_DEFENSIVE_STANCE_FURY)
1875 | end
1876 | i = i + 1
1877 | end
1878 | Debug("Scanning Talent Tree")
1879 | -- Calculate the cost of Heroic Strike based on talents
1880 | local _, _, _, _, currRank = GetTalentInfo(1, 1)
1881 | FuryHeroicStrikeCost = (15 - tonumber(currRank))
1882 | if FuryHeroicStrikeCost < 15 then
1883 | Debug("Heroic Cost")
1884 | end
1885 | -- Calculate the rage retainment of Tactical Mastery
1886 | local _, _, _, _, currRank = GetTalentInfo(1, 5)
1887 | FuryTacticalMastery = (tonumber(currRank) * 5)
1888 | if FuryTacticalMastery > 0 then
1889 | Debug("Tactical Mastery")
1890 | end
1891 | local _, _, _, _, currRank = GetTalentInfo(1, 6)
1892 | FuryThunderClapCost = (20 - tonumber(currRank))
1893 | if FuryThunderClapCost < 20 then
1894 | Debug("Improved Thunder Clap")
1895 | end
1896 | -- Check for Sweeping Strikes
1897 | local _, _, _, _, currRank = GetTalentInfo(1, 13)
1898 | if currRank > 0 then
1899 | Debug("Sweeping Strikes")
1900 | FurySweepingStrikes = true
1901 | else
1902 | FurySweepingStrikes = false
1903 | end
1904 | -- Check for Mace Specializaton
1905 | local _, _, _, _, currRank = GetTalentInfo(1, 14)
1906 | if currRank > 0 then
1907 | Debug("Mace Specializaton")
1908 | FuryMaceSpec = true
1909 | else
1910 | FuryMaceSpec = false
1911 | end
1912 | -- Check for Sword Specializaton
1913 | local _, _, _, _, currRank = GetTalentInfo(1, 15)
1914 | if currRank > 0 then
1915 | Debug("Sword Specializaton")
1916 | FurySwordSpec = true
1917 | else
1918 | FurySwordSpec = false
1919 | end
1920 | -- Check for Improved Hamstring
1921 | local _, _, _, _, currRank = GetTalentInfo(1, 17)
1922 | if currRank > 0 then
1923 | Debug("Improved Hamstring")
1924 | FuryImpHamstring = true
1925 | else
1926 | FuryImpHamstring = false
1927 | end
1928 | -- Check for Mortal Strike
1929 | local _, _, _, _, currRank = GetTalentInfo(1, 18)
1930 | if currRank > 0 then
1931 | Debug("Mortal Strike")
1932 | FuryMortalStrike = true
1933 | else
1934 | FuryMortalStrike = false
1935 | end
1936 | -- Check for Piercing Howl
1937 | local _, _, _, _, currRank = GetTalentInfo(2, 6)
1938 | if currRank > 0 then
1939 | Debug("Piercing Howl")
1940 | FuryPiercingHowl = true
1941 | else
1942 | FuryPiercingHowl = false
1943 | end
1944 | -- Calculate the cost of Execute based on talents
1945 | local _, _, _, _, currRank = GetTalentInfo(2, 10)
1946 | FuryExecuteCost = (15 - strsub(tonumber(currRank) * 2.5, 1, 2))
1947 | if FuryExecuteCost < 15 then
1948 | Debug("Execute Cost")
1949 | end
1950 | -- Check for Death Wish
1951 | local _, _, _, _, currRank = GetTalentInfo(2, 13)
1952 | if currRank > 0 then
1953 | Debug("Death Wish")
1954 | FuryDeathWish = true
1955 | else
1956 | FuryDeathWish = false
1957 | end
1958 | -- Check for Improved Berserker Rage
1959 | local _, _, _, _, currRank = GetTalentInfo(2, 15)
1960 | if currRank > 0 then
1961 | Debug("Improved Berserker Rage")
1962 | FuryBerserkerRage = true
1963 | else
1964 | FuryBerserkerRage = false
1965 | end
1966 | -- Check for Flurry
1967 | local _, _, _, _, currRank = GetTalentInfo(2, 16)
1968 | if currRank > 0 then
1969 | Debug("Flurry")
1970 | FuryFlurry = true
1971 | else
1972 | FuryFlurry = false
1973 | end
1974 |
1975 | -- Check for Bloodthirst
1976 | local _, _, _, _, currRank = GetTalentInfo(2, 17)
1977 | if currRank > 0 then
1978 | Debug("Bloodthirst")
1979 | FuryBloodthirst = true
1980 | else
1981 | FuryBloodthirst = false
1982 | end
1983 | -- Check for Shield Slam
1984 | local _, _, _, _, currRank = GetTalentInfo(3, 17)
1985 | if currRank > 0 then
1986 | Debug("Shield Slam")
1987 | FuryShieldSlam = true
1988 | else
1989 | FuryShieldSlam = false
1990 | end
1991 | if UnitRace("player") == RACE_ORC then
1992 | Debug("Blood Fury")
1993 | FuryRacialBloodFury = true
1994 | else
1995 | FuryRacialBloodFury = false
1996 | end
1997 | if UnitRace("player") == RACE_TROLL then
1998 | Debug("Berserking")
1999 | FuryRacialBerserking = true
2000 | else
2001 | FuryRacialBerserking = false
2002 | end
2003 | if SpellId("Whirlwind") then
2004 | Debug("Whirlwind")
2005 | FuryWhirlwind = true
2006 | else
2007 | FuryWhirlwind = false
2008 | end
2009 | FuryTalents = true
2010 | end
2011 |
2012 | --------------------------------------------------
2013 | --
2014 | -- Chat Handlers
2015 | --
2016 | --------------------------------------------------
2017 | -- Helper to set option to value
2018 | local function SetOptionRange(option, text, value, vmin, vmax)
2019 | if value ~= "" then
2020 | if tonumber(value) < vmin then
2021 | value = vmin
2022 | elseif tonumber(value) > vmax then
2023 | value = vmax
2024 | end
2025 | Fury_Configuration[option] = tonumber(value)
2026 | else
2027 | value = Fury_Configuration[option]
2028 | end
2029 | Print(text..value..".")
2030 | end
2031 |
2032 | --------------------------------------------------
2033 | -- Print option if it is enabled
2034 | local function PrintEnabledOption(option, text)
2035 | if Fury_Configuration[option] == true then
2036 | Print(text.." "..TEXT_FURY_ENABLED..".")
2037 | end
2038 | end
2039 |
2040 | --------------------------------------------------
2041 | -- Helper to toggle option
2042 | local function ToggleOption(option, text)
2043 | if Fury_Configuration[option] == true then
2044 | Fury_Configuration[option] = false
2045 | Print(text.." "..TEXT_FURY_DISABLED..".")
2046 | elseif Fury_Configuration[option] == false then
2047 | Fury_Configuration[option] = true
2048 | Print(text.." "..TEXT_FURY_ENABLED..".")
2049 | else
2050 | return false
2051 | end
2052 | return true
2053 | end
2054 |
2055 | --------------------------------------------------
2056 | -- Help
2057 | local function DoHelp(commands, options)
2058 | Print(options)
2059 | if options == nil
2060 | or options == "" then
2061 | local cmds = ""
2062 | cmds = SLASH_FURY_HELP
2063 | for k,_ in pairs(commands) do
2064 | if cmds ~= ""
2065 | and cmds ~= SLASH_FURY_HELP then
2066 | cmds = cmds..", "
2067 | end
2068 | cmds = cmds..k
2069 | if string.len(cmds) > 80 then
2070 | Print(cmds)
2071 | cmds = ""
2072 | end
2073 | end
2074 | Print(cmds)
2075 | elseif commands[options] ~= nil then
2076 | Print(commands[options].help)
2077 | else
2078 | Print(HELP_UNKNOWN)
2079 | end
2080 | end
2081 | --------------------------------------------------
2082 | local tankmode = {
2083 | {"PrimaryStance", 2 },
2084 | {ABILITY_SUNDER_ARMOR_FURY, true },
2085 | {ABILITY_REVENGE_FURY, true },
2086 | {ABILITY_OVERPOWER_FURY, false },
2087 | {ABILITY_DEMORALIZING_SHOUT_FURY, true }
2088 | }
2089 |
2090 | function Fury_Togglemode(mode, prefix)
2091 | if Fury_Configuration[prefix] == true then
2092 | -- Enable damage setup
2093 | Fury_Configuration[prefix] = false
2094 | for i, k in mode do
2095 | Fury_Configuration[k[1]] = Fury_Configuration[prefix..k[1]]
2096 | end
2097 | Print(prefix.." "..TEXT_FURY_DISABLED..".")
2098 | else
2099 | -- Enable Tank setup
2100 | Fury_Configuration[prefix] = true
2101 | for i, k in mode do
2102 | Fury_Configuration[prefix..k[1]] = Fury_Configuration[k[1]]
2103 | Fury_Configuration[k[1]] = k[2]
2104 | end
2105 | Print(prefix.." "..TEXT_FURY_ENABLED..".")
2106 | end
2107 | end
2108 |
2109 | --------------------------------------------------
2110 | -- Handle incomming slash commands
2111 | function Fury_SlashCommand(msg)
2112 | local _, _, command, options = string.find(msg, "([%w%p]+)%s*(.*)$")
2113 | if command then
2114 | command = string.lower(command)
2115 | end
2116 | if not (UnitClass("player") == CLASS_WARRIOR_FURY) then
2117 | return
2118 | end
2119 | local commands = {
2120 | ["ability"] = { help = HELP_ABILITY, fn = function(options)
2121 | if options == ABILITY_HEROIC_STRIKE_FURY
2122 | and not Fury_Configuration[ABILITY_HEROIC_STRIKE_FURY] then
2123 | Fury_Configuration[ABILITY_HEROIC_STRIKE_FURY] = true
2124 | Print(ABILITY_HEROIC_STRIKE_FURY.." "..TEXT_FURY_ENABLED..".")
2125 | if Fury_Configuration[ABILITY_CLEAVE_FURY] then
2126 | Fury_Configuration[ABILITY_CLEAVE_FURY] = false
2127 | Print(ABILITY_CLEAVE_FURY.." "..TEXT_FURY_DISABLED..".")
2128 | end
2129 | elseif options == ABILITY_CLEAVE_FURY
2130 | and not Fury_Configuration[ABILITY_CLEAVE_FURY] then
2131 | Fury_Configuration[ABILITY_CLEAVE_FURY] = true
2132 | Print(ABILITY_CLEAVE_FURY.." "..TEXT_FURY_ENABLED..".")
2133 | if Fury_Configuration[ABILITY_HEROIC_STRIKE_FURY] then
2134 | Fury_Configuration[ABILITY_HEROIC_STRIKE_FURY] = falses
2135 | Print(ABILITY_HEROIC_STRIKE_FURY.." "..TEXT_FURY_DISABLED..".")
2136 | end
2137 | elseif Fury_Configuration[options] then
2138 | Fury_Configuration[options] = false
2139 | Print(options.." "..TEXT_FURY_DISABLED..".")
2140 | elseif Fury_Configuration[options] == false then
2141 | Fury_Configuration[options] = true
2142 | Print(options.." "..TEXT_FURY_ENABLED..".")
2143 | else
2144 | Print(options.." "..TEXT_FURY_NOT_FOUND..".")
2145 | end
2146 | end },
2147 |
2148 | ["aoe"] = { help = HELP_AOE, fn = function(options)
2149 | ToggleOption(MODE_HEADER_AOE, MODE_HEADER_AOE)
2150 | end },
2151 |
2152 | ["attack"] = { help = HELP_ATTACK, fn = function(options)
2153 | ToggleOption("AutoAttack", SLASH_FURY_AUTOATTACK)
2154 | end },
2155 |
2156 | ["attackrage"] = { help = HELP_ATTACKRAGE, fn = function(options)
2157 | SetOptionRange("NextAttackRage", SLASH_FURY_ATTACKRAGE, options, 0 , 100)
2158 | end },
2159 |
2160 | ["berserk"] = { help = HELP_BERSERK, fn = function(options)
2161 | SetOptionRange("BerserkHealth", SLASH_FURY_TROLL, options, 1, 100)
2162 | end },
2163 |
2164 | ["block"] = { help = HELP_BLOCK, fn = function(options)
2165 | Fury_Block()
2166 | end },
2167 |
2168 | ["bloodrage"] = { help = HELP_BLOODRAGE, fn = function(options)
2169 | SetOptionRange("BloodrageHealth", SLASH_FURY_BLOODRAGE, options, 1, 100)
2170 | end },
2171 |
2172 | ["charge"] = { help = HELP_CHARGE, fn = function(options)
2173 | Fury_Charge()
2174 | end },
2175 |
2176 | ["cons"] = { help = HELP_CONS, fn = function(options)
2177 | PrintEnabledOption(ITEM_CONS_JUJU_FLURRY, ITEM_CONS_JUJU_FLURRY)
2178 | PrintEnabledOption(ITEM_CONS_JUJU_CHILL, ITEM_CONS_JUJU_CHILL)
2179 | PrintEnabledOption(ITEM_CONS_JUJU_MIGHT, ITEM_CONS_JUJU_MIGHT)
2180 | PrintEnabledOption(ITEM_CONS_JUJU_EMBER, ITEM_CONS_JUJU_EMBER)
2181 | PrintEnabledOption(ITEM_CONS_JUJU_POWER, ITEM_CONS_JUJU_POWER)
2182 | PrintEnabledOption(ITEM_CONS_OIL_OF_IMMOLATION, ITEM_CONS_OIL_OF_IMMOLATION)
2183 | PrintEnabledOption(MODE_HEADER_DEBUFF, MODE_HEADER_DEBUFF)
2184 | end },
2185 |
2186 | ["dance"] = { help = HELP_DANCE, fn = function(options)
2187 | SetOptionRange("StanceChangeRage", SLASH_FURY_DANCE, options, 0, 100)
2188 | end },
2189 |
2190 | ["deathwish"] = { help = HELP_DEATHWISH, fn = function(options)
2191 | SetOptionRange("DeathWishHealth", SLASH_FURY_DEATHWISH, options, 1, 100)
2192 | end },
2193 |
2194 | ["debuff"] = { help = HELP_DEBUFF, fn = function(options)
2195 | ToggleOption(MODE_HEADER_DEBUFF, MODE_HEADER_DEBUFF)
2196 | end },
2197 |
2198 | ["debug"] = { help = HELP_DEBUG, fn = function(options)
2199 | ToggleOption("Debug", SLASH_FURY_DEBUG)
2200 | end },
2201 |
2202 | ["default"] = { help = HEL_DEFAULT, fn = function(options)
2203 | UpdateConfiguration(true) -- Set configurtion to default
2204 | end },
2205 |
2206 | ["demodiff"] = { help = HELP_DEMODIFF, fn = function(options)
2207 | SetOptionRange("DemoDiff", SLASH_FURY_DEMODIFF, options, -3, 60)
2208 | end },
2209 |
2210 | ["distance"] = { help = HELP_DISTANCE, fn = function(options)
2211 | if UnitCanAttack("player", "target") then
2212 | Print(TEXT_FURY_DISTANCE.." "..Fury_Distance().." "..TEXT_FURY_YARDS)
2213 | else
2214 | Print(TEXT_FURY_NO_ATTACKABLE_TARGET)
2215 | end
2216 | end },
2217 |
2218 | ["earthstrike"] = { help = HELP_EARTHSTRIKE, fn = function(options)
2219 | ToggleOption(ITEM_TRINKET_EARTHSTRIKE, ITEM_TRINKET_EARTHSTRIKE)
2220 | end },
2221 |
2222 | ["executeswap"] = { help = HELP_EXECUTESWAP, fn = function(options)
2223 | ToggleOption("ExecuteSwap", "Execute Swap")
2224 | end },
2225 |
2226 | ["flurrytrigger"] = { help = HELP_FLURRYTRIGGER, fn = function(options)
2227 | SetOptionRange("FlurryTriggerRage", SLASH_FURY_FLURRYTRIGGER, options, 0, 100)
2228 | end },
2229 |
2230 | ["hamstring"] = { help = HELP_HAMSTRING, fn = function(options)
2231 | SetOptionRange("HamstringHealth", SLASH_FURY_HAMSTRING, options, 1, 100)
2232 | end },
2233 |
2234 | ["help"] = { help = HELP_HELP, fn = nil },
2235 |
2236 | ["juju"] = { help = HELP_JUJU, fn = function(options)
2237 | local juju = {
2238 | flurry = function()
2239 | ToggleOption(ITEM_CONS_JUJU_FLURRY, ITEM_CONS_JUJU_FLURRY)
2240 | end,
2241 | chill = function()
2242 | ToggleOption(ITEM_CONS_JUJU_CHILL, ITEM_CONS_JUJU_CHILL)
2243 | end,
2244 | might = function()
2245 | ToggleOption(ITEM_CONS_JUJU_MIGHT, ITEM_CONS_JUJU_MIGHT)
2246 | end,
2247 | ember = function()
2248 | ToggleOption(ITEM_CONS_JUJU_EMBER, ITEM_CONS_JUJU_EMBER)
2249 | end,
2250 | power = function()
2251 | ToggleOption(ITEM_CONS_JUJU_POWER, ITEM_CONS_JUJU_POWER)
2252 | end
2253 | }
2254 | if juju[options] then
2255 | juju[options]()
2256 | else
2257 | Print(HELP_JUJU)
2258 | end
2259 | end },
2260 |
2261 | ["kots"] = { help = HELP_KOTS, fn = function(options)
2262 | ToggleOption(ITEM_TRINKET_KOTS, ITEM_TRINKET_KOTS)
2263 | end },
2264 |
2265 | ["log"] = { help = HELP_LOG, fn = function(options)
2266 | if options == "on" then
2267 | LogToFile(true)
2268 | else
2269 | LogToFile(false)
2270 | end
2271 | end },
2272 |
2273 | ["ooi"] = { help = HELP_OOI, fn = function(options)
2274 | ToggleOption(ITEM_CONS_OIL_OF_IMMOLATION, ITEM_CONS_OIL_OF_IMMOLATION)
2275 | end },
2276 |
2277 | ["prot"] = { help = HELP_PROT, fn = function()
2278 | Fury_Togglemode(tankmode, MODE_HEADER_PROT)
2279 | end },
2280 |
2281 | ["rage"] = { help = HELP_RAGE, fn = function(options)
2282 | SetOptionRange("MaximumRage", SLASH_FURY_RAGE, options, 0, 100)
2283 | end },
2284 |
2285 | ["shoot"] = { help = HELP_SHOOT, fn = function(options)
2286 | Fury_Shoot()
2287 | end },
2288 |
2289 | slayer = { help = HELP_SLAYERS_CREST, fn = function(options)
2290 | ToggleOption(ITEM_TRINKET_SLAYERS_CREST, ITEM_TRINKET_SLAYERS_CREST)
2291 | end },
2292 | ["slayer's"] = { help = HELP_SLAYERS_CREST, fn = function(options)
2293 | ToggleOption(ITEM_TRINKET_SLAYERS_CREST, ITEM_TRINKET_SLAYERS_CREST)
2294 | end },
2295 |
2296 | ["stance"] = { help = HELP_STANCE, fn = function(options)
2297 | if options == ABILITY_BATTLE_STANCE_FURY
2298 | or options == "1" then
2299 | Fury_Configuration["PrimaryStance"] = 1
2300 | Print(SLASH_FURY_STANCE..ABILITY_BATTLE_STANCE_FURY..".")
2301 | elseif options == ABILITY_DEFENSIVE_STANCE_FURY
2302 | or options == "2" then
2303 | Fury_Configuration["PrimaryStance"] = 2
2304 | Print(SLASH_FURY_STANCE..ABILITY_DEFENSIVE_STANCE_FURY..".")
2305 | elseif options == ABILITY_BERSERKER_STANCE_FURY
2306 | or options == "3" then
2307 | Fury_Configuration["PrimaryStance"] = 3
2308 | Print(SLASH_FURY_STANCE..ABILITY_BERSERKER_STANCE_FURY..".")
2309 | elseif options == "default" then
2310 | Fury_Configuration["PrimaryStance"] = false
2311 | Print(SLASH_FURY_STANCE..TEXT_FURY_DEFAULT..".")
2312 | else
2313 | Fury_Configuration["PrimaryStance"] = 0
2314 | Print(SLASH_FURY_NOSTANCE..TEXT_FURY_DISABLED..".")
2315 | end
2316 | end },
2317 |
2318 | ["talents"] = { help = HELP_TALENTS, fn = function(options)
2319 | Print(CHAT_TALENTS_RESCAN_FURY)
2320 | Fury_InitDistance()
2321 | Fury_ScanTalents()
2322 | end },
2323 |
2324 | ["threat"] = { help = HELP_THREAT, fn = function(options)
2325 | -- If HS then use cleave, if cleave then use HS
2326 | if Fury_Configuration[ABILITY_HEROIC_STRIKE_FURY] then
2327 | Fury_Configuration[ABILITY_HEROIC_STRIKE_FURY] = false
2328 | Fury_Configuration[ABILITY_CLEAVE_FURY] = true
2329 | Print(SLASH_FURY_LOWTHREAT)
2330 | else
2331 | Fury_Configuration[ABILITY_CLEAVE_FURY] = false
2332 | Fury_Configuration[ABILITY_HEROIC_STRIKE_FURY] = true
2333 | Print(SLASH_FURY_HIGHTHREAT)
2334 | end
2335 | end },
2336 |
2337 | ["toggle"] = { help = HELP_TOGGLE, fn = function(options)
2338 | ToggleOption("Enabled", BINDING_HEADER_FURY)
2339 | end },
2340 |
2341 | ["unit"] = { help = HELP_UNIT, fn = function(options)
2342 | if options ~= nil
2343 | and options ~= "" then
2344 | target = options
2345 | elseif UnitName("target") ~= nil then
2346 | target = "target"
2347 | else
2348 | target = "player"
2349 | end
2350 | Print(TEXT_FURY_NAME..(UnitName(target) or "")..TEXT_FURY_CLASS..(UnitClass(target) or "")..TEXT_FURY_CLASSIFICATION..(UnitClassification(target) or ""))
2351 | if UnitRace(target) then
2352 | Print(TEXT_FURY_RACE..(UnitRace(target) or ""))
2353 | else
2354 | Print(TEXT_FURY_TYPE..(UnitCreatureType(target) or ""))
2355 | end
2356 | PrintEffects(target)
2357 | end },
2358 |
2359 | ["version"] = { help = HELP_VERSION, fn = function(options)
2360 | Print(SLASH_FURY_VERSION.." "..FURY_VERSION)
2361 | end },
2362 |
2363 | ["where"] = { help = HELP_WHERE, fn = function(options)
2364 |
2365 | Print(TEXT_FURY_MAP_ZONETEXT..(GetMinimapZoneText() or ""))
2366 | Print(TEXT_FURY_REAL_ZONETEXT..(GetRealZoneText() or ""))
2367 | Print(TEXT_FURY_SUB_ZONETEXT..(GetSubZoneText() or ""))
2368 | Print(TEXT_FURY_PVP_INFO..(GetZonePVPInfo() or ""))
2369 | Print(TEXT_FURY_ZONETEXT..(GetZoneText() or ""))
2370 | end },
2371 |
2372 | }
2373 |
2374 | if command == nil
2375 | or command == "" then
2376 | Fury()
2377 | else
2378 | local cmd = commands[command]
2379 | if cmd ~= nil
2380 | and cmd.fn ~= nil then
2381 | cmd.fn(options)
2382 | elseif command == "help" then
2383 | DoHelp(commands, options)
2384 | elseif cmd then
2385 | Print(HELP_UNKNOWN..command)
2386 | else
2387 | DoHelp(commands, "")
2388 | end
2389 | end
2390 | end
2391 |
2392 | --------------------------------------------------
2393 | --
2394 | -- Event Handlers
2395 | --
2396 | --------------------------------------------------
2397 | -- Callback on load
2398 | function Fury_OnLoad()
2399 | local evs = {
2400 | "CHARACTER_POINTS_CHANGED",
2401 | "CHAT_MSG_COMBAT_CREATURE_VS_SELF_MISSES",
2402 | "CHAT_MSG_COMBAT_SELF_MISSES",
2403 | "CHAT_MSG_MONSTER_EMOTE",
2404 | "CHAT_MSG_SPELL_AURA_GONE_SELF",
2405 | "CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS",
2406 | "CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF",
2407 | "CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE",
2408 | "CHAT_MSG_SPELL_DAMAGESHIELDS_ON_SELF",
2409 | "CHAT_MSG_SPELL_HOSTILEPLAYER_BUFF",
2410 | "CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE",
2411 | "CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE",
2412 | "CHAT_MSG_SPELL_SELF_DAMAGE",
2413 | "PLAYER_AURAS_CHANGED",
2414 | "PLAYER_ENTER_COMBAT",
2415 | "PLAYER_ENTERING_WORLD",
2416 | "PLAYER_LEAVE_COMBAT",
2417 | "PLAYER_LEVEL_UP",
2418 | "PLAYER_REGEN_DISABLED",
2419 | "PLAYER_REGEN_ENABLED",
2420 | "PLAYER_TARGET_CHANGED",
2421 | "VARIABLES_LOADED",
2422 | }
2423 | for _, ev in pairs(evs) do
2424 | this:RegisterEvent(ev)
2425 | end
2426 |
2427 | WWEnemies = { Hist = {}, WWTime = 0, WWCount = nil, CleaveTime = 0, CleaveCount = nil }
2428 | for i = 0,5 do
2429 | WWEnemies.Hist[i] = 0
2430 | end
2431 |
2432 | FuryLastSpellCast = GetTime()
2433 | FuryLastStanceCast = GetTime()
2434 | FuryLastLog = GetTime()
2435 | FuryRevengeTime = 0
2436 | FuryLastChargeCast = 0
2437 | FuryRevengeReadyUntil = 0
2438 | FlurryCombatTotal = 0
2439 | FuryCombatTotal = 0
2440 | SlashCmdList["FURY"] = Fury_SlashCommand
2441 | SLASH_FURY1 = "/fury"
2442 | end
2443 |
2444 | --------------------------------------------------
2445 | -- Event handler
2446 | function Fury_OnEvent(event)
2447 |
2448 | if event == "VARIABLES_LOADED" then
2449 | -- Check for settings
2450 | Fury_Configuration_Init()
2451 |
2452 | elseif (event == "CHAT_MSG_COMBAT_SELF_MISSES"
2453 | or event == "CHAT_MSG_SPELL_SELF_DAMAGE"
2454 | or event == "CHAT_MSG_SPELL_DAMAGESHIELDS_ON_SELF")
2455 | and (string.find(arg1, CHAT_OVERPOWER1_FURY)
2456 | or string.find(arg1, CHAT_OVERPOWER2_FURY)) then
2457 | -- Check to see if enemy dodges
2458 | FuryOverpower = GetTime()
2459 |
2460 | elseif event == "CHAT_MSG_SPELL_SELF_DAMAGE"
2461 | and (string.find(arg1, CHAT_OVERPOWER3_FURY)
2462 | or string.find(arg1, CHAT_OVERPOWER4_FURY)
2463 | or string.find(arg1, CHAT_OVERPOWER5_FURY)) then
2464 | -- Check to see if Overpower is used
2465 | FuryOverpower = nil
2466 |
2467 | elseif event == "CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE"
2468 | or event == "CHAT_MSG_SPELL_HOSTILEPLAYER_BUFF"
2469 | or event == "CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF"
2470 | or event == "CHAT_MSG_SPELL_HOSTILEPLAYER_DAMAGE" then
2471 | -- Check to see if enemy casts spell
2472 | for mob, spell in string.gfind(arg1, CHAT_CAST_FURY) do
2473 | if mob == UnitName("target")
2474 | and UnitCanAttack("player", "target")
2475 | and mob ~= spell then
2476 | FurySpellInterrupt = GetTime()
2477 | return
2478 | end
2479 | end
2480 |
2481 | elseif event == "CHAT_MSG_SPELL_SELF_DAMAGE"
2482 | and string.find(arg1, CHAT_INTERRUPT1_FURY)
2483 | or event == "CHAT_MSG_COMBAT_SELF_MISSES"
2484 | and (string.find(arg1, CHAT_INTERRUPT2_FURY)
2485 | or string.find(arg1, CHAT_INTERRUPT3_FURY)
2486 | or string.find(arg1, CHAT_INTERRUPT4_FURY)
2487 | or string.find(arg1, CHAT_INTERRUPT5_FURY)) then
2488 | -- Check to see if Pummel/Shield Bash is used
2489 | FurySpellInterrupt = nil
2490 |
2491 | elseif (event == "CHAT_MSG_SPELL_SELF_DAMAGE"
2492 | or event == "CHAT_MSG_COMBAT_SELF_MISSES")
2493 | and string.find(arg1, CHAT_WHIRLWIND_FURY) then
2494 | if WWEnemies.WWCount == nil then
2495 | WWEnemies.WWCount = 1
2496 | else
2497 | WWEnemies.WWCount = WWEnemies.WWCount + 1
2498 | end
2499 |
2500 | elseif (event == "CHAT_MSG_SPELL_SELF_DAMAGE"
2501 | or event == "CHAT_MSG_COMBAT_SELF_MISSES")
2502 | and string.find(arg1, CHAT_CLEAVE_FURY) then
2503 | if WWEnemies.CleaveCount == nil then
2504 | WWEnemies.CleaveCount = 1
2505 | WWEnemies.CleaveTime = GetTime()
2506 | else
2507 | WWEnemies.CleaveCount = WWEnemies.CleaveCount + 1
2508 | end
2509 |
2510 | elseif event == "CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE" then
2511 | -- Check to see if getting affected by breakable effects
2512 | if arg1 == CHAT_SAP_FURY
2513 | or arg1 == CHAT_GOUGE_FURY
2514 | or arg1 == CHAT_REPENTANCE_FURY
2515 | or arg1 == CHAT_ROCKET_HELM_FURY then
2516 | FuryIncapacitate = true
2517 |
2518 | elseif arg1 == CHAT_FEAR_FURY
2519 | or arg1 == CHAT_INTIMIDATING_SHOUT_FURY
2520 | or arg1 == CHAT_PSYCHIC_SCREAM_FURY
2521 | or arg1 == CHAT_PANIC_FURY
2522 | or arg1 == CHAT_BELLOWING_ROAR_FURY
2523 | or arg1 == CHAT_ANCIENT_DESPAIR_FURY
2524 | or arg1 == CHAT_TERRIFYING_SCREECH_FURY
2525 | or arg1 == CHAT_HOWL_OF_TERROR_FURY then
2526 | FuryFear = true
2527 | end
2528 |
2529 | elseif event == "CHAT_MSG_SPELL_AURA_GONE_SELF" then
2530 | -- Check to see if breakable effects fades
2531 | if arg1 == CHAT_SAP2_FURY
2532 | or arg1 == CHAT_GOUGE2_FURY
2533 | or arg1 == CHAT_REPENTANCE2_FURY
2534 | or arg1 == CHAT_ROCKET_HELM2_FURY then
2535 | FuryIncapacitate = nil
2536 |
2537 | elseif arg1 == CHAT_FEAR2_FURY
2538 | or arg1 == CHAT_INTIMIDATING_SHOUT2_FURY
2539 | or arg1 == CHAT_PSYCHIC_SCREAM2_FURY
2540 | or arg1 == CHAT_PANIC2_FURY
2541 | or arg1 == CHAT_BELLOWING_ROAR2_FURY
2542 | or arg1 == CHAT_ANCIENT_DESPAIR2_FURY
2543 | or arg1 == CHAT_TERRIFYING_SCREECH2_FURY
2544 | or arg1 == CHAT_HOWL_OF_TERROR2_FURY then
2545 | FuryFear = nil
2546 |
2547 | elseif arg1 == CHAT_LOST_FLURRY_FURY then
2548 | if FuryFlurryStart then
2549 | FlurryCombatTotal = FlurryCombatTotal + (GetTime() - FuryFlurryStart)
2550 | FuryFlurryStart = nil
2551 | end
2552 | if FuryAttackEnd
2553 | and FuryFlurry
2554 | and (FlurryCombatTotal > 0)
2555 | and (FuryCombatTotal > 0) then
2556 | local p = math.floor(FlurryCombatTotal / FuryCombatTotal * 100)
2557 | Debug(TEXT_FURY_FLURRY..p.."%")
2558 | FlurryCombatTotal = 0
2559 | FuryCombatTotal = 0
2560 | end
2561 | end
2562 |
2563 | elseif event == "CHAT_MSG_COMBAT_CREATURE_VS_SELF_MISSES" then
2564 | -- set up time for revenge
2565 | if string.find(arg1, CHAT_BLOCK_FURY)
2566 | or string.find(arg1, CHAT_PARRY_FURY)
2567 | or string.find(arg1, CHAT_DODGE_FURY) then
2568 | FuryRevengeReadyUntil = GetTime() + 4
2569 | end
2570 |
2571 | elseif event == "CHAT_MSG_MONSTER_EMOTE" then
2572 | -- Check to see if enemy flees
2573 | Fury_RunnerDetect(arg1, arg2)
2574 |
2575 | elseif event == "PLAYER_AURAS_CHANGED" then
2576 | -- Check to see if mounted
2577 | if UnitIsMounted("player") then
2578 | FuryMount = true
2579 | else
2580 | FuryMount = false
2581 | end
2582 |
2583 | elseif event == "CHAT_MSG_SPELL_PERIODIC_SELF_BUFFS" then
2584 | if arg1 == CHAT_GAINED_FLURRY_FURY then
2585 | FuryFlurryStart = GetTime()
2586 | end
2587 |
2588 | elseif event == "PLAYER_TARGET_CHANGED" then
2589 | -- Reset Overpower and interrupts, check to see if talents are being calculated
2590 | Fury_SetEnemies(1)
2591 | FuryOverpower = nil
2592 | FuryFleeing = nil
2593 | FurySpellInterrupt = nil
2594 | if not FuryTalents
2595 | and UnitClass("player") == CLASS_WARRIOR_FURY then
2596 | if Fury_Configuration["DebugChannel"] then
2597 | LogToFile(true)
2598 | end
2599 | Fury_InitDistance()
2600 | Fury_ScanTalents()
2601 | end
2602 |
2603 | elseif (event == "CHARACTER_POINTS_CHANGED"
2604 | and arg1 == -1)
2605 | or event == "PLAYER_LEVEL_UP"
2606 | or event == "PLAYER_ENTERING_WORLD"
2607 | and UnitClass("player") == CLASS_WARRIOR_FURY then
2608 | if Fury_Configuration["DebugChannel"] then
2609 | LogToFile(true)
2610 | end
2611 | Fury_InitDistance()
2612 | Fury_ScanTalents()
2613 |
2614 | elseif event == "PLAYER_REGEN_DISABLED" then
2615 | FuryCombat = true
2616 | FuryCombatStart = GetTime()
2617 | FlurryCombatTotal = 0
2618 | FuryCombatTotal = 0
2619 | if not FuryAttackStart then
2620 | FuryAttackEnd = nil
2621 | FuryAttackStart = FuryCombatStart
2622 | end
2623 |
2624 | elseif event == "PLAYER_REGEN_ENABLED" then
2625 | FuryCombatEnd = GetTime()
2626 | FuryCombat = nil
2627 | FuryDanceDone = nil
2628 | FuryOldStance = nil
2629 | FuryFlurryStart = nil
2630 | if FuryFlurry
2631 | and (FlurryCombatTotal > 0) then
2632 | local p = math.floor(FlurryCombatTotal / FuryCombatTotal * 100)
2633 | Debug(TEXT_FURY_FLURRY..p.."%")
2634 | FlurryCombatTotal = 0
2635 | FuryCombatTotal = 0
2636 | end
2637 | for slot = 1, 18 do
2638 | local name = CheckCooldown(slot)
2639 | if name then
2640 | Print(name.." "..CHAT_IS_ON_CD_FURY)
2641 | end
2642 | end
2643 |
2644 | elseif event == "PLAYER_ENTER_COMBAT" then
2645 | FuryAttack = true
2646 | FuryAttackEnd = nil
2647 | FuryAttackStart = GetTime()
2648 | if HasBuff("player", "Ability_GhoulFrenzy") then
2649 | FuryFlurryStart = GetTime()
2650 | end
2651 |
2652 | elseif event == "PLAYER_LEAVE_COMBAT" then
2653 | FuryAttack = nil
2654 | if FuryAttackStart then
2655 | FuryAttackEnd = GetTime()
2656 | FuryCombatTotal = FuryCombatTotal + (FuryAttackEnd - FuryAttackStart)
2657 | if FuryFlurryStart then
2658 | FlurryCombatTotal = FlurryCombatTotal + (FuryAttackEnd - FuryFlurryStart)
2659 | FuryFlurryStart = nil
2660 | end
2661 | end
2662 |
2663 | elseif event == "CHAT_MSG_SPELL_DAMAGESHIELDS_ON_SELF" then
2664 | local _,_,name = string.find(arg1, CHAT_DISARM_IMMUNE_FURY)
2665 | if name ~= nil then
2666 | Fury_ImmuneDisarm[name] = true
2667 | Print(TEXT_FURY_IMMUNE_TO_DISARM1..name..TEXT_FURY_IMMUNE_TO_DISARM2)
2668 | end
2669 | end
2670 | end
2671 |
2672 | --------------------------------------------------
2673 |
--------------------------------------------------------------------------------