Kept seeing this pop up in forums while I was working on my Rangers. Was curious if this would help anyone if it was added in to the LUA. Not 100% sure it will entirely work as planned.
-- create a global variable in get_sets or wherever the initial load takes place.
Code
_flurry = nil
p = require('packets') -- Added this because its how I use it in my files. Not sure how others use.
-- Put this at the end of gearswap file.
Code
windower.raw_register_event("incoming chunk", function(id, data)
if id == 0x028 then
local packet = p.parse('incoming', data)
if packet["Category"] == 4 then
if packet["Param"] == 845 and _flurry ~= 1 and _flurry ~= 2 then
-- Set flurry status @ 1.
_flurry = 1
elseif packet["Param"] == 846 and _flurry ~= 2 then
-- Set flurry status @ 2.
_flurry = 2
else
-- Flurry was already active.
end
end
end
end
Can now use global variable to check flurry status, and clear variable (_flurry = nil) when buff is lost. This is purely me just thinking. Sometimes having it plan for you causes more issues than you want.
Edit: Added buff clear for the sake of it.
Inside buff_change function.
Code
if gain then
else
-- Handle logic when flurry buff is lost.
if name == 'Flurry' then
_flurry = nil
print("Flurry status cleared.")
end
end