public static void UnderTurret() { var turret = MetaHandler.EnemyTurrets.FirstOrDefault(t => t.Distance(Autoplay.Bot.Position) < 1200); if (Autoplay._overrideAttackUnitAction && !Autoplay._tookRecallDecision) { Autoplay.Bot.IssueOrder(GameObjectOrder.MoveTo, Autoplay._safepos.To3D()); } if (!Autoplay.Bot.UnderTurret(true)) { Autoplay._overrideAttackUnitAction = false; } if (Autoplay.Bot.UnderTurret(true) && MetaHandler.NearbyAllyMinions(turret, 750) > 2 && Autoplay.IsBotSafe() && !Autoplay._tookRecallDecision) { if (turret.Distance(Autoplay.Bot.Position) < Autoplay.Bot.AttackRange && !Autoplay._overrideAttackUnitAction) { Autoplay.Bot.IssueOrder(GameObjectOrder.AttackUnit, turret); } } else { if (TargetSelector.GetTarget(Autoplay.Bot.AttackRange, TargetSelector.DamageType.Physical) != null) { var target = TargetSelector.GetTarget(Autoplay.Bot.AttackRange, TargetSelector.DamageType.Physical); if (target != null && target.IsValid && !target.IsDead && Autoplay.IsBotSafe() && !target.UnderTurret(true) && !Autoplay._overrideAttackUnitAction && !Autoplay._tookRecallDecision) { Autoplay.Bot.IssueOrder(GameObjectOrder.AttackUnit, target); } } } if (Autoplay.Bot.UnderTurret(true) && MetaHandler.NearbyAllyMinions(turret, 750) < 2) { Autoplay._safepos.X = (Autoplay.Bot.Position.X + Autoplay._safe); Autoplay._safepos.Y = (Autoplay.Bot.Position.Y + Autoplay._safe); PluginBase.Orbwalker.SetOrbwalkingPoint(Autoplay._safepos.To3D()); } }
public static void NoCarryFound() { if (Autoplay.TempCarry == null || Autoplay.TempCarry.IsDead || Autoplay.TempCarry.InFountain()) { Autoplay.TempCarry = MetaHandler.AllyHeroes.FirstOrDefault( hero => !hero.IsMe && !hero.InFountain() && !hero.IsDead && !MetaHandler.HasSmite(hero)); if (MetaHandler.AllyHeroes.FirstOrDefault( hero => !hero.IsMe && !hero.InFountain() && !hero.IsDead && !MetaHandler.HasSmite(hero)) == null && MetaHandler.AllyHeroes.FirstOrDefault( hero => !hero.IsMe && !hero.InFountain() && !hero.IsDead) != null) { //well f**k, let's follow the jungler -sighs- Autoplay.TempCarry = MetaHandler.AllyHeroes.FirstOrDefault( hero => !hero.IsMe && !hero.InFountain() && !hero.IsDead); } } if (Autoplay.TempCarry != null) { Console.WriteLine("Carry not found, following: " + Autoplay.TempCarry.ChampionName); Autoplay._frontline.X = Autoplay.TempCarry.Position.X + Autoplay._chosen; Autoplay._frontline.Y = Autoplay.TempCarry.Position.Y + Autoplay._chosen; if ( !(Autoplay.TempCarry.UnderTurret(true) && MetaHandler.NearbyAllyMinions(Autoplay.TempCarry, 400) < 2) && Autoplay.IsBotSafe()) { if (Autoplay.Bot.Distance(Autoplay._frontline) > 550) { Autoplay.TempCarry.WalkAround(); } } } }
public static void CarryIsDead() { if (Autoplay.TempCarry == null || Autoplay.TempCarry.IsDead || Autoplay.TempCarry.InFountain()) { if ( MetaHandler.AllyHeroes.FirstOrDefault( hero => !hero.IsMe && !hero.InFountain() && !hero.IsDead && !MetaHandler.HasSmite(hero)) != null) { Autoplay.TempCarry = MetaHandler.AllyHeroes.FirstOrDefault( hero => !hero.IsMe && !hero.InFountain() && !hero.IsDead && !MetaHandler.HasSmite(hero)); } if ( MetaHandler.AllyHeroes.FirstOrDefault( hero => !hero.IsMe && !hero.InFountain() && !hero.IsDead && !MetaHandler.HasSmite(hero)) == null && MetaHandler.AllyHeroes.FirstOrDefault( hero => !hero.IsMe && !hero.InFountain() && !hero.IsDead) != null) { //well f**k, let's follow the jungler -sighs- Autoplay.TempCarry = MetaHandler.AllyHeroes.FirstOrDefault( hero => !hero.IsMe && !hero.InFountain() && !hero.IsDead); } if (!MetaHandler.AllyHeroes.Any(hero => !hero.IsMe && !hero.IsDead)) //everyone is dead { if (!Autoplay.Bot.InFountain()) { Autoplay.NearestAllyTurret = MetaHandler.AllyTurrets.FirstOrDefault(); if (Autoplay.NearestAllyTurret != null) { Autoplay._saferecall.X = Autoplay.NearestAllyTurret.Position.X + Autoplay._safe; Autoplay._saferecall.Y = Autoplay.NearestAllyTurret.Position.Y; Autoplay._tookRecallDecision = true; if (Autoplay.Bot.Position.Distance(Autoplay._saferecall.To3D()) < 200) { Autoplay.Bot.Spellbook.CastSpell(SpellSlot.Recall); } else { Autoplay.Bot.IssueOrder(GameObjectOrder.MoveTo, Autoplay._saferecall.To3D()); } } } } } if (Autoplay.TempCarry != null) { Console.WriteLine("Autoplay.Carry dead or afk, following: " + Autoplay.TempCarry.ChampionName); Autoplay._frontline.X = Autoplay.TempCarry.Position.X + Autoplay._chosen; Autoplay._frontline.Y = Autoplay.TempCarry.Position.Y + Autoplay._chosen; if ( !(Autoplay.TempCarry.UnderTurret(true) && MetaHandler.NearbyAllyMinions(Autoplay.TempCarry, 400) < 2) && Autoplay.IsBotSafe()) { if (Autoplay.TempCarry.Distance(Autoplay.Bot) > 550) { Autoplay.TempCarry.WalkAround(); } } } }