Beispiel #1
0
        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (!Vars.getCheckBoxItem(Vars.Menu, "enable") ||
                !Vars.getKeyBindItem(Vars.Menu, "keybind") ||
                !Vars.getCheckBoxItem(Vars.EMenu, "dashpred"))
            {
                return;
            }

            /// <summary>
            ///     The Dash-Condemn Prediction Logic.
            /// </summary>
            if (Vars.E.IsReady() &&
                Vars.Flash.IsReady() &&
                !GameObjects.Player.IsDashing() &&
                args.Sender.LSIsValidTarget(Vars.E.Range) &&
                !Invulnerable.Check(args.Sender, DamageType.Magical, false) &&
                GameObjects.Player.Distance(args.End) >
                    GameObjects.Player.BoundingRadius &&
                Vars.getCheckBoxItem(Vars.WhiteListMenu, args.Sender.ChampionName.ToLower()))
            {
                for (var i = 1; i < 10; i++)
                {
                    if ((args.End - Vector3.Normalize(args.End - GameObjects.Player.ServerPosition) * (float)(i * 42.5)).LSIsWall() &&
                        (args.End - Vector3.Normalize(args.End - GameObjects.Player.ServerPosition) * i * 44).LSIsWall())
                    {
                        Vars.E.CastOnUnit(args.Sender);
                        Vars.Flash.Cast(GameObjects.Player.ServerPosition.LSExtend(args.Sender.ServerPosition, Vars.Flash.Range));
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (!args.Sender.IsMelee ||
                Invulnerable.Check(args.Sender, DamageType.Magical))
            {
                return;
            }

            if (Vars.R.IsReady() &&
                args.Sender.IsValidTarget(Vars.R.Range) &&
                args.Sender.IsFacing(GameObjects.Player) &&
                Vars.getCheckBoxItem(Vars.RMenu, "gapcloser"))
            {
                Vars.R.Cast(args.Start);
            }

            if (Vars.W.IsReady() &&
                args.Sender.IsValidTarget(Vars.W.Range) &&
                GameObjects.Player.Distance(args.End) > 500 &&
                Vars.getCheckBoxItem(Vars.WMenu, "gapcloser"))
            {
                Vars.W.Cast(args.End);
                return;
            }
        }
Beispiel #3
0
        private void Events_OnGapCloser(object sender, Events.GapCloserEventArgs e)
        {
            if (e.Sender.IsAlly) return;

            if (e.IsDirectedToPlayer && HasQ3() && MiscMenu["qGap"].Cast<CheckBox>().CurrentValue)
            {
                Q3.CastIfHitchanceMinimum(e.Sender, HitChance.Medium);
            }
        }
Beispiel #4
0
 /// <summary>
 ///     Fired on an incoming gapcloser.
 /// </summary>
 /// <param name="sender">The object.</param>
 /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
 public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (Vars.E.IsReady() &&
         args.Sender.LSIsValidTarget(Vars.E.Range) &&
         !Invulnerable.Check(args.Sender, DamageType.Magical, false) &&
         Vars.getCheckBoxItem(Vars.EMenu, "gapcloser"))
     {
         Vars.E.Cast(args.End);
     }
 }
Beispiel #5
0
 /// <summary>
 ///     Called on interruptable spell.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="Events.InterruptableTargetEventArgs" /> instance containing the event data.</param>
 public static void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
 {
     if (Vars.R.IsReady() &&
         !Invulnerable.Check(args.Sender) &&
         args.Sender.LSIsValidTarget(Vars.R.Range) &&
         Vars.getCheckBoxItem(Vars.RMenu, "interrupter"))
     {
         Vars.R.Cast(args.Sender.ServerPosition);
     }
 }
Beispiel #6
0
        private static void Events_OnDash(object sender, Events.DashArgs e)
        {
            var hero = sender as AIHeroClient;
            if (hero == null || !hero.IsMe) return;

            startTime = e.StartTick;
            endTime = e.EndTick;
            startPosition = e.StartPos.ToVector3();
            endPosition = e.EndPos.ToVector3();
        }
Beispiel #7
0
 /// <summary>
 ///     Called on interruptable spell.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="Events.InterruptableTargetEventArgs" /> instance containing the event data.</param>
 public static void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
 {
     if (Vars.W.IsReady() &&
         args.Sender.LSIsValidTarget(Vars.W.Range) &&
         !Invulnerable.Check(args.Sender, DamageType.Physical, false) &&
         Vars.getCheckBoxItem(Vars.WMenu, "interrupter"))
     {
         Vars.W.CastOnUnit(args.Sender);
     }
 }
Beispiel #8
0
 /// <summary>
 ///     Fired on an incoming gapcloser.
 /// </summary>
 /// <param name="sender">The object.</param>
 /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
 public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (Vars.W.IsReady() &&
         args.Sender.IsMelee &&
         args.IsDirectedToPlayer &&
         args.Sender.LSIsValidTarget(Vars.W.Range) &&
         Vars.getCheckBoxItem(Vars.WMenu, "gapcloser"))
     {
         Vars.W.Cast(GameObjects.Player.ServerPosition.LSExtend(args.Sender.ServerPosition, -Vars.W.Range));
     }
 }
