示例#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);
                }
            }
        }
示例#2
0
文件: Program.cs 项目: djole353/port2
        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);
                    }
                }
            }
        }
示例#3
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);
                }
            }
        }
示例#4
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 >= HitChance.VeryHigh)
                {
                    Spells.Cast(SpellPred.CastPosition, true);
                }
            }
            break;

            case 1:
            {
                SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;

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

                var predInput2 = new SebbyLib.Prediction.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 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);

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

                if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
                {
                    Spells.Cast(poutput2.CastPosition, true);
                }
                else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                {
                    Spells.Cast(poutput2.CastPosition, true);
                }
            }
            break;

            case 2:
            {
                SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;

                var predInput2 = new SebbyLib.Movement.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 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

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

                if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
                {
                    Spells.Cast(poutput2.CastPosition, true);
                }
                else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                {
                    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, HitChance.VeryHigh);
                    }
                }
                else
                {
                    Spells.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                }
            }
            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;
            }
        }
示例#5
0
        public static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
        {
            if (sender.Owner.IsMe)
            {
                if (getCheckBoxItem(menu, "ENABLED") && (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)))
                {
                    if (!ShineCommon.Utility.IsValidSlot(args.Slot))
                    {
                        return;
                    }

                    if (SDKPredictioner.Spells[(int)args.Slot] == null)
                    {
                        return;
                    }

                    if (!getCheckBoxItem(menu, String.Format("{0}{1}", ObjectManager.Player.ChampionName, args.Slot)))
                    {
                        return;
                    }

                    if (handleEvent[(int)args.Slot])
                    {
                        args.Process = false;
                        handleEvent[(int)args.Slot] = false;
                        var enemy = TargetSelector.GetTarget(SDKPredictioner.Spells[(int)args.Slot].Range, DamageType.Physical);

                        if (enemy != null)
                        {
                            SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                            bool aoe2 = false;

                            if (SDKPredictioner.Spells[(int)args.Slot].Type == SkillshotType.SkillshotCircle)
                            {
                                //CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotCircle;
                                //aoe2 = true;
                            }

                            if (SDKPredictioner.Spells[(int)args.Slot].Width > 80 && !SDKPredictioner.Spells[(int)args.Slot].Collision)
                            {
                                aoe2 = true;
                            }

                            var predInput2 = new SebbyLib.Movement.PredictionInput
                            {
                                Aoe       = aoe2,
                                Collision = SDKPredictioner.Spells[(int)args.Slot].Collision,
                                Speed     = SDKPredictioner.Spells[(int)args.Slot].Speed,
                                Delay     = SDKPredictioner.Spells[(int)args.Slot].Delay,
                                Range     = SDKPredictioner.Spells[(int)args.Slot].Range,
                                From      = Player.ServerPosition,
                                Radius    = SDKPredictioner.Spells[(int)args.Slot].Width,
                                Unit      = enemy,
                                Type      = CoreType2
                            };
                            var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

                            if (SDKPredictioner.Spells[(int)args.Slot].Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                            {
                                return;
                            }

                            if (getBoxItem(menu, "SPREDHITC") == 0) // Very High
                            {
                                if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
                                {
                                    SDKPredictioner.Spells[(int)args.Slot].Cast(poutput2.CastPosition);
                                }
                                else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                                {
                                    SDKPredictioner.Spells[(int)args.Slot].Cast(poutput2.CastPosition);
                                }
                            }
                            else if (getBoxItem(menu, "SPREDHITC") == 1)
                            {
                                if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                                {
                                    SDKPredictioner.Spells[(int)args.Slot].Cast(poutput2.CastPosition);
                                }
                            }
                            else if (getBoxItem(menu, "SPREDHITC") == 2)
                            {
                                if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                                {
                                    SDKPredictioner.Spells[(int)args.Slot].Cast(poutput2.CastPosition);
                                }
                            }
                        }
                    }
                }
            }
        }
示例#6
0
        public static void CastSdk(this Spell spell, Obj_AI_Base unit, HitChance hit, bool aoe)
        {
            SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;

            if (spell.Type == SkillshotType.SkillshotCircle)
            {
                CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotCircle;
                aoe       = true;
            }

            if (spell.Width > 80 && !spell.Collision)
            {
                aoe = true;
            }

            var predInput2 = new SebbyLib.Movement.PredictionInput
            {
                Aoe       = aoe,
                Collision = spell.Collision,
                Speed     = spell.Speed,
                Delay     = spell.Delay,
                Range     = spell.Range,
                From      = ObjectManager.Player.ServerPosition,
                Radius    = spell.Width,
                Unit      = unit,
                Type      = CoreType2
            };

            var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

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

            switch (hit)
            {
            case HitChance.Low:
                if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Low)
                {
                    spell.Cast(poutput2.CastPosition);
                }
                break;

            case HitChance.Medium:
                if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                {
                    spell.Cast(poutput2.CastPosition);
                }
                break;

            case HitChance.High:
                if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                {
                    spell.Cast(poutput2.CastPosition);
                }
                break;

            case HitChance.VeryHigh:
                if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
                {
                    spell.Cast(poutput2.CastPosition);
                }
                break;

            case HitChance.Immobile:
                if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Immobile)
                {
                    spell.Cast(poutput2.CastPosition);
                }
                break;
            }

            if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 &&
                poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
            {
                spell.Cast(poutput2.CastPosition, true);
            }
        }