public static void Tinker_In_Madness(EventArgs args)
 {
     if (!Game.IsInGame || Game.IsWatchingGame)
     {
         return;
     }
     me = ObjectMgr.LocalHero;
     if (me == null)
     {
         return;
     }
     if (me.ClassID != ClassID.CDOTA_Unit_Hero_Tinker)
     {
         return;
     }
     if ((Game.IsKeyDown(Menu.Item("Combo Key").GetValue <KeyBind>().Key)) && !Game.IsChatOpen)
     {
         target = me.ClosestToMouseTarget(1000);
         if (target != null && target.IsAlive && !target.IsIllusion && !me.IsChanneling())
         {
             autoattack(true);
             FindItems();
             if (target.IsLinkensProtected())
             {
                 if (euls != null && euls.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(euls.Name))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         euls.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                     }
                 }
                 else if (forcestaff != null && forcestaff.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(forcestaff.Name))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         forcestaff.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                     }
                 }
                 else if (Ethereal != null && Ethereal.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Ethereal.Name))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         Ethereal.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                         Utils.Sleep((me.NetworkPosition.Distance2D(target.NetworkPosition) / 650) * 1000, "TimingToLinkens");
                     }
                 }
                 else if (Laser != null && Laser.CanBeCasted() && Menu.Item("Skills: ").GetValue <AbilityToggler>().IsEnabled(Laser.Name))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         Laser.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                     }
                 }
                 else if (Dagon != null && Dagon.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled("item_dagon"))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         Dagon.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                     }
                 }
                 else if (Hex != null && Hex.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Hex.Name))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         Hex.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                     }
                 }
             }
             else
             {
                 uint elsecount  = 0;
                 bool magicimune = (!target.IsMagicImmune() && !target.Modifiers.Any(x => x.Name == "modifier_eul_cyclone"));
                 if (Utils.SleepCheck("combo"))
                 {
                     // glimmer -> ghost -> soulring -> hex -> laser -> ethereal -> dagon -> rocket -> shivas -> euls -> refresh
                     if (glimmer != null && glimmer.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(glimmer.Name) && Utils.SleepCheck("Rearm"))
                     {
                         glimmer.UseAbility(me);
                     }
                     else
                     {
                         elsecount += 1;
                     }
                     if (ghost != null && Ethereal == null && ghost.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(ghost.Name) && Utils.SleepCheck("Rearm"))
                     {
                         ghost.UseAbility();
                     }
                     else
                     {
                         elsecount += 1;
                     }
                     if (Soulring != null && Soulring.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Soulring.Name) && Utils.SleepCheck("Rearm"))
                     {
                         Soulring.UseAbility();
                     }
                     else
                     {
                         elsecount += 1;
                     }
                     if (Hex != null && Hex.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Hex.Name) && magicimune && Utils.SleepCheck("Rearm"))
                     {
                         Hex.UseAbility(target);
                     }
                     else
                     {
                         elsecount += 1;
                     }
                     if (Laser != null && Laser.CanBeCasted() && Menu.Item("Skills: ").GetValue <AbilityToggler>().IsEnabled(Laser.Name) && magicimune && Utils.SleepCheck("Rearm"))
                     {
                         Laser.UseAbility(target);
                     }
                     else
                     {
                         elsecount += 1;
                     }
                     if (Ethereal != null && Ethereal.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Ethereal.Name) && magicimune && Utils.SleepCheck("Rearm"))
                     {
                         Ethereal.UseAbility(target);
                         if (Utils.SleepCheck("EtherealTime") && me.Distance2D(target) <= Ethereal.CastRange)
                         {
                             Utils.Sleep((me.NetworkPosition.Distance2D(target.NetworkPosition) / 620) * 1000, "EtherealTime");
                         }
                     }
                     else
                     {
                         elsecount += 1;
                     }
                     if (Dagon != null && Dagon.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled("item_dagon") && magicimune && Utils.SleepCheck("Rearm") && Utils.SleepCheck("EtherealTime"))
                     {
                         Dagon.UseAbility(target);
                     }
                     else
                     {
                         elsecount += 1;
                     }
                     if (Rocket != null && Rocket.CanBeCasted() && Menu.Item("Skills: ").GetValue <AbilityToggler>().IsEnabled(Rocket.Name) && magicimune && Utils.SleepCheck("Rearm"))
                     {
                         Rocket.UseAbility();
                         if (Utils.SleepCheck("RocketTime") && me.Distance2D(target) <= Rocket.CastRange)
                         {
                             Utils.Sleep((me.NetworkPosition.Distance2D(target.NetworkPosition) / 600) * 1000, "RocketTime");
                         }
                     }
                     else
                     {
                         elsecount += 1;
                     }
                     if (Shiva != null && Shiva.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Shiva.Name) && magicimune && Utils.SleepCheck("Rearm"))
                     {
                         Shiva.UseAbility();
                     }
                     else
                     {
                         elsecount += 1;
                     }
                     if (elsecount == 9 && euls != null && euls.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(euls.Name) && magicimune && Utils.SleepCheck("Rearm") && Utils.SleepCheck("EtherealTime") && Utils.SleepCheck("RocketTime"))
                     {
                         euls.UseAbility(target);
                     }
                     else
                     {
                         elsecount += 1;
                     }
                     if (elsecount == 10 && Refresh != null && Refresh.CanBeCasted() && Menu.Item("Skills: ").GetValue <AbilityToggler>().IsEnabled(Refresh.Name) && !Refresh.IsChanneling && Utils.SleepCheck("Rearm") && Ready_for_refresh())
                     {
                         Refresh.UseAbility();
                         Utils.Sleep(800, "Rearm");
                     }
                     else
                     {
                         if (!me.IsChanneling() && Utils.SleepCheck("Rearm") && me.Distance2D(target) <= me.AttackRange)
                         {
                             me.Attack(target);
                         }
                     }
                     Utils.Sleep(150, "combo");
                 }
             }
         }
         else
         {
             autoattack(false);
             if (!me.IsChanneling() && Utils.SleepCheck("Rearm"))
             {
                 me.Move(Game.MousePosition);
             }
         }
     }
     else
     {
         autoattack(false);
     }
 }
