BetterSister 367 Posted January 31, 2016 Share Posted January 31, 2016 Basicly currently the problem is that it follows tank in combat and all if going too far doing fine but if tank goes out of line of sight (behind tree, hill or something) it'll just stand there like mushroom in shit. Any ideas how to improve this? For some reason with MovementManager.MoveTo(tank) it requires straight line to the target without anything on its way #region Tank too far bool tankfar() { WoWPlayer tank = getTanks().First(); while (tank.GetDistance > 15) { MovementManager.MoveTo(tank); } MovementManager.StopMove(); return false; } #endregion Link to comment https://wrobot.eu/forums/topic/2675-improving-tanktoofar/ Share on other sites More sharing options...
Droidz 2738 Posted February 1, 2016 Share Posted February 1, 2016 Hello, To stop to go to tank if it is out of view you can use this code: #region Tank too far bool tankfar() { WoWPlayer tank = getTanks().First(); while (tank.IsValid && tank.GetDistance > 15 && !wManager.Wow.Helpers.TraceLine.TraceLineGo(tank.Position)) { MovementManager.MoveTo(tank); System.Threading.Thread.Sleep(50); } MovementManager.StopMove(); return false; } #endregion To generate path and go to tank you can use code like this: #region Tank too far bool tankfar() { WoWPlayer tank = getTanks().First(); if (tank.IsValid && tank.GetDistance > 15) { wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWith(new WoWUnit(tank.GetBaseAddress), -1, false, context => Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause && tank.GetDistance > 15); } MovementManager.StopMove(); return false; } #endregion BetterSister and PierreDeRosette 2 Link to comment https://wrobot.eu/forums/topic/2675-improving-tanktoofar/#findComment-12216 Share on other sites More sharing options...
BetterSister 367 Posted February 1, 2016 Author Share Posted February 1, 2016 Beautiful! Thanks again Link to comment https://wrobot.eu/forums/topic/2675-improving-tanktoofar/#findComment-12227 Share on other sites More sharing options...
BetterSister 367 Posted February 2, 2016 Author Share Posted February 2, 2016 Link to comment https://wrobot.eu/forums/topic/2675-improving-tanktoofar/#findComment-12238 Share on other sites More sharing options...
Droidz 2738 Posted February 2, 2016 Share Posted February 2, 2016 Add "wManager.Wow.Bot.Tasks." before "GoToTask...." BetterSister 1 Link to comment https://wrobot.eu/forums/topic/2675-improving-tanktoofar/#findComment-12240 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