private static void AutoExplode() { var closestHittingBarrel = BarrelManager.GetBarrelsThatWillHit().FirstOrDefault(); if (closestHittingBarrel != null) { var chainedBarrels = BarrelManager.GetChainedBarrels(closestHittingBarrel); var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels); if (barrelToQ != null) { if (SpellManager.Q.Ready) { var timeWhenCanE = LastECast + 500; var delay = timeWhenCanE - Game.TickCount; delay = Ammo < 1 ? 0 : delay <= 0 ? 0 : delay; var castDelay = MenuManager.Combo["triple"].Enabled ? delay : 0; DelayAction.Queue(castDelay, () => SpellManager.Q.Cast(barrelToQ.Object)); return; } if (barrelToQ.Object.IsInAutoAttackRange() && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled) { Orbwalker.Implementation.ForceTarget(barrelToQ.Object); Orbwalker.Implementation.Attack(barrelToQ.Object); } } } }
private static void Game_OnUpdate() { BarrelManager.Barrels.RemoveAll(x => x.Object.IsDead); RemoveCC(); Killsteal(); var closestHittingBarrel = BarrelManager.GetBarrelsThatWillHit().FirstOrDefault(); if (closestHittingBarrel != null) { var chainedBarrels = BarrelManager.GetChainedBarrels(closestHittingBarrel); var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels); if (barrelToQ != null && SpellManager.Q.Ready) { var timeWhenCanE = LastECast + 500; var delay = timeWhenCanE - Game.TickCount; delay = delay <= 0 ? 0 : delay; var castDelay = MenuManager.Combo["triple"].Enabled ? delay : 0; DelayAction.Queue(castDelay, () => SpellManager.Q.Cast(barrelToQ.Object)); return; } } if ((Orbwalker.Implementation.Mode == OrbwalkingMode.Combo || Orbwalker.Implementation.Mode == OrbwalkingMode.Mixed || Orbwalker.Implementation.Mode == OrbwalkingMode.Lasthit || Orbwalker.Implementation.Mode == OrbwalkingMode.Laneclear || MenuManager.Keys["comboToMouse"].Enabled || MenuManager.Keys["qBarrel"].Enabled) && MenuManager.Misc["aaBarrel"].Enabled) { AttackNearestBarrel(); } if (MenuManager.Keys["comboToMouse"].Enabled) { AttackNearestBarrel(); ComboToMouse(); } if (MenuManager.Keys["qBarrel"].Enabled) { AttackNearestBarrel(); QNearestBarrel(); } switch (Orbwalker.Implementation.Mode) { case OrbwalkingMode.Combo: Combo(); break; case OrbwalkingMode.Mixed: Harass(); break; case OrbwalkingMode.Lasthit: LastHit(); break; } }
private static void Game_OnUpdate() { BarrelManager.Barrels.RemoveAll(x => x.Object.IsDead); RemoveCC(); Killsteal(); var closestHittingBarrel = BarrelManager.GetBarrelsThatWillHit().FirstOrDefault(); if (closestHittingBarrel != null) { var chainedBarrels = BarrelManager.GetChainedBarrels(closestHittingBarrel); var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels); if (barrelToQ != null && SpellManager.Q.Ready) { SpellManager.Q.Cast(barrelToQ.Object); return; } } if ((Orbwalker.Implementation.Mode == OrbwalkingMode.Combo || Orbwalker.Implementation.Mode == OrbwalkingMode.Mixed || Orbwalker.Implementation.Mode == OrbwalkingMode.Lasthit || Orbwalker.Implementation.Mode == OrbwalkingMode.Laneclear || MenuManager.Keys["comboToMouse"].Enabled || MenuManager.Keys["qBarrel"].Enabled) && MenuManager.Misc["aaBarrel"].Enabled) { AttackNearestBarrel(); } if (MenuManager.Keys["comboToMouse"].Enabled) { AttackNearestBarrel(); ComboToMouse(); } if (MenuManager.Keys["qBarrel"].Enabled) { AttackNearestBarrel(); QNearestBarrel(); } switch (Orbwalker.Implementation.Mode) { case OrbwalkingMode.Combo: Combo(); break; case OrbwalkingMode.Mixed: Harass(); break; case OrbwalkingMode.Lasthit: LastHit(); break; } }
private static void ComboToMouse() { var nearestBarrelToCursor = BarrelManager.GetNearestBarrel(Game.CursorPos); if (nearestBarrelToCursor != null) { var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrelToCursor); if (chainedBarrels.Count > 1) { var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels); if (barrelToQ != null) { if (SpellManager.Q.Ready) { SpellManager.Q.Cast(barrelToQ.Object); return; } if (barrelToQ.Object.IsInAutoAttackRange() && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled) { Orbwalker.Implementation.ForceTarget(barrelToQ.Object); Orbwalker.Implementation.Attack(barrelToQ.Object); } } } else { if (nearestBarrelToCursor.Object.Distance(Game.CursorPos) <= SpellManager.ChainRadius) { if (SpellManager.E.Ready && nearestBarrelToCursor.CanChain) { SpellManager.E.Cast(Game.CursorPos); } } else { var bestPos = nearestBarrelToCursor.ServerPosition.Extend(Game.CursorPos, (SpellManager.ChainRadius - 5)); if (SpellManager.E.Ready && nearestBarrelToCursor.CanChain) { SpellManager.E.Cast(bestPos); } } } } else { if (Player.Distance(Game.CursorPos) <= SpellManager.E.Range && SpellManager.E.Ready) { SpellManager.E.Cast(Game.CursorPos); } } }
private static void Combo() { var target = TargetSelector.GetTarget(SpellManager.E2.Range); if (target.IsValidTarget()) { var nearestBarrel = BarrelManager.GetNearestBarrel(); if (nearestBarrel != null) { var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrel); if (chainedBarrels.Any(x => BarrelManager.BarrelWillHit(x, target))) { //If any of the chained barrels will hit, cast Q on best barrel. var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels); if (barrelToQ != null) { if (SpellManager.Q.Ready) { var timeWhenCanE = LastECast + 500; var delay = timeWhenCanE - Game.TickCount; delay = delay <= 0 ? 0 : delay; var castDelay = MenuManager.Combo["triple"].Enabled ? delay : 0; DelayAction.Queue(castDelay, () => SpellManager.Q.Cast(barrelToQ.Object)); } else if (barrelToQ.Object.Distance(Player) <= Player.AttackRange && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled) { Orbwalker.Implementation.Attack(barrelToQ.Object); } return; } } else { //No chained barrels will hit, so let's chain them. var bestChainPosition = BarrelManager.GetBestChainPosition(target, nearestBarrel); if (bestChainPosition != Vector3.Zero && target.IsInRange(SpellManager.E.Range) && Player.Distance(bestChainPosition) <= SpellManager.E.Range && SpellManager.E.Ready && nearestBarrel.CanChain) { Render.Line(nearestBarrel.ServerPosition.ToScreenPosition(), bestChainPosition.ToScreenPosition(), 5, true, Color.Red); SpellManager.E.Cast(bestChainPosition); } } } } }
private static void ComboToMouse() { Orbwalker.Implementation.Move(Game.CursorPos); var nearestBarrelToCursor = BarrelManager.GetNearestBarrel(Game.CursorPos); if (nearestBarrelToCursor != null) { var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrelToCursor); if (chainedBarrels.Count > 1) { var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels); if (barrelToQ != null && SpellManager.Q.Ready) { SpellManager.Q.Cast(barrelToQ.Object); } } else { if (nearestBarrelToCursor.Object.Distance(Game.CursorPos) <= SpellManager.ChainRadius) { if (SpellManager.E.Ready && nearestBarrelToCursor.CanChain) { SpellManager.E.Cast(Game.CursorPos); } } else { var bestPos = nearestBarrelToCursor.ServerPosition.Extend(Game.CursorPos, (SpellManager.ChainRadius - 5)); if (SpellManager.E.Ready && nearestBarrelToCursor.CanChain) { SpellManager.E.Cast(bestPos); } } } } else { if (Player.Distance(Game.CursorPos) <= SpellManager.E.Range && SpellManager.E.Ready) { SpellManager.E.Cast(Game.CursorPos); } } }
private static void DashOnHeroDashed(object sender, Dash.DashArgs dashArgs) { if (dashArgs.Unit is Obj_AI_Hero) { var nearestBarrel = BarrelManager.GetNearestBarrel(dashArgs.EndPos.To3D()); if (nearestBarrel != null) { var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrel); if (chainedBarrels.Any(x => BarrelManager.BarrelWillHit(x, dashArgs.EndPos.To3D()))) { //If any of the chained barrels will hit, cast Q on best barrel. var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels); if (barrelToQ != null) { if (SpellManager.Q.Ready) { SpellManager.Q.Cast(barrelToQ.Object); } else if (barrelToQ.Object.Distance(Player) <= Player.AttackRange && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled) { Orbwalker.Implementation.Attack(barrelToQ.Object); } return; } } else { //No chained barrels will hit, so let's chain them. var bestChainPosition = BarrelManager.GetBestChainPosition(dashArgs.EndPos.To3D(), nearestBarrel); if (bestChainPosition != Vector3.Zero && dashArgs.EndPos.Distance(Player) <= SpellManager.E.Range && Player.Distance(bestChainPosition) <= SpellManager.E.Range && SpellManager.E.Ready && nearestBarrel.CanChain) { Render.Line(nearestBarrel.ServerPosition.ToScreenPosition(), bestChainPosition.ToScreenPosition(), 5, true, Color.Red); SpellManager.E.Cast(bestChainPosition); } } } } }
private static void ObjAiBaseOnOnProcessSpellCast(Obj_AI_Base sender, Obj_AI_BaseMissileClientDataEventArgs e) { if (sender.IsMe && e.SpellSlot == SpellSlot.Q && e.Target.Name == "Barrel") { var barrel = (Barrel)e.Target; if (barrel.Object.Distance(Player) >= 530 && barrel.Object.Distance(Player) <= 660 && BarrelManager.GetChainedBarrels(barrel).Count == 1) //1 part combo only works at max range. { var enemies = BarrelManager.GetEnemiesInChainRadius(barrel); var bestEnemy = enemies.Where(x => x.IsValidTarget()).OrderBy(x => x.Health).FirstOrDefault(); if (bestEnemy != null) { var bestChainPosition = BarrelManager.GetBestChainPosition(bestEnemy, barrel); if (bestChainPosition != Vector3.Zero && bestEnemy.IsInRange(SpellManager.E.Range) && Player.Distance(bestChainPosition) <= SpellManager.E.Range && SpellManager.E.Ready) { SpellManager.E.Cast(bestChainPosition); } } } } }
private static void ObjAiBaseOnOnProcessSpellCast(Obj_AI_Base sender, Obj_AI_BaseMissileClientDataEventArgs e) { if (sender.IsMe && e.SpellSlot == SpellSlot.Q && e.Target.Name == "Barrel") { var barrel = (Barrel)e.Target; LastQCast = Game.TickCount; //Console.WriteLine($"[Cast] Distance from barrel: {Player.Distance(barrel.Object)}"); //1 part if (barrel.Object.Distance(Player) >= 585 && barrel.Object.Distance(Player) <= 660 && BarrelManager.GetChainedBarrels(barrel).Count == 1) //1 part combo only works at max range. { var enemies = BarrelManager.GetEnemiesInChainRadius(barrel); var bestEnemy = enemies.Where(x => x.IsValidTarget()).OrderBy(x => x.Distance(barrel.Object)).ThenBy(x => x.Health).FirstOrDefault(); if (bestEnemy != null) { var bestChainPosition = BarrelManager.GetBestChainPosition(bestEnemy, barrel); if (bestChainPosition != Vector3.Zero && bestEnemy.IsInRange(SpellManager.E.Range) && Player.Distance(bestChainPosition) <= SpellManager.E.Range && SpellManager.E.Ready) { SpellManager.E.Cast(bestChainPosition); } } } else if (MenuManager.Combo["triple"].Enabled) { //Triple barrel var chainedBarrels = BarrelManager.GetChainedBarrels(barrel); if (chainedBarrels.Count > 1) { var barrelsCanChain = chainedBarrels.Where(x => BarrelManager.GetEnemiesInChainRadius(x).Count > 0 && x.NetworkId != barrel.NetworkId).ToList(); if (barrelsCanChain.Count == 0) { barrelsCanChain = chainedBarrels.Where(x => BarrelManager.GetEnemiesInChainRadius(x, false).Count > 0 && x.NetworkId != barrel.NetworkId).ToList(); } var bestBarrel = barrelsCanChain.OrderByDescending(x => x.Created).ThenBy(x => x.Object.Distance(Player)).FirstOrDefault(); if (bestBarrel == null) { return; } var enemiesCanChainTo = BarrelManager.GetEnemiesInChainRadius(bestBarrel); if (enemiesCanChainTo.Count == 0) { enemiesCanChainTo = BarrelManager.GetEnemiesInChainRadius(bestBarrel, false); } if (enemiesCanChainTo.Count > 0) { var bestEnemy = enemiesCanChainTo.OrderBy(x => x.Health).ThenBy(x => x.Distance(Player)).FirstOrDefault(); if (bestEnemy != null) { var bestChainPosition = BarrelManager.GetBestChainPosition(bestEnemy, bestBarrel); if (bestChainPosition != Vector3.Zero && bestChainPosition.Distance(bestEnemy) <= SpellManager.ExplosionRadius && bestChainPosition.Distance(bestBarrel.Object) > SpellManager.ExplosionRadius && bestEnemy.IsInRange(SpellManager.E.Range) && Player.Distance(bestChainPosition) <= SpellManager.E.Range) { DelayAction.Queue(250, () => { if (SpellManager.E.Ready) { SpellManager.E.Cast(bestChainPosition); } }); } } } } } } else if (sender.IsMe && e.SpellSlot == SpellSlot.E) { var casted = Game.TickCount; BarrelManager.CastedBarrels.Add(casted); LastECast = casted; } }
private static void Combo() { if (Orbwalker.Implementation.IsWindingUp) { return; } var target = TargetSelector.GetTarget(SpellManager.E2.Range); if (target.IsValidTarget()) { var nearestBarrel = BarrelManager.GetNearestBarrel(); if (nearestBarrel != null) { var chainedBarrels = BarrelManager.GetChainedBarrels(nearestBarrel); if (chainedBarrels.Any(x => BarrelManager.BarrelWillHit(x, target))) { //If any of the chained barrels will hit, cast Q on best barrel. var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels); if (barrelToQ != null) { if (SpellManager.Q.Ready) { var timeWhenCanE = LastECast + 500; var delay = timeWhenCanE - Game.TickCount; delay = Ammo < 1 ? 0 : delay <= 0 ? 0 : delay; var castDelay = MenuManager.Combo["triple"].Enabled ? delay : 0; DelayAction.Queue(castDelay, () => SpellManager.Q.Cast(barrelToQ.Object)); return; } if (barrelToQ.Object.IsInAutoAttackRange() && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled) { Orbwalker.Implementation.ForceTarget(barrelToQ.Object); Orbwalker.Implementation.Attack(barrelToQ.Object); } } } else { //No chained barrels will hit, so let's chain them OR try and triple barrel. if (chainedBarrels.Count >= 2 && MenuManager.Combo["triple"].Enabled) { //There are chained barrels, so let's see if any are in range to be triple comboed. var barrelToComboFrom = chainedBarrels.FirstOrDefault(x => BarrelManager.GetEnemiesInChainRadius(x).Count >= 1); if (barrelToComboFrom == null) { return; } var barrelToQ = BarrelManager.GetBestBarrelToQ(chainedBarrels); if (barrelToQ != null) { if (SpellManager.Q.Ready) { var timeWhenCanE = LastECast + 500; var delay = timeWhenCanE - Game.TickCount; delay = delay <= 0 ? 0 : delay; var castDelay = MenuManager.Combo["triple"].Enabled ? delay : 0; DelayAction.Queue(castDelay, () => SpellManager.Q.Cast(barrelToQ.Object)); return; } //if (barrelToQ.Object.IsInAutoAttackRange() && Orbwalker.Implementation.CanAttack() && MenuManager.Combo["explodeQCooldown"].Enabled) //{ // Orbwalker.Implementation.ForceTarget(barrelToQ.Object); // Orbwalker.Implementation.Attack(barrelToQ.Object); //} } } else { var bestChainPosition = BarrelManager.GetBestChainPosition(target, nearestBarrel); if (bestChainPosition != Vector3.Zero && target.IsInRange(SpellManager.E.Range) && Player.Distance(bestChainPosition) <= SpellManager.E.Range && SpellManager.E.Ready && nearestBarrel.CanChain) { Render.Line(nearestBarrel.ServerPosition.ToScreenPosition(), bestChainPosition.ToScreenPosition(), 5, true, Color.Red); if (SpellManager.E.Cast(bestChainPosition)) { if (SpellManager.Q.Ready && nearestBarrel.CanQ) { SpellManager.Q.Cast(nearestBarrel.Object); } else if (nearestBarrel.CanAA && nearestBarrel.Object.IsInAutoAttackRange() && Orbwalker.Implementation.CanAttack() && !Orbwalker.Implementation.IsWindingUp) { Orbwalker.Implementation.Attack(nearestBarrel.Object); } } } } } } } }
private static void Game_OnUpdate() { BarrelManager.Barrels.RemoveAll(x => x.Object.IsDead || x.Object.Name != "Barrel"); RemoveCC(); Killsteal(); //Auto 1 part if (MenuManager.Misc["autoOnePart"].Enabled) { var onePartBarrels = BarrelManager.Barrels.Where(x => x.Object.Distance(Player) >= 585 && x.Object.Distance(Player) <= 660 && BarrelManager.GetChainedBarrels(x).Count == 1 && x.CanQ); var bestBarrel = onePartBarrels.FirstOrDefault(x => BarrelManager.GetEnemiesInChainRadius(x).Count >= 1); if (bestBarrel != null && SpellManager.Q.Ready && Ammo >= 1 && Game.TickCount - LastQCast >= 2000) { //Console.WriteLine($"[Check] Distance from barrel: {Player.Distance(bestBarrel.Object)}"); LastQCast = Game.TickCount; SpellManager.Q.Cast(bestBarrel.Object); } } AutoExplode(); if ((Orbwalker.Implementation.Mode == OrbwalkingMode.Combo || Orbwalker.Implementation.Mode == OrbwalkingMode.Mixed || Orbwalker.Implementation.Mode == OrbwalkingMode.Lasthit || Orbwalker.Implementation.Mode == OrbwalkingMode.Laneclear || MenuManager.ComboToMouse.Active || MenuManager.ExplodeNearestBarrel.Active) && MenuManager.Misc["aaBarrel"].Enabled) { AttackNearestBarrel(); } if (MenuManager.ComboToMouse.Active) { ComboToMouse(); } if (MenuManager.ExplodeNearestBarrel.Active) { ExplodeNearestBarrel(); } switch (Orbwalker.Implementation.Mode) { case OrbwalkingMode.Combo: Combo(); break; case OrbwalkingMode.Mixed: Harass(); break; case OrbwalkingMode.Lasthit: LastHit(); break; } }