Esempio n. 1
0
                internal static void Optimized(Spell.Skillshot spell, DamageType damageType,
                                               int range = 0, int minHit = 1, HitChance hitChance = HitChance.Medium,
                                               AIHeroClient targetHero = null)
                {
                    if ((spell.Slot != SpellSlot.Q || !TickManager.NoLag(1)) &&
                        (spell.Slot != SpellSlot.W || !TickManager.NoLag(2)) &&
                        (spell.Slot != SpellSlot.E || !TickManager.NoLag(3)) &&
                        (spell.Slot != SpellSlot.R || !TickManager.NoLag(4)))
                    {
                        return;
                    }

                    if (!spell.IsReady() || IsAutoAttacking)
                    {
                        return;
                    }

                    AIHeroClient target;

                    if (targetHero == null)
                    {
                        target = range != 0
                            ? TargetManager.Target(range, damageType)
                            : TargetManager.Target(spell, damageType);
                    }
                    else
                    {
                        target = targetHero;
                    }

                    if (target == null)
                    {
                        return;
                    }

                    if (!target.IsValidTarget(spell.Range + spell.Radius) ||
                        spell.GetPrediction(target).HitChance < hitChance)
                    {
                        return;
                    }

                    var champs = EntityManager.Heroes.Enemies.Where(e => e.Distance(target) < spell.Radius).Select(champ => Prediction.Position.PredictUnitPosition(champ, ((int)Player.Distance(champ) / spell.Speed) + spell.CastDelay)).ToList();

                    var posAndHits = GetOptimizedCircleLocation(champs, spell.Width, spell.Range);

                    if (posAndHits.ChampsHit >= minHit)
                    {
                        spell.Cast(posAndHits.Position.To3DWorld());
                    }
                }
Esempio n. 2
0
 public bool CastIfHitchanceEquals(Obj_AI_Base unit, EloBuddy.SDK.Enumerations.HitChance hitChance, bool packetCast = false)
 {
     if (charge != null && IsChargedSpell)
     {
         charge.CastMinimumHitchance(unit, hitChance);
         return(true);
     }
     else if (skillshot != null && IsSkillshot)
     {
         skillshot.CastMinimumHitchance(unit, hitChance);
         return(true);
     }
     else
     {
         Player.CastSpell(Slot, unit);
         return(true);
     }
 }
Esempio n. 3
0
                internal static void SingleTargetHero(Spell.Skillshot spell, DamageType damageType,
                                                      int range = 0, HitChance hitChance = HitChance.Medium, AIHeroClient targetHero = null)
                {
                    if ((spell.Slot != SpellSlot.Q || !TickManager.NoLag(1)) &&
                        (spell.Slot != SpellSlot.W || !TickManager.NoLag(2)) &&
                        (spell.Slot != SpellSlot.E || !TickManager.NoLag(3)) &&
                        (spell.Slot != SpellSlot.R || !TickManager.NoLag(4)))
                    {
                        return;
                    }

                    if (!spell.IsReady() || IsAutoAttacking)
                    {
                        return;
                    }

                    AIHeroClient target;

                    if (targetHero == null)
                    {
                        target = range != 0
                            ? TargetManager.Target(range, damageType)
                            : TargetManager.Target(spell, damageType);
                    }
                    else
                    {
                        target = targetHero;
                    }

                    if (target == null)
                    {
                        return;
                    }

                    if (!VolatileMenu["vpred"].Cast <CheckBox>().CurrentValue)
                    {
                        if (!target.IsValidTarget(spell.Range) || spell.GetPrediction(target).HitChance < hitChance)
                        {
                            return;
                        }

                        spell.Cast(spell.GetPrediction(target).CastPosition);
                    }

                    /*else
                     * {
                     *  var CoreType2 = SkillshotType.SkillshotLine;
                     *  bool aoe2 = false;
                     *  if ((int) spell.Type == (int) SkillshotType.SkillshotCircle)
                     *  {
                     *      CoreType2 = SkillshotType.SkillshotCircle;
                     *      aoe2 = true;
                     *  }
                     *  if (spell.Width > 80 && spell.AllowedCollisionCount < 100)
                     *      aoe2 = true;
                     *  var predInput2 = new PredictionInput
                     *  {
                     *      Aoe = aoe2,
                     *      Collision = spell.AllowedCollisionCount < 100,
                     *      Speed = spell.Speed,
                     *      Delay = spell.CastDelay,
                     *      Range = spell.Range,
                     *      From = Player.ServerPosition,
                     *      Radius = spell.Radius,
                     *      Unit = target,
                     *      Type = CoreType2
                     *  };
                     *  var poutput2 = Test.TopSecret.Prediction.GetPrediction(predInput2);
                     *  //var poutput2 = spell.GetPrediction(target);
                     *  Chat.Print(spell.Slot+" "+predInput2.Collision+poutput2.Hitchance);
                     *  if (spell.Speed != float.MaxValue && CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                     *      return;
                     *
                     *  if (VolatileMenu["vpred2"].Cast<Slider>().CurrentValue == 0)
                     *  {
                     *      if (poutput2.Hitchance >= Test.TopSecret.HitChance.VeryHigh)
                     *          spell.Cast(poutput2.CastPosition);
                     *      else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 &&
                     *               poutput2.Hitchance >= Test.TopSecret.HitChance.High)
                     *      {
                     *          spell.Cast(poutput2.CastPosition);
                     *      }
                     *
                     *  }
                     *  else if (VolatileMenu["vpred2"].Cast<Slider>().CurrentValue == 1)
                     *  {
                     *      if (poutput2.Hitchance >= Test.TopSecret.HitChance.High)
                     *          spell.Cast(poutput2.CastPosition);
                     *
                     *  }
                     *  else if (VolatileMenu["vpred2"].Cast<Slider>().CurrentValue == 2)
                     *  {
                     *      if (poutput2.Hitchance >= Test.TopSecret.HitChance.Medium)
                     *          spell.Cast(poutput2.CastPosition);
                     *  }
                     * }*/
                }
Esempio n. 4
0
        public bool WillHit(Obj_AI_Base unit, Vector3 castPosition, int extraWidth = 0, EloBuddy.SDK.Enumerations.HitChance minHitChance = EloBuddy.SDK.Enumerations.HitChance.High)
        {
            var unitPosition = GetPrediction(unit);

            return(unitPosition.HitChance >= minHitChance &&
                   WillHit(unitPosition.UnitPosition, castPosition, extraWidth));
        }
Esempio n. 5
0
 public float GetHitCount(EloBuddy.SDK.Enumerations.HitChance hitChance = EloBuddy.SDK.Enumerations.HitChance.High)
 {
     return(HeroManager.Enemies.Select(e => GetPrediction(e)).Count(p => p.HitChance >= hitChance));
 }
Esempio n. 6
0
                internal static void SingleTargetHero(Spell.Skillshot spell, DamageType damageType,
                    int range = 0, HitChance hitChance = HitChance.Medium, AIHeroClient targetHero = null)
                {
                    if ((spell.Slot != SpellSlot.Q || !TickManager.NoLag(1)) &&
                        (spell.Slot != SpellSlot.W || !TickManager.NoLag(2)) &&
                        (spell.Slot != SpellSlot.E || !TickManager.NoLag(3)) &&
                        (spell.Slot != SpellSlot.R || !TickManager.NoLag(4))) return;

                    if (!spell.IsReady() || IsAutoAttacking) return;

                    AIHeroClient target;
                    if (targetHero == null)
                        target = range != 0
                            ? TargetManager.Target(range, damageType)
                            : TargetManager.Target(spell, damageType);
                    else target = targetHero;

                    if (target == null) return;

                    if (!VolatileMenu["vpred"].Cast<CheckBox>().CurrentValue)
                    {
                        if (!target.IsValidTarget(spell.Range) || spell.GetPrediction(target).HitChance < hitChance)
                            return;

                        spell.Cast(spell.GetPrediction(target).CastPosition);
                    }
                    /*else
                    {
                        var CoreType2 = SkillshotType.SkillshotLine;
                        bool aoe2 = false;
                        if ((int) spell.Type == (int) SkillshotType.SkillshotCircle)
                        {
                            CoreType2 = SkillshotType.SkillshotCircle;
                            aoe2 = true;
                        }
                        if (spell.Width > 80 && spell.AllowedCollisionCount < 100)
                            aoe2 = true;
                        var predInput2 = new PredictionInput
                        {
                            Aoe = aoe2,
                            Collision = spell.AllowedCollisionCount < 100,
                            Speed = spell.Speed,
                            Delay = spell.CastDelay,
                            Range = spell.Range,
                            From = Player.ServerPosition,
                            Radius = spell.Radius,
                            Unit = target,
                            Type = CoreType2
                        };
                        var poutput2 = Test.TopSecret.Prediction.GetPrediction(predInput2);
                        //var poutput2 = spell.GetPrediction(target);
                        Chat.Print(spell.Slot+" "+predInput2.Collision+poutput2.Hitchance);
                        if (spell.Speed != float.MaxValue && CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                            return;

                        if (VolatileMenu["vpred2"].Cast<Slider>().CurrentValue == 0)
                        {
                            if (poutput2.Hitchance >= Test.TopSecret.HitChance.VeryHigh)
                                spell.Cast(poutput2.CastPosition);
                            else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 &&
                                     poutput2.Hitchance >= Test.TopSecret.HitChance.High)
                            {
                                spell.Cast(poutput2.CastPosition);
                            }

                        }
                        else if (VolatileMenu["vpred2"].Cast<Slider>().CurrentValue == 1)
                        {
                            if (poutput2.Hitchance >= Test.TopSecret.HitChance.High)
                                spell.Cast(poutput2.CastPosition);

                        }
                        else if (VolatileMenu["vpred2"].Cast<Slider>().CurrentValue == 2)
                        {
                            if (poutput2.Hitchance >= Test.TopSecret.HitChance.Medium)
                                spell.Cast(poutput2.CastPosition);
                        }
                    }*/
                }
