Ejemplo n.º 1
0
 private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && IsCastingR && EntityManager.Heroes.Enemies.Any(e => e.IsKillable() && JhinRSector(LastRPosition).IsInside(e)))
     {
         args.Process = false;
     }
 }
Ejemplo n.º 2
0
 private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (Menu.Item("RMovement").IsActive() && sender.IsMe && Player.IsChannelingImportantSpell())
     {
         args.Process = false;
     }
 }
Ejemplo n.º 3
0
 private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && (ObjectManager.Player.IsChannelingImportantSpell() || IsWActive))
     {
         args.Process = false;
     }
 }
Ejemplo n.º 4
0
 static void AIHeroClient_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (IsCastingR && Config.Item("BlockMovement").GetValue <bool>())
     {
         args.Process = false;
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        ///     Fired when a spell has been casted
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void OnObjAiBaseIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            try
            {
                if (!this.Menu.Item("TurnAround").IsActive())
                {
                    return;
                }

                if (sender.IsMe)
                {
                    if (args.Order == GameObjectOrder.MoveTo)
                    {
                        this.lastMove = args.TargetPosition;
                    }
                    if (this.blockMovementTime > Game.Time)
                    {
                        args.Process = false;
                    }
                }
            }
            catch (Exception e)
            {
                Logging.AddEntry(LoggingEntryType.Error, "@TurnAround.cs: An error occurred: {0}", e);
            }
        }
Ejemplo n.º 6
0
        /// <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;
            }
        }
Ejemplo n.º 7
0
 private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && IsCastingR && AutoMenu.CheckBoxValue("Commands"))
     {
         args.Process = false;
     }
 }
Ejemplo n.º 8
0
        private void OnObjAiBaseIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            try
            {
                if (sender == null || !sender.IsValid || !sender.IsMe || args.Order != GameObjectOrder.MoveTo)
                {
                    return;
                }

                if (Environment.TickCount - _lastMovement < _movementDelay)
                {
                    var min = Menu.Item(Name + "DelayMinMovement").GetValue <Slider>().Value;
                    var max = Menu.Item(Name + "DelayMaxMovement").GetValue <Slider>().Value;
                    _movementDelay = _random.Next(Math.Min(min, max), Math.Max(min, max) + 1);
                    args.Process   = false;
                    return;
                }

                _lastMovement = Environment.TickCount;
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Ejemplo n.º 9
0
 internal static void OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && (args.Order == GameObjectOrder.AttackTo || args.Order == GameObjectOrder.AttackUnit || args.Order == GameObjectOrder.MoveTo))
     {
         var isInRange = args.TargetPosition.IsInRange(LastPosition, 300);
         if (args.Order == GameObjectOrder.AttackTo || args.Order == GameObjectOrder.AttackUnit)
         {
             if (args.Target != null && (Core.GameTickCount > _lastAttackProcessed + _nextIssueOrderOffset || !isInRange))
             {
                 RandomizeTargetedClick(args.Target);
                 _lastAttackProcessed  = Core.GameTickCount;
                 LastPosition          = args.TargetPosition;
                 _nextIssueOrderOffset = Random.Next(MinDelay, MaxDelay);
             }
         }
         else if (args.Order == GameObjectOrder.MoveTo)
         {
             if (Core.GameTickCount > _lastMovementProcessed + _nextIssueOrderOffset || !isInRange)
             {
                 //Hud.ShowClick(ClickType.Move, args.TargetPosition);
                 _lastMovementProcessed = Core.GameTickCount;
                 LastPosition           = args.TargetPosition;
                 _nextIssueOrderOffset  = Random.Next(MinDelay, MaxDelay);
             }
         }
     }
 }
Ejemplo n.º 10
0
        private static void OnOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }
            var on = GetBool("disorb", typeof(bool));

            if (!on)
            {
                return;
            }
            var target = TargetSelector.GetTarget(1050, TargetSelector.DamageType.Physical);

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                var spellbook = Player.Spellbook.GetSpell(SpellSlot.W);
                if (spellbook.State == SpellState.Surpressed && W.Level != 0)
                {
                    if (target.Distance(Player) <= Orbwalking.GetRealAutoAttackRange(target) - 10)
                    {
                        if (args.Order == GameObjectOrder.MoveTo)
                        {
                            args.Process = false;
                        }
                    }
                }
            }
        }
Ejemplo n.º 11
0
        private void Hero_OnIssueOrder(Obj_AI_Base hero, PlayerIssueOrderEventArgs args)
        {
            _checkPing = false;

            var   distance = MyHero.Position.To2D().Distance(MyHero.ServerPosition.To2D());
            float moveTime = 1000 * distance / MyHero.MoveSpeed;

            //ConsoleDebug.WriteLine("Extra Delay: " + moveTime);

            if (!Config.Properties.GetBool(ConfigValue.AutoSetPing))
            {
                return;
            }

            if (!hero.IsMe)
            {
                return;
            }

            _lastIssueOrderArgs = args;

            if (args.Order == GameObjectOrder.MoveTo)
            {
                if (MyHero.IsMoving && MyHero.Path.Count() > 0)
                {
                    _lastMoveToServerPos = MyHero.ServerPosition.To2D();
                    _lastPathEndPos      = MyHero.Path.Last().To2D();
                    _checkPing           = true;
                }
            }
        }
