February 28, 20197 yr Hello, So i made a plugin that trains herb and skinning it works, but when my bot is for example in elwyn forest he wants to go to stormwind in straight line through the mountains.. he wants to use this code: wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(new Vector3(-8969.99f, 779.636f, 95.89193f), 5566, 1, false); So I tried code below, but its not working he keeps trying to go in straight line to sw.. help me out how do I use the pathfinder? var position = new Vector3(-8969.99f, 779.636f, 95.89193f); int npcEntryId = 6929; Logging.Write("bindloc: " + bindLocation); //while (bindLocation != "Stormwind") //Logging.Write(ObjectManager.Me.Position.ToString()); var lo = PathFinder.FindPath(ObjectManager.Me.Position, position); Logging.Write(lo.ToString()); foreach (Vector3 waypoint in lo) { Logging.Write(waypoint.ToString()); // Move to the given position MovementManager.Go(PathFinder.FindPath(waypoint), false); // Loop while (MovementManager.InMovement && Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { ObjectManager.Me.Position.DistanceTo2D(waypoint) > 1.5 // Wait follow path Thread.Sleep(10); } }
February 28, 20197 yr Author wierd it started working lol, but the movement is very bottish, he moves from 1 waypoint to the next one and stops there for a second
March 11, 20197 yr Hello, it is more like that: var position = new Vector3(-8969.99f, 779.636f, 95.89193f); int npcEntryId = 6929; Logging.Write("bindloc: " + bindLocation); //while (bindLocation != "Stormwind") //Logging.Write(ObjectManager.Me.Position.ToString()); var lo = PathFinder.FindPath(ObjectManager.Me.Position, position); Logging.Write(lo.ToString()); MovementManager.Go(lo); // Loop while (MovementManager.InMovement && Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { Thread.Sleep(10); } MovementManager.StopMove();
Create an account or sign in to comment