Beispiel #1
0
        private void GameDispatcher_OnIngameUpdate(EventArgs args)
        {
            if (Game.IsPaused || !me.IsAlive)
            {
                return;
            }
            var e = TargetSelector.Active.GetTargets()
                    .FirstOrDefault(x => !x.IsInvulnerable() && x.IsAlive);

            try
            {
                var time = me.GetTurnTime(e);
                cooldown = Orbwalking.AttackOnCooldown(e, (float)time * 1000);
            }
            catch (Exception)
            {
            }
            if (e != null && ExUnit.IsLinkensProtected(e))
            {
                Await.Block("linken", linken);
            }
            if (e != null && me.Health <= me.MaximumHealth / 100 * Config.RHealh.Item.GetValue <Slider>().Value)
            {
                Await.Block("AutoAbilities", AutoAbilities);
            }
            Await.Block("DrawingTargetDisplay", DrawingTargetDisplay);
            Await.Block("DrawingRangeDisplay", DrawingRangeDisplay);
        }
Beispiel #2
0
        private static void OrbWalk(bool canCancel)
        {
            // var modifier = target.Modifiers.FirstOrDefault(x => x.Name == "modifier_ursa_fury_swipes_damage_increase");
            // && UnitDatabase.GetAttackSpeed(me) < 300 && !me.Modifiers.Any(x => x.Name == "modifier_ursa_overpower")
            // var overpowering = me.Modifiers.Any(x => x.Name == "modifier_ursa_overpower");
            var canAttack = !Orbwalking.AttackOnCooldown(target) && !target.IsInvul() && !target.IsAttackImmune() &&
                            me.CanAttack();

            if (canAttack && (targetDistance <= 350))
            {
                if (!Utils.SleepCheck("attack"))
                {
                    return;
                }

                me.Attack(target);
                Utils.Sleep(100, "attack");
                return;
            }

            var canMove = (canCancel && Orbwalking.AttackOnCooldown(target)) ||
                          (!Orbwalking.AttackOnCooldown(target) && targetDistance > 350);

            if (!Utils.SleepCheck("move") || !canMove)
            {
                return;
            }

            var mousePos = Game.MousePosition;

            if (target.Distance2D(me) < 500)
            {
                var pos = target.Position
                          + target.Vector3FromPolarAngle()
                          * (float)
                          Math.Max(
                    (Game.Ping / 1000 + (targetDistance / me.MovementSpeed) + turnTime)
                    * target.MovementSpeed,
                    500);

                // Console.WriteLine(pos.Distance(me.Position) + " " + target.Distance2D(pos));
                if (pos.Distance(me.Position) > target.Distance2D(pos) - 80)
                {
                    me.Move(pos);
                }
                else
                {
                    me.Follow(target);
                }
            }
            else
            {
                me.Move(mousePos);
            }

            Utils.Sleep(100, "move");
        }
Beispiel #3
0
        /// <summary>
        ///     The orb walk.
        /// </summary>
        /// <param name="canCancel">
        ///     The can cancel.
        /// </param>
        private static void OrbWalk(bool canCancel)
        {
            var canAttack = !Orbwalking.AttackOnCooldown(target) && !target.IsInvul() && !target.IsAttackImmune() &&
                            me.CanAttack();

            if (canAttack && (targetDistance <= 350))
            {
                if (!Utils.SleepCheck("attack"))
                {
                    return;
                }

                me.Attack(target);
                Utils.Sleep(100, "attack");
                return;
            }

            var canMove = (canCancel && Orbwalking.AttackOnCooldown(target)) ||
                          (!Orbwalking.AttackOnCooldown(target) && targetDistance > 350);

            if (!Utils.SleepCheck("move") || !canMove)
            {
                return;
            }

            var mousePos = Game.MousePosition;

            if (target.Distance2D(me) < 500)
            {
                var pos = target.Position
                          + target.Vector3FromPolarAngle()
                          * (float)
                          Math.Max(
                    (Game.Ping / 1000 + (targetDistance / me.MovementSpeed) + turnTime)
                    * target.MovementSpeed,
                    500);

                // Console.WriteLine(pos.Distance(me.Position) + " " + target.Distance2D(pos));
                if (pos.Distance(me.Position) > target.Distance2D(pos) - 80)
                {
                    me.Move(pos);
                }
                else
                {
                    me.Follow(target);
                }
            }
            else
            {
                me.Move(mousePos);
            }

            Utils.Sleep(100, "move");
        }
Beispiel #4
0
        /// <summary>
        ///     The check proc.
        /// </summary>
        public void CheckProc()
        {
            if (this.ability.Level <= 0)
            {
                return;
            }

            var onCooldown = Orbwalking.AttackOnCooldown();

            if (this.attacked && !onCooldown)
            {
                this.attacked = false;
            }

            var canCancel = Orbwalking.CanCancelAnimation();

            if (!canCancel || !onCooldown || this.attacked)
            {
                return;
            }

            DelayAction.Add(
                Game.Ping,
                () =>
            {
                if (this.ability.Cooldown > 0)
                {
                    this.unsuccessfulAttackCount = 1;
                }
                else
                {
                    this.unsuccessfulAttackCount += 1;
                }
            });
            this.attacked = true;
        }
Beispiel #5
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!loaded)
            {
                me = ObjectMgr.LocalHero;
                if (!Game.IsInGame || Game.IsWatchingGame || me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_Huskar)
                {
                    return;
                }
                loaded = true;

                // Spells
                spellQ = me.Spellbook.SpellQ;
                spellR = me.Spellbook.SpellR;


                //Aghs = me.FindItem("item_ultimate_scepter");
            }

            if (me == null || !me.IsValid)
            {
                loaded = false;
                me     = ObjectMgr.LocalHero;
                if (rangeDisplay == null)
                {
                    return;
                }
                rangeDisplay = null;
                return;
            }

            if (Game.IsPaused)
            {
                return;
            }

            // Items
            Urn = me.FindItem("item_urn_of_shadows");

            Abyssal = me.FindItem("item_abyssal_blade");

            Blademail = me.FindItem("item_blade_mail");

            Mjollnir = me.FindItem("item_mjollnir");

            Orchid = me.FindItem("item_orchid");

            Halberd = me.FindItem("item_heavens_halberd");

            Satanic = me.FindItem("item_satanic");

            Hex = me.FindItem("item_sheepstick");

            Medallion = me.FindItem("item_medallion_of_courage");

            SolarCrest = me.FindItem("item_solar_crest");

            Blink = me.FindItem("item_blink");

            Armlet = me.FindItem("item_armlet");


            if (rangeDisplay == null)
            {
                rangeDisplay = me.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf");
                lastRange    = me.GetAttackRange() + me.HullRadius + 25;
                rangeDisplay.SetControlPoint(1, new Vector3(lastRange, 0, 0));
            }
            else
            {
                if (lastRange != (me.GetAttackRange() + me.HullRadius + 25))
                {
                    lastRange = me.GetAttackRange() + me.HullRadius + 25;
                    rangeDisplay.Dispose();
                    rangeDisplay = me.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf");
                    rangeDisplay.SetControlPoint(1, new Vector3(lastRange, 0, 0));
                }
            }

            if (target != null && (!target.IsValid || !target.IsVisible || !target.IsAlive || target.Health <= 0))
            {
                target = null;
            }
            var canCancel = Orbwalking.CanCancelAnimation();

            if (canCancel)
            {
                if (target != null && !target.IsVisible && !Orbwalking.AttackOnCooldown(target))
                {
                    target = me.ClosestToMouseTarget();
                }
                else if (target == null || !Orbwalking.AttackOnCooldown(target))
                {
                    var bestAa = me.BestAATarget();
                    if (bestAa != null)
                    {
                        target = me.BestAATarget();
                    }
                }
            }

            if (Game.IsChatOpen)
            {
                return;
            }

            if (Game.IsKeyDown(ComboKey))
            {
                if (Armlet != null && me.CanUseItems())
                {
                    var enemiesInRange =
                        ObjectMgr.GetEntities <Hero>()
                        .Where(x => me.Distance2D(x) <= lastRange && x.IsAlive && x.Team != me.Team).ToList();
                    var projectiles =
                        ObjectMgr.Projectiles.Where(
                            x =>
                            x.Target != null && x.Target == me && (me.Distance2D(x.Position) / x.Speed) * 1000 < 600 / 2.5)
                        .ToList();

                    if (me.Health > 250 && enemiesInRange.Count > 0)
                    {
                        if (!me.IsStunned() && me.IsAlive && !Armlet.IsToggled &&
                            !me.Modifiers.Any(x => x.Name == "modifier_item_armlet_unholy_strength") &&
                            Utils.SleepCheck("Armlet"))
                        {
//                            Console.WriteLine("Activating Armlet!");
                            Armlet.ToggleAbility();
                            Utils.Sleep(100 + Game.Ping, "Armlet");
                        }
                    }
                    else if (me.Health > 250 && enemiesInRange.Count < 1 && !me.IsStunned() && Armlet.IsToggled &&
                             Utils.SleepCheck("Armlet") &&
                             me.Modifiers.Any(x => x.Name == "modifier_item_armlet_unholy_strength"))
                    {
//                        Console.WriteLine("Deactivating Armlet!");
                        Armlet.ToggleAbility();
                        Utils.Sleep(100 + Game.Ping, "Armlet");
                    }
                    else if (me.Health < 250 && projectiles.Any() && Armlet.IsToggled && !me.IsStunned() &&
                             Utils.SleepCheck("Armlet"))
                    {
//                        Console.WriteLine("Toggling armlet!");
                        Armlet.ToggleAbility();
                        Armlet.ToggleAbility();
                        Utils.Sleep(100 + Game.Ping, "Armlet");
                    }
                }

                if (target != null)
                {
                    turnTime = me.GetTurnTime(target);

                    if (Blink != null && Blink.CanBeCasted() && me.Distance2D(target) <= Blink.CastRange &&
                        Utils.SleepCheck("Blink") &&
                        target != null)
                    {
                        Blink.UseAbility(target.Position);
                        Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "Blink");
                    }

                    if (spellR.CanBeCasted(target) && me.Distance2D(target) <= spellR.CastRange && Utils.SleepCheck("R") &&
                        target != null && target.Health > (target.MaximumHealth * 0.5) && !target.IsMagicImmune())
                    {
                        spellR.UseAbility(target);
                        Utils.Sleep(LifebreakCastTime + Game.Ping, "R");
                    }

                    if (Abyssal != null && Abyssal.CanBeCasted(target) && me.Distance2D(target) <= Abyssal.CastRange &&
                        Utils.SleepCheck("abyssal") && target != null)
                    {
                        var canUse = Utils.ChainStun(target, turnTime + 0.1 + Game.Ping / 1000, null, false);
                        if (canUse)
                        {
                            Abyssal.UseAbility(target);
                            Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "abyssal");
                        }
                    }

                    if (Hex != null && Hex.CanBeCasted(target) && me.Distance2D(target) <= (Hex.CastRange) &&
                        Utils.SleepCheck("hex") &&
                        target != null)
                    {
                        var canUse = Utils.ChainStun(target, turnTime + 0.1 + Game.Ping / 1000, null, false);
                        if (canUse)
                        {
                            Hex.UseAbility(target);
                            Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "hex");
                        }
                    }

                    if (Urn != null && Urn.CanBeCasted(target) && me.Distance2D(target) <= Urn.CastRange &&
                        Urn.CurrentCharges >= 1 &&
                        Utils.SleepCheck("Urn") && target != null &&
                        target.Modifiers.All(x => x.Name != "modifier_item_urn_heal"))
                    {
                        Urn.UseAbility(target);
                        Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "Urn");
                    }

                    if (Medallion != null && Medallion.CanBeCasted(target) &&
                        me.Distance2D(target) <= Medallion.CastRange &&
                        Utils.SleepCheck("Medallion") && target != null)
                    {
                        Medallion.UseAbility(target);
                        Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "Medallion");
                    }

                    if (SolarCrest != null && SolarCrest.CanBeCasted(target) &&
                        me.Distance2D(target) <= SolarCrest.CastRange &&
                        Utils.SleepCheck("SolarCrest") && target != null)
                    {
                        SolarCrest.UseAbility(target);
                        Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "SolarCrest");
                    }

                    if (Blademail != null && Blademail.CanBeCasted() && me.Distance2D(target) < target.AttackRange &&
                        Utils.SleepCheck("Blademail") && target != null)
                    {
                        Blademail.UseAbility();
                        Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "Blademail");
                    }

                    if (Mjollnir != null && Mjollnir.CanBeCasted(me) && target.IsValid &&
                        me.Distance2D(target) <= spellR.CastRange &&
                        Utils.SleepCheck("Mjollnir") && target != null)
                    {
                        Mjollnir.UseAbility(me);
                        Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "Mjollnir");
                    }

                    if (Orchid != null && Orchid.CanBeCasted(target) && me.Distance2D(target) <= Orchid.CastRange &&
                        Utils.SleepCheck("Orchid") && target != null)
                    {
                        Orchid.UseAbility(target);
                        Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "Orchid");
                    }

                    if (Halberd != null && Halberd.CanBeCasted(target) && me.Distance2D(target) <= Halberd.CastRange &&
                        (!target.IsHexed() && !target.IsStunned() && !target.IsDisarmed()) &&
                        Utils.SleepCheck("Halberd") && target != null)
                    {
                        Halberd.UseAbility(target);
                        Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "Halberd");
                    }

                    if (Satanic != null && Satanic.CanBeCasted() && me.Health <= (me.MaximumHealth * 0.20) &&
                        me.Distance2D(target) <= lastRange)
                    {
                        Satanic.UseAbility();
                    }

                    if (spellQ.CanBeCasted() && me.Health <= (me.MaximumHealth * 0.4) && Utils.SleepCheck("Q"))
                    {
                        spellQ.UseAbility(me);
                        Utils.Sleep(InnervitalityCastTime + Game.Ping, "Q");
                    }
                }
                if (target != null && target.IsMagicImmune())
                {
                    Orbwalking.Orbwalk(target, Game.Ping);
                }
                else if (target == null || !target.IsMagicImmune())
                {
                    Orbwalking.Orbwalk(target, Game.Ping, attackmodifiers: true);
                }
            }
        }