Esempio n. 7
0
                internal static void Optimized(Spell.Skillshot spell, DamageType damageType,
                    int range = 0, int minHit = 1, HitChance hitChance = HitChance.Medium,
                    AIHeroClient targetHero = null)
                {
                    if ((spell.Slot != SpellSlot.Q || !TickManager.NoLag(1)) &&
                        (spell.Slot != SpellSlot.W || !TickManager.NoLag(2)) &&
                        (spell.Slot != SpellSlot.E || !TickManager.NoLag(3)) &&
                        (spell.Slot != SpellSlot.R || !TickManager.NoLag(4)))
                        return;

                    if (!spell.IsReady() || IsAutoAttacking) return;

                    AIHeroClient target;
                    if (targetHero == null)
                        target = range != 0
                            ? TargetManager.Target(range, damageType)
                            : TargetManager.Target(spell, damageType);
                    else target = targetHero;

                    if (target == null) return;

                    if (!target.IsValidTarget(spell.Range + spell.Radius) ||
                        spell.GetPrediction(target).HitChance < hitChance)
                        return;

                    var champs = EntityManager.Heroes.Enemies.Where(e => e.Distance(target) < spell.Radius).Select(champ => Prediction.Position.PredictUnitPosition(champ, ((int)Player.Distance(champ) / spell.Speed) + spell.CastDelay)).ToList();

                    var posAndHits = GetOptimizedCircleLocation(champs, spell.Width, spell.Range);

                    if (posAndHits.ChampsHit >= minHit)
                        spell.Cast(posAndHits.Position.To3DWorld());
                }
Esempio n. 8
0
                internal static void SingleTargetHero(Spell.Skillshot spell, DamageType damageType,
                    int range = 0, HitChance? hitChance = HitChance.Medium, AIHeroClient targetHero = null)
                {
                    if ((spell.Slot != SpellSlot.Q || !TickManager.NoLag(1)) &&
                        (spell.Slot != SpellSlot.W || !TickManager.NoLag(2)) &&
                        (spell.Slot != SpellSlot.E || !TickManager.NoLag(3)) &&
                        (spell.Slot != SpellSlot.R || !TickManager.NoLag(4))) return;

                    if (!spell.IsReady() || IsAutoAttacking) return;

                    AIHeroClient target;
                    if (targetHero == null)
                        target = range != 0
                            ? TargetManager.Target(range, damageType)
                            : TargetManager.Target(spell, damageType);
                    else target = targetHero;

                    if (target == null) return;

                    if (!target.IsValidTarget(spell.Range) || spell.GetPrediction(target).HitChance < hitChance)
                        return;
                    spell.Cast(spell.GetPrediction(target).CastPosition);
                }