Exemplo n.º 1
0
        void Orbwalker_OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
        {
            var killableMinion = target as Obj_AI_Base;

            if (killableMinion == null || !this.spells[SpellSlot.E].IsReady())
            {
                return;
            }

            if (getCheckBoxItem(laneClearMenu, "eUnkillable") && Damages.GetActualDamage(killableMinion) > killableMinion.GetTotalHealth() + 10 && this.spells[SpellSlot.E].CanCast(killableMinion) && killableMinion.HasBuff("KalistaExpungeMarker"))
            {
                this.spells[SpellSlot.E].Cast();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Perform the combo
        /// </summary>
        private void OnCombo()
        {
            if (getCheckBoxItem(miscMenu, "exploit") && ObjectManager.Player.AttackDelay / 1 > 1.70)
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(ObjectManager.Player.AttackRange)))
                {
                    if (Game.Time * 1000 >= Orbwalker.LastAutoAttack + 1)
                    {
                        EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    }
                    if (Game.Time * 1000 > Orbwalker.LastAutoAttack + ObjectManager.Player.AttackDelay * 1000 - 150)
                    {
                        EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, enemy);
                    }
                }
            }

            if (this.spells[SpellSlot.Q].IsReady() && getCheckBoxItem(comboMenu, "useQ") && !ObjectManager.Player.IsDashing() &&
                !Orbwalker.IsAutoAttacking)
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(spells[SpellSlot.Q].Range)))
                {
                    var prediction = this.spells[SpellSlot.Q].GetSPrediction(enemy);
                    if (prediction.HitChance >= LeagueSharp.Common.HitChance.High)
                    {
                        this.spells[SpellSlot.Q].Cast(prediction.CastPosition);
                    }
                    else if (prediction.HitChance == LeagueSharp.Common.HitChance.Collision)
                    {
                        this.QCollisionCheck(enemy);
                    }
                }
            }
            if (this.spells[SpellSlot.E].IsReady() && getCheckBoxItem(comboMenu, "useE"))
            {
                foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(spells[SpellSlot.E].Range) && x.HasBuff("KalistaExpungeMarker")))
                {
                    var stacks = enemy.GetBuffCount("kalistaexpungemarker");
                    var damage = Math.Ceiling(Damages.GetActualDamage(enemy) * 100 / enemy.GetTotalHealth());

                    if (getCheckBoxItem(comboMenu, "eLeaving") && damage >= getSliderItem(comboMenu, "ePercent") && enemy.HealthPercent > 20 && enemy.ServerPosition.Distance(ObjectManager.Player.ServerPosition, true) > Math.Pow(this.spells[SpellSlot.E].Range * 0.8, 2) && Environment.TickCount - this.spells[SpellSlot.E].LastCastAttemptT > 500)
                    {
                        this.spells[SpellSlot.E].Cast();
                        this.spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
                    }
                }
            }
        }
Exemplo n.º 3
0
        public static bool IsRendKillable(this Obj_AI_Base target)
        {
            if (target == null ||
                !target.IsValidTarget(950 + 200) ||
                !target.HasRendBuff() ||
                target.Health <= 0 ||
                !ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).IsReady)
            {
                return(false);
            }

            var hero = target as AIHeroClient;

            if (hero != null)
            {
                if (hero.HasUndyingBuff() || hero.HasSpellShield())
                {
                    return(false);
                }

                if (hero.ChampionName == "Blitzcrank")
                {
                    if (!hero.HasBuff("BlitzcrankManaBarrierCD") && !hero.HasBuff("ManaBarrier"))
                    {
                        return(Damages.GetActualDamage(target) > (target.GetTotalHealth() + (hero.Mana / 2)));
                    }

                    if (hero.HasBuff("ManaBarrier") && !(hero.AllShield > 0))
                    {
                        return(false);
                    }
                }
            }

            return(Damages.GetActualDamage(target) > target.GetTotalHealth());
        }
