Esempio 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);
            }
        }
Esempio n. 2
0
        private void UpdateManager_IngameUpdate()
        {
            var target = TargetSelector.CurrentTarget;

            if (target == null || !target.IsAlive || target.IsEnchanted())
            {
                return;
            }

            if (!OrbWalkerSleeper.Sleeping)
            {
                OrbwalkerManager.OrbwalkTo(target, GameManager.MousePosition);
                OrbWalkerSleeper.Sleep(200);
                return;
            }

            if (AbilitySleeper.Sleeping || localHero.IsRooted())
            {
                return;
            }

            var distanceToTarget = localHero.Distance2D(target);
            var blinkRange       = Blink?.Range;

            //blink logic
            if (Blink != null &&
                Blink.CanBeCasted())
            {
                if (Roll.CanBeCasted() &&
                    blinkRange < distanceToTarget &&
                    blinkRange + Roll.Range > distanceToTarget &&
                    Blink.UseAbility(target))
                {
                    Stone.Sleeper.Sleep(300);
                    Roll.Sleeper.Sleep(300);
                    AbilitySleeper.Sleep(200);
                    return;
                }

                if (!Roll.CanBeCasted() &&
                    distanceToTarget > blinkRange / 3 &&
                    distanceToTarget < blinkRange &&
                    Blink.UseAbility(target))
                {
                    Stone.Sleeper.Sleep(300);
                    Roll.Sleeper.Sleep(300);
                    AbilitySleeper.Sleep(200);
                    return;
                }
            }

            if (VeilOfDiscord != null &&
                VeilOfDiscord.UseAbility(target))
            {
                AbilitySleeper.Sleep(100);
                return;
            }

            if (Hex != null &&
                Hex.UseAbility(target))
            {
                AbilitySleeper.Sleep(100);
                return;
            }

            if (Abyssal != null &&
                Abyssal.UseAbility(target))
            {
                AbilitySleeper.Sleep(100);
                return;
            }

            if (target.IsMagicImmune())
            {
                return;
            }

            var firstStoneNearEnemy = StoneExtensions.FirstUnitInRange(target.Position, StoneExtensions.StoneName, 500);
            var firstStoneNearHero  = StoneExtensions.FirstUnitInRange(localHero.Position, StoneExtensions.StoneName, 250);

            // roll logic
            if (Roll.CanBeCasted())
            {
                var rudePredict   = target.IsMoving ? target.InFront(150) : target.Position;
                var prediction    = Smash.GetPrediction(target);
                var distToPredict = prediction.Distance2D(localHero.Position);

                if (firstStoneNearHero == null &&
                    firstStoneNearEnemy == null &&
                    !target.IsInvulnerable() &&
                    !context.AutoPushInTowerDirection.CanPushInTower &&
                    distToPredict < 600f &&
                    Grip.CanBeCasted() &&
                    Smash.CanBeCasted() &&
                    Stone.UseAbility(localHero.Position.Extend(rudePredict, 100)))
                {
                    Blink?.Sleeper.Sleep(300);
                    Grip.Sleeper.Sleep(distToPredict / Grip.Speed * 1000);
                    Stone.Sleeper.Sleep(500);
                    Roll.Sleeper.Sleep(300 + distToPredict / Grip.Speed * 1000);
                    AbilitySleeper.Sleep(100);
                    return;
                }

                var stoneBetween = StoneExtensions.FirstUnitBetween(localHero.Position, rudePredict, StoneExtensions.StoneName, 250, 350);

                if (firstStoneNearEnemy != null &&
                    firstStoneNearEnemy.Distance2D(localHero) < 1000f &&
                    stoneBetween == null &&
                    Grip.UseAbility(firstStoneNearEnemy.Position))
                {
                    Blink?.Sleeper.Sleep(300);
                    AbilitySleeper.Sleep(100);
                    return;
                }
                else if (firstStoneNearEnemy == null &&
                         distToPredict < 900f &&
                         !target.IsInvulnerable() &&
                         stoneBetween == null &&
                         !localHero.IsInRollPhase() &&
                         Grip.CanBeCasted() &&
                         Stone.UseAbility(rudePredict))
                {
                    Blink?.Sleeper.Sleep(300);
                    Stone.Sleeper.Sleep(500);
                    AbilitySleeper.Sleep(200);
                    return;
                }

                if (!localHero.IsInRollPhase() &&
                    Roll.UseAbility(target))
                {
                    Smash.Sleeper.Sleep(1000);
                    Blink?.Sleeper.Sleep(300);
                    AbilitySleeper.Sleep(800);
                    return;
                }
            }

            var intersectingStone = EntityManager.GetEntities <Unit>()
                                    .FirstOrDefault(x => x.Distance2D(target) < Grip.Range &&
                                                    x.Name == StoneExtensions.StoneName &&
                                                    x.IsAlive &&
                                                    StoneExtensions.FirstUnitBetween(localHero.Position, x.Position, target.Name, 200, Grip.Range) == target);

            if (intersectingStone != null &&
                !target.IsInvulnerable() &&
                Grip.UseAbility(intersectingStone.Position))
            {
                Smash.Sleeper.Sleep(intersectingStone.Distance2D(localHero) / Grip.Speed * 1100);
                AbilitySleeper.Sleep(200);
                return;
            }

            if (Orchid != null &&
                Orchid.UseAbility(target))
            {
                AbilitySleeper.Sleep(100);
                return;
            }

            if (Halberd != null &&
                Halberd.UseAbility(target))
            {
                AbilitySleeper.Sleep(100);
                return;
            }

            if (Shivas != null &&
                Shivas.UseAbility(target))
            {
                AbilitySleeper.Sleep(100);
                return;
            }


            if (distanceToTarget < Smash.Range * 0.4f &&
                !target.IsInvulnerable() &&
                Smash.UseAbilityOnStone(target))
            {
                AbilitySleeper.Sleep(200);
                return;
            }

            if (distanceToTarget < Smash.Range * 0.4f &&
                !localHero.IsInRollPhase() &&
                !target.IsInvulnerable() &&
                Grip.CanBeCasted() &&
                Smash.CanBeCasted() &&
                Stone.UseAbility())

            {
                Stone.Sleeper.Sleep(300);
                AbilitySleeper.Sleep(200);
                return;
            }

            if (distanceToTarget < Smash.Range * 0.4f &&
                firstStoneNearHero == null &&
                !target.IsInvulnerable() &&
                (Grip.Base.Cooldown > Smash.Base.CooldownLength ||
                 (!Grip.CanBeCasted() && Grip.Base.Cooldown == 0)) &&
                !localHero.IsInRollPhase() &&
                Smash.CanBeCasted() &&
                !context.AutoPushInTowerDirection.CanPushInTower &&
                Stone.UseAbility())
            {
                Stone.Sleeper.Sleep(300);
                AbilitySleeper.Sleep(100);
                return;
            }

            if (SpiritVessel != null &&
                SpiritVessel.UseAbility(target))
            {
                AbilitySleeper.Sleep(100);
                return;
            }
        }
