79135 4 Posted July 31, 2018 Share Posted July 31, 2018 how to write in C++ format the usual follow path like quester profile. I need it for create quester profile(RunCode). So the bot ran to the nearest point and not the starting point of the code. if I write this: wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p1); wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p2); wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p...); wManager.Wow.Bot.Tasks.GoToTask.ToPosition(pN); the bot will always start from the first point of the route. Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/ Share on other sites More sharing options...
Droidz 2738 Posted August 1, 2018 Share Posted August 1, 2018 Hello, https://wrobot.eu/forums/topic/9047-wrobot-doesnt-use-the-recorded-path/?do=findComment&comment=42126 Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/#findComment-46260 Share on other sites More sharing options...
79135 4 Posted August 1, 2018 Author Share Posted August 1, 2018 1 hour ago, Droidz said: Hello, When I use the code, bot running into first position, how to do what bot run to the nearby point? Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/#findComment-46261 Share on other sites More sharing options...
Droidz 2738 Posted August 1, 2018 Share Posted August 1, 2018 why not use quest type followpath? Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/#findComment-46262 Share on other sites More sharing options...
79135 4 Posted August 1, 2018 Author Share Posted August 1, 2018 In the one step I create many actions with many conditions. Goto follow path + use stealth + use item + again follow path... + ... . Me so feel more comfortable than a large number of steps in quest profile Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/#findComment-46263 Share on other sites More sharing options...
Matenia 628 Posted August 1, 2018 Share Posted August 1, 2018 //bad pseudo code: bool reachedP1 = false; if(!reachedP1) { wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p1); } //p1 is reached here if(ObjectManager.Me.Position.DistanceTo(p1) < 5) { reachedP1 = true; } wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p2); wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p...); wManager.Wow.Bot.Tasks.GoToTask.ToPosition(pN); But keep in mind, you have to do this in full C# quest. NOT just overrideCSharpPulse! Or else it will go to P1 over and over, because everytime it sets reachedP1 to false in the start. If you want to use this in OverrideCSharpPulse, you have to use Var API, like here: Instead of just using boolean you will do if(Var.GetVar<bool>("reachedP1") == null) { Var.SetVar("reachedP1", false); } if(!Var.GetVar<bool>("reachedP1")) { GoToTask.ToPos(p1); //if close code Var.SetVar("reachedP1", true); } It's all a bit pseudo code but you get the idea Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/#findComment-46264 Share on other sites More sharing options...
79135 4 Posted August 6, 2018 Author Share Posted August 6, 2018 On 8/1/2018 at 1:09 PM, Droidz said: why not use quest type followpath? var path = new List<Vector3>() { new Vector3(891.3235, -259.2199, -45, "None"), new Vector3(881.2866, -271.8759, -45, "None"), new Vector3(880.6079, -280.9656, -45, "None"), new Vector3(888.381, -293.3022, -45, "None"), new Vector3(890.4747, -304.1179, -45, "None"), }; var min = path[0]; for(int i = 0; i < path.Count; i++) { if(ObjectManager.Me.Position.DistanceTo(min) < ObjectManager.Me.Position.DistanceTo(path)) min = path; else if(i > 0) path.Remove(path); } foreach(var p in path) wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p); Bot run to 2nd point in the path.Why it don't work? Write please working code for Bot go to min distance in the path. Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/#findComment-46434 Share on other sites More sharing options...
Matenia 628 Posted August 6, 2018 Share Posted August 6, 2018 overrideCSharpPulse The method inside this gets called OVER AND OVER by wRobot (basically anytime the quester pulse state is called). If you initialize the path list inside that mehod, its state gets reset every time wRobot restarts the state... See my explanation above Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/#findComment-46435 Share on other sites More sharing options...
79135 4 Posted August 6, 2018 Author Share Posted August 6, 2018 2 hours ago, Matenia said: overrideCSharpPulse The method inside this gets called OVER AND OVER by wRobot (basically anytime the quester pulse state is called). If you initialize the path list inside that mehod, its state gets reset every time wRobot restarts the state... See my explanation above //bad pseudo code: bool reachedP1 = false; if(!reachedP1) { wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p1); } //p1 is reached here if(ObjectManager.Me.Position.DistanceTo(p1) < 5) { reachedP1 = true; } wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p2); wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p...); wManager.Wow.Bot.Tasks.GoToTask.ToPosition(pN); If I put the pause and after start bot again running to p1 if he stay < 5 yards from p1. Do you can write code like Droidz wrote for WRobot in Quester Follow path? Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/#findComment-46438 Share on other sites More sharing options...
Findeh 34 Posted May 8, 2019 Share Posted May 8, 2019 Sorry for reviving this thread. But i've got the same problem and i'm not sure how to solve it. I need to create a follow path analog with C#. The question is, is it possible to create an instance of QuestFollowPathClass with preset Path, IsCompleteWhenAtLastPath, and other parameters, hold it file and then just call it from the code with something like MyFollowPathQuest.Pulse() ? Let's say even call it from the same file. It's not a library question. Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/#findComment-53421 Share on other sites More sharing options...
Droidz 2738 Posted May 9, 2019 Share Posted May 9, 2019 15 hours ago, Findeh said: Sorry for reviving this thread. But i've got the same problem and i'm not sure how to solve it. I need to create a follow path analog with C#. The question is, is it possible to create an instance of QuestFollowPathClass with preset Path, IsCompleteWhenAtLastPath, and other parameters, hold it file and then just call it from the code with something like MyFollowPathQuest.Pulse() ? Let's say even call it from the same file. It's not a library question. Hello, yes use code like: wManager.Wow.Helpers.Quest.QuesterCurrentContext.QuestsClasses["MyQuestClassName"].Pulse() (replace MyQuestClassName by you quest name (name used in steps)) Findeh 1 Link to comment https://wrobot.eu/forums/topic/9877-create-follow-path-in-quester-profile-with-cshape/#findComment-53436 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