Created
June 7, 2018 12:39
-
-
Save zyxd/8c746a621ae4b299f578298291e44a9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function zyxdAttack() | |
-- If target exists, enemy | |
if GetUnitName("target") and not UnitIsFriend("player", "target") and not IsCurrentAction(60) then | |
UseAction(60); | |
end | |
end | |
function zyxdWarriorCharge() | |
-- If target exists and enemy | |
if GetUnitName("target") and not UnitIsFriend("player", "target") then | |
zyxdAttack(); | |
if UnitAffectingCombat("player") then | |
icon, name, active = GetShapeshiftFormInfo(3); | |
-- If Berserker Stance is active | |
if active then | |
CastSpellByName("Intercept"); | |
else | |
CastSpellByName("Berserker Stance"); | |
end | |
else | |
icon, name, active = GetShapeshiftFormInfo(1); | |
-- If Battle Stance is active | |
if active then | |
CastSpellByName("Charge"); | |
else | |
CastSpellByName("Battle Stance"); | |
end | |
end | |
end | |
end | |
function zyxdWarriorHeroic() | |
-- Do not check rage because it's attack ability and we should be Berserker Stance every time | |
-- if GetUnitName("target") and not UnitIsFriend("player", "target") and UnitMana("player") >= 15 then | |
if GetUnitName("target") and not UnitIsFriend("player", "target") then | |
zyxdAttack(); | |
icon, name, active = GetShapeshiftFormInfo(3); | |
-- If Berserker Stance is active | |
if active then | |
CastSpellByName("Heroic Strike"); | |
else | |
CastSpellByName("Berserker Stance"); | |
end | |
end | |
end | |
function zyxdWarriorOverpower() | |
if GetUnitName("target") and not UnitIsFriend("player", "target") and UnitMana("player") >= 5 then | |
zyxdAttack(); | |
icon, name, active = GetShapeshiftFormInfo(1); | |
-- If Battle Stance is active | |
if active then | |
CastSpellByName("Overpower"); | |
else | |
CastSpellByName("Battle Stance"); | |
end | |
end | |
end | |
function zyxdWarriorExecute() | |
if GetUnitName("target") and not UnitIsFriend("player", "target") and UnitMana("player") >= 15 then | |
zyxdAttack(); | |
icon, name, active = GetShapeshiftFormInfo(3); | |
-- If Berserker Stance is active | |
if active then | |
CastSpellByName("Execute"); | |
else | |
CastSpellByName("Berserker Stance"); | |
end | |
end | |
end | |
function zyxdWarriorHamstring() | |
if GetUnitName("target") and not UnitIsFriend("player", "target") and UnitMana("player") >= 10 then | |
zyxdAttack(); | |
icon, name, activeBattle = GetShapeshiftFormInfo(1); | |
icon, name, activeBerserker = GetShapeshiftFormInfo(3); | |
-- If Battle Stance or Berserker Stance is active | |
if activeBattle or activeBerserker then | |
CastSpellByName("Hamstring"); | |
else | |
CastSpellByName("Berserker Stance"); | |
end | |
end | |
end | |
function zyxdWarriorRend() | |
if GetUnitName("target") and not UnitIsFriend("player", "target") and UnitMana("player") >= 10 then | |
zyxdAttack(); | |
icon, name, activeBattle = GetShapeshiftFormInfo(1); | |
icon, name, activeDefensive = GetShapeshiftFormInfo(2); | |
-- If Battle Stance or Defensive Stance is active | |
if activeBattle or activeDefensive then | |
CastSpellByName("Rend"); | |
else | |
CastSpellByName("Battle Stance"); | |
end | |
end | |
end | |
function zyxdWarriorDisarm() | |
if GetUnitName("target") and not UnitIsFriend("player", "target") and UnitMana("player") >= 20 then | |
zyxdAttack(); | |
icon, name, active = GetShapeshiftFormInfo(2); | |
-- If Defensive Stance is active | |
if active then | |
CastSpellByName("Disarm"); | |
else | |
CastSpellByName("Defensive Stance"); | |
end | |
end | |
end | |
function zyxdWarriorRetaliation() | |
icon, name, active = GetShapeshiftFormInfo(1); | |
-- If Battle Stance is active | |
if active then | |
CastSpellByName("Retaliation"); | |
else | |
CastSpellByName("Battle Stance"); | |
end | |
end | |
function zyxdWarriorShieldWall() | |
icon, name, active = GetShapeshiftFormInfo(2); | |
-- If Defensive Stance is active | |
if active then | |
CastSpellByName("Shield Wall"); | |
else | |
CastSpellByName("Defensive Stance"); | |
end | |
end | |
function zyxdWarriorThunderClap() | |
if UnitMana("player") >= 20 then | |
icon, name, active = GetShapeshiftFormInfo(1); | |
-- If Battle Stance is active | |
if active then | |
CastSpellByName("Thunder Clap"); | |
else | |
CastSpellByName("Battle Stance"); | |
end | |
end | |
end | |
function zyxdWarriorShout() | |
if UnitMana("player") >= 10 then | |
if FindBuff("Battle Shout", "player") then | |
CastSpellByName("Demoralizing Shout"); | |
else | |
CastSpellByName("Battle Shout"); | |
end | |
end | |
end | |
function zyxdWarriorShieldBash() | |
if UnitMana("player") >= 10 then | |
icon, name, active = GetShapeshiftFormInfo(1); | |
-- If Defensive Stance is active | |
if active then | |
CastSpellByName("Shield Bash"); | |
else | |
CastSpellByName("Battle Stance"); | |
end | |
end | |
end | |
function zyxdWarriorBerserkerRage() | |
icon, name, active = GetShapeshiftFormInfo(3); | |
-- If Berserker Stance is active | |
if active then | |
CastSpellByName("Berserker Rage"); | |
else | |
CastSpellByName("Berserker Stance"); | |
end | |
end | |
function zyxdWarriorMockingBlow() | |
if GetUnitName("target") and not UnitIsFriend("player", "target") and UnitMana("player") >= 10 then | |
zyxdAttack(); | |
icon, name, active = GetShapeshiftFormInfo(1); | |
-- If Battle Stance is active | |
if active then | |
CastSpellByName("Mocking Blow"); | |
else | |
CastSpellByName("Battle Stance"); | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment