From 1424d881b502d5a1e13845a0efdc7c07f7b53e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=A6=D0=B2=D0=B5=D1=82=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Mon, 28 Jul 2025 10:53:33 -0400 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20OBWT.lua?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OBWT.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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