Esempio n. 3
0
        }         // OnClose

        public void Combo()
        {
            if (!Menu.Item("enabled").IsActive() || Game.IsChatOpen || Time.Enabled)
            {
                return;
            }
            Me = ObjectManager.LocalHero;

            Q = Me.Spellbook.SpellQ;
            W = Me.Spellbook.SpellW;
            R = Me.Spellbook.SpellR;

            Leans    = Me.FindItem("item_aether_lens");
            Urn      = Me.FindItem("item_urn_of_shadows");
            Dagon    = Me.Inventory.Items.FirstOrDefault(x => x.Name.Contains("item_dagon"));
            Ethereal = Me.FindItem("item_ethereal_blade");
            Shiva    = Me.FindItem("item_shivas_guard");
            Glimmer  = Me.FindItem("item_glimmer_cape");
            Vail     = Me.FindItem("item_veil_of_discord");
            Orchid   = Me.FindItem("item_orchid") ?? Me.FindItem("item_bloodthorn");
            Abyssal  = Me.FindItem("item_abyssal_blade");
            Atos     = Me.FindItem("item_rod_of_atos");
            Bkb      = Me.FindItem("item_black_king_bar");
            Mail     = Me.FindItem("item_blade_mail");
            Lotus    = Me.FindItem("item_lotus_orb");
            Active   = Game.IsKeyDown(Menu.Item("Combo Key").GetValue <KeyBind>().Key);
            var v = ObjectManager.GetEntities <Hero>().Where(x => x.Team != Me.Team && x.IsAlive && x.IsVisible && !x.IsIllusion && !x.IsMagicImmune()).ToList();

            if (Active && Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(W.Name))
            {
                if (Me.HasModifier("modifier_pudge_rot") && v.Count(x => x.Distance2D(Me) <= W.GetCastRange() + Me.HullRadius) == 0)
                {
                    W.ToggleAbility();
                    Time.Start();
                }
                else if (!Me.HasModifier("modifier_pudge_rot") && v.Count(x => x.Distance2D(Me) <= W.GetCastRange() + Me.HullRadius) > 0)
                {
                    W.ToggleAbility();
                    Time.Start();
                }
            }

            E = Toolset.ClosestToMouse(Me);
            if (E == null || !Me.IsAlive)
            {
                return;
            }
            Sheep = E.ClassId == ClassId.CDOTA_Unit_Hero_Tidehunter ? null : Me.FindItem("item_sheepstick");
            if (R.IsInAbilityPhase || R.IsChanneling || Me.IsChanneling())
            {
                return;
            }
            if (Active)
            {
                MinRangeHook = E.HullRadius + 27;
                CastRange    = Leans != null ? (Q.CastRange + 200 + E.HullRadius) : (Q.CastRange + E.HullRadius);
                EMoveSpeed   = E.HasModifier("modifier_spirit_breaker_charge_of_darkness") ? 550 + ((int)E.Spellbook.Spell1.Level * 50) : E.MovementSpeed;

                Vector2 vector = new Vector2((float)Math.Cos(E.RotationRad) * EMoveSpeed, (float)Math.Sin(E.RotationRad) * EMoveSpeed);
                Vector3 start  = new Vector3((float)((0.3 + (Game.Ping / 1000)) * Math.Cos(E.RotationRad) * EMoveSpeed + E.Position.X),
                                             (float)((0.3 + (Game.Ping / 1000)) * Math.Sin(E.RotationRad) * EMoveSpeed + E.NetworkPosition.Y), E.NetworkPosition.Z);
                Vector3 specialPosition = new Vector3((float)(MinRangeHook * Math.Cos(E.RotationRad) + E.NetworkPosition.X),
                                                      (float)(MinRangeHook * Math.Sin(E.RotationRad) + E.NetworkPosition.Y),
                                                      E.NetworkPosition.Z);
                HookPosition = Interception(start, vector, Me.Position, 1600);
                if (
                    Atos != null && Atos.CanBeCasted() && Me.CanCast() && !E.IsMagicImmune() && !E.HasModifier("modifier_spirit_breaker_charge_of_darkness") &&
                    Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Atos.Name) && Me.Distance2D(E) <= 1500 && Utils.SleepCheck("a")
                    )
                {
                    Atos.UseAbility(E);
                    Utils.Sleep(250, "a");
                }
                else if (Q.CanBeCasted() && Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(Q.Name))
                {
                    if (E.NetworkActivity == NetworkActivity.Move || E.HasModifier("modifier_spirit_breaker_charge_of_darkness"))
                    {
                        for (double i = 0.03; i <= 0.135; i += 0.03)
                        {
                            Vector3 estimated = new Vector3((float)(i * Math.Cos(E.RotationRad) * EMoveSpeed + HookPosition.X),
                                                            (float)(i * Math.Sin(E.RotationRad) * EMoveSpeed + HookPosition.Y), E.NetworkPosition.Z);
                            if (GetTimeToTurn(estimated) <= i)
                            {
                                HookPosition = estimated;
                                TimeTurn     = i;
                                break;
                            }
                        }
                        CastPos = (HookPosition - Me.Position) * ((Q.GetCastRange() + Me.HullRadius) / HookPosition.Distance2D(Me.Position)) + Me.Position;
                        if (Me.Position.Distance2D(HookPosition) < CastRange)
                        {
                            Q.UseAbility(CastPos); Time.Interval = 150 + TimeTurn * 1000;
                            Time.Start();
                        }
                    }
                    else
                    {
                        CastPos = (specialPosition - Me.Position) * ((Q.GetCastRange() + Me.HullRadius) / specialPosition.Distance2D(Me.Position)) + Me.Position;
                        if (Me.Position.Distance2D(E.NetworkPosition) < CastRange)
                        {
                            Q.UseAbility(CastPos);
                            Time.Start();
                        }
                    }
                }
                else
                {
                    if (R.IsInAbilityPhase || R.IsChanneling)
                    {
                        return;
                    }
                    uint countElse = 0;
                    countElse += 1;
                    if (Vail != null && Vail.CanBeCasted() && Me.Distance2D(E) <= 1100 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Vail.Name) && Utils.SleepCheck("vail"))
                    {
                        Vail.UseAbility(E.Position);
                        Utils.Sleep(130, "vail");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (Orchid != null && Orchid.CanBeCasted() && Me.Distance2D(E) <= 900 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Orchid.Name) && Utils.SleepCheck("orchid"))
                    {
                        Orchid.UseAbility(E);
                        Utils.Sleep(100, "orchid");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (Shiva != null && Shiva.CanBeCasted() && Me.Distance2D(E) <= 600 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Shiva.Name) && !E.IsMagicImmune() && Utils.SleepCheck("Shiva"))
                    {
                        Shiva.UseAbility();
                        Utils.Sleep(100, "Shiva");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (Ethereal != null && Ethereal.CanBeCasted() && Me.Distance2D(E) <= 700 && Me.Distance2D(E) <= 400 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Ethereal.Name) && Utils.SleepCheck("ethereal"))
                    {
                        Ethereal.UseAbility(E);
                        Utils.Sleep(100, "ethereal");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (Dagon != null && Dagon.CanBeCasted() && Me.Distance2D(E) <= Dagon.GetCastRange() && Utils.SleepCheck("dagon"))
                    {
                        Dagon.UseAbility(E);
                        Utils.Sleep(100, "dagon");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (Urn != null && Urn.CanBeCasted() && Urn.CurrentCharges > 0 && Me.Distance2D(E) <= 400 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Urn.Name) && Utils.SleepCheck("urn"))
                    {
                        Urn.UseAbility(E);
                        Utils.Sleep(240, "urn");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (Glimmer != null && Glimmer.CanBeCasted() && Me.Distance2D(E) <= 300 && Utils.SleepCheck("glimmer"))
                    {
                        Glimmer.UseAbility(Me);
                        Utils.Sleep(200, "glimmer");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (Mail != null && Mail.CanBeCasted() && v.Count(x => x.Distance2D(Me) <= 650) >=
                        (Menu.Item("Heel").GetValue <Slider>().Value) &&
                        Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Mail.Name) &&
                        Utils.SleepCheck("mail"))
                    {
                        Mail.UseAbility();
                        Console.WriteLine(countElse.ToString());
                        Utils.Sleep(100, "mail");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (Bkb != null && Bkb.CanBeCasted() && v.Count(x => x.Distance2D(Me) <= 650) >=
                        (Menu.Item("Heel").GetValue <Slider>().Value) &&
                        Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Bkb.Name) &&
                        Utils.SleepCheck("bkb"))
                    {
                        Bkb.UseAbility();
                        Utils.Sleep(100, "bkb");
                    }

                    else
                    {
                        countElse += 1;
                    }
                    if (Lotus != null && Lotus.CanBeCasted() && v.Count(x => x.Distance2D(Me) <= 650) >= 2 &&
                        Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Lotus.Name) &&
                        Utils.SleepCheck("lotus"))
                    {
                        Lotus.UseAbility(Me);
                        Utils.Sleep(100, "lotus");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (countElse == 11 && R != null && R.CanBeCasted() && Me.Distance2D(E) <= R.GetCastRange() + 150 && (!Urn.CanBeCasted() || Urn.CurrentCharges <= 0) && Menu.Item("Skills").GetValue <AbilityToggler>().IsEnabled(R.Name) &&
                        Utils.SleepCheck("R")
                        )
                    {
                        R.UseAbility(E);
                        Utils.Sleep(150, "R");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (Abyssal != null && !R.CanBeCasted() && Abyssal.CanBeCasted() && !E.IsStunned() && !E.IsHexed() &&
                        Me.Distance2D(E) <= 300 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Abyssal.Name) && Utils.SleepCheck("abyssal"))
                    {
                        Abyssal.UseAbility(E);
                        Utils.Sleep(200, "abyssal");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (Sheep != null && !R.CanBeCasted() && Sheep.CanBeCasted() && !E.IsStunned() && !E.IsHexed() &&
                        Me.Distance2D(E) <= 900 && Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Sheep.Name) && Utils.SleepCheck("sheep"))
                    {
                        Sheep.UseAbility(E);
                        Utils.Sleep(200, "sheep");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (countElse == 14 && Me.Distance2D(E) <= 300 && Mail != null &&
                        Mail.CanBeCasted() && (E.NetworkActivity == NetworkActivity.Attack || E.Spellbook.Spells.All(x => x.IsInAbilityPhase)) &&
                        Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Mail.Name) &&
                        Utils.SleepCheck("mail"))
                    {
                        Mail.UseAbility();
                        Utils.Sleep(100, "mail");
                    }
                    else
                    {
                        countElse += 1;
                    }
                    if (countElse == 15 && Lotus != null && Lotus.CanBeCasted() && Me.Distance2D(E) <= 600 &&
                        Menu.Item("Items").GetValue <AbilityToggler>().IsEnabled(Lotus.Name) &&
                        Utils.SleepCheck("lotus"))
                    {
                        Lotus.UseAbility(Me);
                        Utils.Sleep(100, "lotus");
                    }
                    if ((R == null || !R.CanBeCasted() || !Q.CanBeCasted() && Me.Distance2D(E) >= R.GetCastRange() + Me.HullRadius && !E.HasModifier("pudge_meat_hook")) && !E.IsAttackImmune())
                    {
                        if (Menu.Item("orbwalk").GetValue <bool>() && Me.Distance2D(E) <= 1900)
                        {
                            Orbwalking.Orbwalk(E, 0, 1600, true, true);
                        }
                    }
                }
            }
        }
