예제 #1
0
        // Human W Logic
        internal static void CastBushwhack(Obj_AI_Base target, string mode)
        {
            // if not harass mode ignore mana check
            if (!KL.CatForm() && (mode != "ha" || KL.Player.ManaPercent > 65))
            {
                if (!KL.SpellTimer["Bushwhack"].IsReady() || !KN.Root.Item("ndhw" + mode).GetValue <bool>())
                {
                    return;
                }

                if (target.IsValidTarget(KL.Spells["Bushwhack"].Range))
                {
                    // try bushwhack prediction
                    if (KN.Root.Item("ndhwforce").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (target.IsChampion())
                        {
                            KL.Spells["Bushwhack"].CastIfHitchanceEquals(target, HitChance.VeryHigh);
                        }
                        else
                        {
                            KL.Spells["Bushwhack"].Cast(target.ServerPosition);
                        }
                    }

                    // try bushwhack behind target
                    if (KN.Root.Item("ndhwforce").GetValue <StringList>().SelectedIndex == 1)
                    {
                        var unitpos = KL.Spells["Bushwhack"].GetPrediction(target).UnitPosition;
                        KL.Spells["Bushwhack"].Cast(unitpos.Extend(KL.Player.ServerPosition, -75f));
                    }
                }
            }
        }
예제 #2
0
        internal static void Combo2()
        {
            var target = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Distance(Player.ServerPosition) <= 600 &&
                                                                   x.IsEnemy && x.IsHPBarRendered &&
                                                                   !MinionManager.IsWard(x)).OrderByDescending(x => x.MaxHealth).FirstOrDefault();

            Orb(target);

            if (target == null)
            {
                return;
            }

            if (Utils.GameTimeTickCount - KL.LastR >= 500 - Game.Ping)
            {
                if (!KL.CanUse(KL.Spells["Javelin"], true, "jg") && KL.CanUse(KL.Spells["Swipe"], false, "jg"))
                {
                    if (KL.CatForm() && target.IsValidTargetLS(KL.Spells["Swipe"].Range))
                    {
                        KL.Spells["Swipe"].Cast(target.ServerPosition);
                    }
                }

                if (!KL.CanUse(KL.Spells["Javelin"], true, "jg") &&
                    KL.CanUse(KL.Spells["Bushwhack"], false, "jg"))
                {
                    if (!KL.CatForm() && target.IsValidTargetLS(KL.Spells["Bushwhack"].Range) && KL.Player.ManaPercent > 40)
                    {
                        KL.Spells["Bushwhack"].Cast(target.ServerPosition);
                    }
                }

                if (!KL.CanUse(KL.Spells["Javelin"], true, "jg") && KL.CanUse(KL.Spells["Pounce"], false, "jg"))
                {
                    var r = target.IsHunted() ? KL.Spells["ExPounce"].Range : KL.Spells["Pounce"].Range;
                    if (KL.CatForm() && target.IsValidTargetLS(r))
                    {
                        KL.Spells["Pounce"].Cast(target.ServerPosition);
                    }
                }
            }

            if (KL.Spells["Takedown"].Level > 0 && KL.SpellTimer["Takedown"].IsReady() && !KL.CatForm())
            {
                if (KL.Spells["Aspect"].IsReady())
                {
                    KL.Spells["Aspect"].Cast();
                }
            }

            if (KL.Spells["Javelin"].Level > 0 && !KL.SpellTimer["Javelin"].IsReady() && !KL.CatForm())
            {
                if (KL.Spells["Aspect"].IsReady())
                {
                    KL.Spells["Aspect"].Cast();
                }
            }
        }
예제 #3
0
        // Human Q Logic
        internal static void CastJavelin(Obj_AI_Base target, string mode)
        {
            // if not harass mode ignore mana check
            if (!KL.CatForm() && (mode != "ha" || KL.Player.ManaPercent > 65))
            {
                if (!KL.SpellTimer["Javelin"].IsReady() || !KN.Root.Item("ndhq" + mode).GetValue <bool>())
                {
                    return;
                }

                if (target.IsValidTarget(KL.Spells["Javelin"].Range))
                {
                    // try prediction on champion
                    if (target.IsChampion())
                    {
                        var qoutput = KL.Spells["Javelin"].GetPrediction(target);
                        if (qoutput.Hitchance == HitChance.Collision && KL.Smite.IsReady())
                        {
                            if (KN.Root.Item("qsmcol").GetValue <bool>() && target.Health <= KL.CatDamage(target) * 3)
                            {
                                if (qoutput.CollisionObjects.All(i => i.NetworkId != KL.Player.NetworkId))
                                {
                                    var obj = qoutput.CollisionObjects.Cast <Obj_AI_Minion>().ToList();
                                    if (obj.Count == 1)
                                    {
                                        if (obj.Any(
                                                i =>
                                                i.Health <= KL.Player.GetSummonerSpellDamage(i, Damage.SummonerSpell.Smite) &&
                                                KL.Player.Distance(i) < 500 && KL.Player.Spellbook.CastSpell(KL.Smite, obj.First())))
                                        {
                                            KL.Spells["Javelin"].Cast(qoutput.CastPosition);
                                            return;
                                        }
                                    }
                                }
                            }
                        }

                        if (KN.Root.Item("ndhqcheck").GetValue <bool>() &&
                            qoutput.Hitchance >= (HitChance)KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3)
                        {
                            KL.Spells["Javelin"].Cast(qoutput.CastPosition);
                        }

                        if (!KN.Root.Item("ndhqcheck").GetValue <bool>())
                        {
                            KL.Spells["Javelin"].Cast(target);
                        }
                    }
                    else
                    {
                        KL.Spells["Javelin"].Cast(target);
                    }
                }
            }
        }
예제 #4
0
 // Cougar Q Logic
 internal static void CastTakedown(Obj_AI_Base target, string mode)
 {
     if (KL.CatForm() && KL.CanUse(KL.Spells["Takedown"], false, mode))
     {
         if (target.LSIsValidTarget(KL.Player.AttackRange + KL.Spells["Takedown"].Range))
         {
             KL.Spells["Takedown"].CastOnUnit(target);
         }
     }
 }
