Exemple #1
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 4)
            {
                HitChance hitchance = HitChance.Low;
                if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }


                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    Core.PredictionAio.CCast(QWER, target, hitchance);
                }
                else if (QWER.Type == SkillshotType.SkillshotLine)
                {
                    Core.PredictionAio.LCast(QWER, target, hitchance);
                }
                else
                {
                    QWER.Cast(target);
                }
            }

            if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 3)
            {
                SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    //CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotCircle;
                    //aoe2 = true;
                }

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

                var predInput2 = new SebbyLib.Movement.PredictionInput
                {
                    Aoe       = aoe2,
                    Collision = QWER.Collision,
                    Speed     = QWER.Speed,
                    Delay     = QWER.Delay,
                    Range     = QWER.Range,
                    From      = Player.ServerPosition,
                    Radius    = QWER.Width,
                    Unit      = target,
                    Type      = CoreType2
                };
                var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

                //var poutput2 = QWER.GetPrediction(target);

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

                if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
            }
            else if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 1)
            {
                SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle;
                    aoe2      = true;
                }

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

                var predInput2 = new SebbyLib.Prediction.PredictionInput
                {
                    Aoe       = aoe2,
                    Collision = QWER.Collision,
                    Speed     = QWER.Speed,
                    Delay     = QWER.Delay,
                    Range     = QWER.Range,
                    From      = Player.ServerPosition,
                    Radius    = QWER.Width,
                    Unit      = target,
                    Type      = CoreType2
                };
                var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);

                //var poutput2 = QWER.GetPrediction(target);

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

                if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                if (Game.Time - DrawSpellTime > 0.5)
                {
                    DrawSpell     = QWER;
                    DrawSpellTime = Game.Time;
                }
                DrawSpellPos = poutput2;
            }
            else if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 0)
            {
                if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                    return;
                }
                else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.High);
                    return;
                }
                else if (Config.Item("HitChance ", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.Medium);
                    return;
                }
            }
            else if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 2)
            {
                if (target is Obj_AI_Hero && target.IsValid)
                {
                    var t = target as Obj_AI_Hero;
                    if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0)
                    {
                        QWER.SPredictionCast(t, HitChance.VeryHigh);
                        return;
                    }
                    else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1)
                    {
                        QWER.SPredictionCast(t, HitChance.High);
                        return;
                    }
                    else if (Config.Item("HitChance ", true).GetValue <StringList>().SelectedIndex == 2)
                    {
                        QWER.SPredictionCast(t, HitChance.Medium);
                        return;
                    }
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.High);
                }
            }
        }
Exemple #2
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 1)
            {
                SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle;
                    aoe2 = true;
                }

                if (QWER.Width > 80 && !QWER.Collision)
                    aoe2 = true;

                var predInput2 = new SebbyLib.Prediction.PredictionInput
                {
                    Aoe = aoe2,
                    Collision = QWER.Collision,
                    Speed = QWER.Speed,
                    Delay = QWER.Delay,
                    Range = QWER.Range,
                    From = Player.ServerPosition,
                    Radius = QWER.Width,
                    Unit = target,
                    Type = CoreType2
                };
                var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);

                //var poutput2 = QWER.GetPrediction(target);

                if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                    return;

                if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
                        QWER.Cast(poutput2.CastPosition);
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }

                }
                else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                        QWER.Cast(poutput2.CastPosition);

                }
                else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 2)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium)
                        QWER.Cast(poutput2.CastPosition);
                }
                if (Game.Time - DrawSpellTime > 0.5)
                {
                    DrawSpell = QWER;
                    DrawSpellTime = Game.Time;

                }
                DrawSpellPos = poutput2;
            }
            else if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 0)
            {
                if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0)
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                    return;
                }
                else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1)
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.High);
                    return;
                }
                else if (Config.Item("HitChance ", true).GetValue<StringList>().SelectedIndex == 2)
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.Medium);
                    return;
                }
            }
            else if (Config.Item("PredictionMODE", true).GetValue<StringList>().SelectedIndex == 2 )
            {

                if (target is Obj_AI_Hero && target.IsValid)
                {
                    var t = target as Obj_AI_Hero;
                    if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 0)
                    {
                        QWER.SPredictionCast(t, HitChance.VeryHigh);
                        return;
                    }
                    else if (Config.Item("HitChance", true).GetValue<StringList>().SelectedIndex == 1)
                    {
                        QWER.SPredictionCast(t, HitChance.High);
                        return;
                    }
                    else if (Config.Item("HitChance ", true).GetValue<StringList>().SelectedIndex == 2)
                    {
                        QWER.SPredictionCast(t, HitChance.Medium);
                        return;
                    }
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.High);
                }
            }
        }
