Esempio n. 1
0
 private static void Game_OnUpdate(EventArgs args)
 {
     if (!BadaoGangplankVariables.FleeKey.GetValue <KeyBind>().Active)
     {
         return;
     }
     Orbwalking.Orbwalk(null, Game.CursorPos);
     if (BadaoMainVariables.Q.IsReady())
     {
         foreach (var barrel in BadaoGangplankBarrels.QableBarrels())
         {
             if (BadaoMainVariables.Q.Cast(barrel.Bottle) == Spell.CastStates.SuccessfullyCasted)
             {
                 return;
             }
         }
     }
     if (Orbwalking.CanAttack())
     {
         foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels())
         {
             Orbwalking.Attack = false;
             Orbwalking.Move   = false;
             LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping, () =>
             {
                 Orbwalking.Attack = true;
                 Orbwalking.Move   = true;
             });
             if (EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle))
             {
                 return;
             }
         }
     }
 }
Esempio n. 2
0
 public static void BadaoActivate()
 {
     BadaoGangplankConfig.BadaoActivate();
     BadaoGangplankBarrels.BadaoActivate();
     BadaoGangplankCombo.BadaoActivate();
     BadaoGangplankHarass.BadaoActivate();
     BadaoGangplankLaneClear.BadaoActivate();
     BadaoGangplankJungleClear.BadaoActivate();
     BadaoGangplankAuto.BadaoActivate();
 }
Esempio n. 3
0
 private static void Game_OnUpdate(EventArgs args)
 {
     //Chat.Print(E.Instance.Ammo.ToString());
     if (BadaoGangplankBarrels.QableBarrels().Any())
     {
         Chat.Print("yes");
     }
     if (Environment.TickCount - lastcount < 100 + Game.Ping)
     {
         return;
     }
     if (Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Mixed)
     {
         return;
     }
     foreach (var barrel in BadaoGangplankBarrels.QableBarrels())
     {
         if (Q.IsReady() && E.IsReady() && E.Instance.Ammo >= 2)
         {
             Orbwalking.Attack = false;
             Orbwalking.Move   = false;
             LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping + 875, () =>
             {
                 Orbwalking.Attack = true;
                 Orbwalking.Move   = true;
             });
             var pos1 = barrel.Bottle.Position.To2D().Extend(ObjectManager.Player.Position.To2D(), 0);
             var pos2 = pos1.Extend(ObjectManager.Player.Position.To2D(), 0);
             E.Cast(pos1);
             LeagueSharp.Common.Utility.DelayAction.Add(450, () => Q.Cast(barrel.Bottle));
             LeagueSharp.Common.Utility.DelayAction.Add(875, () => E.Cast(pos2));
             lastcount = Environment.TickCount + 875;
             return;
         }
     }
 }
