예제 #1
0
파일: Program.cs 프로젝트: tekintr/Elobuddy
        void OnCombo()
        {
            var target = TargetSelector.GetTarget(Q.Range, DamageType.Physical);

            if (!target.IsValidTarget(Q.Range) || target == null)
            {
                return;
            }
            if (CaitlynTheTrollMeNu.ComboE() && CaitlynTheTrollMeNu.LogicE() && !Boom())
            {
                if (E.IsReady() && E.CanCast(target))
                {
                    var predE = E.GetPrediction(target);
                    if (predE.HitChancePercent >= CaitlynTheTrollMeNu.PredE())
                    {
                        E.Cast(predE.CastPosition);
                    }
                    else
                    {
                        if (target.IsValidTarget(200))
                        {
                            E.Cast(predE.CastPosition);
                        }
                    }
                }
            }
            if (CaitlynTheTrollMeNu.ComboQ() && CaitlynTheTrollMeNu.LogicQ() && !Boom())
            {
                if (Q.IsReady() && Q.CanCast(target))
                {
                    var predq = W.GetPrediction(target);
                    if (predq.HitChancePercent >= CaitlynTheTrollMeNu.PredQ())
                    {
                        Q.Cast(predq.CastPosition);
                    }
                }
            }
            if (CaitlynTheTrollMeNu.ComboW() && W.Handle.Ammo >= CaitlynTheTrollMeNu.LimitTrap())
            {
                if (W.IsReady())
                {
                    var predictionPos = Prediction.Position.PredictUnitPosition(target, 500).To3D();

                    if (W.IsInRange(predictionPos))
                    {
                        W.Cast(predictionPos);
                    }
                }
            }
            if ((ObjectManager.Player.CountEnemiesInRange(ObjectManager.Player.AttackRange) >=
                 CaitlynTheTrollMeNu.YoumusEnemies() ||
                 Player.HealthPercent >= CaitlynTheTrollMeNu.ItemsYoumuShp()) &&
                Activator.Youmus.IsReady() && CaitlynTheTrollMeNu.Youmus() && Activator.Youmus.IsOwned())
            {
                Activator.Youmus.Cast();
                return;
            }
            if (Player.HealthPercent <= CaitlynTheTrollMeNu.BilgewaterHp() &&
                CaitlynTheTrollMeNu.Bilgewater() &&
                Activator.Bilgewater.IsReady() && Activator.Bilgewater.IsOwned())
            {
                Activator.Bilgewater.Cast(target);
                return;
            }

            if (Player.HealthPercent <= CaitlynTheTrollMeNu.BotrkHp() && CaitlynTheTrollMeNu.Botrk() &&
                Activator.Botrk.IsReady() &&
                Activator.Botrk.IsOwned())
            {
                Activator.Botrk.Cast(target);
            }
        }
예제 #2
0
        void OnCombo()
        {
            var enemies = EntityManager.Heroes.Enemies.OrderByDescending
                              (a => a.HealthPercent).Where(a => !a.IsMe && a.IsValidTarget() && a.Distance(Player) <= Q.Range);
            var target = TargetSelector.GetTarget(1400, DamageType.Physical);

            if (!target.IsValidTarget(Q.Range) || target == null)
            {
                return;
            }
            if (E.IsReady() && target.IsValidTarget(750) && CaitlynTheTrollMeNu.ComboE())
            {
                var predE = Q.GetPrediction(target);
                if (predE.HitChance >= HitChance.Medium)
                {
                    E.Cast(predE.CastPosition);
                }
            }
            if (Q.IsReady() && target.IsValidTarget(850))
            {
                foreach (var eenemies in enemies)
                {
                    var useQ = CaitlynTheTrollMeNu.ComboMenu["combo.q"
                                                             + eenemies.ChampionName].Cast <CheckBox>().CurrentValue;
                    if (useQ)
                    {
                        var predQ = Q.GetPrediction(target);
                        if (predQ.HitChance >= HitChance.High)
                        {
                            Q.Cast(predQ.CastPosition);
                        }
                    }
                }
            }
            if (CaitlynTheTrollMeNu.ComboW() && W.IsReady() && target.IsValidTarget(W.Range) && !target.IsInvulnerable)
            {
                var predW = W.GetPrediction(target);
                if (predW.HitChance >= HitChance.Medium)
                {
                    W.Cast(predW.CastPosition);
                }
                else if (predW.HitChance >= HitChance.Immobile)
                {
                    W.Cast(predW.CastPosition);
                }
            }
            if ((ObjectManager.Player.CountEnemiesInRange(ObjectManager.Player.AttackRange) >=
                 CaitlynTheTrollMeNu.YoumusEnemies() ||
                 Player.HealthPercent >= CaitlynTheTrollMeNu.ItemsYoumuShp()) &&
                Activator.Youmus.IsReady() && CaitlynTheTrollMeNu.Youmus() && Activator.Youmus.IsOwned())
            {
                Activator.Youmus.Cast();
                return;
            }
            if (Player.HealthPercent <= CaitlynTheTrollMeNu.BilgewaterHp() &&
                CaitlynTheTrollMeNu.Bilgewater() &&
                Activator.Bilgewater.IsReady() && Activator.Bilgewater.IsOwned())
            {
                Activator.Bilgewater.Cast(target);
                return;
            }

            if (Player.HealthPercent <= CaitlynTheTrollMeNu.BotrkHp() && CaitlynTheTrollMeNu.Botrk() &&
                Activator.Botrk.IsReady() &&
                Activator.Botrk.IsOwned())
            {
                Activator.Botrk.Cast(target);
            }
        }