internal static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && args.Order == GameObjectOrder.MoveTo) { //Console.WriteLine(@"Movement Order issued!"); } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender == null || !sender.IsValid || !sender.IsMe) { return; } if (args.Order == GameObjectOrder.MoveTo) { if (Environment.TickCount - LastMove < Menu.Item("MovementDelay").GetValue <Slider>().Value&& Menu.Item("MovementEnabled").GetValue <bool>()) { args.Process = false; return; } if (ObjectHandler.Get <Obj_AI_Turret>().Any(t => t.IsEnemy && t.Distance(args.TargetPosition) < 800) && MetaHandler.CountNearbyAllyMinions( ObjectHandler.Get <Obj_AI_Turret>() .FirstOrDefault(t => t.IsEnemy && t.Distance(args.TargetPosition) < 800), 800) <= 2) { args.Process = false; return; } LastMove = Environment.TickCount; } if (args.Target == null) { return; } if (args.Target.IsEnemy && args.Target is Obj_AI_Hero && sender.UnderTurret(true) && (args.Order == GameObjectOrder.AutoAttack || args.Order == GameObjectOrder.AttackUnit)) { args.Process = false; } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (Menu.Item("RMovement").IsActive() && sender.IsMe && Player.IsChannelingImportantSpell()) { args.Process = false; } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender == null || !sender.IsValid || !sender.IsMe) { return; } else { if (cancelMovt) { blockCount++; if (blockCount == 3) { cancelMovt = false; blockCount = 0; } else args.Process = false; } } //blockCount++; //if (blockCount == 100) //{ // cancelMovt = false; // blockCount = 0; //} //else // packet.Block = true; }
private void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && IsCastingR) { args.Process = false; } }
static void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (IsCastingR && Config.Item("BlockMovement").GetValue <bool>()) { args.Process = false; } }
/// <summary> /// Fired when a spell has been casted /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void OnObjAiBaseIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs 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); } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { var screenPos = Drawing.WorldToScreen(args.TargetPosition); //Console.WriteLine(args.Order); if (Utils.TickCount - LastMouseTime < Config.Item("ClickTime").GetValue <Slider>().Value + (LastMousePos.Distance(screenPos) / 10)) { Console.WriteLine("BLOCK " + args.Order); args.Process = false; return; } //Console.WriteLine("DIS " + LastMousePos.Distance(screenPos) + " TIME " + (Utils.TickCount - LastMouseTime)); if (args.Order == GameObjectOrder.AttackUnit) { LastType = 1; } else { LastType = 0; } LastMouseTime = Utils.TickCount; LastMousePos = screenPos; }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && RTime > Environment.TickCount) { args.Process = false; } }
/// <summary> /// Fired when a spell has been casted /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void OnObjAiBaseIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs 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); } }
static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if ((ObjectManager.Player.IsChannelingImportantSpell() || IsCastingR) && IsSafe()) { args.Process = false; } }
private void OnObjAiBaseIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs 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)); } }
void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (IsCastingR) { args.Process = false; } }
internal static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && args.Order == GameObjectOrder.MoveTo) { //Console.WriteLine(@"Movement Order issued!"); } }
void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (!IsActive()) { return; } if (!sender.IsMe || args.Order != GameObjectOrder.MoveTo) { return; } decimal milli = DateTime.Now.Ticks / (decimal)TimeSpan.TicksPerMillisecond; if (milli - _lastSend < SafeMovementMisc.GetMenuItem("SAssembliesMiscsSafeMovementBlockIntervall") .GetValue <Slider>() .Value) { args.Process = false; } else { _lastSend = milli; } }
private void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (MenuProvider.Champion.Misc.getBoolValue("Auto Catch Axe")) { if (sender.IsMe) { if (args.Order == GameObjectOrder.MoveTo) { if (BestDropObject != null) { if (BestDropObject.IsValid) { if (BestDropObject.Position.Distance(ObjectManager.Player.Position) < 120) { if (BestDropObject.Position.Distance(args.TargetPosition) >= 120) { for (float i = BestDropObject.Position.Distance(args.TargetPosition); i > 0; i = i - 1) { var Position = ObjectManager.Player.Position.Extend(args.TargetPosition, i); if (BestDropObject.Position.Distance(Position) < 120) { ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, Position); args.Process = false; break; } } } } } } } } } }
private static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs 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; } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (MyMenu.RootMenu.Item("combo.disable.movement").IsActive() && sender.IsMe && (ObjectManager.Player.IsChannelingImportantSpell() || Misc.HasUltimate)) { args.Process = false; } }
/// <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; } }
private static void OnOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs 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; } } } } }
private void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && args.Order != GameObjectOrder.HoldPosition && args.Order != GameObjectOrder.Stop) { //SetNewPos(args.TargetPosition); } }
void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (!IsActive()) { return; } }
protected override void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (HasUltiBuff() && Q.IsReady() && sender.CharData.BaseSkinName.Equals("Kalista") && args.Order == GameObjectOrder.AutoAttack && args.Target.IsMe) { if (ComboMenu.Item("QChecks").GetValue <bool>() && Game.CursorPos.IsShroom()) { return; } Q.Cast(Game.CursorPos); } if (Player.HealthPercent > 45 && Player.ManaPercent > 60 && Player.CountEnemiesInRange(1000) <= 2 && sender.IsValid <Obj_AI_Hero>() && sender.IsEnemy && args.Target is Obj_AI_Minion && sender.Distance(Player.ServerPosition) < Orbwalking.GetRealAutoAttackRange(null) + 250) { if (sender.InAArange()) { Orbwalker.ForceTarget(sender); } else { var tumblePos = Player.ServerPosition.Extend(sender.ServerPosition, Player.Distance(sender.ServerPosition) - Orbwalking.GetRealAutoAttackRange(null)); if (!tumblePos.IsShroom() && tumblePos.CountEnemiesInRange(300) == 0 && Q.IsReady()) { Q.Cast(tumblePos); Orbwalker.ForceTarget(sender); } } } }
private static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && Logic.Player.HasBuff("katarinarsound") && Utils.TickCount <= whenToCancelR && Config.GetBoolValue("misc.noRCancel")) { args.Process = false; } }
private void Hero_OnIssueOrder(Obj_AI_Base hero, GameObjectIssueOrderEventArgs 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"].GetValue <bool>() == 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; } } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender == null || !sender.IsValid || !sender.IsMe) { return; } else { if (cancelMovt) { blockCount++; if (blockCount == 3) { cancelMovt = false; blockCount = 0; } else { args.Process = false; } } } //blockCount++; //if (blockCount == 100) //{ // cancelMovt = false; // blockCount = 0; //} //else // packet.Block = true; }
private static void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (!sender.IsMe) { return; } switch (orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.LastHit: case Orbwalking.OrbwalkingMode.LaneClear: if (!GetBool("main.clear.minions")) { if (args.Target is Obj_AI_Minion && args.Order == GameObjectOrder.AttackTo) { args.Process = false; } } break; case Orbwalking.OrbwalkingMode.Mixed: if (!GetBool("main.harass.minions")) { if (args.Target is Obj_AI_Minion && args.Order == GameObjectOrder.AttackTo) { args.Process = false; } } break; } }
private static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (exploitEndTime - new Random().Next(0, 75) > Environment.TickCount) { args.Process = false; } }
private void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && this.HasRBuff() && Utils.GameTimeTickCount <= rStart && this.Menu.Item("ElEasy.Katarina.R.Cancel").IsActive()) { args.Process = false; } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && HasRBuff() && Utils.GameTimeTickCount <= whenToCancelR && _menu.Item("motion.katarina.misc.noRCancel").GetValue <bool>()) { args.Process = false; } }
private void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && Utils.GameTimeTickCount < rStart && args.Order == GameObjectOrder.MoveTo) { args.Process = false; } }
private static void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && Environment.TickCount < rStart + 300 && args.Order == GameObjectOrder.MoveTo) { args.Process = false; } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (_clone != null && !_override && _menu.Item("CloneOverride").IsActive() && sender.NetworkId == _clone.NetworkId) { _override = true; } }
private static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { //Accidental Cancel if (sender.IsMe && Logic.Player.HasBuff("katarinarsound") && Utils.TickCount <= whenToCancelR && Config.GetBoolValue("misc.noRCancel")) { args.Process = false; } }
static void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && args.Order == GameObjectOrder.MoveTo) { if (Config.Item("blockmove").GetValue<bool>()) { args.Process = !Casted; } } }
private static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (!sender.IsMe) return; if (_blockAttack && args.IsAttackMove) { args.Process = false; } }
public static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender == Heroes.Player && args.Order == GameObjectOrder.MoveTo) { var nearbyEnemyTurret = args.TargetPosition.GetClosestEnemyTurret(); if (nearbyEnemyTurret != null && nearbyEnemyTurret.Position.CountNearbyAllyMinions(700) <= 2 && nearbyEnemyTurret.Distance(args.TargetPosition) < 800) { args.Process = false; } } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (!OrbwalkLastClickActive) return; if (!sender.IsMe) return; if (args.Order != GameObjectOrder.MoveTo) return; if (!Orbwalking.CanMove(90) || Player.IsCastingInterruptableSpell()) args.Process = false; }
public override void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe) { if (E.IsCharging) { args.Process = false; orb.SetMovement(false); } } }
private static void OnOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (!sender.IsMe) return; if (MenuManager.Get<KeyBind>("global.cancelkey").Active) { args.Process = true; } else if (Player.HasBuff("KatarinaR") || Player.IsCastingInterruptableSpell()) { args.Process = false; } }
private static void OnObjAiBaseIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { try { if (Enabled && Orders && sender.IsMe) { args.Process = false; } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender == null || !sender.IsValid || !sender.IsMe || args.Order != GameObjectOrder.MoveTo || !Menu.Item("MovementEnabled").GetValue<bool>()) { return; } if (Environment.TickCount - LastMove < Menu.Item("MovementDelay").GetValue<Slider>().Value) { args.Process = false; return; } LastMove = Environment.TickCount; }
//Will work when Jodus implemented it void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (!IsActive() || HeroJungler == null) return; if (sender.NetworkId == HeroJungler.NetworkId) { if (args.Target.NetworkId == ObjectManager.Player.NetworkId) { targeting = true; } else { targeting = false; } } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { var senderValid = sender != null && sender.IsValid && sender.IsMe; if (!senderValid || args.Order != GameObjectOrder.MoveTo || !Menu.Item("MovementEnabled").IsActive()) { return; } if (Utils.TickCount - LastMove < Menu.Item("MovementDelay").GetValue<Slider>().Value) { args.Process = false; return; } LastMove = Utils.TickCount; }
static void GameObject_issueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (!sender.IsMe) return; if (args.Order == GameObjectOrder.AttackUnit) { FakeCursorMove(Drawing.WorldToScreen(args.TargetPosition)); CursorAttack.Visible = true; CursorMove.Visible = false; } if (args.Order == GameObjectOrder.MoveTo) { FakeCursorMove(Drawing.WorldToScreen(args.TargetPosition)); CursorAttack.Visible = false; CursorMove.Visible = true; } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { var senderValid = sender.IsValid() && sender.IsMe; if (!senderValid || !args.Order.Equals(GameObjectOrder.MoveTo) || !Menu.GetValue<MenuBool>("MovementEnabled").Value) { return; } if (Variables.TickCount - LastMove < Menu.GetValue<MenuSlider>("MovementDelay").Value) { args.Process = false; return; } LastMove = Variables.TickCount; }
private void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (this.ShouldGetExecuted()) { if (sender != null && sender.IsMe) { switch (args.Order) { case GameObjectOrder.MoveTo: LastMovementCommandIssued = args.TargetPosition; if (LastCommandTick >= Game.Time) { args.Process = false; } break; } } } }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { var senderValid = sender != null && sender.IsValid && sender.IsMe; if (!senderValid || args.Order != GameObjectOrder.MoveTo || !Menu.Item("MovementEnabled").IsActive()) { return; } var min = Menu.Item("MinDelay").GetValue<Slider>().Value; var max = Menu.Item("MaxDelay").GetValue<Slider>().Value; var delay = min > max ? min : WeightedRandom.Next(min, max); if (Utils.TickCount - LastMove < delay) { args.Process = false; return; } LastMove = Utils.TickCount; }
private static void AntiShrooms(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && args.Order == GameObjectOrder.MoveTo) { //Humanizer if (Environment.TickCount - _lastMovementTick < Config.Item("autosharp.humanizer").GetValue<Slider>().Value) { args.Process = false; } //AntiShrooms if (Traps.EnemyTraps.Any(t => t.Position.Distance(args.TargetPosition) < 125)) { args.Process = false; } //AntiJihadIntoTurret var turretNearTargetPosition = Turrets.EnemyTurrets.FirstOrDefault(t => t.Distance(args.TargetPosition) < 800); if (turretNearTargetPosition != null && turretNearTargetPosition.CountNearbyAllyMinions(800) < 3) { args.Process = false; } //The movement will occur _lastMovementTick = Environment.TickCount; } }
private static void OnIssueOrder(Obj_AI_Base _base, GameObjectIssueOrderEventArgs args) { if (!_base.IsMe) return; //Who cares about anyone else if (args.IsAttackMove) return; // Riot deals with this if (args.Order == GameObjectOrder.AttackUnit) { if (_lastAttackTick - Properties.Time.TickCount < _currentAttackDelay)//Can attack { _lastAttackTick = Properties.Time.TickCount; _currentAttackDelay = Properties.Time.TickCount + 1000 / _random.Next( Properties.MainMenu.Item("sMinAttacks").GetValue<Slider>().Value, Properties.MainMenu.Item("sMaxAttacks").GetValue<Slider>().Value); } else { args.Process = false; BlockedCommands++; } } else if (args.Order == GameObjectOrder.MoveTo) { if (!args.TargetPosition.IsValid()) return; if (_lastMoveTick - Properties.Time.TickCount < _currentMoveDelay)//Can move { _lastMoveTick = Properties.Time.TickCount; _currentMoveDelay = Properties.Time.TickCount + 1000 / _random.Next( Properties.MainMenu.Item("sMinMoves").GetValue<Slider>().Value, Properties.MainMenu.Item("sMaxMoves").GetValue<Slider>().Value); } else { args.Process = false; BlockedCommands++; } } Game.PrintChat(BlockedCommands.ToString()); }
private static void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { var senderValid = sender != null && sender.IsValid && sender.IsMe; if (!senderValid || args.Order != GameObjectOrder.MoveTo || !Menu.Item("MovementEnabled").IsActive()) { return; } if (LastMovementPosition != Vector3.Zero && args.TargetPosition.Distance(LastMovementPosition) < 300) { if (NextMovementDelay == 0) { var min = Menu.Item("MinDelay").GetValue<Slider>().Value; var max = Menu.Item("MaxDelay").GetValue<Slider>().Value; NextMovementDelay = min > max ? min : WeightedRandom.Next(min, max); } if (Menu.Item("MovementHumanizeRate").IsActive() && LastMove.TimeSince() < NextMovementDelay) { NextMovementDelay = 0; BlockedMoveCount++; args.Process = false; return; } if (Menu.Item("MovementHumanizeDistance").IsActive()) { var wp = ObjectManager.Player.GetWaypoints(); /* if (wp.Count > 1 && wp.Last().Distance(args.TargetPosition) < 20) { //Console.WriteLine("HUMANIZE WAYPOINTS"); BlockedMoveCount++; args.Process = false; return; } if (args.TargetPosition.Distance(LastMovementPosition) < 20) { //Console.WriteLine("HUMANIZE LAST POSITION"); BlockedMoveCount++; args.Process = false; return; } */ if (args.TargetPosition.Distance(Player.ServerPosition) < 50) { // Console.WriteLine("HUMANIZE CURRENT POSITION"); BlockedMoveCount++; args.Process = false; return; } } } LastMovementPosition = args.TargetPosition; LastMove = Utils.TickCount; }
private static void OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (!Menu.Item("Attacks.Disabled").GetValue<bool>()) { return; } if (sender.IsMe && args.Order == GameObjectOrder.AttackTo) { args.Process = false; } }
public void CheckLastMoveTo() { if (EvadeHelper.fastEvadeMode || ObjectCache.menuCache.cache["FastMovementBlock"].GetValue<bool>()) { if (isDodging == false && lastIssueOrderArgs != null && lastIssueOrderArgs.Order == GameObjectOrder.MoveTo && Game.Time * 1000 - lastIssueOrderGameTime < 500) { Game_OnIssueOrder(myHero, lastIssueOrderArgs); lastIssueOrderArgs = null; } } }
private void Game_OnIssueOrder(Obj_AI_Base hero, GameObjectIssueOrderEventArgs 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"].GetValue<Slider>().Value; if (EvadeHelper.CheckMovePath(movePos, ObjectCache.gamePing + extraDelay)) { /*if (ObjectCache.menuCache.cache["AllowCrossing"].GetValue<bool>()) { var extraDelayBuffer = ObjectCache.menuCache.cache["ExtraPingBuffer"] .GetValue<Slider>().Value + 30; var extraDist = ObjectCache.menuCache.cache["ExtraCPADistance"] .GetValue<Slider>().Value + 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.IsValid<Obj_AI_Base>()) { 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"].GetValue<Slider>().Value; 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(); } } }
public static void AntiShrooms(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender != null && sender.IsMe) { if (sender.IsDead) { args.Process = false; return; } var turret = Turrets.ClosestEnemyTurret; if (Map == Utility.Map.MapType.SummonersRift && Heroes.Player.HasBuff("Recall") && Heroes.Player.CountEnemiesInRange(1800) == 0 && turret.Distance(Heroes.Player) > 950 && !Minions.EnemyMinions.Any(m => m.Distance(Heroes.Player) < 950)) { args.Process = false; return; } if (args.Order == GameObjectOrder.MoveTo) { if (args.TargetPosition.IsZero) { args.Process = false; return; } if (!args.TargetPosition.IsValid()) { args.Process = false; return; } if (Map == Utility.Map.MapType.SummonersRift && Heroes.Player.InFountain() && Heroes.Player.HealthPercent < 100) { args.Process = false; return; } if (turret != null && turret.Distance(args.TargetPosition) < 950 && turret.CountNearbyAllyMinions(950) < 3) { args.Process = false; return; } } #region BlockAttack if (args.Target != null && args.Order == GameObjectOrder.AttackUnit || args.Order == GameObjectOrder.AttackTo) { if (Config.Item("onlyfarm").GetValue<bool>() && args.Target.IsValid<Obj_AI_Hero>()) { args.Process = false; return; } if (args.Target.IsValid<Obj_AI_Hero>()) { if (Minions.AllyMinions.Count(m => m.Distance(Heroes.Player) < 900) < Minions.EnemyMinions.Count(m => m.Distance(Heroes.Player) < 900)) { args.Process = false; return; } if (((Obj_AI_Hero) args.Target).UnderTurret(true)) { args.Process = false; return; } } if (Heroes.Player.UnderTurret(true) && args.Target.IsValid<Obj_AI_Hero>()) { args.Process = false; return; } if (turret != null && turret.Distance(ObjectManager.Player) < 950 && turret.CountNearbyAllyMinions(950) < 3) { args.Process = false; return; } if (Heroes.Player.HealthPercent < Config.Item("recallhp").GetValue<Slider>().Value) { args.Process = false; return; } } #endregion } if (sender != null && args.Target != null && args.Target.IsMe) { if (sender is Obj_AI_Turret || sender is Obj_AI_Minion) { var minion = Wizard.GetClosestAllyMinion(); if (minion != null) { Orbwalker.SetOrbwalkingPoint( Heroes.Player.Position.Extend(Wizard.GetClosestAllyMinion().Position, Heroes.Player.Distance(minion) + 100)); } } } }
void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { args.Process = false; }
/// <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; } }
private void OnObjAiBaseIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { try { if (!_menu.Item(_menu.Name + ".enabled").GetValue<bool>()) { return; } if ((sender.IsMe || ObjectManager.Player.Pet != null && ObjectManager.Player.Pet.NetworkId.Equals(sender.NetworkId)) && !args.IsAttackMove) { if (!_randomizedOrders.ContainsKey(args.Order)) { _randomizedOrders[args.Order] = false; } if (_randomizedOrders[args.Order]) { _randomizedOrders[args.Order] = false; return; } var position = args.Target != null ? args.Target.Position : args.TargetPosition; if (_menu.Item(_menu.Name + ".orders.screen").GetValue<bool>() && !position.IsOnScreen()) { args.Process = false; _blockedOrders++; return; } UpdateSequence(args.Order); var sequence = _sequences[args.Order]; var delay = sequence.Items[sequence.Index]; if ((args.Order == GameObjectOrder.AttackTo || args.Order == GameObjectOrder.AttackUnit) && (_lastAttackTarget == null || args.Target == null || !_lastAttackTarget.NetworkId.Equals(args.Target.NetworkId))) { var percent = _menu.Item(_menu.Name + ".orders.range-delay").GetValue<Slider>().Value; if (percent > 0) { delay = Math.Max( delay, (int) (Math.Max( GetRangeDelay(position, _lastAttackPosition, percent), GetRangeDelay(position, _lastCastPosition, percent)) * 0.75f)); } } else { if (Helpers.IsSharpTurn(position, _random.Next(80, 101))) { delay -= (int) (delay / 100f * _menu.Item(_menu.Name + ".orders.sharp-turn").GetValue<Slider>().Value); } } if (Utils.GameTimeTickCount - sequence.LastIndexChange <= delay) { args.Process = false; _blockedOrders++; } else { if (args.Order == GameObjectOrder.AttackTo || args.Order == GameObjectOrder.AttackUnit) { _lastAttackPosition = position.IsValid() ? position : Vector3.Zero; _lastAttackTarget = args.Target; } sequence.Index++; if (args.Target == null && position.IsValid() && !_randomizedOrders[args.Order]) { args.Process = false; _randomizedOrders[args.Order] = true; ObjectManager.Player.IssueOrder( args.Order, _random.Randomize( position, _menu.Item(_menu.Name + ".orders.position").GetValue<Slider>().Value)); } } } } catch (Exception ex) { args.Process = true; Console.WriteLine(ex); } }
private void Obj_AI_Base_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (MenuProvider.Champion.Misc.GetBoolValue("Auto Catch Axe")) if (sender.IsMe) if (args.Order == GameObjectOrder.MoveTo) if (_bestDropObject != null) if (_bestDropObject.IsValid) if (_bestDropObject.Position.Distance(ObjectManager.Player.Position) < 120) if (_bestDropObject.Position.Distance(args.TargetPosition) >= 120) for (var i = _bestDropObject.Position.Distance(args.TargetPosition); i > 0; i = i - 1) { var position = ObjectManager.Player.Position.Extend(args.TargetPosition, i); if (_bestDropObject.Position.Distance(position) < 120) { ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, position); args.Process = false; break; } } }
private static void Obj_AI_Hero_OnIssueOrder(Obj_AI_Base sender, GameObjectIssueOrderEventArgs args) { if (sender.IsMe && Environment.TickCount < rStart + 300 && args.Order == GameObjectOrder.MoveTo) { args.Process = false; } }