Example #1
0
 public static void Execute()
 {
     foreach (AIHeroClient enemy in EntityManager.Heroes.Enemies.Where(m => m.IsValidTarget(TargetSelector.Range) && m.HealthPercent < 40))
     {
         var result = enemy.GetBestCombo();
         if (result.IsKillable)
         {
             if (Menu.GetCheckBoxValue("Q") && result.CanKillWith(SpellSlot.Q))
             {
                 SpellManager.CastQ(enemy);
             }
             if (Menu.GetCheckBoxValue("W") && result.CanKillWith(SpellSlot.W))
             {
                 SpellManager.CastW(enemy);
             }
             if (Menu.GetCheckBoxValue("E") && result.CanKillWith(SpellSlot.E))
             {
                 SpellManager.CastE(enemy);
             }
             if (Menu.GetCheckBoxValue("Q") && Menu.GetCheckBoxValue("E") && (result.CanKillWith(SpellSlot.Q) || result.CanKillWith(SpellSlot.E)))
             {
                 SpellManager.CastQE(enemy);
             }
             if (Menu.GetCheckBoxValue("W") && Menu.GetCheckBoxValue("E") && (result.CanKillWith(SpellSlot.W) || result.CanKillWith(SpellSlot.E)))
             {
                 SpellManager.CastWE(enemy);
             }
             if (Menu.GetCheckBoxValue("R") && result.CanKillWith(SpellSlot.R))
             {
                 SpellManager.CastR(enemy);
             }
         }
         if (Menu.GetCheckBoxValue("Ignite") && SpellManager.IgniteIsReady && Util.MyHero.GetSummonerSpellDamage(enemy, DamageLibrary.SummonerSpells.Ignite) >= enemy.Health)
         {
             SpellManager.Ignite.Cast(enemy);
         }
     }
 }
Example #2
0
        public static void Execute()
        {
            var target = TargetSelector.Target;

            if (!target.IsValidTarget())
            {
                return;
            }
            var damageI = target.GetBestCombo();

            if (Menu.GetSliderValue("Zhonyas") > 0 && Menu.GetSliderValue("Zhonyas") >= Util.MyHero.HealthPercent)
            {
                ItemManager.UseZhonyas();
            }
            if (Menu.GetCheckBoxValue("E"))
            {
                SpellManager.CastE(target);
            }
            if (Menu.GetCheckBoxValue("W"))
            {
                SpellManager.CastW(target);
            }
            if (Menu.GetCheckBoxValue("Q"))
            {
                SpellManager.CastQ(target);
            }
            if (Menu.GetCheckBoxValue("WE"))
            {
                SpellManager.CastWE(target);
            }
            if (Menu.GetCheckBoxValue("QE"))
            {
                SpellManager.CastQE(target);
            }
            if (Menu.GetSliderValue("R") > 0 && SpellSlot.R.IsReady())
            {
                var cd      = Menu.GetSliderValue("Cooldown");
                var boolean = true;
                switch (Menu.GetSliderValue("R"))
                {
                case 1:
                    if (damageI.IsKillable && SpellSlot.R.GetSpellDamage(target) >= target.Health)
                    {
                        var qcd = SpellSlot.Q.GetSpellDataInst().Cooldown;
                        if (SpellSlot.Q.IsReady() || qcd < cd)
                        {
                            boolean = false;
                        }
                        if (boolean)
                        {
                            SpellManager.CastR(target);
                        }
                    }
                    break;

                case 2:
                    if (damageI.IsKillable && SpellSlot.R.GetSpellDamage(target) >= target.Health)
                    {
                        if (!target.GetBestComboR().IsKillable || (Util.MyHero.HealthPercent <= target.HealthPercent && Util.MyHero.HealthPercent <= 40))
                        {
                            SpellManager.CastR(target);
                        }
                    }
                    break;

                default:
                    SpellManager.CastR(target);
                    break;
                }
            }
        }