Пример #1
0
        private static void AutoExplode()
        {
            var closestHittingBarrel = BarrelManager.GetBarrelsThatWillHit().FirstOrDefault();

            if (closestHittingBarrel != null)
            {
                var chainedBarrels = BarrelManager.GetChainedBarrels(closestHittingBarrel);
                var barrelToQ      = BarrelManager.GetBestBarrelToQ(chainedBarrels);
                if (barrelToQ != null)
                {
                    if (SpellManager.Q.Ready)
                    {
                        var timeWhenCanE = LastECast + 500;
                        var delay        = timeWhenCanE - Game.TickCount;
                        delay = Ammo < 1 ? 0 : delay <= 0 ? 0 : delay;
                        var castDelay = MenuManager.Combo["triple"].Enabled ? delay : 0;
                        DelayAction.Queue(castDelay, () => SpellManager.Q.Cast(barrelToQ.Object));
                        return;
                    }
                    if (barrelToQ.Object.IsInAutoAttackRange() && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled)
                    {
                        Orbwalker.Implementation.ForceTarget(barrelToQ.Object);
                        Orbwalker.Implementation.Attack(barrelToQ.Object);
                    }
                }
            }
        }
Пример #2
0
        private static void Game_OnUpdate()
        {
            BarrelManager.Barrels.RemoveAll(x => x.Object.IsDead);
            RemoveCC();
            Killsteal();

            var closestHittingBarrel = BarrelManager.GetBarrelsThatWillHit().FirstOrDefault();

            if (closestHittingBarrel != null)
            {
                var chainedBarrels = BarrelManager.GetChainedBarrels(closestHittingBarrel);
                var barrelToQ      = BarrelManager.GetBestBarrelToQ(chainedBarrels);
                if (barrelToQ != null && SpellManager.Q.Ready)
                {
                    var timeWhenCanE = LastECast + 500;
                    var delay        = timeWhenCanE - Game.TickCount;
                    delay = delay <= 0 ? 0 : delay;
                    var castDelay = MenuManager.Combo["triple"].Enabled ? delay : 0;
                    DelayAction.Queue(castDelay, () => SpellManager.Q.Cast(barrelToQ.Object));
                    return;
                }
            }

            if ((Orbwalker.Implementation.Mode == OrbwalkingMode.Combo || Orbwalker.Implementation.Mode == OrbwalkingMode.Mixed || Orbwalker.Implementation.Mode == OrbwalkingMode.Lasthit ||
                 Orbwalker.Implementation.Mode == OrbwalkingMode.Laneclear || MenuManager.Keys["comboToMouse"].Enabled || MenuManager.Keys["qBarrel"].Enabled) && MenuManager.Misc["aaBarrel"].Enabled)
            {
                AttackNearestBarrel();
            }

            if (MenuManager.Keys["comboToMouse"].Enabled)
            {
                AttackNearestBarrel();
                ComboToMouse();
            }

            if (MenuManager.Keys["qBarrel"].Enabled)
            {
                AttackNearestBarrel();
                QNearestBarrel();
            }

            switch (Orbwalker.Implementation.Mode)
            {
            case OrbwalkingMode.Combo:
                Combo();
                break;

            case OrbwalkingMode.Mixed:
                Harass();
                break;

            case OrbwalkingMode.Lasthit:
                LastHit();
                break;
            }
        }
Пример #3
0
        private static void Game_OnUpdate()
        {
            BarrelManager.Barrels.RemoveAll(x => x.Object.IsDead);
            RemoveCC();
            Killsteal();

            var closestHittingBarrel = BarrelManager.GetBarrelsThatWillHit().FirstOrDefault();

            if (closestHittingBarrel != null)
            {
                var chainedBarrels = BarrelManager.GetChainedBarrels(closestHittingBarrel);
                var barrelToQ      = BarrelManager.GetBestBarrelToQ(chainedBarrels);
                if (barrelToQ != null && SpellManager.Q.Ready)
                {
                    SpellManager.Q.Cast(barrelToQ.Object);
                    return;
                }
            }

            if ((Orbwalker.Implementation.Mode == OrbwalkingMode.Combo || Orbwalker.Implementation.Mode == OrbwalkingMode.Mixed || Orbwalker.Implementation.Mode == OrbwalkingMode.Lasthit ||
                 Orbwalker.Implementation.Mode == OrbwalkingMode.Laneclear || MenuManager.Keys["comboToMouse"].Enabled || MenuManager.Keys["qBarrel"].Enabled) && MenuManager.Misc["aaBarrel"].Enabled)
            {
                AttackNearestBarrel();
            }

            if (MenuManager.Keys["comboToMouse"].Enabled)
            {
                AttackNearestBarrel();
                ComboToMouse();
            }

            if (MenuManager.Keys["qBarrel"].Enabled)
            {
                AttackNearestBarrel();
                QNearestBarrel();
            }

            switch (Orbwalker.Implementation.Mode)
            {
            case OrbwalkingMode.Combo:
                Combo();
                break;

            case OrbwalkingMode.Mixed:
                Harass();
                break;

            case OrbwalkingMode.Lasthit:
                LastHit();
                break;
            }
        }
Пример #4
0
        private static void ComboToMouse()
        {
            var nearestBarrelToCursor = BarrelManager.GetNearestBarrel(Game.CursorPos);

            if (nearestBarrelToCursor != null)
            {
                var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrelToCursor);
                if (chainedBarrels.Count > 1)
                {
                    var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels);
                    if (barrelToQ != null)
                    {
                        if (SpellManager.Q.Ready)
                        {
                            SpellManager.Q.Cast(barrelToQ.Object);
                            return;
                        }
                        if (barrelToQ.Object.IsInAutoAttackRange() && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled)
                        {
                            Orbwalker.Implementation.ForceTarget(barrelToQ.Object);
                            Orbwalker.Implementation.Attack(barrelToQ.Object);
                        }
                    }
                }
                else
                {
                    if (nearestBarrelToCursor.Object.Distance(Game.CursorPos) <= SpellManager.ChainRadius)
                    {
                        if (SpellManager.E.Ready && nearestBarrelToCursor.CanChain)
                        {
                            SpellManager.E.Cast(Game.CursorPos);
                        }
                    }
                    else
                    {
                        var bestPos = nearestBarrelToCursor.ServerPosition.Extend(Game.CursorPos, (SpellManager.ChainRadius - 5));
                        if (SpellManager.E.Ready && nearestBarrelToCursor.CanChain)
                        {
                            SpellManager.E.Cast(bestPos);
                        }
                    }
                }
            }
            else
            {
                if (Player.Distance(Game.CursorPos) <= SpellManager.E.Range && SpellManager.E.Ready)
                {
                    SpellManager.E.Cast(Game.CursorPos);
                }
            }
        }
Пример #5
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(SpellManager.E2.Range);

            if (target.IsValidTarget())
            {
                var nearestBarrel = BarrelManager.GetNearestBarrel();
                if (nearestBarrel != null)
                {
                    var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrel);
                    if (chainedBarrels.Any(x => BarrelManager.BarrelWillHit(x, target)))
                    {
                        //If any of the chained barrels will hit, cast Q on best barrel.
                        var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels);
                        if (barrelToQ != null)
                        {
                            if (SpellManager.Q.Ready)
                            {
                                var timeWhenCanE = LastECast + 500;
                                var delay        = timeWhenCanE - Game.TickCount;
                                delay = delay <= 0 ? 0 : delay;
                                var castDelay = MenuManager.Combo["triple"].Enabled ? delay : 0;
                                DelayAction.Queue(castDelay, () => SpellManager.Q.Cast(barrelToQ.Object));
                            }
                            else if (barrelToQ.Object.Distance(Player) <= Player.AttackRange && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled)
                            {
                                Orbwalker.Implementation.Attack(barrelToQ.Object);
                            }
                            return;
                        }
                    }
                    else
                    {
                        //No chained barrels will hit, so let's chain them.
                        var bestChainPosition = BarrelManager.GetBestChainPosition(target, nearestBarrel);
                        if (bestChainPosition != Vector3.Zero && target.IsInRange(SpellManager.E.Range) && Player.Distance(bestChainPosition) <= SpellManager.E.Range && SpellManager.E.Ready && nearestBarrel.CanChain)
                        {
                            Render.Line(nearestBarrel.ServerPosition.ToScreenPosition(), bestChainPosition.ToScreenPosition(), 5, true, Color.Red);
                            SpellManager.E.Cast(bestChainPosition);
                        }
                    }
                }
            }
        }
Пример #6
0
        private static void ComboToMouse()
        {
            Orbwalker.Implementation.Move(Game.CursorPos);
            var nearestBarrelToCursor = BarrelManager.GetNearestBarrel(Game.CursorPos);

            if (nearestBarrelToCursor != null)
            {
                var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrelToCursor);
                if (chainedBarrels.Count > 1)
                {
                    var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels);
                    if (barrelToQ != null && SpellManager.Q.Ready)
                    {
                        SpellManager.Q.Cast(barrelToQ.Object);
                    }
                }
                else
                {
                    if (nearestBarrelToCursor.Object.Distance(Game.CursorPos) <= SpellManager.ChainRadius)
                    {
                        if (SpellManager.E.Ready && nearestBarrelToCursor.CanChain)
                        {
                            SpellManager.E.Cast(Game.CursorPos);
                        }
                    }
                    else
                    {
                        var bestPos = nearestBarrelToCursor.ServerPosition.Extend(Game.CursorPos, (SpellManager.ChainRadius - 5));
                        if (SpellManager.E.Ready && nearestBarrelToCursor.CanChain)
                        {
                            SpellManager.E.Cast(bestPos);
                        }
                    }
                }
            }
            else
            {
                if (Player.Distance(Game.CursorPos) <= SpellManager.E.Range && SpellManager.E.Ready)
                {
                    SpellManager.E.Cast(Game.CursorPos);
                }
            }
        }
Пример #7
0
 private static void DashOnHeroDashed(object sender, Dash.DashArgs dashArgs)
 {
     if (dashArgs.Unit is Obj_AI_Hero)
     {
         var nearestBarrel = BarrelManager.GetNearestBarrel(dashArgs.EndPos.To3D());
         if (nearestBarrel != null)
         {
             var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrel);
             if (chainedBarrels.Any(x => BarrelManager.BarrelWillHit(x, dashArgs.EndPos.To3D())))
             {
                 //If any of the chained barrels will hit, cast Q on best barrel.
                 var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels);
                 if (barrelToQ != null)
                 {
                     if (SpellManager.Q.Ready)
                     {
                         SpellManager.Q.Cast(barrelToQ.Object);
                     }
                     else if (barrelToQ.Object.Distance(Player) <= Player.AttackRange && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled)
                     {
                         Orbwalker.Implementation.Attack(barrelToQ.Object);
                     }
                     return;
                 }
             }
             else
             {
                 //No chained barrels will hit, so let's chain them.
                 var bestChainPosition = BarrelManager.GetBestChainPosition(dashArgs.EndPos.To3D(), nearestBarrel);
                 if (bestChainPosition != Vector3.Zero && dashArgs.EndPos.Distance(Player) <= SpellManager.E.Range && Player.Distance(bestChainPosition) <= SpellManager.E.Range && SpellManager.E.Ready && nearestBarrel.CanChain)
                 {
                     Render.Line(nearestBarrel.ServerPosition.ToScreenPosition(), bestChainPosition.ToScreenPosition(), 5, true, Color.Red);
                     SpellManager.E.Cast(bestChainPosition);
                 }
             }
         }
     }
 }
