Esempio n. 1
0
 private static bool nothingCanCast()
 {
     if (!Laser.CanBeCasted() &&
         !Rocket.CanBeCasted() &&
         !Ethereal.CanBeCasted() &&
         !Dagon.CanBeCasted() &&
         !Hex.CanBeCasted() &&
         !Veil.CanBeCasted())
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 2
0
 static bool Ready_for_refresh()
 {
     if ((ghost != null && ghost.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(ghost.Name)) ||
         (Soulring != null && Soulring.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Soulring.Name)) ||
         (Hex != null && Hex.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Hex.Name)) ||
         (Laser != null && Laser.CanBeCasted() && Menu.Item("Skills: ").GetValue <AbilityToggler>().IsEnabled(Laser.Name)) ||
         (Ethereal != null && Ethereal.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Ethereal.Name)) ||
         (Dagon != null && Dagon.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled("item_dagon")) ||
         (Rocket != null && Rocket.CanBeCasted() && Menu.Item("Skills: ").GetValue <AbilityToggler>().IsEnabled(Rocket.Name)) ||
         (Shiva != null && Shiva.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(Shiva.Name)) ||
         (euls != null && euls.CanBeCasted() && Menu.Item("Items: ").GetValue <AbilityToggler>().IsEnabled(euls.Name)))
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
 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);
     }
 }
Esempio n. 4
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);
                    }
                }
            }
        }
 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);
     }
 }