Beispiel #9
0
        private static void Events_OnGapCloser(object sender, Events.GapCloserEventArgs e)
        {
            if (SpellToAntiGapcloser == null || e.Sender.IsAlly) return;

            var spellToUse = SpellToAntiGapcloser.OrderByDescending(s => s.Range).FirstOrDefault(s => s.IsReady());

            if (e.IsDirectedToPlayer)
            {
                spellToUse?.CastIfHitchanceMinimum(e.Sender, HitChance.Medium);
            }
        }
Beispiel #10
0
 /// <summary>
 ///     Fired on an incoming gapcloser.
 /// </summary>
 /// <param name="sender">The object.</param>
 /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
 public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (Vars.E.IsReady() &&
         args.Sender.IsMelee &&
         args.Sender.LSIsValidTarget(Vars.E.Range) &&
         args.SkillType == GapcloserType.Targeted &&
         Vars.getCheckBoxItem(Vars.EMenu, "gapcloser"))
     {
         if (args.Target.IsMe)
         {
             Vars.E.Cast(GameObjects.Player.ServerPosition.LSExtend(args.Sender.ServerPosition, -475f));
         }
     }
 }
Beispiel #11
0
 /// <summary>
 ///     Fired on an incoming gapcloser.
 /// </summary>
 /// <param name="sender">The object.</param>
 /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
 public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (Vars.R.IsReady() &&
         args.Sender.IsMelee &&
         args.Sender.IsValidTarget(Vars.R.Range) &&
         args.SkillType == LeagueSharp.Data.Enumerations.GapcloserType.Targeted &&
         Vars.getCheckBoxItem(Vars.RMenu, "gapcloser"))
     {
         if (args.Target.IsMe)
         {
             Vars.R.Cast(args.Sender.ServerPosition);
         }
     }
 }
