johnblaster123 7 Posted February 28, 2019 Share Posted February 28, 2019 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); } } Link to comment https://wrobot.eu/forums/topic/10887-how-do-i-use-pathfinderfindpath/ Share on other sites More sharing options...
johnblaster123 7 Posted February 28, 2019 Author Share Posted February 28, 2019 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 Link to comment https://wrobot.eu/forums/topic/10887-how-do-i-use-pathfinderfindpath/#findComment-51900 Share on other sites More sharing options...
Droidz 2738 Posted March 11, 2019 Share Posted March 11, 2019 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(); Link to comment https://wrobot.eu/forums/topic/10887-how-do-i-use-pathfinderfindpath/#findComment-52118 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now