Jump to content

Recommended Posts

So far any effort I have made to utilize the Demon Hunters' maneuverability has looked incredibly bot-like.

The following code is my attempt to find a suitably-far point to move to (to prevent the bot from using the Glide ability, only to immediately turn back because it didn't remove a waypoint passed while flying.

The problem is that, without a way to determine whether or not the bot is on the ground or up in the air, there really isn't a good way to handle cases where the bot might overshoot a waypoint (or perform a simple turn while gliding).

Seems like if I could figure out how to tell when the DH is in the air, it would be possible to have it skip/remove any waypoints if the bot passes withing N yards of its X, Y coordinates.

How can I do this?

Current Code

public void DemonHunterGlide()
	{
		wManager.Events.MovementEvents.OnMovementPulse += (path, cancelable) =>
		{
			var furthestPointInLoS= path.Where(p=> !TraceLine.TraceLineGo(ObjectManager.Me.Position, p, wManager.Wow.Enums.CGWorldFrameHitFlags.HitTestAll)).OrderBy(p=> ObjectManager.Me.Position.DistanceTo(p)).LastOrDefault();
			var distance = ObjectManager.Me.Position.DistanceTo(furthestPointInLoS);
          	Logging.Write("Distance = " + distance + ", Point = " + furthestPointInLoS.ToString());
			Logging.Write(@"Beginning Demon Hunter ""Glide"" ability with a jump");
			wManager.Wow.Helpers.Move.JumpOrAscend();
			Thread.Sleep(500);
			Logging.Write(@"Jump");
			wManager.Wow.Helpers.Move.JumpOrAscend();
			Thread.Sleep(500);
			Logging.Write(@"Jump");
			wManager.Wow.Helpers.Move.JumpOrAscend();
			FelRush.Launch();
			Logging.Write(@"Done");
		};

	}



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...