Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function op()
- twoH="дуручка"
- mH="главая рука"
- oH="вторая рука"
- RunMacroText("/startattack")
- --1 charge
- if UnitExists("target")
- and GetDistanceBetweenObjects("player", "target")<=25
- and GetDistanceBetweenObjects("player", "target")>=8
- and GetSpellCooldown("Charge")==0
- and (not UnitAffectingCombat("Player"))
- and GetShapeshiftForm()~=1
- then
- CastSpellByName("Battle Stance")
- elseif UnitExists("target")
- and GetDistanceBetweenObjects("player", "target")<=25
- and GetDistanceBetweenObjects("player", "target")>=8
- and GetSpellCooldown("Charge")==0
- and (not UnitAffectingCombat("Player"))
- and GetShapeshiftForm()==1
- then
- CastSpellByName("Charge")
- end
- --2 intercept
- local t = GetTime()
- local start, duration = GetSpellCooldown("Charge") --CD Charge
- if (((t-start)>=2 and (t-start)<15) or UnitAffectingCombat("Player"))
- and UnitExists("target")
- and GetDistanceBetweenObjects("player", "target")<=25
- and GetDistanceBetweenObjects("player", "target")>=8
- and GetSpellCooldown("Intercept")==0
- and UnitMana("Player")>=10
- and GetShapeshiftForm()==3
- then
- CastSpellByName("Intercept")
- elseif (((t-start)>=2 and (t-start)<15) or (GetSpellCooldown("charge")==0 and UnitAffectingCombat("player")))
- and UnitExists("target")
- and GetDistanceBetweenObjects("player", "target")<=25
- and GetDistanceBetweenObjects("player", "target")>=8
- and GetSpellCooldown("Intercept")==0
- and UnitMana("Player")<10
- and GetSpellCooldown("Bloodrage")==0
- then
- CastSpellByName("Bloodrage")
- elseif (((t-start)>=2 and (t-start)<15) or UnitAffectingCombat("Player"))
- and UnitExists("target")
- and GetDistanceBetweenObjects("player", "target")<=25
- and GetDistanceBetweenObjects("player", "target")>=8
- and GetSpellCooldown("Intercept")==0
- and UnitMana("Player")>=10
- and GetShapeshiftForm()~=3
- then
- CastSpellByName("Berserker Stance")
- end
- --[[3 Whirlwind if sweeping srikes
- local start, duration, enabled = GetSpellCooldown("Sweeping Strikes")
- if ( start > 0 and duration > 0)
- and (start + duration - GetTime())>22
- and GetShapeshiftForm()~=3
- and (not UnitCastingInfo("player"))
- then
- CastSpellByName("Berserker Stance") --Berserker Stance 9e2dcc 48 H key
- elseif (start > 0 and duration > 0)
- and (start + duration - GetTime())>22
- and CheckInteractDistance("target", 3)
- and IsUsableSpell("Whirlwind")
- and GetShapeshiftForm()==3
- and GetSpellCooldown("Whirlwind")==0
- and (not UnitCastingInfo("player"))
- then
- CastSpellByName("Whirlwind") -- Whirlwind 5314a6 76 F7 key
- end]]
- --11 Execute
- if UnitHealth("target")/UnitHealthMax("target")<0.2
- and IsSpellInRange("Execute", "target")==1
- and (GetShapeshiftForm()==1 or GetShapeshiftForm()==3)
- and (not IsUsableSpell("Execute"))
- and GetSpellCooldown("Bloodrage")==0
- --and (not UnitCastingInfo("player"))
- then
- SpellStopCasting()
- CastSpellByName("Bloodrage")
- elseif
- UnitHealth("target")/UnitHealthMax("target")<0.2
- and IsSpellInRange("Execute", "target")==1
- and (GetShapeshiftForm()==1 or GetShapeshiftForm()==3)
- and IsUsableSpell("Execute")
- --and (not UnitCastingInfo("player"))
- then
- SpellStopCasting()
- CastSpellByName("Execute")
- end
- --7 Piercing howl on rogue or hunter
- --[[
- local i=1 while (i<=40) do d={UnitDebuff("target",i)} b={UnitBuff("target",i)}
- if d[1]=="Frost Shock"
- or d[1]=="Mind Flay"
- or d[1]=="Frostbolt"
- or d[1]=="Earthbind"
- or d[1]=="Deadly Throw"
- or d[1]=="Cone of Cold"
- or d[1]=="Chilled"
- or d[1]=="Crippling Poison"
- or d[1]=="Frost Trap Aura"
- or d[1]=="Concussive Shot"
- or d[1]=="Wing Clip"
- or d[1]=="Hamstring"
- or d[1]=="Piercing Howl"
- or b[1]=="Blessing of Freedom"
- or b[1]=="The Beast Within"
- then break
- else i=i+1
- end
- end
- if i>=40
- and (UnitClass("target") == "ROGUE"
- or UnitClass("target") == "HUNTER")
- and IsUsableSpell("Piercing Howl")
- and UnitMana("player")>=10
- and IsSpellInRange("Intimidating Shout", "target")==1
- --and (not UnitCastingInfo("player"))
- then
- CastSpellByName("Piercing howl")
- end
- ]]
- --8 Rend on rogue
- i=1 while(i<=40)do a={UnitDebuff("target",i)}
- if a[1]=="Rend"
- then
- break
- else i=i+1
- end
- end
- if i>40
- and UnitClass("target") == "ROGUE"
- and IsUsableSpell("Rend")
- and IsSpellInRange("Rend", "target")==1
- and GetShapeshiftForm()~=3
- and (not UnitCastingInfo("player"))
- then
- CastSpellByName("Rend")
- end
- --12 Hamstring or Piercing howl
- --[[
- local i=1 while (i<=40) do d={UnitDebuff("target",i)} b={UnitBuff("target",i)}
- if d[1]=="Frost Shock"
- or d[1]=="Mind Flay"
- or d[1]=="Frostbolt"
- or d[1]=="Earthbind"
- or d[1]=="Deadly Throw"
- or d[1]=="Cone of Cold"
- or d[1]=="Chilled"
- or d[1]=="Crippling Poison"
- or d[1]=="Frost Trap Aura"
- or d[1]=="Concussive Shot"
- or d[1]=="Wing Clip"
- or d[1]=="Hamstring"
- or d[1]=="Piercing Howl"
- or b[1]=="Blessing of Freedom"
- or b[1]=="The Beast Within"
- then break else i=i+1
- end
- end
- if i>40
- and UnitIsPVP("target")
- and GetShapeshiftForm()~=2
- and IsUsableSpell("Hamstring")
- and IsSpellInRange("Hamstring", "target")==1
- then
- CastSpellByName("Hamstring") -- Hamstring 038a3d 32 2 key
- elseif i>40
- and UnitIsPVP("target")
- and (GetShapeshiftForm()==2 or IsSpellInRange("Hamstring", "target")==0)
- and IsUsableSpell("Piercing Howl")
- and IsSpellInRange("Intimidating Shout", "target")==1
- then
- CastSpellByName("Piercing howl") -- Piercing howl b57d75 2E DEL key
- end
- ]]
- --9 Battle Shout
- local i=1 while(i<=40)do a={UnitBuff("Player",i)}
- if a[1]=="Battle Shout"
- then
- break
- else i=i+1
- end
- end
- if i>40
- and IsUsableSpell("Battle Shout")
- and (not UnitCastingInfo("player"))
- then
- CastSpellByName("Battle Shout") -- Battle Shout c47321 70 F1 key
- end
- --13 Mortal Strike
- --[[
- if GetSpellCooldown("Mortal Strike")==0
- and IsSpellInRange("Mortal Strike", "target")==1
- and UnitMana("Player")>=30
- and IsUsableSpell("Mortal Strike")
- then
- CastSpellByName("Mortal Strike")
- end
- ]]
- --Overpower
- if GetSpellCooldown("Overpower")==0
- and IsSpellInRange("Overpower", "target")==1
- and IsUsableSpell("Overpower")
- and GetShapeshiftForm()==1
- and UnitMana("player")>=5
- then
- CastSpellByName("Overpower")
- end
- --14 Victory Rush
- --[[
- if GetSpellCooldown("Victory Rush")==0
- and IsSpellInRange("Victory Rush", "target")==1
- and IsUsableSpell("Victory Rush")
- and (not UnitCastingInfo("player"))
- then
- CastSpellByName("Victory Rush")
- end
- ]]
- --15 Whirlwind
- if GetShapeshiftForm()~=3 --always berserk stance
- and IsUsableSpell("Berserker stance")
- and GetDistanceBetweenObjects("player", "target")<=8
- and (not UnitCastingInfo("player"))
- then
- CastSpellByName("Berserker Stance")
- -- elseif IsUsableSpell("Whirlwind")
- -- and GetDistanceBetweenObjects("player", "target")<=8
- -- and UnitMana("Player")>=25
- -- and GetShapeshiftForm()==3
- -- and GetSpellCooldown("Whirlwind")==0
- -- and (IsSpellInRange("Mortal Strike", "target")==0 or GetSpellCooldown("Mortal Strike")~=0 or (UnitMana("player")>=25 and UnitMana("player")<30 and GetSpellCooldown("Mortal Strike")==0))
- -- and (not UnitCastingInfo("player"))
- -- then
- -- CastSpellByName("Whirlwind")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement