private static void Game_OnUpdate(EventArgs args) { //Game.PrintChat(Player.Distance(Game.CursorPos).ToString()); //Game.PrintChat(GameObjects.EnemyMinions.Count().ToString()); if (!Program.eqmouse) { return; } if (OrbwalkCommands.CanMove()) { OrbwalkCommands.MoveTo(Game.CursorPos); } if (Environment.TickCount - LastJump < 500) { return; } if (Program.Eisready && Program.Qisready()) { var position = Game.CursorPos; var distance = Player.Position.Distance(position); var sold = Soldiers.soldier .Where(x => Player.Distance(x.Position) <= 1100) .OrderBy(x => x.Position.Distance(Game.CursorPos)).FirstOrDefault(); var posW = Player.Position.Extend(position, Program._w.Range); if (distance < 875) { if (sold != null) { Program._e.Cast(sold.Position); Utility.DelayAction.Add(50, () => Program._q.Cast(position)); LastJump = Environment.TickCount; } else if (Program._w.IsReady()) { Program._w.Cast(posW); Utility.DelayAction.Add(50 + Game.Ping - 8, () => Program._e.Cast(posW)); Utility.DelayAction.Add(500 + Game.Ping - 8, () => Program._q.Cast(position)); LastJump = Environment.TickCount; } } else { if (sold != null && sold.Position.Distance(position) <= posW.Distance(position)) { var time = sold.Position.Distance(Player.Position) * 1000 / 1700; Program._e.Cast(sold.Position); Utility.DelayAction.Add((int)time - 150, () => Program._q.Cast(position)); LastJump = Environment.TickCount; } else if (Program._w.IsReady()) { Program._w.Cast(posW); Utility.DelayAction.Add(50 + Game.Ping - 8, () => Program._e.Cast(posW)); Utility.DelayAction.Add(500 + Game.Ping - 8, () => Program._q.Cast(position)); LastJump = Environment.TickCount; } } } }
private static void Game_OnUpdate(EventArgs args) { if (Program._orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Mixed) { return; } if (OrbwalkCommands.CanDoAttack()) { var minion = OrbwalkCommands.GetClearMinionsAndBuildings(); if (minion.IsValidTarget()) { OrbwalkCommands.AttackTarget(minion); } } if (Program._q.IsReady() && OrbwalkCommands.CanMove() && Program.qharass && (!Program.donotqharass || (!Soldiers.enemies.Any() && !Soldiers.splashautoattackchampions.Any()))) { var target = TargetSelector.GetTarget(Program._q.Range, TargetSelector.DamageType.Magical); foreach (var obj in Soldiers.soldier) { Program._q.SetSkillshot(0.0f, 65f, 1500f, false, SkillshotType.SkillshotLine, obj.Position, Player.Position); Program._q.Cast(target); } } if (Program._w.IsReady() && OrbwalkCommands.CanMove() && !Soldiers.enemies.Any() && Program.wharass) { var target = TargetSelector.GetTarget(Program._w.Range + 300, TargetSelector.DamageType.Magical); if (target.IsValidTarget() && !target.IsZombie && !Soldiers.enemies.Contains(target)) { var x = Player.Distance(target.Position) > Program._w.Range ? Player.Position.Extend(target.Position, Program._w.Range) : target.Position; Program._w.Cast(x); } } if (Program._w.IsReady() && OrbwalkCommands.CanMove() && !Soldiers.enemies.Any() && !Soldiers.soldier.Any() && Program.wharass && Program.Qisready()) { var target = TargetSelector.GetTarget(Program._w.Range + 300, TargetSelector.DamageType.Magical); if (target == null || !target.IsValidTarget() || target.IsZombie) { var tar = HeroManager.Enemies.Where(x => x.IsValidTarget(Program._q.Range) && !x.IsZombie).OrderByDescending(x => Player.Distance(x.Position)).LastOrDefault(); if (tar.IsValidTarget() && !tar.IsZombie) { var x = Player.Distance(tar.Position) > Program._w.Range ? Player.Position.Extend(tar.Position, Program._w.Range) : tar.Position; Program._w.Cast(x); } } } }
private static void Game_OnUpdate(EventArgs args) { if (Program._orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo) { return; } if (Soldiers.enemies.Any() && OrbwalkCommands.CanDoAttack()) { var target = Soldiers.enemies.OrderByDescending(x => x.Health).LastOrDefault(); OrbwalkCommands.AttackTarget(target); } if (Soldiers.splashautoattackchampions.Any() && OrbwalkCommands.CanDoAttack()) { var splashAutoAttackChampion = Soldiers.splashautoattackchampions .OrderByDescending(x => x.SplashAutoAttackChampions.MinOrDefault(y => y.Health).Health).LastOrDefault(); if (splashAutoAttackChampion != null) { var target = splashAutoAttackChampion.MainMinion; if (target.IsValidTarget()) { OrbwalkCommands.AttackTarget(target); } } } if (!Soldiers.enemies.Any() && OrbwalkCommands.CanDoAttack()) { var target = Program._orbwalker.GetTarget(); if (target.IsValidTarget() && !target.IsZombie) { OrbwalkCommands.AttackTarget(target); } } if (Program._q.IsReady() && OrbwalkCommands.CanMove() && Program.qcombo && (!Program.donotqcombo || (!Soldiers.enemies.Any() && !Soldiers.splashautoattackchampions.Any()))) { var target = TargetSelector.GetTarget(Program._q.Range, TargetSelector.DamageType.Magical); foreach (var obj in Soldiers.soldier) { Program._q.SetSkillshot(0.0f, 65f, 1500f, false, SkillshotType.SkillshotLine, obj.Position, Player.Position); Program._q.Cast(target); } } if (Program._w.IsReady() && OrbwalkCommands.CanMove() && Program.wcombo) { var target = TargetSelector.GetTarget(Program._w.Range + 300, TargetSelector.DamageType.Magical); if (target.IsValidTarget() && !target.IsZombie && (!Soldiers.enemies.Contains(target) || Player.CountEnemiesInRange(1000) >= 2)) { var x = Player.Distance(target.Position) > Program._w.Range ? Player.Position.Extend(target.Position, Program._w.Range) : target.Position; Program._w.Cast(x); } } if (Program._w.IsReady() && OrbwalkCommands.CanMove() && !Soldiers.soldier.Any() && Program.wcombo && Program.Qisready()) { var target = TargetSelector.GetTarget(Program._w.Range + 300, TargetSelector.DamageType.Magical); if (target == null || !target.IsValidTarget() || target.IsZombie) { var tar = HeroManager.Enemies.Where(x => x.IsValidTarget(Program._q.Range) && !x.IsZombie).OrderByDescending(x => Player.Distance(x.Position)).LastOrDefault(); if (tar.IsValidTarget() && !tar.IsZombie) { var x = Player.Distance(tar.Position) > Program._w.Range ? Player.Position.Extend(tar.Position, Program._w.Range) : tar.Position; Program._w.Cast(x); } } } }
private static void Game_OnUpdate(EventArgs args) { switch (Program.insecmode) { case 0: var hero = HeroManager.Allies.Where(x => !x.IsMe && !x.IsDead) .OrderByDescending(x => x.Distance(Player.Position)).LastOrDefault(); if (hero != null) InsecPoint = hero.Position; break; case 1: var turret = GameObjects.AllyTurrets.OrderByDescending(x => x.Distance(Player.Position)).LastOrDefault(); if (turret != null) InsecPoint = turret.Position; break; case 2: InsecPoint = Game.CursorPos; break; case 3: InsecPoint = LastLeftClick; break; } if (!Program.insec) return; if (OrbwalkCommands.CanMove()) { OrbwalkCommands.MoveTo(Game.CursorPos); } if (!InsecPoint.IsValid()) return; var target = TargetSelector.GetSelectedTarget(); if (!target.IsValidTarget() || target.IsZombie) return; if (!Program._r2.IsReady()) return; //case 1 Vector2 start1 = Player.Position.To2D().Extend(InsecPoint.To2D(), -300); Vector2 end1 = start1.Extend(Player.Position.To2D(), 750); float width1 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect1 = new Geometry.Polygon.Rectangle(start1, end1, width1 - 100); var Predicted1 = Prediction.GetPrediction(target, Game.Ping / 1000f + 0.25f).UnitPosition; if (Rect1.IsInside(target.Position) && Rect1.IsInside(Predicted1)) { Program._r2.Cast(InsecPoint); return; } if (Environment.TickCount - LastJump < 1500) return; if (!Program._e.IsReady()) return; //case 2 var sold2 = Soldiers.soldier .Where(x => Player.Distance(x.Position) <= 1100) .OrderBy(x => x.Position.Distance(target.Position)).FirstOrDefault(); if (sold2 != null) { if (!Program._q2.IsReady()) { var time = Player.Position.Distance(sold2.Position) / 1700f; var predicted2 = Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = sold2.Position.To2D().Extend(InsecPoint.To2D(), -300); Vector2 end2 = start2.Extend(InsecPoint.To2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { Program._e.Cast(sold2.Position); LastJump = Environment.TickCount; return; } } if (Program._q2.IsReady() && target.Distance(sold2.Position) <= 875 - 100) { var time = (Player.Distance(sold2.Position) + sold2.Position.Distance(target.Position)) / 1700f; var predicted2 = Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = target.Position.To2D().Extend(InsecPoint.To2D(), -300); Vector2 end2 = start2.Extend(InsecPoint.To2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { var timetime = sold2.Position.Distance(Player.Position) * 1000 / 1700; Program._e.Cast(sold2.Position); LeagueSharp.Common.Utility.DelayAction.Add((int)timetime - 150 - Program.EQdelay, () => Program._q2.Cast(target.Position)); LastJump = Environment.TickCount; return; } } } if(Program._w.IsReady()) { var posWs = GeoAndExten.GetWsPosition(target.Position.To2D()).Where(x => x != null); foreach (var posW in posWs) { if (!Program._q2.IsReady()) { var time = Player.Position.To2D().Distance((Vector2)posW) / 1700f + 0.3f; var predicted2 = Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = ((Vector2)posW).Extend(InsecPoint.To2D(), -300); Vector2 end2 = start2.Extend(InsecPoint.To2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { var timetime = ((Vector2)posW).Distance(Player.Position) * 1000 / 1700; Program._w.Cast(Player.Position.To2D().Extend((Vector2)posW, Program._w.Range)); LeagueSharp.Common.Utility.DelayAction.Add(0, () => Program._e.Cast((Vector2)posW)); LeagueSharp.Common.Utility.DelayAction.Add((int)timetime + 300 - 150 - Program.EQdelay, () => Program._q2.Cast(target.Position)); LastJump = Environment.TickCount; return; } } if (Program._q2.IsReady() && target.Distance((Vector2)posW) <= 875 - 100) { var time = (Player.Distance((Vector2)posW) + ((Vector2)posW).Distance(target.Position)) / 1700f + 0.3f; var predicted2 = Prediction.GetPrediction(target, time).UnitPosition; Vector2 start2 = target.Position.To2D().Extend(InsecPoint.To2D(), -300); Vector2 end2 = start2.Extend(InsecPoint.To2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new Geometry.Polygon.Rectangle(start2, end2, width2 - 100); if (Rect2.IsInside(target.Position) && Rect2.IsInside(predicted2)) { var timetime = ((Vector2)posW).Distance(Player.Position) * 1000 / 1700; Program._w.Cast(Player.Position.To2D().Extend((Vector2)posW, Program._w.Range)); LeagueSharp.Common.Utility.DelayAction.Add(0, () => Program._e.Cast((Vector2)posW)); LeagueSharp.Common.Utility.DelayAction.Add((int)timetime + 300 - 150 - Program.EQdelay, () => Program._q2.Cast(target.Position)); LastJump = Environment.TickCount; return; } } } } }
private static void Game_OnUpdate(EventArgs args) { switch (Program.insecmode) { case 0: var hero = HeroManager.Allies.Where(x => !x.IsMe && !x.IsDead) .OrderByDescending(x => x.Distance(Player.Position)).LastOrDefault(); if (hero != null) { InsecPoint = hero.Position; } break; case 1: var turret = GameObjects.AllyTurrets.OrderByDescending(x => x.Distance(Player.Position)).LastOrDefault(); if (turret != null) { InsecPoint = turret.Position; } break; case 2: InsecPoint = Game.CursorPos; break; case 3: InsecPoint = LastLeftClick; break; } if (!Program.insec) { return; } if (OrbwalkCommands.CanMove()) { OrbwalkCommands.MoveTo(Game.CursorPos); } if (Environment.TickCount - LastJump < 1500) { return; } if (!InsecPoint.IsValid()) { return; } var target = TargetSelector.GetSelectedTarget(); if (!target.IsValidTarget() || target.IsZombie) { return; } if (!Program._r2.IsReady()) { return; } //case 2 var sold2 = Soldiers.soldier .Where(x => Player.Distance(x.Position) <= 1100) .OrderBy(x => x.Position.Distance(target.Position)).FirstOrDefault(); if (sold2 != null && Program.Eisready) { Vector2 start2 = sold2.Position.To2D().Extend(InsecPoint.To2D(), -0); Vector2 end2 = start2.Extend(Player.Position.To2D(), 750); float width2 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect2 = new Geometry.Polygon.Rectangle(start2, end2, width2 - 100); var Predicted2 = Prediction.GetPrediction(target, Game.Ping / 1000f + Player.Distance(sold2.Position) / 1700f - 0.15f).UnitPosition; if (Rect2.IsInside(target.Position) && Rect2.IsInside(Predicted2)) { var time = sold2.Position.Distance(Player.Position) * 1000 / 1700; Program._e.Cast(sold2.Position); Utility.DelayAction.Add((int)time + 150, () => Program._r2.Cast(InsecPoint)); Utility.DelayAction.Add((int)time - 150, () => Program._q2.Cast(InsecPoint)); LastJump = Environment.TickCount; return; } } //case 3 var posW3 = Player.Position.Extend(target.Position, Program._w.Range); if (Program.Eisready && Program._w.IsReady()) { Vector2 start3 = posW3.To2D().Extend(InsecPoint.To2D(), 0); Vector2 end3 = start3.Extend(Player.Position.To2D(), 750); float width3 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect3 = new Geometry.Polygon.Rectangle(start3, end3, width3 - 100); var Predicted3 = Prediction.GetPrediction(target, Game.Ping / 1000f + Player.Distance(posW3) / 1700f - 0.15f).UnitPosition; if (Rect3.IsInside(target.Position) && Rect3.IsInside(Predicted3)) { var time = posW3.Distance(Player.Position) * 1000 / 1700; Program._w.Cast(posW3); Utility.DelayAction.Add(50 + Game.Ping - 8, () => Program._e.Cast(posW3)); Utility.DelayAction.Add(500 + Game.Ping - 8 + 150, () => Program._r2.Cast(InsecPoint)); Utility.DelayAction.Add(500 + Game.Ping - 8 - 150, () => Program._q2.Cast(InsecPoint)); LastJump = Environment.TickCount; return; } } //case 1 Vector2 start1 = Player.Position.To2D().Extend(InsecPoint.To2D(), -300); Vector2 end1 = start1.Extend(Player.Position.To2D(), 750); float width1 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect1 = new Geometry.Polygon.Rectangle(start1, end1, width1 - 100); var Predicted1 = Prediction.GetPrediction(target, Game.Ping / 1000f + 0.25f).UnitPosition; if (Rect1.IsInside(target.Position) && Rect1.IsInside(Predicted1)) { Program._r2.Cast(InsecPoint); LastJump = Environment.TickCount; return; } //case 4 if (Program.Eisready && Program.Qisready()) { var sold4 = Soldiers.soldier .Where(x => Player.Distance(x.Position) <= 1100) .OrderBy(x => x.Position.Distance(target.Position)).FirstOrDefault(); var posW4 = Player.Position.Extend(target.Position, Program._w.Range); if (sold4 != null && sold4.Position.Distance(target.Position) <= posW4.Distance(target.Position)) { var time = (Player.Distance(sold4.Position) + sold4.Position.Distance(target.Position)) / 1700f; var Predicted4 = Prediction.GetPrediction(target, Game.Ping / 1000f + time - 0.15f).UnitPosition; if (target.Distance(sold4.Position) <= 875 - 100) { Vector2 start4 = target.Position.To2D().Extend(InsecPoint.To2D(), -300); Vector2 end4 = start4.Extend(Player.Position.To2D(), 750); float width4 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect4 = new Geometry.Polygon.Rectangle(start4, end4, width4 - 100); if (Rect4.IsInside(Predicted4)) { var timetime = sold4.Position.Distance(Player.Position) * 1000 / 1700; Program._e.Cast(sold4.Position); Utility.DelayAction.Add((int)timetime - 150, () => Program._q2.Cast(target.Position)); Utility.DelayAction.Add((int)(time * 1000) + 300 - 150, () => Program._r2.Cast(InsecPoint)); LastJump = Environment.TickCount; return; } } } else if (Program._w.IsReady()) { var time = Player.Distance(target.Position) / 1700f; var Predicted4 = Prediction.GetPrediction(target, Game.Ping / 1000f + time - 0.15f).UnitPosition; if (target.Distance(Player.Position) <= 875 + 450 - 100) { Vector2 start4 = target.Position.To2D().Extend(InsecPoint.To2D(), -300); Vector2 end4 = start4.Extend(Player.Position.To2D(), 750); float width4 = Program._r.Level == 3 ? 125 * 6 / 2 : Program._r.Level == 2 ? 125 * 5 / 2 : 125 * 4 / 2; var Rect4 = new Geometry.Polygon.Rectangle(start4, end4, width4 - 100); if (Rect4.IsInside(Predicted4)) { Program._w.Cast(posW4); Utility.DelayAction.Add(50 + Game.Ping - 8, () => Program._e.Cast(posW4)); Utility.DelayAction.Add((int)(time * 1000) + 300 + Game.Ping - 8, () => Program._r2.Cast(InsecPoint)); Utility.DelayAction.Add(500 + Game.Ping - 8, () => Program._q2.Cast(target.Position)); LastJump = Environment.TickCount; return; } } } } }
private static void Game_OnUpdate(EventArgs args) { //Game.PrintChat(Player.Distance(Game.CursorPos).ToString()); //Game.PrintChat(GameObjects.EnemyMinions.Count().ToString()); if (!Program.eqmouse) { return; } if (OrbwalkCommands.CanMove()) { OrbwalkCommands.MoveTo(Game.CursorPos); } if (Environment.TickCount - LastJump < 500) { return; } if (Program.Eisready && Program.Qisready()) { var position = Game.CursorPos; var distance = Player.Position.Distance(position); var sold = Soldiers.soldier .Where(x => Player.Distance(x.Position) <= 1100) .OrderBy(x => x.Position.Distance(Game.CursorPos)).FirstOrDefault(); var posWs = GeoAndExten.GetWsPosition(position.To2D()).Where(x => x != null); // case 1 if (sold != null && sold.Position.Distance(position) <= 875) { var time = sold.Position.Distance(Player.Position) * 1000 / 1700; Program._e.Cast(sold.Position); Utility.DelayAction.Add((int)time - 150 - Program.EQdelay, () => Program._q2.Cast(position)); LastJump = Environment.TickCount; return; } // case 2 var posW2 = posWs.FirstOrDefault(x => ((Vector2)x).Distance(position) <= 875); if (Program._w.IsReady() && posW2 != null) { var time = ((Vector2)posW2).Distance(Player.Position) * 1000 / 1700; Program._w.Cast(Player.Position.To2D().Extend((Vector2)posW2, Program._w.Range)); Utility.DelayAction.Add(0, () => Program._e.Cast((Vector2)posW2)); Utility.DelayAction.Add((int)time + 300 - 150 - Program.EQdelay, () => Program._q2.Cast(position)); LastJump = Environment.TickCount; return; } // case 3 var posW3 = posWs.OrderBy(x => ((Vector2)x).Distance(position)).FirstOrDefault(); if (sold != null && (posW3 == null || sold.Position.Distance(position) <= ((Vector2)posW3).Distance(position))) { var time = sold.Position.Distance(Player.Position) * 1000 / 1700; Program._e.Cast(sold.Position); Utility.DelayAction.Add((int)time - 150 - Program.EQdelay, () => Program._q2.Cast(position)); LastJump = Environment.TickCount; return; } if (Program._w.IsReady() && posW3 != null) { var time = ((Vector2)posW3).Distance(Player.Position) * 1000 / 1700; Program._w.Cast(Player.Position.To2D().Extend((Vector2)posW3, Program._w.Range)); Utility.DelayAction.Add(0, () => Program._e.Cast((Vector2)posW3)); Utility.DelayAction.Add((int)time + 300 - 150 - Program.EQdelay, () => Program._q2.Cast(position)); LastJump = Environment.TickCount; return; } } }