Esempio n. 4
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                return;
            }
            if (Environment.TickCount - LastCondition >= 100 + Game.Ping)
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.LSIsValidTarget()))
                {
                    var pred = LeagueSharp.Common.Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (BadaoMainVariables.Q.IsReady() && BadaoMainVariables.E.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.QableBarrels(350))
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.LSDistance(pred) <= 660 /*+ hero.BoundingRadius*/) &&
                                !nbarrels.Any(x => x.Bottle.LSDistance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                var mbarrels = nbarrels.FirstOrDefault(x => x.Bottle.LSDistance(pred) <= 660);
                                var pos      = mbarrels.Bottle.Position.LSExtend(pred, 660);
                                if (Player.LSDistance(pos) < BadaoMainVariables.E.Range)
                                {
                                    Orbwalker.DisableAttacking = true;
                                    Orbwalker.DisableMovement  = true;
                                    LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping, () =>
                                    {
                                        Orbwalker.DisableAttacking = false;
                                        Orbwalker.DisableMovement  = false;
                                    });
                                    BadaoMainVariables.E.Cast(pos);
                                    LastCondition = Environment.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }
                foreach (var hero in HeroManager.Enemies.Where(x => x.LSIsValidTarget()))
                {
                    var pred = LeagueSharp.Common.Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (Orbwalker.CanAutoAttack && BadaoMainVariables.E.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels(350))
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.LSDistance(pred) <= 660 /*+ hero.BoundingRadius*/) &&
                                !nbarrels.Any(x => x.Bottle.LSDistance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                Orbwalker.DisableAttacking = true;
                                Orbwalker.DisableMovement  = true;
                                LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping, () =>
                                {
                                    Orbwalker.DisableAttacking = false;
                                    Orbwalker.DisableMovement  = false;
                                });
                                var mbarrels = nbarrels.FirstOrDefault(x => x.Bottle.LSDistance(pred) <= 660);
                                var pos      = mbarrels.Bottle.Position.LSExtend(pred, 660);
                                BadaoMainVariables.E.Cast(pos);
                                LastCondition = Environment.TickCount;
                                return;
                            }
                        }
                    }
                }
                foreach (var hero in HeroManager.Enemies.Where(x => x.LSIsValidTarget() && x.LSDistance(ObjectManager.Player) < 2000))
                {
                    var pred = LeagueSharp.Common.Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (BadaoMainVariables.Q.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.QableBarrels())
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.LSDistance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                Orbwalker.DisableMovement  = true;
                                Orbwalker.DisableAttacking = true;
                                LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping, () =>
                                {
                                    Orbwalker.DisableMovement  = false;
                                    Orbwalker.DisableAttacking = false;
                                });
                                BadaoMainVariables.Q.Cast(barrel.Bottle);
                                if (BadaoMainVariables.Q.Cast(barrel.Bottle) == LeagueSharp.Common.Spell.CastStates.SuccessfullyCasted)
                                {
                                    BadaoGangplankCombo.LastCondition = Environment.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }

                foreach (var hero in HeroManager.Enemies.Where(x => x.LSIsValidTarget() && x.LSDistance(ObjectManager.Player) < 2000 && x.IsHPBarRendered))
                {
                    var pred = LeagueSharp.Common.Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels())
                    {
                        var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                        if (nbarrels.Any(x => x.Bottle.LSDistance(pred) <= 330 /*+ hero.BoundingRadius*/))
                        {
                            Console.WriteLine("1");
                            Orbwalker.DisableMovement  = true;
                            Orbwalker.DisableAttacking = true;
                            Console.WriteLine("2");
                            LeagueSharp.Common.Utility.DelayAction.Add(300 + Game.Ping, () =>
                            {
                                Orbwalker.DisableMovement  = false;
                                Orbwalker.DisableAttacking = false;
                            });
                            Console.WriteLine("3");
                            Orbwalker.ForcedTarget = barrel.Bottle;
                            EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle);
                            Console.WriteLine("4");
                            if (EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle))
                            {
                                BadaoGangplankCombo.LastCondition = Environment.TickCount;
                                return;
                            }
                        }
                    }
                }
            }
            if (Estack >= 2 && BadaoMainVariables.E.IsReady() && BadaoGangplankVariables.ComboE1)
            {
                var target = TargetSelector.GetTarget(BadaoMainVariables.E.Range, DamageType.Physical);
                if (target.BadaoIsValidTarget())
                {
                    var pred = LeagueSharp.Common.Prediction.GetPrediction(target, 0.5f).UnitPosition;
                    if (!BadaoGangplankBarrels.Barrels.Any(x => x.Bottle.LSDistance(pred) <= 660 /*+ target.BoundingRadius*/))
                    {
                        BadaoMainVariables.E.Cast(pred);
                    }
                }
            }
            if (BadaoMainVariables.Q.IsReady())
            {
                var target = TargetSelector.GetTarget(BadaoMainVariables.Q.Range, DamageType.Physical);
                if (target.BadaoIsValidTarget())
                {
                    bool useQ = true;
                    foreach (var barrel in BadaoGangplankBarrels.DelayedBarrels(1000))
                    {
                        var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                        if (BadaoMainVariables.E.IsReady() &&
                            nbarrels.Any(x => x.Bottle.LSDistance(target.Position) <= 660 + target.BoundingRadius) &&
                            !nbarrels.Any(x => x.Bottle.LSDistance(target.Position) <= 330 + target.BoundingRadius))
                        {
                            useQ = false;
                        }
                        else if (nbarrels.Any(x => x.Bottle.LSDistance(target.Position) <= 330 + target.BoundingRadius))
                        {
                            useQ = false;
                        }
                    }
                    if (useQ)
                    {
                        BadaoMainVariables.Q.Cast(target);
                    }
                }
            }
        }