Beispiel #12
0
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void OnUpdate(EventArgs args)
        {
            if (GameObjects.Player.IsDead)
            {
                return;
            }

            /// <summary>
            ///     Initializes the Automatic actions.
            /// </summary>
            Logics.Automatic(args);

            /// <summary>
            ///     Initializes the Killsteal events.
            /// </summary>
            Logics.Killsteal(args);

            if (GameObjects.Player.Spellbook.IsAutoAttacking)
            {
Beispiel #13
0
        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (GameObjects.Player.HealthPercent <=
                    Vars.getSliderItem(Vars.QMenu, "shield") &&
                Vars.getSliderItem(Vars.QMenu, "shield") != 0)
            {
                return;
            }

            if (Vars.W.IsReady() &&
            args.Sender.IsValidTarget(Vars.W.Range) &&
            !Invulnerable.Check(args.Sender, DamageType.Magical, false) &&
            Vars.getCheckBoxItem(Vars.WMenu, "gapcloser"))
            {
                Vars.W.CastOnUnit(args.Sender);
            }
        }
Beispiel #14
0
            /// <summary>
            ///     Initializes the menus.
            /// </summary>
            Menus.Initialize();

            /// <summary>
            ///     Initializes the methods.
            /// </summary>
            Methods.Initialize();

            /// <summary>
            ///     Initializes the drawings.
            /// </summary>
            Drawings.Initialize();
        }

        /// <summary>
        ///     Fired when the game is updated.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void OnUpdate(EventArgs args)
        {
            if (GameObjects.Player.IsDead)
            {
Beispiel #15
0
        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (Vars.E.IsReady() &&
                args.Sender.LSIsValidTarget(Vars.E.Range) &&
                !Invulnerable.Check(args.Sender, DamageType.Magical, false))
            {
                /// <summary>
                ///     The Anti-GapCloser E Logic.
                /// </summary>
                if (args.Sender.IsMelee)
                {
                    if (args.IsDirectedToPlayer &&
                        Vars.getCheckBoxItem(Vars.EMenu, "gapcloser"))
                    {
                        Vars.E.CastOnUnit(args.Sender);
                    }
                }

                /// <summary>
                ///     The Dash-Condemn Prediction Logic.
                /// </summary>
                else
                {
                    if (!GameObjects.Player.IsDashing() &&
                        GameObjects.Player.Distance(args.End) >
                            GameObjects.Player.BoundingRadius &&
                        Vars.getCheckBoxItem(Vars.EMenu, "dashpred") &&
                        Vars.getCheckBoxItem(Vars.WhiteListMenu, args.Sender.ChampionName.ToLower()))
                    {
                        for (var i = 1; i < 10; i++)
                        {
                            if ((args.End + Vector3.Normalize(args.End - GameObjects.Player.ServerPosition) * (float)(i * 42.5)).LSIsWall() &&
                                (args.End + Vector3.Normalize(args.End - GameObjects.Player.ServerPosition) * i * 44).LSIsWall())
                            {
                                Console.WriteLine("DASHPREDICTION CONDEMN!!1!11");
                                Vars.E.CastOnUnit(args.Sender);
                            }
                        }
                    }
                }
            }
        }
Beispiel #16
0
        /// <summary>
        /// Called when an interruptable target is in range.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="Events.InterruptableTargetEventArgs"/> instance containing the event data.</param>
        private void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs e)
        {
            if (e.DangerLevel < DangerLevel.High || !e.Sender.IsValidTarget()
                || !this.GetSpells()[SpellSlot.Q].IsReady()
                || !AIOVariables.AssemblyMenu["sdkaio.janna.misc"]["QInterrupter"].GetValue<MenuBool>().Value)
            {
                return;
            }

            var unit = e.Sender;
            if (unit.IsValidTarget(this.GetSpells()[SpellSlot.Q].Range))
            {
                var qPrediction = this.GetSpells()[SpellSlot.Q].GetPrediction(unit);
                if (qPrediction.Hitchance > HitChance.Low)
                {
                    this.GetSpells()[SpellSlot.Q].Cast(qPrediction.CastPosition);
                    this.GetSpells()[SpellSlot.Q].Cast();
                }
            }
        }
Beispiel #17
0
        /// <summary>
        ///     Fired on an incoming gapcloser.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.GapCloserEventArgs" /> instance containing the event data.</param>
        public static void OnGapCloser(object sender, Events.GapCloserEventArgs args)
        {
            if (Vars.E.IsReady() &&
                args.IsDirectedToPlayer &&
                args.Sender.LSIsValidTarget(Vars.E.Range) &&
                !Invulnerable.Check(args.Sender, DamageType.Magical, false) &&
                Vars.getCheckBoxItem(Vars.EMenu, "gapcloser"))
            {
                if (!Vars.E.GetPrediction(args.Sender).CollisionObjects.Any())
                {
                    Vars.E.Cast(args.Sender.ServerPosition);
                    return;
                }
            }

            if (Vars.W.IsReady() &&
                args.Sender.IsValidTarget(Vars.W.Range) &&
                !Invulnerable.Check(args.Sender, DamageType.Magical, false) &&
                Vars.getCheckBoxItem(Vars.WMenu, "gapcloser"))
            {
                Vars.W.Cast(args.End);
            }
        }
