Advertisement
kwax

mumu autoE & W

Oct 20th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.72 KB | None | 0 0
  1.  
  2. -- Amumu auto E & W
  3. -- hsurk
  4.  
  5.  
  6. require "Utils"
  7. require "spell_damage"
  8.  
  9. p = printtext
  10.  
  11. local target
  12. local target2
  13. local range = myHero.range + GetDistance(GetMinBBox(myHero))
  14. local despair = false
  15. local autoW = false
  16.  
  17.  
  18. function Main()
  19.     getTargets()
  20.    
  21.     if myHero.dead == 1 then despair = false end
  22.     if target ~= nil then
  23.         if CanCastSpell("E") then
  24.             CastSpellTarget("E",target)
  25.         end
  26.     end
  27.     if target2 ~= nil then
  28.         if despair == false and CanCastSpell("W") then         
  29.             CastSpellTarget("W",myHero)
  30.             autoW = true   
  31.         end
  32.     else
  33.         if despair == true and CanCastSpell("W") and autoW == true then
  34.             CastSpellTarget("W",myHero)
  35.             autoW = false
  36.         end
  37.     end
  38. end
  39.  
  40. function getTargets()
  41.     target = GetWeakEnemy("MAGIC", 200, "NEARMOUSE")
  42.     target2 = GetWeakEnemy("MAGIC", 400, "NEARMOUSE")
  43. end
  44.  
  45. function OnProcessSpell(unit, spell)
  46.         if unit.team==myHero.team and GetDistance(unit,myHero)<10 then
  47.                 local s=spell.name
  48.                 if (s ~= nil) and string.find(s,"espair") ~= nil then
  49.                         if despair==false then despair=true
  50.                         elseif despair==true then despair=false end
  51.                 end
  52.         end
  53. end
  54.  
  55. function OnDraw()
  56.     if myHero.dead == 0 then
  57.         if CanCastSpell("Q") then
  58.             CustomCircle(1100,6,3,myHero)
  59.         end
  60.         if CanCastSpell("R") then
  61.             CustomCircle(550,10,1,myHero)
  62.         end
  63.     end
  64. end
  65.  
  66. -- function OnCreateObj(obj)
  67.         -- if obj.charName:find("espairpool_tar") then
  68.                 -- despair = obj
  69.         -- else despair = nil end      
  70. -- end
  71. -- function OnDeleteObj(obj)
  72.         -- if obj.charName:find("espairpool_tar") then
  73.                 -- despair = nil
  74.         -- end    
  75. -- end
  76.  
  77. SetTimerCallback("Main")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement