Exemple #1
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!BadaoPoppyHelper.AssasinateActive())
            {
                return;
            }
            var selectedTarget = TargetSelector.SelectedTarget;

            Orbwalker.MoveTo(Game.CursorPos);
            if (!selectedTarget.BadaoIsValidTarget())
            {
                return;
            }
            if (BadaoPoppyHelper.UseRComboKillable())
            {
                if (!BadaoMainVariables.R.IsCharging)
                {
                    if (selectedTarget.BadaoIsValidTarget(500) &&
                        BadaoMainVariables.R.GetDamage(selectedTarget) >= selectedTarget.Health)
                    {
                        BadaoMainVariables.R.StartCharging();
                    }
                }
                else
                {
                    if (selectedTarget.BadaoIsValidTarget(500) &&
                        BadaoMainVariables.R.GetDamage(selectedTarget) >= selectedTarget.Health)
                    {
                        BadaoMainVariables.R.Cast(selectedTarget.Position);
                    }
                    else
                    {
                        if (selectedTarget.BadaoIsValidTarget(BadaoMainVariables.R.Range))
                        {
                            BadaoMainVariables.R.Cast(selectedTarget);
                        }
                    }
                }
            }
            if (BadaoMainVariables.E.IsReady() && Environment.TickCount - BadaoPoppyVariables.QCastTick >= 1250)
            {
                if (selectedTarget.BadaoIsValidTarget(BadaoMainVariables.E.Range))
                {
                    var predPos = BadaoMainVariables.E.GetPrediction(selectedTarget).UnitPosition.LSTo2D();
                    if (BadaoMath.GetFirstWallPoint(predPos, predPos.LSExtend(ObjectManager.Player.Position.LSTo2D(), -300 - selectedTarget.BoundingRadius)) != null)
                    {
                        BadaoMainVariables.E.Cast(selectedTarget);
                        goto nextStep;
                    }
                }
            }
            if (BadaoPoppyHelper.UseEComboGap() && Environment.TickCount - BadaoPoppyVariables.QCastTick >= 1250)
            {
                if (selectedTarget.BadaoIsValidTarget(BadaoMainVariables.E.Range) &&
                    !Orbwalking.InAutoAttackRange(selectedTarget) &&
                    LeagueSharp.Common.Prediction.GetPrediction(selectedTarget, 0.5f).UnitPosition.LSDistance(ObjectManager.Player.Position)
                    > selectedTarget.LSDistance(ObjectManager.Player.Position) + 20)
                {
                    BadaoMainVariables.E.Cast(selectedTarget);
                }
            }

nextStep:
            if (BadaoPoppyHelper.UseQCombo())
            {
                if (selectedTarget.BadaoIsValidTarget(BadaoMainVariables.Q.Range))
                {
                    if (BadaoMainVariables.Q.Cast(selectedTarget))
                    {
                        BadaoPoppyVariables.QCastTick = Environment.TickCount;
                    }
                }
            }
            if (BadaoPoppyHelper.UseWCombo())
            {
                if (selectedTarget.BadaoIsValidTarget(600))
                {
                    BadaoMainVariables.W.Cast();
                }
            }
        }
Exemple #2
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
            {
                return;
            }
            if (BadaoPoppyHelper.UseRComboKillable())
            {
                if (!BadaoMainVariables.R.IsCharging)
                {
                    var killableTarget = HeroManager.Enemies.FirstOrDefault(x => x.BadaoIsValidTarget(500) &&
                                                                            BadaoMainVariables.R.GetDamage(x) >= x.Health);
                    if (killableTarget != null)
                    {
                        BadaoMainVariables.R.StartCharging();
                    }
                }
                else
                {
                    var killableTarget = HeroManager.Enemies.FirstOrDefault(x => x.BadaoIsValidTarget(500) &&
                                                                            BadaoMainVariables.R.GetDamage(x) >= x.Health);
                    if (killableTarget != null)
                    {
                        BadaoMainVariables.R.Cast(killableTarget.Position);
                    }
                }
            }
            if (BadaoMainVariables.E.IsReady() && Environment.TickCount - BadaoPoppyVariables.QCastTick >= 1250)
            {
                foreach (var hero in HeroManager.Enemies
                         .Where(
                             x => x.BadaoIsValidTarget(BadaoMainVariables.E.Range) &&
                             BadaoPoppyHelper.UseECombo(x)))
                {
                    var predPos = hero.Position.To2D(); //BadaoMainVariables.E.GetPrediction(hero).UnitPosition.To2D();
                    if (BadaoMath.GetFirstWallPoint(predPos, predPos.Extend(ObjectManager.Player.Position.To2D(), -300 - hero.BoundingRadius)) != null)
                    {
                        BadaoMainVariables.E.Cast(hero);
                        goto nextStep;
                    }
                }
            }
            if (BadaoPoppyHelper.UseEComboGap() && Environment.TickCount - BadaoPoppyVariables.QCastTick >= 1250)
            {
                var target = TargetSelector.GetTarget(BadaoMainVariables.E.Range, TargetSelector.DamageType.Physical);
                if (target.BadaoIsValidTarget() && !Orbwalking.InAutoAttackRange(target) &&
                    Prediction.GetPrediction(target, 0.5f).UnitPosition.Distance(ObjectManager.Player.Position)
                    > target.Distance(ObjectManager.Player.Position) + 20)
                {
                    BadaoMainVariables.E.Cast(target);
                }
            }

nextStep:
            if (BadaoPoppyHelper.UseQCombo())
            {
                var target = TargetSelector.GetTarget(BadaoMainVariables.Q.Range, TargetSelector.DamageType.Physical);
                if (target.BadaoIsValidTarget())
                {
                    if (BadaoMainVariables.Q.Cast(target) == Spell.CastStates.SuccessfullyCasted)
                    {
                        BadaoPoppyVariables.QCastTick = Environment.TickCount;
                    }
                }
            }
            if (BadaoPoppyHelper.UseWCombo())
            {
                var target = HeroManager.Enemies.OrderBy(i => i.Distance(ObjectManager.Player.Position))
                             .FirstOrDefault(x => x.BadaoIsValidTarget(600));
                if (target != null)
                {
                    BadaoMainVariables.W.Cast();
                }
            }
        }