Пример #1
0
        public static float GetAvgDistanceFromAllyTeam(Vector3 from, float MaxRange = 1200f)
        {
            var numberOfAllies = from.CountAlliesInRange(MaxRange);
            if (numberOfAllies != 0)
            {
                var allies = HeroManager.Allies.Where(ally => ally.IsValidTarget(MaxRange, false, from) && !ally.IsMe).ToList();
                var totalDistance = allies.Sum(ally => ally.Distance(ObjectManager.Player.ServerPosition));

                return totalDistance / numberOfAllies;
            }
            return -1;
        }
Пример #2
0
        public static bool OkToQ(Vector3 position)
        {
            if (position.UnderTurret(true) && !ObjectManager.Player.UnderTurret(true))
                return false;
            var allies = position.CountAlliesInRange(ObjectManager.Player.AttackRange);
            var enemies = position.CountEnemiesInRange(ObjectManager.Player.AttackRange);
            var lhEnemies = GetLhEnemiesNearPosition(position, ObjectManager.Player.AttackRange).Count();

            if (enemies == 1) //It's a 1v1, safe to assume I can E
            {
                return true;
            }

            //Adding 1 for the Player
            return (allies + 1 > enemies - lhEnemies);
        }
Пример #3
0
 private void kill(Positions positions, Vector3 pos)
 {
     if (R.IsReady() && pos.Distance(positions.Player.Position) < 1200 && pos.CountAlliesInRange(1800) < 1)
     {
         if (checkdmg(positions.Player) && UltTime(pos) < positions.RecallData.GetRecallTime() &&
             !isColliding(pos) && !CheckShieldTower(pos))
         {
             R.Cast(pos);
         }
     }
 }
Пример #4
0
 private static bool CheckObjective(Vector3 pos)
 {
     if ((pos.CountEnemiesInRange(800) > 0 || pos.CountAlliesInRange(800) > 0) && !CheckForRetreat(null, pos))
     {
         var obj = Helpers.GetNearest(pos);
         if (obj != null && obj.Health < obj.MaxHealth - 300)
         {
             if (player.Distance(pos) > Jungle.smiteRange)
             {
                 _GameInfo.MoveTo = pos;
                 return true;
             }
         }
     }
     if ((Jungle.SmiteReady() || (player.Level >= 14 && player.HealthPercent > 80)) && player.Level >= 9 &&
         player.Distance(Camps.Dragon.Position) < GameInfo.ChampionRange)
     {
         var drake = Helpers.GetNearest(player.Position, GameInfo.ChampionRange);
         if (drake != null && drake.Name.Contains("Dragon"))
         {
             _GameInfo.CurrentMonster = 13;
             _GameInfo.MoveTo = drake.Position;
             return true;
         }
     }
     return false;
 }
Пример #5
0
        public static bool IsSafePosition(Vector3 position) // cradits to Asuna & ijabba
        {
            if (position.UnderTurret(true) && !Player.UnderTurret(true))
            {
                return false;
            }
            var allies = position.CountAlliesInRange(Orbwalking.GetRealAutoAttackRange(Player));
            var enemies = position.CountEnemiesInRange(Orbwalking.GetRealAutoAttackRange(Player));
            var lhEnemies = GetLhEnemiesNearPosition(position, Orbwalking.GetRealAutoAttackRange(Player)).Count();

            if (enemies == 1) 
            {
                return true;
            }

           
            return (allies + 1 > enemies - lhEnemies);
        }
Пример #6
0
 private void kill(Positions positions, Vector3 pos)
 {
     if (R.IsReady() && pos.Distance(positions.Player.Position) < 1200 &&
         pos.CountAlliesInRange(configMenu.Item("Alliesrange").GetValue<Slider>().Value) < 1)
     {
         if (checkdmg(positions.Player, pos) && UltTime(pos) < positions.RecallData.GetRecallTime() &&
             !isColliding(pos))
         {
             if (player.ChampionName == "Xerath")
             {
                 xerathUlt(positions, pos);
             }
             R.Cast(pos);
             if (player.ChampionName == "Draven" && configMenu.Item("CallBack").GetValue<bool>())
             {
                 Utility.DelayAction.Add((int) (UltTime(pos)-300), () => R.Cast());
             }
         }
     }
 }
Пример #7
0
        /// <summary>
        /// Checks if a position is safe
        /// </summary>
        /// <param name="position">
        /// The Position
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        private bool IsSafe(Vector3 position)
        {
            if (position.UnderTurret(true) && !ObjectManager.Player.UnderTurret(true))
            {
                return false;
            }

            var allies = position.CountAlliesInRange(ObjectManager.Player.AttackRange);
            var enemies = position.CountEnemiesInRange(ObjectManager.Player.AttackRange);
            var lhEnemies = GetLhEnemiesNearPosition(position, ObjectManager.Player.AttackRange).Count();

            if (enemies == 1)
            {
                // It's a 1v1, safe to assume I can E
                return true;
            }

            // Adding 1 for the Player
            return allies + 1 > enemies - lhEnemies;
        }
Пример #8
0
 private void kill(Positions positions, Vector3 pos)
 {
     if (R.IsReady() && pos.Distance(positions.Player.Position) < 1200 &&
         pos.CountAlliesInRange(configMenu.Item("Alliesrange").GetValue<Slider>().Value) < 1)
     {
         if (checkdmg(positions.Player, pos) && UltTime(pos) < positions.RecallData.GetRecallTime() &&
             !isColliding(pos))
         {
             if (player.ChampionName == "Xerath")
             {
                 xerathUlt(positions, pos);
             }
             R.Cast(pos);
         }
     }
 }