Ejemplo n.º 1
0
 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");
             }
         }
     }));
 }
Ejemplo n.º 2
0
 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");
                 }
             }
         }
     }));
 }
Ejemplo n.º 3
0
 public static void WalkToPoint(this Vector3 point, OrbwalkingMode mode, bool forceIssueOrder = false)
 {
     if (Environment.TickCount - _humanizer > Random.GetRandomInteger(350, 800))
     {
         _humanizer = Environment.TickCount;
         // another lane
         if (point.Distance(ObjectManager.Player.Position) > 800 || forceIssueOrder)
         {
             EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, point, false);
             Variables.Orbwalker.ActiveMode = OrbwalkingMode.None;
             // skip from triggering the orbwalker too
             return;
         }
         Variables.Orbwalker.ForceOrbwalkPoint = point;
         Variables.Orbwalker.ActiveMode        = mode;
     }
 }