Ejemplo n.º 12
0
 static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (catchaxe)
     {
         if (sender.IsMe)
         {
             if (args.Order == GameObjectOrder.MoveTo)
             {
                 if (_bestDropObject != null)
                 {
                     if (_bestDropObject.IsValid)
                     {
                         if (_bestDropObject.Position.Distance(myHero.Position) < 120)
                         {
                             if (_bestDropObject.Position.Distance(args.TargetPosition) >= 120)
                             {
                                 for (var i = _bestDropObject.Position.Distance(args.TargetPosition); i > 0; i = i - 1)
                                 {
                                     var position = myHero.Position.Extend(args.TargetPosition, i);
                                     if (_bestDropObject.Position.Distance(position) < 120)
                                     {
                                         Player.IssueOrder(GameObjectOrder.MoveTo, (Vector3)position);
                                         args.Process = false;
                                         break;
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 13
0
        private void PlayerOnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            if (args.Order == GameObjectOrder.AttackUnit)
            {
                LastIssueOrderPos =
                    (Player.Instance.Distance(args.Target, true) >
                     Player.Instance.GetAutoAttackRange(args.Target as AttackableUnit).Pow()
                        ? args.Target.Position
                        : Player.Instance.Position).To2D();
            }
            else
            {
                LastIssueOrderPos = (args.Target?.Position ?? args.TargetPosition).To2D();
            }

            if (CurrentEvadeResult != null && CurrentEvadeResult.EnoughTime)
            {
                args.Process = false;
            }
        }
Ejemplo n.º 14
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (MyMenu.RootMenu.Item("combo.disable.movement").IsActive() && sender.IsMe && (ObjectManager.Player.IsChannelingImportantSpell() || Misc.HasUltimate))
     {
         args.Process = false;
     }
 }
Ejemplo n.º 15
0
 /// <summary>
 ///     Called on orbwalker action.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="OrbwalkingActionArgs" /> instance containing the event data.</param>
 public static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (Vars.R.Instance.Name.Equals("JhinRShot") && sender.IsMe)
     {
         args.Process = false;
     }
 }
Ejemplo n.º 16
0
        private static void OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs Args)
        {
            if (Menu.Item("TrunAroundEnabled", true) == null)
            {
                return;
            }

            if (!Menu.Item("TrunAroundEnabled", true).GetValue <bool>())
            {
                return;
            }

            if (sender.IsMe)
            {
                if (Args.Order == GameObjectOrder.MoveTo)
                {
                    lastMove = Args.TargetPosition;
                }

                if (blockMovementTime > Game.Time)
                {
                    Args.Process = false;
                }
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        ///     Fired when a spell has been casted
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void OnObjAiBaseIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            try
            {
                if (!this.Menu.Item("TurnAround").IsActive())
                {
                    return;
                }

                if (sender.IsMe)
                {
                    if (args.Order == GameObjectOrder.MoveTo)
                    {
                        this.lastMove = args.TargetPosition;
                    }
                    if (this.blockMovementTime > Game.Time)
                    {
                        args.Process = false;
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("An error occurred: '{0}'", e);
            }
        }
Ejemplo n.º 18
0
 private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && HasRBuff() && getCheckBoxItem(miscMenu, "motion.katarina.misc.noRCancel"))
     {
         args.Process = false;
     }
 }
Ejemplo n.º 19
0
 private void AIHeroClient_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && Utils.GameTimeTickCount < rStart && args.Order == GameObjectOrder.MoveTo)
     {
         args.Process = false;
     }
 }
Ejemplo n.º 20
0
 private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (IsCastingR && RMenu["Rblock"].Cast <CheckBox>().CurrentValue)
     {
         args.Process = false;
     }
 }
Ejemplo n.º 21
0
 internal static void OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && args.Order == GameObjectOrder.MoveTo)
     {
         //Console.WriteLine(@"Movement Order issued!");
     }
 }
Ejemplo n.º 22
0
 private void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (getCheckBoxItem(rMenu, "RMovement") && sender.IsMe && ObjectManager.Player.IsChannelingImportantSpell())
     {
         args.Process = false;
     }
 }
Ejemplo n.º 23
0
 private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && Environment.TickCount < rStart + 300 && args.Order == GameObjectOrder.MoveTo)
     {
         args.Process = false;
     }
 }
Ejemplo n.º 24
0
 private void OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && IsCastingR)
     {
         args.Process = false;
     }
 }
Ejemplo n.º 25
0
 private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && Damage.HasRBuff())
     {
         args.Process = false;
     }
 }
Ejemplo n.º 26
0
 public static void OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe)
     {
         Mainframe.PlayerIssuePos = args.TargetPosition;
     }
 }
Ejemplo n.º 27
0
 private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && (args.Order.HasFlag(GameObjectOrder.MoveTo) || args.Order.HasFlag(GameObjectOrder.AttackTo)))
     {
         Clicks++;
     }
 }
Ejemplo n.º 28
0
        private void Hero_OnIssueOrder(Obj_AI_Base hero, PlayerIssueOrderEventArgs args)
        {
            checkPing = false;

            var   distance = myHero.Position.To2D().Distance(myHero.ServerPosition.To2D());
            float moveTime = 1000 * distance / myHero.MoveSpeed;

            //Console.WriteLine("Extra Delay: " + moveTime);

            if (ObjectCache.menuCache.cache["AutoSetPingOn"].Cast <CheckBox>().CurrentValue == false)
            {
                return;
            }

            if (!hero.IsMe)
            {
                return;
            }

            lastIssueOrderArgs = args;

            if (args.Order == GameObjectOrder.MoveTo)
            {
                if (myHero.IsMoving && myHero.Path.Count() > 0)
                {
                    lastMoveToServerPos = myHero.ServerPosition.To2D();
                    lastPathEndPos      = myHero.Path.Last().To2D();
                    checkPing           = true;
                }
            }
        }