Esempio n. 4
0
        private static void Game_OnUpdate(EventArgs args)
        {
            _me = ObjectManager.LocalHero;
            if (!Game.IsInGame || _me == null || _me.ClassID != ClassID.CDOTA_Unit_Hero_Lina)
            {
                return;
            }
            if (Game.IsPaused || Game.IsChatOpen)
            {
                return;
            }

            _menuValue = Menu.Item("enabledAbilities").GetValue <AbilityToggler>();
            _slider    = Menu.Item("distance").GetValue <Slider>().Value;

            Q = _me.Spellbook.Spell1;
            W = _me.Spellbook.Spell2;
            R = _me.Spellbook.Spell4;

            Dagon    = _me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
            Hex      = _me.FindItem("item_sheepstick");
            Ethereal = _me.FindItem("item_ethereal_blade");
            Veil     = _me.FindItem("item_veil_of_discord");
            Orchid   = _me.FindItem("item_orchid");
            Shiva    = _me.FindItem("item_shivas_guard");
            Eul      = _me.FindItem("item_cyclone");
            Blink    = _me.FindItem("item_blink");

            if (!Game.IsKeyDown(Menu.Item("Cooombo").GetValue <KeyBind>().Key))
            {
                _targetActive = false;
                return;
            }

            if (!_targetActive)
            {
                _target       = _me.ClosestToMouseTarget(300);
                _targetActive = true;
            }
            else
            {
                var modifHex =
                    _target.Modifiers.Where(y => y.Name == "modifier_sheepstick_debuff")
                    .DefaultIfEmpty(null)
                    .FirstOrDefault();
                var modifEul =
                    _target.Modifiers.Where(y => y.Name == "modifier_eul_cyclone").DefaultIfEmpty(null).FirstOrDefault();

                if (_target == null || !_target.IsAlive || _target.IsIllusion || _target.IsMagicImmune())
                {
                    return;
                }

                if (Blink != null && Blink.CanBeCasted() && _me.Distance2D(_target) > _slider + 100 && _menuValue.IsEnabled("item_blink") && Utils.SleepCheck("blink"))
                {
                    Blink.UseAbility(PositionCalc(_me, _target, _slider));
                    Utils.Sleep(150 + Game.Ping, "blink");
                }
                else if (Eul != null && Eul.CanBeCasted() && Utils.SleepCheck("eul") && _menuValue.IsEnabled("item_cyclone") && Utils.SleepCheck("blink"))
                {
                    Eul.UseAbility(_target);
                    Utils.Sleep(4000 + Game.Ping, "eul");
                }
                else if (Eul == null || Eul.Cooldown > 0 || !_menuValue.IsEnabled("item_cyclone"))
                {
                    if (Orchid != null && Orchid.CanBeCasted() && Utils.SleepCheck("orchid") && modifEul == null &&
                        _menuValue.IsEnabled("item_orchid"))
                    {
                        Orchid.UseAbility(_target);
                        Utils.Sleep(150 + Game.Ping, "orchid");
                    }
                    else if (Shiva != null && Shiva.CanBeCasted() && Utils.SleepCheck("shiva") && modifEul == null &&
                             _menuValue.IsEnabled("item_shivas_guard"))
                    {
                        Shiva.UseAbility();
                        Utils.Sleep(150 + Game.Ping, "shiva");
                    }
                    else if (Veil != null && Veil.CanBeCasted() && Utils.SleepCheck("veil") && modifEul == null &&
                             _menuValue.IsEnabled("item_veil_of_discord"))
                    {
                        Veil.UseAbility(_target.Position);
                        Utils.Sleep(150 + Game.Ping, "veil");
                    }
                    else if (Ethereal != null && Ethereal.CanBeCasted() && Utils.SleepCheck("ethereal") &&
                             modifEul == null && _menuValue.IsEnabled("item_ethereal_blade"))
                    {
                        Ethereal.UseAbility(_target);
                        Utils.Sleep(150 + Game.Ping, "ethereal");
                    }
                    else if (Dagon != null && Dagon.CanBeCasted() && Utils.SleepCheck("dagon") &&
                             modifEul == null)
                    {
                        Dagon.UseAbility(_target);
                        Utils.Sleep(150 + Game.Ping, "dagon");
                    }
                    else if (Hex != null && Hex.CanBeCasted() && Utils.SleepCheck("hex") &&
                             !_target.IsStunned() &&
                             Utils.SleepCheck("eul") && _menuValue.IsEnabled("item_sheepstick"))
                    {
                        Hex.UseAbility(_target);
                        Utils.Sleep(150 + Game.Ping, "hex");
                    }
                    else if (W != null && W.CanBeCasted() && Utils.SleepCheck("w") &&
                             (modifEul != null && modifEul.RemainingTime <= W.GetCastDelay(_me, _target, true) + 0.5 ||
                              modifHex != null && modifHex.RemainingTime <= W.GetCastDelay(_me, _target, true) + 0.5 ||
                              (Hex == null || !_menuValue.IsEnabled("item_sheepstick") || Hex.Cooldown > 0) &&
                              (Eul == null || !_menuValue.IsEnabled("item_cyclone") || Eul.Cooldown < 20 && Eul.Cooldown > 0)))
                    {
                        W.UseAbility(W.GetPrediction(_target, W.GetCastDelay(_me, _target)));
                        Utils.Sleep(150 + Game.Ping, "w");
                    }
                    else if (Q != null && Q.CanBeCasted() && Utils.SleepCheck("q") &&
                             modifEul == null)
                    {
                        Q.UseAbility(_target);
                        Utils.Sleep(150 + Game.Ping, "q");
                    }
                    else if (R != null && R.CanBeCasted() && Utils.SleepCheck("r") &&
                             modifEul == null)
                    {
                        R.UseAbility(_target);
                        Utils.Sleep(150 + Game.Ping, "r");
                    }
                    else if (!_me.IsChanneling() && NothingCanCast() &&
                             !_target.IsAttackImmune() && Utils.SleepCheck("attack"))
                    {
                        _me.Attack(_target);
                        Utils.Sleep(1000 + Game.Ping, "attack");
                    }
                }
            }
        }
