public static void Init(Yasuo yas) { Yas = yas; Config = MainMenu.AddMenu("亚索Pro", "YasuoPro"); ComboM = Config.AddSubMenu("连招"); YasuoMenu.Combo.Attach(ComboM); HarassM = Config.AddSubMenu("骚扰"); YasuoMenu.Harass.Attach(HarassM); KillstealM = Config.AddSubMenu("抢头"); YasuoMenu.Killsteal.Attach(KillstealM); FarmingM = Config.AddSubMenu("尾兵"); YasuoMenu.Farm.Attach(FarmingM); WaveclearM = Config.AddSubMenu("清线"); YasuoMenu.Waveclear.Attach(WaveclearM); MiscM = Config.AddSubMenu("杂项"); YasuoMenu.Misc.Attach(MiscM); DrawingsM = Config.AddSubMenu("线圈"); YasuoMenu.Drawings.Attach(DrawingsM); }
public static void Init(Yasuo yas) { Yas = yas; Config = MainMenu.AddMenu("YasuoPro", "YasuoPro"); ComboM = Config.AddSubMenu("Combo"); YasuoMenu.Combo.Attach(ComboM); HarassM = Config.AddSubMenu("Harass"); YasuoMenu.Harass.Attach(HarassM); KillstealM = Config.AddSubMenu("Killsteal"); YasuoMenu.Killsteal.Attach(KillstealM); FarmingM = Config.AddSubMenu("LastHitting"); YasuoMenu.Farm.Attach(FarmingM); WaveclearM = Config.AddSubMenu("Waveclear"); YasuoMenu.Waveclear.Attach(WaveclearM); MiscM = Config.AddSubMenu("Misc"); YasuoMenu.Misc.Attach(MiscM); DrawingsM = Config.AddSubMenu("Drawings"); YasuoMenu.Drawings.Attach(DrawingsM); }
public static void Init(Yasuo yas) { Yas = yas; Config = new Menu("YasuoPro", "YasuoPro", true); Menu OWMenu = Config.AddSubMenu("Orbwalking"); Orbwalker = new Orbwalking.Orbwalker(OWMenu); Menu Combo = Config.AddSubMenu("Combo"); YasuoMenu.Combo.Attach(Combo); Menu Harass = Config.AddSubMenu("Harass"); YasuoMenu.Harass.Attach(Harass); Menu Evade = Config.AddSubMenu("Evade"); YasuoMenu.Evade.Attach(Evade); Menu Killsteal = Config.AddSubMenu("Killsteal"); YasuoMenu.Killsteal.Attach(Killsteal); Menu Farming = Config.AddSubMenu("LastHitting"); YasuoMenu.Farm.Attach(Farming); Menu Waveclear = Config.AddSubMenu("Waveclear"); YasuoMenu.Waveclear.Attach(Waveclear); Menu Misc = Config.AddSubMenu("Misc"); YasuoMenu.Misc.Attach(Misc); Menu Drawings = Config.AddSubMenu("Drawings"); YasuoMenu.Drawings.Attach(Drawings); Config.AddToMainMenu(); }
public static void Init(Yasuo yas) { Yas = yas; Config = MainMenu.AddMenu("YasuoPro", "YasuoPro"); ComboA = Config.AddSubMenu("Combo"); Combo.Attach(ComboA); HarassA = Config.AddSubMenu("Harass"); Harass.Attach(HarassA); KillstealA = Config.AddSubMenu("Killsteal"); Killsteal.Attach(KillstealA); FarmingA = Config.AddSubMenu("LastHitting"); Farm.Attach(FarmingA); WaveclearA = Config.AddSubMenu("Waveclear"); Waveclear.Attach(WaveclearA); MiscA = Config.AddSubMenu("Misc"); Misc.Attach(MiscA); DrawingsA = Config.AddSubMenu("Drawings"); Drawings.Attach(DrawingsA); Flee = Config.AddSubMenu("Flee Settings", "Flee"); Flee.Add("Flee.Mode", new ComboBox("Flee Mode", 0, "To Nexus", "To Allies", "To Cursor")); Flee.Add("Flee.StackQ", new CheckBox("Stack Q during Flee")); Flee.Add("Flee.UseQ2", new CheckBox("Use Tornado", false)); }
public static void Init(Yasuo yas) { Yas = yas; Config = MainMenu.AddMenu("YasuoPro", "YasuoPro"); ComboM = Config.AddSubMenu("Combo"); YasuoMenu.Combo.Attach(ComboM); HarassM = Config.AddSubMenu("Harass"); YasuoMenu.Harass.Attach(HarassM); EvadeM = Config.AddSubMenu("Evade"); YasuoMenu.Evade.Attach(EvadeM); KillstealM = Config.AddSubMenu("Killsteal"); YasuoMenu.Killsteal.Attach(KillstealM); FarmingM = Config.AddSubMenu("LastHitting"); YasuoMenu.Farm.Attach(FarmingM); WaveclearM = Config.AddSubMenu("Waveclear"); YasuoMenu.Waveclear.Attach(WaveclearM); MiscM = Config.AddSubMenu("Misc"); YasuoMenu.Misc.Attach(MiscM); DrawingsM = Config.AddSubMenu("Drawings"); YasuoMenu.Drawings.Attach(DrawingsM); }
void Waveclear() { if (SpellSlot.Q.IsReady() && !Yasuo.LSIsDashing()) { if (!TornadoReady && GetBool("Waveclear.UseQ", YasuoMenu.WaveclearM) && Orbwalker.IsAutoAttacking) { var minion = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidMinion(Spells[Q].Range) && ((x.IsDashable() && (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= GetProperEDamage(x))) || (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.15 * x.MaxHealth || x.QCanKill()))).MaxOrDefault(x => x.MaxHealth); if (minion != null) { Spells[Q].Cast(minion); } } else if (TornadoReady && GetBool("Waveclear.UseQ2", YasuoMenu.WaveclearM)) { var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Distance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && ((x.IsDashable() && x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.85 * GetProperEDamage(x)) || (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.10 * x.MaxHealth) || x.CanKill(SpellSlot.Q))); var pred = MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[Q2].Width, Spells[Q2].Range); if (pred.MinionsHit >= GetSliderInt("Waveclear.Qcount", YasuoMenu.WaveclearM)) { Spells[Q2].Cast(pred.Position); } } } if (SpellSlot.E.IsReady() && GetBool("Waveclear.UseE", YasuoMenu.WaveclearM) && (!GetBool("Waveclear.Smart", YasuoMenu.WaveclearM) || isHealthy) && (YasuoEvade.TickCount - WCLastE) >= GetSliderInt("Waveclear.Edelay", YasuoMenu.WaveclearM)) { var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsDashable() && ((GetBool("Waveclear.UseENK", YasuoMenu.WaveclearM) && (!GetBool("Waveclear.Smart", YasuoMenu.WaveclearM) || x.Health - GetProperEDamage(x) > GetProperEDamage(x) * 3)) || x.ECanKill()) && (GetBool("Waveclear.ETower", YasuoMenu.WaveclearM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !GetDashPos(x).PointUnderEnemyTurret())); Obj_AI_Minion minion = null; minion = minions.MaxOrDefault(x => GetDashPos(x).MinionsInRange(200)); if (minion != null) { Spells[E].Cast(minion); WCLastE = YasuoEvade.TickCount; } } if (GetBool("Waveclear.UseItems", YasuoMenu.WaveclearM)) { if (GetBool("Waveclear.UseTIA", YasuoMenu.WaveclearM)) { Tiamat.minioncount = GetSliderInt("Waveclear.MinCountHDR", YasuoMenu.WaveclearM); Tiamat.Cast(null, true); } if (GetBool("Waveclear.UseHDR", YasuoMenu.WaveclearM)) { Hydra.minioncount = GetSliderInt("Waveclear.MinCountHDR", YasuoMenu.WaveclearM); Hydra.Cast(null, true); } if (GetBool("Waveclear.UseYMU", YasuoMenu.WaveclearM)) { Youmu.minioncount = GetSliderInt("Waveclear.MinCountYOU", YasuoMenu.WaveclearM); Youmu.Cast(null, true); } } }
void CastENew() { if (Yasuo.LSIsDashing()) { return; } if (isHealthy) { AIHeroClient best = null; TargetSelectorA.TargetSelectionConditionDelegate condition = delegate(AIHeroClient target) { return(IsPossibleToDash(target, 3).foundPath); }; best = TargetSelector.GetTarget(Spells[E].Range * 4, DamageType.Physical); if (best != null) { if (best.Distance(Yasuo) < 0.30 * Orbwalking.GetRealAutoAttackRange(best)) { return; } if (best.IsValidTarget(Spells[E].Range)) { Spells[E].Cast(best); } else { var getPath = GetClosestPath(best, 3); if (getPath.foundPath) { var min = getPath.minionPath.FirstOrDefault(); if (min != null && min.IsValidTarget() && ((GetBool("Combo.ETower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM)) || !GetDashPos(min).PointUnderEnemyTurret())) { Spells[E].CastOnUnit(min); } } } } } else if (!Yasuo.LSIsDashing() && GetBool("Combo.EToSafety", YasuoMenu.ComboM)) { var bestmin = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsDashable() && GetDashPos(x).Distance(shop.Position) < Yasuo.Distance(shop.Position)).MinOrDefault(x => GetDashPos(x).Distance(shop.Position)); if (bestmin != null) { Spells[E].Cast(bestmin); } } }
void CastIgnite() { var target = HeroManager.Enemies.Find( x => x.IsValidEnemy(Spells[Ignite].Range) && Yasuo.GetSummonerSpellDamage(x, Damage.SummonerSpell.Ignite) >= x.Health); if (Spells[Ignite].IsReady() && target != null) { Spells[Ignite].Cast(target); } }
void OnInterruptable(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args) { if (Yasuo.ServerPosition.PointUnderEnemyTurret()) { return; } if (GetBool("Misc.Interrupter", YasuoMenu.MiscM) && TornadoReady && Yasuo.LSDistance(sender.ServerPosition) <= 500) { if (args.EndTime >= Spells[Q2].Delay) { Spells[Q2].Cast(sender.ServerPosition); } } }
private void LHSkills() { if (SpellSlot.Q.IsReady() && !Yasuo.IsDashing()) { if (!TornadoReady && YasuoMenu.getCheckBoxItem(YasuoMenu.FarmingA, "Farm.UseQ")) { var minion = ObjectManager.Get <Obj_AI_Minion>() .FirstOrDefault(x => x.IsValidMinion(Spells[Q].Range) && x.QCanKill()); if (minion != null) { Spells[Q].Cast(minion.ServerPosition); } } else if (TornadoReady && YasuoMenu.getCheckBoxItem(YasuoMenu.FarmingA, "Farm.UseQ2")) { var minions = ObjectManager.Get <Obj_AI_Minion>() .Where( x => x.Distance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && x.QCanKill()); var pred = MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[Q2].Width, Spells[Q2].Range); if (pred.MinionsHit >= YasuoMenu.getSliderItem(YasuoMenu.FarmingA, "Farm.Qcount")) { Spells[Q2].Cast(pred.Position); } } } if (Spells[E].IsReady() && YasuoMenu.getCheckBoxItem(YasuoMenu.FarmingA, "Farm.UseE")) { var minion = ObjectManager.Get <Obj_AI_Minion>() .FirstOrDefault( x => x.IsDashable() && x.ECanKill() && (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.ETower") || YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") || !GetDashPos(x).PointUnderEnemyTurret())); if (minion != null) { Spells[E].Cast(minion); } } }
void OnGapClose(ActiveGapcloser args) { if (Yasuo.ServerPosition.PointUnderEnemyTurret()) { return; } if (GetBool("Misc.AG", YasuoMenu.MiscM) && TornadoReady && Yasuo.LSDistance(args.End) <= 500) { var pred = Spells[Q2].GetPrediction(args.Sender); if (pred.Hitchance >= GetHitChance("Hitchance.Q")) { Spells[Q2].Cast(pred.CastPosition); } } }
void MoveToMouse() { Yasuo.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos); if (Spells[E].IsReady()) { var bestminion = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(Game.CursorPos)); if (bestminion != null) { Spells[E].CastOnUnit(bestminion); } } }
internal void PerformEQ() { if (ETarget != null && ETarget.IsValid && !ETarget.ECanKill() && Yasuo.LSIsDashing() && Spells[Q].IsReady()) { if (!TornadoReady) { Spells[Q].Cast(ETarget); } else { if (ETarget is AIHeroClient) { Spells[Q].Cast(ETarget); } } } }
PathResult IsPossibleToDash(AIHeroClient target, int jumpcount) { var result = new PathResult(); var dist = Yasuo.Distance(target); var pos = Yasuo.ServerPosition.To2D(); var minionsinbw = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.Distance(target) <= dist && x.Distance(Yasuo) < dist) .OrderBy(x => x.Distance(Yasuo)); result.foundPath = false; foreach (var minion in minionsinbw) { if (result.numberOfHops > jumpcount) { result.foundPath = false; return(result); } if (pos.Distance(target) <= Yasuo.AttackRange || (target.IsDashable() && pos.Distance(target) <= Spells[E].Range)) { result.foundPath = true; return(result); } if (pos.Distance(minion) > Spells[E].Range) { continue; } if (minion.IsDashable(40000)) { result.numberOfHops++; result.minionPath.Add(minion); pos = GetDashPos(minion); } else { continue; } } return(result); }
//minimum amount of minions PathResult GetClosestPath(AIHeroClient target, int minioncount) { var result = new PathResult(); var dist = Yasuo.Distance(target); var pos = Yasuo.ServerPosition.To2D(); var minionsinbw = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.Distance(target) <= dist && x.Distance(Yasuo) < dist) .OrderBy(x => x.Distance(Yasuo)); result.minionPath = new List <Obj_AI_Minion>(); foreach (var minion in minionsinbw) { if (result.numberOfHops > minioncount) { result.foundPath = false; break; } if (pos.Distance(target) <= Spells[E].Range) { result.foundPath = true; break; } if (minion.IsDashable(40000) && minion.Distance(pos) <= Spells[E].Range) { result.numberOfHops++; result.minionPath.Add(minion); pos = GetDashPos(minion); } else { result.foundPath = false; } } return(result); }
void LHSkills() { if (SpellSlot.Q.IsReady() && !Yasuo.LSIsDashing()) { if (!TornadoReady && GetBool("Farm.UseQ", YasuoMenu.FarmingM)) { var minion = ObjectManager.Get <Obj_AI_Minion>() .FirstOrDefault(x => x.IsValidMinion(Spells[Q].Range) && x.QCanKill()); if (minion != null) { Spells[Q].Cast(minion); } } else if (TornadoReady && GetBool("Farm.UseQ2", YasuoMenu.FarmingM)) { var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.LSDistance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && (x.QCanKill())); var pred = MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.LSTo2D()).ToList(), Spells[Q2].Width, Spells[Q2].Range); if (pred.MinionsHit >= GetSliderInt("Farm.Qcount", YasuoMenu.FarmingM)) { Spells[Q2].Cast(pred.Position); } } } if (Spells[E].IsReady() && GetBool("Farm.UseE", YasuoMenu.FarmingM)) { var minion = ObjectManager.Get <Obj_AI_Minion>().FirstOrDefault(x => x.IsDashable() && x.ECanKill() && (GetBool("Waveclear.ETower", YasuoMenu.WaveclearM) || ShouldDive(x))); if (minion != null) { Spells[E].Cast(minion); } } }
private void Waveclear() { if (SpellSlot.Q.IsReady() && !Yasuo.IsDashing()) { if (!TornadoReady && YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseQ")) { var minion = ObjectManager.Get <Obj_AI_Minion>() .Where( x => x.IsValidMinion(Spells[Q].Range) && ((x.IsDashable() && (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= GetProperEDamage(x))) || x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.15 * x.MaxHealth || x.QCanKill())) .MaxOrDefault(x => x.MaxHealth); if (minion != null) { Spells[Q].Cast(minion.ServerPosition); } } else if (TornadoReady && YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseQ2")) { var minions = ObjectManager.Get <Obj_AI_Minion>() .Where( x => x.Distance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && ((x.IsDashable() && x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.85 * GetProperEDamage(x)) || (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.10 * x.MaxHealth) || x.CanKill(SpellSlot.Q))); var pred = MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[Q2].Width, Spells[Q2].Range); if (pred.MinionsHit >= YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.Qcount")) { Spells[Q2].Cast(pred.Position); } } } if (SpellSlot.E.IsReady() && YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseE") && (!YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.Smart") || isHealthy)) { var minions = ObjectManager.Get <Obj_AI_Minion>() .Where( x => x.IsDashable() && ((YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseENK") && (!YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.Smart") || x.Health - GetProperEDamage(x) > GetProperEDamage(x) * 3)) || x.ECanKill()) && (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.ETower") || YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") || !GetDashPos(x).PointUnderEnemyTurret())); Obj_AI_Minion minion = null; minion = minions.MaxOrDefault(x => GetDashPos(x).MinionsInRange(200)); if (minion != null) { Spells[E].Cast(minion); } } if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseItems")) { if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseTIA")) { Tiamat.minioncount = YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.MinCountHDR"); Tiamat.Cast(null, true); } if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseHDR")) { Hydra.minioncount = YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.MinCountHDR"); Hydra.Cast(null, true); } if (YasuoMenu.getCheckBoxItem(YasuoMenu.WaveclearA, "Waveclear.UseYMU")) { Youmu.minioncount = YasuoMenu.getSliderItem(YasuoMenu.WaveclearA, "Waveclear.MinCountYOU"); Youmu.Cast(null, true); } } }
void Flee() { Orbwalker.DisableAttacking = true; // BERB if (GetBool("Flee.UseQ2", YasuoMenu.MiscM) && !Yasuo.LSIsDashing() && SpellSlot.Q.IsReady() && TornadoReady) { var qtarg = TargetSelector.GetTarget(Spells[Q2].Range, DamageType.Physical); if (qtarg != null) { Spells[Q2].Cast(qtarg.ServerPosition); } } if (FleeMode == FleeType.ToCursor) { Orbwalker.OrbwalkTo(Game.CursorPos); var smart = GetBool("Flee.Smart", YasuoMenu.MiscM); if (Spells[E].IsReady()) { if (smart) { Obj_AI_Base dashTarg; if (Yasuo.ServerPosition.PointUnderEnemyTurret()) { var closestturret = ObjectManager.Get <Obj_AI_Turret>() .Where(x => x.IsEnemy) .MinOrDefault(y => y.LSDistance(Yasuo)); var potential = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MaxOrDefault(x => GetDashPos(x).LSDistance(closestturret)); if (potential != null) { var gdpos = GetDashPos(potential); if (gdpos.LSDistance(Game.CursorPos) < Yasuo.LSDistance(Game.CursorPos) && gdpos.LSDistance(closestturret.Position) - closestturret.BoundingRadius > Yasuo.LSDistance(closestturret.Position) - Yasuo.BoundingRadius) { Spells[E].Cast(potential); } } } dashTarg = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).LSDistance(Game.CursorPos)); if (dashTarg != null) { var posafdash = GetDashPos(dashTarg); if (posafdash.LSDistance(Game.CursorPos) < Yasuo.LSDistance(Game.CursorPos) && !posafdash.PointUnderEnemyTurret()) { Spells[E].CastOnUnit(dashTarg); } } } else { var dashtarg = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).LSDistance(Game.CursorPos)); if (dashtarg != null) { Spells[E].CastOnUnit(dashtarg); } } } if (GetBool("Flee.StackQ", YasuoMenu.MiscM) && SpellSlot.Q.IsReady() && !TornadoReady && !Yasuo.LSIsDashing()) { Obj_AI_Minion qtarg = null; if (!Spells[E].IsReady()) { qtarg = ObjectManager.Get <Obj_AI_Minion>() .Find(x => x.LSIsValidTarget(Spells[Q].Range) && MinionManager.IsMinion(x)); } else { var etargs = ObjectManager.Get <Obj_AI_Minion>() .Where( x => x.LSIsValidTarget(Spells[E].Range) && MinionManager.IsMinion(x) && x.IsDashable()); if (!etargs.Any()) { qtarg = ObjectManager.Get <Obj_AI_Minion>() .Find(x => x.LSIsValidTarget(Spells[Q].Range) && MinionManager.IsMinion(x)); } } if (qtarg != null) { Spells[Q].Cast(qtarg); } } } if (FleeMode == FleeType.ToNexus) { var nexus = shop; if (nexus != null) { Orbwalker.OrbwalkTo(nexus.Position); var bestminion = ObjectManager.Get <Obj_AI_Base>().Where(x => x.IsDashable()).MinOrDefault(x => GetDashPos(x).LSDistance(nexus.Position)); if (bestminion != null && (!GetBool("Flee.Smart", YasuoMenu.MiscM) || GetDashPos(bestminion).LSDistance(nexus.Position) < Yasuo.LSDistance(nexus.Position))) { Spells[E].CastOnUnit(bestminion); if (GetBool("Flee.StackQ", YasuoMenu.MiscM) && SpellSlot.Q.IsReady() && !TornadoReady) { Spells[Q].Cast(bestminion); } } } } if (FleeMode == FleeType.ToAllies) { Obj_AI_Base bestally = HeroManager.Allies.Where(x => !x.IsMe && x.LSCountEnemiesInRange(300) == 0).MinOrDefault(x => x.LSDistance(Yasuo)); if (bestally == null) { bestally = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidAlly(3000)) .MinOrDefault(x => x.LSDistance(Yasuo)); } if (bestally != null) { Orbwalker.OrbwalkTo(bestally.ServerPosition); if (Spells[E].IsReady()) { var besttarget = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).LSDistance(bestally.ServerPosition)); if (besttarget != null) { Spells[E].CastOnUnit(besttarget); if (GetBool("Flee.StackQ", YasuoMenu.MiscM) && SpellSlot.Q.IsReady() && !TornadoReady) { Spells[Q].Cast(besttarget); } } } } else { var nexus = shop; if (nexus != null) { Orbwalker.OrbwalkTo(nexus.Position); var bestminion = ObjectManager.Get <Obj_AI_Base>().Where(x => x.IsDashable()).MinOrDefault(x => GetDashPos(x).LSDistance(nexus.Position)); if (bestminion != null && GetDashPos(bestminion).LSDistance(nexus.Position) < Yasuo.LSDistance(nexus.Position)) { Spells[E].CastOnUnit(bestminion); } } } } }
void Killsteal() { if (SpellSlot.Q.IsReady() && GetBool("Killsteal.UseQ", YasuoMenu.KillstealM)) { var targ = HeroManager.Enemies.Find(x => x.CanKill(SpellSlot.Q) && x.IsInRange(Qrange)); if (targ != null) { UseQ(targ, GetHitChance("Hitchance.Q")); return; } } if (SpellSlot.E.IsReady() && GetBool("Killsteal.UseE", YasuoMenu.KillstealM)) { var targ = HeroManager.Enemies.Find(x => x.CanKill(SpellSlot.E) && x.IsInRange(Spells[E].Range)); if (targ != null) { Spells[E].Cast(targ); return; } } if (SpellSlot.R.IsReady() && GetBool("Killsteal.UseR", YasuoMenu.KillstealM)) { var targ = KnockedUp.Find(x => x.CanKill(SpellSlot.R) && x.IsValidEnemy(Spells[R].Range) && !x.isBlackListed()); if (targ != null) { Spells[R].Cast(targ); return; } } if (GetBool("Killsteal.UseItems", YasuoMenu.KillstealM)) { if (Tiamat.item.IsReady()) { var targ = HeroManager.Enemies.Find( x => x.IsValidEnemy(Tiamat.item.Range) && x.Health <= Yasuo.GetItemDamage(x, LeagueSharp.Common.Damage.DamageItems.Tiamat)); if (targ != null) { Tiamat.Cast(null); } } if (Titanic.item.IsReady()) { var targ = HeroManager.Enemies.Find( x => x.IsValidEnemy(Titanic.item.Range) && x.Health <= Yasuo.GetItemDamage(x, LeagueSharp.Common.Damage.DamageItems.Tiamat)); if (targ != null) { Titanic.Cast(null); } } if (Hydra.item.IsReady()) { var targ = HeroManager.Enemies.Find( x => x.IsValidEnemy(Hydra.item.Range) && x.Health <= Yasuo.GetItemDamage(x, LeagueSharp.Common.Damage.DamageItems.Tiamat)); if (targ != null) { Hydra.Cast(null); } } if (Blade.item.IsReady()) { var targ = HeroManager.Enemies.Find( x => x.IsValidEnemy(Blade.item.Range) && x.Health <= Yasuo.GetItemDamage(x, LeagueSharp.Common.Damage.DamageItems.Botrk)); if (targ != null) { Blade.Cast(targ); } } if (Bilgewater.item.IsReady()) { var targ = HeroManager.Enemies.Find( x => x.IsValidEnemy(Bilgewater.item.Range) && x.Health <= Yasuo.GetItemDamage(x, LeagueSharp.Common.Damage.DamageItems.Bilgewater)); if (targ != null) { Bilgewater.Cast(targ); } } } }
void CastR(int minhit = 1) { UltMode ultmode = GetUltMode(); List <AIHeroClient> ordered = new List <AIHeroClient>(); if (ultmode == UltMode.Health) { ordered = KnockedUp.OrderBy(x => x.Health).ThenByDescending(x => TargetSelector.GetPriority(x)).ThenByDescending(x => x.CountEnemiesInRange(350)).ToList(); } if (ultmode == UltMode.Priority) { ordered = KnockedUp.OrderByDescending(x => TargetSelector.GetPriority(x)).ThenBy(x => x.Health).ThenByDescending(x => x.CountEnemiesInRange(350)).ToList(); } if (ultmode == UltMode.EnemiesHit) { ordered = KnockedUp.OrderByDescending(x => x.LSCountEnemiesInRange(350)).ThenByDescending(x => TargetSelector.GetPriority(x)).ThenBy(x => x.Health).ToList(); } if (GetBool("Combo.UltOnlyKillable", YasuoMenu.ComboM)) { var killable = ordered.FirstOrDefault(x => !x.isBlackListed() && x.Health <= Yasuo.LSGetSpellDamage(x, SpellSlot.R) && x.HealthPercent >= GetSliderInt("Combo.MinHealthUlt", YasuoMenu.ComboM) && (GetBool("Combo.UltTower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || ShouldDive(x))); if (killable != null && (!killable.IsInRange(Spells[Q].Range) || !isHealthy)) { Spells[R].CastOnUnit(killable); } return; } if ((GetBool("Combo.OnlyifMin", YasuoMenu.ComboM) && ordered.Count() < minhit) || (ordered.Count() == 1 && ordered.FirstOrDefault().HealthPercent < GetSliderInt("Combo.MinHealthUlt", YasuoMenu.ComboM))) { return; } if (GetBool("Combo.RPriority", YasuoMenu.ComboM)) { var best = ordered.Find(x => !x.isBlackListed() && TargetSelector.GetPriority(x).Equals(2.5f) && (GetBool("Combo.UltTower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !x.Position.LSTo2D().PointUnderEnemyTurret())); if (best != null && Yasuo.HealthPercent / best.HealthPercent <= 1) { Spells[R].CastOnUnit(best); return; } } if (ordered.Count() >= minhit) { var best2 = ordered.FirstOrDefault(x => !x.isBlackListed() && (GetBool("Combo.UltTower", YasuoMenu.ComboM) || ShouldDive(x))); if (best2 != null) { Spells[R].CastOnUnit(best2); } return; } }
void OnUpdate(EventArgs args) { if (Yasuo.IsDead || Yasuo.LSIsRecalling()) { return; } CastUlt(); if (GetBool("Misc.AutoStackQ", YasuoMenu.MiscM) && !TornadoReady && !CurrentTarget.IsValidEnemy(Spells[Q].Range) && !Yasuo.LSIsDashing() && !InDash) { var closest = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidMinion(Spells[Q].Range) && (MinionManager.IsMinion(x) || x.BaseSkinName.Equals("Sru_Crab"))) .MinOrDefault(x => x.LSDistance(Yasuo)); if (closest != null) { var pred = Spells[Q].GetPrediction(closest); if (pred.Hitchance >= HitChance.Low) { Spells[Q].Cast(closest.ServerPosition); } } } if (GetBool("Misc.Walljump", YasuoMenu.MiscM) && Game.MapId == GameMapId.SummonersRift) { WallJump.OnUpdate(); } if (GetKeyBind("Misc.DashMode", YasuoMenu.MiscM)) { MoveToMouse(); return; } Fleeing = Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee); if (GetBool("Killsteal.Enabled", YasuoMenu.KillstealM) && !Fleeing) { Killsteal(); } if (GetKeyBind("Harass.KB", YasuoMenu.HarassM) && !Fleeing) { Harass(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { Orbwalker.OrbwalkTo(Game.CursorPos); Orbwalker.DisableAttacking = false; Combo(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { Orbwalker.OrbwalkTo(Game.CursorPos); Orbwalker.DisableAttacking = false; Mixed(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { Orbwalker.OrbwalkTo(Game.CursorPos); Orbwalker.DisableAttacking = false; LHSkills(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) { Orbwalker.OrbwalkTo(Game.CursorPos); Orbwalker.DisableAttacking = false; Waveclear(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee)) { Flee(); } }
internal void CastQ(AIHeroClient target) { if (target != null && !target.IsInRange(Qrange)) { target = TargetSelector.GetTarget(Qrange, DamageType.Physical); } if (target != null) { if (Spells[Q].IsReady() && target.IsValidEnemy(Qrange)) { UseQ(target, GetHitChance("Hitchance.Q"), GetBool("Combo.UseQ", YasuoMenu.ComboM), GetBool("Combo.UseQ2", YasuoMenu.ComboM)); return; } if (GetBool("Combo.StackQ", YasuoMenu.ComboM) && !target.IsValidEnemy(Qrange) && !TornadoReady && !Yasuo.LSIsDashing() && !InDash) { var bestmin = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidMinion(Qrange) && MinionManager.IsMinion(x, false)) .MinOrDefault(x => x.LSDistance(Yasuo)); if (bestmin != null) { var pred = Spells[Q].GetPrediction(bestmin); if (pred.Hitchance >= HitChance.Medium) { Spells[Q].Cast(bestmin); } } } } }
internal void CastENew(AIHeroClient target) { if (!SpellSlot.E.IsReady() || Yasuo.LSIsDashing() || InDash) { return; } var minionsinrange = ObjectManager.Get <Obj_AI_Minion>().Any(x => x.IsDashable()); if (target == null || !target.IsInRange(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range)) { target = TargetSelector.GetTarget(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range, DamageType.Physical); } if (target != null && TowerCheck(target, true)) { var dist = Yasuo.LSDistance(target); var pctOutOfRange = dist / Yasuo.AttackRange * 100; if (pctOutOfRange > 0.8f) { if (target.IsDashable()) { if (target.ECanKill()) { return; } if (TornadoReady && target.IsInRange(Spells[E].Range) && targInKnockupRadius(target)) { Spells[E].CastOnUnit(target); } //Stay in range else if (pctOutOfRange > 0.8f) { var bestminion = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable() && GetDashPos(x).IsCloser(target) && TowerCheck(x, true)) .MinOrDefault(x => GetDashPos(x).LSDistance(target)); var shouldETarget = bestminion == null || GetDashPos(target).Distance(target) < GetDashPos(bestminion).LSDistance(target); if (shouldETarget && GetDashPos(target).IsCloser(target)) { Spells[E].CastOnUnit(target); } else if (bestminion != null) { Spells[E].CastOnUnit(bestminion); } } } else { var minion = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsDashable() && x.IsCloser(target) && TowerCheck(x, true)) .MinOrDefault(x => GetDashPos(x).LSDistance(target)); if (minion != null) { Spells[E].CastOnUnit(minion); } } } } }
void Waveclear() { if (SpellSlot.Q.IsReady() && !Yasuo.IsDashing() && !InDash) { if (!TornadoReady && GetBool("Waveclear.UseQ") && Yasuo.Spellbook.IsAutoAttacking) { var minion = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidMinion(Spells[Q].Range) && ((x.IsDashable() && (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= GetProperEDamage(x))) || (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.15 * x.MaxHealth || x.QCanKill()))).MaxOrDefault(x => x.MaxHealth); if (minion != null) { Spells[Q].Cast(minion.ServerPosition); LastTornadoClearTick = Helper.TickCount; } } else if (TornadoReady && GetBool("Waveclear.UseQ2")) { var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.Distance(Yasuo) > Yasuo.AttackRange && x.IsValidMinion(Spells[Q2].Range) && ((x.IsDashable() && x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.85 * GetProperEDamage(x)) || (x.Health - Yasuo.GetSpellDamage(x, SpellSlot.Q) >= 0.10 * x.MaxHealth) || x.CanKill(SpellSlot.Q))); var pred = MinionManager.GetBestLineFarmLocation(minions.Select(m => m.ServerPosition.To2D()).ToList(), Spells[Q2].Width, Spells[Q2].Range); if (pred.MinionsHit >= GetSliderInt("Waveclear.Qcount")) { Spells[Q2].Cast(pred.Position); LastTornadoClearTick = Helper.TickCount; } } } if (Helper.TickCount - LastTornadoClearTick < 500) { return; } if (SpellSlot.E.IsReady() && GetBool("Waveclear.UseE") && (!GetBool("Waveclear.Smart") || isHealthy) && (Helper.TickCount - WCLastE) >= GetSliderInt("Waveclear.Edelay")) { var minions = ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsDashable() && ((GetBool("Waveclear.UseENK") && (!GetBool("Waveclear.Smart") || x.Health - GetProperEDamage(x) > GetProperEDamage(x) * 3)) || x.ECanKill()) && (GetBool("Waveclear.ETower") || ShouldDive(x))); Obj_AI_Minion minion = null; minion = minions.OrderBy(x => x.ECanKill()).ThenBy(x => GetDashPos(x).MinionsInRange(200)).FirstOrDefault(); if (minion != null) { Spells[E].Cast(minion); WCLastE = Helper.TickCount; } } if (GetBool("Waveclear.UseItems")) { if (GetBool("Waveclear.UseTIA")) { Tiamat.minioncount = GetSliderInt("Waveclear.MinCountHDR"); Tiamat.Cast(null, true); } if (GetBool("Waveclear.UseTitanic")) { Titanic.minioncount = GetSliderInt("Waveclear.MinCountHDR"); Titanic.Cast(null, true); } if (GetBool("Waveclear.UseHDR")) { Hydra.minioncount = GetSliderInt("Waveclear.MinCountHDR"); Hydra.Cast(null, true); } if (GetBool("Waveclear.UseYMU")) { Youmu.minioncount = GetSliderInt("Waveclear.MinCountYOU"); Youmu.Cast(null, true); } } }
private void OnUpdate(EventArgs args) { if (Yasuo.IsDead || Yasuo.IsRecalling()) { return; } CastUlt(); //if (YasuoMenu.getCheckBoxItem(YasuoMenu.EvadeA, "Evade.WTS")) //{ //TargettedDanger.OnUpdate(); //} if (YasuoMenu.getCheckBoxItem(YasuoMenu.MiscA, "Misc.AutoStackQ") && !TornadoReady && !CurrentTarget.IsValidEnemy(Spells[Q].Range)) { var closest = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidMinion(Spells[Q].Range) && MinionManager.IsMinion(x)) .MinOrDefault(x => x.Distance(Yasuo)); var pred = Spells[Q].GetPrediction(closest); if (pred.Hitchance >= HitChance.Low) { Spells[Q].Cast(closest.ServerPosition); } } if (YasuoMenu.getCheckBoxItem(YasuoMenu.MiscA, "Misc.Walljump") && Game.MapId == GameMapId.SummonersRift) { WallJump.OnUpdate(); } Fleeing = Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee); if (YasuoMenu.getCheckBoxItem(YasuoMenu.KillstealA, "Killsteal.Enabled") && !Fleeing) { Killsteal(); } if (YasuoMenu.getKeyBindItem(YasuoMenu.HarassA, "Harass.KB") && !Fleeing) { Harass(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) { Orbwalker.DisableAttacking = false; Combo(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass)) { Orbwalker.DisableAttacking = false; Mixed(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit)) { Orbwalker.DisableAttacking = false; LHSkills(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear)) { Orbwalker.DisableAttacking = false; Waveclear(); } if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee)) { Flee(); } }
public static void Main() { Yasuo = new Yasuo(); }
internal void CastEOld(AIHeroClient target, bool force = false) { var minionsinrange = ObjectManager.Get <Obj_AI_Minion>().Any(x => x.IsDashable()); if (target == null || !target.IsInRange(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range)) { target = TargetSelector.GetTarget(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range, DamageType.Physical); } if (target != null) { if (SpellSlot.E.IsReady() && isHealthy && target.LSDistance(Yasuo) >= 0.30 * Yasuo.AttackRange) { if (TornadoReady && ((GetBool("Combo.ETower", YasuoMenu.ComboM) && GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM)) || !GetDashPos(target).PointUnderEnemyTurret())) { Spells[E].CastOnUnit(target); return; } if (DashCount >= 1 && GetDashPos(target).IsCloser(target) && target.IsDashable() && (GetBool("Combo.ETower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !GetDashPos(target).PointUnderEnemyTurret())) { ETarget = target; Spells[E].CastOnUnit(target); return; } if (DashCount == 0) { var dist = Yasuo.LSDistance(target); var bestminion = ObjectManager.Get <Obj_AI_Base>() .Where( x => x.IsDashable() && GetDashPos(x).IsCloser(target) && (GetBool("Combo.ETower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !GetDashPos(x).PointUnderEnemyTurret())) .OrderBy(x => Vector2.Distance(GetDashPos(x), target.ServerPosition.LSTo2D())) .FirstOrDefault(); if (bestminion != null) { ETarget = bestminion; Spells[E].CastOnUnit(bestminion); } else if (target.IsDashable() && GetDashPos(target).IsCloser(target) && (GetBool("Combo.ETower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !GetDashPos(target).PointUnderEnemyTurret())) { ETarget = target; Spells[E].CastOnUnit(target); } } else { var minion = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable() && GetDashPos(x).IsCloser(target) && (GetBool("Combo.ETower", YasuoMenu.ComboM) || GetKeyBind("Misc.TowerDive", YasuoMenu.MiscM) || !GetDashPos(x).PointUnderEnemyTurret())) .OrderBy(x => GetDashPos(x).LSDistance(target.ServerPosition)).FirstOrDefault(); if (minion != null && GetDashPos(minion).IsCloser(target)) { ETarget = minion; Spells[E].CastOnUnit(minion); } } } } }
void OnUpdate(EventArgs args) { if (Yasuo.IsDead || Yasuo.IsRecalling()) { return; } CastUlt(); if (GetBool("Evade.WTS")) { TargettedDanger.OnUpdate(); } if (GetBool("Misc.AutoStackQ") && !TornadoReady && !CurrentTarget.IsValidEnemy(Spells[Q].Range) && !Yasuo.IsDashing() && !InDash) { var closest = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidMinion(Spells[Q].Range) && (MinionManager.IsMinion(x) || x.BaseSkinName.Equals("Sru_Crab"))) .MinOrDefault(x => x.Distance(Yasuo)); if (closest != null) { var pred = Spells[Q].GetPrediction(closest); if (pred.Hitchance >= HitChance.Low) { Spells[Q].Cast(closest.ServerPosition); } } } if (GetBool("Misc.Walljump") && Game.MapId == GameMapId.SummonersRift) { WallJump.OnUpdate(); } if (GetKeyBind("Misc.DashMode")) { MoveToMouse(); return; } Fleeing = Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.CustomMode; if (GetBool("Killsteal.Enabled") && !Fleeing) { Killsteal(); } if (GetKeyBind("Harass.KB") && !Fleeing) { Harass(); } switch (Orbwalker.ActiveMode) { case Orbwalking.OrbwalkingMode.Combo: Orbwalker.SetOrbwalkingPoint(Game.CursorPos); Orbwalker.SetAttack(true); Combo(); break; case Orbwalking.OrbwalkingMode.Mixed: Orbwalker.SetOrbwalkingPoint(Game.CursorPos); Orbwalker.SetAttack(true); Mixed(); break; case Orbwalking.OrbwalkingMode.LastHit: Orbwalker.SetOrbwalkingPoint(Game.CursorPos); Orbwalker.SetAttack(true); LHSkills(); break; case Orbwalking.OrbwalkingMode.LaneClear: Orbwalker.SetOrbwalkingPoint(Game.CursorPos); Orbwalker.SetAttack(true); Waveclear(); break; case Orbwalking.OrbwalkingMode.CustomMode: Flee(); break; case Orbwalking.OrbwalkingMode.None: Orbwalker.SetOrbwalkingPoint(Game.CursorPos); break; } }
//minimum amount of minions internal void CastENew(AIHeroClient target) { if (!SpellSlot.E.IsReady() || Yasuo.LSIsDashing() || InDash) { return; } var minionsinrange = ObjectManager.Get <Obj_AI_Minion>().Any(x => x.IsDashable()); if (target == null || !target.IsInRange(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range)) { target = TargetSelector.GetTarget(minionsinrange ? Spells[E].Range * 2 : Spells[E].Range, DamageType.Physical); } if (target != null && TowerCheck(target, true)) { if (!target.IsDashable()) { var bestminion = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable() && GetDashPos(x).IsCloser(target) && TowerCheck(x, true)) .MinOrDefault(x => GetDashPos(x).LSDistance(target)); if (bestminion != null) { Spells[E].CastOnUnit(bestminion); return; } } else { var dist = Yasuo.LSDistance(target); var pctOutOfRange = dist / Spells[E].Range * 100; //Stay in range if (pctOutOfRange > 0.8f) { if (TornadoReady && target.IsDashable() && targInKnockupRadius(target)) { Spells[E].CastOnUnit(target); } else { var bestminion = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable() && GetDashPos(x).IsCloser(target) && TowerCheck(x, true)) .MinOrDefault(x => GetDashPos(x).LSDistance(target)); if (bestminion != null) { Spells[E].CastOnUnit(bestminion); } else if (target.IsDashable() && GetDashPos(target).IsCloser(target)) { Spells[E].CastOnUnit(target); } } } //Catch up using a minion else if (pctOutOfRange > 1) { var minion = ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsDashable() && x.IsCloser(target) && TowerCheck(x, true)) .MinOrDefault(x => GetDashPos(x).LSDistance(target)); if (minion != null) { Spells[E].CastOnUnit(target); } } //Go for a EQ if target is well within range else { if (Spells[Q].IsReady() && TornadoReady) { if (targInKnockupRadius(target)) { Spells[E].CastOnUnit(target); return; } } if (DashCount == 0) { var bestminion = ObjectManager.Get <Obj_AI_Base>() .Where( x => x.IsDashable() && GetDashPos(x).IsCloser(target) && TowerCheck(x, true)) .MinOrDefault(x => GetDashPos(x).LSDistance(target)); if (bestminion != null) { Spells[E].CastOnUnit(bestminion); } else if (target.IsDashable() && GetDashPos(target).IsCloser(target) && TowerCheck(target, true)) { Spells[E].CastOnUnit(target); } } } } } }
private void Flee() { //Orbwalker.SetAttack(false); Orbwalker.DisableAttacking = true; if (YasuoMenu.getCheckBoxItem(YasuoMenu.Flee, "Flee.UseQ2") && !Yasuo.IsDashing() && SpellSlot.Q.IsReady() && TornadoReady) { var qtarg = TargetSelector.GetTarget(Spells[Q2].Range, DamageType.Physical); if (qtarg != null) { Spells[Q2].Cast(qtarg.ServerPosition); } } if (FleeMode == FleeType.ToCursor) { Orbwalker.OrbwalkTo(Game.CursorPos); if (Spells[E].IsReady()) { var dashtarg = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(Game.CursorPos)); if (dashtarg != null && GetDashPos(dashtarg).Distance(Game.CursorPos) < Yasuo.Distance(Game.CursorPos)) { Spells[E].CastOnUnit(dashtarg); if (YasuoMenu.getCheckBoxItem(YasuoMenu.Flee, "Flee.StackQ") && SpellSlot.Q.IsReady() && !TornadoReady) { Spells[Q].Cast(dashtarg.ServerPosition); } } } } if (FleeMode == FleeType.ToNexus) { var nexus = ObjectManager.Get <Obj_Shop>().FirstOrDefault(x => x.IsAlly); if (nexus != null) { Orbwalker.OrbwalkTo(nexus.Position); var bestminion = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(nexus.Position)); if (bestminion != null && GetDashPos(bestminion).Distance(nexus.Position) < Yasuo.Distance(nexus.Position)) { Spells[E].CastOnUnit(bestminion); if (YasuoMenu.getCheckBoxItem(YasuoMenu.Flee, "Flee.StackQ") && SpellSlot.Q.IsReady() && !TornadoReady) { Spells[Q].Cast(bestminion.ServerPosition); } } } } if (FleeMode == FleeType.ToAllies) { Obj_AI_Base bestally = HeroManager.Allies.Where(x => !x.IsMe && x.CountEnemiesInRange(300) == 0) .MinOrDefault(x => x.Distance(Yasuo)) ?? (Obj_AI_Base)ObjectManager.Get <Obj_AI_Minion>() .Where(x => x.IsValidAlly(3000)) .MinOrDefault(x => x.Distance(Yasuo)); if (bestally != null) { Orbwalker.OrbwalkTo(bestally.ServerPosition); if (Spells[E].IsReady()) { var besttarget = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(bestally.ServerPosition)); if (besttarget != null) { Spells[E].CastOnUnit(besttarget); if (YasuoMenu.getCheckBoxItem(YasuoMenu.Flee, "Flee.StackQ") && SpellSlot.Q.IsReady() && !TornadoReady) { Spells[Q].Cast(besttarget.ServerPosition); } } } } else { var nexus = ObjectManager.Get <Obj_Shop>().FirstOrDefault(x => x.IsAlly); if (nexus != null) { Orbwalker.OrbwalkTo(nexus.Position); var bestminion = ObjectManager.Get <Obj_AI_Base>() .Where(x => x.IsDashable()) .MinOrDefault(x => GetDashPos(x).Distance(nexus.Position)); if (bestminion != null && GetDashPos(bestminion).Distance(nexus.Position) < Yasuo.Distance(nexus.Position)) { Spells[E].CastOnUnit(bestminion); } } } } }
private void CastR(float minhit = 1) { var ultmode = GetUltMode(); IOrderedEnumerable <AIHeroClient> ordered = null; if (ultmode == UltMode.Health) { ordered = KnockedUp.OrderBy(x => x.Health) .ThenByDescending(TargetSelector.GetPriority) .ThenByDescending(x => x.CountEnemiesInRange(350)); } if (ultmode == UltMode.Priority) { ordered = KnockedUp.OrderByDescending(TargetSelector.GetPriority) .ThenBy(x => x.Health) .ThenByDescending(x => x.CountEnemiesInRange(350)); } if (ultmode == UltMode.EnemiesHit) { ordered = KnockedUp.OrderByDescending(x => x.CountEnemiesInRange(350)) .ThenByDescending(TargetSelector.GetPriority) .ThenBy(x => x.Health); } if ((YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.OnlyifMin") && ordered.Count() < minhit) || (ordered.Count() == 1 && ordered.FirstOrDefault().HealthPercent < YasuoMenu.getSliderItem(YasuoMenu.ComboA, "Combo.MinHealthUlt"))) { return; } if (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.RPriority")) { var best = ordered.Find( x => !x.isBlackListed() && TargetSelector.GetPriority(x) == 5 && (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.UltTower") || YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") || !x.Position.To2D().PointUnderEnemyTurret())); if (best != null && Yasuo.HealthPercent / best.HealthPercent <= 1) { Spells[R].CastOnUnit(best); return; } } if (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.UltOnlyKillable")) { var killable = ordered.FirstOrDefault( x => !x.isBlackListed() && x.Health <= Yasuo.GetSpellDamage(x, SpellSlot.R) && x.HealthPercent >= YasuoMenu.getSliderItem(YasuoMenu.ComboA, "Combo.MinHealthUlt") && (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.UltTower") || YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") || !x.Position.To2D().PointUnderEnemyTurret())); if (killable != null && !killable.IsInRange(Spells[Q].Range)) { Spells[R].CastOnUnit(killable); return; } } if (ordered.Count() >= minhit) { var best2 = ordered.FirstOrDefault( x => !x.isBlackListed() && (YasuoMenu.getCheckBoxItem(YasuoMenu.ComboA, "Combo.UltTower") || YasuoMenu.getKeyBindItem(YasuoMenu.MiscA, "Misc.TowerDive") || !x.Position.To2D().PointUnderEnemyTurret())); if (best2 != null) { Spells[R].CastOnUnit(best2); } } }