Pudge 24 Posted June 11, 2020 Share Posted June 11, 2020 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? Link to comment Share on other sites More sharing options...
Droidz 2737 Posted June 11, 2020 Share Posted June 11, 2020 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("??"); } } Link to comment Share on other sites More sharing options...
Pudge 24 Posted June 11, 2020 Author Share Posted June 11, 2020 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 Link to comment Share on other sites More sharing options...
Droidz 2737 Posted June 11, 2020 Share Posted June 11, 2020 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("??"); } } Pudge and happiness7 2 Link to comment Share on other sites More sharing options...
Pudge 24 Posted June 11, 2020 Author Share Posted June 11, 2020 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("??"); } } Link to comment Share on other sites More sharing options...
TheSmokie 242 Posted October 10, 2020 Share Posted October 10, 2020 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. Link to comment 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