Exemplo n.º 1
0
        public static Vector3 GetAggressiveTumblePos(this Obj_AI_Base target)
        {
            var cursorPos = Game.CursorPos;

            if (!cursorPos.IsDangerousPosition())
            {
                return(cursorPos);
            }
            //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ )
            if (!target.IsMelee && Variables._Player.CountEnemiesInRange(800) == 1)
            {
                return(cursorPos);
            }

            var aRC            = new VHRGeometry.Circle(Variables._Player.ServerPosition.To2D(), 300).ToPolygon().ToClipperPath();
            var targetPosition = target.ServerPosition;


            foreach (var p in aRC)
            {
                var v3   = new Vector2(p.X, p.Y).To3D();
                var dist = v3.Distance(targetPosition);
                if (dist > 325 && dist < 450)
                {
                    return(v3);
                }
            }
            return(Vector3.Zero);
        }
Exemplo n.º 2
0
        public static Vector3 GetAggressiveTumblePos(this Obj_AI_Base target)
        {
            var cursorPos = Game.CursorPos;

            if (!cursorPos.IsDangerousPosition()) return cursorPos;
            //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ )
            if (!target.IsMelee && Variables._Player.CountEnemiesInRange(800) == 1) return cursorPos;

            var aRC = new VHRGeometry.Circle(Variables._Player.ServerPosition.To2D(), 300).ToPolygon().ToClipperPath();
            var targetPosition = target.ServerPosition;

            foreach (var p in aRC)
            {
                var v3 = new Vector2(p.X, p.Y).To3D();
                var dist = v3.Distance(targetPosition);
                if (dist > 325 && dist < 450)
                {
                    return v3;
                }
            }
            return Vector3.Zero;
        }
Exemplo n.º 3
0
        public static Vector3 GetTumblePos(this Obj_AI_Base target)
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                return(GetAggressiveTumblePos(target));
            }

            var cursorPos = Game.CursorPos;

            if (!cursorPos.IsDangerousPosition())
            {
                return(cursorPos);
            }
            //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ )
            if (!target.IsMelee && Variables._Player.CountEnemiesInRange(800) == 1)
            {
                return(cursorPos);
            }

            var aRC            = new VHRGeometry.Circle(Variables._Player.ServerPosition.To2D(), 300).ToPolygon().ToClipperPath();
            var targetPosition = target.ServerPosition;
            var pList          = (from p in aRC
                                  select new Vector2(p.X, p.Y).To3D()
                                  into v3
                                  let dist = v3.Distance(targetPosition)
                                             where !v3.IsDangerousPosition() && dist < 500
                                             select v3).ToList();

            if (other.UnderEnemyTower((Vector2)Variables._Player.ServerPosition) || Variables._Player.CountEnemiesInRange(800) == 1 ||
                cursorPos.CountEnemiesInRange(450) <= 1)
            {
                return(pList.Count > 1 ? pList.OrderBy(el => el.Distance(cursorPos)).FirstOrDefault() : Vector3.Zero);
            }
            return(pList.Count > 1
                ? pList.OrderByDescending(el => el.Distance(cursorPos)).FirstOrDefault()
                : Vector3.Zero);
        }
Exemplo n.º 4
0
        public static Vector3 GetTumblePos(this Obj_AI_Base target)
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                return GetAggressiveTumblePos(target);

            var cursorPos = Game.CursorPos;

            if (!cursorPos.IsDangerousPosition()) return cursorPos;
            //if the target is not a melee and he's alone he's not really a danger to us, proceed to 1v1 him :^ )
            if (!target.IsMelee && Variables._Player.CountEnemiesInRange(800) == 1) return cursorPos;

            var aRC = new VHRGeometry.Circle(Variables._Player.ServerPosition.To2D(), 300).ToPolygon().ToClipperPath();
            var targetPosition = target.ServerPosition;
            var pList =(from p in aRC
                   select new Vector2(p.X, p.Y).To3D()
                    into v3
                   let dist = v3.Distance(targetPosition)
                   where !v3.IsDangerousPosition() && dist < 500
                   select v3).ToList();

            if (other.UnderEnemyTower((Vector2) Variables._Player.ServerPosition) || Variables._Player.CountEnemiesInRange(800) == 1 ||
                cursorPos.CountEnemiesInRange(450) <= 1)
            {
                return pList.Count > 1 ? pList.OrderBy(el => el.Distance(cursorPos)).FirstOrDefault() : Vector3.Zero;
            }
            return pList.Count > 1
                ? pList.OrderByDescending(el => el.Distance(cursorPos)).FirstOrDefault()
                : Vector3.Zero;
        }