sociophobia

akali

Jul 19th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require('Inspired')
  2. require('IMenu')
  3. require('MinionManager')
  4. require('IWalk')
  5. AddButton("Activator", "Use Activator", true)
  6. function AfterObjectLoopEvent(myHero)
  7.         DrawMenu()
  8.         local potionslot = GetItemSlot(myHero,3157)
  9.         local potionslot2 = GetItemSlot(myHero,3153)
  10.         local potionslot3 = GetItemSlot(myHero,3144)
  11.         if((GetCurrentHP(myHero)/(GetMaxHP(myHero)/100))) < 26 and GetButtonValue("Activator")then
  12.                 if CanUseSpell(myHero,_W)== READY then
  13.                         local mPos = GetMyHeroPos()
  14.                         CastSkillShot(_W,mPos.x,mPos.y,mPos.z)
  15.                 else
  16.                 if GetItemSlot(myHero,3157) > 0 then
  17.                         CastTargetSpell(myHero,3157)
  18.                         end
  19.                 end
  20.         end
  21.         if KeyIsDown(0x20) then
  22.         local unit = GetTarget(1000)
  23.         if ValidTarget(unit, 1000) then
  24.                -- if GetButtonValue("Activator") then
  25.                        -- if potionslot2 > 0 then
  26.                         --        CastTargetSpell(myHero,3153)
  27.                      --   end
  28.                     --    if potionslot3 > 0 then
  29.                      --           CastTargetSpell(myHero,3144)
  30.                    --     end
  31.             --    end
  32.                 if CanUseSpell(myHero, _R) == READY and IsInDistance(unit, 700) then
  33.                         CastTargetSpell(unit, _R)
  34.                 elseif CanUseSpell(myHero, _Q) == READY and IsInDistance(unit, 600)  then
  35.                         CastTargetSpell(unit,_Q)
  36.                 elseif  CanUseSpell(myHero, _E) == READY and IsInDistance(unit, 350) then
  37.                         CastSkillShot(myHero,_E)
  38.                 end
  39.         end
  40.     EnemyMinions = GetMinions(2, 700, myHero)
  41.     if KeyIsDown(0x47) then
  42.         if CanUseSpell(myHero, _R) == READY and IsInDistance(EnemyMinions, 700) and GetDistance()>400 then
  43.                         CastTargetSpell(EnemyMinions, _R)
  44.         end
  45.     end
  46.  
  47.         IWalk()
  48.         end
  49. end
  50.  
  51. --function GetDistance(p1,p2)
  52.    -- p1 = GetOrigin(p1) or p1
  53.    -- p2 = GetOrigin(p2) or p2
  54.     --return math.sqrt(GetDistanceSqr(p1,p2))
  55. --end
Advertisement
Add Comment
Please, Sign In to add comment