This commit is contained in:
Олег Цветков 2025-09-18 16:58:04 +03:00
parent 9d084e648b
commit 0111e17ed6

123
main.lua
View File

@ -100,7 +100,7 @@ local function gt(percent, value, max)
return false return false
end end
local function attack() local function target()
if GetUnitName('target') == nil then if GetUnitName('target') == nil then
TargetNearestEnemy() TargetNearestEnemy()
return return
@ -111,133 +111,98 @@ local function attack()
elseif UnitIsDead('target') == 1 then elseif UnitIsDead('target') == 1 then
ClearTarget() ClearTarget()
return return
-- elseif UnitIsPlayer('target') == 1 then end
-- ClearTarget() end
-- return
end end
local function dps(cp)
local mana = UnitMana('player') local mana = UnitMana('player')
local health = UnitHealth('player') local health = UnitHealth('player')
if (not PlayerFrame.inCombat) then if (not PlayerFrame.inCombat) then
AttackTarget() AttackTarget()
else else
cast('Faerie Fire (Feral)') if comboPoints() < cp then
-- if isUsable('Reshift') and mana <= 60 and not buffed('Tiger\'s Fury', 'player') then
-- cast('Reshift')
if isUsable('Faerie Fire (Feral)') and not buffed('Faerie Fire (Feral)', 'target') and if isUsable('Faerie Fire (Feral)') and not buffed('Faerie Fire (Feral)', 'target') and
not onCooldown('Faerie Fire (Feral)') then not onCooldown('Faerie Fire (Feral)') then
cast('Faerie Fire (Feral)()') cast('Faerie Fire (Feral)()')
elseif isUsable('Tiger\'s Fury') and not buffed('Tiger\'s Fury', 'player') then elseif isUsable('Tiger\'s Fury') and not buffed('Tiger\'s Fury', 'player') then
cast('Tiger\'s Fury') cast('Tiger\'s Fury')
elseif isUsable('Ferocious Bite') and comboPoints() > 2 then
cast('Ferocious Bite')
elseif isUsable('Rake') and not buffed('Rake', 'target') then elseif isUsable('Rake') and not buffed('Rake', 'target') then
cast('Rake') cast('Rake')
elseif isUsable('Rip') and comboPoints() > 0 and not buffed('Rip', 'target') then elseif isUsable('Rip') and comboPoints() > 0 and not buffed('Rip', 'target') then
cast('Rip') cast('Rip')
-- elseif isUsable('Shred') then
-- cast('Shred')
elseif isUsable('Claw') then elseif isUsable('Claw') then
cast('Claw') cast('Claw')
-- elseif isUsable('Blood Fury') and not onCooldown('Blood Fury') then end
-- cast('Blood Fury') elseif comboPoints() >= cp then
-- elseif not IsAutoRepeatAction(47) then if isUsable('Ferocious Bite') then
-- cast('Auto Shot') cast('Ferocious Bite')
-- elseif isUsable('Multi-Shot') and not onCooldown('Multi-Shot') then
-- cast('Multi-Shot')
-- elseif isUsable('Steady Shot') and not onCooldown('Steady Shot') then
-- cast('Steady Shot')
-- elseif isUsable('Baited Shot') and not onCooldown('Baited Shot') then
-- cast('Baited Shot')
-- elseif isUsable('Kill Command') and not onCooldown('Kill Command') then
-- cast('Kill Command')
-- elseif isUsable('Arcane Shot') and not onCooldown('Arcane Shot') then
-- cast('Arcane Shot(Rank 1)')
-- elseif isUsable('Serpent Sting') and not buffed('Serpent Sting', 'target') and
-- healthGtThan(25, UnitHealth('target'), UnitHealthMax('target')) then
-- cast('Serpent Sting')
-- elseif isUsable('Concussive Shot') and not onCooldown('Concussive Shot') then
-- cast('Concussive Shot')
end end
end end
end end
end end
local function bear_solo() local function tank()
if GetUnitName('target') == nil then
TargetNearestEnemy()
return
else
if UnitCanAttack('player', 'target') == nil then
ClearTarget()
return
elseif UnitIsDead('target') == 1 then
ClearTarget()
return
end
local mana = UnitMana('player') local mana = UnitMana('player')
local health = UnitHealth('player') local health = UnitHealth('player')
if (not PlayerFrame.inCombat) then if (not PlayerFrame.inCombat) then
AttackTarget() AttackTarget()
else else
if mana < 10 then
if isUsable('Reshift') and mana <= 10 then if isUsable('Reshift') and mana <= 10 then
cast('Reshift') cast('Reshift')
elseif isUsable('Savage Bite') and not onCooldown('Savage Bite') then
cast('Savage Bite')
elseif isUsable('Enrage') and not buffed('Enrage', 'player') and not onCooldown('Enrage') then elseif isUsable('Enrage') and not buffed('Enrage', 'player') and not onCooldown('Enrage') then
cast('Enrage') cast('Enrage')
elseif isUsable('Faerie Fire (Feral)') and not buffed('Faerie Fire (Feral)', 'target') and end
end
if mana > 60 then
if isUsable('Faerie Fire (Feral)') and not buffed('Faerie Fire (Feral)', 'target') and
not onCooldown('Faerie Fire (Feral)') then not onCooldown('Faerie Fire (Feral)') then
cast('Faerie Fire (Feral)()') cast('Faerie Fire (Feral)()')
elseif isUsable('Demoralizing Roar') and not buffed('Demoralizing Roar', 'target') then elseif isUsable('Demoralizing Roar') and not buffed('Demoralizing Roar', 'target') then
cast('Demoralizing Roar') cast('Demoralizing Roar')
elseif isUsable('Maul') then end
end
if isUsable('Maul') then
cast('Maul') cast('Maul')
end end
end end
end end
local function dps_st()
target()
dps(5)
end
local function dps_trash()
target()
dps(3)
end end
local function bear_aoe() local function tank_st()
if GetUnitName('target') == nil then target()
TargetNearestEnemy() tank()
return if isUsable('Savage Bite') and not onCooldown('Savage Bite') then
else cast('Savage Bite')
if UnitCanAttack('player', 'target') == nil then end
ClearTarget()
return
elseif UnitIsDead('target') == 1 then
ClearTarget()
return
end end
local mana = UnitMana('player') local function tank_aoe()
local health = UnitHealth('player') target()
tank()
if (not PlayerFrame.inCombat) then if isUsable('Swipe') then
AttackTarget()
else
if isUsable('Reshift') and mana <= 10 then
cast('Reshift')
elseif isUsable('Enrage') and not buffed('Enrage', 'player') and not onCooldown('Enrage') then
cast('Enrage')
elseif isUsable('Demoralizing Roar') and not buffed('Demoralizing Roar', 'target') then
cast('Demoralizing Roar')
elseif isUsable('Swipe') then
cast('Swipe') cast('Swipe')
end end
end end
end
end
function obd_onLoad() function obd_onLoad()
SlashCmdList['OBD'] = attack SlashCmdList['DPS_ST'] = dps_st
SlashCmdList['OBDBS'] = bear_solo SlashCmdList['DPS_TRASH'] = dps_trash
SlashCmdList['OBDBA'] = bear_aoe SlashCmdList['TANK_ST'] = tank_st
SLASH_OBD1 = '/obd_lvl' SlashCmdList['TANK_AOE'] = tank_aoe
SLASH_OBDBS1 = '/obd_bear_solo' SLASH_DPS_ST1 = '/dps_st'
SLASH_OBDBA1 = '/obd_bear_aoe' SLASH_DPS_TRASH1 = '/dps_trash'
SLASH_TANK_ST1 = '/tank_st'
SLASH_TANK_AOE1 = '/tank_aoe'
end end