Ejemplo n.º 29
0
 private static void UltimateTargetingOnIssue(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     var target = args.Target as AIHeroClient;
     var ultTarget = GetUltimateTarget();
     if (!target.IsValid() || !ultTarget.IsValidTarget() || target.NetworkId != ultTarget.NetworkId)
         args.Process = false;
 }
Ejemplo n.º 30
0
        private static void OnOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }
            var on = getCheckBoxItem(MenuConfig.Config, "disorb");

            if (!on)
            {
                return;
            }
            var target = TargetSelector.GetTarget(1050, DamageType.Physical);

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                var spellbook = Player.Spellbook.GetSpell(SpellSlot.W);
                if (spellbook.State == SpellState.Surpressed && W.Level != 0)
                {
                    if (target.LSDistance(Player) <= Orbwalking.GetRealAutoAttackRange(target) - 10)
                    {
                        if (args.Order == GameObjectOrder.MoveTo)
                        {
                            args.Process = false;
                        }
                    }
                }
            }
        }
Ejemplo n.º 31
0
        private void PlayerOnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            if (args.Order == GameObjectOrder.AttackUnit)
            {
                LastIssueOrderPos =
                    (Player.Instance.Distance(args.Target, true) >
                     Player.Instance.GetAutoAttackRange(args.Target as AttackableUnit).Pow()
                        ? args.Target.Position
                        : Player.Instance.Position).To2D();
            }
            else
            {
                LastIssueOrderPos = (args.Target?.Position ?? args.TargetPosition).To2D();
            }

            if (IsPathSafeEx(args.TargetPosition.To2D()) && !IsHeroInDanger())
            {
                //Chat.Print(Environment.TickCount);
                CurrentEvadeResult = null;
            }

            if (CurrentEvadeResult != null && CurrentEvadeResult.EnoughTime)
            {
                args.Process = false;
            }
        }
Ejemplo n.º 32
0
 private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && args.Order == GameObjectOrder.AttackUnit && player.HasBuff("KhazixRStealth")
         && menu.Combo["NoAA"].Cast<CheckBox>().CurrentValue)
     {
         args.Process = false;
     }
 }
Ejemplo n.º 33
0
 private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (!sender.IsMe
         || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)
         || !args.Order.HasFlag(GameObjectOrder.AttackUnit)
         || !Player.HasBuff("RengarR")
         || args.Target == null || !args.Target.IsValid || !(args.Target is AIHeroClient))
         return;
     UltimateTargetingOnIssue(sender, args);
 }
Ejemplo n.º 34
0
 public static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     /// <summary>
     ///     Stop movement commands while channeling E.
     /// </summary>
     if (GameObjects.Player.HasBuff("pantheonesound"))
     {
         args.Process = false;
     }
 }
Ejemplo n.º 35
0
 public static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && !args.IsAttackMove)
     {
         if (args.Order == GameObjectOrder.AttackUnit ||
             args.Order == GameObjectOrder.AttackTo &&
             !_menu["Attacks"].Cast<CheckBox>().CurrentValue)
             return;
         }
         _movementhavebeenrandomized = false;
 }
Ejemplo n.º 36
0
 private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (!OrbwalkLastClickActive)
         return;
     if (!sender.IsMe)
         return;
     if (args.Order != GameObjectOrder.MoveTo)
         return;
     if (!Orbwalker.CanMove || Player.IsCastingInterruptableSpell())
         args.Process = false;
 }
Ejemplo n.º 37
0
 void IssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && ShouldGetExecuted()
         && (args.Order == GameObjectOrder.AttackUnit || args.Order == GameObjectOrder.AttackTo)
         &&
         (Variables._Player.CountEnemiesInRange(1000f) >
          Manager.MenuManager.RNoAASlider)
         && Variables.UltActive() || Variables._Player.HasBuffOfType(BuffType.Invisibility)
         && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         args.Process = false;
     }
 }
Ejemplo n.º 38
0
 private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (LastMove.Any(m => m.Order == args.Order && args.TargetPosition == m.Pos && DateTime.Now - m.Time < TimeSpan.FromSeconds(0.1)))
     {
         args.Process = false;
     }
     else if (LastMove.Any(m => m.Order == args.Order))
     {
         LastMove.Remove(LastMove.Find(m => m.Order == args.Order));
         LastMove.Add(new IssueOrder(DateTime.Now, args.TargetPosition, args.Order));
     }
     else
     {
         LastMove.Add(new IssueOrder(DateTime.Now, args.TargetPosition, args.Order));
     }
 }
Ejemplo n.º 39
0
        public static void IssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            if (sender.IsMe && args.Order.HasFlag(GameObjectOrder.AttackUnit))
            {
                Variables.lastaaclick = Game.Time * 1000;
            }

            if (sender.IsMe
                && (args.Order == GameObjectOrder.AttackUnit || args.Order == GameObjectOrder.AttackTo)
                &&
                (MenuManager.ComboMenu["RnoAA"].Cast<CheckBox>().CurrentValue &&
                 Variables._Player.CountEnemiesInRange(1000f) >
                 MenuManager.ComboMenu["RnoAAs"].Cast<Slider>().CurrentValue)
                && Functions.Events._player.UltActive() || Variables._Player.HasBuffOfType(BuffType.Invisibility)
                && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                args.Process = false;
            }
        }