예제 #2
0
        public static void Game_OnUpdate(EventArgs args)
        {
            me = ObjectMgr.LocalHero;

            if (me == null || !Game.IsInGame || me.ClassID != ClassID.CDOTA_Unit_Hero_Tinker)
            {
                return;
            }

            // Ability init
            Laser   = me.Spellbook.Spell1;
            Rocket  = me.Spellbook.Spell2;
            Refresh = me.Spellbook.Spell4;

            // Item init
            Blink    = me.FindItem("item_blink");
            Dagon    = me.Inventory.Items.FirstOrDefault(item => item.Name.Contains("item_dagon"));
            Hex      = me.FindItem("item_sheepstick");
            Soulring = me.FindItem("item_soul_ring");
            Ethereal = me.FindItem("item_ethereal_blade");
            Veil     = me.FindItem("item_veil_of_discord");
            Orchid   = me.FindItem("item_orchid");
            Shiva    = me.FindItem("item_shivas_guard");

            // Manacost calculations
            var manaForCombo = Laser.ManaCost + Rocket.ManaCost;

            if (Dagon != null && Dagon.CanBeCasted())
            {
                manaForCombo += 180;
            }
            if (Hex != null && Hex.CanBeCasted())
            {
                manaForCombo += 100;
            }
            if (Ethereal != null && Ethereal.CanBeCasted())
            {
                manaForCombo += 150;
            }
            if (Veil != null && Veil.CanBeCasted())
            {
                manaForCombo += 50;
            }
            if (Shiva != null && Shiva.CanBeCasted())
            {
                manaForCombo += 100;
            }

            // Main combo
            if (active && toggle)
            {
                if ((target == null || !target.IsVisible) && !me.IsChanneling())
                {
                    me.Move(Game.MousePosition);
                }

                target = me.ClosestToMouseTarget(1000);
                if (target != null && target.IsAlive && !target.IsIllusion && !target.IsMagicImmune() && Utils.SleepCheck("refresh") && !Refresh.IsChanneling)
                {
                    if (Soulring != null && Soulring.CanBeCasted() && me.Health > 300 && Utils.SleepCheck("soulring"))
                    {
                        Soulring.UseAbility();
                        Utils.Sleep(150 + Game.Ping, "soulring");
                    }

                    // Blink

                    if (Blink != null && Blink.CanBeCasted() && (me.Distance2D(target) > 500) && Utils.SleepCheck("Blink") && blinkToggle)
                    {
                        Blink.UseAbility(target.Position);
                        Utils.Sleep(1000 + Game.Ping, "Blink");
                    }

                    // Items
                    else if (Shiva != null && Shiva.CanBeCasted() && Utils.SleepCheck("shiva"))
                    {
                        Shiva.UseAbility();
                        Utils.Sleep(100 + Game.Ping, "shiva");
                        Utils.ChainStun(me, 200 + Game.Ping, null, false);
                    }

                    else if (Veil != null && Veil.CanBeCasted() && Utils.SleepCheck("veil"))
                    {
                        Veil.UseAbility(target.Position);
                        Utils.Sleep(150 + Game.Ping, "veil");
                        Utils.Sleep(300 + Game.Ping, "ve");
                        Utils.ChainStun(me, 170 + Game.Ping, null, false);
                    }

                    else if (Hex != null && Hex.CanBeCasted() && Utils.SleepCheck("hex"))
                    {
                        Hex.UseAbility(target);
                        Utils.Sleep(150 + Game.Ping, "hex");
                        Utils.Sleep(300 + Game.Ping, "h");
                        Utils.ChainStun(me, 170 + Game.Ping, null, false);
                    }

                    else if (Ethereal != null && Ethereal.CanBeCasted() && Utils.SleepCheck("ethereal"))
                    {
                        Ethereal.UseAbility(target);
                        Utils.Sleep(270 + Game.Ping, "ethereal");
                        Utils.ChainStun(me, 200 + Game.Ping, null, false);
                    }

                    else if (Dagon != null && Dagon.CanBeCasted() && Utils.SleepCheck("ethereal") && Utils.SleepCheck("h") && Utils.SleepCheck("dagon") && Utils.SleepCheck("veil"))
                    {
                        Dagon.UseAbility(target);
                        Utils.Sleep(270 + Game.Ping, "dagon");
                        Utils.ChainStun(me, 200 + Game.Ping, null, false);
                    }

                    // Skills
                    else if (Rocket != null && Rocket.CanBeCasted() && Utils.SleepCheck("rocket") && Utils.SleepCheck("ethereal") && Utils.SleepCheck("veil"))
                    {
                        Rocket.UseAbility();
                        Utils.Sleep(150 + Game.Ping, "rocket");
                        Utils.ChainStun(me, 150 + Game.Ping, null, false);
                    }

                    else if (Laser != null && Laser.CanBeCasted() && Utils.SleepCheck("laser") && Utils.SleepCheck("ethereal") && Utils.SleepCheck("rocket"))
                    {
                        Laser.UseAbility(target);
                        Utils.Sleep(150 + Game.Ping, "laser");
                        Utils.ChainStun(me, 150 + Game.Ping, null, false);
                    }

                    else if (Refresh != null && Refresh.CanBeCasted() && me.Mana > 200 && Utils.SleepCheck("refresh") && !Refresh.IsChanneling && nothingCanCast())
                    {
                        Refresh.UseAbility();
                        Utils.ChainStun(me, (Refresh.ChannelTime * 1000) + Game.Ping + 400, null, false);
                        Utils.Sleep(700 + Game.Ping, "refresh");
                    }

                    else if (!me.IsChanneling() && !Refresh.IsChanneling && nothingCanCast())
                    {
                        me.Attack(target);
                    }
                }
            }
        }
