Advertisement
keltuz

wwwrriir low new

Jan 23rd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.44 KB | None | 0 0
  1. function op()
  2. twoH="дуручка"
  3. mH="главая рука"
  4. oH="вторая рука"
  5.  RunMacroText("/startattack")
  6. --1 charge
  7. if UnitExists("target")
  8. and GetDistanceBetweenObjects("player", "target")<=25
  9. and GetDistanceBetweenObjects("player", "target")>=8
  10. and GetSpellCooldown("Charge")==0
  11. and (not UnitAffectingCombat("Player"))
  12. and GetShapeshiftForm()~=1
  13.     then
  14.     CastSpellByName("Battle Stance")
  15.         elseif UnitExists("target")
  16.         and GetDistanceBetweenObjects("player", "target")<=25
  17.         and GetDistanceBetweenObjects("player", "target")>=8
  18.         and GetSpellCooldown("Charge")==0
  19.         and (not UnitAffectingCombat("Player"))
  20.         and GetShapeshiftForm()==1
  21.             then
  22.             CastSpellByName("Charge")
  23. end
  24.  
  25.  
  26.  
  27.  
  28. --2 intercept
  29. local t = GetTime()
  30. local start, duration = GetSpellCooldown("Charge") --CD Charge
  31.  
  32.     if (((t-start)>=2 and (t-start)<15) or UnitAffectingCombat("Player"))
  33.     and UnitExists("target")
  34.     and GetDistanceBetweenObjects("player", "target")<=25
  35.     and GetDistanceBetweenObjects("player", "target")>=8
  36.     and GetSpellCooldown("Intercept")==0
  37.     and UnitMana("Player")>=10
  38.     and GetShapeshiftForm()==3
  39.         then
  40.             CastSpellByName("Intercept")
  41.                 elseif (((t-start)>=2 and (t-start)<15) or (GetSpellCooldown("charge")==0 and UnitAffectingCombat("player")))
  42.                 and UnitExists("target")
  43.                 and GetDistanceBetweenObjects("player", "target")<=25
  44.                 and GetDistanceBetweenObjects("player", "target")>=8
  45.                 and GetSpellCooldown("Intercept")==0
  46.                 and UnitMana("Player")<10
  47.                 and GetSpellCooldown("Bloodrage")==0
  48.                     then
  49.                         CastSpellByName("Bloodrage")
  50.                             elseif (((t-start)>=2 and (t-start)<15) or UnitAffectingCombat("Player"))
  51.                             and UnitExists("target")
  52.                             and GetDistanceBetweenObjects("player", "target")<=25
  53.                             and GetDistanceBetweenObjects("player", "target")>=8
  54.                             and GetSpellCooldown("Intercept")==0
  55.                             and UnitMana("Player")>=10
  56.                             and GetShapeshiftForm()~=3
  57.                                 then
  58.                                     CastSpellByName("Berserker Stance")
  59.     end
  60.    
  61.    
  62.     --[[3 Whirlwind if sweeping srikes
  63. local start, duration, enabled = GetSpellCooldown("Sweeping Strikes")
  64.     if ( start > 0 and duration > 0)
  65.     and (start + duration - GetTime())>22
  66.     and GetShapeshiftForm()~=3
  67.     and (not UnitCastingInfo("player"))
  68.         then
  69.             CastSpellByName("Berserker Stance") --Berserker Stance 9e2dcc 48    H key
  70.                 elseif (start > 0 and duration > 0)
  71.                 and (start + duration - GetTime())>22
  72.                 and CheckInteractDistance("target", 3)
  73.                 and IsUsableSpell("Whirlwind")
  74.                 and GetShapeshiftForm()==3
  75.                 and GetSpellCooldown("Whirlwind")==0
  76.                 and (not UnitCastingInfo("player"))
  77.                     then
  78.                         CastSpellByName("Whirlwind") -- Whirlwind 5314a6  76    F7 key
  79.                         end]]
  80.    
  81. --11 Execute
  82.  
  83. if UnitHealth("target")/UnitHealthMax("target")<0.2
  84. and IsSpellInRange("Execute", "target")==1
  85. and (GetShapeshiftForm()==1 or GetShapeshiftForm()==3)
  86. and (not IsUsableSpell("Execute"))
  87. and GetSpellCooldown("Bloodrage")==0
  88. --and (not UnitCastingInfo("player"))
  89.     then
  90.         SpellStopCasting()
  91.         CastSpellByName("Bloodrage")
  92.         elseif
  93.             UnitHealth("target")/UnitHealthMax("target")<0.2
  94.                 and IsSpellInRange("Execute", "target")==1
  95.                 and (GetShapeshiftForm()==1 or GetShapeshiftForm()==3)
  96.                 and IsUsableSpell("Execute")
  97.                 --and (not UnitCastingInfo("player"))            
  98.                     then
  99.                         SpellStopCasting()
  100.                         CastSpellByName("Execute")
  101. end
  102.  
  103. --7 Piercing howl on rogue or hunter
  104. --[[
  105.     local i=1 while (i<=40) do d={UnitDebuff("target",i)} b={UnitBuff("target",i)}
  106.         if d[1]=="Frost Shock"
  107.         or d[1]=="Mind Flay"
  108.         or d[1]=="Frostbolt"      
  109.         or d[1]=="Earthbind"
  110.         or d[1]=="Deadly Throw"
  111.         or d[1]=="Cone of Cold"
  112.         or d[1]=="Chilled"
  113.         or d[1]=="Crippling Poison"
  114.         or d[1]=="Frost Trap Aura"
  115.         or d[1]=="Concussive Shot"
  116.         or d[1]=="Wing Clip"
  117.         or d[1]=="Hamstring"
  118.         or d[1]=="Piercing Howl"
  119.         or b[1]=="Blessing of Freedom"
  120.         or b[1]=="The Beast Within"
  121.             then break
  122.                 else i=i+1
  123.                 end
  124.                 end
  125.                
  126.                     if i>=40
  127.                     and (UnitClass("target") == "ROGUE"
  128.                     or UnitClass("target") == "HUNTER")
  129.                     and IsUsableSpell("Piercing Howl")
  130.                     and UnitMana("player")>=10
  131.                     and IsSpellInRange("Intimidating Shout", "target")==1
  132.                     --and (not UnitCastingInfo("player"))                
  133.                         then
  134.                             CastSpellByName("Piercing howl")
  135. end
  136.   ]]
  137.    
  138. --8 Rend on rogue
  139.  
  140. i=1 while(i<=40)do a={UnitDebuff("target",i)}
  141.     if a[1]=="Rend"
  142.         then
  143.             break
  144.                 else i=i+1
  145.                 end
  146.                 end
  147.                     if i>40
  148.                     and UnitClass("target") == "ROGUE"
  149.                     and IsUsableSpell("Rend")
  150.                     and IsSpellInRange("Rend", "target")==1
  151.                     and GetShapeshiftForm()~=3
  152.                     and (not UnitCastingInfo("player"))
  153.                     then
  154.                         CastSpellByName("Rend")
  155. end
  156.                        
  157. --12 Hamstring or Piercing howl
  158. --[[
  159.     local i=1 while (i<=40) do d={UnitDebuff("target",i)} b={UnitBuff("target",i)}
  160.         if d[1]=="Frost Shock"
  161.         or d[1]=="Mind Flay"
  162.         or d[1]=="Frostbolt"      
  163.         or d[1]=="Earthbind"
  164.         or d[1]=="Deadly Throw"
  165.         or d[1]=="Cone of Cold"
  166.         or d[1]=="Chilled"
  167.         or d[1]=="Crippling Poison"
  168.         or d[1]=="Frost Trap Aura"
  169.         or d[1]=="Concussive Shot"
  170.         or d[1]=="Wing Clip"
  171.         or d[1]=="Hamstring"
  172.         or d[1]=="Piercing Howl"
  173.         or b[1]=="Blessing of Freedom"
  174.         or b[1]=="The Beast Within"
  175.             then break else i=i+1
  176.                 end
  177.                 end
  178.                     if i>40
  179.                     and UnitIsPVP("target")
  180.                     and GetShapeshiftForm()~=2
  181.                     and IsUsableSpell("Hamstring")
  182.                     and IsSpellInRange("Hamstring", "target")==1
  183.                         then
  184.                             CastSpellByName("Hamstring") -- Hamstring 038a3d 32 2 key
  185.                                 elseif i>40
  186.                                 and UnitIsPVP("target")
  187.                                 and (GetShapeshiftForm()==2 or IsSpellInRange("Hamstring", "target")==0)
  188.                                 and IsUsableSpell("Piercing Howl")
  189.                                 and IsSpellInRange("Intimidating Shout", "target")==1
  190.                                     then
  191.                                         CastSpellByName("Piercing howl") -- Piercing howl b57d75 2E DEL key
  192. end
  193.    ]]
  194.    
  195. --9 Battle Shout
  196.  
  197. local i=1 while(i<=40)do a={UnitBuff("Player",i)}
  198.     if a[1]=="Battle Shout"
  199.         then
  200.             break
  201.                 else i=i+1
  202.                 end
  203.                 end
  204.                     if i>40
  205.                     and IsUsableSpell("Battle Shout")
  206.                     and (not UnitCastingInfo("player"))
  207.                         then
  208.                             CastSpellByName("Battle Shout") -- Battle Shout c47321 70   F1 key
  209.                             end
  210.                            
  211. --13 Mortal Strike
  212. --[[
  213. if GetSpellCooldown("Mortal Strike")==0
  214. and IsSpellInRange("Mortal Strike", "target")==1
  215. and UnitMana("Player")>=30
  216. and IsUsableSpell("Mortal Strike")
  217.     then
  218.         CastSpellByName("Mortal Strike")
  219. end
  220.  ]]
  221. --Overpower
  222. if GetSpellCooldown("Overpower")==0
  223. and IsSpellInRange("Overpower", "target")==1
  224. and IsUsableSpell("Overpower")
  225. and GetShapeshiftForm()==1
  226. and UnitMana("player")>=5
  227.     then
  228.         CastSpellByName("Overpower")
  229.     end
  230.  
  231. --14 Victory Rush
  232. --[[
  233. if GetSpellCooldown("Victory Rush")==0
  234. and IsSpellInRange("Victory Rush", "target")==1
  235. and IsUsableSpell("Victory Rush")
  236. and (not UnitCastingInfo("player"))
  237.     then
  238.         CastSpellByName("Victory Rush")
  239. end
  240. ]]
  241. --15 Whirlwind
  242.  
  243. if GetShapeshiftForm()~=3 --always berserk stance
  244. and IsUsableSpell("Berserker stance")
  245. and GetDistanceBetweenObjects("player", "target")<=8
  246. and (not UnitCastingInfo("player"))
  247.     then
  248.         CastSpellByName("Berserker Stance")
  249.             -- elseif IsUsableSpell("Whirlwind")
  250.                 -- and GetDistanceBetweenObjects("player", "target")<=8
  251.                 -- and UnitMana("Player")>=25
  252.                 -- and GetShapeshiftForm()==3
  253.                 -- and GetSpellCooldown("Whirlwind")==0
  254.                 -- and (IsSpellInRange("Mortal Strike", "target")==0 or GetSpellCooldown("Mortal Strike")~=0 or (UnitMana("player")>=25 and UnitMana("player")<30 and GetSpellCooldown("Mortal Strike")==0))          
  255.                 -- and (not UnitCastingInfo("player"))
  256.                     -- then
  257.                         -- CastSpellByName("Whirlwind")    
  258. end
  259.  
  260. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement