Example #1
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
        }
Example #2
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
        }
Example #3
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
        }