예제 #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);
                        }
                    }
                }
            }
        }
예제 #4
0
 public static void Tinker_In_Madness(EventArgs args)
 {
     if (!Game.IsInGame || Game.IsWatchingGame)
     {
         return;
     }
     me = ObjectMgr.LocalHero;
     if (me == null)
     {
         return;
     }
     if (me.ClassID != ClassID.CDOTA_Unit_Hero_Tinker)
     {
         return;
     }
     //if (Game.IsKeyDown(Menu.Item("Blink On/Off").GetValue<KeyBind>().Key) && !Game.IsChatOpen && Utils.SleepCheck("BLINKTOGGLE"))
     //{
     //    Items["item_blink"] = !Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled("item_blink");
     //    Utils.Sleep(500, "BLINKTOGGLE");
     //}
     //if ((Game.IsKeyDown(Menu.Item("Farm Key").GetValue<KeyBind>().Key)) && !Game.IsChatOpen || (!Utils.SleepCheck("InCombo") && Refresh.IsChanneling))
     //{
     //    FindItems();
     //    autoattack(true);
     //    Vector3 POSMARCH = (Game.MousePosition - me.NetworkPosition) * 10 / Game.MousePosition.Distance2D(me.NetworkPosition) + me.NetworkPosition;
     //    if (stage == 0 && Utils.SleepCheck("FarmRefresh"))
     //    {
     //        if (Blink != null && Blink.CanBeCasted() && Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled(Blink.Name) && Utils.SleepCheck("REFRESHEER") && !Refresh.IsChanneling && Utils.SleepCheck("blink") && Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled("item_blink") && !me.IsChanneling())
     //        {
     //            Blink.UseAbility(Game.MousePosition);
     //            Utils.Sleep(100 - Game.Ping, "blink");
     //        }
     //        if (ghost != null && ghost.CanBeCasted() && !me.IsChanneling() && Menu.Item("Items2: ").GetValue<AbilityToggler>().IsEnabled(ghost.Name) && Utils.SleepCheck("ghost_usage") && Utils.SleepCheck("REFRESHEEER"))
     //        {
     //            ghost.UseAbility(false);
     //            Utils.Sleep(600 - Game.Ping, "ghost_usage");
     //        }
     //        if (Soulring != null && Soulring.CanBeCasted() && !me.IsChanneling() && Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled(Soulring.Name) && Utils.SleepCheck("soul_ring_usage") && Utils.SleepCheck("REFRESHEEER"))
     //        {
     //            Soulring.UseAbility(false);
     //            Utils.Sleep(600 - Game.Ping, "soul_ring_usage");
     //        }
     //        if (bottle != null && bottle.CanBeCasted() && !me.IsChanneling() && !me.Modifiers.Any(x => x.Name == "modifier_bottle_regeneration") && bottle.CurrentCharges >= 0 && Utils.SleepCheck("bottle_CD") && Menu.Item("Items2: ").GetValue<AbilityToggler>().IsEnabled(bottle.Name) && Utils.SleepCheck("REFRESHEEER"))
     //        {
     //            bottle.UseAbility(false);
     //            Utils.Sleep(1000 - Game.Ping, "bottle_CD");
     //        }
     //        if (March != null && March.CanBeCasted() && !me.IsChanneling() && Menu.Item("Skills: ").GetValue<AbilityToggler>().IsEnabled(March.Name) && me.Mana >= March.ManaCost + 75 && Utils.SleepCheck("MarchUsage"))
     //        {
     //            March.UseAbility(POSMARCH, false);
     //            Utils.Sleep(800 - Game.Ping, "MarchUsage");
     //        }
     //        if ((Soulring == null || !Soulring.CanBeCasted() || !Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled(Soulring.Name)) && (!March.CanBeCasted() || March.Level <= 0 || me.Mana <= March.ManaCost + 75 || !Menu.Item("Skills: ").GetValue<AbilityToggler>().IsEnabled(March.Name)) && (Refresh.Level >= 0 && Refresh.CanBeCasted()) && !me.IsChanneling() && Utils.SleepCheck("REFRESHEEER") && Menu.Item("Skills: ").GetValue<AbilityToggler>().IsEnabled(Refresh.Name))
     //        {
     //            Refresh.UseAbility(false);
     //            Utils.Sleep(900 - Game.Ping, "REFRESHEEER");
     //        }
     //        if (Refresh.IsChanneling)
     //        {
     //            stage = 1;
     //            Utils.Sleep(5000 - Game.Ping, "CD_COMBO_FARM");
     //        }
     //        if (me.Mana <= Refresh.ManaCost)
     //            stage = 1;
     //        Utils.Sleep(500 - Game.Ping, "InCombo");
     //    }
     //    if (stage == 1 && Utils.SleepCheck("FarmRefresh"))
     //    {
     //        if (Blink != null && Blink.CanBeCasted() && Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled(Blink.Name) && Utils.SleepCheck("REFRESHEER") && !Refresh.IsChanneling && Utils.SleepCheck("blink") && Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled("item_blink") && !me.IsChanneling())
     //        {
     //            Blink.UseAbility(Game.MousePosition);
     //            Utils.Sleep(300 - Game.Ping, "blink");
     //        }
     //        if (ghost != null && ghost.CanBeCasted() && !me.IsChanneling() && Menu.Item("Items2: ").GetValue<AbilityToggler>().IsEnabled(ghost.Name) && Utils.SleepCheck("REFRESHEEER") && Utils.SleepCheck("ghost_usage"))
     //        {
     //            ghost.UseAbility(false);
     //            Utils.Sleep(600 - Game.Ping, "ghost_usage");
     //        }
     //        if (Soulring != null && Soulring.CanBeCasted() && !me.IsChanneling() && Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled(Soulring.Name) && Utils.SleepCheck("REFRESHEEER") && Utils.SleepCheck("soul_ring_usage"))
     //        {
     //            Soulring.UseAbility(false);
     //            Utils.Sleep(600 - Game.Ping, "soul_ring_usage");
     //        }
     //        if (bottle != null && bottle.CanBeCasted() && !me.IsChanneling() && !me.Modifiers.Any(x => x.Name == "modifier_bottle_regeneration") && bottle.CurrentCharges >= 0 && Utils.SleepCheck("bottle_CD") && Utils.SleepCheck("REFRESHEEER"))
     //        {
     //            bottle.UseAbility();
     //            Utils.Sleep(1000 - Game.Ping, "bottle_CD");
     //        }
     //        if (March != null && March.CanBeCasted() && !me.IsChanneling() && Menu.Item("Skills: ").GetValue<AbilityToggler>().IsEnabled(March.Name) && me.Mana >= March.ManaCost + 75 && Utils.SleepCheck("REFRESHEEER") && Utils.SleepCheck("MarchUsage"))
     //        {
     //            March.UseAbility(POSMARCH);
     //            Utils.Sleep(800 - Game.Ping, "MarchUsage");
     //        }
     //        if ((Soulring == null || !Soulring.CanBeCasted() || !Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled(Soulring.Name)) && (!March.CanBeCasted() || March.Level <= 0 || me.Mana <= March.ManaCost + 75 || !Menu.Item("Skills: ").GetValue<AbilityToggler>().IsEnabled(March.Name)) && Utils.SleepCheck("REFRESHEEER"))
     //        {
     //            if (travel.CanBeCasted() && !me.IsChanneling())
     //            {
     //                if (me.Team == Team.Dire)
     //                    travel.UseAbility(Dire);
     //                if (me.Team == Team.Radiant)
     //                    travel.UseAbility(Radiant);
     //                Utils.Sleep(500 - Game.Ping, "FarmRefresh");
     //            }
     //            if (travel.IsChanneling)
     //                stage = 0;
     //        }
     //    }
     //}
     //else
     //{
     //    autoattack(false);
     //    if (Utils.SleepCheck("CD_COMBO_FARM"))
     //        stage = 0;
     //}
     if ((Game.IsKeyDown(Menu.Item("Smart Blink").GetValue <KeyBind>().Key)) && !Game.IsChatOpen)
     {
         Blink = me.FindItem("item_blink");
         if (Blink != null && Blink.CanBeCasted() && !me.IsChanneling() && !me.Spellbook.Spells.Any(x => x.IsInAbilityPhase) && Utils.SleepCheck("blink"))
         {
             var mousepos = Game.MousePosition;
             Blink.UseAbility(me.Distance2D(mousepos) < 1200 ? mousepos : new Vector3(me.NetworkPosition.X + 1150 * (float)Math.Cos(me.NetworkPosition.ToVector2().FindAngleBetween(mousepos.ToVector2(), true)), me.NetworkPosition.Y + 1150 * (float)Math.Sin(me.NetworkPosition.ToVector2().FindAngleBetween(mousepos.ToVector2(), true)), 100), false);
             Utils.Sleep(200, "blink");
         }
     }
     if ((Game.IsKeyDown(Menu.Item("Combo Key").GetValue <KeyBind>().Key)) && !Game.IsChatOpen)
     {
         target = me.ClosestToMouseTarget(1000);
         if (target != null && target.IsAlive && !target.IsIllusion && !me.IsChanneling() && !me.Spellbook.Spells.Any(x => x.IsInAbilityPhase) && !CanReflectDamage(target))
         {
             autoattack(true);
             FindItems();
             if (target.IsLinkensProtected())
             {
                 if (euls != null && euls.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(euls.Name))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         euls.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                     }
                 }
                 else if (forcestaff != null && forcestaff.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(forcestaff.Name))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         forcestaff.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                     }
                 }
                 else if (Ethereal != null && Ethereal.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Ethereal.Name))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         Ethereal.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                         Utils.Sleep(((me.NetworkPosition.Distance2D(target.NetworkPosition) / 1200) * 1000) + 200, "TimingToLinkens");
                     }
                 }
                 else if (Laser != null && Laser.CanBeCasted() && Menu.Item("Skills: ").GetValue <AbilityToggler>().IsEnabled(Laser.Name))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         Laser.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                     }
                 }
                 else if (Dagon != null && Dagon.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled("item_dagon"))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         Dagon.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                     }
                 }
                 else if (Hex != null && Hex.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Hex.Name))
                 {
                     if (Utils.SleepCheck("TimingToLinkens"))
                     {
                         Hex.UseAbility(target);
                         Utils.Sleep(200, "TimingToLinkens");
                     }
                 }
             }
             else
             {
                 uint   elsecount   = 0;
                 bool   magicimune  = (!target.IsMagicImmune() && !target.Modifiers.Any(x => x.Name == "modifier_eul_cyclone"));
                 uint[] dagondamage = new uint[5] {
                     400, 500, 600, 700, 800
                 };
                 // glimmer -> ghost -> soulring -> hex -> laser -> ethereal -> dagon -> rocket -> shivas -> euls -> refresh
                 //if(Blink != null && Blink.CanBeCasted() && Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled(Blink.Name) && Utils.SleepCheck("Rearm") && !Refresh.IsChanneling && Utils.SleepCheck("blink") && Menu.Item("Items: ").GetValue<AbilityToggler>().IsEnabled("item_blink") && !me.IsChanneling())
                 //{
                 //    Blink.UseAbility(Game.MousePosition);
                 //    Utils.Sleep(300 - Game.Ping, "blink");
                 //}
                 if (glimmer != null && glimmer.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(glimmer.Name) && Utils.SleepCheck("Rearm") && !Refresh.IsChanneling && Utils.SleepCheck("glimmer"))
                 {
                     glimmer.UseAbility(me);
                     Utils.Sleep(200 - Game.Ping, "glimmer");
                 }
                 else
                 {
                     elsecount += 1;
                 }
                 if (veil != null && veil.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(veil.Name) && Utils.SleepCheck("Rearm") && !Refresh.IsChanneling && Utils.SleepCheck("veil"))
                 {
                     veil.UseAbility(target.Position);
                     Utils.Sleep(200, "veil");
                 }
                 if (ghost != null && Ethereal == null && ghost.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(ghost.Name) && Utils.SleepCheck("Rearm") && !Refresh.IsChanneling && Utils.SleepCheck("ghost"))
                 {
                     ghost.UseAbility();
                     Utils.Sleep(200 - Game.Ping, "ghost");
                 }
                 else
                 {
                     elsecount += 1;
                 }
                 if (Soulring != null && Soulring.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Soulring.Name) && Utils.SleepCheck("Rearm") && !Refresh.IsChanneling && Utils.SleepCheck("soulring"))
                 {
                     Soulring.UseAbility();
                     Utils.Sleep(200 - Game.Ping, "soulring");
                 }
                 else
                 {
                     elsecount += 1;
                 }
                 if (Hex != null && Hex.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Hex.Name) && magicimune && Utils.SleepCheck("Rearm") && !Refresh.IsChanneling && Utils.SleepCheck("Hex"))
                 {
                     Hex.UseAbility(target);
                     Utils.Sleep(200 - Game.Ping, "Hex");
                 }
                 else
                 {
                     elsecount += 1;
                 }
                 if (Laser != null && Laser.CanBeCasted() && Menu.Item("Skills: ").GetValue <AbilityToggler>().IsEnabled(Laser.Name) && magicimune && Utils.SleepCheck("Rearm") && !Refresh.IsChanneling && Utils.SleepCheck("laser"))
                 {
                     Utils.Sleep(400 - Game.Ping, "laser");
                     Laser.UseAbility(target);
                 }
                 else
                 {
                     elsecount += 1;
                 }
                 if (Ethereal != null && Ethereal.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Ethereal.Name) && magicimune && Utils.SleepCheck("Rearm") && !Refresh.IsChanneling && Utils.SleepCheck("ethereal") && me.Distance2D(target) <= Ethereal.CastRange && target.Health >= target.DamageTaken(dagondamage[Dagon.Level - 1], DamageType.Magical, me, false, 0, 0, 0))
                 {
                     Ethereal.UseAbility(target);
                     Utils.Sleep(400 - Game.Ping, "Ethereal");
                     if (Utils.SleepCheck("EtherealTime"))
                     {
                         Utils.Sleep(((me.NetworkPosition.Distance2D(target.NetworkPosition) / 1200) * 1000) + 25, "EtherealTime");
                         Utils.Sleep(((me.NetworkPosition.Distance2D(target.NetworkPosition) / 1200) * 1000) + 200, "EtherealTime2");
                     }
                 }
                 else
                 {
                     elsecount += 1;
                 }
                 if (Dagon != null && Dagon.CanBeCasted() && (!Ethereal.CanBeCasted() || target.Health <= target.DamageTaken(dagondamage[Dagon.Level - 1], DamageType.Magical, me, false, 0, 0, 0)) && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled("item_dagon") && magicimune && Utils.SleepCheck("Rearm") && Utils.SleepCheck("EtherealTime") && !Refresh.IsChanneling && Utils.SleepCheck("dagon"))
                 {
                     Dagon.UseAbility(target);
                     Utils.Sleep(350 - Game.Ping, "dagon");
                 }
                 else
                 {
                     elsecount += 1;
                 }
                 if (Rocket != null && Rocket.CanBeCasted() && Menu.Item("Skills: ").GetValue <AbilityToggler>().IsEnabled(Rocket.Name) && magicimune && Utils.SleepCheck("Rearm") && !Refresh.IsChanneling && Utils.SleepCheck("rocket") && me.Distance2D(target) <= Rocket.CastRange)
                 {
                     Rocket.UseAbility();
                     Utils.Sleep(500 - Game.Ping, "rocket");
                     if (Utils.SleepCheck("RocketTime"))
                     {
                         Utils.Sleep(((me.NetworkPosition.Distance2D(target.NetworkPosition) / 900) * 1000), "RocketTime");
                         Utils.Sleep(((me.NetworkPosition.Distance2D(target.NetworkPosition) / 900) * 1000) + 200, "RocketTime2");
                     }
                 }
                 else
                 {
                     elsecount += 1;
                 }
                 if (Shiva != null && Shiva.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Shiva.Name) && magicimune && Utils.SleepCheck("Rearm") && !Refresh.IsChanneling && Utils.SleepCheck("shiva"))
                 {
                     Shiva.UseAbility();
                     Utils.Sleep(200 - Game.Ping, "shiva");
                 }
                 else
                 {
                     elsecount += 1;
                 }
                 if (elsecount == 9 && euls != null && euls.CanBeCasted() && Menu.Item("Items2: ").GetValue <AbilityToggler>().IsEnabled(euls.Name) && magicimune && Utils.SleepCheck("Rearm") && Utils.SleepCheck("EtherealTime2") && Utils.SleepCheck("RocketTime2") && Utils.SleepCheck("euls"))
                 {
                     euls.UseAbility(target);
                     Utils.Sleep(200 - Game.Ping, "euls");
                 }
                 else
                 {
                     elsecount += 1;
                 }
                 if (elsecount == 10 && Refresh != null && Refresh.CanBeCasted() && Menu.Item("Skills: ").GetValue <AbilityToggler>().IsEnabled(Refresh.Name) && !Refresh.IsChanneling && Utils.SleepCheck("Rearm") && Ready_for_refresh())
                 {
                     Refresh.UseAbility();
                     Utils.Sleep(1000, "Rearm");
                 }
                 else
                 {
                     if (!me.IsChanneling() && me.CanAttack() && Utils.SleepCheck("Rearm"))
                     {
                         Orbwalking.Orbwalk(target);
                     }
                 }
             }
         }
         else
         {
             autoattack(false);
             if (!me.IsChanneling() && Utils.SleepCheck("Rearm") && !me.Spellbook.Spells.Any(x => x.IsInAbilityPhase))
             {
                 me.Move(Game.MousePosition);
             }
         }
     }
     else
     {
         autoattack(false);
     }
 }
예제 #5
0
파일: Program.cs 프로젝트: Lat0ur/Ensage-
        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");
                    }
                }
            }
        }
예제 #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");
            }
        }