static TreeSharp.Action TakeAction() { return(new TreeSharp.Action(a => { Logging.Log("SWITCHED MODE TO RECALL"); if (ObjectManager.Get <AIHeroClient>().Count(h => h.IsEnemy && !h.IsDead && h.IsVisible && h.Distance(ObjectManager.Player) < 1250) == 0 && ObjectManager.Get <Obj_AI_Minion>() .Count(m => m.IsEnemy && !m.IsDead && m.IsVisible && m.Distance(ObjectManager.Player) < 500) < 1) { Variables.Orbwalker.ActiveMode = OrbwalkingMode.None; if (!ObjectManager.Player.IsRecalling()) { ObjectManager.Player.Spellbook.CastSpell(SpellSlot.Recall); } } else { Variables.Orbwalker.ActiveMode = OrbwalkingMode.None; if (!ObjectManager.Player.IsRecalling() || ObjectManager.Get <AIHeroClient>() .Any(h => h.IsEnemy && !h.IsDead && h.IsVisible && h.Distance(ObjectManager.Player) < 1250)) { ObjectManager.Player.Position.Extend(GameObjects.AllyNexus.Position, Random.GetRandomInteger(400, 600)).WalkToPoint(OrbwalkingMode.None, true); Logging.Log("LOOKING FOR SAFE RECALL SPOT"); } } })); }
static TreeSharp.Action TakeAction() { return(new TreeSharp.Action(a => { Logging.Log("SWITCHED MODE TO RECALL"); _recallSpot = StaticData.GetLanePolygon(ObjectManager.Player.Team, SessionBasedData.CurrentLane) .Points.FirstOrDefault( p => !ObjectManager.Get <Obj_AI_Hero>() .Any(h => h.IsEnemy && !h.IsDead && h.Distance(p) < 2200)) .ToVector3(); SessionBasedData.CurrentLanePolygon.Points.FirstOrDefault( p => ObjectManager.Get <Obj_AI_Turret>() .Any( t => t.IsAlly && t.Distance(p) < 900 && !ObjectManager.Get <Obj_AI_Hero>() .Any(h => h.IsEnemy && !h.IsDead && h.Distance(t) < 1600))).ToVector3(); if (ObjectManager.Player.Distance(_recallSpot) < 350) { Variables.Orbwalker.ActiveMode = OrbwalkingMode.None; if (!ObjectManager.Player.IsRecalling()) { ObjectManager.Player.Spellbook.CastSpell(SpellSlot.Recall); } } else { if (_recallSpot != Vector3.Zero) { _recallSpot.WalkToPoint(OrbwalkingMode.Combo); } else { Variables.Orbwalker.ActiveMode = OrbwalkingMode.None; if (!ObjectManager.Player.IsRecalling() || ObjectManager.Get <Obj_AI_Hero>() .Any(h => h.IsEnemy && !h.IsDead && h.IsVisible && h.Distance(ObjectManager.Player) < 1250)) { ObjectManager.Player.Position.Extend(GameObjects.AllyNexus.Position, Random.GetRandomInteger(400, 600)).WalkToPoint(OrbwalkingMode.None, true); Logging.Log("LOOKING FOR SAFE RECALL SPOT"); } } } })); }