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 (this.Player.IsDead || this.SmiteSpell == null)
                {
                    return;
                }

                if (!getKeyBindItem(this.Menu, "ElSmite.Activated"))
                {
                    return;
                }

                Minion =
                    (Obj_AI_Minion)
                    MinionManager.GetMinions(this.Player.ServerPosition, SmiteRange, MinionTypes.All, MinionTeam.Neutral)
                    .FirstOrDefault(
                        buff => buff.Name.StartsWith(buff.CharData.BaseSkinName) &&
                        BuffsThatActuallyMakeSenseToSmite.Contains(buff.CharData.BaseSkinName) &&
                        !buff.Name.Contains("Mini") && !buff.Name.Contains("Spawn"));

                if (Minion == null)
                {
                    return;
                }

                if (getCheckBoxItem(this.Menu, Minion.CharData.BaseSkinName))
                {
                    if (this.SmiteSpell.IsReady())
                    {
                        if (Minion.LSIsValidTarget(SmiteRange))
                        {
                            if (this.Player.GetSummonerSpellDamage(Minion, LeagueSharp.Common.Damage.SummonerSpell.Smite) > Minion.Health)
                            {
                                this.SmiteSpell.Cast(Minion);
                            }
                        }

                        if (getCheckBoxItem(this.Menu, "Smite.Spell"))
                        {
                            this.ChampionSpellSmite((float)this.Player.GetSummonerSpellDamage(Minion, LeagueSharp.Common.Damage.SummonerSpell.Smite), Minion);
                        }
                    }
                }

                this.SmiteKill();
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occurred: '{0}'", e);
            }
        }
Esempio n. 2
0
        private static void Escape() // some credits to 1337 :v) (also not as good, me suck)
        {
            var target  = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
            var enemies = HeroManager.Enemies.Where(t => t.LSIsValidTarget() && t.LSDistance(Player.Position) <= W.Range);

            if (Q.IsReady() && target.LSIsValidTarget() && getCheckBoxItem(fleeMenu, "QFlee"))
            {
                Q.Cast(target);
            }

            if (E.IsReady() && getCheckBoxItem(fleeMenu, "EFlee"))
            {
                E.Cast(Game.CursorPos);
                var enemy = enemies.OrderBy(t => t.LSDistance(Player.Position)).FirstOrDefault();
                if (enemy != null)
                {
                    var minion = ObjectManager.Get <Obj_AI_Minion>()
                                 .Where(m => m.LSDistance(enemy.Position) <= Q.Range)
                                 .OrderByDescending(m => m.LSDistance(Player.Position)).FirstOrDefault();

                    if (minion.LSIsValidTarget() && minion != null)
                    {
                        jumpfar = minion;
                    }
                }

                else if (enemy == null)
                {
                    var minion = ObjectManager.Get <Obj_AI_Minion>()
                                 .Where(m => m.LSDistance(Player.Position) <= Q.Range)
                                 .OrderByDescending(m => m.LSDistance(Player.Position)).FirstOrDefault();

                    if (minion.LSIsValidTarget() && minion != null)
                    {
                        jumpfar = minion;
                    }
                }
            }

            if (Player.AttackRange == 425 && jumpfar.LSIsValidTarget())
            {
                EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, jumpfar);
            }
            Orbwalker.MoveTo(Game.CursorPos);
        }
Esempio n. 3
0
        private void JungleSmite()
        {
            try
            {
                if (!getKeyBindItem("ElSmite.Activated"))
                {
                    return;
                }

                Minion = (Obj_AI_Minion)EntityManager.MinionsAndMonsters.Monsters.FirstOrDefault(buff => this.Player.IsInRange(buff, 570) && (buff.Name.StartsWith(buff.BaseSkinName) || BuffsThatActuallyMakeSenseToSmite.Contains(buff.BaseSkinName)) && !buff.Name.Contains("Mini") && !buff.Name.Contains("Spawn"));

                if (Minion == null)
                {
                    return;
                }

                if (getCheckBoxItem(Minion.CharData.BaseSkinName))
                {
                    if (this.SmiteSpell.IsReady())
                    {
                        if (Minion.LSIsValidTarget(570f))
                        {
                            if (this.Player.GetSummonerSpellDamage(Minion, LeagueSharp.Common.Damage.SummonerSpell.Smite) >= Minion.Health && this.SmiteSpell.CanCast(Minion))
                            {
                                this.SmiteSpell.Cast(Minion);
                            }
                        }

                        if (getCheckBoxItem("Smite.Spell"))
                        {
                            this.ChampionSpellSmite((float)this.Player.GetSummonerSpellDamage(Minion, LeagueSharp.Common.Damage.SummonerSpell.Smite), Minion);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occurred: '{0}'", e);
            }
        }
Esempio n. 4
0
 private static bool IsInRangeQ(Obj_AI_Minion minion)
 {
     return minion.LSIsValidTarget(Math.Max(465 + minion.BoundingRadius / 3, 475));
 }
Esempio n. 5
0
 private static bool IsInRangeQ(Obj_AI_Minion minion)
 {
     return(minion.LSIsValidTarget(Math.Max(475 + minion.BoundingRadius / 3 - 5, 475)));
 }
Esempio n. 6
0
        private void JungleSmite()
        {
            try
            {
                if (!getKeyBindItem("ElSmite.Activated"))
                {
                    return;
                }

                Minion = (Obj_AI_Minion) EntityManager.MinionsAndMonsters.Monsters.FirstOrDefault(buff => this.Player.IsInRange(buff, 570) && (buff.Name.StartsWith(buff.BaseSkinName) || BuffsThatActuallyMakeSenseToSmite.Contains(buff.BaseSkinName)) && !buff.Name.Contains("Mini") && !buff.Name.Contains("Spawn"));

                if (Minion == null)
                {
                    return;
                }

                if (getCheckBoxItem(Minion.CharData.BaseSkinName))
                {
                    if (this.SmiteSpell.IsReady())
                    {
                        if (Minion.LSIsValidTarget(570f))
                        {
                            if (this.Player.GetSummonerSpellDamage(Minion, LeagueSharp.Common.Damage.SummonerSpell.Smite) >= Minion.Health && this.SmiteSpell.CanCast(Minion))
                            {
                                this.SmiteSpell.Cast(Minion);
                            }
                        }

                        if (getCheckBoxItem("Smite.Spell"))
                        {
                            this.ChampionSpellSmite((float)this.Player.GetSummonerSpellDamage(Minion, LeagueSharp.Common.Damage.SummonerSpell.Smite), Minion);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occurred: '{0}'", e);
            }
        }