Beispiel #6
0
 public static bool Cast(
     Ability ability,
     Unit target,
     Unit buffTarget,
     string name,
     List <Modifier> modifiers,
     bool togglearmlet = false)
 {
     if (name == "item_armlet")
     {
         if (buffTarget.Modifiers.Any(x => x.Name == "modifier_ice_blast"))
         {
             return(false);
         }
         if (!togglearmlet && buffTarget.Distance2D(target) > Math.Max(target.GetAttackRange(), 500))
         {
             return(false);
         }
         var armlettoggled = modifiers.Any(x => x.Name == "modifier_item_armlet_unholy_strength") &&
                             ability.IsToggled;
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         if (armlettoggled)
         {
             ability.ToggleAbility();
             ability.ToggleAbility();
             return(true);
         }
         ability.ToggleAbility();
         return(true);
     }
     if (!(buffTarget.Distance2D(target) < MyHeroInfo.AttackRange() + 150))
     {
         return(false);
     }
     SoulRing.Cast(ability);
     if (ability.Name == "templar_assassin_refraction")
     {
         var meld = AbilityMain.Me.Spellbook.Spell2;
         if (meld != null && meld.CanBeCasted())
         {
             if (
                 !(target.Distance2D(MyHeroInfo.Position)
                   < (AbilityMain.Me.GetAttackRange() + 50 + target.HullRadius + AbilityMain.Me.HullRadius)) ||
                 Orbwalking.AttackOnCooldown(target) || AbilityMain.Me.IsAttacking() ||
                 (target.Predict(Game.Ping).Distance2D(MyHeroInfo.Position)
                  > (AbilityMain.Me.GetAttackRange() + 50 + target.HullRadius + AbilityMain.Me.HullRadius)) ||
                 !Utils.SleepCheck("GlobalCasting"))
             {
                 return(false);
             }
             Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
             ManageAutoAttack.AutoAttackDisabled = true;
             ability.UseAbility();
             if (Nuke.Cast(meld, target, NameManager.Name(meld)))
             {
                 DelayAction.Add(
                     new DelayActionItem(
                         (int)meld.GetCastDelay(AbilityMain.Me, target) * 1000 + 100,
                         () =>
                 {
                     AbilityMain.Me.Attack(target);
                 },
                         CancellationToken.None));
             }
             Utils.Sleep(meld.GetCastDelay(AbilityMain.Me, target) * 1000, "GlobalCasting");
             Utils.Sleep(meld.GetHitDelay(target, name) * 1000 + 200, "casting");
             Utils.Sleep(meld.GetHitDelay(target, name) * 1000 + 200, ability.Handle.ToString());
             return(true);
         }
     }
     if (ability.IsAbilityBehavior(AbilityBehavior.NoTarget, name))
     {
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         ability.UseAbility();
         return(true);
     }
     Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
     ManageAutoAttack.AutoAttackDisabled = true;
     ability.UseAbility(buffTarget);
     return(true);
 }
Beispiel #7
0
        public static void Game_OnUpdate(EventArgs args)
        {
            if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame)
            {
                return;
            }

            me = ObjectMgr.LocalHero;
            if (me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_Obsidian_Destroyer)
            {
                return;
            }

            if (astral == null)
            {
                astral = me.Spellbook.SpellW;
            }

            if (eclipse == null)
            {
                eclipse = me.Spellbook.SpellR;
            }


            if (bkb == null)
            {
                bkb = me.FindItem("item_black_king_bar");
            }

            if (orb == null)
            {
                orb = me.Spellbook.Spell1;
            }

            if (hex == null)
            {
                hex = me.FindItem("item_sheepstick");
            }

            if (orchid == null)
            {
                orchid = me.FindItem("item_orchid");
            }

            if (shiva == null)
            {
                shiva = me.FindItem("item_shivas_guard");
            }

            if (atos == null)
            {
                atos = me.FindItem("item_rod_of_atos");
            }
            if (atos == null)
            {
                atos = me.FindItem("item_bloodthorn");
            }

            if (!menuvalueSet)
            {
                menuValue    = Menu.Item("Items").GetValue <AbilityToggler>();
                menuvalueSet = true;
            }


            if (Combo)
            {
                var ctm  = Targeting.SelectedIndex != 2 || Targeting.SelectedIndex != 1 || Targeting.SelectedIndex != 3;
                var hhp  = Targeting.SelectedIndex != 0 || Targeting.SelectedIndex != 2 || Targeting.SelectedIndex != 3;
                var hi   = Targeting.SelectedIndex != 1 || Targeting.SelectedIndex != 0 || Targeting.SelectedIndex != 3;
                var baat = Targeting.SelectedIndex != 0 || Targeting.SelectedIndex != 1 || Targeting.SelectedIndex != 2;

                if (ctm)
                {
                    target = me.ClosestToMouseTarget(1000);
                }

                else if (hhp)
                {
                    target = TargetSelector.HighestHealthPointsTarget(me, 600);
                }

                else if (hi)
                {
                    target = HighestInt(me);
                }

                else if (baat)
                {
                    target = me.BestAATarget();
                }

                //orbwalk
                if (target != null && (!target.IsValid || !target.IsVisible || !target.IsAlive || target.Health <= 0))
                {
                    target = null;
                }
                var canCancel = Orbwalking.CanCancelAnimation();
                if (canCancel)
                {
                    if (target != null && !target.IsVisible && !Orbwalking.AttackOnCooldown(target))
                    {
                        target = me.ClosestToMouseTarget();
                    }
                }
                if (target != null && target.IsAlive && !target.IsInvul() && !target.IsIllusion)
                {
                    var targetDistance = me.Distance2D(target);
                    if (me.CanAttack() && me.CanCast())
                    {
                        if (orb != null && orb.IsValid && orb.CanBeCasted() && me.CanCast() && Utils.SleepCheck("orb") && !target.UnitState.HasFlag(UnitState.MagicImmune))
                        {
                            orb.UseAbility(target);
                            Utils.Sleep(50, "orb");
                        }
                    }

                    if (atos != null && atos.IsValid && atos.CanBeCasted() && Utils.SleepCheck("atos") && menuValue.IsEnabled(atos.Name))
                    {
                        atos.UseAbility(target);
                        Utils.Sleep(50 + Game.Ping, "atos");
                    }

                    if (shiva != null && shiva.IsValid && shiva.CanBeCasted() && Utils.SleepCheck("shiva") && menuValue.IsEnabled(shiva.Name))
                    {
                        atos.UseAbility(target);
                        Utils.Sleep(50 + Game.Ping, "shiva");
                    }

                    if (!(targetDistance <= me.AttackRange))
                    {
                        return;
                    }
                    if (bkb != null && bkb.IsValid && bkb.CanBeCasted() && Utils.SleepCheck("bkb") && menuValue.IsEnabled(bkb.Name))
                    {
                        bkb.UseAbility();
                        Utils.Sleep(150 + Game.Ping, "bkb");
                    }

                    if (hex != null && hex.IsValid && hex.CanBeCasted() && Utils.SleepCheck("hex") && menuValue.IsEnabled(hex.Name))
                    {
                        hex.CastStun(target);
                        Utils.Sleep(250 + Game.Ping, "hex");
                        return;
                    }

                    if (orchid != null && orchid.IsValid && orchid.CanBeCasted() && Utils.SleepCheck("orchid") && menuValue.IsEnabled(orchid.Name))
                    {
                        orchid.CastStun(target);
                        Utils.Sleep(250 + Game.Ping, "orchid");
                        return;
                    }

                    if (bloodthorn != null && bloodthorn.IsValid && bloodthorn.CanBeCasted() && Utils.SleepCheck("bloodthorn") && menuValue.IsEnabled(bloodthorn.Name))
                    {
                        bloodthorn.CastStun(target);
                        Utils.Sleep(250 + Game.Ping, "bloodthorn");
                        return;
                    }

                    if (orb == null || orb.CanBeCasted() || !Utils.SleepCheck("orb") ||
                        !Menu.Item("orbwalkk").GetValue <bool>() || !(targetDistance <= me.AttackRange))
                    {
                    }
                    else
                    {
                        Orbwalking.Orbwalk(target);
                        Utils.Sleep(Game.Ping + 150, "orb");
                    }

                    if (me.IsAttacking() || !(targetDistance >= me.AttackRange) ||
                        !Utils.SleepCheck("follow"))
                    {
                        return;
                    }
                    me.Move(Game.MousePosition);
                    Utils.Sleep(150 + Game.Ping, "follow");
                }
                else if (!orb.CanBeCasted() && Utils.SleepCheck("orb") && target != null && target.UnitState.HasFlag(UnitState.MagicImmune))
                {
                    me.Attack(target);
                    Utils.Sleep(150, "noorb");
                }
                else
                {
                    me.Move(Game.MousePosition);
                }
            }
        }
Beispiel #8
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!loaded)
            {
                //Orbwalking.Load();
                me = ObjectMgr.LocalHero;
                if (!Game.IsInGame || me == null)
                {
                    return;
                }
                loaded = true;
                Game.PrintMessage(
                    "<font face='Tahoma'><font color='#000000'>[--</font> <font color='#33ff66'>Orbwalker</font> by <font color='#999999'>MOON</font><font color='#ff9900'>ES</font> loaded! <font color='#000000'>--]</font></font>",
                    MessageType.LogMessage);
            }

            if (me == null || !me.IsValid)
            {
                //Orbwalking.Load();
                loaded = false;
                me     = ObjectMgr.LocalHero;
                if (rangeDisplay == null)
                {
                    return;
                }
                rangeDisplay = null;
                return;
            }

            if (Game.IsPaused)
            {
                return;
            }

            if (rangeDisplay == null)
            {
                rangeDisplay = me.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf");
                lastRange    = me.GetAttackRange() + me.HullRadius + 25;
                rangeDisplay.SetControlPoint(1, new Vector3(lastRange, 0, 0));
            }
            else
            {
                if (lastRange != (me.GetAttackRange() + me.HullRadius + 25))
                {
                    lastRange = me.GetAttackRange() + me.HullRadius + 25;
                    rangeDisplay.Dispose();
                    rangeDisplay = me.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf");
                    rangeDisplay.SetControlPoint(1, new Vector3(lastRange, 0, 0));
                }
            }
            if (target != null && (!target.IsValid || !target.IsVisible || !target.IsAlive || target.Health <= 0))
            {
                target = null;
            }
            var canCancel = Orbwalking.CanCancelAnimation();

            if (canCancel)
            {
                if (target != null && !target.IsVisible && !Orbwalking.AttackOnCooldown(target))
                {
                    target = me.ClosestToMouseTarget(128);
                }
                else if (target == null || !Orbwalking.AttackOnCooldown(target))
                {
                    var bestAa = me.BestAATarget();
                    if (bestAa != null)
                    {
                        target = me.BestAATarget();
                    }
                }
                if (Game.IsKeyDown(Menu.Item("farmKey").GetValue <KeyBind>().Key) &&
                    (creepTarget == null || !creepTarget.IsValid || !creepTarget.IsVisible || !creepTarget.IsAlive ||
                     creepTarget.Health <= 0 || !Orbwalking.AttackOnCooldown(creepTarget)))
                {
                    creepTarget = TargetSelector.GetLowestHPCreep(me);
                }
            }

            if (Game.IsChatOpen)
            {
                return;
            }

            if (Game.IsKeyDown(Menu.Item("farmKey").GetValue <KeyBind>().Key))
            {
                Orbwalking.Orbwalk(creepTarget);
            }
            if (Game.IsKeyDown(Menu.Item("chaseKey").GetValue <KeyBind>().Key))
            {
                Orbwalking.Orbwalk(target, attackmodifiers: true);
            }
            if (Game.IsKeyDown(Menu.Item("kiteKey").GetValue <KeyBind>().Key))
            {
                Orbwalking.Orbwalk(
                    target,
                    attackmodifiers: true,
                    bonusWindupMs: Menu.Item("bonusWindup").GetValue <Slider>().Value);
            }
        }
Beispiel #9
0
        /// <summary>
        ///     The game_ on update.
        /// </summary>
        /// <param name="args">
        ///     The args.
        /// </param>
        private static void Game_OnUpdate(EventArgs args)
        {
            RangeDisplay.Me();

            if (Game.IsPaused)
            {
                return;
            }

            if (RangeDisplay.IsDisposed())
            {
                if (me.IsAlive)
                {
                    RangeDisplay.Create();
                }
            }
            else
            {
                if (!me.IsAlive)
                {
                    RangeDisplay.Dispose();
                }
                else if (!RangeDisplay.IsUpdated())
                {
                    RangeDisplay.Update();
                }
            }

            if (target != null && (!target.IsValid || !target.IsVisible || !target.IsAlive || target.Health <= 0))
            {
                target = null;
            }

            var canCancel = Orbwalking.CanCancelAnimation();
            var cd        = false;

            if (creepTarget != null && creepTarget.IsValid)
            {
                cd = Orbwalking.AttackOnCooldown(creepTarget);
            }

            if (target != null && target.IsValid && !Game.IsKeyDown(Menu.Item("farmKey").GetValue <KeyBind>().Key))
            {
                cd = Orbwalking.AttackOnCooldown(target);
            }

            if (canCancel || !cd)
            {
                if (Utils.SleepCheck("Orbwalker.Update.Target"))
                {
                    if (Game.IsKeyDown(Menu.Item("allUnitsChaseKey").GetValue <KeyBind>().Key))
                    {
                        target = me.ClosestToMouseTarget(500);
                    }
                    else if (target != null && !target.IsVisible)
                    {
                        target = me.ClosestToMouseTarget(128);
                    }
                    else if (target == null)
                    {
                        var bestAa = me.BestAATarget();
                        if (bestAa != null)
                        {
                            target = me.BestAATarget();
                        }
                    }

                    Utils.Sleep(500, "Orbwalker.Update.Target");
                }

                if (!Game.IsChatOpen && Game.IsKeyDown(Menu.Item("farmKey").GetValue <KeyBind>().Key) &&
                    (creepTarget == null || !creepTarget.IsValid || !creepTarget.IsAlive || !creepTarget.IsVisible ||
                     Utils.SleepCheck("Orbwalker.Update.Creep")))
                {
                    creepTarget =
                        Creeps.All.Where(
                            x => x.IsValid && x.Team != me.Team && x.Distance2D(me) < me.GetAttackRange() + 150)
                        .MinOrDefault(x => x.Health + x.Distance2D(me));
                    Utils.Sleep(200, "Orbwalker.Update.Creep");
                }
            }

            if (Game.IsChatOpen)
            {
                return;
            }

            if (Game.IsKeyDown(Menu.Item("allUnitsChaseKey").GetValue <KeyBind>().Key))
            {
                Orbwalking.Orbwalk(target, attackmodifiers: true);
                foreach (var unit in controllableUnits.Units.Where(x => !x.Equals(me) && x.IsValid && x.IsAlive))
                {
                    orb unitOrbwalker;
                    if (!orbwalkerDictionary.TryGetValue(unit.Handle, out unitOrbwalker))
                    {
                        unitOrbwalker = new orb(unit);
                        orbwalkerDictionary.Add(unit.Handle, unitOrbwalker);
                    }

                    var position = Game.MousePosition;
                    if (target != null)
                    {
                        position = Game.MousePosition.Extend(
                            target.Position,
                            (float)(Game.MousePosition.Distance2D(target) * 0.7));
                    }

                    unitOrbwalker.OrbwalkOn(target, position);
                }

                return;
            }

            if (Game.IsKeyDown(Menu.Item("farmKey").GetValue <KeyBind>().Key))
            {
                Orbwalking.Orbwalk(creepTarget);
                return;
            }

            if (Game.IsKeyDown(Menu.Item("chaseKey").GetValue <KeyBind>().Key))
            {
                Orbwalking.Orbwalk(target, attackmodifiers: true);
                return;
            }

            if (Game.IsKeyDown(Menu.Item("kiteKey").GetValue <KeyBind>().Key))
            {
                Orbwalking.Orbwalk(
                    target,
                    attackmodifiers: true,
                    bonusWindupMs: Menu.Item("bonusWindup").GetValue <Slider>().Value);
            }
        }
Beispiel #10
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!loaded)
            {
                me = ObjectMgr.LocalHero;
                if (!Game.IsInGame || me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_Ursa)
                {
                    return;
                }
                earthshock   = me.Spellbook.Spell1;
                overpower    = me.Spellbook.SpellW;
                enrage       = me.FindSpell("ursa_enrage");
                blink        = me.FindItem("item_blink");
                abyssalBlade = me.FindItem("item_abyssal_blade");
                scytheOfVyse = me.FindItem("item_sheepstick");
                loaded       = true;
            }

            if (!Game.IsInGame || me == null)
            {
                overpowerCastPoint  = 0;
                earthshockCastPoint = 0;
                loaded       = false;
                me           = null;
                target       = null;
                earthshock   = null;
                overpower    = null;
                enrage       = null;
                abyssalBlade = null;
                scytheOfVyse = null;
                blink        = null;
                return;
            }

            if (Game.IsPaused)
            {
                return;
            }

            if (blink == null)
            {
                blink = me.FindItem("item_blink");
            }

            if (abyssalBlade == null)
            {
                abyssalBlade = me.FindItem("item_abyssal_blade");
            }

            if (abyssalBlade == null)
            {
                abyssalBlade = me.FindItem("item_sheepstick");
            }

            if (earthshock == null)
            {
                earthshock = me.Spellbook.Spell1;
            }
            else if (earthshockCastPoint == 0)
            {
                earthshockCastPoint = 0.3;
            }

            if (overpower == null)
            {
                overpower = me.Spellbook.SpellW;
            }
            else if (overpowerCastPoint == 0)
            {
                overpowerCastPoint = 0.3;
            }

            if (enrage == null)
            {
                enrage = me.FindSpell("ursa_enrage");
            }

            if (!Game.IsKeyDown(Key.Space) || Game.IsChatOpen)
            {
                target = null;
                return;
            }
            if (Utils.SleepCheck("blink"))
            {
                mePosition = me.Position;
            }
            if (earthshock.IsInAbilityPhase && (target == null || !target.IsAlive || target.Distance2D(me) > earthshock.AbilityData.FirstOrDefault(x => x.Name == "shock_radius").GetValue(0)))
            {
                me.Stop();
                if (target != null)
                {
                    me.Attack(target);
                }
            }
            if (overpower.IsInAbilityPhase && (target == null || !target.IsAlive))
            {
                me.Stop();
                if (target != null)
                {
                    me.Attack(target);
                }
            }
            var range         = 1000f;
            var mousePosition = Game.MousePosition;

            if (blink != null)
            {
                blinkRange = blink.AbilityData.FirstOrDefault(x => x.Name == "blink_range").GetValue(0);
                range      = blinkRange + me.HullRadius + 500;
            }
            var canCancel = (Orbwalking.CanCancelAnimation() && Orbwalking.AttackOnCooldown(target)) ||
                            (!Orbwalking.AttackOnCooldown(target) &&
                             (targetDistance > 350 || (target != null && !target.IsVisible))) || target == null;

            if (canCancel)
            {
                if (target != null && !target.IsVisible)
                {
                    var closestToMouse = me.ClosestToMouseTarget(128);
                    if (closestToMouse != null)
                    {
                        target = me.ClosestToMouseTarget(range);
                    }
                }
                else
                {
                    target = me.ClosestToMouseTarget(range);
                }
            }
            if (target == null || !target.IsAlive || ((!target.IsVisible ||
                                                       target.Distance2D(mousePosition) > target.Distance2D(me) + 1000) && canCancel))
            {
                if (!Utils.SleepCheck("move"))
                {
                    return;
                }
                me.Move(mousePosition);
                Utils.Sleep(100, "move");
                return;
            }
            targetDistance = mePosition.Distance2D(target);
            hullsum        = (me.HullRadius + target.HullRadius) * 2;
            turnTime       = me.GetTurnTime(target);
            var casting = CastCombo();

            if (casting)
            {
                return;
            }
            if (!Utils.SleepCheck("casting"))
            {
                return;
            }
            OrbWalk(Orbwalking.CanCancelAnimation());
        }
Beispiel #11
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!loaded)
            {
                me = ObjectMgr.LocalHero;
                if (!Game.IsInGame || me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_Ursa)
                {
                    return;
                }
                earthshock   = me.Spellbook.Spell1;
                overpower    = me.Spellbook.SpellW;
                enrage       = me.FindSpell("ursa_enrage");
                blink        = me.FindItem("item_blink");
                abyssalBlade = me.FindItem("item_abyssal_blade");
                scytheOfVyse = me.FindItem("item_sheepstick");
                loaded       = true;
                Game.PrintMessage(
                    "<font color='#3377ff'>UrsaRage</font>: GL HF <font face='Tahoma' size='9'>(GUYS<font color='#ff9900'></font>)</font>",
                    MessageType.ChatMessage);
            }

            if (!Game.IsInGame || me == null)
            {
                overpowerCastPoint  = 0;
                earthshockCastPoint = 0;
                loaded       = false;
                me           = null;
                target       = null;
                earthshock   = null;
                overpower    = null;
                enrage       = null;
                abyssalBlade = null;
                scytheOfVyse = null;
                blink        = null;
                return;
            }

            if (!menuvalueSet)
            {
                menuValue    = Menu.Item("enabledAbilities").GetValue <AbilityToggler>();
                menuvalueSet = true;
                //Utils.Sleep(100000, "updateMenuValue");
            }

            if (Game.IsPaused)
            {
                return;
            }

            if (blink == null)
            {
                blink = me.FindItem("item_blink");
            }

            if (abyssalBlade == null)
            {
                abyssalBlade = me.FindItem("item_abyssal_blade");
            }

            if (abyssalBlade == null)
            {
                abyssalBlade = me.FindItem("item_sheepstick");
            }

            if (earthshock == null)
            {
                earthshock = me.Spellbook.Spell1;
            }
            else if (earthshockCastPoint == 0)
            {
                earthshockCastPoint = 0.3;
            }

            if (overpower == null)
            {
                overpower = me.Spellbook.SpellW;
            }
            else if (overpowerCastPoint == 0)
            {
                overpowerCastPoint = 0.3;
            }

            if (enrage == null)
            {
                enrage = me.FindSpell("ursa_enrage");
            }

            if (!Menu.Item("comboKey").GetValue <KeyBind>().Active || Game.IsChatOpen)
            {
                target = null;
                return;
            }
            if (Utils.SleepCheck("blink"))
            {
                mePosition = me.Position;
            }
            if (earthshock.IsInAbilityPhase &&
                (target == null || !target.IsAlive ||
                 target.Distance2D(me) > earthshock.GetAbilityData("shock_radius")))
            {
                me.Stop();
                if (target != null)
                {
                    me.Attack(target);
                }
            }
            if (overpower.IsInAbilityPhase && (target == null || !target.IsAlive))
            {
                me.Stop();
                if (target != null)
                {
                    me.Attack(target);
                }
            }
            var range         = 1000f;
            var mousePosition = Game.MousePosition;

            if (blink != null)
            {
                blinkRange = blink.AbilityData.FirstOrDefault(x => x.Name == "blink_range").GetValue(0);
                range      = blinkRange + me.HullRadius + 500;
            }
            var canCancel = (Orbwalking.CanCancelAnimation() && Orbwalking.AttackOnCooldown(target)) ||
                            (!Orbwalking.AttackOnCooldown(target) &&
                             (targetDistance > 350 || (target != null && !target.IsVisible))) || target == null;

            if (canCancel)
            {
                if (target != null && !target.IsVisible)
                {
                    if (!Menu.Item("lockTarget").GetValue <bool>())
                    {
                        var closestToMouse = me.ClosestToMouseTarget(128);
                        if (closestToMouse != null)
                        {
                            target = me.ClosestToMouseTarget(range);
                        }
                    }
                }
                else
                {
                    var index = Menu.Item("targetSelecting").GetValue <StringList>().SelectedIndex;
                    target = index == 0 ? me.BestAATarget(blinkRange) : me.ClosestToMouseTarget();
                }
            }
            if (target == null || !target.IsAlive ||
                ((!target.IsVisible || target.Distance2D(mousePosition) > target.Distance2D(me) + 1000) && canCancel))
            {
                if (!Utils.SleepCheck("move"))
                {
                    return;
                }
                me.Move(mousePosition);
                Utils.Sleep(100, "move");
                return;
            }
            targetDistance = mePosition.Distance2D(target);
            hullsum        = (me.HullRadius + target.HullRadius) * 2;
            turnTime       = me.GetTurnTime(target);
            var casting = CastCombo();

            if (casting)
            {
                return;
            }
            if (!Utils.SleepCheck("casting"))
            {
                return;
            }
            OrbWalk(Orbwalking.CanCancelAnimation());
        }
Beispiel #12
0
        public static void Game_OnUpdate(EventArgs args)
        {
            if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame)
            {
                return;
            }

            me = ObjectManager.LocalHero;
            if (me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_Clinkz)
            {
                return;
            }

            if (strafe == null)
            {
                strafe = me.Spellbook.SpellQ;
            }

            if (arrows == null)
            {
                arrows = me.Spellbook.SpellW;
            }

            if (dpAbility == null)
            {
                dpAbility = me.Spellbook.SpellR;
            }

            if (bkb == null)
            {
                bkb = me.FindItem("item_black_king_bar");
            }

            if (hex == null)
            {
                hex = me.FindItem("item_sheepstick");
            }

            if (orchid == null)
            {
                orchid = me.FindItem("item_orchid");
            }

            if (bloodthorn == null)
            {
                bloodthorn = me.FindItem("item_bloodthorn");
            }

            if (medallion == null)
            {
                medallion = me.FindItem("item_medallion_of_courage");
            }

            if (bladeMail == null)
            {
                bladeMail = me.FindItem("item_blade_mail");
            }

            if (solar == null)
            {
                solar = me.FindItem("item_solar_crest");
            }

            if (powerTreads == null)
            {
                powerTreads = me.FindItem("item_power_treads") as PowerTreads;
            }

            dragonLance = me.HasModifier("modifier_item_dragon_lance");

            attackRange = dragonLance ? 760 : 630;


            if (!itemTogglerSet)
            {
                itemToggler    = Menu.Item("Items").GetValue <AbilityToggler>();
                itemTogglerSet = true;
            }

            if (!menuSkillSet)
            {
                skillToggler = Menu.Item("Skills").GetValue <AbilityToggler>();
                menuSkillSet = true;
            }

            ultBool = dpAbility != null && skillToggler.IsEnabled("clinkz_death_pact");

            const int DPrange = 0x190;

            if (powerTreads != null)
            {
                lastAttribute = powerTreads.ActiveAttribute;
            }


            var creepR =
                ObjectManager.GetEntities <Unit>()
                .Where(
                    creep =>
                    (creep.ClassID == ClassID.CDOTA_BaseNPC_Creep_Lane ||
                     creep.ClassID == ClassID.CDOTA_BaseNPC_Creep_Neutral) &&
                    creep.IsAlive && creep.IsVisible && creep.IsSpawned &&
                    creep.Team != me.Team && creep.Position.Distance2D(me.Position) <= DPrange &&
                    me.Spellbook.SpellR.CanBeCasted()).ToList();

            var enemies = ObjectManager.GetEntities <Hero>().Where(x => x.IsAlive && x.Team != me.Team && !x.IsIllusion).ToList();


            if (autoKillz && Menu.Item("enable").GetValue <bool>())
            {
                target = me.ClosestToMouseTarget(1001);

                //orbwalk
                if (target != null && (!target.IsValid || !target.IsVisible || !target.IsAlive || target.Health <= 0))
                {
                    target = null;
                }
                var canCancel = Orbwalking.CanCancelAnimation();
                if (canCancel)
                {
                    if (target != null && !target.IsVisible && !Orbwalking.AttackOnCooldown(target))
                    {
                        target = me.ClosestToMouseTarget();
                    }
                    else if (target == null || !Orbwalking.AttackOnCooldown(target) && target.HasModifiers(new[]
                    {
                        "modifier_dazzle_shallow_grave", "modifier_item_blade_mail_reflect",
                    }, false))
                    {
                        var bestAa = me.BestAATarget();
                        if (bestAa != null)
                        {
                            target = me.BestAATarget();
                        }
                    }
                }

                if (target != null && target.IsAlive && !target.IsInvul() && !target.IsIllusion)
                {
                    if (me.CanAttack() && me.CanCast() && !me.IsChanneling())
                    {
                        TargetDistance = me.Position.Distance2D(target);

                        if (Menu.Item("orbwalk").GetValue <bool>())
                        {
                            if (!Utils.SleepCheck("attacking"))
                            {
                                if (lastAttribute != Attribute.Agility && Utils.SleepCheck("powerTreadsSwitch"))
                                {
                                    SwitchTo(Attribute.Agility);
                                    Utils.Sleep(400, "powerTreadsSwitch");
                                }
                            }
                            Orbwalking.Orbwalk(target, Game.Ping, attackmodifiers: true);
                            Utils.Sleep(400, "attacking");
                        }
                        else if (!Menu.Item("orbwalk").GetValue <bool>())
                        {
                            if (arrows != null && arrows.IsValid && arrows.CanBeCasted() && !Utils.SleepCheck("attacking"))
                            {
                                arrows.UseAbility(target);
                            }
                            Utils.Sleep(200, "attacking");
                        }

                        if (creepR.Count > 0 && !me.Modifiers.ToList().Exists(x => x.Name == "modifier_clinkz_death_pact") && skillToggler.IsEnabled(dpAbility.Name))
                        {
                            var creepmax = creepR.MaxOrDefault(x => x.Health);
                            if (lastAttribute != Attribute.Intelligence && Utils.SleepCheck("powerTreadsSwitch"))
                            {
                                SwitchTo(Attribute.Intelligence);
                                Utils.Sleep(400, "powerTreadsSwitch");
                            }
                            dpAbility.UseAbility(creepmax);
                        }

                        if (strafe != null && strafe.IsValid && strafe.CanBeCasted() && me.CanCast() && me.Distance2D(target) <= attackRange + 90 && Utils.SleepCheck("strafe") && skillToggler.IsEnabled(strafe.Name))
                        {
                            if (lastAttribute != Attribute.Intelligence && Utils.SleepCheck("powerTreadsSwitch"))
                            {
                                SwitchTo(Attribute.Intelligence);
                                Utils.Sleep(400, "powerTreadsSwitch");
                            }
                            strafe.UseAbility();
                            Utils.Sleep(100 + Game.Ping, "strafe");
                        }

                        if (bladeMail != null && bladeMail.IsValid && Utils.SleepCheck("blademail") && itemToggler.IsEnabled(bladeMail.Name) && me.Distance2D(target) <= attackRange + 90)
                        {
                            bladeMail.UseAbility();
                            Utils.Sleep(50 + Game.Ping, "blademail");
                        }

                        if (medallion != null && medallion.IsValid && medallion.CanBeCasted() && Utils.SleepCheck("medallion") && itemToggler.IsEnabled(medallion.Name) && me.Distance2D(target) <= attackRange + 90)
                        {
                            medallion.UseAbility(target);
                            Utils.Sleep(50 + Game.Ping, "medallion");
                        }

                        if (solar != null && solar.IsValid && solar.CanBeCasted() && Utils.SleepCheck("solar") && itemToggler.IsEnabled(solar.Name))
                        {
                            solar.UseAbility(target);
                            Utils.Sleep(50 + Game.Ping, "solar");
                        }


                        if (bkb != null && bkb.IsValid && bkb.CanBeCasted() && Utils.SleepCheck("bkb") && itemToggler.IsEnabled(bkb.Name) && (enemies.Count(x => x.Distance2D(me) <= 650) >= (Menu.Item("bkblogic").GetValue <Slider>().Value)))
                        {
                            bkb.UseAbility();
                            Utils.Sleep(150 + Game.Ping, "bkb");
                        }

                        if (hex != null && hex.IsValid && hex.CanBeCasted() && Utils.SleepCheck("hex") && itemToggler.IsEnabled(hex.Name))
                        {
                            hex.CastStun(target);
                            Utils.Sleep(250 + Game.Ping, "hex");
                            return;
                        }

                        if (orchid != null && orchid.IsValid && orchid.CanBeCasted() && Utils.SleepCheck("orchid") && itemToggler.IsEnabled(orchid.Name))
                        {
                            orchid.CastStun(target);
                            Utils.Sleep(250 + Game.Ping, "orchid");
                            return;
                        }

                        if (bloodthorn != null && bloodthorn.IsValid && bloodthorn.CanBeCasted() && Utils.SleepCheck("bloodthorn") && itemToggler.IsEnabled(bloodthorn.Name))
                        {
                            bloodthorn.CastStun(target);
                            Utils.Sleep(250 + Game.Ping, "orchid");
                            return;
                        }

                        if (!me.IsAttacking() && me.Distance2D(target) >= attackRange && Utils.SleepCheck("follow"))
                        {
                            me.Move(Game.MousePosition);
                            Utils.Sleep(150 + Game.Ping, "follow");
                        }
                    }
                }
                else
                {
                    me.Move(Game.MousePosition);
                }
            }
        }//gameOnUpdate Close.
Beispiel #13
0
        public void Execute(Hero me, Hero target, List <Unit> familiars)
        {
            if (target == null)
            {
                if (Utils.SleepCheck("MousePosition"))
                {
                    me.Move(Game.MousePosition);
                    Utils.Sleep(150, "MousePosition");
                }
            }
            if (!me.IsAlive)
            {
                return;
            }
            if (target == null)
            {
                return;
            }
            Update(me);
            itemUsage.OffensiveItem(target);
            //
            //all within attack range
            FamiliarOrbwalk(familiars, target);
            if (familiars.Any(f => f.Distance2D(target) <= f.AttackRange + 100))
            {
                if (Utils.SleepCheck("stone"))
                {
                    foreach (var f in familiars)
                    {
                        if (familiarControl.FamiliarCanStoneEnemies(target, f))
                        {
                            familiarControl.UseStone(f);
                        }
                        else
                        {
                            /*
                             * if (familiarControl.NotMuchDmgLeft(f))
                             * {
                             *  f.Move(f.Spellbook.SpellQ.GetPrediction(target));
                             * }
                             * else {
                             *  //familiarControl.FamiliarOrbwalk(f, target);
                             *  //f.Attack(target);
                             * }
                             */
                        }
                    }
                    Utils.Sleep(300, "stone");
                }
                // familiar attack
            }
            else
            {
                //Console.WriteLine("now move to new target");

                /*
                 * if (Utils.SleepCheck("move"))
                 * {
                 *  foreach (var f in familiars)
                 *  {
                 *      if (f.Distance2D(target) > f.AttackRange + 100)
                 *      {
                 *          if (f.CanMove() && !f.IsAttacking())
                 *          {
                 *              f.Move(f.Spellbook.SpellQ.GetPrediction(target));
                 *          }
                 *      }
                 *  }
                 *  Utils.Sleep(300, "move");
                 * }
                 */
            }


            //grave chill
            if (graveChill.CanBeCastedOn(target, hasLens))
            {
                if (Utils.SleepCheck("gravechill"))
                {
                    graveChill.UseOn(target);
                    Utils.Sleep(200, "gravechill");
                }
            }
            else
            {
                // go towards target
                if (me.CanMove())
                {
                    if (Utils.SleepCheck("move"))
                    {
                        //me.Move(target.Position);
                        Utils.Sleep(100, "move");
                    }
                }

                //Orbwalk
                if (Utils.SleepCheck("orbwalk"))
                {
                    try
                    {
                        if (Orbwalking.AttackOnCooldown()) //target != null is to avoid an null exception case in Orbwalk
                        {
                            Orbwalking.Orbwalk(target, 0, 0, false, true);
                        }
                        else
                        {
                            Orbwalking.Attack(target, true);
                        }
                        Utils.Sleep(200, "orbwalk");
                    }
                    catch
                    {
                        return;
                    }
                }


                //soulAssumption
                autoNuke.KillSteal(me);
                // max dmg on target
                if (soulAssumption.HasMaxCharges(me) && soulAssumption.CanbeCastedOn(target, hasLens))
                {
                    if (Utils.SleepCheck("soulassumption"))
                    {
                        soulAssumption.Use(target);
                        Utils.Sleep(200, "soulassumption");
                    }
                }
            }
        }
Beispiel #14
0
 public static bool Cast(Ability ability, Unit target, string name)
 {
     if (target.Modifiers.Any(x => x.Name == "modifier_item_blade_mail_reflect") &&
         AbilityDamage.CalculateDamage(ability, AbilityMain.Me, target) > AbilityMain.Me.Health)
     {
         return(false);
     }
     if (target.Modifiers.Any(x => x.Name == "modifier_nyx_assassin_spiked_carapace"))
     {
         return(false);
     }
     if (ability.Name == "sniper_assassinate")
     {
         if (AbilityMain.Me.Distance2D(target) <= AbilityMain.Me.GetAttackRange() + 100)
         {
             return(false);
         }
     }
     if (ability.IsAbilityBehavior(AbilityBehavior.UnitTarget, name) && ability.Name != "lion_impale")
     {
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         SoulRing.Cast(ability);
         if (name == "omniknight_purification")
         {
             ability.UseAbility(AbilityMain.Me);
         }
         ability.UseAbility(target);
         return(true);
     }
     if ((ability.IsAbilityBehavior(AbilityBehavior.AreaOfEffect, name) ||
          ability.IsAbilityBehavior(AbilityBehavior.Point, name)) &&
         (Prediction.StraightTime(target) > 1000 || target.MovementSpeed < 200))
     {
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         return(ability.CastSkillShot(target, name, SoulRing.Check(ability) ? MyAbilities.SoulRing : null));
     }
     if (ability.IsAbilityBehavior(AbilityBehavior.NoTarget, name))
     {
         if (ability.Name == "templar_assassin_meld")
         {
             if (
                 !(target.Distance2D(MyHeroInfo.Position)
                   < (AbilityMain.Me.GetAttackRange() + 50 + target.HullRadius + AbilityMain.Me.HullRadius)) ||
                 Orbwalking.AttackOnCooldown(target) || AbilityMain.Me.IsAttacking() ||
                 (target.Predict(Game.Ping).Distance2D(MyHeroInfo.Position)
                  > (AbilityMain.Me.GetAttackRange() + 50 + target.HullRadius + AbilityMain.Me.HullRadius)) ||
                 !Utils.SleepCheck("GlobalCasting"))
             {
                 return(false);
             }
             Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
             ManageAutoAttack.AutoAttackDisabled = true;
             ability.UseAbility();
             DelayAction.Add(
                 new DelayActionItem(
                     (int)ability.GetCastDelay(AbilityMain.Me, target) * 1000,
                     () =>
             {
                 AbilityMain.Me.Attack(target);
             },
                     CancellationToken.None));
             Utils.Sleep(ability.GetCastDelay(AbilityMain.Me, target) * 1000, "GlobalCasting");
             Utils.Sleep(ability.GetCastDelay(AbilityMain.Me, target) * 1000 + 200, "casting");
             Utils.Sleep(ability.GetCastDelay(AbilityMain.Me, target) * 1000 + 200, "Ability.Move");
             return(true);
         }
         if (ability.Name.Contains("nevermore_shadowraze"))
         {
             Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
             ManageAutoAttack.AutoAttackDisabled = true;
             return(ability.CastSkillShot(target, name));
         }
         SoulRing.Cast(ability);
         Game.ExecuteCommand("dota_player_units_auto_attack_after_spell 0");
         ManageAutoAttack.AutoAttackDisabled = true;
         ability.UseAbility();
         return(true);
     }
     return(false);
 }
Beispiel #15
0
        public static async void Game_OnUpdate(EventArgs args)
        {
            if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame) return;

            me = ObjectManager.LocalHero;
            if (me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_Slark)
                return;

            if (darkPact == null)
                darkPact = me.Spellbook.SpellQ;

            if (pounce == null)
                pounce = me.Spellbook.SpellW;

            if (shadowDance == null)
                shadowDance = me.Spellbook.SpellR;

            if (bkb == null)
                bkb = me.FindItem("item_black_king_bar");

            if (orchid == null)
                orchid = me.FindItem("item_orchid");

            if (abyssalBlade == null)
                abyssalBlade = me.FindItem("item_abyssal_blade");

            var invisModif = me.Modifiers.Any(x => x.Name == "modifier_item_silver_edge_windwalk" || x.Name == "modifier_item_invisibility_edge_windwalk");

            if (Menu.Item("sdtog").GetValue<bool>() && me.IsAlive && me.CanCast() && !me.IsChanneling())
            {
                if (shadowDance != null && shadowDance.IsValid && shadowDance.CanBeCasted() && me.Health <= me.MaximumHealth / 100 * Menu.Item("sdhealth").GetValue<Slider>().Value && Utils.SleepCheck("shadowDance"))
                {
                    shadowDance.UseAbility();
                    Utils.Sleep(200, "shadowDance");
                }
            }

            if (autoKillz && Menu.Item("enable").GetValue<bool>())
            {
                target = me.ClosestToMouseTarget(1001);

                if (target != null && (!target.IsValid || !target.IsVisible || !target.IsAlive || target.Health <= 0))
                {
                    target = null;
                }
                var canCancel = Orbwalking.CanCancelAnimation();
                if (canCancel)
                {
                    if (target != null && !target.IsVisible && !Orbwalking.AttackOnCooldown(target))
                    {
                        target = me.ClosestToMouseTarget();
                    }
                    else if (target == null || !Orbwalking.AttackOnCooldown(target) && target.HasModifiers(new[]
                                    {
                                        "modifier_dazzle_shallow_grave", "modifier_item_blade_mail_reflect",
                                    }, false))
                    {
                        var bestAa = me.BestAATarget();
                        if (bestAa != null)
                        {
                            target = me.BestAATarget();
                        }
                    }
                }

                if (target != null && target.IsAlive && !target.IsInvul() && !target.IsIllusion)
                {
                    if (me.CanCast() && !me.IsChanneling())
                    {
                        if (!invisModif)
                        {
                        if (!Utils.SleepCheck("attacking"))
                            Orbwalking.Orbwalk(target, Game.Ping);
                            Utils.Sleep(200, "attacking");
                        }

                        if (pounce != null && pounce.CanBeCasted())//change this to leap name fo cause bcz cus cause. D:
                        {
                            if (target.NetworkActivity == NetworkActivity.Move)
                            {
                                var VectorOfMovement = new Vector2((float)Math.Cos(target.RotationRad) * target.MovementSpeed, (float)Math.Sin(target.RotationRad) * target.MovementSpeed);
                                var HitPosition = Interception(target.Position, VectorOfMovement, me.Position, 933.33f);
                                var HitPosMod = HitPosition + new Vector3(VectorOfMovement.X * (TimeToTurn(me, HitPosition)), VectorOfMovement.Y * (TimeToTurn(me, HitPosition)), 0);
                                var HitPosMod2 = HitPosition + new Vector3(VectorOfMovement.X * (TimeToTurn(me, HitPosMod)), VectorOfMovement.Y * (TimeToTurn(me, HitPosMod)), 0);

                                if (GetDistance2D(me, HitPosMod2) > (755 + target.HullRadius))
                                {
                                    return;
                                }
                                if (IsFacing(me, HitPosMod2))
                                {
                                    pounce.UseAbility();
                                    trying = true;
                                    await Task.Delay(400); //Avoid trying to pounce multiple times.
                                    trying = false;
                                }
                                else
                                {
                                    me.Move((HitPosMod2 - me.Position) * 50 / (float)GetDistance2D(HitPosMod2, me) + me.Position);
                                }
                            }
                            else
                            {
                                if (GetDistance2D(me, target) > (755 + target.HullRadius))
                                {
                                    return;
                                }
                                if (IsFacing(me, target))
                                {
                                    pounce.UseAbility();
                                    trying = true;
                                    await Task.Delay(400);
                                    trying = false;
                                }
                                else
                                {
                                    me.Move((target.Position - me.Position) * 50 / (float)GetDistance2D(target, me) + me.Position);
                                }
                            }
                        }

                        if (darkPact != null && darkPact.CanBeCasted() && darkPact.CanHit(target) && Utils.SleepCheck("darkPact"))
                        {
                            darkPact.UseAbility();
                            Utils.Sleep(200, "darkPact");
                        }

                        if (bkb != null && bkb.IsValid && bkb.CanBeCasted() && GetDistance2D(me, target) <= 300 && Utils.SleepCheck("bkb"))
                        {
                            bkb.UseAbility();
                            Utils.Sleep(150 + Game.Ping, "bkb");
                        }

                        if (abyssalBlade != null && abyssalBlade.IsValid && abyssalBlade.CanBeCasted() && Utils.SleepCheck("abyssalBlade"))
                        {
                            abyssalBlade.CastStun(target);
                            Utils.Sleep(250 + Game.Ping, "abyssalBlade");
                        }

                        if (orchid != null && orchid.IsValid && orchid.CanBeCasted() && Utils.SleepCheck("orchid"))
                        {
                            orchid.CastStun(target);
                            Utils.Sleep(250 + Game.Ping, "orchid");
                        }

                    }
                }
            }
        }
Beispiel #16
0
        public static bool Cast(Ability ability, Unit target, string name, bool disabled = false)
        {
            if (!disabled)
            {
                disabled = target.IsStunned() || target.IsRooted() || target.IsHexed() || target.IsInvul();
            }

            if (target.HasModifier("modifier_item_blade_mail_reflect") &&
                AbilityDamage.CalculateDamage(ability, AbilityMain.Me, target) > AbilityMain.Me.Health)
            {
                return(false);
            }

            if (target.HasModifier("modifier_nyx_assassin_spiked_carapace"))
            {
                return(false);
            }

            if (ability.Name == "sniper_assassinate")
            {
                if (AbilityMain.Me.Distance2D(target) <= AbilityMain.Me.GetAttackRange() + 100)
                {
                    return(false);
                }
            }

            if (ability.IsAbilityBehavior(AbilityBehavior.UnitTarget, name) && ability.Name != "lion_impale" &&
                ability.Name != "lina_dragon_slave")
            {
                if (target.IsLinkensProtected())
                {
                    if (!Utils.SleepCheck("AbilitySharp.CancelLinkens"))
                    {
                        return(false);
                    }

                    if (MyAbilities.Cyclone != null && MyAbilities.Cyclone.CanBeCasted())
                    {
                        MyAbilities.Cyclone.UseAbility(target);
                    }
                    else if (MyAbilities.ForceStaff != null && MyAbilities.ForceStaff.CanBeCasted())
                    {
                        MyAbilities.ForceStaff.UseAbility(target);
                    }

                    Utils.Sleep(1000, "AbilitySharp.CancelLinkens");

                    Game.ExecuteCommand("dota_player_units_auto_attack_mode 0");
                    ManageAutoAttack.AutoAttackDisabled = true;
                    SoulRing.Cast(ability);
                    ability.UseAbility(target, true);
                    return(false);
                }

                Game.ExecuteCommand("dota_player_units_auto_attack_mode 0");
                ManageAutoAttack.AutoAttackDisabled = true;
                SoulRing.Cast(ability);
                ability.UseAbility(target);
                DelayAction.Add(
                    new DelayActionItem(300, () => { AbilityMain.LaunchSnowball(); }, CancellationToken.None));
                return(true);
            }

            if ((ability.IsAbilityBehavior(AbilityBehavior.AreaOfEffect, name) ||
                 ability.IsAbilityBehavior(AbilityBehavior.Point, name)) &&
                (disabled ||
                 Prediction.StraightTime(target)
                 > Nukes.NukesMenuDictionary[name].Item(name + "minstraighttime").GetValue <Slider>().Value ||
                 target.MovementSpeed < 200))
            {
                if (AbilityMain.Me.ClassId == ClassId.CDOTA_Unit_Hero_Invoker && !ability.CanBeCasted())
                {
                    var invoked = ability.Invoke();
                    if (!invoked)
                    {
                        return(false);
                    }

                    DelayAction.Add(
                        Game.Ping * 2,
                        () =>
                    {
                        Game.ExecuteCommand("dota_player_units_auto_attack_mode 0");
                        ManageAutoAttack.AutoAttackDisabled = true;
                        var casted2 = ability.CastSkillShot(
                            target,
                            MyHeroInfo.Position,
                            name,
                            SoulRing.Check(ability) ? MyAbilities.SoulRing : null);
                        if (!casted2)
                        {
                            return;
                        }

                        if (!disabled && Utils.SleepCheck(ability.Handle.ToString()) &&
                            ability.GetCastDelay(AbilityMain.Me, target, true) * 1000 - Game.Ping > 0.1)
                        {
                            DelayAction.Add(
                                new DelayActionItem(
                                    (int)
                                    (ability.GetCastDelay(AbilityMain.Me, target, true) * 1000
                                     - Math.Max(50, Game.Ping)),
                                    () =>
                            {
                                if (Prediction.StraightTime(target)
                                    < (600
                                       + (ability.GetCastDelay(AbilityMain.Me, target, true) * 1000
                                          - Math.Max(50, Game.Ping))) && target.MovementSpeed > 200)
                                {
                                    AbilityMain.Me.Stop();
                                }
                            },
                                    CancellationToken.None));
                        }
                    });
                    Utils.Sleep((Game.Ping * 2) + 200, "cancelorder");
                    Utils.Sleep((Game.Ping * 2) + 200, ability.Handle.ToString());
                    Utils.Sleep((Game.Ping * 2) + 200, "casting");
                }

                Game.ExecuteCommand("dota_player_units_auto_attack_mode 0");
                ManageAutoAttack.AutoAttackDisabled = true;
                var casted = ability.CastSkillShot(
                    target,
                    MyHeroInfo.Position,
                    name,
                    SoulRing.Check(ability) ? MyAbilities.SoulRing : null);
                if (!casted)
                {
                    return(false);
                }

                if (!disabled && Utils.SleepCheck(ability.Handle.ToString()) &&
                    ability.GetCastDelay(AbilityMain.Me, target, true) * 1000 - Game.Ping > 0.1)
                {
                    DelayAction.Add(
                        new DelayActionItem(
                            (int)(ability.GetCastDelay(AbilityMain.Me, target, true) * 1000 - Math.Max(50, Game.Ping)),
                            () =>
                    {
                        if (Prediction.StraightTime(target)
                            < (600
                               + (ability.GetCastDelay(AbilityMain.Me, target, true) * 1000
                                  - Math.Max(50, Game.Ping))) && target.MovementSpeed > 200)
                        {
                            AbilityMain.Me.Stop();
                        }
                    },
                            CancellationToken.None));
                }

                return(true);
            }

            if (ability.IsAbilityBehavior(AbilityBehavior.NoTarget, name))
            {
                if (ability.Name == "templar_assassin_meld")
                {
                    if (
                        !(target.Distance2D(MyHeroInfo.Position)
                          < (AbilityMain.Me.GetAttackRange() + 50 + target.HullRadius + AbilityMain.Me.HullRadius)) ||
                        Orbwalking.AttackOnCooldown(target) || AbilityMain.Me.IsAttacking() ||
                        (target.Predict(Game.Ping).Distance2D(MyHeroInfo.Position)
                         > (AbilityMain.Me.GetAttackRange() + 50 + target.HullRadius + AbilityMain.Me.HullRadius)) ||
                        !Utils.SleepCheck("GlobalCasting"))
                    {
                        return(false);
                    }

                    Game.ExecuteCommand("dota_player_units_auto_attack_mode 0");
                    ManageAutoAttack.AutoAttackDisabled = true;
                    ability.UseAbility();
                    DelayAction.Add(
                        new DelayActionItem(
                            (int)ability.GetCastDelay(AbilityMain.Me, target) * 1000,
                            () => { AbilityMain.Me.Attack(target); },
                            CancellationToken.None));
                    Utils.Sleep(ability.GetCastDelay(AbilityMain.Me, target) * 1000, "GlobalCasting");
                    Utils.Sleep(ability.GetCastDelay(AbilityMain.Me, target) * 1000 + 200, "casting");
                    Utils.Sleep(ability.GetCastDelay(AbilityMain.Me, target) * 1000 + 200, "Ability.Move");
                    Utils.Sleep(ability.GetCastDelay(AbilityMain.Me, target) * 1000 + 200, "cancelorder");
                    return(true);
                }

                if (ability.Name.Contains("nevermore_shadowraze"))
                {
                    Game.ExecuteCommand("dota_player_units_auto_attack_mode 0");
                    ManageAutoAttack.AutoAttackDisabled = true;
                    return(ability.CastSkillShot(target, name));
                }

                SoulRing.Cast(ability);
                Game.ExecuteCommand("dota_player_units_auto_attack_mode 0");
                ManageAutoAttack.AutoAttackDisabled = true;
                ability.UseAbility();
                return(true);
            }

            return(false);
        }
Beispiel #17
0
        public static void Update(EventArgs args)
        {
            if (!CanUpdate())
            {
                return;
            }

            //var tempSummonlist = Var.Summons;
            //if (MenuVar.LastHitEnable)
            //{
            //    if (Var.Summons.Count > 0 && Var.Summons.Any(x => !x.Key.IsAlive))
            //    {
            //        //foreach (var summon in Var.Summons.Where(x => !x.Key.IsAlive))
            //        //{
            //        //    tempSummonlist.Remove(summon.Key);
            //        //}
            //        //Var.Summons.Clear();
            //        //Var.Summons = tempSummonlist;
            //    }
            //}

            EnemyHeroes.Update();
            AllyHeroes.Update();
            Couriers.Update();

            if (MenuVar.Maphack || MenuVar.DodgeEnable)
            {
                Methods.ShowMeMore.Maphack();
            }

            MenuVar.TestEffectMenu = MainMenu.Menu.Item("effects");

            MenuVar.CameraDistance = MainMenu.MenuSettings.Item("cameradistance");

            if (!Utils.SleepCheck("Update.sleep"))
            {
                return;
            }
            Utils.Sleep(500, "Update.sleep");

            if (MenuVar.ShowRoshanTimer)
            {
                Methods.ShowMeMore.Roshan();
            }

            #region Runes

            Runes.Update();

            #endregion Runes

            if (MenuVar.LastHitEnable && MenuVar.SummonsEnable || MenuVar.StackKey)
            {
                Common.UpdateAttackableSummons();
            }

            #region Menu

            MainMenu.Update();

            #endregion Menu

            #region Hero

            Var.Q = Var.Me.Spellbook.SpellQ;
            Var.W = Var.Me.Spellbook.SpellW;
            Var.E = Var.Me.Spellbook.SpellE;
            Var.R = Var.Me.Spellbook.SpellR;

            double apoint = Var.Me.ClassID == ClassID.CDOTA_Unit_Hero_ArcWarden
                ? 0.3
                : UnitDatabase.Units.Find(x => x.UnitName == Var.Me.Name).AttackPoint;
            Var.HeroAPoint = apoint / (1 + Var.Me.AttacksPerSecond * Var.Me.BaseAttackTime / 100) * 1000;

            #endregion Hero

            #region Autoattack

            if (Var.AutoAttackMode != MenuVar.AutoAttackMode)
            {
                switch (MenuVar.AutoAttackMode)
                {
                case 0:
                    Var.AutoAttackMode = 0;
                    Common.Autoattack(Var.AutoAttackMode);
                    break;

                case 1:
                    Var.AutoAttackMode = 1;
                    Common.Autoattack(Var.AutoAttackMode);
                    break;

                case 2:
                    Var.AutoAttackMode = 2;
                    Common.Autoattack(Var.AutoAttackMode);
                    break;
                }
            }

            #endregion Autoattack

            #region Target

            if (Var.Target != null && !Var.Target.IsVisible && !Orbwalking.AttackOnCooldown(Var.Target))
            {
                Var.Target = TargetSelector.ClosestToMouse(Var.Me);
            }
            else if (Var.Target == null || !Orbwalking.AttackOnCooldown(Var.Target))
            {
                var bestAa = Var.Me.BestAATarget();
                if (bestAa != null)
                {
                    Var.Target = Var.Me.BestAATarget();
                }
            }

            #endregion Target

            #region Towers

            if (!Towers.TowerLoad)
            {
                Buildings.GetBuildings();
                Towers.TowerLoad = true;
            }
            //else
            //{
            //    Towers.Load();
            //}

            #endregion Towers
        }
Beispiel #18
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!loaded)
            {
                //Orbwalking.Load();
                me = ObjectMgr.LocalHero;
                if (!Game.IsInGame || me == null)
                {
                    return;
                }
                loaded = true;
            }

            if (me == null || !me.IsValid)
            {
                //Orbwalking.Load();
                loaded = false;
                me     = ObjectMgr.LocalHero;
                if (rangeDisplay == null)
                {
                    return;
                }
                rangeDisplay = null;
                return;
            }

            if (Game.IsPaused)
            {
                return;
            }

            if (rangeDisplay == null)
            {
                rangeDisplay = me.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf");
                lastRange    = me.GetAttackRange() + me.HullRadius + 25;
                rangeDisplay.SetControlPoint(1, new Vector3(lastRange, 0, 0));
            }
            else
            {
                if (lastRange != (me.GetAttackRange() + me.HullRadius + 25))
                {
                    lastRange = me.GetAttackRange() + me.HullRadius + 25;
                    rangeDisplay.Dispose();
                    rangeDisplay = me.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf");
                    rangeDisplay.SetControlPoint(1, new Vector3(lastRange, 0, 0));
                }
            }
            if (target != null && (!target.IsValid || !target.IsVisible || !target.IsAlive || target.Health <= 0))
            {
                target = null;
            }
            var canCancel = Orbwalking.CanCancelAnimation();

            if (canCancel)
            {
                if (target != null && !target.IsVisible && !Orbwalking.AttackOnCooldown(target))
                {
                    target = me.ClosestToMouseTarget(128);
                }
                else if (target == null || !Orbwalking.AttackOnCooldown(target))
                {
                    var bestAa = me.BestAATarget();
                    if (bestAa != null)
                    {
                        target = me.BestAATarget();
                    }
                }
                if (Game.IsKeyDown(FarmKey) &&
                    (creepTarget == null || !creepTarget.IsValid || !creepTarget.IsVisible || !creepTarget.IsAlive || creepTarget.Health <= 0 ||
                     !Orbwalking.AttackOnCooldown(creepTarget)))
                {
                    creepTarget = TargetSelector.GetLowestHPCreep(me);
                }
            }

            if (Game.IsChatOpen)
            {
                return;
            }

            if (Game.IsKeyDown(FarmKey))
            {
                Orbwalking.Orbwalk(creepTarget);
            }
            if (Game.IsKeyDown(ChaseKey))
            {
                Orbwalking.Orbwalk(target, attackmodifiers: true);
            }
            if (Game.IsKeyDown(KiteKey))
            {
                Orbwalking.Orbwalk(
                    target,
                    attackmodifiers: true,
                    bonusRange: (float)(UnitDatabase.GetAttackRate(me) * 1000));
            }
        }
Beispiel #19
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!loaded)
            {
                me = ObjectMgr.LocalHero;


                if (!Game.IsInGame || Game.IsWatchingGame || me == null || Game.IsChatOpen)
                {
                    return;
                }
                loaded = true;
            }

            if (me == null || !me.IsValid)
            {
                loaded                = false;
                me                    = ObjectMgr.LocalHero;
                supportActive         = false;
                includeSaveSelf       = false;
                shouldCastLotusOrb    = false;
                shouldCastGlimmerCape = false;
                return;
            }

            if (Game.IsPaused)
            {
                return;
            }

            Urn          = me.FindItem("item_urn_of_shadows");
            Meka         = me.FindItem("item_mekansm");
            Guardian     = me.FindItem("item_guardian_greaves");
            Arcane       = me.FindItem("item_arcane_boots");
            LotusOrb     = me.FindItem("item_lotus_orb");
            Medallion    = me.FindItem("item_medallion_of_courage");
            SolarCrest   = me.FindItem("item_solar_crest");
            GlimmerCape  = me.FindItem("item_glimmer_cape");
            Pipe         = me.FindItem("item_pipe");
            CrimsonGuard = me.FindItem("item_crimson_guard");

            needMana              = null;
            needMeka              = null;
            shouldCastLotusOrb    = false;
            shouldCastGlimmerCape = false;

            if (!Game.IsChatOpen)
            {
                if (Game.IsKeyDown(toggleKey) && Utils.SleepCheck("togglingoption"))
                {
                    if (!supportActive)
                    {
                        supportActive = true;
                    }
                    else
                    {
                        supportActive = false;
                    }
                    Utils.Sleep(100 + Game.Ping, "togglingoption");
                }

                if (Game.IsKeyDown(saveSelfKey) && Utils.SleepCheck("togglingoption"))
                {
                    if (!includeSaveSelf)
                    {
                        includeSaveSelf = true;
                    }
                    else
                    {
                        includeSaveSelf = false;
                    }
                    Utils.Sleep(100 + Game.Ping, "togglingoption");
                }
            }

            if (supportActive)
            {
                var allies =
                    ObjectMgr.GetEntities <Hero>()
                    .Where(
                        ally =>
                        ally.Team == me.Team && ally.IsAlive && !ally.IsIllusion && me.Distance2D(ally) <= 1500)
                    .ToList();
                fountain =
                    ObjectMgr.GetEntities <Entity>()
                    .First(entity => entity.ClassID == ClassID.CDOTA_Unit_Fountain && entity.Team == me.Team);


                if (allies.Any())
                {
                    foreach (var ally in allies)
                    {
                        if (!ally.IsIllusion() && ally.IsAlive && ally.Health > 0 && me.IsAlive && !me.IsChanneling() &&
                            me.Distance2D(fountain) > 2000 &&
                            !me.IsInvisible())
                        {
                            if ((ally.MaximumHealth - ally.Health) > (450 + ally.HealthRegeneration * 10) &&
                                me.Distance2D(ally) <= 2000 &&
                                (me.Mana >= 225 || Guardian != null))
                            {
                                if (needMeka == null || (needMeka != null && me.Distance2D(needMeka) <= 750))
                                {
                                    needMeka = ally;
                                }
                            }

                            var enemyTowers =
                                ObjectMgr.GetEntities <Entity>()
                                .Any(
                                    x =>
                                    x.ClassID == ClassID.CDOTA_BaseNPC_Tower && x.Team != me.Team &&
                                    x.IsAlive && ally.Distance2D(x) <= 750);

                            if (me.CanUseItems())
                            {
                                if (Urn != null && Urn.CanBeCasted() && Urn.CurrentCharges > 0 &&
                                    !ally.Modifiers.Any(x => x.Name == "modifier_item_urn_heal") && !enemyTowers)
                                {
                                    if (me.Distance2D(ally) <= 950 && !IsInDanger(ally) && Utils.SleepCheck("Urn") &&
                                        ally.Health <= (ally.MaximumHealth * 0.7))
                                    {
                                        Urn.UseAbility(ally);
                                        Utils.Sleep(100 + Game.Ping, "Urn");
                                    }
                                    if (ally.Modifiers.Any(x => x.Name == "modifier_wisp_tether") &&
                                        (ally.MaximumHealth - ally.Health) >= 600 && Utils.SleepCheck("Urn"))
                                    {
                                        Urn.UseAbility(me);
                                        Utils.Sleep(100 + Game.Ping, "Urn");
                                    }
                                }

                                if (Arcane != null && Arcane.Cooldown == 0)
                                {
                                    if ((ally.MaximumMana - ally.Mana) >= 135 && me.Distance2D(ally) < 2000 &&
                                        me.Mana >= 35)
                                    {
                                        if (needMana == null || (needMana != null && me.Distance2D(needMana) <= 600))
                                        {
                                            needMana = ally;
                                        }
                                    }
                                }

                                /*Pipe and Crimson Guard*/
                                if (((Pipe != null && Pipe.CanBeCasted()) ||
                                     (CrimsonGuard != null && CrimsonGuard.CanBeCasted())) && me.CanUseItems())
                                {
                                    var enemiesInRadius =
                                        ObjectMgr.GetEntities <Hero>()
                                        .Where(
                                            x =>
                                            x.Team != me.Team && x.IsAlive && me.Distance2D(x) <= 1500 &&
                                            !x.IsIllusion).ToList();
                                    var alliesInRadius =
                                        ObjectMgr.GetEntities <Hero>()
                                        .Where(
                                            x =>
                                            x.Team == me.Team && x.IsAlive && me.Distance2D(x) <= 900 &&
                                            !x.IsIllusion).ToList();

                                    if (enemiesInRadius.Any() && alliesInRadius.Any())
                                    {
                                        if (enemiesInRadius.Count >= 2 && alliesInRadius.Count >= 2)
                                        {
                                            if (Pipe != null && Pipe.CanBeCasted() && Utils.SleepCheck("Pipe"))
                                            {
                                                Pipe.UseAbility();
                                                Utils.Sleep(100 + Game.Ping, "Pipe");
                                            }

                                            if (CrimsonGuard != null && CrimsonGuard.CanBeCasted() &&
                                                Utils.SleepCheck("CrimsonGuard"))
                                            {
                                                CrimsonGuard.UseAbility();
                                                Utils.Sleep(100 + Game.Ping, "CrimsonGuard");
                                            }
                                        }
                                    }
                                }

                                var enemyList =
                                    ObjectMgr.GetEntities <Hero>()
                                    .Where(
                                        x =>
                                        x.Team != me.Team && !x.IsIllusion && x.IsAlive && x.CanCast() &&
                                        ally.Distance2D(x) <= 1000)
                                    .ToList();

                                if (enemyList.Any())
                                {
                                    foreach (var enemy in enemyList)
                                    {
                                        var targettedSpell =
                                            enemy.Spellbook.Spells.Any(
                                                x =>
                                                x.TargetTeamType == TargetTeamType.Enemy &&
                                                x.AbilityState == AbilityState.Ready &&
                                                ally.Distance2D(enemy) <= x.CastRange + 50 &&
                                                x.AbilityBehavior == AbilityBehavior.UnitTarget);

                                        var targettedItem =
                                            enemy.Inventory.Items.Any(
                                                x =>
                                                x.TargetTeamType == TargetTeamType.Enemy &&
                                                x.AbilityState == AbilityState.Ready &&
                                                x.AbilityBehavior == AbilityBehavior.UnitTarget &&
                                                ally.Distance2D(enemy) <= x.CastRange + 50);

                                        var enemySkill =
                                            enemy.Spellbook.Spells.Any(
                                                x =>
                                                x.DamageType == DamageType.Magical &&
                                                x.TargetTeamType == TargetTeamType.Enemy &&
                                                x.AbilityState == AbilityState.Ready &&
                                                ally.Distance2D(enemy) <= x.CastRange + 50);

                                        if (enemySkill)
                                        {
                                            shouldCastGlimmerCape = true;
                                        }

                                        if (targettedSpell || targettedItem)
                                        {
                                            shouldCastLotusOrb = true;
                                        }
                                    }
                                }

                                if (LotusOrb != null && LotusOrb.Cooldown == 0 && Utils.SleepCheck("LotusOrb") &&
                                    me.Distance2D(ally) <= LotusOrb.CastRange + 50 &&
                                    (shouldCastLotusOrb || IsInDanger(ally)))
                                {
                                    LotusOrb.UseAbility(ally);
                                    Utils.Sleep(100 + Game.Ping, "LotusOrb");
                                }

                                if (Medallion != null && Medallion.Cooldown == 0 &&
                                    me.Distance2D(ally) <= Medallion.CastRange + 50 && Utils.SleepCheck("Medallion") &&
                                    ally != me && IsInDanger(ally))
                                {
                                    Medallion.UseAbility(ally);
                                    Utils.Sleep(100 + Game.Ping, "Medallion");
                                }

                                if (SolarCrest != null && SolarCrest.Cooldown == 0 &&
                                    me.Distance2D(ally) <= SolarCrest.CastRange + 50 && Utils.SleepCheck("SolarCrest") &&
                                    ally != me && IsInDanger(ally))
                                {
                                    SolarCrest.UseAbility(ally);
                                    Utils.Sleep(100 + Game.Ping, "SolarCrest");
                                }

                                if (GlimmerCape != null && GlimmerCape.Cooldown == 0 &&
                                    me.Distance2D(ally) <= GlimmerCape.CastRange + 50 && Utils.SleepCheck("GlimmerCape") &&
                                    (shouldCastGlimmerCape || IsInDanger(ally)))
                                {
                                    GlimmerCape.UseAbility(ally);
                                    Utils.Sleep(100 + Game.Ping, "GlimmerCape");
                                }
                            }
                        }
                    }
                }

                if (needMeka != null &&
                    ((Guardian != null && Guardian.CanBeCasted()) || (Meka != null && Meka.CanBeCasted())) &&
                    me.Distance2D(needMeka) <= 750)
                {
                    if (Meka != null)
                    {
                        Meka.UseAbility();
                    }
                    else
                    {
                        Guardian.UseAbility();
                    }
                }
                if (needMana != null && Arcane != null && Arcane.CanBeCasted() && me.Distance2D(needMana) <= 600)
                {
                    Arcane.UseAbility();
                }


                if (Support(me.ClassID))
                {
                    switch (me.ClassID)
                    {
                    case ClassID.CDOTA_Unit_Hero_Abaddon:
                        Save(me, me.Spellbook.SpellW, 1000, me.Spellbook.SpellW.CastRange);
                        Heal(me, me.Spellbook.SpellQ, new float[] { 100, 150, 200, 250 },
                             800,
                             1, false);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Chen:
                        Save(me, me.Spellbook.SpellE, 1000, me.Spellbook.SpellE.CastRange);
                        Heal(me, me.Spellbook.SpellR, new float[] { 200, 300, 400 },
                             2200000, 2);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Dazzle:
                        Save(me, me.Spellbook.SpellW, 300, me.Spellbook.SpellW.CastRange);
                        Heal(me, me.Spellbook.SpellE, new float[] { 80, 100, 120, 140 },
                             750,
                             1);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Enchantress:
                        Heal(me, me.Spellbook.SpellE, new float[] { 400, 600, 800, 1000 },
                             275, 2);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Legion_Commander:
                        Heal(me, me.Spellbook.SpellW, new float[] { 150, 200, 250, 300 },
                             800,
                             1);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Necrolyte:
                        Heal(me, me.Spellbook.SpellQ, new float[] { 70, 90, 110, 130 },
                             475,
                             2);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Omniknight:
                        Heal(me, me.Spellbook.SpellQ, new float[] { 90, 180, 270, 360 },
                             950,
                             1);
                        Save(me, me.Spellbook.SpellW, 1570, me.Spellbook.SpellW.CastRange);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Oracle:
                        Save(me, me.Spellbook.SpellR, 1270, me.Spellbook.SpellR.CastRange);
                        Heal(me, me.Spellbook.SpellE, new float[] { 99, 198, 297, 396 },
                             750,
                             1);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Shadow_Demon:
                        Save(me, me.Spellbook.SpellQ, 900,
                             me.Spellbook.SpellQ.CastRange);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Treant:
                        Heal(me, me.Spellbook.SpellE, new float[] { 60, 105, 150, 195 },
                             2200000, 1);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Undying:
                        var unitsAround =
                            ObjectMgr.GetEntities <Entity>()
                            .Where(entity => entity.IsAlive && me.Distance2D(entity) <= 1300).ToList();

                        if (unitsAround.Any())
                        {
                            var unitCount   = unitsAround.Count;
                            var healperUnit = new[] { 18, 22, 36, 30 };

                            Heal(me, me.Spellbook.SpellW,
                                 new float[]
                            {
                                unitCount *healperUnit[me.Spellbook.SpellW.Level - 1],
                                unitCount *healperUnit[me.Spellbook.SpellW.Level - 1],
                                unitCount *healperUnit[me.Spellbook.SpellW.Level - 1],
                                unitCount *healperUnit[me.Spellbook.SpellW.Level - 1]
                            },
                                 750, 1);
                        }
                        break;

                    case ClassID.CDOTA_Unit_Hero_Warlock:
                        Heal(me, me.Spellbook.SpellW, new float[] { 165, 275, 385, 495 },
                             me.Spellbook.SpellW.CastRange, 1);
                        break;

                    case ClassID.CDOTA_Unit_Hero_Winter_Wyvern:
                        Save(me, me.Spellbook.SpellE, 930, me.Spellbook.SpellE.CastRange);
                        break;

                    case ClassID.CDOTA_Unit_Hero_WitchDoctor:
                        Heal(me, me.Spellbook.SpellW, new float[] { 16, 24, 32, 40 }, 500,
                             3);
                        break;
                    }
                }
            }

            if (Game.IsKeyDown(orbwalkKey))
            {
                if (target != null && (!target.IsValid || !target.IsVisible || !target.IsAlive || target.Health <= 0))
                {
                    target = null;
                }
                var canCancel = Orbwalking.CanCancelAnimation();
                if (canCancel)
                {
                    if (target != null && !target.IsVisible && !Orbwalking.AttackOnCooldown(target))
                    {
                        target = me.ClosestToMouseTarget();
                    }
                    else if (target == null || !Orbwalking.AttackOnCooldown(target))
                    {
                        var bestAa = me.BestAATarget();
                        if (bestAa != null)
                        {
                            target = me.BestAATarget();
                        }
                    }
                }

                Orbwalking.Orbwalk(target, Game.Ping, attackmodifiers: true);
            }
        }
Beispiel #20
0
        private static bool CastCombo()
        {
            var canCancel = (Orbwalking.CanCancelAnimation() &&
                             (Orbwalking.AttackOnCooldown(target) || !me.IsAttacking())) ||
                            (!Orbwalking.AttackOnCooldown(target) && targetDistance > 250);

            if (!Utils.SleepCheck("casting") || !me.CanCast() || !target.IsVisible || !canCancel)
            {
                return(false);
            }
            if (abyssalBlade != null && abyssalBlade.CanBeCasted() && targetDistance <= (350 + hullsum) &&
                Utils.SleepCheck("abyssal"))
            {
                var canUse = Utils.ChainStun(target, turnTime + 0.1 + Game.Ping / 1000, null, false);
                if (canUse)
                {
                    abyssalBlade.UseAbility(target);
                    Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "abyssal");
                    Utils.Sleep(turnTime * 1000 + 50, "move");
                    Utils.Sleep(
                        turnTime * 1000 + 100
                        + (Math.Max(targetDistance - hullsum - abyssalBlade.CastRange, 0) / me.MovementSpeed) * 1000,
                        "casting");
                    Utils.Sleep(turnTime * 1000 + 200, "CHAINSTUN_SLEEP");
                    return(true);
                }
            }
            if (scytheOfVyse != null && scytheOfVyse.CanBeCasted() && targetDistance <= (scytheOfVyse.CastRange + hullsum) &&
                Utils.SleepCheck("hex"))
            {
                var canUse = Utils.ChainStun(target, turnTime + 0.1 + Game.Ping / 1000, null, false);
                if (canUse)
                {
                    scytheOfVyse.UseAbility(target);
                    Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "hex");
                    Utils.Sleep(turnTime * 1000 + 50, "move");
                    Utils.Sleep(
                        turnTime * 1000 + 100
                        + (Math.Max(targetDistance - hullsum - scytheOfVyse.CastRange, 0) / me.MovementSpeed) * 1000,
                        "casting");
                    Utils.Sleep(turnTime * 1000 + 200, "CHAINSTUN_SLEEP");
                    return(true);
                }
            }
            if (earthshock.CanBeCasted() && Utils.SleepCheck("Q") && enableQ &&
                ((me.Mana - earthshock.ManaCost) > overpower.ManaCost || !overpower.CanBeCasted()))
            {
                var radius = earthshock.AbilityData.FirstOrDefault(x => x.Name == "shock_radius").GetValue(0);
                var pos    = target.Position
                             + target.Vector3FromPolarAngle() * ((Game.Ping / 1000 + 0.3f) * target.MovementSpeed);

                if (mePosition.Distance(pos) < targetDistance)
                {
                    pos = target.Position;
                }
                if (mePosition.Distance2D(pos) <= (radius) &&
                    (abyssalBlade == null || !abyssalBlade.CanBeCasted() || mePosition.Distance2D(pos) > 200) &&
                    (scytheOfVyse == null || !scytheOfVyse.CanBeCasted() || mePosition.Distance2D(pos) > 200))
                {
                    var canUse = Utils.ChainStun(target, 0.3 + Game.Ping / 1000, null, false);
                    if (canUse)
                    {
                        earthshock.UseAbility();
                        Utils.Sleep(earthshockCastPoint * 1000 + Game.Ping, "Q");
                        Utils.Sleep(earthshockCastPoint * 1000, "casting");
                        return(true);
                    }
                }
                else if (Utils.SleepCheck("moveCloser"))
                {
                    me.Move(pos);
                    Utils.Sleep(200, "moveCloser");
                    return(true);
                }
            }
            if (blink != null && blink.CanBeCasted() && targetDistance > 400 &&
                targetDistance < (blinkRange + hullsum * 2 + me.AttackRange) && Utils.SleepCheck("blink"))
            {
                var position = target.Position;
                if (target.NetworkActivity != NetworkActivity.Idle)
                {
                    position = target.Position + target.Vector3FromPolarAngle() * (hullsum + me.AttackRange);
                    if (mePosition.Distance(position) < targetDistance)
                    {
                        position = target.Position;
                    }
                }
                var dist = position.Distance2D(mePosition);
                if (dist > blinkRange)
                {
                    position = (position - mePosition) * (blinkRange - 1) / position.Distance2D(me) + mePosition;
                }
                blink.UseAbility(position);
                mePosition = position;
                Utils.Sleep(turnTime * 1000 + 100 + Game.Ping, "blink");
                Utils.Sleep(turnTime * 1000 + 50, "move");
                Utils.Sleep(turnTime * 1000, "casting");
                return(true);
            }
            const int Radius    = 300;
            var       canAttack = !target.IsInvul() && !target.IsAttackImmune() && me.CanAttack();

            if (!canAttack)
            {
                return(false);
            }
            if (overpower.CanBeCasted() && Utils.SleepCheck("W") &&
                !(earthshock.CanBeCasted() && enableQ && Utils.ChainStun(target, 0.3 + Game.Ping / 1000, null, false)))
            {
                if (mePosition.Distance2D(target) <= (Radius + hullsum))
                {
                    overpower.UseAbility();
                    Utils.Sleep(overpowerCastPoint * 1000 + Game.Ping, "W");
                    Utils.Sleep(overpowerCastPoint * 1000, "casting");
                    return(true);
                }
            }
            if (!enrage.CanBeCasted() || !Utils.SleepCheck("R"))
            {
                return(false);
            }
            if (!(mePosition.Distance2D(target) <= (Radius + hullsum)))
            {
                return(false);
            }
            enrage.UseAbility();
            Utils.Sleep(100 + Game.Ping, "R");
            Utils.Sleep(100, "casting");
            return(true);
        }
Beispiel #21
0
        /// <summary>
        ///     The game_ on update.
        /// </summary>
        /// <param name="args">
        ///     The args.
        /// </param>
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!loaded)
            {
                me = ObjectMgr.LocalHero;
                if (!Game.IsInGame || me == null)
                {
                    return;
                }

                loaded = true;
                target = null;
                RangeDisplay.Dispose();
                Game.PrintMessage(
                    "<font face='Tahoma'><font color='#000000'>[--</font> <font color='#33ff66'>Orbwalker</font> by <font color='#999999'>MOON</font><font color='#ff9900'>ES</font> loaded! <font color='#000000'>--]</font></font>",
                    MessageType.LogMessage);
            }

            if (me == null || !me.IsValid)
            {
                loaded = false;
                me     = ObjectMgr.LocalHero;

                target = null;
                RangeDisplay.Dispose();
                return;
            }

            RangeDisplay.Me();

            if (Game.IsPaused)
            {
                return;
            }

            if (RangeDisplay.IsDisposed())
            {
                if (me.IsAlive)
                {
                    RangeDisplay.Create();
                }
            }
            else
            {
                if (!me.IsAlive)
                {
                    RangeDisplay.Dispose();
                }
                else if (!RangeDisplay.IsUpdated())
                {
                    RangeDisplay.Update();
                }
            }

            if (target != null && (!target.IsValid || !target.IsVisible || !target.IsAlive || target.Health <= 0))
            {
                target = null;
            }

            var canCancel = Orbwalking.CanCancelAnimation();
            var cd        = Orbwalking.AttackOnCooldown(creepTarget);

            if ((canCancel || !cd) && Utils.SleepCheck("Orbwalk.Attack"))
            {
                if (Utils.SleepCheck("Orbwalker.Update.Target"))
                {
                    if (target != null && !target.IsVisible)
                    {
                        target = me.ClosestToMouseTarget(128);
                    }
                    else if (target == null)
                    {
                        var bestAa = me.BestAATarget();
                        if (bestAa != null)
                        {
                            target = me.BestAATarget();
                        }
                    }

                    Utils.Sleep(500, "Orbwalker.Update.Target");
                }

                if (!Game.IsChatOpen && Game.IsKeyDown(Menu.Item("farmKey").GetValue <KeyBind>().Key) &&
                    (creepTarget == null || !creepTarget.IsValid || !creepTarget.IsAlive || !creepTarget.IsVisible ||
                     Utils.SleepCheck("Orbwalker.Update.Creep")))
                {
                    creepTarget = TargetSelector.GetLowestHPCreep(me, 200);
                    Utils.Sleep(500, "Orbwalker.Update.Creep");
                }
            }

            if (Game.IsChatOpen)
            {
                return;
            }

            if (Game.IsKeyDown(Menu.Item("farmKey").GetValue <KeyBind>().Key))
            {
                Orbwalking.Orbwalk(creepTarget);
                return;
            }

            if (Game.IsKeyDown(Menu.Item("chaseKey").GetValue <KeyBind>().Key))
            {
                Orbwalking.Orbwalk(target, attackmodifiers: true);
                return;
            }

            if (Game.IsKeyDown(Menu.Item("kiteKey").GetValue <KeyBind>().Key))
            {
                Orbwalking.Orbwalk(
                    target,
                    attackmodifiers: true,
                    bonusWindupMs: Menu.Item("bonusWindup").GetValue <Slider>().Value);
            }
        }