Esempio n. 1
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        /// <param name="args">The <see cref="System.EventArgs" /> instance containing the event data.</param>
        private void OnUpdate(EventArgs args)
        {
            try
            {
                if (Player.IsDead || Player.InFountain() || Player.IsRecalling())
                {
                    return;
                }

                if (!this.ZhonyaLowHp || !zhonyaItem.IsReady() || Player.HasBuff("ChronoShift"))
                {
                    return;
                }

                var enemies     = Player.CountEnemiesInRange(875f);
                var totalDamage = IncomingDamageManager.GetDamage(Player) * 1.1f;
                if (totalDamage <= 0)
                {
                    return;
                }

                if (Player.HealthPercent <= this.ZhonyaBelowHp && enemies >= 1)
                {
                    if (Player.HealthPercent < this.ZhonyaBelowHp)
                    {
                        zhonyaItem.Cast();
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     Called when the game updates
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private void Game_OnUpdate(EventArgs args)
        {
            try
            {
                if (!ItemData.Seraphs_Embrace.GetItem().IsOwned() || !this.Menu.Item("UseSeraphsCombo").IsActive())
                {
                    return;
                }

                if (this.Menu.Item("Mode-seraphs").GetValue <StringList>().SelectedIndex == 1 && !this.ComboModeActive)
                {
                    return;
                }

                var enemies     = this.Player.CountEnemiesInRange(800);
                var totalDamage = IncomingDamageManager.GetDamage(this.Player) * 1.1f;

                if (this.Player.HealthPercent <= this.Menu.Item("seraphs-min-health").GetValue <Slider>().Value&& enemies >= 1)
                {
                    if ((int)(totalDamage / this.Player.Health)
                        > this.Menu.Item("seraphs-min-damage").GetValue <Slider>().Value ||
                        this.Player.HealthPercent < this.Menu.Item("seraphs-min-health").GetValue <Slider>().Value)
                    {
                        Items.UseItem((int)this.Id, this.Player);
                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.WriteLine("[ELUTILITYSUITE - SERAPHS] Used for: {0} - health percentage: {1}%", this.Player.ChampionName, (int)this.Player.HealthPercent);
                    }
                    Console.ForegroundColor = ConsoleColor.White;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
Esempio n. 3
0
        /// <summary>
        ///     Called when the game updates
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private void Game_OnUpdate(EventArgs args)
        {
            try
            {
                if (!ItemData.Seraphs_Embrace.GetItem().IsOwned() || !this.Menu.Item("UseSeraphsCombo").IsActive())
                {
                    return;
                }

                if (this.Menu.Item("Mode-seraphs").GetValue <StringList>().SelectedIndex == 1 && !this.ComboModeActive)
                {
                    return;
                }

                var enemies     = this.Player.CountEnemiesInRange(800);
                var totalDamage = IncomingDamageManager.GetDamage(this.Player) * 1.1f;

                if (this.Player.HealthPercent <= this.Menu.Item("seraphs-min-health").GetValue <Slider>().Value&& enemies >= 1)
                {
                    if ((int)(totalDamage / this.Player.Health)
                        > this.Menu.Item("seraphs-min-damage").GetValue <Slider>().Value ||
                        this.Player.HealthPercent < this.Menu.Item("seraphs-min-health").GetValue <Slider>().Value)
                    {
                        Items.UseItem((int)this.Id, this.Player);
                    }
                }
            }
            catch (Exception e)
            {
                Logging.AddEntry(LoggingEntryType.Error, "@Seraphs.cs: An error occurred: {0}", e);
            }
        }
Esempio n. 4
0
        private void OnUpdate(EventArgs args)
        {
            try
            {
                if (this.Player.IsDead || !this.BarrierSpell.IsReady() || this.Player.InFountain() || this.Player.LSIsRecalling() || !getCheckBoxItem(this.Menu, "Barrier.Activated"))
                {
                    return;
                }

                var enemies     = this.Player.LSCountEnemiesInRange(750f);
                var totalDamage = IncomingDamageManager.GetDamage(this.Player) * 1.1f;

                if (this.Player.HealthPercent <= getSliderItem(this.Menu, "barrier.min-health") &&
                    this.BarrierSpell.IsInRange(this.Player) && enemies >= 1)
                {
                    if ((int)(totalDamage / this.Player.Health) > getSliderItem(this.Menu, "barrier.min-damage") ||
                        this.Player.HealthPercent < getSliderItem(this.Menu, "barrier.min-health"))
                    {
                        this.Player.Spellbook.CastSpell(this.BarrierSpell.Slot);
                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.WriteLine("[ELUTILITYSUITE - BARRIER] Used for: {0} - health percentage: {1}%", this.Player.ChampionName, (int)this.Player.HealthPercent);
                    }
                    Console.ForegroundColor = ConsoleColor.White;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
        private bool ShouldSave()
        {
            try
            {
                if (_soulbound != null && R.IsReady() && !_soulbound.InFountain())
                {
                    var mode    = Menu.Item(Menu.Name + ".ultimate.save").GetValue <StringList>().SelectedIndex;
                    var enemies = _soulbound.CountEnemiesInRange(600);
                    switch (mode)
                    {
                    case 0:
                        return(false);

                    case 1:
                        return(enemies >= 1 &&
                               _soulbound.HealthPercent <=
                               Menu.Item(Menu.Name + ".ultimate.save-health").GetValue <Slider>().Value);

                    case 2:
                        return(IncomingDamageManager.GetDamage(_soulbound) * 1.1f > _soulbound.Health ||
                               _soulbound.HealthPercent <= 10 && enemies >= 1 ||
                               _soulbound.HealthPercent <= enemies * 10f - 10f);
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
            return(false);
        }
Esempio n. 6
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        /// <param name="args">The <see cref="System.EventArgs" /> instance containing the event data.</param>
        private void OnUpdate(EventArgs args)
        {
            try
            {
                if (this.Player.IsDead || this.Player.HasBuff("ChronoShift") || !this.BarrierSpell.IsReady() || this.Player.InFountain() || this.Player.IsRecalling() || !this.Menu.Item("Barrier.Activated").IsActive())
                {
                    return;
                }

                var enemies     = this.Player.CountEnemiesInRange(750f);
                var totalDamage = IncomingDamageManager.GetDamage(this.Player) * 1.1f;

                if (this.Player.HealthPercent <= this.Menu.Item("barrier.min-health").GetValue <Slider>().Value&&
                    this.BarrierSpell.IsInRange(this.Player) && enemies >= 1)
                {
                    if ((int)(totalDamage / this.Player.Health) > this.Menu.Item("barrier.min-damage").GetValue <Slider>().Value ||
                        this.Player.HealthPercent < this.Menu.Item("barrier.min-health").GetValue <Slider>().Value)
                    {
                        this.Player.Spellbook.CastSpell(this.BarrierSpell.Slot);
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
Esempio n. 7
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        /// <param name="args">The <see cref="System.EventArgs" /> instance containing the event data.</param>
        private void OnUpdate(EventArgs args)
        {
            try
            {
                if (this.Player.IsDead || !this.HealSpell.IsReady() || this.Player.InFountain() || this.Player.IsRecalling() || !this.Menu.Item("Heal.Activated").IsActive() || this.Menu.Item("PauseHealHotkey").GetValue <KeyBind>().Active)
                {
                    return;
                }

                foreach (var ally in HeroManager.Allies)
                {
                    if (!this.Menu.Item($"healon{ally.ChampionName}").IsActive() || ally.IsRecalling() || ally.IsInvulnerable || ally.HasBuff("ChronoShift"))
                    {
                        return;
                    }

                    var enemies     = ally.CountEnemiesInRange(750f);
                    var totalDamage = IncomingDamageManager.GetDamage(ally) * 1.1f;

                    if (ally.HealthPercent <= this.Menu.Item("min-health").GetValue <Slider>().Value&&
                        this.HealSpell.IsInRange(ally) && !ally.IsDead && enemies >= 1)
                    {
                        if ((int)(totalDamage / ally.Health) > this.Menu.Item("min-damage").GetValue <Slider>().Value ||
                            ally.HealthPercent < this.Menu.Item("min-health").GetValue <Slider>().Value)
                        {
                            this.Player.Spellbook.CastSpell(this.HealSpell.Slot);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
Esempio n. 8
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        /// <param name="args">The <see cref="System.EventArgs" /> instance containing the event data.</param>
        private void OnUpdate(EventArgs args)
        {
            try
            {
                if (this.Player.IsDead || !this.HealSpell.IsReady() || this.Player.InFountain() || this.Player.LSIsRecalling())
                {
                    return;
                }

                if (!getCheckBoxItem(this.Menu, "Heal.Activated") || getKeyBindItem(this.Menu, "PauseHealHotkey"))
                {
                    return;
                }

                foreach (var ally in HeroManager.Allies)
                {
                    if (!getCheckBoxItem(this.Menu, string.Format("healon{0}", ally.ChampionName)) || ally.LSIsRecalling() || ally.IsInvulnerable)
                    {
                        return;
                    }

                    var enemies     = ally.LSCountEnemiesInRange(600);
                    var totalDamage = IncomingDamageManager.GetDamage(ally) * 1.1f;
                    if (totalDamage <= 0)
                    {
                        return;
                    }

                    if (ally.HealthPercent <= getSliderItem(this.Menu, "min-health") && this.HealSpell.IsInRange(ally) && enemies >= 1)
                    {
                        if ((int)(totalDamage / ally.Health) > getSliderItem(this.Menu, "min-damage") ||
                            ally.HealthPercent < getSliderItem(this.Menu, "min-health"))
                        {
                            this.Player.Spellbook.CastSpell(this.HealSpell.Slot);
                            Console.ForegroundColor = ConsoleColor.Green;
                            Console.WriteLine("[ELUTILITYSUITE - HEAL] Used for: {0} - health percentage: {1}%", ally.ChampionName, (int)ally.HealthPercent);
                        }
                        Console.ForegroundColor = ConsoleColor.White;
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
Esempio n. 9
0
        /// <summary>
        ///     Called when the game updates
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private void Game_OnUpdate(EventArgs args)
        {
            try
            {
                if (!Items.HasItem((int)this.Id) || !Items.CanUseItem((int)this.Id) ||
                    !this.Menu.Item("UseFaceCombo").IsActive())
                {
                    return;
                }

                if (this.Menu.Item("Mode-face").GetValue <StringList>().SelectedIndex == 1 && !this.ComboModeActive)
                {
                    return;
                }

                foreach (var ally in HeroManager.Allies.Where(a => a.IsValidTarget(850f, false) && !a.IsRecalling()))
                {
                    if (!this.Menu.Item(string.Format("Faceon{0}", ally.ChampionName)).IsActive())
                    {
                        return;
                    }

                    var enemies     = ally.CountEnemiesInRange(800);
                    var totalDamage = IncomingDamageManager.GetDamage(ally) * 1.1f;

                    if (ally.HealthPercent <= this.Menu.Item("face-min-health").GetValue <Slider>().Value&& enemies >= 1)
                    {
                        if ((int)(totalDamage / ally.Health)
                            > this.Menu.Item("face-min-damage").GetValue <Slider>().Value ||
                            ally.HealthPercent < this.Menu.Item("face-min-health").GetValue <Slider>().Value)
                        {
                            Items.UseItem((int)this.Id, ally);
                            Console.ForegroundColor = ConsoleColor.Green;
                            Console.WriteLine("[ELUTILITYSUITE - FACE OF THE MOUNTAIN] Used for: {0} - health percentage: {1}%", ally.ChampionName, (int)ally.HealthPercent);
                        }
                        Console.ForegroundColor = ConsoleColor.White;
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
Esempio n. 10
0
        /// <summary>
        ///     Called when the game updates
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private void Game_OnUpdate(EventArgs args)
        {
            try
            {
                if (!getCheckBoxItem(this.Menu, "UseLocketCombo") || !Items.HasItem((int)this.Id) || !Items.CanUseItem((int)this.Id))
                {
                    return;
                }

                if (getBoxItem(this.Menu, "ModeLOCKET") == 1 && !this.ComboModeActive)
                {
                    return;
                }

                foreach (var ally in HeroManager.Allies.Where(a => a.LSIsValidTarget(600f, false) && !a.LSIsRecalling()))
                {
                    var enemies     = ally.LSCountEnemiesInRange(600f);
                    var totalDamage = IncomingDamageManager.GetDamage(ally) * 1.1f;

                    if (ally.HealthPercent <= getSliderItem(this.Menu, "locket-min-health") &&
                        enemies >= 1)
                    {
                        if ((int)(totalDamage / ally.Health)
                            > getSliderItem(this.Menu, "locket-min-damage") ||
                            ally.HealthPercent < getSliderItem(this.Menu, "locket-min-health"))
                        {
                            Items.UseItem((int)this.Id, ally);
                            Console.ForegroundColor = ConsoleColor.Green;
                            Console.WriteLine("[ELUTILITYSUITE - LOCKET] Used for: {0} - health percentage: {1}%", ally.ChampionName, (int)ally.HealthPercent);
                        }
                        Console.ForegroundColor = ConsoleColor.White;
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
Esempio n. 11
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        /// <param name="args">The <see cref="System.EventArgs" /> instance containing the event data.</param>
        private void OnUpdate(EventArgs args)
        {
            try
            {
                if (this.Player.IsDead || !this.HealSpell.IsReady() || this.Player.InFountain() || this.Player.LSIsRecalling())
                {
                    return;
                }

                if (!getCheckBoxItem(this.Menu, "Heal.Activated") || getKeyBindItem(this.Menu, "PauseHealHotkey"))
                {
                    return;
                }

                foreach (var ally in HeroManager.Allies)
                {
                    if (!getCheckBoxItem(this.Menu, string.Format("healon{0}", ally.ChampionName)) || ally.LSIsRecalling() || ally.IsInvulnerable)
                    {
                        return;
                    }

                    var enemies     = ally.LSCountEnemiesInRange(750f);
                    var totalDamage = IncomingDamageManager.GetDamage(ally) * 1.1f;

                    if (ally.HealthPercent <= getSliderItem(this.Menu, "min-health") && (this.HealSpell.IsInRange(ally) || ally.IsMe) && enemies >= 1 && !ally.IsDead)
                    {
                        if (ally.HealthPercent < getSliderItem(this.Menu, "min-health"))
                        {
                            this.Player.Spellbook.CastSpell(this.HealSpell.Slot);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
Esempio n. 12
0
        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        /// <param name="args">The <see cref="System.EventArgs" /> instance containing the event data.</param>
        private void OnUpdate(EventArgs args)
        {
            try
            {
                if (Player.IsDead || Player.InFountain() || Player.LSIsRecalling())
                {
                    return;
                }

                if (!this.ZhonyaLowHp || !zhonyaItem.IsReady())
                {
                    return;
                }

                var enemies     = Player.LSCountEnemiesInRange(875f);
                var totalDamage = IncomingDamageManager.GetDamage(Player) * 1.1f;
                if (totalDamage <= 0)
                {
                    return;
                }

                if (Player.HealthPercent <= this.ZhonyaBelowHp && enemies >= 1)
                {
                    if (Player.HealthPercent < this.ZhonyaBelowHp)
                    {
                        zhonyaItem.Cast();
                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.WriteLine("[ELUTILITYSUITE - ZHOYNA] Used for: {0} - health percentage: {1}%", Player.ChampionName, (int)Player.HealthPercent);
                    }
                    Console.ForegroundColor = ConsoleColor.White;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(@"An error occurred: '{0}'", e);
            }
        }
Esempio n. 13
0
        /// <summary>
        ///     Called when the game updates
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        private void Game_OnUpdate(EventArgs args)
        {
            try
            {
                if (!this.Menu.Item("UseLocketCombo").IsActive() || !Items.HasItem((int)this.Id) || !Items.CanUseItem((int)this.Id))
                {
                    return;
                }

                if (this.Menu.Item("Mode-locket").GetValue <StringList>().SelectedIndex == 1 && !this.ComboModeActive)
                {
                    return;
                }

                foreach (var ally in HeroManager.Allies.Where(a => a.IsValidTarget(600f, false) && !a.IsRecalling()))
                {
                    var enemies     = ally.CountEnemiesInRange(600f);
                    var totalDamage = IncomingDamageManager.GetDamage(ally) * 1.1f;

                    if (ally.HealthPercent <= this.Menu.Item("locket-min-health").GetValue <Slider>().Value &&
                        enemies >= 1)
                    {
                        if ((int)(totalDamage / ally.Health)
                            > this.Menu.Item("locket-min-damage").GetValue <Slider>().Value ||
                            ally.HealthPercent < this.Menu.Item("locket-min-health").GetValue <Slider>().Value)
                        {
                            Items.UseItem((int)this.Id, ally);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Logging.AddEntry(LoggingEntryType.Error, "@Locket.cs: An error occurred: {0}", e);
            }
        }
Esempio n. 14
0
        protected override void OnPreUpdate()
        {
            if (E.IsReady())
            {
                if (Menu.Item(Menu.Name + ".miscellaneous.e-death").GetValue <bool>())
                {
                    if (IncomingDamageManager.GetDamage(Player) > Player.Health &&
                        GameObjects.EnemyHeroes.Any(e => e.IsValidTarget(E.Range) && Rend.HasBuff(e)))
                    {
                        CastE();
                    }
                }

                var eBig    = Menu.Item(Menu.Name + ".lasthit.e-big").GetValue <bool>();
                var eJungle = Menu.Item(Menu.Name + ".lasthit.e-jungle").GetValue <bool>();
                if (eBig || eJungle)
                {
                    if (eJungle && Player.Level >= 3 || eBig)
                    {
                        var creeps =
                            GameObjects.Jungle.Where(e => e.IsValidTarget(E.Range) && Rend.IsKillable(e, false))
                            .ToList();
                        if (eJungle && creeps.Any() ||
                            eBig &&
                            creeps.Any(
                                m =>
                                m.CharData.BaseSkinName.StartsWith("SRU_Dragon") ||
                                m.CharData.BaseSkinName.StartsWith("SRU_Baron")))
                        {
                            CastE();
                            return;
                        }
                    }
                }

                var eSiege = (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
                              Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit) &&
                             Menu.Item(Menu.Name + ".lasthit.e-siege").GetValue <bool>();
                var eTurret = (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
                               Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit) &&
                              Menu.Item(Menu.Name + ".lasthit.e-turret").GetValue <bool>();
                var eReset = Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None &&
                             Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Flee &&
                             Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo &&
                             Menu.Item(Menu.Name + ".miscellaneous.e-reset").GetValue <bool>();

                IEnumerable <Obj_AI_Minion> minions = new HashSet <Obj_AI_Minion>();
                if (eSiege || eTurret || eReset)
                {
                    minions =
                        GameObjects.EnemyMinions.Where(
                            e => e.IsValidTarget(E.Range) && Rend.IsKillable(e, e.HealthPercent < 25));
                }

                if (ResourceManager.Check("lasthit"))
                {
                    if (eSiege)
                    {
                        if (
                            minions.Any(
                                m =>
                                m.CharData.BaseSkinName.Contains("MinionSiege") ||
                                m.CharData.BaseSkinName.Contains("Super")))
                        {
                            CastE();
                            return;
                        }
                    }
                    if (eTurret)
                    {
                        if (minions.Any(m => Utils.UnderAllyTurret(m.Position)))
                        {
                            CastE();
                            return;
                        }
                    }
                }

                if (eReset && minions.Any() && ResourceManager.Check("misc") &&
                    GameObjects.EnemyHeroes.Any(e => Rend.HasBuff(e) && e.IsValidTarget(E.Range)))
                {
                    CastE();
                    return;
                }
            }

            if (ShouldSave())
            {
                R.Cast();
            }
        }