Ejemplo n.º 40
0
        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) &&
                lastclick + r.NextFloat(0.2f, 0.2f + .2f) < Game.Time)
            {
                var clickpos = args.TargetPosition;
                if (args.Order == GameObjectOrder.AttackUnit || args.Order == GameObjectOrder.AttackTo)
                {
                    ShowClick(Randomize(clickpos), ClickType.Attack);
                }
                else
                {
                    ShowClick(clickpos, ClickType.Move);
                }

                lastclick = Game.Time;
            }
        }
Ejemplo n.º 41
0
        private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            if (!sender.IsMe)
                return;

            if (blockMove && !args.IsAttackMove)
            {
                args.Process = false;
            }
            if (blockAttack && args.IsAttackMove)
            {
                args.Process = false;
            }
        }
Ejemplo n.º 42
0
 public static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     _player.IssueOrder(sender, args);
 }
Ejemplo n.º 43
0
        private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            if (sender == null || !sender.IsValid || !sender.IsMe)
            {
                return;
            }

            if (args.Order == GameObjectOrder.Stop || args.Order == GameObjectOrder.HoldPosition)
            {
                return;
            }

            var target = args.Target as Obj_AI_Base;

            // target offscreen
            if (target != null && !target.IsHPBarRendered) {}

            //StartPathWorld(args.TargetPosition);
        }
Ejemplo n.º 44
0
 private void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (getCheckBoxItem(rMenu, "RMovement") && sender.IsMe && ObjectManager.Player.IsChannelingImportantSpell())
     {
         args.Process = false;
     }
 }
Ejemplo n.º 45
0
        private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            try
            {

            }
            catch (Exception)
            {
                if (NowTime() > ErrorTime)
                {
                    Chat.Print(ChampName + " in FreshBooster isn't Load. Error Code 11");
                    ErrorTime = TickCount(10000);
                }
            }

        }
Ejemplo n.º 46
0
        private void Game_OnIssueOrder(Obj_AI_Base hero, PlayerIssueOrderEventArgs args)
        {
            if (!hero.IsMe)
                return;

            if (!Situation.ShouldDodge())
                return;

            if (args.Order == GameObjectOrder.MoveTo)
            {
                //movement block code goes in here
                if (isDodging && SpellDetector.spells.Count() > 0)
                {
                    CheckHeroInDanger();

                    lastBlockedUserMoveTo = new EvadeCommand
                    {
                        order = EvadeOrderCommand.MoveTo,
                        targetPosition = args.TargetPosition.To2D(),
                        timestamp = EvadeUtils.TickCount,
                        isProcessed = false,
                    };

                    args.Process = false; //Block the command
                }
                else
                {
                    var movePos = args.TargetPosition.To2D();
                    var extraDelay = ObjectCache.menuCache.cache["ExtraPingBuffer"].Cast<Slider>().CurrentValue;
                    if (EvadeHelper.CheckMovePath(movePos, ObjectCache.gamePing + extraDelay))
                    {
                        /*if (ObjectCache.menuCache.cache["AllowCrossing"].Cast<CheckBox>().CurrentValue)
                        {
                            var extraDelayBuffer = ObjectCache.menuCache.cache["ExtraPingBuffer"]
                                .Cast<Slider>().CurrentValue + 30;
                            var extraDist = ObjectCache.menuCache.cache["ExtraCPADistance"]
                                .Cast<Slider>().CurrentValue + 10;

                            var tPosInfo = EvadeHelper.CanHeroWalkToPos(movePos, ObjectCache.myHeroCache.moveSpeed, extraDelayBuffer + ObjectCache.gamePing, extraDist);

                            if (tPosInfo.posDangerLevel == 0)
                            {
                                lastPosInfo = tPosInfo;
                                return;
                            }
                        }*/

                        lastBlockedUserMoveTo = new EvadeCommand
                        {
                            order = EvadeOrderCommand.MoveTo,
                            targetPosition = args.TargetPosition.To2D(),
                            timestamp = EvadeUtils.TickCount,
                            isProcessed = false,
                        };

                        args.Process = false; //Block the command

                        if (EvadeUtils.TickCount - lastMovementBlockTime < 500 &&
                            lastMovementBlockPos.Distance(args.TargetPosition) < 100)
                        {
                            return;
                        }

                        lastMovementBlockPos = args.TargetPosition;
                        lastMovementBlockTime = EvadeUtils.TickCount;

                        var posInfo = EvadeHelper.GetBestPositionMovementBlock(movePos);
                        if (posInfo != null)
                        {
                            EvadeCommand.MoveTo(posInfo.position);
                        }
                        return;
                    }
                    else
                    {
                        lastBlockedUserMoveTo.isProcessed = true;
                    }
                }
            }
            else //need more logic
            {
                if (isDodging)
                {
                    args.Process = false; //Block the command
                }
                else
                {
                    if (args.Order == GameObjectOrder.AttackUnit)
                    {
                        var target = args.Target;
                        if (target != null && target.GetType() == typeof(Obj_AI_Base) && ((Obj_AI_Base) target).IsValid())
                        {
                            var baseTarget = target as Obj_AI_Base;
                            if (ObjectCache.myHeroCache.serverPos2D.Distance(baseTarget.ServerPosition.To2D()) >
                                myHero.AttackRange + ObjectCache.myHeroCache.boundingRadius + baseTarget.BoundingRadius)
                            {
                                var movePos = args.TargetPosition.To2D();
                                var extraDelay = ObjectCache.menuCache.cache["ExtraPingBuffer"].Cast<Slider>().CurrentValue;
                                if (EvadeHelper.CheckMovePath(movePos, ObjectCache.gamePing + extraDelay))
                                {
                                    args.Process = false; //Block the command
                                    return;
                                }
                            }
                        }
                    }
                }
            }

            if (args.Process == true)
            {
                lastIssueOrderGameTime = Game.Time*1000;
                lastIssueOrderTime = EvadeUtils.TickCount;
                lastIssueOrderArgs = args;

                if (args.Order == GameObjectOrder.MoveTo)
                {
                    lastMoveToPosition = args.TargetPosition.To2D();
                    lastMoveToServerPos = myHero.ServerPosition.To2D();
                }

                if (args.Order == GameObjectOrder.Stop)
                {
                    lastStopPosition = myHero.ServerPosition.To2D();
                }
            }
        }
