示例#1
0
        public static void OktwCast(this Spell Spells, Obj_AI_Base target, bool AOE = false)
        {
            OktwPrediction.SkillshotType CoreType2 = OktwPrediction.SkillshotType.SkillshotLine;

            if (Spells.Type == SkillshotType.SkillshotCircle)
            {
                CoreType2 = OktwPrediction.SkillshotType.SkillshotCircle;
            }

            var predInput2 = new OktwPrediction.PredictionInput
            {
                Aoe       = AOE,
                Collision = Spells.Collision,
                Speed     = Spells.Speed,
                Delay     = Spells.Delay,
                Range     = Spells.Range,
                From      = ObjectManager.Player.ServerPosition,
                Radius    = Spells.Width,
                Unit      = target,
                Type      = CoreType2
            };

            var poutput2 = OktwPrediction.Prediction.GetPrediction(predInput2);

            if (Spells.Speed != float.MaxValue &&
                YasuoWindWall.CollisionYasuo(ObjectManager.Player.ServerPosition, poutput2.CastPosition))
            {
                return;
            }

            if (poutput2.Hitchance >= MinOKTWHitChance)
            {
                Spells.Cast(poutput2.CastPosition, true);
            }
            else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= MinOKTWHitChance - 1)
            {
                Spells.Cast(poutput2.CastPosition, true);
            }
        }
示例#2
0
        public static void CastTo(this Spell Spells, Obj_AI_Base target, bool AOE = false)
        {
            switch (Program.Menu.Item("SelectPred", true).GetValue <StringList>().SelectedIndex)
            {
            case 0:
            {
                var SpellPred = Spells.GetPrediction(target, AOE);

                if (SpellPred.Hitchance >= MinCommonHitChance)
                {
                    Spells.Cast(SpellPred.CastPosition, true);
                }
            }
            break;

            case 1:
            {
                var CoreType2 = OktwPrediction.SkillshotType.SkillshotLine;

                if (Spells.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = OktwPrediction.SkillshotType.SkillshotCircle;
                }

                var predInput2 = new OktwPrediction.PredictionInput
                {
                    Aoe       = AOE,
                    Collision = Spells.Collision,
                    Speed     = Spells.Speed,
                    Delay     = Spells.Delay,
                    Range     = Spells.Range,
                    From      = ObjectManager.Player.ServerPosition,
                    Radius    = Spells.Width,
                    Unit      = target,
                    Type      = CoreType2
                };

                var poutput2 = OktwPrediction.Prediction.GetPrediction(predInput2);

                if (Spells.Speed != float.MaxValue &&
                    YasuoWindWall.CollisionYasuo(ObjectManager.Player.ServerPosition, poutput2.CastPosition))
                {
                    return;
                }

                if (poutput2.Hitchance >= MinOKTWHitChance)
                {
                    Spells.Cast(poutput2.CastPosition, true);
                }

                if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= MinOKTWHitChance - 1)
                {
                    Spells.Cast(poutput2.CastPosition, true);
                }
            }
            break;

            case 2:
            {
                var CoreType2 = SDKPrediction.SkillshotType.SkillshotLine;

                var predInput2 = new SDKPrediction.PredictionInput
                {
                    AoE       = AOE,
                    Collision = Spells.Collision,
                    Speed     = Spells.Speed,
                    Delay     = Spells.Delay,
                    Range     = Spells.Range,
                    From      = ObjectManager.Player.ServerPosition,
                    Radius    = Spells.Width,
                    Unit      = target,
                    Type      = CoreType2
                };

                var poutput2 = SDKPrediction.GetPrediction(predInput2);

                if (Spells.Speed != float.MaxValue &&
                    YasuoWindWall.CollisionYasuo(ObjectManager.Player.ServerPosition, poutput2.CastPosition))
                {
                    return;
                }

                if (poutput2.Hitchance >= MinSDKHitChance)
                {
                    Spells.Cast(poutput2.CastPosition, true);
                }
                else if (predInput2.AoE && poutput2.AoeTargetsHitCount > 1 &&
                         poutput2.Hitchance >= MinSDKHitChance - 1)
                {
                    Spells.Cast(poutput2.CastPosition, true);
                }
            }
            break;

            case 3:
            {
                var hero = target as AIHeroClient;

                if (hero != null && hero.IsValid)
                {
                    var t = hero;

                    if (t.IsValidTarget())
                    {
                        Spells.SPredictionCast(t, MinCommonHitChance);
                    }
                }
                else
                {
                    Spells.CastIfHitchanceEquals(target, MinCommonHitChance);
                }
            }
            break;

            case 4:
            {
                if (Spells.Type == SkillshotType.SkillshotCircle)
                {
                    Spells.CastCircle(target);
                }
                else if (Spells.Type == SkillshotType.SkillshotLine)
                {
                    Spells.CastLine(target);
                }
                else if (Spells.Type == SkillshotType.SkillshotCone)
                {
                    Spells.CastCone(target);
                }
            }
            break;
            }
        }
示例#3
0
        private static void OKTWSpellCast(Spell spells, Obj_AI_Base e)
        {
            if (Menu.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 1)
            {
                OktwPrediction.SkillshotType CoreType2 = OktwPrediction.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (spells.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = OktwPrediction.SkillshotType.SkillshotCircle;
                    aoe2      = true;
                }

                if (spells.Width > 80 && !spells.Collision)
                {
                    aoe2 = true;
                }

                var predInput2 = new OktwPrediction.PredictionInput
                {
                    Aoe       = aoe2,
                    Collision = spells.Collision,
                    Speed     = spells.Speed,
                    Delay     = spells.Delay,
                    Range     = spells.Range,
                    From      = Me.ServerPosition,
                    Radius    = spells.Width,
                    Unit      = e,
                    Type      = CoreType2
                };
                var poutput2 = OktwPrediction.Prediction.GetPrediction(predInput2);

                if (spells.Speed != float.MaxValue && OktwPrediction.CollisionYasuo(Me.ServerPosition, poutput2.CastPosition))
                {
                    return;
                }

                if (Menu.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    if (poutput2.Hitchance >= OktwPrediction.HitChance.VeryHigh)
                    {
                        spells.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= OktwPrediction.HitChance.High)
                    {
                        spells.Cast(poutput2.CastPosition);
                    }
                }
                else if (Menu.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    if (poutput2.Hitchance >= OktwPrediction.HitChance.High)
                    {
                        spells.Cast(poutput2.CastPosition);
                    }
                }
                else if (Menu.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    if (poutput2.Hitchance >= OktwPrediction.HitChance.Medium)
                    {
                        spells.Cast(poutput2.CastPosition);
                    }
                }
            }
            else if (Menu.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 0)
            {
                if (Menu.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    spells.CastIfHitchanceEquals(e, HitChance.VeryHigh);
                    return;
                }
                else if (Menu.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    spells.CastIfHitchanceEquals(e, HitChance.High);
                    return;
                }
                else if (Menu.Item("HitChance ", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    spells.CastIfHitchanceEquals(e, HitChance.Medium);
                    return;
                }
            }
        }