Beispiel #18
0
        /// <summary>
        ///     Called on interruptable spell.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="Events.InterruptableTargetEventArgs" /> instance containing the event data.</param>
        public static void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
        {
            if (Invulnerable.Check(args.Sender, DamageType.Magical, false))
            {
                return;
            }

            if (Vars.E.IsReady() &&
                args.Sender.IsValidTarget(Vars.E.Range) &&
                Vars.getCheckBoxItem(Vars.EMenu, "interrupter"))
            {
                if (!Vars.E.GetPrediction(args.Sender).CollisionObjects.Any())
                {
                    Vars.E.Cast(Vars.E.GetPrediction(args.Sender).UnitPosition);
                    return;
                }
            }

            if (Vars.W.IsReady() &&
                args.Sender.IsValidTarget(Vars.W.Range) &&
                Vars.getCheckBoxItem(Vars.WMenu, "interrupter"))
            {
                Vars.W.Cast(Vars.W.GetPrediction(args.Sender).CastPosition);
            }
        }
Beispiel #19
0
 private void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
 {
     if (EInterrupt && args.Sender.Distance(ObjectManager.Player) < 750)
     {
         var pred = E.GetPrediction(args.Sender);
         if (!pred.CollisionObjects.Any())
         {
             E.Cast(args.Sender);
         }
     }
 }
Beispiel #20
0
 private void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
 {
     if (args.Sender.Distance(ObjectManager.Player) < 800)
     {
         E.Cast(args.Sender);
     }
 }
Beispiel #21
0
 private void OnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (args.Target != null && args.Target.Distance(ObjectManager.Player) < 850)
     {
         var hero = args.Target as AIHeroClient;
         if (hero != null && hero.IsHPBarRendered)
         {
             E.Cast(hero.ServerPosition.Randomize(-15, 15));
             return;
         }
         E.Cast(args.Target.Position.Randomize(-15, 15));
     }
     if (args.End.Distance(ObjectManager.Player.Position) < 850)
     {
         if (args.End.Distance(ObjectManager.Player.Position) < 450)
         {
             E.Cast(ObjectManager.Player.ServerPosition.Randomize(-15, 15));
         }
         else
         {
             var gcTarget = GameObjects.AllyHeroes.FirstOrDefault(ally => ally.Position.Distance(args.End) < 450);
             if (gcTarget != null)
             {
                 E.Cast(gcTarget.ServerPosition.Randomize(-15, 15));
             }
         }
     }
 }
Beispiel #22
0
 private void OnGapCloser(object oSender, Events.GapCloserEventArgs args)
 {
     var sender = args.Sender;
     var castedE = false;
     if (UseEAntiGapcloserBool)
     {
         if (args.IsDirectedToPlayer)
         {
             if (E.IsReady())
             {
                 if (EDelaySlider > 0)
                 {
                     var thisEnemy = sender;
                     LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy));
                     return;
                 }
                 E.CastOnUnit(sender);
                 castedE = true;
             }
             if (Q.IsReady())
             {
                 switch (UseQAntiGapcloserStringList)
                 {
                     case 3:
                         {
                             if (args.End.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350)
                             {
                                 var pos = EloBuddy.ObjectManager.Player.ServerPosition.LSExtend(args.End, -300);
                                 if (!IsDangerousPosition(pos))
                                 {
                                     Q.Cast(pos);
                                 }
                             }
                             if (sender.Distance(EloBuddy.ObjectManager.Player) < 350)
                             {
                                 var pos = EloBuddy.ObjectManager.Player.ServerPosition.LSExtend(sender.Position, -300);
                                 if (!IsDangerousPosition(pos))
                                 {
                                     Q.Cast(pos);
                                 }
                             }
                             break;
                         }
                     case 2:
                         {
                             if (!E.IsReady() && !castedE)
                             {
                                 if (args.End.Distance(EloBuddy.ObjectManager.Player.ServerPosition) < 350)
                                 {
                                     var pos = EloBuddy.ObjectManager.Player.ServerPosition.LSExtend(args.End, -300);
                                     if (!IsDangerousPosition(pos))
                                     {
                                         Q.Cast(pos);
                                     }
                                 }
                                 if (sender.Distance(EloBuddy.ObjectManager.Player) < 350)
                                 {
                                     var pos = EloBuddy.ObjectManager.Player.ServerPosition.LSExtend(sender.Position, -300);
                                     if (!IsDangerousPosition(pos))
                                     {
                                         Q.Cast(pos);
                                     }
                                 }
                             }
                             break;
                         }
                 }
             }
         }
     }
 }
