June 11, 20205 yr Hi everyone, I'm trying to do my best after dying in a dungeon. I found little information about this on the forum. That's all. I made a plugin using your @Droidz code. But it doesn’t want to work, although the condition for executing the code works. using System.ComponentModel; using System.Windows.Forms; using robotManager.Helpful; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { public void Initialize() { Logging.Write("[EnterCorpse] Started."); wManager.Events.OthersEvents.OnPathFinderFindPath += delegate (Vector3 from, Vector3 to, string mpq, CancelEventArgs cancelable) { try { if (to != null && (ObjectManager.Me.PositionCorpse.Z == to.Z) && to.DistanceTo2D(new Vector3(-3362.286f, 4665.728f, -22.70619f)) < 30) { to = new Vector3(-3362.163f, 4636.226f, -101.049f, "None"); // dungeon entrance point Logging.Write("Path changed to " + to.ToString() + ""); //cancelable.Cancel = true; //Thread.Sleep(10000); //MovementManager.StopMove(); //PathFinder.FindPath(to); //MovementManager.Go(PathFinder.FindPath(to)); //cancelable.Cancel = true; } } catch { } }; } public void Dispose() { Logging.Write("[EnterCorpse] Disposed."); } public void Settings() { MessageBox.Show("??"); } } The log shows that the code works, but the path changes instantly and the bot runs to the corpse position: 11 Jun 2020 16H00.log.html Any ideas why this does not work as it should?
June 11, 20205 yr Hello, if you can walk from detected corpse position to dungeon enter without obstacle try: using System.Windows.Forms; using robotManager.Helpful; public class Main : wManager.Plugin.IPlugin { public void Initialize() { Logging.Write("[EnterCorpse] Started."); wManager.Events.OthersEvents.OnPathFinderFindPathResult += (from, to, path, mpq, success) => { if (to.DistanceTo2D(new Vector3(-3362.286f, 4665.728f, -22.70619f)) < 30) { path.Add(new Vector3(new Vector3(-3362.163f, 4636.226f, -101.049f))); } }; } public void Dispose() { Logging.Write("[EnterCorpse] Disposed."); } public void Settings() { MessageBox.Show("??"); } }
June 11, 20205 yr Author The fact is that the coordinate of the body is Z = 22.7034, and the entrance to the dungeon is at a height of Z = -101.049f and the bot goes and stands above the cave at the entrance 50 minutes ago, Droidz said: Hello, if you can walk from detected corpse position to dungeon enter without obstacle try: using System.Windows.Forms; using robotManager.Helpful; public class Main : wManager.Plugin.IPlugin { public void Initialize() { Logging.Write("[EnterCorpse] Started."); wManager.Events.OthersEvents.OnPathFinderFindPathResult += (from, to, path, mpq, success) => { if (to.DistanceTo2D(new Vector3(-3362.286f, 4665.728f, -22.70619f)) < 30) { path.Add(new Vector3(new Vector3(-3362.163f, 4636.226f, -101.049f))); } }; } public void Dispose() { Logging.Write("[EnterCorpse] Disposed."); } public void Settings() { MessageBox.Show("??"); } } when reaching the position of the body goes to the bottom, it is necessary that the path is generated from the respawn to the portal, it is possible 11 Jun 2020 17H32.log.html
June 11, 20205 yr try using System.Windows.Forms; using robotManager.Helpful; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { public void Initialize() { var badCorpsePos = new Vector3(-3362.286f, 4665.728f, -22.70619f); var enterDungeonPos = new Vector3(-3362.163f, 4636.226f, -101.049f); Logging.Write("[EnterCorpse] Started."); wManager.Events.OthersEvents.OnPathFinderFindPathResult += (from, to, path, mpq, success) => { if (ObjectManager.Me.IsDead && to.DistanceTo(badCorpsePos) < 10) { path.Clear(); path.AddRange(PathFinder.FindPath(enterDungeonPos)); } }; } public void Dispose() { Logging.Write("[EnterCorpse] Disposed."); } public void Settings() { MessageBox.Show("??"); } }
June 11, 20205 yr Author 21 minutes ago, Droidz said: try using System.Windows.Forms; using robotManager.Helpful; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class Main : wManager.Plugin.IPlugin { public void Initialize() { var badCorpsePos = new Vector3(-3362.286f, 4665.728f, -22.70619f); var enterDungeonPos = new Vector3(-3362.163f, 4636.226f, -101.049f); Logging.Write("[EnterCorpse] Started."); wManager.Events.OthersEvents.OnPathFinderFindPathResult += (from, to, path, mpq, success) => { if (ObjectManager.Me.IsDead && to.DistanceTo(badCorpsePos) < 10) { path.Clear(); path.AddRange(PathFinder.FindPath(enterDungeonPos)); } }; } public void Dispose() { Logging.Write("[EnterCorpse] Disposed."); } public void Settings() { MessageBox.Show("??"); } }
October 10, 20205 yr I just used the code @droidz provided, if you are using it for instances, use custom script. instead of making a plugin for each and every instance.
Create an account or sign in to comment