November 12, 20178 yr Hi folks, I am working hard to improve the movement of my C# fight class based hunter. Currently I am tuning some infight moves. At the moment I have some routine which makes the toon to get away from near enemies. It works pretty well in simple situations. It walks away by simulating press/release of movement keys. This movement approach is not easy to manage when it comes to stuck detections and resolution, for example when the bot is going backward and moves against a wall. I think it would be much easier to solve this issue when the movement was managed with paths. The problem I have with paths is that the toon always follows the paths by turning the back to the mob and running forward. Is it somehow possible to make the toon follow the path strafing or going backward?
November 12, 20178 yr Author I am using the current version of wrobot for vanilla private server. But I am not sure whether or not I explained my question right. What I want to archieve is that I can tell my toon to follow a path to a specific position running backward instead of running forward. I don't mean to reverse a path. So instead of, for example this: wManager.Wow.Helpers.Move.MoveInject(wManager.Wow.Enums.Keybindings.MOVEBACKWARD, false); Thread.Sleep(1000); wManager.Wow.Helpers.Move.MoveInject(wManager.Wow.Enums.Keybindings.MOVEBACKWARD, true); I want to do something like this: MovementManager.GoBackward(PathFinder.FindPath(NewPosition), false); Please note the imaginary GoBackward() method. Have you an idea how to realize this?
November 12, 20178 yr Sorry, I read your post to quickly, use code like: wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) => { var me = wManager.Wow.ObjectManager.ObjectManager.Me; if (wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && unit.IsValid && !me.IsCast && unit.IsGoodInteractDistance) // put here your conditions to running backwards { var p = robotManager.Helpful.Math.GetPosition2DOfAngleAndDistance(me.Position, robotManager.Helpful.Math.GetAngle(unit.Position, me.Position), wManager.Wow.Helpers.CustomClass.GetRange - unit.GetDistance - 3); var z = wManager.Wow.Helpers.PathFinder.GetZPosition(p); if (z != 0) { p.Z = z; wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p, 3.5f, true, context => (wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)); } } };
November 12, 20178 yr Author Hey thanks! The destination coordinate calculation based on robotManager.Helpful.Math.GetPosition2DOfAngleAndDistance looks interesting. I just tried the snippet, needs more fine tuning, but could be a base for a solution. The one thing I thought about is not done with this snippet: Follow a path while walking backward or strafing. The toon is always turning arround and follwing the path looking straight away from the mob. A human player would either turn 90 degrees and strafe away (to move faster) or simply strafe away to the right or left. Turning 180 degrees around and run away with the back pointing to the mob is not done pretty often by human players. Any ideas?
Create an account or sign in to comment