Example #1
0
        private void CastQE(Obj_AI_Base target)
        {
            Core.SkillshotType CoreType2 = Core.SkillshotType.SkillshotLine;

            var predInput2 = new Core.PredictionInput
            {
                Aoe       = false,
                Collision = EQ.Collision,
                Speed     = EQ.Speed,
                Delay     = EQ.Delay,
                Range     = EQ.Range,
                From      = Player.ServerPosition,
                Radius    = EQ.Width,
                Unit      = target,
                Type      = CoreType2
            };

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

            if (OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
            {
                return;
            }

            Vector3 castQpos = poutput2.CastPosition;

            if (Player.Distance(castQpos) > Q.Range)
            {
                castQpos = Player.Position.Extend(castQpos, Q.Range);
            }

            if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 0)
            {
                if (poutput2.Hitchance >= Core.HitChance.VeryHigh)
                {
                    EQcastNow = true;
                    Q.Cast(castQpos);
                }
            }
            else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1)
            {
                if (poutput2.Hitchance >= Core.HitChance.High)
                {
                    EQcastNow = true;
                    Q.Cast(castQpos);
                }
            }
            else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 2)
            {
                if (poutput2.Hitchance >= Core.HitChance.Medium)
                {
                    EQcastNow = true;
                    Q.Cast(castQpos);
                }
            }
        }
Example #2
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (Config.Item("PredictionMODE", true).GetValue <StringList>().SelectedIndex == 1)
            {
                Core.SkillshotType CoreType2 = Core.SkillshotType.SkillshotLine;
                bool aoe2 = false;

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

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

                var predInput2 = new Core.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 = Core.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 >= Core.HitChance.VeryHigh)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= Core.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    if (poutput2.Hitchance >= Core.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if (Config.Item("HitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    if (poutput2.Hitchance >= Core.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);
                }
            }
        }
Example #3
0
        private static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            if (Config.Item("PredictionMODE").GetValue <StringList>().SelectedIndex == 0)
            {
                if (QWER.Slot == SpellSlot.W)
                {
                    if (Config.Item("Wpred").GetValue <StringList>().SelectedIndex == 0)
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                    }
                    else
                    {
                        QWER.Cast(target);
                    }
                }
                if (QWER.Slot == SpellSlot.R)
                {
                    if (Config.Item("Rpred").GetValue <StringList>().SelectedIndex == 0)
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                    }
                    else
                    {
                        QWER.Cast(target);
                    }
                }
                if (QWER.Slot == SpellSlot.E)
                {
                    if (Config.Item("Epred").GetValue <StringList>().SelectedIndex == 0)
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh);
                    }
                    else
                    {
                        QWER.Cast(target);
                    }
                }
            }
            else
            {
                Core.SkillshotType CoreType2 = Core.SkillshotType.SkillshotLine;
                bool aoe2 = false;

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

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

                if (QWER.Slot == SpellSlot.W)
                {
                    if (Config.Item("Wpred").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (poutput2.Hitchance >= Core.HitChance.VeryHigh)
                        {
                            QWER.Cast(poutput2.CastPosition);
                        }
                    }
                    else
                    {
                        if (poutput2.Hitchance >= Core.HitChance.High)
                        {
                            QWER.Cast(poutput2.CastPosition);
                        }
                    }
                }
                if (QWER.Slot == SpellSlot.R)
                {
                    if (Config.Item("Rpred").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (poutput2.Hitchance >= Core.HitChance.VeryHigh)
                        {
                            QWER.Cast(poutput2.CastPosition);
                        }
                    }
                    else
                    {
                        if (poutput2.Hitchance >= Core.HitChance.High)
                        {
                            QWER.Cast(poutput2.CastPosition);
                        }
                    }
                }
                if (QWER.Slot == SpellSlot.E)
                {
                    if (Config.Item("Epred").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (poutput2.Hitchance >= Core.HitChance.VeryHigh)
                        {
                            QWER.Cast(poutput2.CastPosition);
                        }
                    }
                    else
                    {
                        if (poutput2.Hitchance >= Core.HitChance.High)
                        {
                            QWER.Cast(poutput2.CastPosition);
                        }
                    }
                }
            }
        }