Beispiel #23
0
 private static void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
 {
     if (EInterrupt && E.IsReady() && args.Sender.Distance(ObjectManager.Player) < 950)
     {
         E.Cast(args.Sender.Position);
     }
 }
Beispiel #24
0
 private static void OnGapcloser(object sender, Events.GapCloserEventArgs gapcloser)
 {
     if (EGC && E.IsReady() && gapcloser.Sender.Distance(ObjectManager.Player) < 800)
     {
         var pred = E.GetPrediction(gapcloser.Sender);
         if (pred.Hitchance > HitChance.High)
         {
             E.Cast(pred.UnitPosition);
         }
     }
 }
Beispiel #25
0
 private void OnInterruptableTarget(object oSender, Events.InterruptableTargetEventArgs args)
 {
     var sender = args.Sender;
     if (args.DangerLevel >= DangerLevel.Medium && EloBuddy.ObjectManager.Player.Distance(sender) < 550 && !IsInvulnerable(sender))
     {
         if (EDelaySlider > 0)
         {
             var thisEnemy = sender;
             LeagueSharp.SDK.Core.Utils.DelayAction.Add(EDelaySlider, () => E.CastOnUnit(thisEnemy));
             return;
         }
         E.CastOnUnit(sender);
     }
 }
Beispiel #26
0
 private void EventsOnOnGapCloser(object sender, Events.GapCloserEventArgs args)
 {
     if (E.IsReady() && UseEGapclose && args.Sender.IsMelee && args.End.Distance(ObjectManager.Player.ServerPosition) > args.Sender.AttackRange)
     {
         var pos = ObjectManager.Player.Position.LSExtend(args.Sender.Position, -Misc.GiveRandomInt(250, 600));
         if (pos.IsUnderEnemyTurret() && !ObjectManager.Player.IsUnderEnemyTurret())
         {
             return;
         }
         E.Cast(ObjectManager.Player.Position.LSExtend(args.Sender.Position, -Misc.GiveRandomInt(250, 600)));
     }
 }
Beispiel #27
0
 private static void Events_OnGapCloser(object sender, Events.GapCloserEventArgs e)
 {
     if (getCheckBoxItem(main_menu, "taliyah.antigap"))
     {
         if (e.End.DistanceToPlayer() < E.Range)
             E.Cast(e.Sender.ServerPosition);
     }
 }
Beispiel #28
0
        ///     Fired when the game is updated.
        /// </summary>
        /// <param name="args">The <see cref="EventArgs" /> instance containing the event data.</param>
        public static void OnUpdate(EventArgs args)
        {
            if (GameObjects.Player.IsDead)
            {
                return;
            }

            /// <summary>
            ///     Initializes the Automatic actions.
            /// </summary>
            Logics.Automatic(args);

            /// <summary>
            ///     Initializes the Killsteal events.
            /// </summary>
            Logics.Killsteal(args);

            if (GameObjects.Player.Spellbook.IsAutoAttacking)
            {
Beispiel #29
0
 private void OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs args)
 {
     if (E.IsReady() && this.UseEGapclose && args.DangerLevel == DangerLevel.High && args.Sender.Distance(ObjectManager.Player) < 400)
     {
         var pos = ObjectManager.Player.Position.LSExtend(args.Sender.Position, -Misc.GiveRandomInt(300, 600));
         if (pos.IsUnderEnemyTurret() && !ObjectManager.Player.IsUnderEnemyTurret())
         {
             return;
         }
         E.Cast(ObjectManager.Player.Position.LSExtend(args.Sender.Position, -Misc.GiveRandomInt(300, 600)));
     }
 }
Beispiel #30
0
 private static void Events_OnInterruptableTarget(object sender, Events.InterruptableTargetEventArgs e)
 {
     if (getCheckBoxItem(main_menu, "taliyah.interrupt"))
     {
         if (e.Sender.DistanceToPlayer() < W.Range)
             W.Cast(e.Sender.ServerPosition);
     }
 }