Esempio n. 5
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);
            }
        }
Esempio n. 6
0
        //public readonly Menu farm = new Menu("FarmMode", "FarmMode");


        public void Combo()
        {
            if (Me == null || Me.ClassId != ClassId.CDOTA_Unit_Hero_Meepo || !Game.IsInGame)
            {
                return;
            }
            if (!Me.IsAlive)
            {
                return;
            }

            Activated    = Game.IsKeyDown(Menu.Item("keyBind").GetValue <KeyBind>().Key);
            PoofKey      = Game.IsKeyDown(Menu.Item("poofKey").GetValue <KeyBind>().Key);
            PoofAutoMode = Menu.Item("poofAutoMod").GetValue <KeyBind>().Active;
            SafePoof     = Menu.Item("poofSafe").IsActive();
            Dodge        = Menu.Item("Dodge").GetValue <KeyBind>().Active;
            var checkObj = ObjectManager.GetEntities <Unit>().Where(x => (x.ClassId == ClassId.CDOTA_BaseNPC_Creep_Lane ||
                                                                          x.ClassId == ClassId.CDOTA_BaseNPC_Creep_Siege ||
                                                                          x.ClassId == ClassId.CDOTA_BaseNPC_Creep ||
                                                                          x.ClassId == ClassId.CDOTA_BaseNPC_Creep_Neutral ||
                                                                          x.HasInventory ||
                                                                          x.ClassId == ClassId.CDOTA_Unit_SpiritBear) && x.IsAlive && x.Team != Me.Team && x.IsValid).ToList();
            var meepos = ObjectManager.GetEntities <Hero>().Where(x => x.IsControllable && x.IsAlive && x.ClassId == ClassId.CDOTA_Unit_Hero_Meepo).ToList();



            var fount = ObjectManager.GetEntities <Unit>().Where(x => x.Team == Me.Team && x.ClassId == ClassId.CDOTA_Unit_Fountain).ToList();

            //blink = Me.FindItem("item_blink");



            E = ObjectManager.GetEntities <Hero>()
                .Where(x => x.IsAlive && x.Team != Me.Team && !x.IsIllusion)
                .OrderBy(x =>
            {
                var firstOrDefault = meepos.OrderBy(y => GetDistance2D(x.Position, y.Position)).FirstOrDefault();
                if (firstOrDefault != null)
                {
                    return(GetDistance2D(x.Position,
                                         firstOrDefault.Position));
                }
                return(0);
            })
                .FirstOrDefault();


            /**************************************************DODGE*************************************************************/

            var f = ObjectManager.GetEntities <Hero>()
                    .Where(x => x.IsAlive && x.Team == Me.Team && !x.IsIllusion && x.IsControllable && x.ClassId == ClassId.CDOTA_Unit_Hero_Meepo)
                    .OrderBy(x =>
            {
                var firstOrDefault = fount.OrderBy(y => GetDistance2D(x.Position, y.Position)).FirstOrDefault();
                if (firstOrDefault != null)
                {
                    return(GetDistance2D(x.Position,
                                         firstOrDefault.Position));
                }
                return(0);
            })
                    .FirstOrDefault();
            var meeposCount = meepos.Count();
            var q           = new Ability[meeposCount];

            for (var i = 0; i < meeposCount; ++i)
            {
                q[i] = meepos[i].Spellbook.SpellQ;
            }
            var w = new Ability[meeposCount];

            for (var i = 0; i < meeposCount; ++i)
            {
                w[i] = meepos[i].Spellbook.SpellW;
            }
            if (Dodge && Me.IsAlive)
            {
                var baseDota =
                    ObjectManager.GetEntities <Unit>().Where(unit => unit.Name == "npc_dota_base" && unit.Team != Me.Team).ToList();
                if (baseDota != null)
                {
                    for (var t = 0; t < baseDota.Count(); ++t)
                    {
                        for (var i = 0; i < meeposCount; ++i)
                        {
                            var angle = meepos[i].FindAngleBetween(baseDota[t].Position, true);
                            var pos   = new Vector3((float)(baseDota[t].Position.X - 710 * Math.Cos(angle)), (float)(baseDota[t].Position.Y - 710 * Math.Sin(angle)), 0);
                            if (!(meepos[i].Distance2D(baseDota[t]) <= 700) ||
                                meepos[i].HasModifier("modifier_bloodseeker_rupture") ||
                                !Utils.SleepCheck(meepos[i].Handle + "MoveDodge"))
                            {
                                continue;
                            }
                            meepos[i].Move(pos);
                            Utils.Sleep(120, meepos[i].Handle + "MoveDodge");
                            //	Console.WriteLine("Name: " + baseDota[t].Name);
                            //	Console.WriteLine("Speed: " + baseDota[t].Speed);
                            //	Console.WriteLine("ClassId: " + baseDota[t].ClassId);
                            //	Console.WriteLine("Handle: " + baseDota[t].Handle);
                            //	Console.WriteLine("UnitState: " + baseDota[t].UnitState);
                        }
                    }
                }

                var thinker =
                    ObjectManager.GetEntities <Unit>().Where(unit => unit.Name == "npc_dota_thinker" && unit.Team != Me.Team).ToList();
                if (thinker != null)
                {
                    for (var i = 0; i < thinker.Count(); ++i)
                    {
                        for (var j = 0; j < meeposCount; ++j)
                        {
                            var angle = meepos[j].FindAngleBetween(thinker[i].Position, true);
                            var pos   = new Vector3((float)(thinker[i].Position.X - 360 * Math.Cos(angle)), (float)(thinker[i].Position.Y - 360 * Math.Sin(angle)), 0);
                            if (!(meepos[j].Distance2D(thinker[i]) <= 350) ||
                                meepos[j].HasModifier("modifier_bloodseeker_rupture"))
                            {
                                continue;
                            }
                            if (!Utils.SleepCheck(meepos[j].Handle + "MoveDodge"))
                            {
                                continue;
                            }
                            meepos[j].Move(pos);
                            Utils.Sleep(350, meepos[j].Handle + "MoveDodge");
                        }
                    }
                }
                foreach (var v in meepos)
                {
                    if (Utils.SleepCheck(v.Handle + "_move") && v.Health <= v.MaximumHealth / 100 * Menu.Item("healh").GetValue <Slider>().Value &&
                        !v.HasModifier("modifier_bloodseeker_rupture") &&
                        v.Distance2D(fount.First().Position) >= 1000
                        )
                    {
                        v.Move(fount.First().Position);
                        Utils.Sleep(300, v.Handle + "_move");
                    }
                    if (!Activated)
                    {
                        continue;
                    }
                    var angle = v.FindAngleBetween(fount.First().Position, true);
                    var pos   = new Vector3((float)(fount.First().Position.X - 500 * Math.Cos(angle)), (float)(fount.First().Position.Y - 500 * Math.Sin(angle)), 0);

                    if (
                        v.Health >= v.MaximumHealth * 0.58 &&
                        v.Distance2D(fount.First()) <= 400 &&
                        Me.Team == Team.Radiant &&
                        Utils.SleepCheck(v.Handle + "RadMove")
                        )
                    {
                        v.Move(pos);
                        Utils.Sleep(400, v.Handle + "RadMove");
                    }
                    if (!(v.Health >= v.MaximumHealth * 0.58) || !(v.Distance2D(fount.First()) <= 400) ||
                        Me.Team != Team.Dire || !Utils.SleepCheck(v.Handle + "DireMove"))
                    {
                        continue;
                    }
                    v.Move(pos);
                    Utils.Sleep(400, v.Handle + "DireMove");
                }

                for (var i = 0; i < meeposCount; ++i)
                {
                    Travel = meepos[i].FindItem("item_travel_boots") ?? meepos[i].FindItem("item_travel_boots_2");
                    if (w[i] != null &&
                        w[i].CanBeCasted() &&
                        meepos[i].Health <= meepos[i].MaximumHealth
                        / 100 * Menu.Item("healh").GetValue <Slider>().Value &&
                        meepos[i].Handle != f.Handle &&
                        meepos[i].Distance2D(f) >= 700 &&
                        E == null &&
                        meepos[i].Distance2D(fount.First().Position) >= 1500 &&
                        Utils.SleepCheck(meepos[i].Handle + "W"))
                    {
                        w[i].UseAbility(f);
                        Utils.Sleep(1000, meepos[i].Handle + "W");
                    }
                    else if (
                        Travel != null &&
                        Travel.CanBeCasted() &&
                        meepos[i].Health <= meepos[i].MaximumHealth
                        / 100 * Menu.Item("healh").GetValue <Slider>().Value &&
                        (!w[i].CanBeCasted() ||
                         meepos[i].Position.Distance2D(f) >= 1000 ||
                         (w[i].CanBeCasted() &&
                          f.Distance2D(fount.First()) >= 1500)) ||
                        (meepos[i].IsSilenced() ||
                         meepos[i].MovementSpeed <= 280) &&
                        meepos[i].Distance2D(fount.First().Position) >= 1500 &&
                        E == null &&
                        Utils.SleepCheck(meepos[i].Handle + "travel"))
                    {
                        Travel.UseAbility(fount.First().Position);
                        Utils.Sleep(1000, meepos[i].Handle + "travel");
                    }
                    if (meepos[i].HasModifier("modifier_bloodseeker_rupture"))
                    {
                        if (w[i] != null &&
                            w[i].CanBeCasted() &&
                            meepos[i].Handle != f.Handle &&
                            Utils.SleepCheck(meepos[i].Handle + "W"))
                        {
                            w[i].UseAbility(f);
                            Utils.Sleep(500, meepos[i].Handle + "W");
                        }
                        else if (Travel != null && Travel.CanBeCasted() &&
                                 !w[i].CanBeCasted() &&
                                 meepos[i].Distance2D(fount.First().Position) >= 1200 &&
                                 Utils.SleepCheck(meepos[i].Handle + "travel"))
                        {
                            Travel.UseAbility(fount.First().Position);
                            Utils.Sleep(1000, meepos[i].Handle + "travel");
                        }
                    }
                    if (E != null &&
                        q[i] != null &&
                        meepos[i].Health <= meepos[i].MaximumHealth
                        / 100 * Menu.Item("healh").GetValue <Slider>().Value &&
                        q[i].CanBeCasted() &&
                        E.Modifiers.Any(y => y.Name != "modifier_meepo_earthbind") &&
                        !E.IsMagicImmune() &&
                        meepos[i].Distance2D(E) <= q[i].GetCastRange() - 50 &&
                        Utils.SleepCheck(meepos[i].Handle + "_net_casting"))
                    {
                        q[i].CastSkillShot(E);
                        Utils.Sleep(q[i].GetCastDelay(meepos[i], E, true) + 500, meepos[i].Handle + "_net_casting");
                    }
                    else if (!q[i].CanBeCasted() && meepos[i].Health <= meepos[i].MaximumHealth / 100 * Menu.Item("healh").GetValue <Slider>().Value)
                    {
                        // ReSharper disable once LoopVariableIsNeverChangedInsideLoop
                        for (var j = 0; j < meeposCount; ++j)
                        {
                            if (E == null || q[j] == null || meepos[i].Handle == meepos[j].Handle ||
                                !(meepos[j].Position.Distance2D(E) < q[i].GetCastRange()) ||
                                !E.Modifiers.Any(y => y.Name != "modifier_meepo_earthbind") ||
                                !(meepos[j].Position.Distance2D(meepos[i]) < q[j].GetCastRange()) ||
                                E.IsMagicImmune() || !Utils.SleepCheck(meepos[i].Handle + "_net_casting"))
                            {
                                continue;
                            }
                            q[j].CastSkillShot(E);
                            Utils.Sleep(q[j].GetCastDelay(meepos[j], E, true) + 1500, meepos[i].Handle + "_net_casting");
                            break;
                        }
                    }
                    if (E != null &&
                        w[i] != null &&
                        w[i].CanBeCasted() &&
                        meepos[i].Health <= meepos[i].MaximumHealth
                        / 100 * Menu.Item("healh").GetValue <Slider>().Value &&
                        meepos[i].Handle != f.Handle && meepos[i].Distance2D(f) >= 700 &&
                        (meepos[i].Distance2D(E) >= (E.AttackRange + 60) ||
                         meepos[i].MovementSpeed <= 290) &&
                        (q == null || (!q[i].CanBeCasted() ||
                                       E.HasModifier("modifier_meepo_earthbind") ||
                                       !E.IsMagicImmune()) || meepos[i].Distance2D(E) >= 1000) &&
                        meepos[i].Distance2D(fount.First().Position) >= 1100 &&
                        Utils.SleepCheck(meepos[i].Handle + "W"))
                    {
                        w[i].UseAbility(f);
                        Utils.Sleep(1000, meepos[i].Handle + "W");
                    }
                    else if (
                        E != null &&
                        Travel != null &&
                        Travel.CanBeCasted() &&
                        meepos[i].Health <= meepos[i].MaximumHealth
                        / 100 * Menu.Item("healh").GetValue <Slider>().Value &&
                        (!w[i].CanBeCasted() ||
                         meepos[i].Position.Distance2D(f) >= 1000 ||
                         (w[i].CanBeCasted() &&
                          f.Distance2D(fount.First()) >= 2000)) &&
                        (meepos[i].Distance2D(E) >= (E.AttackRange + 60) ||
                         (meepos[i].IsSilenced() ||
                          meepos[i].MovementSpeed <= 290)) &&
                        meepos[i].Distance2D(fount.First().Position) >= 1100 &&
                        Utils.SleepCheck(meepos[i].Handle + "travel"))
                    {
                        Travel.UseAbility(fount.First().Position);
                        Utils.Sleep(1000, meepos[i].Handle + "travel");
                    }
                }
            }
            /**************************************************DODGE*************************************************************/
            /***************************************************POOF*************************************************************/
            if (PoofKey)
            {
                for (var i = 0; i < meeposCount; ++i)
                {
                    for (var j = 0; j < checkObj.Count(); ++j)
                    {
                        if (w[i] == null ||
                            ((!(meepos[i].Distance2D(checkObj[j]) <= 365) || !SafePoof) && (SafePoof)) ||
                            !w[i].CanBeCasted() || (meepos[i].Health < meepos[i].MaximumHealth
                                                    / 100 * Menu.Item("healh").GetValue <Slider>().Value&& Dodge) ||
                            !Utils.SleepCheck(meepos[i].Handle + "Wpos"))
                        {
                            continue;
                        }
                        w[i].UseAbility(meepos[i]);
                        Utils.Sleep(250, meepos[i].Handle + "Wpos");
                    }
                }
            }



            if (PoofAutoMode)
            {
                for (var i = 0; i < meeposCount; i++)
                {
                    var nCreeps = ObjectManager.GetEntities <Unit>().Where(x => (x.ClassId == ClassId.CDOTA_BaseNPC_Creep_Lane ||
                                                                                 x.ClassId == ClassId.CDOTA_BaseNPC_Creep_Siege ||
                                                                                 x.ClassId == ClassId.CDOTA_BaseNPC_Creep ||
                                                                                 x.ClassId == ClassId.CDOTA_BaseNPC_Creep_Neutral) && x.Team != Me.Team && x.IsSpawned && x.IsAlive).Where(x => x.Distance2D(meepos[i]) <= 345).ToList().Count();

                    SliderCountUnit = nCreeps >= (Skills.Item("poofCount").GetValue <Slider>().Value);

                    if (!SliderCountUnit || w[i] == null || !w[i].CanBeCasted() || !meepos[i].CanCast() ||
                        !(meepos[i].Health >= meepos[i].MaximumHealth
                          / 100 * Menu.Item("healh").GetValue <Slider>().Value - 0.05) ||
                        !(meepos[i].Mana >= (meepos[i].MaximumMana
                                             / 100 * Menu.Item("mana").GetValue <Slider>().Value)) ||
                        !Utils.SleepCheck(meepos[i].Handle + "Wpos"))
                    {
                        continue;
                    }
                    w[i].UseAbility(meepos[i]);
                    Utils.Sleep(250, meepos[i].Handle + "Wpos");
                }
            }
            /***************************************************POOF*************************************************************/
            /**************************************************COMBO*************************************************************/
            if (!Activated)
            {
                return;
            }
            {
                for (var i = 0; i < meeposCount; ++i)
                {
                    E = ClosestToMouse(meepos[i]);

                    if (E == null)
                    {
                        return;
                    }
                    InitMeepo = GetClosestToTarget(meepos, E);


                    if (
                        w[i] != null &&
                        meepos[i].CanCast() &&
                        (
                            meepos[i].Handle != f.Handle && f.HasModifier("modifier_fountain_aura_buff") ||
                            meepos[i].Handle == f.Handle && !f.HasModifier("modifier_fountain_aura_buff")
                        ) &&
                        meepos.Count(x => x.Distance2D(meepos[i]) <= 1000) > 1 &&
                        meepos[i].Health >= meepos[i].MaximumHealth * 0.8 &&
                        w[i].CanBeCasted() &&
                        InitMeepo.Distance2D(E) <= 350 &&
                        Utils.SleepCheck(meepos[i].Handle + "poof")
                        )
                    {
                        w[i].UseAbility(E.Position);
                        Utils.Sleep(250, meepos[i].Handle + "poof");
                    }

                    if (Me.HasModifier("modifier_fountain_aura_buff"))
                    {
                        if (
                            Me.Spellbook.SpellW != null &&
                            Me.Spellbook.SpellW.CanBeCasted() &&
                            Me.Health >= Me.MaximumHealth * 0.8 &&
                            meepos.Count(x => x.Distance2D(Me) <= 1000) > 1 &&
                            InitMeepo.Distance2D(E) <= 350 &&
                            Utils.SleepCheck(Me.Handle + "pooff")
                            )
                        {
                            Me.Spellbook.SpellW.UseAbility(E.Position);
                            Utils.Sleep(250, Me.Handle + "pooff");
                        }
                    }
                    //

                    /*int[] cool;
                     *          var core = Me.FindItem("item_octarine_core");
                     *          if (core !=null)
                     *                  cool = new int[4] { 20, 16, 12, 8 };
                     *          else
                     *                  cool = new int[4] { 15, 12, 9, 6 };*/

                    Orchid = Me.FindItem("item_orchid") ?? Me.FindItem("item_bloodthorn");
                    Blink  = meepos[i].FindItem("item_blink");
                    Sheep  = E.ClassId == ClassId.CDOTA_Unit_Hero_Tidehunter ? null : Me.FindItem("item_sheepstick");


                    if (         // sheep
                        Sheep != null &&
                        Sheep.CanBeCasted() &&
                        Me.CanCast() &&
                        !E.IsLinkensProtected() &&
                        !E.IsMagicImmune() &&
                        Me.Distance2D(E) <= 900 &&
                        meepos[i].Distance2D(E) <= 350 &&
                        Utils.SleepCheck("sheep")
                        )
                    {
                        Sheep.UseAbility(E);
                        Utils.Sleep(250, "sheep");
                    }         // sheep Item end

                    if (      // Medall
                        Medall != null &&
                        Medall.CanBeCasted() &&
                        Utils.SleepCheck("Medall") &&
                        meepos[i].Distance2D(E) <= 300 &&
                        Me.Distance2D(E) <= 700
                        )
                    {
                        Medall.UseAbility(E);
                        Utils.Sleep(250, "Medall");
                    }         // Medall Item end
                    if (      // orchid
                        Orchid != null &&
                        Orchid.CanBeCasted() &&
                        Me.CanCast() &&
                        !E.IsLinkensProtected() &&
                        !E.IsMagicImmune() &&
                        meepos[i].Distance2D(E) <= 300 &&
                        Me.Distance2D(E) <= 900 &&
                        Utils.SleepCheck("orchid")
                        )
                    {
                        Orchid.UseAbility(E);
                        Utils.Sleep(250, "orchid");
                    }         // orchid Item end
                    if (Utils.SleepCheck("Q") &&
                        !E.HasModifier("modifier_meepo_earthbind") &&
                        (((!Blink.CanBeCasted() ||
                           Blink == null) &&
                          meepos[i].Distance2D(E) <= q[i].GetCastRange()) ||
                         (Blink.CanBeCasted() &&
                          meepos[i].Distance2D(E) <= 350))
                        )
                    {
                        if (q[i] != null &&
                            (meepos[i].Health >= meepos[i].MaximumHealth
                             / 100 * Menu.Item("healh").GetValue <Slider>().Value ||
                             !Dodge) &&
                            q[i].CanBeCasted() &&
                            !E.IsMagicImmune() &&
                            !meepos[i].IsChanneling() &&
                            meepos[i].Distance2D(E) <= q[i].GetCastRange() &&
                            Utils.SleepCheck(meepos[i].Handle + "_net_casting"))
                        {
                            q[i].CastSkillShot(E);
                            Utils.Sleep(q[i].GetCastDelay(meepos[i], E, true) + 1500, meepos[i].Handle + "_net_casting");
                            Utils.Sleep(1500, "Q");
                        }
                    }

                    if (
                        Blink != null &&
                        Me.CanCast() &&
                        Blink.CanBeCasted() &&
                        Me.Distance2D(E) >= 350 &&
                        Me.Distance2D(E) <= 1150
                        )
                    {
                        if (Blink.CanBeCasted() &&
                            !Menu.Item("blinkDelay").IsActive() &&
                            meepos[i].Health >= meepos[i].MaximumHealth / 100 * Menu.Item("healh").GetValue <Slider>().Value &&
                            Utils.SleepCheck("13"))
                        {
                            Blink.UseAbility(E.Position);
                            Utils.Sleep(200, "13");
                        }

                        Task.Delay(1340 - (int)Game.Ping).ContinueWith(_ =>
                        {
                            if (!Blink.CanBeCasted() || !Menu.Item("blinkDelay").IsActive() ||
                                !Utils.SleepCheck("12"))
                            {
                                return;
                            }
                            Blink.UseAbility(E.Position);
                            Utils.Sleep(200, "12");
                        });
                        for (var j = 0; j < meeposCount; ++j)
                        {
                            if (w[j] == null || meepos[j].Handle == Me.Handle || !meepos[j].CanCast() ||
                                (((f.Handle == meepos[j].Handle || !f.HasModifier("modifier_fountain_aura_buff")) &&
                                  f.HasModifier("modifier_fountain_aura_buff"))) ||
                                meepos[j].Health < meepos[j].MaximumHealth / 100 *
                                Menu.Item("healh").GetValue <Slider>().Value || E.IsMagicImmune() || !w[j].CanBeCasted() ||
                                !Utils.SleepCheck(meepos[j].Handle + "poof"))
                            {
                                continue;
                            }
                            w[j].UseAbility(E.Position);
                            Utils.Sleep(250, meepos[j].Handle + "poof");
                        }
                    }
                    if (
                        meepos[i].Distance2D(E) <= 200 && (!meepos[i].IsAttackImmune() || !E.IsAttackImmune()) &&
                        meepos[i].NetworkActivity != NetworkActivity.Attack && meepos[i].CanAttack() &&
                        meepos[i].Health >= meepos[i].MaximumHealth / 100 * Menu.Item("healh").GetValue <Slider>().Value &&
                        !meepos[i].IsChanneling() &&
                        Utils.SleepCheck(meepos[i].Handle + "Attack")
                        )
                    {
                        meepos[i].Attack(E);
                        Utils.Sleep(180, meepos[i].Handle + "Attack");
                    }
                    else if (((
                                  (!meepos[i].CanAttack() ||
                                   meepos[i].Distance2D(E) >= 0) &&
                                  meepos[i].NetworkActivity != NetworkActivity.Attack &&
                                  meepos[i].Distance2D(E) <= 1000)) &&
                             ((meepos[i].Handle != Me.Handle &&
                               (Blink != null && Blink.CanBeCasted() &&
                                Me.Distance2D(E) <= 350) ||
                               (meepos[i].Handle == Me.Handle &&
                                !Blink.CanBeCasted())) ||
                              Blink == null) &&
                             meepos[i].Health >= meepos[i].MaximumHealth / 100 * Menu.Item("healh").GetValue <Slider>().Value &&
                             !meepos[i].IsChanneling() &&
                             Utils.SleepCheck(meepos[i].Handle + "Move"))
                    {
                        meepos[i].Move(E.Predict(450));
                        Utils.Sleep(250, meepos[i].Handle + "Move");
                    }
                }

                Vail     = Me.FindItem("item_veil_of_discord");
                Shiva    = Me.FindItem("item_shivas_guard");
                Medall   = Me.FindItem("item_medallion_of_courage") ?? Me.FindItem("item_solar_crest");
                Atos     = Me.FindItem("item_rod_of_atos");
                Cheese   = Me.FindItem("item_cheese");
                Abyssal  = Me.FindItem("item_abyssal_blade");
                Dagon    = Me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
                Ethereal = Me.FindItem("item_ethereal_blade");

                E = Toolset.ClosestToMouse(Me);
                if (E == null)
                {
                    return;
                }
                if (         // ethereal
                    Ethereal != null &&
                    Ethereal.CanBeCasted() &&
                    Me.CanCast() &&
                    !E.IsLinkensProtected() &&
                    !E.IsMagicImmune() &&
                    Utils.SleepCheck("ethereal")
                    )
                {
                    Ethereal.UseAbility(E);
                    Utils.Sleep(200, "ethereal");
                }         // ethereal Item end
                if (      // Dagon
                    Me.CanCast() &&
                    Dagon != null &&
                    (Ethereal == null ||
                     (E.HasModifier("modifier_item_ethereal_blade_slow") ||
                      Ethereal.Cooldown < 17)) &&
                    !E.IsLinkensProtected() &&
                    Dagon.CanBeCasted() &&
                    !E.IsMagicImmune() &&
                    Utils.SleepCheck("dagon")
                    )
                {
                    Dagon.UseAbility(E);
                    Utils.Sleep(200, "dagon");
                }         // Dagon Item end
                if (      // vail
                    Vail != null &&
                    Vail.CanBeCasted() &&
                    Me.CanCast() &&
                    !E.IsMagicImmune() &&
                    Me.Distance2D(E) <= 1100 &&
                    Utils.SleepCheck("vail")
                    )
                {
                    Vail.UseAbility(E.Position);
                    Utils.Sleep(250, "vail");
                }         // orchid Item end
                if (      // Shiva Item
                    Shiva != null &&
                    Shiva.CanBeCasted() &&
                    Me.CanCast() &&
                    !E.IsMagicImmune() &&
                    Utils.SleepCheck("shiva") &&
                    Me.Distance2D(E) <= 600
                    )
                {
                    Shiva.UseAbility();
                    Utils.Sleep(250, "shiva");
                }         // Shiva Item end
                if (
                    // cheese
                    Cheese != null &&
                    Cheese.CanBeCasted() &&
                    Me.Health <= (Me.MaximumHealth * 0.3) &&
                    Me.Distance2D(E) <= 700 &&
                    Utils.SleepCheck("cheese")
                    )
                {
                    Cheese.UseAbility();
                    Utils.Sleep(200, "cheese");
                }         // cheese Item end

                if (      // atos Blade
                    Atos != null &&
                    Atos.CanBeCasted() &&
                    Me.CanCast() &&
                    !E.IsLinkensProtected() &&
                    !E.IsMagicImmune() &&
                    Me.Distance2D(E) <= 2000 &&
                    Utils.SleepCheck("atos")
                    )
                {
                    Atos.UseAbility(E);
                    Utils.Sleep(250, "atos");
                }         // atos Item end
                if (Abyssal == null || !Abyssal.CanBeCasted() || !Me.CanCast() || E.IsStunned() || E.IsHexed() ||
                    !Utils.SleepCheck("abyssal") || !(Me.Distance2D(E) <= 300))
                {
                    return;
                }
                Abyssal.UseAbility(E);
                Utils.Sleep(250, "abyssal");
            }
        }