Jump to content

Recommended Posts

 

 

 

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.htmlimage.png.c631667b90ea8b8d15624cefd00b9ea9.png

 

Any ideas why this does not work as it should?

Link to comment
https://wrobot.eu/forums/topic/12260-enter-corpse-in-dungeon/
Share on other sites

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
https://wrobot.eu/forums/topic/12260-enter-corpse-in-dungeon/#findComment-58768
Share on other sites

 

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

image.thumb.png.1ffed0f555bb09c40ff8780a68a5a95e.png

image.png.168528b1a0b7f4ca1e9ef9269e48f7ae.png

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

 

image.thumb.png.594267501eea4ca951478d70f024d982.png

11 Jun 2020 17H32.log.html

Link to comment
https://wrobot.eu/forums/topic/12260-enter-corpse-in-dungeon/#findComment-58769
Share on other sites

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
https://wrobot.eu/forums/topic/12260-enter-corpse-in-dungeon/#findComment-58770
Share on other sites

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
https://wrobot.eu/forums/topic/12260-enter-corpse-in-dungeon/#findComment-58771
Share on other sites

  • 3 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...