diff --git a/OBWT.lua b/OBWT.lua index 64ccd6f..a98fd55 100644 --- a/OBWT.lua +++ b/OBWT.lua @@ -1,7 +1,6 @@ local function getSlot(spellTexture) for i = 1, 120, 1 do if GetActionTexture(i) ~= nil then - print(GetActionTexture(i)) if(strfind(GetActionTexture(i), spellTexture)) then return i end end end @@ -26,9 +25,7 @@ local function debuffStacks(spellTexture) if stacks == nill then return 0 else return stacks end end -SLASH_OBWT1 = "/obwt" - -SlashCmdList.OBWT = function(cmd) +local function main(cmd) local rage = UnitMana('player') local bloodrage = 'Ability_Racial_BloodRage' local revenge = 'Ability_Warrior_Revenge' @@ -46,10 +43,19 @@ SlashCmdList.OBWT = function(cmd) CastSpellByName('Revange') elseif isUsable(sunderArmor) and debuffStacks(sunderArmor) < 5 then CastSpellByName('Sunder Armor') - elseif rage > 50 and buffed('Rend', 'target') == nil and isUsable(rend) then + elseif rage > 60 and buffed('Shield Block') == nil then + CastSpellByName('Shield Block') + elseif rage > 70 and buffed('Demoralizing Shout', 'target') == nil then + CastSpellByName('Demoralizing Shout') + elseif rage > 80 and buffed('Rend', 'target') == nil and isUsable(rend) then CastSpellByName('Rend') - elseif rage > 70 and isUsable(heroicStrike) then + elseif rage > 90 and isUsable(heroicStrike) then CastSpellByName('Heroic Strike') end end +end + +function OBWT_OnLoad() + SlashCmdList["OBWT"] = main + SLASH_OBWT1 = "/obwt" end \ No newline at end of file