Esempio n. 5
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (Environment.TickCount - BadaoGangplankCombo.LastCondition >= 100 + Game.Ping)
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.LSIsValidTarget() && x.LSDistance(ObjectManager.Player) < 2000 && x.IsHPBarRendered))
                {
                    var pred = LeagueSharp.Common.Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (BadaoMainVariables.Q.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.QableBarrels())
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.LSDistance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                Orbwalker.DisableMovement  = true;
                                Orbwalker.DisableAttacking = true;
                                LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping, () =>
                                {
                                    Orbwalker.DisableMovement  = false;
                                    Orbwalker.DisableAttacking = false;
                                });
                                BadaoMainVariables.Q.Cast(barrel.Bottle);
                                if (BadaoMainVariables.Q.Cast(barrel.Bottle) == LeagueSharp.Common.Spell.CastStates.SuccessfullyCasted)
                                {
                                    BadaoGangplankCombo.LastCondition = Environment.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }

                foreach (var hero in HeroManager.Enemies.Where(x => x.LSIsValidTarget() && x.LSDistance(ObjectManager.Player) < 2000 && x.IsHPBarRendered))
                {
                    var pred = LeagueSharp.Common.Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels())
                    {
                        var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                        if (nbarrels.Any(x => x.Bottle.LSDistance(pred) <= 330 /*+ hero.BoundingRadius*/))
                        {
                            Console.WriteLine("1");
                            Orbwalker.DisableMovement  = true;
                            Orbwalker.DisableAttacking = true;
                            Console.WriteLine("2");
                            LeagueSharp.Common.Utility.DelayAction.Add(300 + Game.Ping, () =>
                            {
                                Orbwalker.DisableMovement  = false;
                                Orbwalker.DisableAttacking = false;
                            });
                            Console.WriteLine("3");
                            Orbwalker.ForcedTarget = barrel.Bottle;
                            EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle);
                            Console.WriteLine("4");
                            if (EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle))
                            {
                                BadaoGangplankCombo.LastCondition = Environment.TickCount;
                                return;
                            }
                        }
                    }
                }
            }
            if (BadaoMainVariables.W.IsReady() &&
                BadaoGangplankVariables.AutoWLowHealth &&
                BadaoGangplankVariables.AutoWLowHealthValue >= Player.Health * 100 / Player.MaxHealth)
            {
                BadaoMainVariables.W.Cast();
            }
            if (BadaoMainVariables.W.IsReady() &&
                BadaoGangplankVariables.AutoWCC)
            {
                foreach (var bufftype in new BuffType[] { BuffType.Stun, BuffType.Snare, BuffType.Suppression,
                                                          BuffType.Silence, BuffType.Taunt, BuffType.Charm, BuffType.Blind, BuffType.Fear, BuffType.Polymorph })
                {
                    if (Player.HasBuffOfType(bufftype))
                    {
                        BadaoMainVariables.W.Cast();
                    }
                }
            }
            if (BadaoMainVariables.Q.IsReady())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.BadaoIsValidTarget(BadaoMainVariables.Q.Range) &&
                                                               BadaoMainVariables.Q.GetDamage(x) >= x.Health))
                {
                    BadaoMainVariables.Q.Cast(hero);
                }
            }
            Orbwalker.ForcedTarget = null;
        }
