Exemplo n.º 1
0
        private static void Combo(AIHeroClient targ = null, bool force = false)
        {
            if (Q.LastCastedDelay(Delay) || R.LastCastedDelay(Delay))
            {
                //return;
            }

            if (!force && CastSecondW())
            {
                return;
            }

            var target = targ ?? TargetSelector.GetTarget(EFirst && E.IsReady() ? E.Range : W.Range + WRadius - 10, DamageType.Magical);

            if (!target.LSIsValidTarget())
            {
                //Console.WriteLine("BAD TARG");
                return;
            }

            if (CastEFirst(target))
            {
                Console.WriteLine("Combo: Cast E FIRST");
                return;
            }

            if (Q.CanCast(target) && Q.IsActive(force) && Q.CastOnUnit(target))
            {
                Console.WriteLine("Combo: Cast Q");
                return;
            }

            SpellManager.UpdateUltimate();
            if (R.CanCast(target) && R.IsActive(force) && R.GetSpellSlot() == SpellSlot.Q && R.CastOnUnit(target))
            {
                Console.WriteLine("Combo: Cast R(Q)");
                return;
            }

            if (W.IsReady() && target.LSIsValidTarget(W.Range + WRadius - 10) && W.IsActive(force) && W.IsFirstW())
            {
                if (!force ||
                    (target.CountEnemiesInRange(300) <= getSliderItem(ksMenu, "KSEnemies") &&
                     Player.HealthPercent >= getSliderItem(ksMenu, "KSHealth")))
                {
                    var pos = Prediction.GetPrediction(target, W.Delay, W.Range + WRadius, W.Speed);
                    if (pos.CastPosition.LSDistance(target.ServerPosition) < WRadius)
                    {
                        W.Cast(target);
                        Console.WriteLine("Combo: Cast W");
                        return;
                    }
                }
            }

            if (E.CanCast(target) && E.IsActive(force) && target.DistanceToPlayer() > 50 && E.Cast(target).IsCasted())
            {
                Console.WriteLine("Combo: Cast E");
            }
        }
Exemplo n.º 2
0
        private static void Combo(AIHeroClient targ = null, bool force = false)
        {
            if (Q.LastCastedDelay(Delay) || R.LastCastedDelay(Delay))
            {
                //return;
            }

            if (!force && CastSecondW())
            {
                return;
            }

            var target = targ ?? TargetSelector.GetTarget(EFirst && E.IsReady() ? E.Range : W.Range + WRadius - 10, DamageType.Magical);

            if (!target.LSIsValidTarget())
            {
                //Console.WriteLine("BAD TARG");
                return;
            }

            if (CastEFirst(target))
            {
                Console.WriteLine("Combo: Cast E FIRST");
                return;
            }

            if (Q.CanCast(target) && Q.IsActive(force) && Q.CastOnUnit(target))
            {
                Console.WriteLine("Combo: Cast Q");
                return;
            }

            SpellManager.UpdateUltimate();
            if (R.CanCast(target) && R.IsActive(force) && R.GetSpellSlot() == SpellSlot.Q && R.CastOnUnit(target))
            {
                Console.WriteLine("Combo: Cast R(Q)");
                return;
            }

            Console.WriteLine(W.IsActive(force).ToString());

            if (W.IsReady() && target.LSIsValidTarget(W.Range) && W.IsActive(force) && W.IsFirstW())
            {
                Console.WriteLine("Combo: Cast W");
                var pred = W.GetPrediction(target);
                if (W.IsInRange(target) && target != null)
                {
                    W.Cast(pred.CastPosition);
                }
            }

            if (E.CanCast(target) && E.IsActive(force) && target.DistanceToPlayer() > 50 && E.Cast(target).IsCasted())
            {
                Console.WriteLine("Combo: Cast E");
            }
        }
Exemplo n.º 3
0
        private static bool Combo(AIHeroClient forcedTarget = null)
        {
            //var mode = Orbwalker.ActiveModesFlags;
            var comboMode   = getBoxItem(miscMenu, "ComboMode");
            var d           = comboMode == 0 ? E.Range : Q.Range;
            var forceTarget = forcedTarget.IsValidTarget();
            var target      = forceTarget ? forcedTarget : TargetSelector.GetTarget(d, DamageType.Magical);

            if (!target.IsValidTarget())
            {
                return(false);
            }

            var q = Q.CanCast(target) && Q.IsActive(forceTarget);
            var w = W.CanCast(target) && W.IsActive(forceTarget);
            var e = E.CanCast(target) && E.IsActive(forceTarget) &&
                    target.CountEnemiesInRange(200) <= getSliderItem(eMenu, "EEnemies");

            if (!forceTarget && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) &&
                getKeyBindItem(miscMenu, "ComboKillable"))
            {
                var damage = target.GetComboDamage(q, w, e, Utility.IsRReady(), true);
                if (target.Health > damage)
                {
                    return(false);
                }
            }

            var delay = (int)(100 + Game.Ping / 2f + Random.Next(150));

            if (Q.LastCastedDelay(delay) || E.LastCastedDelay(delay) || R.LastCastedDelay(delay))
            {
                return(false);
            }

            if (comboMode == 0 && q && e && CastE(target, forceTarget))
            {
                return(true);
            }

            if (q && Q.CastOnUnit(target))
            {
                return(true);
            }

            if (e && CastE(target, forceTarget))
            {
                return(true);
            }

            if (w && W.Cast())
            {
                return(true);
            }

            if (Utility.IsRReady() && (forceTarget || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)))
            {
                if (!forceTarget && getCheckBoxItem(rMenu, "RInCombo") && target.IsValidTarget(R.Range) && R.Cast())
                {
                    return(true);
                }

                if (!forceTarget && !getCheckBoxItem(rMenu, "RCombo"))
                {
                    return(false);
                }

                var enemy =
                    Enemies.FirstOrDefault(h => h.IsValidTarget(R.Range) && h.GetCalculatedRDamage(UltTicks) > h.Health);
                if (enemy != null && R.Cast())
                {
                    return(true);
                }
            }
            return(false);
        }