/// <summary> /// The OnIssueOrder event delegate. /// Currently used for the first style of fake clicks /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="args"> /// The args. /// </param> private static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && (args.Order == GameObjectOrder.MoveTo || args.Order == GameObjectOrder.AttackUnit || args.Order == GameObjectOrder.AttackTo) && lastOrderTime + r.NextFloat(deltaT, deltaT + .2f) < Game.Time && root.Item("Enable").IsActive() && root.Item("Click Mode").GetValue <StringList>().SelectedIndex == 0) { var vect = args.TargetPosition; vect.Z = player.Position.Z; if (args.Order == GameObjectOrder.AttackUnit || args.Order == GameObjectOrder.AttackTo) { var pos = RandomizePosition(vect); if (MoveCursor) { MouseManager.StartPathWorld(pos); } ShowClick(pos, ClickType.Attack); } else { if (MoveCursor) { MouseManager.StartPathWorld(vect); } ShowClick(vect, ClickType.Move); } lastOrderTime = Game.Time; } }
/// <summary> /// The OnIssueOrder event delegate. /// Currently used for the first style of fake clicks /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="args"> /// The args. /// </param> private static void OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args) { if (sender.IsMe && (args.Order == GameObjectOrder.MoveTo || args.Order == GameObjectOrder.AttackUnit || args.Order == GameObjectOrder.AttackTo) && lastOrderTime + r.NextFloat(deltaT, deltaT + .2f) < Game.Time && root["Enable"].Cast <CheckBox>().CurrentValue&& root["ClickMode"].Cast <ComboBox>().CurrentValue == 0) { var vect = args.TargetPosition; vect.Z = player.Position.Z; if (args.Order == GameObjectOrder.AttackUnit || args.Order == GameObjectOrder.AttackTo) { var pos = RandomizePosition(vect); if (MoveCursor) { MouseManager.StartPathWorld(pos); } ShowClick(pos, ClickType.Attack); } else { if (MoveCursor) { MouseManager.StartPathWorld(vect); } ShowClick(vect, ClickType.Move); } lastOrderTime = Game.Time; } }
/// <summary> /// The before attack fake click. /// Currently used for the second style of fake clicks /// </summary> /// <param name="args"> /// The args. /// </param> private static void BeforeAttackFake(AttackableUnit target, Orbwalker.PreAttackArgs args) { if (root["ClickMode"].Cast <ComboBox>().CurrentValue == 1) { var pos = RandomizePosition(args.Target.Position); if (MoveCursor) { MouseManager.StartPathWorld(pos); } ShowClick(pos, ClickType.Attack); attacking = true; } }
/// <summary> /// The before attack fake click. /// Currently used for the second style of fake clicks /// </summary> /// <param name="args"> /// The args. /// </param> private static void BeforeAttackFake(Orbwalking.BeforeAttackEventArgs args) { if (root.Item("Click Mode").GetValue <StringList>().SelectedIndex == 1) { var pos = RandomizePosition(args.Target.Position); if (MoveCursor) { MouseManager.StartPathWorld(pos); } ShowClick(pos, ClickType.Attack); attacking = true; } }
/// <summary> /// The move fake click after attacking /// </summary> /// <param name="unit"> /// The unit. /// </param> /// <param name="target"> /// The target. /// </param> private static void AfterAttack(AttackableUnit target, EventArgs args) { attacking = false; var t = target as AIHeroClient; if (t != null) { var pos = RandomizePosition(t.Position); if (MoveCursor) { MouseManager.StartPathWorld(pos); } ShowClick(pos, ClickType.Move); } }
/// <summary> /// The move fake click after attacking /// </summary> /// <param name="unit"> /// The unit. /// </param> /// <param name="target"> /// The target. /// </param> private static void AfterAttack(AttackableUnit unit, AttackableUnit target) { attacking = false; var t = target as Obj_AI_Hero; if (t != null && unit.IsMe) { var pos = RandomizePosition(t.Position); if (MoveCursor) { MouseManager.StartPathWorld(pos); } ShowClick(pos, ClickType.Move); } }
/// <summary> /// The fake click before you cast a spell /// </summary> /// <param name="s"> /// The Spell Book. /// </param> /// <param name="args"> /// The args. /// </param> private static void BeforeSpellCast(Spellbook s, SpellbookCastSpellEventArgs args) { var target = args.Target; if (target == null) { return; } if (target.Position.LSDistance(player.Position) >= 5f) { if (MoveCursor) { MouseManager.StartPathWorld(args.Target.Position); } ShowClick(args.Target.Position, ClickType.Attack); } }