Exemplo n.º 4
0
        /// <summary>
        ///     TODO The on update.
        /// </summary>
        /// <param name="args">
        ///     TODO The args.
        /// </param>
        private void OnUpdate(EventArgs args)
        {
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                OnCombo();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                OnHarass();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
            {
                OnLastHit();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                OnLaneClear();
            }

            this.HandleSentinels();
            this.KillstealQ();

            var enemies = HeroManager.Enemies.Count(x => ObjectManager.Player.Distance(x) <= this.spells[SpellSlot.E].Range);

            if (getCheckBoxItem(comboMenu, "eDeath") && enemies > 2 && ObjectManager.Player.HealthPercent <= getSliderItem(comboMenu, "eHealth") && this.spells[SpellSlot.E].IsReady())
            {
                var target = HeroManager.Enemies.Where(x => this.spells[SpellSlot.E].IsInRange(x) && x.HasBuff("KalistaExpungeMarker")).OrderBy(x => Damages.GetActualDamage(x)).FirstOrDefault();
                if (target != null)
                {
                    var stacks = Damages.GetActualDamage(target);
                    var damage = Math.Ceiling(stacks * 100 / target.GetTotalHealth());
                    if (damage >= getSliderItem(comboMenu, "eDeathC") && Environment.TickCount - this.spells[SpellSlot.E].LastCastAttemptT > 500)
                    {
                        this.spells[SpellSlot.E].Cast();
                        this.spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
                    }
                }
            }

            if (getCheckBoxItem(miscMenu, "useJungleSteal"))
            {
                this.DoMobSteal();
            }

            if (getKeyBindItem(miscMenu, "fleeKey") || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))
            {
                this.OnFlee();
            }

            var item = new Item(ItemId.Farsight_Alteration);

            if (getCheckBoxItem(miscMenu, "autoTrinket") && ObjectManager.Player.Level >= 9 && ObjectManager.Player.InShop() && !Items.HasItem((int)ItemId.Farsight_Alteration))
            {
                item.Buy();
            }

            this.HandleBalista();
        }
Exemplo n.º 5
0
        /// <summary>
        ///     Perform the lane clear function
        /// </summary>
        private void OnLaneClear()
        {
            var minions = MinionManager.GetMinions(this.spells[SpellSlot.E].Range);

            if (getCheckBoxItem(laneClearMenu, "useQLC") && this.spells[SpellSlot.Q].IsReady())
            {
                if (getCheckBoxItem(comboMenu, "saveManaR") && this.spells[SpellSlot.R].IsReady() &&
                    ObjectManager.Player.Mana
                    < this.spells[SpellSlot.Q].Instance.SData.Mana + this.spells[SpellSlot.R].Instance.SData.Mana)
                {
                    return;
                }

                foreach (var selectedMinion in
                         from selectedMinion in minions
                         let killcount =
                             this.GetCollisionMinions(
                                 ObjectManager.Player,
                                 ObjectManager.Player.ServerPosition.LSExtend(
                                     selectedMinion.ServerPosition,
                                     this.spells[SpellSlot.Q].Range))
                             .Count(
                                 collisionMinion =>
                                 collisionMinion.GetTotalHealth() < this.spells[SpellSlot.Q].GetDamage(collisionMinion))
                             where killcount >= getSliderItem(laneClearMenu, "minHitQ")
                             where !Orbwalker.IsAutoAttacking && !ObjectManager.Player.IsDashing()
                             select selectedMinion)
                {
                    this.spells[SpellSlot.Q].Cast(selectedMinion.ServerPosition);
                }
            }

            var harassableMinion =
                MinionManager.GetMinions(this.spells[SpellSlot.E].Range, MinionTypes.All, MinionTeam.NotAlly)
                .Where(x => x.GetTotalHealth() <= Damages.GetActualDamage(x))
                .OrderBy(x => x.GetTotalHealth())
                .FirstOrDefault();

            var rendTarget =
                HeroManager.Enemies.Where(
                    x =>
                    this.spells[SpellSlot.E].IsInRange(x) && Damages.GetActualDamage(x) >= 1 &&
                    !x.HasBuffOfType(BuffType.Invulnerability) && !x.HasBuffOfType(BuffType.SpellShield))
                .OrderByDescending(x => Damages.GetActualDamage(x))
                .FirstOrDefault();

            if (getCheckBoxItem(laneClearMenu, "minLC") && harassableMinion != null && rendTarget != null && this.spells[SpellSlot.E].CanCast(harassableMinion) && this.spells[SpellSlot.E].CanCast(rendTarget) && Environment.TickCount - this.spells[SpellSlot.E].LastCastAttemptT > 500)
            {
                this.spells[SpellSlot.E].Cast();
                this.spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
            }

            if (this.spells[SpellSlot.E].IsReady() && getCheckBoxItem(laneClearMenu, "useELC"))
            {
                var count = minions.Count(x => this.spells[SpellSlot.E].CanCast(x) && x.GetTotalHealth() < Damages.GetActualDamage(x));

                if (count >= getSliderItem(laneClearMenu, "eHit") && Environment.TickCount - this.spells[SpellSlot.E].LastCastAttemptT > 500)
                {
                    this.spells[SpellSlot.E].Cast();
                    this.spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
                }
            }
        }
