Esempio n. 1
0
        /// <summary>
        ///     Casts Spells.
        /// </summary>
        public static void ModesBase()
        {
            if (CurrentMode == Modes.Combo && !Program.SpellsMenu.CheckBoxValue("combo"))
            {
                return;
            }
            if (CurrentMode == Modes.Harass && !Program.SpellsMenu.CheckBoxValue("harass"))
            {
                return;
            }
            if (CurrentMode == Modes.Flee && !Program.SpellsMenu.CheckBoxValue("flee"))
            {
                return;
            }
            if (CurrentMode == Modes.LaneClear && !Program.SpellsMenu.CheckBoxValue("laneclear"))
            {
                return;
            }

            if (Spelllist == null)
            {
                return;
            }

            foreach (var spell in Spelllist.Where(s => s != null && s.IsReady() && !s.IsSaver() && !s.IsTP()))
            {
                if (CurrentMode == Modes.Combo || (CurrentMode == Modes.Harass && (Player.Instance.ManaPercent > 60 || Player.Instance.ManaPercent.Equals(0))))
                {
                    SpellsCasting.Casting(spell, TargetSelector.GetTarget((spell as Spell.Chargeable)?.MaximumRange ?? spell.Range, spell.DamageType));
                }
                if (spell.Slot != SpellSlot.R)
                {
                    if (CurrentMode == Modes.LaneClear)
                    {
                        foreach (var minion in
                                 EntityManager.MinionsAndMonsters.EnemyMinions.Where(m => m.IsValidTarget(spell.Range) && (Player.Instance.ManaPercent > 60 || Player.Instance.IsNoManaHero())))
                        {
                            SpellsCasting.Casting(spell, minion);
                        }
                    }
                }
                if (CurrentMode == Modes.Flee && spell.IsCC() && spell.IsReady())
                {
                    SpellsCasting.Casting(spell, TargetSelector.GetTarget(spell.Range, spell.DamageType));
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     Casts Spells On Target.
        /// </summary>
        public static void ModesBase()
        {
            foreach (var spell in Spelllist.Where(s => s.IsReady() && !s.IsSaver()))
            {
                if (Combo || (Harass && (Player.Instance.ManaPercent > 60 || Player.Instance.ManaPercent.Equals(0))))
                {
                    SpellsCasting.Casting(spell, TargetSelector.GetTarget(spell.Range, DamageType.Mixed));
                }
                if (spell.Slot != SpellSlot.R)
                {
                    if (LaneClear)
                    {
                        var spell1 = spell;
                        foreach (var minion in EntityManager.MinionsAndMonsters.EnemyMinions.Where(
                                     m => m.IsValidTarget(spell1.Range) && (Player.Instance.ManaPercent > 60 || Player.Instance.ManaPercent.Equals(0))))
                        {
                            SpellsCasting.Casting(spell, minion);
                        }
                    }
                }
                if (Flee && spell.IsCC() && spell.IsReady())
                {
                    SpellsCasting.Casting(spell, TargetSelector.GetTarget(spell.Range, DamageType.Mixed));
                }
            }

            if (Flee)
            {
                if (SummonerSpells.Ghost.IsReady())
                {
                    SummonerSpells.Ghost.Cast();
                }
                if (SummonerSpells.Flash.IsReady() && Player.Instance.HealthPercent < 20 && ObjectsManager.AllyNexues != null)
                {
                    SummonerSpells.Flash.Cast(Player.Instance.ServerPosition.Extend(ObjectsManager.AllyNexues, SummonerSpells.Flash.Range).To3D());
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        ///     Casts Spells.
        /// </summary>
        public static void ModesBase()
        {
            /* Casting the summoner spells // No Longer Neaded
             * if (Player.Instance.CountEnemyHeros(SafeValue) > 0 && Player.Instance.PredictHealthPercent() <= 25 && (Combo || Harass || Flee))
             * {
             *  if (SummonerSpells.Heal.IsReady() && Program.SpellsMenu["Heal"].Cast<CheckBox>().CurrentValue && SummonerSpells.Heal.Slot != SpellSlot.Unknown)
             *  {
             *      Logger.Send("Cast Heal HealthPercent " + (int)Player.Instance.PredictHealthPercent());
             *      SummonerSpells.Heal.Cast();
             *  }
             *  else
             *  {
             *      if (SummonerSpells.Barrier.IsReady() && Program.SpellsMenu["Barrier"].Cast<CheckBox>().CurrentValue && SummonerSpells.Barrier.Slot != SpellSlot.Unknown)
             *      {
             *          Logger.Send("Cast Barrier HealthPercent " + (int)Player.Instance.PredictHealthPercent());
             *          SummonerSpells.Barrier.Cast();
             *      }
             *  }
             * }
             *
             * if (Player.Instance.ManaPercent < 50 && SummonerSpells.Clarity.IsReady() && Program.SpellsMenu["Clarity"].Cast<CheckBox>().CurrentValue && SummonerSpells.Clarity.Slot != SpellSlot.Unknown)
             * {
             *  Logger.Send("Cast Clarity ManaPercent " + (int)Player.Instance.ManaPercent);
             *  SummonerSpells.Clarity.Cast();
             * }
             * if (SummonerSpells.Cleanse.IsReady() && Program.SpellsMenu["Cleanse"].Cast<CheckBox>().CurrentValue && SummonerSpells.Cleanse.Slot != SpellSlot.Unknown && Player.Instance.IsCC()
             *  && Player.Instance.CountEnemyHeros(SafeValue) > 0 && Player.Instance.PredictHealthPercent() <= 80)
             * {
             *  Logger.Send("Cast Cleanse FleeMode Player CC'ed HealthPercent " + (int)Player.Instance.PredictHealthPercent() + " CountEnemyHeros " + Player.Instance.CountEnemyHeros(SafeValue));
             *  SummonerSpells.Cleanse.Cast();
             * }*/

            if (CurrentMode == Modes.Combo && !Program.SpellsMenu.CheckBoxValue("combo"))
            {
                return;
            }
            if (CurrentMode == Modes.Harass && !Program.SpellsMenu.CheckBoxValue("harass"))
            {
                return;
            }
            if (CurrentMode == Modes.Flee && !Program.SpellsMenu.CheckBoxValue("flee"))
            {
                return;
            }
            if (CurrentMode == Modes.LaneClear && !Program.SpellsMenu.CheckBoxValue("laneclear"))
            {
                return;
            }

            foreach (var spell in Spelllist.Where(s => s != null && s.IsReady() && !s.IsSaver() && !s.IsTP()))
            {
                if (CurrentMode == Modes.Combo || (CurrentMode == Modes.Harass && (Player.Instance.ManaPercent > 60 || Player.Instance.ManaPercent.Equals(0))))
                {
                    SpellsCasting.Casting(spell, TargetSelector.GetTarget((spell as Spell.Chargeable)?.MaximumRange ?? spell.Range, spell.DamageType));
                }
                if (spell.Slot != SpellSlot.R)
                {
                    if (CurrentMode == Modes.LaneClear)
                    {
                        foreach (var minion in
                                 EntityManager.MinionsAndMonsters.EnemyMinions.Where(m => m.IsValidTarget(spell.Range) && (Player.Instance.ManaPercent > 60 || Player.Instance.IsNoManaHero())))
                        {
                            SpellsCasting.Casting(spell, minion);
                        }
                    }
                }
                if (CurrentMode == Modes.Flee && spell.IsCC() && spell.IsReady())
                {
                    SpellsCasting.Casting(spell, TargetSelector.GetTarget(spell.Range, spell.DamageType));
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        ///     Casts Spells.
        /// </summary>
        public static void ModesBase()
        {
            // Casting the summoner spells
            if (Player.Instance.CountEnemiesInRange(1250) > 0 && Player.Instance.HealthPercent <= 25 && (Combo || Harass || Flee))
            {
                if (SummonerSpells.Heal.IsReady() && Program.SpellsMenu["Heal"].Cast <CheckBox>().CurrentValue&& SummonerSpells.Heal.Slot != SpellSlot.Unknown)
                {
                    Logger.Send("Cast Heal HealthPercent " + (int)Player.Instance.HealthPercent, Logger.LogLevel.Info);
                    SummonerSpells.Heal.Cast();
                }
                else
                {
                    if (SummonerSpells.Barrier.IsReady() && Program.SpellsMenu["Barrier"].Cast <CheckBox>().CurrentValue&& SummonerSpells.Barrier.Slot != SpellSlot.Unknown)
                    {
                        Logger.Send("Cast Barrier HealthPercent " + (int)Player.Instance.HealthPercent, Logger.LogLevel.Info);
                        SummonerSpells.Barrier.Cast();
                    }
                }
            }

            if (Player.Instance.ManaPercent < 50 && SummonerSpells.Clarity.IsReady() && Program.SpellsMenu["Clarity"].Cast <CheckBox>().CurrentValue&& SummonerSpells.Clarity.Slot != SpellSlot.Unknown)
            {
                Logger.Send("Cast Clarity ManaPercent " + (int)Player.Instance.ManaPercent, Logger.LogLevel.Info);
                SummonerSpells.Clarity.Cast();
            }

            if (Flee)
            {
                if (SummonerSpells.Ghost.IsReady() && Program.SpellsMenu["Ghost"].Cast <CheckBox>().CurrentValue&& SummonerSpells.Ghost.Slot != SpellSlot.Unknown &&
                    Player.Instance.CountEnemiesInRange(800) > 0)
                {
                    Logger.Send("Cast Ghost FleeMode CountEnemiesInRange " + Player.Instance.CountEnemiesInRange(800), Logger.LogLevel.Info);
                    SummonerSpells.Ghost.Cast();
                }
                if (SummonerSpells.Flash.IsReady() && Program.SpellsMenu["Flash"].Cast <CheckBox>().CurrentValue&& SummonerSpells.Flash.Slot != SpellSlot.Unknown && Player.Instance.HealthPercent < 20 &&
                    ObjectsManager.AllySpawn != null)
                {
                    Logger.Send("Cast Flash FleeMode HealthPercent " + (int)Player.Instance.HealthPercent, Logger.LogLevel.Info);
                    SummonerSpells.Flash.Cast(Player.Instance.PredictPosition().Extend(ObjectsManager.AllySpawn, 400).To3D());
                }
            }
            if (SummonerSpells.Cleanse.IsReady() && Program.SpellsMenu["Cleanse"].Cast <CheckBox>().CurrentValue&& SummonerSpells.Cleanse.Slot != SpellSlot.Unknown && Player.Instance.IsCC() &&
                Player.Instance.CountEnemiesInRange(1250) > 0 && Player.Instance.HealthPercent <= 80)
            {
                Logger.Send("Cast Cleanse FleeMode Player CC'ed HealthPercent " + (int)Player.Instance.HealthPercent + " CountEnemiesInRange " + Player.Instance.CountEnemiesInRange(1250), Logger.LogLevel.Info);
                SummonerSpells.Cleanse.Cast();
            }

            foreach (var spell in Spelllist.Where(s => s != null && s.IsReady() && !s.IsSaver() && !s.IsTP()))
            {
                if (Combo || (Harass && (Player.Instance.ManaPercent > 60 || Player.Instance.ManaPercent.Equals(0))))
                {
                    SpellsCasting.Casting(spell, TargetSelector.GetTarget(spell.Range, DamageType.Mixed));
                }
                if (spell.Slot != SpellSlot.R)
                {
                    if (LaneClear)
                    {
                        var spell1 = spell;
                        foreach (var minion in
                                 EntityManager.MinionsAndMonsters.EnemyMinions.Where(m => m.IsValidTarget(spell1.Range) && (Player.Instance.ManaPercent > 60 || Player.Instance.ManaPercent.Equals(0))))
                        {
                            SpellsCasting.Casting(spell, minion);
                        }
                    }
                }
                if (Flee && spell.IsCC() && spell.IsReady())
                {
                    SpellsCasting.Casting(spell, TargetSelector.GetTarget(spell.Range, DamageType.Mixed));
                }
            }
        }