예제 #5
0
        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender.IsEnemy || sender.Type != Player.Type || !args.SData.IsAutoAttackLS())
            {
                return;
            }

            foreach (var ally in Allies().Where(hero => !hero.IsMelee))
            {
                if (ally.NetworkId != sender.NetworkId || !Root.Item("xx" + ally.ChampionName).GetValue <bool>())
                {
                    return;
                }

                if (args.Target.Type == GameObjectType.AIHeroClient || args.Target.Type == GameObjectType.obj_AI_Turret)
                {
                    // auto heal on ally hero attacking
                    if (KL.CanUse(KL.Spells["Primalsurge"], true, "on"))
                    {
                        if (ally.IsValidTargetLS(KL.Spells["Primalsurge"].Range, false) &&
                            ally.Health / ally.MaxHealth * 100 <= 90)
                        {
                            if (!Player.Spellbook.IsChanneling && !Player.IsRecalling())
                            {
                                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None ||
                                    ally.Health / ally.MaxHealth * 100 <= 20 || !KL.CatForm())
                                {
                                    if (Player.Mana / Player.MaxMana * 100 <
                                        Root.Item("ndhemana").GetValue <Slider>().Value&&
                                        !(ally.Health / ally.MaxHealth * 100 <= 20))
                                    {
                                        return;
                                    }

                                    if (KL.CatForm() == false)
                                    {
                                        KL.Spells["Primalsurge"].CastOnUnit(ally);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
예제 #6
0
        // Cougar E Logic
        internal static void CastSwipe(Obj_AI_Base target, string mode)
        {
            if (target == null)
            {
                return;
            }
            if (KL.CatForm() && KL.CanUse(KL.Spells["Swipe"], false, mode))
            {
                if (target.IsValidTarget(KL.Spells["Swipe"].Range))
                {
                    if (target.IsChampion())
                    {
                        if (KN.Root.Item("ndcecheck").GetValue <bool>())
                        {
                            var voutout = KL.Spells["Swipe"].GetPrediction(target);
                            if (voutout.Hitchance >= (HitChance)KN.Root.Item("ndcech").GetValue <StringList>().SelectedIndex + 3)
                            {
                                KL.Spells["Swipe"].Cast(voutout.CastPosition);
                            }
                        }
                        else
                        {
                            KL.Spells["Swipe"].Cast(target.ServerPosition);
                        }
                    }
                    else
                    {
                        // try aoe swipe if menu item > 1
                        var minhit = KN.Root.Item("ndcenum").GetValue <Slider>().Value;
                        if (minhit > 1 && mode == "wc")
                        {
                            KL.CastSmartSwipe();
                        }

                        // or cast normal
                        else
                        {
                            KL.Spells["Swipe"].Cast(target.ServerPosition);
                        }
                    }
                }
            }

            // check valid target in range
        }
예제 #7
0
        static void Drawing_OnDraw(EventArgs args)
        {
            if (Player.IsDead || !Player.IsValid)
            {
                return;
            }

            foreach (
                var unit in ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsValidTargetLS(900) && x.PassiveRooted()))
            {
                var b = unit.GetBuff("NidaleePassiveMonsterRoot");
                if (b.Caster.IsMe && b.EndTime - Game.Time > 0)
                {
                    var tpos = Drawing.WorldToScreen(unit.Position);
                    Drawing.DrawText(tpos[0], tpos[1], Color.DeepPink,
                                     "ROOTED " + (b.EndTime - Game.Time).ToString("F"));
                }
            }

            if (Root.Item("dti").GetValue <bool>())
            {
                var pos = Drawing.WorldToScreen(Player.Position);

                Drawing.DrawText(pos[0] + 100, pos[1] - 135, Color.White,
                                 "Q: " + KL.SpellTimer["Javelin"].ToString("F"));
            }

            if (Root.Item("dt").GetValue <bool>() && Target != null)
            {
                if (Root.Item("pstyle").GetValue <StringList>().SelectedIndex == 0)
                {
                    Render.Circle.DrawCircle(Target.Position, Target.BoundingRadius, Color.DeepPink, 6);
                }
            }

            if (Root.Item("dp").GetValue <bool>() && !KL.CatForm())
            {
                Render.Circle.DrawCircle(KL.Player.Position, KL.Spells["Javelin"].Range, Color.FromArgb(155, Color.DeepPink), 4);
            }

            if (Root.Item("dz").GetValue <bool>() && KL.CatForm())
            {
                Render.Circle.DrawCircle(KL.Player.Position, KL.Spells["ExPounce"].Range, Color.FromArgb(155, Color.DeepPink), 4);
            }
        }
예제 #8
0
        // Cougar Q Logic
        internal static void CastTakedown(Obj_AI_Base target, string mode)
        {
            if (KL.CatForm())
            {
                if (!KL.SpellTimer["Takedown"].IsReady() || !KN.Root.Item("ndcq" + mode).GetValue <bool>())
                {
                    return;
                }

                // temp logic to prevent takdown cast before swipe
                if (!KL.SpellTimer["Swipe"].IsReady() || KL.NotLearned(KL.Spells["Swipe"]) || !KN.Root.Item("ndce" + mode).GetValue <bool>())
                {
                    if (target.IsValidTarget(KL.Player.AttackRange + KL.Spells["Takedown"].Range))
                    {
                        KL.Spells["Takedown"].CastOnUnit(target);
                    }
                }
            }
        }
예제 #9
0
        internal static void Obj_AI_Base_OnBuffAdd(Obj_AI_Base sender, Obj_AI_BaseBuffAddEventArgs args)
        {
            var hero = sender as Obj_AI_Hero;

            if (hero != null && hero.IsEnemy && KL.SpellTimer["Javelin"].IsReady() && Root.Item("ndhqimm").GetValue <bool>())
            {
                if (hero.IsValidTarget(KL.Spells["Javelin"].Range))
                {
                    if (args.Buff.Type == BuffType.Stun || args.Buff.Type == BuffType.Snare ||
                        args.Buff.Type == BuffType.Taunt || args.Buff.Type == BuffType.Knockback)
                    {
                        if (!KL.CatForm())
                        {
                            KL.Spells["Javelin"].Cast(hero);
                            KL.Spells["Javelin"].CastIfHitchanceEquals(hero, HitChance.Immobile);
                        }
                        else
                        {
                            if (KL.Spells["Aspect"].IsReady() &&
                                KL.Spells["Javelin"].Cast(hero) == Spell.CastStates.Collision)
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                        }
                    }
                }
            }

            if (hero != null && hero.IsEnemy && KL.SpellTimer["Bushwhack"].IsReady() && Root.Item("ndhwimm").GetValue <bool>())
            {
                if (hero.IsValidTarget(KL.Spells["Bushwhack"].Range))
                {
                    if (args.Buff.Type == BuffType.Stun || args.Buff.Type == BuffType.Snare ||
                        args.Buff.Type == BuffType.Taunt || args.Buff.Type == BuffType.Knockback)
                    {
                        KL.Spells["Bushwhack"].Cast(hero);
                        KL.Spells["Bushwhack"].CastIfHitchanceEquals(hero, HitChance.Immobile);
                    }
                }
            }
        }
예제 #10
0
        // Human W Logic
        internal static void CastBushwhack(Obj_AI_Base target, string mode)
        {
            if (target == null)
            {
                return;
            }
            // if not harass mode ignore mana check
            if (!KL.CatForm() && KL.CanUse(KL.Spells["Bushwhack"], true, mode))
            {
                if (KL.Player.ManaPercent <= 65 && target.IsHunted() && target.CanMove)
                {
                    return;
                }

                if (mode != "ha" || KL.Player.ManaPercent > 65)
                {
                    if (target.LSIsValidTarget(KL.Spells["Bushwhack"].Range))
                    {
                        // try bushwhack prediction
                        if (getBoxItem(wHMenu, "ndhwforce") == 0)
                        {
                            if (target.IsChampion())
                            {
                                KL.Spells["Bushwhack"].CastIfHitchanceEquals(target, HitChance.VeryHigh);
                            }
                            else
                            {
                                KL.Spells["Bushwhack"].Cast(target.ServerPosition);
                            }
                        }

                        // try bushwhack behind target
                        if (getBoxItem(wHMenu, "ndhwforce") == 1)
                        {
                            var unitpos = KL.Spells["Bushwhack"].GetPrediction(target).UnitPosition;
                            KL.Spells["Bushwhack"].Cast(unitpos.LSExtend(KL.Player.ServerPosition, -75f));
                        }
                    }
                }
            }
        }
예제 #11
0
        // Cougar E Logic
        internal static void CastSwipe(Obj_AI_Base target, string mode)
        {
            if (KL.CatForm() && KL.CanUse(KL.Spells["Swipe"], false, mode))
            {
                if (target.LSIsValidTarget(KL.Spells["Swipe"].Range))
                {
                    if (target.IsChampion())
                    {
                        if (getCheckBoxItem(eCMenu, "ndcecheck"))
                        {
                            var voutout = KL.Spells["Swipe"].GetPrediction(target);
                            if (voutout.Hitchance >= (HitChance)getBoxItem(eCMenu, "ndcech") + 3)
                            {
                                KL.Spells["Swipe"].Cast(voutout.CastPosition);
                            }
                        }
                        else
                        {
                            KL.Spells["Swipe"].Cast(target.ServerPosition);
                        }
                    }
                    else
                    {
                        // try aoe swipe if menu item > 1
                        var minhit = getSliderItem(eCMenu, "ndcenum");
                        if (minhit > 1 && mode == "wc")
                        {
                            KL.CastSmartSwipe();
                        }

                        // or cast normal
                        else
                        {
                            KL.Spells["Swipe"].Cast(target.ServerPosition);
                        }
                    }
                }
            }

            // check valid target in range
        }
예제 #12
0
        private static void Obj_AI_Base_OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender.IsMe && args.SData.IsAutoAttackLS())
            {
                if (Root.Item("usecombo2").GetValue <KeyBind>().Active)
                {
                    if (KL.CatForm() && KL.Spells["Aspect"].IsReady() && KL.SpellTimer["Javelin"].IsReady())
                    {
                        KL.Spells["Takedown"].Cast();

                        if (Player.HasBuff("Takedown"))
                        {
                            KL.Spells["Aspect"].Cast();
                        }
                    }

                    if (!KL.CatForm() && KL.SpellTimer["Javelin"].IsReady())
                    {
                        if (Utils.GameTimeTickCount - KL.LastBite <= 1200 || KL.SpellTimer["Javelin"].IsReady())
                        {
                            var targ = args.Target as Obj_AI_Base;
                            if (targ == null)
                            {
                                return;
                            }

                            if (targ.Path.Length < 1)
                            {
                                KL.Spells["Javelin"].Cast(targ.ServerPosition);
                            }

                            if (targ.Path.Length > 0)
                            {
                                KL.Spells["Javelin"].Cast(targ);
                            }
                        }
                    }
                }
            }
        }
예제 #13
0
        internal static void SwitchForm(Obj_AI_Base target, string mode)
        {
            if (target == null)
            {
                return;
            }
            // catform -> human
            if (KL.CatForm() && KL.CanUse(KL.Spells["Aspect"], false, mode))
            {
                if (!target.IsValidTarget(KL.Spells["Javelin"].Range))
                {
                    return;
                }

                // get hitbox
                var radius = KL.Player.AttackRange + KL.Player.Distance(KL.Player.BBox.Minimum) + 1;

                // dont switch if have Q buff and near target
                if (KL.CanUse(KL.Spells["Takedown"], true, mode) && KL.Player.HasBuff("Takedown") &&
                    target.Distance(KL.Player.ServerPosition) <= KL.Spells["Takedown"].Range + 65f)
                {
                    return;
                }

                // change form if Q is ready and meets hitchance
                if (target.IsChampion())
                {
                    if (KL.SpellTimer["Javelin"].IsReady())
                    {
                        var poutput = KL.Spells["Javelin"].GetPrediction(target);
                        if (poutput.Hitchance >= HitChance.High)
                        {
                            KL.Spells["Aspect"].Cast();
                        }
                    }
                }
                else
                {
                    // change to human if out of pounce range and can die
                    if (!KL.SpellTimer["Pounce"].IsReady(3) && target.Distance(KL.Player.ServerPosition) <= 525)
                    {
                        if (target.Distance(KL.Player.ServerPosition) > radius)
                        {
                            if (KL.Player.GetAutoAttackDamage(target, true) * 3 >= target.Health)
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                        }
                    }
                }

                // is jungling
                if (mode == "jg")
                {
                    if (KL.CanUse(KL.Spells["Bushwhack"], true, mode) ||
                        KL.CanUse(KL.Spells["Javelin"], true, mode))
                    {
                        if ((!KL.SpellTimer["Pounce"].IsReady(2) || !KL.CanUse(KL.Spells["Pounce"], false, mode)) &&
                            (!KL.SpellTimer["Swipe"].IsReady() || !KL.CanUse(KL.Spells["Swipe"], false, mode)) &&
                            (!KL.SpellTimer["Takedown"].IsReady() || !KL.CanUse(KL.Spells["Takedown"], false, mode)) ||

                            !(KL.Player.Distance(target.ServerPosition) <= 355) ||
                            !KN.Root.Item("jgaacount").GetValue <KeyBind>().Active)
                        {
                            if (KL.Spells["Javelin"].Cast(target) != Spell.CastStates.Collision &&
                                KL.SpellTimer["Javelin"].IsReady())
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                            else if (!KL.CanUse(KL.Spells["Javelin"], true, mode))
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                        }
                    }
                }
            }

            // human -> catform
            if (!KL.CatForm() && KL.CanUse(KL.Spells["Aspect"], true, mode))
            {
                switch (mode)
                {
                case "jg":
                    if (KL.Counter < KN.Root.Item("aareq").GetValue <Slider>().Value&&
                        KN.Root.Item("jgaacount").GetValue <KeyBind>().Active)
                    {
                        return;
                    }
                    break;

                case "gap":
                    if (target.IsValidTarget(375))
                    {
                        KL.Spells["Aspect"].Cast();
                        return;
                    }
                    break;

                case "wc":
                    if (target.IsValidTarget(375) && target.IsMinion)
                    {
                        KL.Spells["Aspect"].Cast();
                        return;
                    }
                    break;
                }

                if (target.IsHunted())
                {
                    // force switch no swipe/takedown req
                    if (!KN.Root.Item("ndhrcreq").GetValue <bool>() && mode == "co" ||
                        !KN.Root.Item("ndhrjreq").GetValue <bool>() && mode == "jg")
                    {
                        KL.Spells["Aspect"].Cast();
                        return;
                    }

                    if (target.Distance(KL.Player) > KL.Spells["Takedown"].Range + 50 &&
                        !KL.CanUse(KL.Spells["Pounce"], false, mode))
                    {
                        return;
                    }

                    // or check if pounce timer is ready before switch
                    if (KL.Spells["Aspect"].IsReady() && target.IsValidTarget(KL.Spells["ExPounce"].Range))
                    {
                        // dont change form if swipe or takedown isn't ready
                        if ((KL.SpellTimer["Takedown"].IsReady() || KL.SpellTimer["Swipe"].IsReady()) &&
                            KL.SpellTimer["Pounce"].IsReady(1))
                        {
                            KL.Spells["Aspect"].Cast();
                        }
                    }
                }
                else
                {
                    // check if in pounce range
                    if (target.IsValidTarget(KL.Spells["Pounce"].Range + 55))
                    {
                        if (mode != "jg")
                        {
                            // switch to cougar if can kill target
                            if (KL.CatDamage(target) * 3 >= target.Health)
                            {
                                if (mode == "co" && target.IsValidTarget(KL.Spells["Pounce"].Range + 200))
                                {
                                    if (!KL.CanUse(KL.Spells["Javelin"], true, "co") ||
                                        KL.Spells["Javelin"].Cast(target) == Spell.CastStates.Collision)
                                    {
                                        KL.Spells["Aspect"].Cast();
                                    }
                                }
                            }

                            // switch if Q disabled in menu
                            if (!KL.CanUse(KL.Spells["Javelin"], true, mode) ||

                                // delay the cast .5 seconds
                                Utils.GameTimeTickCount - (int)(KL.TimeStamp["Javelin"] * 1000) +
                                ((6 + (6 * KL.PercentCooldownMod)) * 1000) >= 500 &&

                                // if Q is not ready in 2 seconds
                                !KL.SpellTimer["Javelin"].IsReady(2))
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                        }
                        else
                        {
                            if (KL.Spells["Javelin"].Cast(target) == Spell.CastStates.Collision &&
                                KN.Root.Item("spcol").GetValue <bool>())
                            {
                                if (KL.Spells["Aspect"].IsReady())
                                {
                                    KL.Spells["Aspect"].Cast();
                                }
                            }

                            if ((!KL.SpellTimer["Bushwhack"].IsReady() || !KL.CanUse(KL.Spells["Bushwhack"], true, mode)) &&
                                (!KL.SpellTimer["Javelin"].IsReady(3) || !KL.CanUse(KL.Spells["Javelin"], true, mode)))
                            {
                                if (KL.Spells["Aspect"].IsReady())
                                {
                                    KL.Spells["Aspect"].Cast();
                                }
                            }
                        }
                    }


                    if (KN.Target.IsValidTarget(KL.Spells["Javelin"].Range) && target.IsChampion())
                    {
                        if (KL.SpellTimer["Javelin"].IsReady())
                        {
                            // check if in pounce range.
                            if (target.Distance(KL.Player.ServerPosition) <= KL.Spells["Pounce"].Range + 100f)
                            {
                                // if we dont meet hitchance on Q target pounce nearest target
                                var poutput = KL.Spells["Javelin"].GetPrediction(KN.Target);
                                if (poutput.Hitchance < (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                                {
                                    if (KL.Spells["Aspect"].IsReady())
                                    {
                                        KL.Spells["Aspect"].Cast();
                                    }
                                }
                            }
                        }

                        if (KN.Target.IsHunted() && KN.Target.Distance(KL.Player.ServerPosition) > KL.Spells["ExPounce"].Range + 100)
                        {
                            if (target.Distance(KL.Player.ServerPosition) <= KL.Spells["Pounce"].Range + 25)
                            {
                                if (KL.Spells["Aspect"].IsReady())
                                {
                                    KL.Spells["Aspect"].Cast();
                                }
                            }
                        }

                        if (!KL.SpellTimer["Javelin"].IsReady())
                        {
                            if (target.Distance(KL.Player.ServerPosition) <= KL.Spells["Pounce"].Range + 125)
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                        }
                    }
                }
            }
        }
예제 #14
0
        // Human Q Logic
        internal static void CastJavelin(Obj_AI_Base target, string mode)
        {
            // if not harass mode ignore mana check
            if (!KL.CatForm() && KL.CanUse(KL.Spells["Javelin"], true, mode))
            {
                if (mode == "ha" && KL.Player.ManaPercent <= 65)
                {
                    return;
                }

                if (!target.IsValidTarget(KL.Spells["Javelin"].Range))
                {
                    return;
                }

                // try prediction on champion
                if (target.IsChampion() && target is Obj_AI_Hero) // double check
                {
                    if (KN.Root.Item("ndhqcheck").GetValue <bool>())
                    {
                        switch (KN.Root.Item("ppred").GetValue <StringList>().SelectedValue)
                        {
                        case "OKTW":
                            PredictionInput pi;
                            pi           = new PredictionInput();
                            pi.Aoe       = false;
                            pi.Collision = true;
                            pi.Speed     = 1300f;
                            pi.Delay     = 0.25f;
                            pi.Range     = 1500f;
                            pi.From      = KN.Player.ServerPosition;
                            pi.Radius    = 40f;
                            pi.Unit      = target;
                            pi.Type      = SkillshotType.SkillshotLine;

                            var po = Prediction.GetPrediction(pi);
                            if (po.Hitchance >= (SebbyLib.Prediction.HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                            {
                                KL.Spells["Javelin"].Cast(po.CastPosition);
                            }
                            break;

                        case "SPrediction":
                            var so = KL.Spells["Javelin"].GetSPrediction((Obj_AI_Hero)target);
                            if (so.HitChance >= (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                            {
                                KL.Spells["Javelin"].Cast(so.CastPosition);
                            }
                            break;

                        case "Common":
                            var co = KL.Spells["Javelin"].GetPrediction(target);
                            if (co.Hitchance >= (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                            {
                                KL.Spells["Javelin"].Cast(co.CastPosition);
                            }
                            break;
                        }
                    }

                    if (!KN.Root.Item("ndhqcheck").GetValue <bool>())
                    {
                        KL.Spells["Javelin"].Cast(target.ServerPosition);
                    }
                }
                else
                {
                    KL.Spells["Javelin"].Cast(target);
                }
            }
        }
예제 #15
0
        // Cougar W Logic
        internal static void CastPounce(Obj_AI_Base target, string mode)
        {
            if (target == null)
            {
                return;
            }
            // check the actual spell timer and if we have it enabled in our menu
            if (!KL.CatForm() || !KL.CanUse(KL.Spells["Pounce"], false, mode))
            {
                return;
            }

            // check if target is hunted in 750 range
            if (!target.IsValidTarget(KL.Spells["ExPounce"].Range))
            {
                return;
            }

            if (target.IsHunted())
            {
                // get hitbox
                var radius = KL.Player.AttackRange + KL.Player.Distance(KL.Player.BBox.Minimum) + 1;

                // force pounce if menu item enabled
                if (target.IsHunted() && KN.Root.Item("ndcwhunt").GetValue <bool>() ||

                    // or of target is greater than my attack range
                    target.Distance(KL.Player.ServerPosition) > radius ||

                    // or is jungling or waveclearing (without farm distance check)
                    mode == "jg" || mode == "wc" && !KN.Root.Item("ndcwdistwc").GetValue <bool>() ||

                    // or combo mode and ignoring distance check
                    !target.IsHunted() && mode == "co" && !KN.Root.Item("ndcwdistco").GetValue <bool>())
                {
                    if (KN.Root.Item("kitejg").GetValue <bool>() && mode == "jg" &&
                        target.Distance(Game.CursorPos) > 600 && target.Distance(KL.Player.ServerPosition) <= 300)
                    {
                        KL.Spells["Pounce"].Cast(Game.CursorPos);
                        return;
                    }

                    KL.Spells["Pounce"].Cast(target.ServerPosition);
                }
            }

            // if target is not hunted
            else
            {
                // check if in the original pounce range
                if (target.Distance(KL.Player.ServerPosition) > KL.Spells["Pounce"].Range)
                {
                    return;
                }

                // get hitbox
                var radius = KL.Player.AttackRange + KL.Player.Distance(KL.Player.BBox.Minimum) + 1;

                // check minimum distance before pouncing
                if (target.Distance(KL.Player.ServerPosition) > radius ||

                    // or is jungling or waveclearing (without distance checking)
                    mode == "jg" || mode == "wc" && !KN.Root.Item("ndcwdistwc").GetValue <bool>() ||

                    // or combo mode with no distance checking
                    mode == "co" && !KN.Root.Item("ndcwdistco").GetValue <bool>())
                {
                    if (target.IsChampion())
                    {
                        if (KN.Root.Item("ndcwcheck").GetValue <bool>())
                        {
                            var voutout = KL.Spells["Pounce"].GetPrediction(target);
                            if (voutout.Hitchance >= (HitChance)KN.Root.Item("ndcwch").GetValue <StringList>().SelectedIndex + 3)
                            {
                                KL.Spells["Pounce"].Cast(voutout.CastPosition);
                            }
                        }
                        else
                        {
                            KL.Spells["Pounce"].Cast(target.ServerPosition);
                        }
                    }
                    else
                    {
                        // check pouncing near enemies
                        if (mode == "wc" && KN.Root.Item("ndcwene").GetValue <bool>() &&
                            target.ServerPosition.CountEnemiesInRange(550) > 0)
                        {
                            return;
                        }

                        // check pouncing under turret
                        if (mode == "wc" && KN.Root.Item("ndcwtow").GetValue <bool>() &&
                            target.ServerPosition.UnderTurret(true))
                        {
                            return;
                        }

                        KL.Spells["Pounce"].Cast(target.ServerPosition);
                    }
                }
            }
        }
예제 #16
0
        // Human Q Logic
        internal static void CastJavelin(Obj_AI_Base target, string mode)
        {
            if (target == null)
            {
                return;
            }
            // if not harass mode ignore mana check
            if (!KL.CatForm() && KL.CanUse(KL.Spells["Javelin"], true, mode))
            {
                if (mode != "ha" || KL.Player.ManaPercent > 65)
                {
                    if (target.IsValidTarget(KL.Spells["Javelin"].Range))
                    {
                        // try prediction on champion
                        if (target.IsChampion())
                        {
                            var qoutput = KL.Spells["Javelin"].GetPrediction(target);

                            if (KN.Root.Item("ndhqcheck").GetValue <bool>())
                            {
                                switch (KN.Root.Item("ppred").GetValue <StringList>().SelectedValue)
                                {
                                case "OKTW":
                                    var pi = new SebbyLib.Prediction.PredictionInput
                                    {
                                        Aoe       = false,
                                        Collision = true,
                                        Speed     = 1300f,
                                        Delay     = 0.25f,
                                        Range     = 1500f,
                                        From      = KN.Player.ServerPosition,
                                        Radius    = 40f,
                                        Unit      = target,
                                        Type      = SebbyLib.Prediction.SkillshotType.SkillshotLine
                                    };

                                    var po = SebbyLib.Prediction.Prediction.GetPrediction(pi);
                                    if (po.Hitchance == (SebbyLib.Prediction.HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                                    {
                                        KL.Spells["Javelin"].Cast(po.CastPosition);
                                    }

                                    break;

                                case "SPrediction":
                                    var so = KL.Spells["Javelin"].GetSPrediction((AIHeroClient)target);
                                    if (so.HitChance == (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                                    {
                                        KL.Spells["Javelin"].Cast(so.CastPosition);
                                    }
                                    break;

                                case "Common":
                                    var co = KL.Spells["Javelin"].GetPrediction(target);
                                    if (co.Hitchance == (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                                    {
                                        KL.Spells["Javelin"].Cast(co.CastPosition);
                                    }
                                    break;
                                }
                            }

                            if (qoutput.Hitchance == HitChance.Collision && KL.Smite.IsReady())
                            {
                                if (KN.Root.Item("qsmcol").GetValue <bool>() && target.Health <= KL.CatDamage(target) * 3)
                                {
                                    if (qoutput.CollisionObjects.All(i => i.NetworkId != KL.Player.NetworkId))
                                    {
                                        var obj = qoutput.CollisionObjects.Cast <Obj_AI_Minion>().ToList();
                                        if (obj.Count == 1)
                                        {
                                            if (obj.Any(
                                                    i =>
                                                    i.Health <= KL.Player.GetSummonerSpellDamage(i, Damage.SummonerSpell.Smite) &&
                                                    KL.Player.Distance(i) < 500 && KL.Player.Spellbook.CastSpell(KL.Smite, obj.First())))
                                            {
                                                KL.Spells["Javelin"].Cast(qoutput.CastPosition);
                                                return;
                                            }
                                        }
                                    }
                                }
                            }


                            if (!KN.Root.Item("ndhqcheck").GetValue <bool>())
                            {
                                KL.Spells["Javelin"].Cast(target);
                            }
                        }
                        else
                        {
                            KL.Spells["Javelin"].Cast(target);
                        }
                    }
                }
            }
        }
예제 #17
0
        // Cougar W Logic
        internal static void CastPounce(Obj_AI_Base target, string mode)
        {
            // check the actual spell timer and if we have it enabled in our menu
            if (!KL.CatForm() || !KL.CanUse(KL.Spells["Pounce"], false, mode))
            {
                return;
            }

            // check if target is hunted in 750 range
            if (!target.LSIsValidTarget(KL.Spells["ExPounce"].Range))
            {
                return;
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                if (KL.Player.HealthPercent <= getSliderItem(wCMenu, "ndcwcHPChecl"))
                {
                    return;
                }

                if (KL.Player.CountEnemiesInRange(750) >= getSliderItem(wCMenu, "ndcwcEnemy") && target.IsHunted())
                {
                    return;
                }
            }

            if (target.IsHunted())
            {
                // get hitbox
                var radius = KL.Player.AttackRange + KL.Player.LSDistance(KL.Player.BBox.Minimum) + 1;

                // force pounce if menu item enabled
                if (target.IsHunted() && getCheckBoxItem(wCMenu, "ndcwhunt") ||

                    // or of target is greater than my attack range
                    target.LSDistance(KL.Player.ServerPosition) > radius ||

                    // or is jungling or waveclearing (without farm distance check)
                    mode == "jg" || mode == "wc" && !getCheckBoxItem(wCMenu, "ndcwdistwc") ||

                    // or combo mode and ignoring distance check
                    !target.IsHunted() && mode == "co" && !getCheckBoxItem(wCMenu, "ndcwdistco"))
                {
                    if (getCheckBoxItem(jungleMenu, "kitejg") && mode == "jg" &&
                        target.LSDistance(Game.CursorPos) > 600 && target.LSDistance(KL.Player.ServerPosition) <= 300)
                    {
                        KL.Spells["Pounce"].Cast(Game.CursorPos);
                        return;
                    }

                    KL.Spells["Pounce"].Cast(target.ServerPosition);
                }
            }

            // if target is not hunted
            else
            {
                // check if in the original pounce range
                if (target.LSDistance(KL.Player.ServerPosition) > KL.Spells["Pounce"].Range)
                {
                    return;
                }

                // get hitbox
                var radius = KL.Player.AttackRange + KL.Player.LSDistance(KL.Player.BBox.Minimum) + 1;

                // check minimum distance before pouncing
                if (target.LSDistance(KL.Player.ServerPosition) > radius ||

                    // or is jungling or waveclearing (without distance checking)
                    mode == "jg" || mode == "wc" && !getCheckBoxItem(wCMenu, "ndcwdistwc") ||

                    // or combo mode with no distance checking
                    mode == "co" && !getCheckBoxItem(wCMenu, "ndcwdistco"))
                {
                    if (target.IsChampion())
                    {
                        if (getCheckBoxItem(wCMenu, "ndcwcheck"))
                        {
                            var voutout = KL.Spells["Pounce"].GetPrediction(target);
                            if (voutout.Hitchance >= (HitChance)getBoxItem(wCMenu, "ndcwch") + 3)
                            {
                                KL.Spells["Pounce"].Cast(voutout.CastPosition);
                            }
                        }
                        else
                        {
                            KL.Spells["Pounce"].Cast(target.ServerPosition);
                        }
                    }
                    else
                    {
                        // check pouncing near enemies
                        if (mode == "wc" && getCheckBoxItem(wCMenu, "ndcwene") &&
                            target.ServerPosition.CountEnemiesInRange(550) > 0)
                        {
                            return;
                        }

                        // check pouncing under turret
                        if (mode == "wc" && getCheckBoxItem(wCMenu, "ndcwtow") &&
                            target.ServerPosition.UnderTurret(true))
                        {
                            return;
                        }

                        KL.Spells["Pounce"].Cast(target.ServerPosition);
                    }
                }
            }
        }
예제 #18
0
        // Cougar W Logic
        internal static void CastPounce(Obj_AI_Base target, string mode)
        {
            // check the actual spell timer and if we have it enabled in our menu
            if (!KL.CatForm() || !KL.CanUse(KL.Spells["Pounce"], false, mode))
            {
                return;
            }

            // check if target is hunted in 750 range
            if (!target.IsValidTarget(KL.Spells["ExPounce"].Range))
            {
                return;
            }

            if (target.IsHunted())
            {
                // get hitbox
                var radius = KL.Player.AttackRange + KL.Player.Distance(KL.Player.BBox.Minimum) + 1;

                // force pounce if menu item enabled
                if (target.IsHunted() && KN.Root.Item("ndcwhunt").GetValue <bool>() ||

                    // or of target is greater than my attack range
                    target.Distance(KL.Player.ServerPosition) > radius ||

                    // or is jungling or waveclearing (without farm distance check)
                    mode == "jg" || mode == "wc" && !KN.Root.Item("ndcwdistwc").GetValue <bool>() ||

                    // or combo mode and ignoring distance check
                    !target.IsHunted() && mode == "co" && !KN.Root.Item("ndcwdistco").GetValue <bool>())
                {
                    if (KN.Root.Item("kitejg").GetValue <bool>() && mode == "jg")
                    {
                        if (target.Distance(Game.CursorPos) > 600 && target.Distance(KL.Player.ServerPosition) <= 300)
                        {
                            KL.Spells["Pounce"].Cast(Game.CursorPos);
                            return;
                        }
                    }

                    KL.Spells["Pounce"].Cast(target.ServerPosition);
                }
            }

            // if target is not hunted
            else
            {
                // check if in the original pounce range
                if (target.Distance(KL.Player.ServerPosition) > KL.Spells["Pounce"].Range)
                {
                    return;
                }

                // get hitbox
                var radius = KL.Player.AttackRange + KL.Player.Distance(KL.Player.BBox.Minimum) + 1;

                // if greater than our hitbox radius pounce!
                if (target.Distance(KL.Player.ServerPosition) > radius ||

                    // or is jungling or waveclearing (without distance checking)
                    mode == "jg" || mode == "wc" && !KN.Root.Item("ndcwdistwc").GetValue <bool>() ||

                    // or combo mode with no distance checking
                    mode == "co" && !KN.Root.Item("ndcwdistco").GetValue <bool>())
                {
                    if (target.IsChampion())
                    {
                        if (KN.Root.Item("ndcwcheck").GetValue <bool>())
                        {
                            switch (KN.Root.Item("ppred").GetValue <StringList>().SelectedValue)
                            {
                            case "OKTW":
                                PredictionInput pi;
                                pi           = new PredictionInput();
                                pi.Aoe       = false;
                                pi.Collision = true;
                                pi.Speed     = 1300f;
                                pi.Delay     = 0.25f;
                                pi.Range     = 1500f;
                                pi.From      = KN.Player.ServerPosition;
                                pi.Radius    = 40f;
                                pi.Unit      = target;
                                pi.Type      = SkillshotType.SkillshotLine;

                                var po = Prediction.GetPrediction(pi);
                                if (po.Hitchance >= (SebbyLib.Prediction.HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                                {
                                    KL.Spells["Javelin"].Cast(po.CastPosition);
                                }
                                break;

                            case "SPrediction":
                                var so = KL.Spells["Javelin"].GetSPrediction((Obj_AI_Hero)target);
                                if (so.HitChance >= (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                                {
                                    KL.Spells["Javelin"].Cast(so.CastPosition);
                                }
                                break;

                            case "Common":
                                var co = KL.Spells["Javelin"].GetPrediction(target);
                                if (co.Hitchance >= (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                                {
                                    KL.Spells["Javelin"].Cast(co.CastPosition);
                                }
                                break;
                            }
                        }
                        else
                        {
                            KL.Spells["Pounce"].Cast(target.ServerPosition);
                        }
                    }
                    else
                    {
                        // check pouncing near enemies
                        if (mode == "wc" && KN.Root.Item("ndcwene").GetValue <bool>() &&
                            target.ServerPosition.CountEnemiesInRange(550) > 0)
                        {
                            return;
                        }

                        // check pouncing under turret
                        if (mode == "wc" && KN.Root.Item("ndcwtow").GetValue <bool>() &&
                            target.ServerPosition.UnderTurret(true))
                        {
                            return;
                        }

                        KL.Spells["Pounce"].Cast(target.ServerPosition);
                    }
                }
            }
        }
예제 #19
0
        internal static void CastJavelin(Obj_AI_Base target, string mode)
        {
            // if not harass mode ignore mana check
            if (!KL.CatForm() && KL.CanUse(KL.Spells["Javelin"], true, mode))
            {
                if (mode != "ha" || KL.Player.ManaPercent > 65)
                {
                    if (target.LSIsValidTarget(KL.Spells["Javelin"].Range))
                    {
                        if (target.IsChampion())
                        {
                            var qoutput = KL.Spells["Javelin"].GetPrediction(target);

                            if (getCheckBoxItem(qHMenu, "ndhqcheck"))
                            {
                                switch (getBoxItem(KN.Root, "ppred"))
                                {
                                case 1:
                                    var pi = new PredictionInput
                                    {
                                        Aoe       = false,
                                        Collision = true,
                                        Speed     = 1300f,
                                        Delay     = 0.25f,
                                        Range     = 1500f,
                                        From      = KN.Player.ServerPosition,
                                        Radius    = 40f,
                                        Unit      = target,
                                        Type      = SkillshotType.SkillshotLine
                                    };

                                    var po = Prediction.GetPrediction(pi);
                                    if (po.Hitchance == (SebbyLib.Prediction.HitChance)(getBoxItem(KN.Root, "ndhqch") + 3))
                                    {
                                        KL.Spells["Javelin"].Cast(po.CastPosition);
                                    }

                                    break;

                                case 2:
                                    var so = KL.Spells["Javelin"].GetPrediction((AIHeroClient)target);
                                    if (so.HitChance == (EloBuddy.SDK.Enumerations.HitChance)(getBoxItem(KN.Root, "ndhqch") + 3))
                                    {
                                        KL.Spells["Javelin"].Cast(so.CastPosition);
                                    }
                                    break;

                                case 0:
                                    var co = KL.Spells["Javelin"].GetPrediction(target);
                                    if (co.HitChance == (EloBuddy.SDK.Enumerations.HitChance)(getBoxItem(KN.Root, "ndhqch") + 3))
                                    {
                                        KL.Spells["Javelin"].Cast(co.CastPosition);
                                    }
                                    break;
                                }
                            }

                            if (qoutput.HitChance == EloBuddy.SDK.Enumerations.HitChance.Collision && KL.Smite.IsReady())
                            {
                                if (getCheckBoxItem(KN.qHMenu, "qsmcol") && target.Health <= KL.CatDamage(target) * 3)
                                {
                                    if (qoutput.CollisionObjects.All(i => i.NetworkId != KL.Player.NetworkId))
                                    {
                                        if (qoutput.CollisionObjects.Cast <AIHeroClient>().Any())
                                        {
                                            return;
                                        }
                                        var obj = qoutput.CollisionObjects.Cast <Obj_AI_Minion>().ToList();
                                        if (obj.Count == 1)
                                        {
                                            if (obj.Any(i => i.Health <= KL.Player.GetSummonerSpellDamage(i, Damage.SummonerSpell.Smite) && KL.Player.LSDistance(i) < 500 && KL.Player.Spellbook.CastSpell(KL.Smite, obj.First())))
                                            {
                                                KL.Spells["Javelin"].Cast(qoutput.CastPosition);
                                                return;
                                            }
                                        }
                                    }
                                }
                            }

                            if (!getCheckBoxItem(qHMenu, "ndhqcheck"))
                            {
                                KL.Spells["Javelin"].Cast(target);
                            }
                        }
                        else
                        {
                            KL.Spells["Javelin"].Cast(target);
                        }
                    }
                }
            }
        }
예제 #20
0
        internal static void Flee()
        {
            if (!KL.CatForm() && KL.Spells["Aspect"].IsReady())
            {
                if (KL.SpellTimer["Pounce"].IsReady())
                {
                    KL.Spells["Aspect"].Cast();
                }
            }

            var wallCheck = KL.GetFirstWallPoint(KL.Player.Position, Game.CursorPos);

            if (wallCheck != null)
            {
                wallCheck = KL.GetFirstWallPoint((Vector3)wallCheck, Game.CursorPos, 5);
            }

            var movePosition = wallCheck != null ? (Vector3)wallCheck : Game.CursorPos;

            var tempGrid           = NavMesh.WorldToGrid(movePosition.X, movePosition.Y);
            var fleeTargetPosition = NavMesh.GridToWorld((short)tempGrid.X, (short)tempGrid.Y);

            Obj_AI_Base target = null;

            var wallJumpPossible = false;

            if (KL.CatForm() && KL.SpellTimer["Pounce"].IsReady() && wallCheck != null)
            {
                var wallPosition = movePosition;

                var   direction     = (Game.CursorPos.To2D() - wallPosition.To2D()).Normalized();
                float maxAngle      = 80f;
                float step          = maxAngle / 20;
                float currentAngle  = 0;
                float currentStep   = 0;
                bool  jumpTriggered = false;

                while (true)
                {
                    if (currentStep > maxAngle && currentAngle < 0)
                    {
                        break;
                    }

                    if ((currentAngle == 0 || currentAngle < 0) && currentStep != 0)
                    {
                        currentAngle = (currentStep) * (float)Math.PI / 180;
                        currentStep += step;
                    }

                    else if (currentAngle > 0)
                    {
                        currentAngle = -currentAngle;
                    }

                    Vector3 checkPoint;

                    if (currentStep == 0)
                    {
                        currentStep = step;
                        checkPoint  = wallPosition + KL.Spells["Pounce"].Range * direction.To3D();
                    }

                    else
                    {
                        checkPoint = wallPosition + KL.Spells["Pounce"].Range * direction.Rotated(currentAngle).To3D();
                    }

                    if (checkPoint.IsWall())
                    {
                        continue;
                    }

                    wallCheck = KL.GetFirstWallPoint(checkPoint, wallPosition);

                    if (wallCheck == null)
                    {
                        continue;
                    }

                    var wallPositionOpposite = (Vector3)KL.GetFirstWallPoint((Vector3)wallCheck, wallPosition, 5);

                    if (KL.Player.GetPath(wallPositionOpposite).ToList().To2D().PathLength() -
                        KL.Player.Distance(wallPositionOpposite) > 200)
                    {
                        if (KL.Player.Distance(wallPositionOpposite) < KL.Spells["Pounce"].Range - KL.Player.BoundingRadius / 2)
                        {
                            KL.Spells["Pounce"].Cast(wallPositionOpposite);
                            jumpTriggered = true;
                            break;
                        }

                        else
                        {
                            wallJumpPossible = true;
                        }
                    }

                    else
                    {
                        Render.Circle.DrawCircle(Game.CursorPos, 35, Color.Red, 2);
                    }
                }

                if (!jumpTriggered)
                {
                    Orbwalking.Orbwalk(target, Game.CursorPos, 90f, 0f, false, false);
                }
            }

            else
            {
                Orbwalking.Orbwalk(target, Game.CursorPos, 90f, 0f, false, false);
                if (KL.CatForm() && KL.SpellTimer["Pounce"].IsReady())
                {
                    KL.Spells["Pounce"].Cast(Game.CursorPos);
                }
            }
        }
예제 #21
0
        internal static void Game_OnUpdate(EventArgs args)
        {
            Target = TargetSelector.GetTarget(KL.Spells["Javelin"].Range, TargetSelector.DamageType.Magical);

            #region Active Modes

            if (Root.Item("usecombo").GetValue <KeyBind>().Active)
            {
                Combo();
            }

            if (Root.Item("useharass").GetValue <KeyBind>().Active)
            {
                Harass();
            }

            if (Root.Item("usefarm").GetValue <KeyBind>().Active)
            {
                Clear();
            }

            if (Root.Item("flee").GetValue <KeyBind>().Active)
            {
                Flee();
            }

            #endregion

            #region Auto Heal

            // auto heal on ally hero
            if (Root.Item("ndheon").GetValue <bool>() && KL.SpellTimer["Primalsurge"].IsReady())
            {
                if (!KL.NotLearned(KL.Spells["Primalsurge"]))
                {
                    if (!Player.Spellbook.IsChanneling && !Player.IsRecalling())
                    {
                        if (Root.Item("flee").GetValue <KeyBind>().Active&& KL.CatForm())
                        {
                            return;
                        }

                        if (Player.Mana / Player.MaxMana * 100 < Root.Item("ndhemana").GetValue <Slider>().Value)
                        {
                            return;
                        }

                        if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None || !KL.CatForm())
                        {
                            foreach (
                                var hero in
                                HeroManager.Allies.Where(
                                    h => Root.Item("xx" + h.ChampionName).GetValue <bool>() &&
                                    h.IsValidTarget(KL.Spells["Primalsurge"].Range, false) &&
                                    h.Health / h.MaxHealth * 100 <
                                    Root.Item("zz" + h.ChampionName).GetValue <Slider>().Value)
                                .OrderBy(x => x.HealthPercent))
                            {
                                if (KL.CatForm() == false)
                                {
                                    KL.Spells["Primalsurge"].CastOnUnit(hero);
                                }

                                if (KL.CatForm() && Root.Item("ndhesw").GetValue <bool>() &&
                                    KL.Spells["Aspect"].IsReady())
                                {
                                    KL.Spells["Aspect"].Cast();
                                }
                            }
                        }
                    }
                }
            }

            #endregion
        }
예제 #22
0
        // Cougar E Logic
        internal static void CastSwipe(Obj_AI_Base target, string mode)
        {
            if (KL.CatForm() && KL.CanUse(KL.Spells["Swipe"], false, mode))
            {
                if (target.IsValidTarget(KL.Spells["Swipe"].Range))
                {
                    if (target.IsChampion())
                    {
                        if (KN.Root.Item("ndcecheck").GetValue <bool>())
                        {
                            switch (KN.Root.Item("ppred").GetValue <StringList>().SelectedValue)
                            {
                            case "OKTW":
                                PredictionInput pi;
                                pi           = new PredictionInput();
                                pi.Aoe       = true;
                                pi.Collision = false;
                                pi.Speed     = float.MaxValue;
                                pi.Delay     = 0.25f;
                                pi.Range     = 300f;
                                pi.From      = KN.Player.ServerPosition;
                                pi.Radius    = 300f;
                                pi.Unit      = target;
                                pi.Type      = SkillshotType.SkillshotCone;

                                var po = Prediction.GetPrediction(pi);
                                if (po.Hitchance >= (SebbyLib.Prediction.HitChance)(KN.Root.Item("ndcech").GetValue <StringList>().SelectedIndex + 3))
                                {
                                    KL.Spells["Swipe"].Cast(po.CastPosition);
                                }
                                break;

                            case "SPrediction":
                                var so = KL.Spells["Swipe"].GetSPrediction((Obj_AI_Hero)target);
                                if (so.HitChance >= (HitChance)(KN.Root.Item("ndcech").GetValue <StringList>().SelectedIndex + 3))
                                {
                                    KL.Spells["Swipe"].Cast(so.CastPosition);
                                }
                                break;

                            case "Common":
                                var co = KL.Spells["Swipe"].GetPrediction(target);
                                if (co.Hitchance >= (HitChance)(KN.Root.Item("ndcech").GetValue <StringList>().SelectedIndex + 3))
                                {
                                    KL.Spells["Swipe"].Cast(co.CastPosition);
                                }
                                break;
                            }
                        }
                        else
                        {
                            KL.Spells["Swipe"].Cast(target.ServerPosition);
                        }
                    }
                    else
                    {
                        // try aoe swipe if menu item > 1
                        var minhit = KN.Root.Item("ndcenum").GetValue <Slider>().Value;
                        if (minhit > 1 && mode == "wc")
                        {
                            KL.CastSmartSwipe();
                        }

                        // or cast normal
                        else
                        {
                            KL.Spells["Swipe"].Cast(target.ServerPosition);
                        }
                    }
                }
            }

            // check valid target in range
        }
예제 #23
0
        // Human W Logic
        internal static void CastBushwhack(Obj_AI_Base target, string mode)
        {
            // if not harass mode ignore mana check
            if (!KL.CatForm() && KL.CanUse(KL.Spells["Bushwhack"], true, mode))
            {
                if (!target.IsValidTarget(KL.Spells["Bushwhack"].Range))
                {
                    return;
                }

                if (KL.Player.ManaPercent <= 65 && target.IsHunted() && target.CanMove)
                {
                    return;
                }

                if (mode != "ha" || KL.Player.ManaPercent > 65)
                {
                    // try bushwhack prediction
                    if (KN.Root.Item("ndhwforce").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (target.IsChampion())
                        {
                            KL.Spells["Bushwhack"].CastIfHitchanceEquals(target, HitChance.VeryHigh);
                        }
                        else
                        {
                            if ((KL.CanUse(KL.Spells["Javelin"], true, "jg") ||
                                 KL.SpellTimer["Javelin"] > 4f) && target.Distance(KL.Player.ServerPosition) > 165f)
                            {
                                KL.Spells["Bushwhack"].Cast(target.Position.Extend(KL.Player.ServerPosition, 305f));
                            }
                            else
                            {
                                KL.Spells["Bushwhack"].Cast(target.Position.Extend(KL.Player.ServerPosition, 100f));
                            }
                        }
                    }

                    // try bushwhack behind target
                    if (KN.Root.Item("ndhwforce").GetValue <StringList>().SelectedIndex == 1)
                    {
                        if (target.IsChampion())
                        {
                            var unitpos = KL.Spells["Bushwhack"].GetPrediction(target).UnitPosition;
                            KL.Spells["Bushwhack"].Cast(unitpos.Extend(KL.Player.ServerPosition, -75f));
                        }
                        else
                        {
                            if ((KL.CanUse(KL.Spells["Javelin"], true, "jg") ||
                                 KL.SpellTimer["Javelin"] > 4f) && target.Distance(KL.Player.ServerPosition) > 265f)
                            {
                                KL.Spells["Bushwhack"].Cast(target.Position.Extend(KL.Player.ServerPosition, +305f));
                            }
                            else
                            {
                                KL.Spells["Bushwhack"].Cast(target.Position.Extend(KL.Player.ServerPosition, 100f));
                            }
                        }
                    }
                }
            }
        }
예제 #24
0
        // Human/Couger R
        internal static void SwitchForm(Obj_AI_Base target, string mode)
        {
            if (!target.IsValidTarget(KL.Spells["Javelin"].Range))
            {
                return;
            }

            if (KN.Root.Item("noR").GetValue <bool>() && mode == "jg" &&
                KN.Player.Level < KN.Root.Item("noRLevel").GetValue <Slider>().Value)
            {
                return;
            }

            // catform -> human
            if (KL.CatForm() && KL.CanUse(KL.Spells["Aspect"], false, mode))
            {
                // dont switch if have Q buff and near target
                if (KL.CanUse(KL.Spells["Takedown"], false, mode))
                {
                    if (KL.Player.HasBuff("Takedown") && Orbwalking.InAutoAttackRange(target))
                    {
                        return;
                    }
                }

                // change form if Q is ready and meets hitchance
                if (target.IsChampion())
                {
                    if (KL.SpellTimer["Javelin"].IsReady())
                    {
                        switch (KN.Root.Item("ppred").GetValue <StringList>().SelectedValue)
                        {
                        case "OKTW":
                            PredictionInput pi;
                            pi           = new PredictionInput();
                            pi.Aoe       = false;
                            pi.Collision = true;
                            pi.Speed     = 1300f;
                            pi.Delay     = 0.25f;
                            pi.Range     = 1500f;
                            pi.From      = KN.Player.ServerPosition;
                            pi.Radius    = 40f;
                            pi.Unit      = target;
                            pi.Type      = SkillshotType.SkillshotLine;

                            var po = Prediction.GetPrediction(pi);
                            if (po.Hitchance >= (SebbyLib.Prediction.HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                            break;

                        case "SPrediction":
                            var so = KL.Spells["Javelin"].GetSPrediction((Obj_AI_Hero)target);
                            if (so.HitChance >= (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                            break;

                        case "Common":
                            var co = KL.Spells["Javelin"].GetPrediction(target);
                            if (co.Hitchance >= (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                            break;
                        }
                    }
                }

                // is jungling
                if (mode == "jg")
                {
                    if (KL.CanUse(KL.Spells["Bushwhack"], true, mode) ||
                        KL.CanUse(KL.Spells["Javelin"], true, mode))
                    {
                        if ((!KL.SpellTimer["Pounce"].IsReady(2) || !KL.CanUse(KL.Spells["Pounce"], false, mode)) &&
                            (!KL.SpellTimer["Swipe"].IsReady() || !KL.CanUse(KL.Spells["Swipe"], false, mode)) &&
                            (!KL.SpellTimer["Takedown"].IsReady() || !KL.CanUse(KL.Spells["Takedown"], false, mode)) ||

                            !(KL.Player.Distance(target.ServerPosition) <= 355) ||
                            !KN.Root.Item("jgaacount").GetValue <KeyBind>().Active)
                        {
                            if (KL.Spells["Javelin"].Cast(target) != Spell.CastStates.Collision &&
                                KL.SpellTimer["Javelin"].IsReady())
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                            else if (!KL.CanUse(KL.Spells["Javelin"], true, mode))
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                        }
                    }
                }
            }

            // human -> catform
            if (!KL.CatForm() && KL.CanUse(KL.Spells["Aspect"], true, mode))
            {
                switch (mode)
                {
                case "jg":
                    if (KL.Counter < KN.Root.Item("aareq").GetValue <Slider>().Value&&
                        KN.Root.Item("jgaacount").GetValue <KeyBind>().Active)
                    {
                        return;
                    }
                    break;

                case "gap":
                    if (target.IsValidTarget(375))
                    {
                        KL.Spells["Aspect"].Cast();
                        return;
                    }
                    break;

                case "wc":
                    if (target.IsValidTarget(375) && target.IsMinion)
                    {
                        KL.Spells["Aspect"].Cast();
                        return;
                    }
                    break;
                }

                if (target.IsHunted())
                {
                    // force switch no swipe/takedown req
                    if (!KN.Root.Item("ndhrcreq").GetValue <bool>() && mode == "co" ||
                        !KN.Root.Item("ndhrjreq").GetValue <bool>() && mode == "jg")
                    {
                        KL.Spells["Aspect"].Cast();
                        return;
                    }

                    // dis b for level 1 nid
                    // stop form switch when W is not leveled or disabled.
                    if (!KL.CanUse(KL.Spells["Pounce"], false, mode))
                    {
                        // block the form switch if greater than couger Q range
                        if (target.Distance(KL.Player) > KL.Spells["Takedown"].Range + 50)
                        {
                            return;
                        }
                    }

                    // or check if pounce timer is ready before switch
                    if (KL.Spells["Aspect"].IsReady() && target.IsValidTarget(KL.Spells["ExPounce"].Range))
                    {
                        // dont change form if swipe or takedown isn't ready
                        if ((KL.SpellTimer["Takedown"].IsReady() || KL.SpellTimer["Swipe"].IsReady()) &&
                            KL.SpellTimer["Pounce"].IsReady(1))
                        {
                            KL.Spells["Aspect"].Cast();
                        }
                    }
                }
                else
                {
                    // check if in pounce range
                    if (target.IsValidTarget(KL.Spells["Pounce"].Range + 95))
                    {
                        if (mode != "jg")
                        {
                            // switch to cougar if can kill target
                            if (KL.CatDamage(target) * 3 >= target.Health)
                            {
                                if (mode == "co" && target.IsValidTarget(KL.Spells["Pounce"].Range + 200))
                                {
                                    if (!KL.CanUse(KL.Spells["Javelin"], true, "co") ||
                                        KL.Spells["Javelin"].Cast(target) == Spell.CastStates.Collision)
                                    {
                                        KL.Spells["Aspect"].Cast();
                                    }
                                }
                            }

                            // switch if Q disabled in menu or not ready
                            if (!KL.CanUse(KL.Spells["Javelin"], true, mode))
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                            else if (Utils.GameTimeTickCount - (int)(KL.TimeStamp["Javelin"] * 1000) +
                                     ((6 + (6 * KL.Player.PercentCooldownMod)) * 1000) >= 500 &&
                                     !KL.SpellTimer["Javelin"].IsReady(2))
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                        }
                        else
                        {
                            if (KL.Spells["Javelin"].Cast(target) == Spell.CastStates.Collision &&
                                KN.Root.Item("spcol").GetValue <bool>())
                            {
                                if (KL.Spells["Aspect"].IsReady())
                                {
                                    KL.Spells["Aspect"].Cast();
                                }
                            }

                            if ((!KL.SpellTimer["Bushwhack"].IsReady() || !KL.CanUse(KL.Spells["Bushwhack"], true, mode)) &&
                                (!KL.SpellTimer["Javelin"].IsReady(3) || !KL.CanUse(KL.Spells["Javelin"], true, mode)))
                            {
                                if (KL.Spells["Aspect"].IsReady())
                                {
                                    KL.Spells["Aspect"].Cast();
                                }
                            }
                        }
                    }


                    if (KN.Target.IsValidTarget(KL.Spells["Javelin"].Range) && target.IsChampion())
                    {
                        if (KL.SpellTimer["Javelin"].IsReady())
                        {
                            // check if in pounce range.
                            if (target.Distance(KL.Player.ServerPosition) <= KL.Spells["Pounce"].Range + 100f)
                            {
                                // if we dont meet hitchance on Q target pounce nearest target
                                var poutput = KL.Spells["Javelin"].GetPrediction(KN.Target);
                                if (poutput.Hitchance < (HitChance)(KN.Root.Item("ndhqch").GetValue <StringList>().SelectedIndex + 3))
                                {
                                    if (KL.Spells["Aspect"].IsReady())
                                    {
                                        KL.Spells["Aspect"].Cast();
                                    }
                                }
                            }
                        }

                        if (KN.Target.IsHunted() && KN.Target.Distance(KL.Player.ServerPosition) > KL.Spells["ExPounce"].Range + 100)
                        {
                            if (target.Distance(KL.Player.ServerPosition) <= KL.Spells["Pounce"].Range + 25)
                            {
                                if (KL.Spells["Aspect"].IsReady())
                                {
                                    KL.Spells["Aspect"].Cast();
                                }
                            }
                        }

                        if (!KL.SpellTimer["Javelin"].IsReady())
                        {
                            if (target.Distance(KL.Player.ServerPosition) <= KL.Spells["Pounce"].Range + 125)
                            {
                                KL.Spells["Aspect"].Cast();
                            }
                        }
                    }
                }
            }
        }