コード例 #1
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 => Extensions.IsRendKillable(x))
                .OrderBy(x => x.GetTotalHealth())
                .FirstOrDefault();

            var rendTarget =
                HeroManager.Enemies.Where(
                    x =>
                    this.spells[SpellSlot.E].IsInRange(x) && Extensions.GetRendDamage(x) >= 1 && !x.HasBuffOfType(BuffType.Invulnerability) && !x.HasBuffOfType(BuffType.SpellShield)).OrderByDescending(x => Extensions.GetRendDamage(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) && Extensions.IsRendKillable(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;
                }
            }
        }
コード例 #2
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) && Extensions.GetRendDamage(x) >= 1 &&
                        !x.HasBuffOfType(BuffType.Invulnerability) && !x.HasBuffOfType(BuffType.SpellShield))
                    .OrderByDescending(x => Extensions.GetRendDamage(x))
                    .FirstOrDefault();

                if (rendTarget != null)
                {
                    var stackCount = rendTarget.GetBuffCount("kalistaexpungemarker");
                    if (Extensions.IsRendKillable(rendTarget) || 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 => Extensions.IsRendKillable(x))
                    .OrderBy(x => x.GetTotalHealth())
                    .FirstOrDefault();
                var target =
                    HeroManager.Enemies.Where(
                        x =>
                        this.spells[SpellSlot.E].CanCast(x) && Extensions.GetRendDamage(x) >= 1 &&
                        !x.HasBuffOfType(BuffType.SpellShield))
                    .OrderByDescending(x => Extensions.GetRendDamage(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;
                }
            }
        }
コード例 #3
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 =>
                    Extensions.IsRendKillable(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 =>
                    Extensions.IsRendKillable(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 && Extensions.IsRendKillable(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 && Extensions.IsRendKillable(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;
            }
        }
コード例 #4
0
 /// <summary>
 ///     Kill steal
 /// </summary>
 private void KillstealQ()
 {
     foreach (var source in HeroManager.Enemies.Where(x => this.spells[SpellSlot.E].IsInRange(x) && Extensions.IsRendKillable(x)))
     {
         if (source.IsValidTarget(this.spells[SpellSlot.E].Range) && !this.HasUndyingBuff(source))
         {
             this.spells[SpellSlot.E].Cast();
             this.spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
         }
     }
 }
コード例 #5
0
ファイル: Kalista.cs プロジェクト: Burbb/Portaio
 /// <summary>
 ///     Kill steal
 /// </summary>
 private void KillstealQ()
 {
     foreach (var source in EntityManager.Heroes.Enemies.Where(x => spells[SpellSlot.E].IsInRange(x) && Extensions.IsRendKillable(x)))
     {
         if (source.LSIsValidTarget(spells[SpellSlot.E].Range) && !HasUndyingBuff(source) && Extensions.IsRendKillable(source))
         {
             spells[SpellSlot.E].Cast();
             spells[SpellSlot.E].LastCastAttemptT = Environment.TickCount;
         }
     }
 }