Exemple #3
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            int       predIndex = 0;
            HitChance hitchance = HitChance.Low;

            if (QWER.Slot == SpellSlot.Q)
            {
                predIndex = Config.Item("Qpred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }
            else if (QWER.Slot == SpellSlot.W)
            {
                predIndex = Config.Item("Wpred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }
            else if (QWER.Slot == SpellSlot.E)
            {
                predIndex = Config.Item("Epred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }
            else if (QWER.Slot == SpellSlot.R)
            {
                predIndex = Config.Item("Rpred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }

            if (predIndex == 3)
            {
                SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    //CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotCircle;
                    //aoe2 = true;
                }

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

                var predInput2 = new SebbyLib.Movement.PredictionInput
                {
                    Aoe       = aoe2,
                    Collision = QWER.Collision,
                    Speed     = QWER.Speed,
                    Delay     = QWER.Delay,
                    Range     = QWER.Range,
                    From      = Player.ServerPosition,
                    Radius    = QWER.Width,
                    Unit      = target,
                    Type      = CoreType2
                };
                var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

                //var poutput2 = QWER.GetPrediction(target);

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

                if ((int)hitchance == 6)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 5)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 4)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
            }
            else if (predIndex == 1)
            {
                SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle;
                    aoe2      = true;
                }

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

                var predInput2 = new SebbyLib.Prediction.PredictionInput
                {
                    Aoe       = aoe2,
                    Collision = QWER.Collision,
                    Speed     = QWER.Speed,
                    Delay     = QWER.Delay,
                    Range     = QWER.Range,
                    From      = Player.ServerPosition,
                    Radius    = QWER.Width,
                    Unit      = target,
                    Type      = CoreType2
                };
                var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);

                //var poutput2 = QWER.GetPrediction(target);

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

                if (poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                {
                    Console.WriteLine("AOE cast");
                    QWER.Cast(poutput2.CastPosition);
                }

                if ((int)hitchance == 6)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 5)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 4)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                if (Game.Time - DrawSpellTime > 0.5)
                {
                    DrawSpell     = QWER;
                    DrawSpellTime = Game.Time;
                }
                DrawSpellPos = poutput2;
            }
            else if (predIndex == 0)
            {
                QWER.CastIfHitchanceEquals(target, hitchance);
            }
            else if (predIndex == 2)
            {
                if (target is AIHeroClient && target.IsValid)
                {
                    var t = target as AIHeroClient;
                    QWER.SPredictionCast(t, hitchance);
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.High);
                }
            }
            else if (predIndex == 4)
            {
                PortAIO.SkillshotType CoreType2 = PortAIO.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = PortAIO.SkillshotType.SkillshotCircle;
                    aoe2      = true;
                }

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

                var predInput2 = new PortAIO.PredictionInput
                {
                    Aoe       = aoe2,
                    Collision = QWER.Collision,
                    Speed     = QWER.Speed,
                    Delay     = QWER.Delay,
                    Range     = QWER.Range,
                    From      = Player.ServerPosition,
                    Radius    = QWER.Width,
                    Unit      = target,
                    Type      = CoreType2
                };
                var poutput2 = PortAIO.Prediction.GetPrediction(predInput2);

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

                if ((int)hitchance == 6)
                {
                    if (poutput2.Hitchance >= PortAIO.HitChance.VeryHigh)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= PortAIO.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 5)
                {
                    if (poutput2.Hitchance >= PortAIO.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 4)
                {
                    if (poutput2.Hitchance >= PortAIO.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
            }
        }
Exemple #4
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (!target.IsVisible || !target.IsHPBarRendered)
            {
                return;
            }
            if (getSliderItem("PredictionMODE") == 0)
            {
                if (getSliderItem("HitChance") == 0)
                {
                    var pred = QWER.GetPrediction(target);
                    if (pred.Hitchance >= LeagueSharp.Common.HitChance.VeryHigh)
                        QWER.Cast(pred.CastPosition);
                    return;
                }
                else if (getSliderItem("HitChance") == 1)
                {
                    var pred = QWER.GetPrediction(target);
                    if (pred.Hitchance >= LeagueSharp.Common.HitChance.High)
                        QWER.Cast(pred.CastPosition);
                    return;
                }
                else if (getSliderItem("HitChance") == 2)
                {
                    var pred = QWER.GetPrediction(target);
                    if (pred.Hitchance >= LeagueSharp.Common.HitChance.Medium)
                        QWER.Cast(pred.CastPosition);
                    return;
                }
                return;
            }

            if (getSliderItem("PredictionMODE") == 1)
            {
                SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle;
                    aoe2 = true;
                }

                if (QWER.Width > 80 && !QWER.Collision)
                    aoe2 = true;

                var predInput2 = new SebbyLib.Prediction.PredictionInput
                {
                    Aoe = aoe2,
                    Collision = QWER.Collision,
                    Speed = QWER.Speed,
                    Delay = QWER.Delay,
                    Range = QWER.Range,
                    From = Player.ServerPosition,
                    Radius = QWER.Width,
                    Unit = target,
                    Type = CoreType2
                };
                var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);

                if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                    return;

                if (getSliderItem("HitChance") == 0)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
                        QWER.Cast(poutput2.CastPosition);
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }

                }
                else if (getSliderItem("HitChance") == 1)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                        QWER.Cast(poutput2.CastPosition);

                }
                else if (getSliderItem("HitChance") == 2)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium)
                        QWER.Cast(poutput2.CastPosition);
                }
                if (Game.Time - DrawSpellTime > 0.5)
                {
                    DrawSpell = QWER;
                    DrawSpellTime = Game.Time;

                }
                DrawSpellPos = poutput2;
                return;
            }

            if (getSliderItem("PredictionMODE") == 2)
            {
                if (target is AIHeroClient && target.IsValid)
                {
                    var t = target as AIHeroClient;
                    if (getSliderItem("HitChance") == 0)
                    {
                        var pred = QWER.GetSPrediction(t);
                        if (pred.HitChance >= LeagueSharp.Common.HitChance.VeryHigh)
                            QWER.Cast(pred.CastPosition);
                        return;
                    }
                    else if (getSliderItem("HitChance") == 1)
                    {
                        var pred = QWER.GetSPrediction(t);
                        if (pred.HitChance >= LeagueSharp.Common.HitChance.High)
                            QWER.Cast(pred.CastPosition);
                        return;
                    }
                    else if (getSliderItem("HitChance") == 2)
                    {
                        var pred = QWER.GetSPrediction(t);
                        if (pred.HitChance >= LeagueSharp.Common.HitChance.Medium)
                            QWER.Cast(pred.CastPosition);
                        return;
                    }
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.High);
                }
                return;
            }

            if (getSliderItem("PredictionMODE") == 3)
            {
                SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Width > 80 && !QWER.Collision)
                    aoe2 = true;

                var predInput2 = new SebbyLib.Movement.PredictionInput
                {
                    Aoe = aoe2,
                    Collision = QWER.Collision,
                    Speed = QWER.Speed,
                    Delay = QWER.Delay,
                    Range = QWER.Range,
                    From = Player.ServerPosition,
                    Radius = QWER.Width,
                    Unit = target,
                    Type = CoreType2
                };
                var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

                if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                    return;

                if (getSliderItem("HitChance") == 0)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
                        QWER.Cast(poutput2.CastPosition);
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }

                }
                else if (getSliderItem("HitChance") == 1)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                        QWER.Cast(poutput2.CastPosition);

                }
                else if (getSliderItem("HitChance") == 2)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                        QWER.Cast(poutput2.CastPosition);
                }
                return;
            }

            if (getSliderItem("PredictionMODE") == 4)
            {
                if (target is AIHeroClient && target.IsValid)
                {
                    var t = target as AIHeroClient;
                    Cast(QWER.Slot);
                }
                else
                {
                    Cast(QWER.Slot);
                }
            }
        }