Esempio n. 6
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (Environment.TickCount - BadaoGangplankCombo.LastCondition >= 100 + Game.Ping)
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                {
                    var pred = Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (BadaoMainVariables.Q.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.QableBarrels())
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.Distance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                Orbwalking.Attack = false;
                                Orbwalking.Move   = false;
                                Utility.DelayAction.Add(100 + Game.Ping, () =>
                                {
                                    Orbwalking.Attack = true;
                                    Orbwalking.Move   = true;
                                });
                                if (BadaoMainVariables.Q.Cast(barrel.Bottle) == Spell.CastStates.SuccessfullyCasted)
                                {
                                    BadaoGangplankCombo.LastCondition = Environment.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }

                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                {
                    var pred = Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (Orbwalking.CanAttack())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels())
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.Distance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                Orbwalking.Attack = false;
                                Orbwalking.Move   = false;
                                Utility.DelayAction.Add(100 + Game.Ping, () =>
                                {
                                    Orbwalking.Attack = true;
                                    Orbwalking.Move   = true;
                                });
                                if (Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle))
                                {
                                    BadaoGangplankCombo.LastCondition = Environment.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }
            }
            if (BadaoMainVariables.W.IsReady() &&
                BadaoGangplankVariables.AutoWLowHealth.GetValue <bool>() &&
                BadaoGangplankVariables.AutoWLowHealthValue.GetValue <Slider>().Value >= Player.Health * 100 / Player.MaxHealth)
            {
                BadaoMainVariables.W.Cast();
            }
            if (BadaoMainVariables.W.IsReady() &&
                BadaoGangplankVariables.AutoWCC.GetValue <bool>())
            {
                foreach (var bufftype in new BuffType[] { BuffType.Stun, BuffType.Snare, BuffType.Suppression,
                                                          BuffType.Silence, BuffType.Taunt, BuffType.Charm, BuffType.Blind, BuffType.Fear, BuffType.Polymorph })
                {
                    if (Player.HasBuffOfType(bufftype))
                    {
                        BadaoMainVariables.W.Cast();
                    }
                }
            }
            if (BadaoMainVariables.Q.IsReady())
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.BadaoIsValidTarget(BadaoMainVariables.Q.Range) &&
                                                               BadaoMainVariables.Q.GetDamage(x) >= x.Health))
                {
                    BadaoMainVariables.Q.Cast(hero);
                }
            }
        }