Ejemplo n.º 47
0
        private void Game_OnIssueOrder(Obj_AI_Base hero, PlayerIssueOrderEventArgs args)
        {
            if (!hero.IsMe)
                return;

            if (!Situation.ShouldDodge())
                return;
            //DebugIssueOrders(args);

            if (args.Order == GameObjectOrder.MoveTo)
            {
                //movement block code goes in here
                if (IsDodging && SpellDetector.Spells.Count > 0)
                {
                    ConsoleDebug.WriteLineColor("Issue Order detected while spells exist", ConsoleColor.Yellow);
                    CheckHeroInDanger();

                    LastBlockedUserMoveTo = new EvadeCommand
                    {
                        Order = EvadeOrderCommand.MoveTo,
                        TargetPosition = args.TargetPosition.To2D(),
                        Timestamp = EvadeUtils.TickCount,
                        IsProcessed = false,
                    };

                    args.Process = false; //Block the command
                    ConsoleDebug.WriteLineColor("   Blocked Movement Command", ConsoleColor.Red);
                }
                else
                {
                    var movePos = args.TargetPosition.To2D();
                    var extraDelay = Config.Properties.GetInt(ConfigValue.ExtraPingBuffer);
                    if (EvadeHelper.CheckMovePath(movePos, Game.Ping + extraDelay))
                    {
                        ConsoleDebug.WriteLineColor("Move Path is colliding with spell", ConsoleColor.Yellow);
                        /*if (() Properties.Properties.Data["AllowCrossing"].Cast<CheckBox>().CurrentValue)
                        {
                            var extraDelayBuffer = () Properties.Properties.Data["ExtraPingBuffer"]
                                 + 30;
                            var extraDist = () Properties.Properties.Data["ExtraCPADistance"]
                                 + 10;

                            var tPosInfo = EvadeHelper.CanHeroWalkToPos(movePos, GameData.HeroInfo.moveSpeed, extraDelayBuffer + Game.Ping, extraDist);

                            if (tPosInfo.posDangerLevel == 0)
                            {
                                lastPosInfo = tPosInfo;
                                return;
                            }
                        }*/

                        LastBlockedUserMoveTo = new EvadeCommand
                        {
                            Order = EvadeOrderCommand.MoveTo,
                            TargetPosition = args.TargetPosition.To2D(),
                            Timestamp = EvadeUtils.TickCount,
                            IsProcessed = false,
                        };

                        args.Process = false; //Block the command
                        ConsoleDebug.WriteLineColor("   Blocked Movement Command", ConsoleColor.Red);
                        if (EvadeUtils.TickCount - LastMovementBlockTime < 500 && LastMovementBlockPos.Distance(args.TargetPosition) < 100)
                        {
                            return;
                        }

                        LastMovementBlockPos = args.TargetPosition;
                        LastMovementBlockTime = EvadeUtils.TickCount;

                        var posInfo = EvadeHelper.GetBestPositionMovementBlock(movePos);
                        if (posInfo != null)
                        {
                            EvadeCommand.MoveTo(posInfo.Position);
                        }
                        return;
                    }
                    else
                    {
                        LastBlockedUserMoveTo.IsProcessed = true;
                    }
                }
            }
            else //need more logic
            {
                if (IsDodging)
                {
                    args.Process = false; //Block the command
                    ConsoleDebug.WriteLineColor("   Blocked IssueOrder(" + args.Order + ") Command", ConsoleColor.Red);
                }
                else
                {
                    if (args.Order == GameObjectOrder.AttackUnit)
                    {
                        var target = args.Target;
                        if (target != null && target.GetType() == typeof(Obj_AI_Base))
                        {
                            var baseTarget = (Obj_AI_Base)target;
                            if (baseTarget.IsValid())
                                if (GameData.HeroInfo.ServerPos2D.Distance(baseTarget.ServerPosition.To2D()) > GameData.MyHero.AttackRange + GameData.HeroInfo.BoundingRadius + baseTarget.BoundingRadius)
                                {
                                    var movePos = args.TargetPosition.To2D();
                                    var extraDelay = Config.Properties.GetInt(ConfigValue.ExtraPingBuffer);
                                    if (EvadeHelper.CheckMovePath(movePos, Game.Ping + extraDelay))
                                    {
                                        args.Process = false; //Block the command
                                        ConsoleDebug.WriteLineColor("   Blocked Attack Unit Command", ConsoleColor.Red);
                                        return;
                                    }
                                }
                        }
                    }
                }
            }

            if (args.Process == true)
            {
                LastIssueOrderGameTime = Game.Time * 1000;
                LastIssueOrderTime = EvadeUtils.TickCount;
                LastIssueOrderArgs = args;

                if (args.Order == GameObjectOrder.MoveTo)
                {
                    LastMoveToPosition = args.TargetPosition.To2D();
                    LastMoveToServerPos = GameData.MyHero.ServerPosition.To2D();
                }

                if (args.Order == GameObjectOrder.Stop)
                {
                    LastStopPosition = GameData.MyHero.ServerPosition.To2D();
                }
            }
        }
