reshift
This commit is contained in:
parent
0111e17ed6
commit
d1bd23a38d
31
main.lua
31
main.lua
@ -44,6 +44,16 @@ local function isUsable(spellName)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function buffIndex(spellTexture)
|
||||||
|
for i = 1, 40 do
|
||||||
|
local texturePath = UnitBuff('player', i)
|
||||||
|
if texturePath ~= nil and strfind(texturePath, spellTexture) then
|
||||||
|
return i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
local function debuffIndex(spellTexture)
|
local function debuffIndex(spellTexture)
|
||||||
for i = 1, 40 do
|
for i = 1, 40 do
|
||||||
local texturePath = UnitDebuff('target', i)
|
local texturePath = UnitDebuff('target', i)
|
||||||
@ -54,6 +64,16 @@ local function debuffIndex(spellTexture)
|
|||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function getBuffTimeLeft(buffName)
|
||||||
|
local buffTexture = getTexture(buffName)
|
||||||
|
if buffTexture then
|
||||||
|
local name, _, _, _, _, duration, expirationTime = UnitBuff('player', buffIndex(buffTexture))
|
||||||
|
return GetPlayerBuffTimeLeft(buffIndex(buffTexture))
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function debuffStacks(spellName)
|
local function debuffStacks(spellName)
|
||||||
local spellTexture = getTexture(spellName)
|
local spellTexture = getTexture(spellName)
|
||||||
if spellTexture then
|
if spellTexture then
|
||||||
@ -64,7 +84,6 @@ local function debuffStacks(spellName)
|
|||||||
return stacks
|
return stacks
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
print(spellName)
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -115,6 +134,12 @@ local function target()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function reshift(lt)
|
||||||
|
if isUsable('Reshift') and UnitMana('player') <= lt then
|
||||||
|
cast('Reshift')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function dps(cp)
|
local function dps(cp)
|
||||||
local mana = UnitMana('player')
|
local mana = UnitMana('player')
|
||||||
local health = UnitHealth('player')
|
local health = UnitHealth('player')
|
||||||
@ -173,10 +198,14 @@ end
|
|||||||
|
|
||||||
local function dps_st()
|
local function dps_st()
|
||||||
target()
|
target()
|
||||||
|
if buffed('Clearcasting', 'player') then reshift(40) end
|
||||||
|
if getBuffTimeLeft('Tiger\'s Fury') < 5 then reshift(40) end
|
||||||
dps(5)
|
dps(5)
|
||||||
end
|
end
|
||||||
local function dps_trash()
|
local function dps_trash()
|
||||||
target()
|
target()
|
||||||
|
if buffed('Clearcasting', 'player') then reshift(40) end
|
||||||
|
if getBuffTimeLeft('Tiger\'s Fury') < 5 then reshift(40) end
|
||||||
dps(3)
|
dps(3)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user