Exemplo n.º 6
0
        /// <summary>
        ///     Perform the harass function
        /// </summary>
        private void OnHarass()
        {
            var spearTarget = TargetSelector.GetTarget(
                this.spells[SpellSlot.Q].Range,
                DamageType.Physical);

            if (getCheckBoxItem(harassMenu, "useQH") && this.spells[SpellSlot.Q].IsReady() && !Orbwalker.IsAutoAttacking && !ObjectManager.Player.IsDashing())
            {
                if (getCheckBoxItem(miscMenu, "qMana") && ObjectManager.Player.Mana < this.spells[SpellSlot.Q].Instance.SData.Mana + this.spells[SpellSlot.E].Instance.SData.Mana && this.spells[SpellSlot.Q].GetDamage(spearTarget) < spearTarget.GetTotalHealth())
                {
                    return;
                }

                if (getCheckBoxItem(comboMenu, "saveManaR") && this.spells[SpellSlot.R].IsReady() &&
                    ObjectManager.Player.Mana
                    < this.spells[SpellSlot.Q].Instance.SData.Mana + this.spells[SpellSlot.R].Instance.SData.Mana)
                {
                    return;
                }

                foreach (var unit in
                         HeroManager.Enemies.Where(x => x.IsValidTarget(this.spells[SpellSlot.Q].Range))
                         .Where(unit => this.spells[SpellSlot.Q].GetSPrediction(unit).HitChance == LeagueSharp.Common.HitChance.Immobile))
                {
                    this.spells[SpellSlot.Q].Cast(unit.ServerPosition);
                }

                var prediction = this.spells[SpellSlot.Q].GetSPrediction(spearTarget);
                if (!Orbwalker.IsAutoAttacking && !ObjectManager.Player.IsDashing())
                {
                    switch (prediction.HitChance)
                    {
                    case LeagueSharp.Common.HitChance.Collision:
                        this.QCollisionCheck(spearTarget);
                        break;

                    case LeagueSharp.Common.HitChance.High:
                    case LeagueSharp.Common.HitChance.VeryHigh:
                        this.spells[SpellSlot.Q].Cast(prediction.CastPosition);
                        break;
                    }
                }
            }

            if (getCheckBoxItem(harassMenu, "useEH"))
            {
                var rendTarget =
                    HeroManager.Enemies.Where(
                        x =>
                        x.IsValidTarget(this.spells[SpellSlot.E].Range) && Damages.GetActualDamage(x) >= 1 &&
                        !x.HasBuffOfType(BuffType.Invulnerability) && !x.HasBuffOfType(BuffType.SpellShield))
                    .OrderByDescending(x => Damages.GetActualDamage(x))
                    .FirstOrDefault();

                if (rendTarget != null)
                {
                    var stackCount = rendTarget.GetBuffCount("kalistaexpungemarker");
                    if (Damages.GetActualDamage(rendTarget) > rendTarget.GetTotalHealth() || stackCount >= getSliderItem(comboMenu, "minStacks"))
                    {
                        if (Environment.TickCount - this.spells[SpellSlot.E].LastCastAttemptT < 500)
                        {
                            return;
                        }

                        this.spells[SpellSlot.E].Cast();
                        this.spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
                    }
                }
            }

            if (getCheckBoxItem(harassMenu, "useEMin"))
            {
                var minion =
                    MinionManager.GetMinions(this.spells[SpellSlot.E].Range, MinionTypes.All, MinionTeam.NotAlly)
                    .Where(x => x.GetTotalHealth() <= Damages.GetActualDamage(x))
                    .OrderBy(x => x.GetTotalHealth())
                    .FirstOrDefault();
                var target =
                    HeroManager.Enemies.Where(
                        x =>
                        this.spells[SpellSlot.E].CanCast(x) && Damages.GetActualDamage(x) >= 1 &&
                        !x.HasBuffOfType(BuffType.SpellShield))
                    .OrderByDescending(x => Damages.GetActualDamage(x))
                    .FirstOrDefault();

                if (minion != null && target != null && this.spells[SpellSlot.E].CanCast(minion) && this.spells[SpellSlot.E].CanCast(target) && Environment.TickCount - this.spells[SpellSlot.E].LastCastAttemptT > 500)
                {
                    this.spells[SpellSlot.E].Cast();
                    this.spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
                }
            }
        }
