Ejemplo n.º 1
0
        public override async Task ExecuteAsync(CancellationToken token)
        {
            try
            {
                _target = _targetSelector.Active.GetTargets().FirstOrDefault();



                var unitMaxHp = EntityManager <Unit> .Entities.Where(x =>
                                                                     x.IsValid &&
                                                                     x.IsVisible &&
                                                                     x.IsAlive &&
                                                                     x.IsSpawned &&
                                                                     x.Distance2D(Owner) < 400 &&
                                                                     (x.NetworkName == "CDOTA_BaseNPC_Creep_Neutral" ||
                                                                      x.NetworkName == "CDOTA_BaseNPC_Creep" ||
                                                                      x.NetworkName == "CDOTA_BaseNPC_Creep_Lane" ||
                                                                      x.NetworkName == "CDOTA_BaseNPC_Creep_Siege")).OrderBy(x => x.MaximumHealth).LastOrDefault();

                if (_target == null || _target.IsAttackImmune() || _target.IsInvulnerable())
                {
                    Orbwalker.OrbwalkTo(null);
                    return;
                }


                if (_configuration.AbilityManager.Value.IsEnabled(DeathPact.Ability.Name) && DeathPact.CanBeCasted && !_target.IsEthereal() &&
                    unitMaxHp != null)
                {
                    DeathPact.UseAbility(unitMaxHp);
                    await Await.Delay(DeathPact.GetCastDelay(unitMaxHp), token);
                }


                if (_configuration.AbilityManager.Value.IsEnabled(Strafe.Ability.Name) && Strafe.CanBeCasted && !_target.IsEthereal() &&
                    Owner.IsInAttackRange(_target))
                {
                    Strafe.UseAbility();
                    await Await.Delay(Strafe.GetCastDelay(), token);
                }

                if (_configuration.AbilityManager.Value.IsEnabled(Arrows.Ability.Name) && Arrows.CanBeCasted && !_target.IsEthereal() &&
                    !Arrows.Ability.IsAutoCastEnabled && Owner.IsInAttackRange(_target))
                {
                    Arrows.Ability.ToggleAutocastAbility();
                }


                if (SolarCrest != null && SolarCrest.CanBeCasted && !Owner.IsAttacking() && !_target.IsEthereal() &&
                    _configuration.ItemManager.Value.IsEnabled(SolarCrest.Ability.Name) && !_target.IsMagicImmune() &&
                    Owner.IsInAttackRange(_target))
                {
                    SolarCrest.UseAbility(_target);
                    await Await.Delay(SolarCrest.GetCastDelay(_target), token);
                }

                if (Meddallion != null && Meddallion.CanBeCasted && !Owner.IsAttacking() && !_target.IsEthereal() &&
                    _configuration.ItemManager.Value.IsEnabled(Meddallion.Ability.Name) && !_target.IsMagicImmune() &&
                    Owner.IsInAttackRange(_target))
                {
                    Meddallion.UseAbility(_target);
                    await Await.Delay(Meddallion.GetCastDelay(_target), token);
                }


                if (DiffusalBlade != null && DiffusalBlade.CanBeCasted && !Owner.IsAttacking() && !_target.IsEthereal() &&
                    _configuration.ItemManager.Value.IsEnabled(DiffusalBlade.Ability.Name) && !_target.IsMagicImmune() &&
                    Owner.IsInAttackRange(_target))
                {
                    DiffusalBlade.Ability.UseAbility(_target);
                    await Await.Delay(DiffusalBlade.GetCastDelay(_target), token);
                }

                if (Mjollnir != null && Mjollnir.CanBeCasted && !Owner.IsAttacking() &&
                    Owner.IsInAttackRange(_target) && _configuration.ItemManager.Value.IsEnabled(Mjollnir.Ability.Name))
                {
                    Mjollnir.UseAbility(Owner);
                    await Await.Delay(Mjollnir.GetCastDelay(Owner), token);
                }

                if (Bloodthorn != null && Bloodthorn.CanBeCasted && !Owner.IsAttacking() && !_target.IsMagicImmune() &&
                    _configuration.ItemManager.Value.IsEnabled(Bloodthorn.ToString()) && Owner.IsInAttackRange(_target))
                {
                    Bloodthorn.UseAbility(_target);
                    await Await.Delay(Bloodthorn.GetCastDelay(_target), token);
                }

                if (SheepStick != null && SheepStick.CanBeCasted && !Owner.IsAttacking() && !_target.IsMagicImmune() &&
                    _configuration.ItemManager.Value.IsEnabled(SheepStick.Ability.Name) &&
                    Owner.IsInAttackRange(_target))
                {
                    SheepStick.UseAbility(_target);
                    await Await.Delay(SheepStick.GetCastDelay(_target), token);
                }

                if (Orchid != null && Orchid.CanBeCasted && !Owner.IsAttacking() && !_target.IsMagicImmune() &&
                    _configuration.ItemManager.Value.IsEnabled(Orchid.Ability.Name) && Owner.IsInAttackRange(_target))
                {
                    Orchid.UseAbility(_target);
                    await Await.Delay(Orchid.GetCastDelay(_target), token);
                }


                if (_target != null && (_target.IsInvulnerable() || _target.IsAttackImmune()))
                {
                    Orbwalker.Move(Game.MousePosition);
                }
                else if (_target != null)
                {
                    Orbwalker.OrbwalkTo(_target);
                }
                else
                {
                    Orbwalker.Move(Game.MousePosition);
                }
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }
Ejemplo n.º 2
0
        public override async Task ExecuteAsync(CancellationToken token)
        {
            try
            {
                if (Config.Target.Value.SelectedValue.Contains("Lock") && Context.TargetSelector.IsActive &&
                    (!CanExecute || EnemyHero == null || !EnemyHero.IsValid || !EnemyHero.IsAlive))
                {
                    EnemyHero = Context.TargetSelector.Active.GetTargets().FirstOrDefault() as Hero;
                }
                else if (Config.Target.Value.SelectedValue.Contains("Default") && Context.TargetSelector.IsActive)
                {
                    EnemyHero = Context.TargetSelector.Active.GetTargets().FirstOrDefault() as Hero;
                }

                var Silenced   = UnitExtensions.IsSilenced(base.Owner);
                var SliderData = this.Config.UseBlink.Item.GetValue <Slider>().Value;
                var IsInvis    = Ensage.SDK.Extensions.UnitExtensions.IsInvisible(this.Owner);



                if (EnemyHero != null && !EnemyHero.IsInvulnerable())
                {
                    if (!Silenced && this.Config.AbilityToggler.Value.IsEnabled(this.QAbi.Ability.Name) && this.Owner.IsMelee && !IsInvis && this.Owner.IsInAttackRange(EnemyHero, 350) && !this.Owner.IsInRange(EnemyHero, 150))
                    {
                        this.QAbi.Ability.ToggleAbility();
                        await Await.Delay(this.GetAbilityDelay(base.Owner, QAbi), token);
                    }

                    if (!Silenced && this.Config.AbilityToggler.Value.IsEnabled(this.QAbi.Ability.Name) && !IsInvis && this.Owner.IsRanged && this.Owner.IsInRange(EnemyHero, 150))
                    {
                        this.QAbi.Ability.ToggleAbility();
                        await Await.Delay(this.GetAbilityDelay(base.Owner, QAbi), token);
                    }

                    if (!Silenced && !this.Owner.IsInAttackRange(EnemyHero) && !IsInvis && this.Owner.IsRanged)
                    {
                        this.QAbi.Ability.ToggleAbility();
                        await Await.Delay(this.GetAbilityDelay(base.Owner, QAbi), token);
                    }

                    if (this.Blink != null && this.Blink.CanBeCasted && Owner.Distance2D(EnemyHero) <= 1200 + SliderData && !IsInvis && !(this.Owner.Distance2D(EnemyHero) <= 400) && this.Config.ItemToggler2.Value.IsEnabled(this.Blink.Item.Name))
                    {
                        var l        = (this.Owner.Distance2D(EnemyHero) - SliderData) / SliderData;
                        var posA     = this.Owner.Position;
                        var posB     = EnemyHero.Position;
                        var x        = (posA.X + (l * posB.X)) / (1 + l);
                        var y        = (posA.Y + (l * posB.Y)) / (1 + l);
                        var position = new Vector3((int)x, (int)y, posA.Z);

                        this.Blink.UseAbility(position);
                        await Await.Delay(Blink.GetCastDelay(position), token);
                    }


                    if (!UnitExtensions.IsMagicImmune(EnemyHero))
                    {
                        if (!Silenced && this.WAbi != null && this.WAbi.CanBeCasted && !IsInvis && this.WAbi.CanHit(EnemyHero) && this.Config.AbilityToggler.Value.IsEnabled(this.WAbi.Ability.Name))
                        {
                            this.WAbi.UseAbility();
                            await Await.Delay(WAbi.GetCastDelay(), token);
                        }

                        if (!Silenced && this.EAbi != null && this.EAbi.CanBeCasted && !IsInvis && this.EAbi.CanHit(EnemyHero) && this.Config.AbilityToggler.Value.IsEnabled(this.EAbi.Ability.Name))
                        {
                            this.EAbi.UseAbility(EnemyHero);
                            await Await.Delay(EAbi.GetCastDelay(), token);
                        }


                        if (!Silenced && this.RAbi != null && this.RAbi.CanBeCasted && !IsInvis && this.Owner.IsAttacking() && this.Config.AbilityToggler.Value.IsEnabled(this.RAbi.Ability.Name))
                        {
                            this.RAbi.UseAbility();
                            await Await.Delay(EAbi.GetCastDelay(), token);
                        }

                        if (this.BloodThorn != null && this.BloodThorn.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && !this.Owner.IsAttacking() && this.Config.ItemToggler.Value.IsEnabled(this.BloodThorn.Item.Name))
                        {
                            this.BloodThorn.UseAbility(EnemyHero);
                            await Await.Delay(BloodThorn.GetCastDelay(EnemyHero), token);
                        }

                        if (this.Medalion1 != null && this.Medalion1.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && !this.Owner.IsAttacking() && this.Config.ItemToggler.Value.IsEnabled(this.Medalion1.Item.Name))
                        {
                            this.Medalion1.UseAbility(EnemyHero);
                            await Await.Delay(Medalion1.GetCastDelay(EnemyHero), token);
                        }

                        if (this.Medallion2 != null && this.Medallion2.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && !this.Owner.IsAttacking() && this.Config.ItemToggler.Value.IsEnabled(this.Medallion2.Item.Name))
                        {
                            this.Medallion2.UseAbility(EnemyHero);
                            await Await.Delay(Medallion2.GetCastDelay(EnemyHero), token);
                        }

                        if (this.SheepStick != null && this.SheepStick.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && this.Config.ItemToggler.Value.IsEnabled(this.SheepStick.Item.Name))
                        {
                            this.SheepStick.UseAbility(EnemyHero);
                            await Await.Delay(SheepStick.GetCastDelay(EnemyHero), token);
                        }

                        if (this.DiffBlade != null && this.DiffBlade.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && this.Config.ItemToggler.Value.IsEnabled(DiffBlade.Item.Name))
                        {
                            this.DiffBlade.UseAbility(EnemyHero);
                            await Await.Delay(DiffBlade.GetCastDelay(EnemyHero), token);
                        }

                        if (this.Orchid != null && this.Orchid.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && this.Config.ItemToggler.Value.IsEnabled(Orchid.Item.Name))
                        {
                            this.Orchid.UseAbility(EnemyHero);
                            await Await.Delay(Orchid.GetCastDelay(EnemyHero), token);
                        }

                        if (this.Mjollnir != null && this.Mjollnir.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && this.Config.ItemToggler2.Value.IsEnabled(Mjollnir.Item.Name))
                        {
                            this.Mjollnir.UseAbility(this.Owner);
                            await Await.Delay(Mjollnir.GetCastDelay(), token);
                        }

                        if (this.Heavens_Halberd != null && this.Heavens_Halberd.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && this.Config.ItemToggler2.Value.IsEnabled(Heavens_Halberd.Item.Name))
                        {
                            this.Heavens_Halberd.UseAbility(EnemyHero);
                            await Await.Delay(Heavens_Halberd.GetCastDelay(), token);
                        }

                        if (this.Invis_Sword != null && this.Invis_Sword.CanBeCasted && !IsInvis && !this.Owner.IsInRange(EnemyHero, 1000) && !this.Owner.IsAttacking() && this.Config.ItemToggler2.Value.IsEnabled(Invis_Sword.Item.Name))
                        {
                            this.Invis_Sword.UseAbility();
                            await Await.Delay(Invis_Sword.GetCastDelay(), token);
                        }

                        if (this.Silver_Edge != null && this.Silver_Edge.CanBeCasted && !IsInvis && !this.Owner.IsInRange(EnemyHero, 1000) && !this.Owner.IsAttacking() && this.Config.ItemToggler2.Value.IsEnabled(Silver_Edge.Item.Name))
                        {
                            this.Silver_Edge.UseAbility();
                            await Await.Delay(Silver_Edge.GetCastDelay(), token);
                        }
                    }

                    if (this.Mask_Of_Madness != null && this.Mask_Of_Madness.CanBeCasted && !IsInvis && this.Config.ItemToggler2.Value.IsEnabled(Mask_Of_Madness.Item.Name))
                    {
                        if (Config.MomUsage.Value.SelectedValue.Contains("Melee Form") && this.Owner.IsMelee && !this.EAbi.CanBeCasted && !this.RAbi.CanBeCasted)
                        {
                            this.Mask_Of_Madness.UseAbility();
                            await Await.Delay(Mask_Of_Madness.GetCastDelay(), token);
                        }
                        else if (Config.MomUsage.Value.SelectedValue.Contains("Ranged Form") && this.Owner.IsRanged && !this.WAbi.CanBeCasted && !this.RAbi.CanBeCasted)
                        {
                            this.Mask_Of_Madness.UseAbility();
                            await Await.Delay(Mask_Of_Madness.GetCastDelay(), token);
                        }
                    }

                    if (EnemyHero != null && (EnemyHero.IsInvulnerable() || UnitExtensions.IsAttackImmune(EnemyHero)))
                    {
                        Orbwalker.Move(Game.MousePosition);
                    }
                    else if (EnemyHero != null)
                    {
                        Orbwalker.OrbwalkTo(EnemyHero);
                    }
                }
                else
                {
                    Orbwalker.Move(Game.MousePosition);
                }
            }
            catch (TaskCanceledException)
            {
                // canceled
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }
Ejemplo n.º 3
0
        public override async Task ExecuteAsync(CancellationToken token)
        {
            try
            {
                if (Config.Target.Value.SelectedValue.Contains("Lock") && Context.TargetSelector.IsActive &&
                    (!CanExecute || EnemyHero == null || !EnemyHero.IsValid || !EnemyHero.IsAlive))
                {
                    EnemyHero = Context.TargetSelector.Active.GetTargets().FirstOrDefault() as Hero;
                }
                else if (Config.Target.Value.SelectedValue.Contains("Default") && Context.TargetSelector.IsActive)
                {
                    EnemyHero = Context.TargetSelector.Active.GetTargets().FirstOrDefault() as Hero;
                }

                var Silenced   = UnitExtensions.IsSilenced(base.Owner);
                var SliderData = this.Config.UseBlink.Item.GetValue <Slider>().Value;
                var IsInvis    = Ensage.SDK.Extensions.UnitExtensions.IsInvisible(this.Owner);


                var WAbiCasted = Ensage.SDK.Extensions.UnitExtensions.HasModifier(Owner, "modifier_dark_willow_shadow_realm_buff");



                var QAbiTargets = EntityManager <Hero> .Entities.OrderBy(x => x == EnemyHero).Where(x => x.IsValid && x.IsVisible && x.Team != Owner.Team && !x.IsIllusion && !UnitExtensions.IsMagicImmune(x)).ToList();

                if (EnemyHero != null && !EnemyHero.IsInvulnerable() && !UnitExtensions.IsMagicImmune(EnemyHero))
                {
                    if (this.QAbi.CanBeCasted && this.QAbi != null && !Silenced && this.Config.AbilityToggler.Value.IsEnabled(this.QAbi.Ability.Name) && this.QAbi.CanHit(EnemyHero) && !IsInvis)
                    {
                        QAbi.UseAbility(EnemyHero.Position);
                        ///  await Await.Delay(QAbi.GetCastDelay(EnemyHero.Position), token);
                        await Await.Delay(this.GetAbilityDelay(this.Owner, QAbi), token);
                    }

                    if (!Silenced && this.EAbi != null && this.Config.AbilityToggler.Value.IsEnabled(this.EAbi.Ability.Name) && this.EAbi.CanBeCasted && !IsInvis && this.EAbi.CanHit(EnemyHero))
                    {
                        this.EAbi.Ability.UseAbility(EnemyHero);
                        await Await.Delay(this.GetAbilityDelay(this.Owner, EAbi), token);
                    }

                    if (!Silenced && this.DAbi != null && !IsInvis && this.Owner.IsInRange(EnemyHero, 300) && !IsInvis && this.DAbi.CanBeCasted && this.Config.AbilityToggler.Value.IsEnabled(this.DAbi.Ability.Name))
                    {
                        this.DAbi.Ability.UseAbility();
                        await Await.Delay(this.GetAbilityDelay(this.Owner, DAbi), token);
                    }

                    //
                    //
                    //
                    //
                    //
                    //


                    if (this.Blink != null && this.Blink.CanBeCasted && Owner.Distance2D(EnemyHero) <= 1200 + SliderData && !IsInvis && !(this.Owner.Distance2D(EnemyHero) <= 400) && this.Config.ItemToggler2.Value.IsEnabled(this.Blink.Item.Name))
                    {
                        var l        = (this.Owner.Distance2D(EnemyHero) - SliderData) / SliderData;
                        var posA     = this.Owner.Position;
                        var posB     = EnemyHero.Position;
                        var x        = (posA.X + (l * posB.X)) / (1 + l);
                        var y        = (posA.Y + (l * posB.Y)) / (1 + l);
                        var position = new Vector3((int)x, (int)y, posA.Z);

                        this.Blink.UseAbility(position);
                        await Await.Delay(Blink.GetCastDelay(position), token);
                    }


                    if (!UnitExtensions.IsMagicImmune(EnemyHero))
                    {
                        if (this.BloodThorn != null && this.BloodThorn.CanBeCasted && !IsInvis && !this.Owner.IsAttacking() && this.Config.ItemToggler.Value.IsEnabled(this.BloodThorn.Item.Name))
                        {
                            this.BloodThorn.UseAbility(EnemyHero);
                            await Await.Delay(BloodThorn.GetCastDelay(EnemyHero), token);
                        }

                        if (this.Medalion1 != null && this.Medalion1.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && !this.Owner.IsAttacking() && this.Config.ItemToggler.Value.IsEnabled(this.Medalion1.Item.Name))
                        {
                            this.Medalion1.UseAbility(EnemyHero);
                            await Await.Delay(Medalion1.GetCastDelay(EnemyHero), token);
                        }

                        if (this.Medallion2 != null && this.Medallion2.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && !this.Owner.IsAttacking() && this.Config.ItemToggler.Value.IsEnabled(this.Medallion2.Item.Name))
                        {
                            this.Medallion2.UseAbility(EnemyHero);
                            await Await.Delay(Medallion2.GetCastDelay(EnemyHero), token);
                        }

                        if (this.SheepStick != null && this.SheepStick.CanBeCasted && !IsInvis && this.Config.ItemToggler.Value.IsEnabled(this.SheepStick.Item.Name))
                        {
                            this.SheepStick.UseAbility(EnemyHero);
                            await Await.Delay(SheepStick.GetCastDelay(EnemyHero), token);
                        }

                        if (this.Orchid != null && this.Orchid.CanBeCasted && !IsInvis && this.Config.ItemToggler.Value.IsEnabled(Orchid.Item.Name))
                        {
                            this.Orchid.UseAbility(EnemyHero);
                            await Await.Delay(Orchid.GetCastDelay(EnemyHero), token);
                        }

                        if (this.Mjollnir != null && this.Mjollnir.CanBeCasted && !IsInvis && this.Owner.IsInAttackRange(EnemyHero) && this.Config.ItemToggler2.Value.IsEnabled(Mjollnir.Item.Name))
                        {
                            this.Mjollnir.UseAbility(this.Owner);
                            await Await.Delay(Mjollnir.GetCastDelay(), token);
                        }

                        if (this.Veil_Of_Discord != null && this.Veil_Of_Discord.CanBeCasted && !IsInvis && this.Config.ItemToggler2.Value.IsEnabled(Veil_Of_Discord.Item.Name))
                        {
                            this.Veil_Of_Discord.UseAbility(EnemyHero.Position);
                            await Await.Delay(Veil_Of_Discord.GetCastDelay(), token);
                        }

                        if (this.Rod_Of_Atos != null && this.Rod_Of_Atos.CanBeCasted && !IsInvis && this.Config.ItemToggler2.Value.IsEnabled(Rod_Of_Atos.Item.Name))
                        {
                            this.Rod_Of_Atos.UseAbility(EnemyHero);
                            await Await.Delay(Rod_Of_Atos.GetCastDelay(), token);
                        }
                    }

                    if (EnemyHero != null && (EnemyHero.IsInvulnerable() || UnitExtensions.IsAttackImmune(EnemyHero)))
                    {
                        Orbwalker.Move(Game.MousePosition);
                    }
                    else if (EnemyHero != null)
                    {
                        Orbwalker.OrbwalkTo(EnemyHero);
                    }
                }
                else
                {
                    Orbwalker.Move(Game.MousePosition);
                }
            }
            catch (TaskCanceledException)
            {
                // canceled
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }
Ejemplo n.º 4
0
        public override async Task ExecuteAsync(CancellationToken token)
        {
            try
            {
                _target = _targetSelector.Active.GetTargets().FirstOrDefault();
                var blinkPdValue = _configuration.UseBlink.Item.GetValue <Slider>().Value;


                if (_target == null || _target.IsAttackImmune() || _target.IsInvulnerable())
                {
                    Orbwalker.OrbwalkTo(null);
                    return;
                }


                if (_configuration.AbilityManager.Value.IsEnabled(Warcry.Ability.Name) && Warcry.CanBeCasted && Owner.IsInRange(_target, 1500))
                {
                    Warcry.UseAbility();
                    await Await.Delay(Warcry.GetCastDelay(Owner), token);
                }


                if (_configuration.AbilityManager.Value.IsEnabled(GodsStrength.Ability.Name) && GodsStrength.CanBeCasted && Owner.IsInRange(_target, 1500))
                {
                    GodsStrength.UseAbility();
                    await Await.Delay(GodsStrength.GetCastDelay(Owner), token);
                }


                if (Mjollnir != null && Mjollnir.CanBeCasted && !Owner.IsAttacking() && Owner.IsInRange(_target, 1500) &&
                    _configuration.ItemManager.Value.IsEnabled(Mjollnir.Ability.Name))
                {
                    Mjollnir.UseAbility(Owner);
                    await Await.Delay(Mjollnir.GetCastDelay(Owner), token);
                }


                if (Blink != null && Blink.Item.IsValid && Blink.CanBeCasted && _target != null &&
                    Owner.Distance2D(_target) <= 1200 + blinkPdValue && !(Owner.Distance2D(_target) <= 150) &&
                    _configuration.ItemManager.Value.IsEnabled(Blink.Ability.Name))
                {
                    var l        = (Owner.Distance2D(_target) - blinkPdValue) / blinkPdValue;
                    var posA     = Owner.Position;
                    var posB     = _target.Position;
                    var x        = (posA.X + (l * posB.X)) / (1 + l);
                    var y        = (posA.Y + (l * posB.Y)) / (1 + l);
                    var position = new Vector3((int)x, (int)y, posA.Z);

                    Blink.UseAbility(position);
                    await Await.Delay(Blink.GetCastDelay(position), token);
                }


                if (_configuration.AbilityManager.Value.IsEnabled(Bolt.Ability.Name) && Bolt.CanBeCasted && Owner.IsInRange(_target, 600) && !(_target.IsStunned() || _target.IsHexed()))
                {
                    Bolt.UseAbility(_target);
                    await Await.Delay(Bolt.GetCastDelay(Owner), token);
                }

                if (DiffusalBlade != null && DiffusalBlade.CanBeCasted && !Owner.IsAttacking() && !_target.IsEthereal() &&
                    _configuration.ItemManager.Value.IsEnabled(DiffusalBlade.Ability.Name) && !_target.IsMagicImmune() &&
                    Owner.IsInRange(_target, 600))
                {
                    DiffusalBlade.Ability.UseAbility(_target);
                    await Await.Delay(DiffusalBlade.GetCastDelay(_target), token);
                }

                if (Bloodthorn != null && Bloodthorn.CanBeCasted && !Owner.IsAttacking() && !_target.IsMagicImmune() &&
                    _configuration.ItemManager.Value.IsEnabled(Bloodthorn.Ability.Name) && Owner.IsInRange(_target, 600) && !_target.IsSilenced())
                {
                    Bloodthorn.UseAbility(_target);
                    await Await.Delay(Bloodthorn.GetCastDelay(_target), token);
                }

                if (Orchid != null && Orchid.CanBeCasted && !Owner.IsAttacking() && !_target.IsMagicImmune() &&
                    _configuration.ItemManager.Value.IsEnabled(Orchid.Ability.Name) && Owner.IsInRange(_target, 600) && !_target.IsSilenced())
                {
                    Orchid.UseAbility(_target);
                    await Await.Delay(Orchid.GetCastDelay(_target), token);
                }


                if (SheepStick != null && SheepStick.CanBeCasted && !Owner.IsAttacking() && !_target.IsMagicImmune() &&
                    _configuration.ItemManagerTwo.Value.IsEnabled(SheepStick.Ability.Name) && !(_target.IsStunned() || _target.IsHexed()) &&
                    Owner.IsInRange(_target, 600))
                {
                    SheepStick.UseAbility(_target);
                    await Await.Delay(SheepStick.GetCastDelay(_target), token);
                }


                if (Mjollnir != null && Mjollnir.CanBeCasted && !Owner.IsAttacking() && _target.IsAttacking() &&
                    Owner.IsInRange(_target, 600) && _configuration.ItemManagerTwo.Value.IsEnabled(Mjollnir.Ability.Name))
                {
                    Mjollnir.UseAbility(Owner);
                    await Await.Delay(Mjollnir.GetCastDelay(Owner), token);
                }

                if (Halberd != null && Halberd.CanBeCasted && !Owner.IsAttacking() && _target.IsAttacking() &&
                    Owner.IsInRange(_target, 600) && _configuration.ItemManagerTwo.Value.IsEnabled(Halberd.Ability.Name))
                {
                    Halberd.UseAbility(_target);
                    await Await.Delay(Halberd.GetCastDelay(_target), token);
                }

                if (Abyssal != null && Abyssal.CanBeCasted && !Owner.IsAttacking() && !(_target.IsStunned() || _target.IsHexed()) &&
                    Owner.IsInRange(_target, 600) && _configuration.ItemManagerTwo.Value.IsEnabled(Abyssal.Ability.Name))
                {
                    Abyssal.Ability.CastStun(_target);
                    await Await.Delay(Abyssal.GetCastDelay(_target), token);
                }


                if (Mask != null && Mask.CanBeCasted && !Owner.IsAttacking() &&
                    Owner.IsInRange(_target, 600) && _configuration.ItemManager.Value.IsEnabled(Mask.Ability.Name) && !Bolt.CanBeCasted && !Warcry.CanBeCasted && !GodsStrength.CanBeCasted)
                {
                    Mask.UseAbility();
                    await Await.Delay(Mask.GetCastDelay(Owner), token);
                }



                if (_target != null && (_target.IsInvulnerable() || _target.IsAttackImmune()))
                {
                    Orbwalker.Move(Game.MousePosition);
                }
                else if (_target != null)
                {
                    Orbwalker.OrbwalkTo(_target);
                }
                else
                {
                    Orbwalker.Move(Game.MousePosition);
                }
            }
            catch (Exception e)
            {
                Log.Error(e);
            }
        }