/// <summary> /// The move mode. /// </summary> /// <param name="unitTarget"> /// The unit target. /// </param> public static void MoveMode(Unit unitTarget) { var mode = MainMenu.ComboKeysMenu.Item("Ability.KeyCombo.Mode").GetValue <StringList>().SelectedIndex; switch (mode) { case 0: Orbwalking.Orbwalk(unitTarget, attackmodifiers: true); break; case 1: if (!Utils.SleepCheck("Ability.Move")) { return; } Me.Move(Game.MousePosition); Utils.Sleep(100, "Ability.Move"); break; case 2: if (!Utils.SleepCheck("Ability.Move") || unitTarget == null) { return; } Orbwalking.Attack(unitTarget, true); Utils.Sleep(100, "Ability.Move"); break; case 3: return; } }
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"); } } } }