コード例 #1
0
ファイル: Program.cs プロジェクト: volder1/EloBuddy
        /// <summary>
        /// Auto Q
        /// </summary>
        private static void AutoQ()
        {
            var target      = TargetSelector.GetTarget(Q.Range, DamageType.Magical);
            var allMinionsQ =
                EntityManager.MinionsAndMonsters.EnemyMinions.Where(t => Q.IsInRange(t)).OrderBy(t => t.Health);

            if (target == null)
            {
                return;
            }

            if (Q.IsReady() && allMinionsQ.Any())
            {
                foreach (
                    var minion in
                    allMinionsQ.Where(
                        minion =>
                        minion.Health < DamageLibrary.CalculateDamage(minion, true, false, false, false) &&
                        Q.IsInRange(minion)))
                {
                    Q.Cast(minion);
                }
            }
            else if (Q.IsReady() && target.IsValidTarget(Q.Range) && Player.Instance.ManaPercent >= 25)
            {
                Q.Cast(target);
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: volder1/EloBuddy
        /// <summary>
        /// Kill Steal
        /// </summary>
        private static void KillSteal()
        {
            var ksq = KillStealMenu["KSQ"].Cast <CheckBox>().CurrentValue;
            var ksr = KillStealMenu["KSR"].Cast <CheckBox>().CurrentValue;

            if (ksq)
            {
                var target =
                    EntityManager.Heroes.Enemies.Where(
                        t =>
                        t.IsValidTarget() && Q.IsInRange(t) &&
                        DamageLibrary.CalculateDamage(t, true, false, false, false) >= t.Health)
                    .OrderBy(t => t.Health)
                    .FirstOrDefault();

                if (target != null && Q.IsReady())
                {
                    Q.Cast(target);
                }
            }

            if (!ksr)
            {
                return;
            }

            var rTarget =
                EntityManager.Heroes.Enemies.Where(
                    t =>
                    t.IsValidTarget() && R.IsInRange(t) &&
                    DamageLibrary.CalculateDamage(t, false, false, false, true) >= t.Health)
                .OrderBy(t => t.Health)
                .FirstOrDefault();

            if (rTarget == null || !R.IsReady())
            {
                return;
            }
            var pred = R.GetPrediction(rTarget);

            if (pred.HitChance >= HitChance.High)
            {
                R.Cast(pred.CastPosition);
            }
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: volder1/EloBuddy
        /// <summary>
        /// LaneClear
        /// </summary>
        private static void LaneClear()
        {
            var qClear       = LaneClearMenu["qclear"].Cast <CheckBox>().CurrentValue;
            var qManaManager = LaneClearMenu["qManaManager"].Cast <Slider>().CurrentValue;
            var qMinion      =
                EntityManager.MinionsAndMonsters.EnemyMinions.Where(
                    t => Q.IsInRange(t) && t.IsValidTarget());

            foreach (var m in qMinion.Where(m => Q.IsReady() &&
                                            qClear
                                            &&
                                            m.Health <= DamageLibrary.CalculateDamage(m, true, false, false, false) &&
                                            qManaManager <= (int)Player.Instance.ManaPercent))
            {
                Q.Cast(m);
            }

            var useR = LaneClearMenu["rclear"].Cast <CheckBox>().CurrentValue;

            if (useR)
            {
                var allMinionsR =
                    EntityManager.MinionsAndMonsters.EnemyMinions.Where(t => R.IsInRange(t) && t.IsValidTarget())
                    .OrderBy(t => t.Health);
                var rLocation = EntityManager.MinionsAndMonsters.GetCircularFarmLocation(allMinionsR, R.Width,
                                                                                         (int)R.Range);
                var minionR = LaneClearMenu["minionR"].Cast <Slider>().CurrentValue;

                if (rLocation.HitNumber >= minionR &&
                    Environment.TickCount - LaneClearLastR >= Delay)
                {
                    R.Cast(rLocation.CastPosition);
                    LaneClearLastR = Environment.TickCount;
                }
            }
        }