Exemplo n.º 7
0
 /// <summary>
 ///     Kill steal
 /// </summary>
 private void KillstealQ()
 {
     foreach (var source in HeroManager.Enemies.Where(x => this.spells[SpellSlot.E].IsInRange(x) && Damages.GetActualDamage(x) > x.GetTotalHealth()))
     {
         if (source.IsValidTarget(this.spells[SpellSlot.E].Range) && !this.HasUndyingBuff(source))
         {
             this.spells[SpellSlot.E].Cast();
             this.spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
         }
     }
 }
Exemplo n.º 8
0
        /// <summary>
        ///     Initialize all the events
        /// </summary>
        private void InitEvents()
        {
            LeagueSharp.Common.Utility.HpBarDamageIndicator.DamageToUnit = Damages.GetActualDamage;
            LeagueSharp.Common.Utility.HpBarDamageIndicator.Enabled      = true;

            CustomDamageIndicator.Initialize(Damages.GetActualDamage);

            Game.OnUpdate += this.OnUpdate;

            Obj_AI_Base.OnProcessSpellCast += this.OnProcessSpell;

            Orbwalker.OnUnkillableMinion += Orbwalker_OnUnkillableMinion;

            Drawing.OnDraw += args =>
            {
                if (getCheckBoxItem(drawMenu, "drawQ"))
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, spells[SpellSlot.Q].Range, Color.FromArgb(150, Color.Red));
                }

                if (getCheckBoxItem(drawMenu, "drawE"))
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, spells[SpellSlot.E].Range, Color.FromArgb(150, Color.Red));
                }

                CustomDamageIndicator.DrawingColor = Color.FromArgb(150, Color.LawnGreen);

                if (getCheckBoxItem(drawMenu, "drawPercentage"))
                {
                    foreach (var source in HeroManager.Enemies.Where(x => ObjectManager.Player.Distance(x) <= 2000f && !x.IsDead))
                    {
                        var currentPercentage        = Damages.GetActualDamage(source) * 100 / source.GetTotalHealth();
                        var updatedCurrentPercentage = (int)Math.Ceiling(currentPercentage);

                        Drawing.DrawText(
                            Drawing.WorldToScreen(source.Position)[0],
                            Drawing.WorldToScreen(source.Position)[1],
                            currentPercentage >= 100 ? Color.Gold : Color.White,
                            currentPercentage >= 100
                                    ? "Killable With E"
                                    : "Current Damage: " + updatedCurrentPercentage + "%");
                    }
                }

                if (getCheckBoxItem(drawMenu, "drawJunglePercentage"))
                {
                    foreach (var jungleMobs in
                             ObjectManager.Get <Obj_AI_Minion>().Where(x => ObjectManager.Player.Distance(x) <= spells[SpellSlot.E].Range && !x.IsDead &&
                                                                       x.Team == GameObjectTeam.Neutral))
                    {
                        var currentPercentage        = Damages.GetActualDamage(jungleMobs) * 100 / jungleMobs.GetTotalHealth();
                        var updatedCurrentPercentage = (int)Math.Ceiling(currentPercentage);

                        var changeby = 40;

                        if (updatedCurrentPercentage >= 0)
                        {
                            switch (jungleMobs.CharData.BaseSkinName)
                            {
                            case "SRU_Razorbeak":
                                Drawing.DrawText(jungleMobs.HPBarPosition.X + 50, jungleMobs.HPBarPosition.Y + changeby, Color.GreenYellow,
                                                 string.Format("{0}%", updatedCurrentPercentage));
                                break;

                            case "SRU_Red":
                                Drawing.DrawText(jungleMobs.HPBarPosition.X, jungleMobs.HPBarPosition.Y + changeby, Color.GreenYellow,
                                                 string.Format("{0}%", updatedCurrentPercentage));
                                break;

                            case "SRU_Blue":
                                Drawing.DrawText(jungleMobs.HPBarPosition.X, jungleMobs.HPBarPosition.Y + changeby, Color.GreenYellow,
                                                 string.Format("{0}%", updatedCurrentPercentage));
                                break;

                            case "SRU_Dragon":
                                Drawing.DrawText(jungleMobs.HPBarPosition.X, jungleMobs.HPBarPosition.Y + changeby, Color.GreenYellow,
                                                 string.Format("{0}%", updatedCurrentPercentage));
                                break;

                            case "SRU_Baron":
                                Drawing.DrawText(jungleMobs.HPBarPosition.X, jungleMobs.HPBarPosition.Y + changeby, Color.GreenYellow,
                                                 string.Format("{0}%", updatedCurrentPercentage));
                                break;

                            case "SRU_Gromp":
                                Drawing.DrawText(jungleMobs.HPBarPosition.X, jungleMobs.HPBarPosition.Y + changeby, Color.GreenYellow,
                                                 string.Format("{0}%", updatedCurrentPercentage));
                                break;

                            case "SRU_Krug":
                                Drawing.DrawText(jungleMobs.HPBarPosition.X + 53, jungleMobs.HPBarPosition.Y + changeby, Color.GreenYellow,
                                                 string.Format("{0}%", updatedCurrentPercentage));
                                break;

                            case "SRU_Murkwolf":
                                Drawing.DrawText(jungleMobs.HPBarPosition.X + 50, jungleMobs.HPBarPosition.Y + changeby, Color.GreenYellow,
                                                 string.Format("{0}%", updatedCurrentPercentage));
                                break;

                            case "Sru_Crab":
                                Drawing.DrawText(jungleMobs.HPBarPosition.X + 50, jungleMobs.HPBarPosition.Y + 20, Color.GreenYellow,
                                                 string.Format("{0}%", updatedCurrentPercentage));
                                break;
                            }
                        }
                    }
                }
            };
        }
