This commit is contained in:
Олег Цветков 2025-08-22 18:51:20 +03:00
parent ff43ac94e7
commit dfe66c3e74

View File

@ -6,6 +6,7 @@ textures['Kill Command'] = 'ability_hunter_killcommand'
textures['Baited Shot'] = 'inv_misc_food_66' textures['Baited Shot'] = 'inv_misc_food_66'
textures['Arcane Shot'] = 'Ability_ImpalingBolt' textures['Arcane Shot'] = 'Ability_ImpalingBolt'
textures['Multi-Shot'] = 'Ability_UpgradeMoonGlaive' textures['Multi-Shot'] = 'Ability_UpgradeMoonGlaive'
textures['Steady Shot'] = 'Ability_Hunter_SteadyShot'
textures['Concussive Shot'] = 'Spell_Frost_Stun' textures['Concussive Shot'] = 'Spell_Frost_Stun'
textures['Throw'] = 'Ability_Throw' textures['Throw'] = 'Ability_Throw'
textures['Blood Fury'] = 'Racial_Orc_BerserkerStrength' textures['Blood Fury'] = 'Racial_Orc_BerserkerStrength'
@ -85,8 +86,8 @@ local function cast(spellName)
CastSpellByName(spellName) CastSpellByName(spellName)
end end
local function healthGtThan(percent, health, max) local function gt(percent, value, max)
if health / max > percent / 100 then if value / max > percent / 100 then
return true return true
end end
return false return false
@ -125,19 +126,21 @@ local function attack()
cast('Hunter\'s Mark') cast('Hunter\'s Mark')
elseif isUsable('Blood Fury') and not onCooldown('Blood Fury') then elseif isUsable('Blood Fury') and not onCooldown('Blood Fury') then
cast('Blood Fury') cast('Blood Fury')
elseif isUsable('Baited Shot') and not onCooldown('Baited Shot') then elseif isUsable('Baited Shot') and not onCooldown('Baited Shot') and gt(40, mana, UnitManaMax('player')) then
cast('Baited Shot') cast('Baited Shot')
elseif isUsable('Kill Command') and not onCooldown('Kill Command') then elseif isUsable('Kill Command') and not onCooldown('Kill Command') and gt(60, mana, UnitManaMax('player')) then
cast('Kill Command') cast('Kill Command')
-- elseif isUsable('Steady Shot') and not onCooldown('Steady Shot') then
-- cast('Steady Shot')
elseif isUsable('Arcane Shot') and not onCooldown('Arcane Shot') then elseif isUsable('Arcane Shot') and not onCooldown('Arcane Shot') then
cast('Arcane Shot(Rank 1)') cast('Arcane Shot(Rank 1)')
elseif isUsable('Multi-Shot') and not onCooldown('Multi-Shot') then elseif isUsable('Multi-Shot') and not onCooldown('Multi-Shot') and gt(80, mana, UnitManaMax('player')) then
cast('Multi-Shot') cast('Multi-Shot')
elseif not IsAutoRepeatAction(47) then elseif not IsAutoRepeatAction(47) then
cast('Auto Shot') cast('Auto Shot')
elseif isUsable('Serpent Sting') and not buffed('Serpent Sting', 'target') and -- elseif isUsable('Serpent Sting') and not buffed('Serpent Sting', 'target') and
healthGtThan(25, UnitHealth('target'), UnitHealthMax('target')) then -- healthGtThan(25, UnitHealth('target'), UnitHealthMax('target')) then
cast('Serpent Sting') -- cast('Serpent Sting')
elseif isUsable('Concussive Shot') and not onCooldown('Concussive Shot') then elseif isUsable('Concussive Shot') and not onCooldown('Concussive Shot') then
cast('Concussive Shot') cast('Concussive Shot')
end end