private static void Game_OnUpdate(EventArgs args) { if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None || ObjectManager.Player.IsRecalling()) { return; } //AutoQ if (!ObjectManager.Player.UnderTurret(true) && BadaoYasuoVariables.AutoQ.GetValue <KeyBind>().Active&& BadaoMainVariables.Q.IsReady() && !BadaoYasuoHelper.IsDashing()) { var target = TargetSelector.GetTarget(BadaoYasuoHelper.GetQRange(), TargetSelector.DamageType.Physical); if (target.IsValidTarget() && (BadaoYasuoHelper.Qstate() != 3 || (BadaoYasuoHelper.Qstate() == 3 && BadaoYasuoVariables.AlsoAutoQ3.GetValue <bool>()))) { BadaoYasuoHelper.CastQ(target); } } //AutoKS if (BadaoYasuoVariables.AutoKSQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && !BadaoYasuoHelper.IsDashing()) { foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(BadaoYasuoHelper.GetQRange()) && x.Health < BadaoYasuoHelper.GetQDamage(x))) { BadaoYasuoHelper.CastQ(hero); } } if (BadaoYasuoVariables.AutoKSE.GetValue <bool>() && BadaoMainVariables.E.IsReady()) { foreach (var hero in HeroManager.Enemies.Where(x => x.IsValidTarget(BadaoMainVariables.E.Range) && x.Health < BadaoYasuoHelper.GetEDamage(x))) { BadaoMainVariables.E.Cast(hero); } } //AutoSTack Q if (BadaoYasuoVariables.AutoStackQ3.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && BadaoYasuoHelper.Qstate() != 3 && !HeroManager.Enemies.Any(x => x.IsValidTarget() && BadaoMainVariables.E.IsInRange(x))) { var target = BadaoYasuoHelper.GetETargets().FirstOrDefault(); if (target.IsValidTarget()) { BadaoMainVariables.Q.Cast(target); } } }
private static void Game_OnUpdate(EventArgs args) { if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LastHit) { return; } //LastHit if (BadaoYasuoVariables.LastHitQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && !ObjectManager.Player.IsDashing()) { var minion = MinionManager.GetMinions(BadaoYasuoHelper.GetQRange()).Where(x => !MinionManager.IsWard(x as Obj_AI_Minion) && BadaoYasuoHelper.GetQDamage(x) >= x.Health).FirstOrDefault(); if (minion.IsValidTarget()) { BadaoMainVariables.Q.Cast(minion); } } if (BadaoYasuoVariables.LastHitE.GetValue <bool>() && BadaoMainVariables.E.IsReady()) { var minion = MinionManager.GetMinions(BadaoMainVariables.E.Range).Where(x => !MinionManager.IsWard(x as Obj_AI_Minion) && BadaoYasuoHelper.GetEDamage(x) >= x.Health).FirstOrDefault(); if (minion.IsValidTarget()) { BadaoMainVariables.E.Cast(minion); } } }
private static void Game_OnUpdate(EventArgs args) { if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear) { return; } //LaneClear if (BadaoYasuoVariables.LaneQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && BadaoYasuoVariables.LaneE.GetValue <bool>() && BadaoMainVariables.E.IsReady()) { var minions = MinionManager.GetMinions(BadaoMainVariables.E.Range).Where(x => !MinionManager.IsWard(x as Obj_AI_Minion)); var minion = minions.Where(x => minions.Where(y => y.Distance(BadaoYasuoHelper.GetEDashEnd(x)) <= 250).Count() >= 2) .MaxOrDefault(x => minions.Where(y => y.Distance(BadaoYasuoHelper.GetEDashEnd(x)) <= 250).Count()); if (minion.IsValidTarget()) { BadaoMainVariables.E.Cast(minion); LeagueSharp.Common.Utility.DelayAction.Add(100, () => BadaoMainVariables.Q.Cast(ObjectManager.Player.Position)); } } if (BadaoYasuoVariables.LaneQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && !ObjectManager.Player.IsDashing()) { var minions = MinionManager.GetMinions(BadaoYasuoHelper.GetQRange()).Where(x => !MinionManager.IsWard(x as Obj_AI_Minion)); var minion = minions.Where(x => BadaoYasuoHelper.GetQDamage(x) + BadaoYasuoHelper.GetEDamage(x) >= x.Health).FirstOrDefault(); if (minion.IsValidTarget()) { BadaoMainVariables.Q.Cast(minion); } var farm = MinionManager.GetBestLineFarmLocation(minions.Select(x => x.Position.To2D()).ToList(), 70, BadaoYasuoHelper.GetQRange()); if (farm.MinionsHit >= 2) { BadaoMainVariables.Q.Cast(farm.Position); } } if (BadaoYasuoVariables.LaneE.GetValue <bool>() && BadaoMainVariables.E.IsReady()) { var minion = MinionManager.GetMinions(BadaoMainVariables.E.Range).Where(x => !MinionManager.IsWard(x as Obj_AI_Minion) && BadaoYasuoHelper.GetEDamage(x) >= x.Health).FirstOrDefault(); if (minion.IsValidTarget()) { BadaoMainVariables.E.Cast(minion); } } // JungleClear if (BadaoYasuoVariables.JungQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && BadaoYasuoVariables.JungE.GetValue <bool>() && BadaoMainVariables.E.IsReady()) { var minions = MinionManager.GetMinions(BadaoMainVariables.E.Range, MinionTypes.All, MinionTeam.Neutral).Where(x => !MinionManager.IsWard(x as Obj_AI_Minion)); var minion = minions.Where(x => minions.Where(y => y.Distance(BadaoYasuoHelper.GetEDashEnd(x)) <= 250).Count() >= 2) .MaxOrDefault(x => minions.Where(y => y.Distance(BadaoYasuoHelper.GetEDashEnd(x)) <= 250).Count()); if (minion.IsValidTarget()) { BadaoMainVariables.Q.Cast(minion); } } if (BadaoYasuoVariables.JungQ.GetValue <bool>() && BadaoMainVariables.Q.IsReady() && !ObjectManager.Player.IsDashing()) { var minions = MinionManager.GetMinions(BadaoYasuoHelper.GetQRange(), MinionTypes.All, MinionTeam.Neutral).OrderByDescending(x => x.MaxHealth) .Where(x => !MinionManager.IsWard(x as Obj_AI_Minion)); var minion = minions.FirstOrDefault(); if (minion.IsValidTarget()) { BadaoMainVariables.Q.Cast(minion); } var farm = MinionManager.GetBestLineFarmLocation(minions.Select(x => x.Position.To2D()).ToList(), 70, BadaoYasuoHelper.GetQRange()); if (farm.MinionsHit >= 2) { BadaoMainVariables.Q.Cast(farm.Position); } } if (BadaoYasuoVariables.JungE.GetValue <bool>() && BadaoMainVariables.E.IsReady()) { var minion = MinionManager.GetMinions(BadaoMainVariables.E.Range, MinionTypes.All, MinionTeam.Neutral).Where(x => !MinionManager.IsWard(x as Obj_AI_Minion) && BadaoYasuoHelper.GetEDamage(x) >= x.Health).FirstOrDefault(); if (minion.IsValidTarget()) { BadaoMainVariables.E.Cast(minion); LeagueSharp.Common.Utility.DelayAction.Add(100, () => BadaoMainVariables.Q.Cast(ObjectManager.Player.Position)); } } }