Exemplo n.º 9
0
        /// <summary>
        ///     This is where the magic happens, we like to steal other peoples stuff.
        /// </summary>
        private void DoMobSteal()
        {
            var junglelMinions =
                MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition,
                    this.spells[SpellSlot.E].Range,
                    MinionTypes.All,
                    MinionTeam.Neutral,
                    MinionOrderTypes.MaxHealth)
                .FirstOrDefault(
                    x =>
                    x.GetTotalHealth() <= Damages.GetActualDamage(x) && !x.Name.Contains("Mini") &&
                    !x.Name.Contains("Dragon") && !x.Name.Contains("Baron"));

            var bigMinions =
                MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition,
                    this.spells[SpellSlot.E].Range,
                    MinionTypes.All,
                    MinionTeam.Enemy,
                    MinionOrderTypes.MaxHealth)
                .FirstOrDefault(
                    x =>
                    x.GetTotalHealth() <= Damages.GetActualDamage(x) &&
                    (x.BaseSkinName.ToLower().Contains("siege") || x.BaseSkinName.ToLower().Contains("super")));

            var baron =
                MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition,
                    this.spells[SpellSlot.E].Range,
                    MinionTypes.All,
                    MinionTeam.Neutral,
                    MinionOrderTypes.MaxHealth)
                .FirstOrDefault(x => x.IsValid && x.GetTotalHealth() < Damages.GetActualDamage(x) && x.Name.Contains("Baron"));

            var dragon =
                MinionManager.GetMinions(
                    ObjectManager.Player.ServerPosition,
                    this.spells[SpellSlot.E].Range,
                    MinionTypes.All,
                    MinionTeam.Neutral,
                    MinionOrderTypes.MaxHealth)
                .FirstOrDefault(x => x.IsValid && x.GetTotalHealth() < Damages.GetActualDamage(x) && x.Name.Contains("Dragon"));

            switch (getBoxItem(miscMenu, "jungStealMode"))
            {
            case 0:     // jungle mobs
                if ((junglelMinions != null && this.spells[SpellSlot.E].CanCast(junglelMinions)) ||
                    (baron != null && this.spells[SpellSlot.E].CanCast(baron)) ||
                    (dragon != null && this.spells[SpellSlot.E].CanCast(dragon)))
                {
                    this.spells[SpellSlot.E].Cast();
                }

                break;

            case 1:     // siege and super
                if (bigMinions != null)
                {
                    this.spells[SpellSlot.E].Cast();
                }

                break;

            case 2:     // both
                if ((junglelMinions != null && this.spells[SpellSlot.E].CanCast(junglelMinions)) ||
                    (baron != null && this.spells[SpellSlot.E].CanCast(baron)) ||
                    (dragon != null && this.spells[SpellSlot.E].CanCast(dragon)) ||
                    (bigMinions != null && this.spells[SpellSlot.E].CanCast(bigMinions)))
                {
                    this.spells[SpellSlot.E].Cast();
                }

                break;
            }
        }