Ejemplo n.º 48
0
        private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            var senderValid = sender != null && sender.IsValid && sender.IsMe;

            if (!senderValid || args.Order != GameObjectOrder.MoveTo || !getCheckBoxItem(move, "MovementEnabled"))
            {
                return;
            }
            if (LastMovementPosition != Vector3.Zero && args.TargetPosition.LSDistance(LastMovementPosition) < 300)
            {
                if (NextMovementDelay == 0)
                {
                    var min = getSliderItem(move, "MinDelay");
                    var max = getSliderItem(move, "MaxDelay");
                    NextMovementDelay = min > max ? min : WeightedRandom.Next(min, max);
                }

                if (getCheckBoxItem(move, "MovementHumanizeRate") && LastMove.TimeSince() < NextMovementDelay)
                {
                    NextMovementDelay = 0;
                    BlockedMoveCount++;
                    args.Process = false;
                    return;
                }

                if (getCheckBoxItem(move, "MovementHumanizeDistance"))
                {
                    var wp = ObjectManager.Player.GetWaypoints();
                    if (args.TargetPosition.LSDistance(Player.ServerPosition) < 50)
                    {
                        BlockedMoveCount++;
                        args.Process = false;
                        return;
                    }
                }
            }

            LastMovementPosition = args.TargetPosition;
            LastMove = Utils.TickCount;
        }
Ejemplo n.º 49
0
        private static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            try
            {
                if (Standarts.Rengar.IsDead)
                {
                    return;
                }

                if (!sender.IsMe
                    || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)
                    || !args.Order.HasFlag(GameObjectOrder.AttackUnit)
                    || !Standarts.RengarHasUltimate
                    || args.Target == null || !args.Target.IsValid || !(args.Target is AIHeroClient))
                    return;
                UltimateTargetingOnIssue(sender, args);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Ejemplo n.º 50
0
        public static void Player_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs issueOrderEventArgs)
        {
            if (sender.IsMe && !issueOrderEventArgs.IsAttackMove)
            {
                if (issueOrderEventArgs.Order == GameObjectOrder.AttackUnit ||
                    issueOrderEventArgs.Order == GameObjectOrder.AttackTo &&
                    !_menu["Attacks"].Cast<CheckBox>().CurrentValue)
                    return;
                if (issueOrderEventArgs.Order == GameObjectOrder.MoveTo &&
                    !_menu["Movements"].Cast<CheckBox>().CurrentValue)
                    return;
            }

            var orderName = issueOrderEventArgs.Order.ToString();
            var order = _lastCommandT.FirstOrDefault(e => e.Key == orderName);
            if (Environment.TickCount - order.Value<
                Randomize(
                    1000 / _menu["MaxClicks"].Cast<Slider>().CurrentValue,
                    1000 / _menu["MinClicks"].Cast<Slider>().CurrentValue) + _random.Next(-10, 10))
            {
                BlockedCount += 1;
                issueOrderEventArgs.Process = false;
                return;
            }
            if (issueOrderEventArgs.Order == GameObjectOrder.MoveTo &&
                        issueOrderEventArgs.TargetPosition.IsValid() && !_thisMovementCommandHasBeenTamperedWith)
            {
                _thisMovementCommandHasBeenTamperedWith = true;
                issueOrderEventArgs.Process = false;
                Player.IssueOrder(GameObjectOrder.MoveTo,
                    Randomize(issueOrderEventArgs.TargetPosition, -10, 10));
            }
            _thisMovementCommandHasBeenTamperedWith = false;
            _lastCommandT.Remove(orderName);
            _lastCommandT.Add(orderName, Environment.TickCount);
        }
Ejemplo n.º 51
0
 private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (sender.IsMe && HasRBuff() && getCheckBoxItem(miscMenu, "motion.katarina.misc.noRCancel"))
         args.Process = false;
 }
Ejemplo n.º 52
0
 private static void OnOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (!sender.IsMe) return;
     var on = getCheckBoxItem(MenuConfig.Config, "disorb");
     if (!on) return;
     var target = TargetSelector.GetTarget(1050, DamageType.Physical);
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         var spellbook = Player.Spellbook.GetSpell(SpellSlot.W);
         if (spellbook.State == SpellState.Surpressed && W.Level != 0)
         {
             if (target.LSDistance(Player) <= Orbwalking.GetRealAutoAttackRange(target) - 10)
             {
                 if (args.Order == GameObjectOrder.MoveTo)
                 {
                     args.Process = false;
                 }
             }
         }
     }
 }
