Exemplo n.º 1
0
 void LastHit()
 {
     if (myHero.IsManaLow(Config.GetSlice("LastHit.mper")))
     {
         return;
     }
     foreach (Obj_AI_Base minion in MinionManager.GetMinions(900, MinionTypes.All, MinionTeam.Enemy))
     {
         if (minion.IsValidTarget(myHero.AttackRange) && Config.GetBool("LastHit.UseQ") && Q.IsReady())
         {
             float time   = Game.Ping / 2000 + myHero.Position.Distance(minion.Position) / ProjectileSpeed - 100 / 1000;
             float axeDmg = DLib.CalcSpellDamage(minion, "Q");
             if (HealthPrediction.GetHealthPrediction(minion, (int)time) + axeDmg > -40)
             {
                 if (AxesCatcher.GetCountAxes() == 0)
                 {
                     CastQ(minion);
                 }
             }
         }
         if (Config.GetBool("LastHit.UseE"))
         {
             if (HealthPrediction.GetHealthPrediction(minion, (int)E.Delay) - DLib.CalcSpellDamage(minion, "E") > 0)
             {
                 CastE(minion, CastMode.Farm);
             }
         }
     }
 }
Exemplo n.º 2
0
        void CastR(Obj_AI_Base target)
        {
            if (target.IsDead)
            {
                return;
            }
            if (target.GetDistance() < Menu.GetSlice("Misc.RRange") && R.IsReady())
            {
                if (target.CountEnemiesInRange(250) > Menu.GetSlice("Misc.REnemies"))
                {
                    R.Cast(target, false, true);
                    return;
                }
            }
            if (target.GetDistance() < Menu.GetSlice("Misc.MinRRange") && Menu.GetBool("Misc.ROverkill") && target.GetDistance() < Menu.GetSlice("Misc.RRange"))
            {
                float RD = DLib.CalcSpellDamage(target, "R");
                float AD = (float)ObjectManager.Player.GetAutoAttackDamage(target);
                if (target.Health < AD * 3.5)
                {
                    return;
                }
                else if (target.Health < RD)
                {
                    R.Cast(target);
                }
            }

            if (target.GetDistance() < Menu.GetSlice("Misc.RRange"))
            {
                float RD = DLib.CalcSpellDamage(target, "R");

                if (target.Health < RD)
                {
                    R.Cast(target);
                }
            }
        }