Exemple #5
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (getSliderItem("PredictionMODE") == 3)
            {
                SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    //CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotCircle;
                    //aoe2 = true;
                }

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

                var predInput2 = new SebbyLib.Movement.PredictionInput
                {
                    Aoe       = aoe2,
                    Collision = QWER.Collision,
                    Speed     = QWER.Speed,
                    Delay     = QWER.Delay,
                    Range     = QWER.Range,
                    From      = Player.ServerPosition,
                    Radius    = QWER.Width,
                    Unit      = target,
                    Type      = CoreType2
                };
                var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

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

                if (getSliderItem("HitChance") == 0)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (getSliderItem("HitChance") == 1)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (getSliderItem("HitChance") == 2)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
            }

            if (getSliderItem("PredictionMODE") == 1)
            {
                var CoreType2 = Prediction.SkillshotType.SkillshotLine;
                var aoe2      = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = Prediction.SkillshotType.SkillshotCircle;
                    aoe2      = true;
                }

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

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

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

                if (getSliderItem("HitChance") == 0)
                {
                    if (poutput2.Hitchance >= HitChance.VeryHigh)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (getSliderItem("HitChance") == 1)
                {
                    if (poutput2.Hitchance >= HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (getSliderItem("HitChance") == 2)
                {
                    if (poutput2.Hitchance >= HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                if (Game.Time - DrawSpellTime > 0.5)
                {
                    DrawSpell     = QWER;
                    DrawSpellTime = Game.Time;
                }
                DrawSpellPos = poutput2;
            }

            if (getSliderItem("PredictionMODE") == 0)
            {
                if (getSliderItem("HitChance") == 0)
                {
                    var pred = QWER.GetPrediction(target);
                    if (pred.Hitchance >= LeagueSharp.Common.HitChance.VeryHigh)
                    {
                        QWER.Cast(pred.CastPosition);
                    }
                }
                else if (getSliderItem("HitChance") == 1)
                {
                    var pred = QWER.GetPrediction(target);
                    if (pred.Hitchance >= LeagueSharp.Common.HitChance.High)
                    {
                        QWER.Cast(pred.CastPosition);
                    }
                }
                else if (getSliderItem("HitChance") == 2)
                {
                    var pred = QWER.GetPrediction(target);
                    if (pred.Hitchance >= LeagueSharp.Common.HitChance.Medium)
                    {
                        QWER.Cast(pred.CastPosition);
                    }
                }
            }

            if (getSliderItem("PredictionMODE") == 2)
            {
                if (target is AIHeroClient && target.IsValid)
                {
                    var t = target as AIHeroClient;
                    if (getSliderItem("HitChance") == 0)
                    {
                        QWER.SPredictionCast(t, LeagueSharp.Common.HitChance.VeryHigh);
                    }
                    else if (getSliderItem("HitChance") == 1)
                    {
                        QWER.SPredictionCast(t, LeagueSharp.Common.HitChance.High);
                    }
                    else if (getSliderItem("HitChance") == 2)
                    {
                        QWER.SPredictionCast(t, LeagueSharp.Common.HitChance.Medium);
                    }
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, LeagueSharp.Common.HitChance.High);
                }
            }
        }
Exemple #6
0
        private static void CastQ(Obj_AI_Base target)
        {
            SebbyLib.Prediction.PredictionOutput prediction = GetPred(Q1, target);

            Vector3 pos1 = Vector3.Zero, pos2 = Vector3.Zero, pos3 = Vector3.Zero;

            SebbyLib.Prediction.HitChance hitchance = SebbyLib.Prediction.HitChance.Low;

            if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 0)
            {
                hitchance = SebbyLib.Prediction.HitChance.VeryHigh;
            }
            else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 1)
            {
                hitchance = SebbyLib.Prediction.HitChance.High;
            }
            else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 2)
            {
                hitchance = SebbyLib.Prediction.HitChance.Medium;
            }

            if (prediction.Hitchance == SebbyLib.Prediction.HitChance.OutOfRange)
            {
                prediction = GetPred(Q2, target);
                pos1       = Player.Position.Extend(prediction.CastPosition, Q1.Range);
                if (Cache.GetMinions(pos1, 280).Any())
                {
                    return;
                }
                if (OktwCommon.CirclePoints(10, 150, pos1).Any(x => x.IsWall()))
                {
                    return;
                }
                if (prediction.Hitchance == SebbyLib.Prediction.HitChance.OutOfRange)
                {
                    prediction = GetPred(Q3, target);
                    pos2       = Player.Position.Extend(prediction.CastPosition, Q2.Range);
                    if (Cache.GetMinions(pos2, 280).Any())
                    {
                        return;
                    }
                    if (OktwCommon.CirclePoints(10, 150, pos2).Any(x => x.IsWall()))
                    {
                        return;
                    }
                    if (prediction.Hitchance == SebbyLib.Prediction.HitChance.OutOfRange)
                    {
                        return;
                    }
                    else if (prediction.Hitchance >= hitchance)
                    {
                        Q3.Cast(prediction.CastPosition);
                    }
                }
                else if (prediction.Hitchance >= hitchance)
                {
                    Q2.Cast(prediction.CastPosition);
                }
            }
            else if (prediction.Hitchance >= hitchance)
            {
                Q1.Cast(prediction.CastPosition);
            }
        }