Ejemplo n.º 53
0
 public void CheckLastMoveTo()
 {
     if (ConfigValue.FastMovementBlock.GetBool())
     {
         if (IsDodging == false && LastIssueOrderArgs != null && LastIssueOrderArgs.Order == GameObjectOrder.MoveTo && Game.Time*1000 - LastIssueOrderGameTime < 500)
         {
             Game_OnIssueOrder(GameData.MyHero, LastIssueOrderArgs);
             LastIssueOrderArgs = null;
         }
     }
 }
Ejemplo n.º 54
0
 private static void DebugIssueOrders(PlayerIssueOrderEventArgs args)
 {
     switch (args.Order)
     {
         case GameObjectOrder.HoldPosition:
             ConsoleDebug.WriteLineColor("HoldPosition: " + args.TargetPosition, ConsoleColor.Blue);
             break;
         case GameObjectOrder.MoveTo:
             ConsoleDebug.WriteLineColor("MoveTo: " + args.TargetPosition, ConsoleColor.Blue);
             break;
         case GameObjectOrder.AttackUnit:
             ConsoleDebug.WriteLineColor("AttackUnit: " + args.Target.Name, ConsoleColor.Blue);
             break;
         case GameObjectOrder.AutoAttackPet:
             ConsoleDebug.WriteLineColor("AutoAttackPet: " + args.Target.Name, ConsoleColor.Blue);
             break;
         case GameObjectOrder.AutoAttack:
             ConsoleDebug.WriteLineColor("AutoAttack: " + args.Target.Name, ConsoleColor.Blue);
             break;
         case GameObjectOrder.MovePet:
             ConsoleDebug.WriteLineColor("MovePet: " + args.TargetPosition, ConsoleColor.Blue);
             break;
         case GameObjectOrder.AttackTo:
             ConsoleDebug.WriteLineColor("AttackTo: " + args.TargetPosition, ConsoleColor.Blue);
             break;
         case GameObjectOrder.Stop:
             ConsoleDebug.WriteLineColor("Stop: " + args.TargetPosition, ConsoleColor.Blue);
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
     ConsoleDebug.WriteLineColor(NavMesh.GetCollisionFlags(args.TargetPosition), ConsoleColor.DarkMagenta);
 }
Ejemplo n.º 55
0
        public bool DoEvade(Vector3[] desiredPath = null, PlayerIssueOrderEventArgs args = null)
        {
            if (!EvadeEnabled || Player.Instance.IsDead || Player.Instance.IsDashing())
            {
                LastEvadeResult = null;
                AutoPathing.StopPath();
                return false;
            }

            var hero = Player.Instance;

            if (args != null && args.Order == GameObjectOrder.AttackUnit)
            {
                if (!hero.IsInAutoAttackRange((AttackableUnit)args.Target))
                {
                    desiredPath = hero.GetPath(args.Target.Position, true);
                }
            }

            if (IsHeroInDanger(hero))
            {
                if (LastEvadeResult != null && (!IsPointSafe(LastEvadeResult.EvadePoint) || LastEvadeResult.Expired()))
                {
                    // LastEvadeResult = null;
                }

                var evade = CalculateEvade(LastIssueOrderPos);
                if (evade.IsValid && evade.EnoughTime)
                {
                    if (LastEvadeResult == null ||
                        (LastEvadeResult.EvadePoint.Distance(evade.EvadePoint, true) > 500.Pow() &&
                         AllowRecalculateEvade))
                    {
                        LastEvadeResult = evade;
                    }
                }
                else
                {
                    if (!evade.EnoughTime && LastEvadeResult == null && !IsHeroPathSafe(evade, desiredPath))
                    {
                        return EvadeSpellManager.ProcessFlash(this);
                    }
                }

                if (LastEvadeResult != null) //&& LastEvadeResult.EvadePoint.Distance(hero) > hero.HitBoxRadius()
                {
                    var isPathSafe = IsHeroPathSafe(evade, desiredPath);

                    if (!hero.IsMovingTowards(LastEvadeResult.WalkPoint) || !isPathSafe)
                    {
                        AutoPathing.StopPath();
                        MoveTo(LastEvadeResult.WalkPoint, false);
                    }

                    return true;
                }
            }
            else if (!IsPathSafe(hero.RealPath()) || (desiredPath != null && !IsPathSafe(desiredPath)))
            {
                var path = PathFinding.GetPath(hero.Position.To2D(), LastIssueOrderPos);
                var evade = CalculateEvade(LastIssueOrderPos);

                if (evade.IsValid)
                {
                    path = new[] {evade.EvadePoint}.Concat(path).ToArray();
                }

                if (path.Length > 0 && AutoPathing.Destination.Distance(path.Last(), true) > 50.Pow())
                {
                    AutoPathing.DoPath(path);
                }

                LastEvadeResult = null;
                return desiredPath != null;
            }
            else
            {
                AutoPathing.StopPath();
                LastEvadeResult = null;
            }

            return false;
        }
Ejemplo n.º 56
0
 private static void UltimateTargetingOnIssue(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     try
     {
         var target = args.Target as AIHeroClient;
         var ultTarget = GetUltimateTarget();
         if (!target.IsValid() || !ultTarget.IsValidTarget() || target.NetworkId != ultTarget.NetworkId)
             args.Process = false;
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
 }
Ejemplo n.º 57
0
 public void CheckLastMoveTo()
 {
     if (ObjectCache.menuCache.cache["FastMovementBlock"].Cast<CheckBox>().CurrentValue)
     {
         if (isDodging == false && lastIssueOrderArgs != null
             && lastIssueOrderArgs.Order == GameObjectOrder.MoveTo
             && Game.Time*1000 - lastIssueOrderGameTime < 500)
         {
             Game_OnIssueOrder(myHero, lastIssueOrderArgs);
             lastIssueOrderArgs = null;
         }
     }
 }
Ejemplo n.º 58
0
        /// <summary>
        /// Used to block the movement to avoid entering in dangerous areas.
        /// </summary>
        /// 
        private static void ObjAiHeroOnOnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            //Don't block the movement packets if cant find an evade point.
            if (NoSolutionFound)
            {
                return;
            }

            //Spell Shielded
            if (ObjectManager.Player.IsSpellShielded())
            {
                return;
            }

            if (args.Order == GameObjectOrder.MoveTo || args.Order == GameObjectOrder.AttackTo)
            {
                EvadeToPoint.X = args.TargetPosition.X;
                EvadeToPoint.Y = args.TargetPosition.Y;
                Keepfollowing = false;
                FollowPath = false;
            }
            else
            {
                EvadeToPoint.X = 0;
                EvadeToPoint.Y = 0;
            }

            var myPath =
                ObjectManager.Player.GetPath(
                    new Vector3(args.TargetPosition.X, args.TargetPosition.Y, ObjectManager.Player.ServerPosition.Z)).To2DList();
            var safeResult = IsSafe(PlayerPosition);

            //If we are evading:
            if (Evading || !safeResult.IsSafe)
            {
                var rcSafePath = IsSafePath(myPath, Config.EvadingRouteChangeTimeOffset);
                if (args.Order == GameObjectOrder.MoveTo)
                {
                    if (Evading &&
                        Utils.TickCount - Config.LastEvadePointChangeT > Config.EvadePointChangeInterval)
                    {
                        //Update the evade point to the closest one:
                        var points = Evader.GetEvadePoints(-1, 0, false, true);
                        if (points.Count > 0)
                        {
                            var to = new Vector2(args.TargetPosition.X, args.TargetPosition.Y);
                            EvadePoint = to.Closest(points);
                            Evading = true;
                            Config.LastEvadePointChangeT = Utils.TickCount;
                        }
                    }

                    //If the path is safe let the user follow it.
                    if (rcSafePath.IsSafe && IsSafe(myPath[myPath.Count - 1]).IsSafe && args.Order == GameObjectOrder.MoveTo)
                    {
                        EvadePoint = myPath[myPath.Count - 1];
                        Evading = true;
                    }
                }

                //Block the packets if we are evading or not safe.
                args.Process = false;
                return;
            }

            var safePath = IsSafePath(myPath, Config.CrossingTimeOffset);

            //Not evading, outside the skillshots.
            //The path is not safe, stop in the intersection point.
            if (!safePath.IsSafe && args.Order != GameObjectOrder.AttackUnit)
            {
                if (safePath.Intersection.Valid)
                {
                    if (ObjectManager.Player.LSDistance(safePath.Intersection.Point) > 75)
                    {
                        ObjectManager.Player.SendMovePacket(safePath.Intersection.Point);
                    }
                }
                FollowPath = true;
                args.Process = false;
            }
            else if(safePath.IsSafe && args.Order != GameObjectOrder.AttackUnit)
            {
                FollowPath = false;
            }

            //AutoAttacks.
            if (!safePath.IsSafe && args.Order == GameObjectOrder.AttackUnit)
            {
                var target = args.Target;
                if (target != null && target.IsValid<Obj_AI_Base>() && target.IsVisible)
                {
                    //Out of attack range.
                    if (PlayerPosition.LSDistance(((Obj_AI_Base)target).ServerPosition) >
                        ObjectManager.Player.AttackRange + ObjectManager.Player.BoundingRadius +
                        target.BoundingRadius)
                    {
                        if (safePath.Intersection.Valid)
                        {
                            ObjectManager.Player.SendMovePacket(safePath.Intersection.Point);
                        }
                        args.Process = false;
                    }
                }
            }
        }
Ejemplo n.º 59
0
        private void PlayerOnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            if (args.Order == GameObjectOrder.AttackUnit)
            {
                LastIssueOrderPos =
                    (Player.Instance.Distance(args.Target, true) >
                     Player.Instance.GetAutoAttackRange(args.Target as AttackableUnit).Pow()
                        ? args.Target.Position
                        : Player.Instance.Position).To2D();
            }
            else
            {
                LastIssueOrderPos = (args.Target != null ? args.Target.Position : args.TargetPosition).To2D();
            }

            CacheSkillshots();
            switch (args.Order)
            {
                case GameObjectOrder.Stop:
                    if (DoEvade(null, args))
                    {
                        args.Process = false;
                    }
                    break;

                case GameObjectOrder.HoldPosition:
                    if (DoEvade(null, args))
                    {
                        args.Process = false;
                    }
                    break;

                case GameObjectOrder.AttackUnit:
                    if (DoEvade(null, args))
                    {
                        args.Process = false;
                    }
                    break;

                default:
                    if (DoEvade(Player.Instance.GetPath(LastIssueOrderPos.To3DWorld(), true), args))
                    {
                        args.Process = false;
                    }
                    break;
            }
        }
Ejemplo n.º 60
0
 private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, PlayerIssueOrderEventArgs args)
 {
     if (args.Order == GameObjectOrder.AttackUnit && Q.IsCharging)
     {
         Program.debug("BADDDD");
         EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
         args.Process = false;
     }
 }