Пример #8
0
        private static void Combo()
        {
            if (Orbwalker.Implementation.IsWindingUp)
            {
                return;
            }
            var target = TargetSelector.GetTarget(SpellManager.E2.Range);

            if (target.IsValidTarget())
            {
                var nearestBarrel = BarrelManager.GetNearestBarrel();
                if (nearestBarrel != null)
                {
                    var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrel);
                    if (chainedBarrels.Any(x => BarrelManager.BarrelWillHit(x, target)))
                    {
                        //If any of the chained barrels will hit, cast Q on best barrel.
                        var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels);
                        if (barrelToQ != null)
                        {
                            if (SpellManager.Q.Ready)
                            {
                                var timeWhenCanE = LastECast + 500;
                                var delay        = timeWhenCanE - Game.TickCount;
                                delay = Ammo < 1 ? 0 : delay <= 0 ? 0 : delay;
                                var castDelay = MenuManager.Combo["triple"].Enabled ? delay : 0;
                                DelayAction.Queue(castDelay, () => SpellManager.Q.Cast(barrelToQ.Object));
                                return;
                            }
                            if (barrelToQ.Object.IsInAutoAttackRange() && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled)
                            {
                                Orbwalker.Implementation.ForceTarget(barrelToQ.Object);
                                Orbwalker.Implementation.Attack(barrelToQ.Object);
                            }
                        }
                    }
                    else
                    {
                        //No chained barrels will hit, so let's chain them OR try and triple barrel.
                        if (chainedBarrels.Count >= 2 && MenuManager.Combo["triple"].Enabled)
                        {
                            //There are chained barrels, so let's see if any are in range to be triple comboed.
                            var barrelToComboFrom = chainedBarrels.FirstOrDefault(x => BarrelManager.GetEnemiesInChainRadius(x).Count >= 1);
                            if (barrelToComboFrom == null)
                            {
                                return;
                            }
                            var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels);
                            if (barrelToQ != null)
                            {
                                if (SpellManager.Q.Ready)
                                {
                                    var timeWhenCanE = LastECast + 500;
                                    var delay        = timeWhenCanE - Game.TickCount;
                                    delay = delay <= 0 ? 0 : delay;
                                    var castDelay = MenuManager.Combo["triple"].Enabled ? delay : 0;
                                    DelayAction.Queue(castDelay, () => SpellManager.Q.Cast(barrelToQ.Object));
                                    return;
                                }
                                //if (barrelToQ.Object.IsInAutoAttackRange() && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled)
                                //{
                                //    Orbwalker.Implementation.ForceTarget(barrelToQ.Object);
                                //    Orbwalker.Implementation.Attack(barrelToQ.Object);
                                //}
                            }
                        }
                        else
                        {
                            var bestChainPosition = BarrelManager.GetBestChainPosition(target, nearestBarrel);
                            if (bestChainPosition != Vector3.Zero && target.IsInRange(SpellManager.E.Range) && Player.Distance(bestChainPosition) <= SpellManager.E.Range && SpellManager.E.Ready && nearestBarrel.CanChain)
                            {
                                Render.Line(nearestBarrel.ServerPosition.ToScreenPosition(), bestChainPosition.ToScreenPosition(), 5, true, Color.Red);
                                if (SpellManager.E.Cast(bestChainPosition))
                                {
                                    if (SpellManager.Q.Ready && nearestBarrel.CanQ)
                                    {
                                        SpellManager.Q.Cast(nearestBarrel.Object);
                                    }
                                    else if (nearestBarrel.CanAA && nearestBarrel.Object.IsInAutoAttackRange() && Orbwalker.Implementation.CanAttack() && !Orbwalker.Implementation.IsWindingUp)
                                    {
                                        Orbwalker.Implementation.Attack(nearestBarrel.Object);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }