Esempio n. 1
0
 private static void Game_OnUpdate(EventArgs args)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Mixed)
     {
         return;
     }
     // Q
     if (BadaoYasuoVariables.HarassQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && !BadaoYasuoHelper.IsDashing())
     {
         var target = TargetSelector.GetTarget(BadaoYasuoHelper.GetQRange(), TargetSelector.DamageType.Physical);
         if (target.IsValidTarget() && (BadaoYasuoHelper.Qstate() != 3 || (BadaoYasuoHelper.Qstate() == 3 && BadaoYasuoVariables.HarassQ3.GetValue <bool>())))
         {
             BadaoYasuoHelper.CastQ(target);
         }
     }
 }
Esempio n. 2
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
            {
                return;
            }
            // freestyle
            if (BadaoYasuoVariables.TargetMode.GetValue <StringList>().SelectedIndex == 0 && BadaoYasuoHelper.CanCastSpell())
            {
                if (BadaoMainVariables.Q.IsReady() && !BadaoYasuoHelper.IsDashing())
                {
                    BadaoYasuoHelper.CastQ();
                }
                if (BadaoMainVariables.E.IsReady())
                {
                    BadaoYasuoHelper.CastE();
                }
                if (BadaoMainVariables.Q.IsReady() && ObjectManager.Player.IsDashing())
                {
                    var data = ObjectManager.Player.GetDashInfo();
                    if (BadaoYasuoHelper.Qstate() == 3 || (LeagueSharp.Common.Utility.CountEnemiesInRange(data.EndPos.To3D(), 270) >= 2))
                    {
                        foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                        {
                            BadaoYasuoHelper.CastQCone(hero);
                        }
                    }
                }
            }
            // selected
            if (BadaoYasuoVariables.TargetMode.GetValue <StringList>().SelectedIndex == 1 && BadaoYasuoHelper.CanCastSpell())
            {
                if (BadaoMainVariables.Q.IsReady() && !BadaoYasuoHelper.IsDashing())
                {
                    BadaoYasuoHelper.CastQ();
                }
                if (BadaoMainVariables.E.IsReady())
                {
                    var target = BadaoYasuoHelper.GetESelector();
                    if (target.IsValidTarget())
                    {
                        BadaoYasuoHelper.CastE(target);
                    }
                }
                if (BadaoMainVariables.Q.IsReady() && ObjectManager.Player.IsDashing())
                {
                    var data = ObjectManager.Player.GetDashInfo();
                    if (BadaoYasuoHelper.Qstate() == 3 || (LeagueSharp.Common.Utility.CountEnemiesInRange(data.EndPos.To3D(), 270) >= 2))
                    {
                        foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                        {
                            BadaoYasuoHelper.CastQCone(hero);
                        }
                    }
                }
            }

            // R if hit s
            if (BadaoMainVariables.R.IsReady())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(BadaoMainVariables.R.Range) && BadaoYasuoHelper.IsOnAir(x)))
                {
                    var count = BadaoYasuoHelper.GetRCount(hero);
                    if (BadaoYasuoVariables.ComboRHits.GetValue <Slider>().Value <= count)
                    {
                        BadaoMainVariables.R.Cast(hero);
                    }
                }
            }

            // R always
            if (BadaoMainVariables.R.IsReady())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(BadaoMainVariables.R.Range) && BadaoYasuoHelper.IsOnAir(x)))
                {
                    if (BadaoYasuoConfig.config.Item("ComboRAlways" + hero.NetworkId).GetValue <bool>() &&
                        hero.Health * 100 / hero.MaxHealth <= BadaoYasuoConfig.config.Item("ComboRAlwaysHp" + hero.NetworkId).GetValue <Slider>().Value)
                    {
                        if (hero.HasBuffOfType(BuffType.Knockback))
                        {
                            BadaoMainVariables.R.Cast(hero);
                        }
                        var buff = hero.Buffs.Where(x => x.Type == BuffType.Knockup).MaxOrDefault(x => x.EndTime);
                        if (buff != null && (buff.EndTime - Game.Time) * 1000 <= 200 + Game.Ping)
                        {
                            BadaoMainVariables.R.Cast(hero);
                        }
                    }
                }
            }
            //Ignite
            if (BadaoYasuoVariables.ComboIgnite.GetValue <bool>() && BadaoMainVariables.Ignite != SpellSlot.Unknown && BadaoMainVariables.Ignite.IsReady())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.BadaoIsValidTarget(600) && ObjectManager.Player.GetSummonerSpellDamage(x, Damage.SummonerSpell.Ignite) >= x.Health &&
                                                               (!Orbwalking.InAutoAttackRange(x) || HeroManager.Player.HealthPercent <= 20)))
                {
                    ObjectManager.Player.Spellbook.CastSpell(BadaoMainVariables.Ignite, hero);
                }
            }

            //stack Q
            if (BadaoYasuoVariables.ComboStackQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && BadaoYasuoHelper.Qstate() != 3 &&
                !HeroManager.Enemies.Any(x => x.IsValidTarget() && BadaoMainVariables.E.IsInRange(x)))
            {
                var target = BadaoYasuoHelper.GetETargets().FirstOrDefault();
                if (target.IsValidTarget())
                {
                    BadaoMainVariables.Q.Cast(target);
                }
            }

            //gap close E
            if (BadaoMainVariables.E.IsReady() && !HeroManager.Enemies.Any(x => x.IsValidTarget() &&
                                                                           x.Distance(ObjectManager.Player) <= 475))
            {
                var Etargets = BadaoYasuoHelper.GetETargets();
                var Etarget  = Etargets.Where(x => x != null && BadaoYasuoHelper.GetEDashEnd(x).Distance(Game.CursorPos.To2D()) + 150 < ObjectManager.Player.Distance(Game.CursorPos))
                               .MinOrDefault(x => BadaoYasuoHelper.GetEDashEnd(x).Distance(Game.CursorPos.To2D()));
                if (Etarget != null)
                {
                    BadaoMainVariables.E.Cast(Etarget);
                }
            }
        }