Esempio n. 7
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
            {
                return;
            }
            if (Environment.TickCount - LastCondition >= 100 + Game.Ping)
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                {
                    var pred = Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (BadaoMainVariables.Q.IsReady() && BadaoMainVariables.E.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.QableBarrels(350))
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.Distance(pred) <= 990 /*+ hero.BoundingRadius*/) &&
                                !nbarrels.Any(x => x.Bottle.Distance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                for (int i = 990; i >= 400; i -= 20)
                                {
                                    var mbarrels = nbarrels.Where(x => x.Bottle.Distance(pred) <= i).OrderBy(x => x.Bottle.Distance(pred));
                                    foreach (var mbarrel in mbarrels)
                                    {
                                        var pos = mbarrel.Bottle.Position.Extend(pred, i - 330);
                                        if (Player.Distance(pos) < BadaoMainVariables.E.Range)
                                        {
                                            Orbwalking.Attack = false;
                                            Orbwalking.Move   = false;
                                            Utility.DelayAction.Add(100 + Game.Ping, () =>
                                            {
                                                Orbwalking.Attack = true;
                                                Orbwalking.Move   = true;
                                            });
                                            BadaoMainVariables.E.Cast(pos);
                                            LastCondition = Environment.TickCount;
                                            return;
                                        }
                                    }
                                }
                            }
                        }
                        foreach (var barrel in BadaoGangplankBarrels.QableBarrels())
                        {
                            // choi mot luc ba thung
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (barrel.Bottle.Distance(pred) <= 330 + 660 + 660 && !(barrel.Bottle.Distance(pred) <= 330 + 660) && BadaoMainVariables.E.Instance.Ammo >= 2)
                            {
                                for (int i = 330 + 660 + 660; i >= 380 + 660; i -= 20)
                                {
                                    if (barrel.Bottle.Distance(pred) <= i)
                                    {
                                        var pos1 = barrel.Bottle.Position.To2D().Extend(pred.To2D(), 660);
                                        var pos2 = barrel.Bottle.Position.To2D().Extend(pred.To2D(), i - 330);
                                        if (BadaoMainVariables.E.IsInRange(pos1) && BadaoMainVariables.E.IsInRange(pos2) &&
                                            !pos1.IsWall() && !pos2.IsWall())
                                        {
                                            Orbwalking.Attack = false;
                                            Orbwalking.Move   = false;
                                            Utility.DelayAction.Add(100 + Game.Ping + 875, () =>
                                            {
                                                Orbwalking.Attack = true;
                                                Orbwalking.Move   = true;
                                            });
                                            BadaoMainVariables.E.Cast(pos1);
                                            Utility.DelayAction.Add(550, () => BadaoMainVariables.Q.Cast(barrel.Bottle));
                                            Utility.DelayAction.Add(875, () => BadaoMainVariables.E.Cast(pos2));
                                            LastCondition = Environment.TickCount + 875;
                                            return;
                                        }
                                    }
                                }
                            }
                            foreach (var nbarrel in nbarrels)
                            {
                                if (nbarrel.Bottle.Distance(pred) <= 330 + 660 + 660 && !(nbarrel.Bottle.Distance(pred) <= 330 + 660) && BadaoMainVariables.E.Instance.Ammo >= 2)
                                {
                                    for (int i = 330 + 660 + 660; i >= 380 + 660; i -= 20)
                                    {
                                        if (nbarrel.Bottle.Distance(pred) <= i)
                                        {
                                            var pos1 = nbarrel.Bottle.Position.To2D().Extend(pred.To2D(), 660);
                                            var pos2 = nbarrel.Bottle.Position.To2D().Extend(pred.To2D(), i - 330);
                                            if (BadaoMainVariables.E.IsInRange(pos1) && BadaoMainVariables.E.IsInRange(pos2) &&
                                                !pos1.IsWall() && !pos2.IsWall())
                                            {
                                                Orbwalking.Attack = false;
                                                Orbwalking.Move   = false;
                                                Utility.DelayAction.Add(100 + Game.Ping + 875, () =>
                                                {
                                                    Orbwalking.Attack = true;
                                                    Orbwalking.Move   = true;
                                                });
                                                BadaoMainVariables.E.Cast(pos1);
                                                Utility.DelayAction.Add(550, () => BadaoMainVariables.Q.Cast(barrel.Bottle));
                                                Utility.DelayAction.Add(875, () => BadaoMainVariables.E.Cast(pos2));
                                                LastCondition = Environment.TickCount + 875;
                                                return;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                {
                    var pred = Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (Orbwalking.CanAttack() && BadaoMainVariables.E.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels(350))
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.Distance(pred) <= 990 /*+ hero.BoundingRadius*/) &&
                                !nbarrels.Any(x => x.Bottle.Distance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                for (int i = 990; i >= 400; i -= 20)
                                {
                                    var mbarrels = nbarrels.Where(x => x.Bottle.Distance(pred) <= i).OrderBy(x => x.Bottle.Distance(pred));
                                    foreach (var mbarrel in mbarrels)
                                    {
                                        var pos = mbarrel.Bottle.Position.Extend(pred, i - 330);
                                        if (Player.Distance(pos) < BadaoMainVariables.E.Range)
                                        {
                                            Orbwalking.Attack = false;
                                            Orbwalking.Move   = false;
                                            Utility.DelayAction.Add(100 + Game.Ping, () =>
                                            {
                                                Orbwalking.Attack = true;
                                                Orbwalking.Move   = true;
                                            });
                                            BadaoMainVariables.E.Cast(pos);
                                            LastCondition = Environment.TickCount;
                                            return;
                                        }
                                    }
                                }
                            }
                        }
                        foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels())
                        {
                            // choi mot luc ba thung
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (barrel.Bottle.Distance(pred) <= 330 + 660 + 660 && !(barrel.Bottle.Distance(pred) <= 330 + 660) && BadaoMainVariables.E.Instance.Ammo >= 2)
                            {
                                for (int i = 330 + 660 + 660; i >= 380 + 660; i -= 20)
                                {
                                    if (barrel.Bottle.Distance(pred) <= i)
                                    {
                                        var pos1 = barrel.Bottle.Position.To2D().Extend(pred.To2D(), 660);
                                        var pos2 = barrel.Bottle.Position.To2D().Extend(pred.To2D(), i - 330);
                                        if (BadaoMainVariables.E.IsInRange(pos1) && BadaoMainVariables.E.IsInRange(pos2) &&
                                            !pos1.IsWall() && !pos2.IsWall())
                                        {
                                            Orbwalking.Attack = false;
                                            Orbwalking.Move   = false;
                                            Utility.DelayAction.Add(100 + Game.Ping + 875, () =>
                                            {
                                                Orbwalking.Attack = true;
                                                Orbwalking.Move   = true;
                                            });
                                            BadaoMainVariables.E.Cast(pos1);
                                            Utility.DelayAction.Add(550, () => Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle));
                                            Utility.DelayAction.Add(875, () => BadaoMainVariables.E.Cast(pos2));
                                            LastCondition = Environment.TickCount + 875;
                                            return;
                                        }
                                    }
                                }
                            }
                            foreach (var nbarrel in nbarrels)
                            {
                                if (nbarrel.Bottle.Distance(pred) <= 330 + 660 + 660 && !(nbarrel.Bottle.Distance(pred) <= 330 + 660) && BadaoMainVariables.E.Instance.Ammo >= 2)
                                {
                                    for (int i = 330 + 660 + 660; i >= 380 + 660; i -= 20)
                                    {
                                        if (nbarrel.Bottle.Distance(pred) <= i)
                                        {
                                            var pos1 = nbarrel.Bottle.Position.To2D().Extend(pred.To2D(), 660);
                                            var pos2 = nbarrel.Bottle.Position.To2D().Extend(pred.To2D(), i - 330);
                                            if (BadaoMainVariables.E.IsInRange(pos1) && BadaoMainVariables.E.IsInRange(pos2) &&
                                                !pos1.IsWall() && !pos2.IsWall())
                                            {
                                                Orbwalking.Attack = false;
                                                Orbwalking.Move   = false;
                                                Utility.DelayAction.Add(100 + Game.Ping + 875, () =>
                                                {
                                                    Orbwalking.Attack = true;
                                                    Orbwalking.Move   = true;
                                                });
                                                BadaoMainVariables.E.Cast(pos1);
                                                Utility.DelayAction.Add(550, () => BadaoMainVariables.Q.Cast(barrel.Bottle));
                                                Utility.DelayAction.Add(875, () => BadaoMainVariables.E.Cast(pos2));
                                                LastCondition = Environment.TickCount + 875;
                                                return;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                {
                    var pred = Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (BadaoMainVariables.Q.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.QableBarrels())
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.Distance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                Orbwalking.Attack = false;
                                Orbwalking.Move   = false;
                                Utility.DelayAction.Add(100 + Game.Ping, () =>
                                {
                                    Orbwalking.Attack = true;
                                    Orbwalking.Move   = true;
                                });
                                if (BadaoMainVariables.Q.Cast(barrel.Bottle) == Spell.CastStates.SuccessfullyCasted)
                                {
                                    LastCondition = Environment.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }

                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                {
                    var pred = Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (Orbwalking.CanAttack())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels())
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.Distance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                Orbwalking.Attack = false;
                                Orbwalking.Move   = false;
                                Utility.DelayAction.Add(100 + Game.Ping, () =>
                                {
                                    Orbwalking.Attack = true;
                                    Orbwalking.Move   = true;
                                });
                                if (Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle))
                                {
                                    LastCondition = Environment.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }
            }
            if (Estack >= 2 && BadaoMainVariables.E.IsReady() && BadaoGangplankVariables.ComboE1.GetValue <bool>())
            {
                var target = TargetSelector.GetTarget(BadaoMainVariables.E.Range, TargetSelector.DamageType.Physical);
                if (target.BadaoIsValidTarget())
                {
                    var pred = Prediction.GetPrediction(target, 0.5f).UnitPosition;
                    if (!BadaoGangplankBarrels.Barrels.Any(x => x.Bottle.Distance(pred) <= 660 /*+ target.BoundingRadius*/))
                    {
                        BadaoMainVariables.E.Cast(pred);
                    }
                }
            }
            if (BadaoMainVariables.Q.IsReady())
            {
                var target = TargetSelector.GetTarget(BadaoMainVariables.Q.Range, TargetSelector.DamageType.Physical);
                if (target.BadaoIsValidTarget())
                {
                    bool useQ = true;
                    foreach (var barrel in BadaoGangplankBarrels.DelayedBarrels(1000))
                    {
                        var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                        if (BadaoMainVariables.E.IsReady() &&
                            nbarrels.Any(x => x.Bottle.Distance(target.Position) <= 660 + target.BoundingRadius) &&
                            !nbarrels.Any(x => x.Bottle.Distance(target.Position) <= 330 + target.BoundingRadius))
                        {
                            useQ = false;
                            break;
                        }
                        else if (nbarrels.Any(x => x.Bottle.Distance(target.Position) <= 330 + target.BoundingRadius))
                        {
                            useQ = false;
                            break;
                        }
                    }
                    if (BadaoGangplankVariables.ComboQSave.GetValue <bool>())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.DelayedBarrels(10000))
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                            {
                                if (nbarrels.Any(x => x.Bottle.Distance(hero.Position) <= 330 + hero.BoundingRadius))
                                {
                                    useQ = false;
                                    break;
                                }
                            }
                            if (useQ == false)
                            {
                                break;
                            }
                        }
                    }
                    if (useQ)
                    {
                        BadaoMainVariables.Q.Cast(target);
                    }
                }
            }
        }
Esempio n. 8
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
            {
                return;
            }
            if (Environment.TickCount - LastCondition >= 100 + Game.Ping)
            {
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                {
                    var pred = Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (BadaoMainVariables.Q.IsReady() && BadaoMainVariables.E.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.QableBarrels(350))
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.Distance(pred) <= 660 /*+ hero.BoundingRadius*/) &&
                                !nbarrels.Any(x => x.Bottle.Distance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                var mbarrels = nbarrels.FirstOrDefault(x => x.Bottle.Distance(pred) <= 660);
                                var pos      = mbarrels.Bottle.Position.Extend(pred, 660);
                                if (Player.Distance(pos) < BadaoMainVariables.E.Range)
                                {
                                    Orbwalking.Attack = false;
                                    Orbwalking.Move   = false;
                                    Utility.DelayAction.Add(100 + Game.Ping, () =>
                                    {
                                        Orbwalking.Attack = true;
                                        Orbwalking.Move   = true;
                                    });
                                    BadaoMainVariables.E.Cast(pos);
                                    LastCondition = Environment.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                {
                    var pred = Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (Orbwalking.CanAttack() && BadaoMainVariables.E.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels(350))
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.Distance(pred) <= 660 /*+ hero.BoundingRadius*/) &&
                                !nbarrels.Any(x => x.Bottle.Distance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                Orbwalking.Attack = false;
                                Orbwalking.Move   = false;
                                Utility.DelayAction.Add(100 + Game.Ping, () =>
                                {
                                    Orbwalking.Attack = true;
                                    Orbwalking.Move   = true;
                                });
                                var mbarrels = nbarrels.FirstOrDefault(x => x.Bottle.Distance(pred) <= 660);
                                var pos      = mbarrels.Bottle.Position.Extend(pred, 660);
                                BadaoMainVariables.E.Cast(pos);
                                LastCondition = Environment.TickCount;
                                return;
                            }
                        }
                    }
                }
                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                {
                    var pred = Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (BadaoMainVariables.Q.IsReady())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.QableBarrels())
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.Distance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                Orbwalking.Attack = false;
                                Orbwalking.Move   = false;
                                Utility.DelayAction.Add(100 + Game.Ping, () =>
                                {
                                    Orbwalking.Attack = true;
                                    Orbwalking.Move   = true;
                                });
                                if (BadaoMainVariables.Q.Cast(barrel.Bottle) == Spell.CastStates.SuccessfullyCasted)
                                {
                                    LastCondition = Environment.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }

                foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget()))
                {
                    var pred = Prediction.GetPrediction(hero, 0.5f).UnitPosition;
                    if (Orbwalking.CanAttack())
                    {
                        foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels())
                        {
                            var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                            if (nbarrels.Any(x => x.Bottle.Distance(pred) <= 330 /*+ hero.BoundingRadius*/))
                            {
                                Orbwalking.Attack = false;
                                Orbwalking.Move   = false;
                                Utility.DelayAction.Add(100 + Game.Ping, () =>
                                {
                                    Orbwalking.Attack = true;
                                    Orbwalking.Move   = true;
                                });
                                if (Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle))
                                {
                                    LastCondition = Environment.TickCount;
                                    return;
                                }
                            }
                        }
                    }
                }
            }
            if (Estack >= 2 && BadaoMainVariables.E.IsReady() && BadaoGangplankVariables.ComboE1.GetValue <bool>())
            {
                var target = TargetSelector.GetTarget(BadaoMainVariables.E.Range, TargetSelector.DamageType.Physical);
                if (target.BadaoIsValidTarget())
                {
                    var pred = Prediction.GetPrediction(target, 0.5f).UnitPosition;
                    if (!BadaoGangplankBarrels.Barrels.Any(x => x.Bottle.Distance(pred) <= 660 /*+ target.BoundingRadius*/))
                    {
                        BadaoMainVariables.E.Cast(pred);
                    }
                }
            }
            if (BadaoMainVariables.Q.IsReady())
            {
                var target = TargetSelector.GetTarget(BadaoMainVariables.Q.Range, TargetSelector.DamageType.Physical);
                if (target.BadaoIsValidTarget())
                {
                    bool useQ = true;
                    foreach (var barrel in BadaoGangplankBarrels.DelayedBarrels(1000))
                    {
                        var nbarrels = BadaoGangplankBarrels.ChainedBarrels(barrel);
                        if (BadaoMainVariables.E.IsReady() &&
                            nbarrels.Any(x => x.Bottle.Distance(target.Position) <= 660 + target.BoundingRadius) &&
                            !nbarrels.Any(x => x.Bottle.Distance(target.Position) <= 330 + target.BoundingRadius))
                        {
                            useQ = false;
                        }
                        else if (nbarrels.Any(x => x.Bottle.Distance(target.Position) <= 330 + target.BoundingRadius))
                        {
                            useQ = false;
                        }
                    }
                    if (useQ)
                    {
                        BadaoMainVariables.Q.Cast(target);
                    }
                }
            }
        }