Esempio n. 3
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None || ObjectManager.Player.IsRecalling())
            {
                return;
            }
            //AutoQ
            if (!ObjectManager.Player.UnderTurret(true) && BadaoYasuoVariables.AutoQ.GetValue <KeyBind>().Active&& BadaoMainVariables.Q.IsReady() && !BadaoYasuoHelper.IsDashing())
            {
                var target = TargetSelector.GetTarget(BadaoYasuoHelper.GetQRange(), TargetSelector.DamageType.Physical);
                if (target.IsValidTarget() && (BadaoYasuoHelper.Qstate() != 3 || (BadaoYasuoHelper.Qstate() == 3 && BadaoYasuoVariables.AlsoAutoQ3.GetValue <bool>())))
                {
                    BadaoYasuoHelper.CastQ(target);
                }
            }

            //AutoKS
            if (BadaoYasuoVariables.AutoKSQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && !BadaoYasuoHelper.IsDashing())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(BadaoYasuoHelper.GetQRange()) && x.Health < BadaoYasuoHelper.GetQDamage(x)))
                {
                    BadaoYasuoHelper.CastQ(hero);
                }
            }
            if (BadaoYasuoVariables.AutoKSE.GetValue <bool>() && BadaoMainVariables.E.IsReady())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(BadaoMainVariables.E.Range) && x.Health < BadaoYasuoHelper.GetEDamage(x)))
                {
                    BadaoMainVariables.E.Cast(hero);
                }
            }

            //AutoSTack Q
            if (BadaoYasuoVariables.AutoStackQ3.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && BadaoYasuoHelper.Qstate() != 3 &&
                !HeroManager.Enemies.Any(x => x.IsValidTarget() && BadaoMainVariables.E.IsInRange(x)))
            {
                var target = BadaoYasuoHelper.GetETargets().FirstOrDefault();
                if (target.IsValidTarget())
                {
                    BadaoMainVariables.Q.Cast(target);
                }
            }
        }
Esempio n. 4
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!BadaoYasuoVariables.AssassinateKey.GetValue <KeyBind>().Active)
            {
                return;
            }

            var target = TargetSelector.GetSelectedTarget();

            // orbwalk
            Orbwalking.Orbwalk((target.BadaoIsValidTarget() && Orbwalking.InAutoAttackRange(target))
                    ? target : null
                               , Game.CursorPos, 90, 50, false, false);

            if (!target.BadaoIsValidTarget())
            {
                return;
            }

            //QE
            if (BadaoYasuoHelper.CanCastSpell(target))
            {
                if (BadaoMainVariables.Q.IsReady() && !BadaoYasuoHelper.IsDashing() &&
                    target.IsValidTarget(BadaoYasuoHelper.GetQRange()))
                {
                    BadaoYasuoHelper.CastQ(target);
                }
                if (BadaoMainVariables.E.IsReady())
                {
                    BadaoYasuoHelper.CastE(target);
                }
                if (BadaoMainVariables.Q.IsReady() && ObjectManager.Player.IsDashing())
                {
                    var data = ObjectManager.Player.GetDashInfo();
                    if (BadaoYasuoHelper.Qstate() == 3 || (LeagueSharp.Common.Utility.CountEnemiesInRange(data.EndPos.To3D(), 270) >= 2))
                    {
                        BadaoYasuoHelper.CastQCone(target);
                    }
                }
            }

            // R always
            if (BadaoMainVariables.R.IsReady() && target.BadaoIsValidTarget(BadaoMainVariables.R.Range) && BadaoYasuoHelper.IsOnAir(target))
            {
                if (target.HasBuffOfType(BuffType.Knockback))
                {
                    BadaoMainVariables.R.Cast(target);
                }
                var buff = target.Buffs.Where(x => x.Type == BuffType.Knockup).MaxOrDefault(x => x.EndTime);
                if (buff != null && (buff.EndTime - Game.Time) * 1000 <= 200 + Game.Ping)
                {
                    BadaoMainVariables.R.Cast(target);
                }
            }

            //stack Q
            if (BadaoYasuoVariables.ComboStackQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && BadaoYasuoHelper.Qstate() != 3 &&
                !BadaoMainVariables.E.IsInRange(target))
            {
                var Qtarget = BadaoYasuoHelper.GetETargets().FirstOrDefault();
                if (Qtarget.IsValidTarget())
                {
                    BadaoMainVariables.Q.Cast(target);
                }
            }

            //gap close E
            if (BadaoMainVariables.E.IsReady() && target.Distance(ObjectManager.Player) > 475)
            {
                var Etargets = BadaoYasuoHelper.GetETargets();
                var Etarget  = Etargets.Where(x => x != null && BadaoYasuoHelper.GetEDashEnd(x).Distance(Game.CursorPos.To2D()) + 150 < ObjectManager.Player.Distance(Game.CursorPos))
                               .MinOrDefault(x => BadaoYasuoHelper.GetEDashEnd(x).Distance(Game.CursorPos.To2D()));
                if (Etarget != null)
                {
                    BadaoMainVariables.E.Cast(Etarget);
                }
            }
        }