Dreampathfinder PlusEMU

NeedForSpreed

Member
May 18, 2014
326
71
The thing is I need the closest square working and I know that bcstorm has it. I'm currently using Plus EMU Boon Edit. I know some basic C#. I've been trying to change The current pathfinder to dreampathfinder but I couldn't manage to.
 
Last edited:

JayC

Always Learning
Aug 8, 2013
5,493
1,398
The thing is I need the closest square working and I know that bcstorm has it. I'm currently using Plus EMU Boon Edit. I know some basic C#. I've been trying to change The current pathfinder to dreampathfinder but I couldn't management to.
I'm confused what you mean by you need the closest square working? You mean you're trying to find a valid square around the user?
 

NeedForSpreed

Member
May 18, 2014
326
71
I'm confused what you mean by you need the closest square working? You mean you're trying to find a valid square around the user?
If you're using BCStorm emulator and theres let's say a square of z-shelfes. If you click inside the square it'll go to the nearest point but wont go inside since it's closed but on PlusEMU it won't do anything. I need the dreampathfinder that BCStorm uses on Plus EMU. I know some hotels that has managed to fix what I need.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,194
3,901
If you're using BCStorm emulator and theres let's say a square of z-shelfes. If you click inside the square it'll go to the nearest point but wont go inside since it's closed but on PlusEMU it won't do anything. I need the dreampathfinder that BCStorm uses on Plus EMU. I know some hotels that has managed to fix what I need.

Do you have a mirror? I'll happily give this ago when I'm home if you have a download link for BCStorm.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,194
3,901
Butterfly has DreamPathFinder also, here's the link! Do you think you'll manage to do it today? :) Thanks in advance.

Cheers. Yup, about 3 hours from now (currently not at home), but will give it a good crack for you.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,194
3,901
Hey,

I've made a little 'hacky' way of doing it, I haven't implemented Dream Pathfinder (as it seems a giant pain).

This isn't 100% it'll cause some issues if the path is already blocked, but hopefully it helps you a little to find out where to go from here?

This still needs work, just it might help you a little bit.

In GameMap.cs find ''public bool IsValidStep(Vector2D From, Vector2D To, bool EndOfPath, bool Override, bool Roller = false)"

Change:

PHP:
if ((mGameMap[To.X, To.Y] == 3 && !EndOfPath) || mGameMap[To.X, To.Y] == 0 || (mGameMap[To.X, To.Y] == 2 && !EndOfPath))
                return false;

To:

PHP:
if ((mGameMap[To.X, To.Y] == 3 && !EndOfPath) || (mGameMap[To.X, To.Y] == 2 && !EndOfPath))
                return false;

Then in the same file find "public bool IsValidStep2(RoomUser User, Vector2D From, Vector2D To, bool EndOfPath, bool Override)"

Above this line:

PHP:
if ((mGameMap[To.X, To.Y] == 3 && !EndOfPath && !Chair) || (mGameMap[To.X, To.Y] == 0) || (mGameMap[To.X, To.Y] == 2 && !EndOfPath))

Add this:
PHP:
if (mGameMap[To.X, To.Y] == 0)
            {
                if (User.Path.Count > 0)
                    User.Path.Clear();
                User.PathRecalcNeeded = false;
                return false;
            }

Debug, and it should hopefully help you out - but this isn't 100%.
 

NeedForSpreed

Member
May 18, 2014
326
71
Hey,

I've made a little 'hacky' way of doing it, I haven't implemented Dream Pathfinder (as it seems a giant pain).

This isn't 100% it'll cause some issues if the path is already blocked, but hopefully it helps you a little to find out where to go from here?

This still needs work, just it might help you a little bit.

In GameMap.cs find ''public bool IsValidStep(Vector2D From, Vector2D To, bool EndOfPath, bool Override, bool Roller = false)"

Change:

PHP:
if ((mGameMap[To.X, To.Y] == 3 && !EndOfPath) || mGameMap[To.X, To.Y] == 0 || (mGameMap[To.X, To.Y] == 2 && !EndOfPath))
                return false;

To:

PHP:
if ((mGameMap[To.X, To.Y] == 3 && !EndOfPath) || (mGameMap[To.X, To.Y] == 2 && !EndOfPath))
                return false;

Then in the same file find "public bool IsValidStep2(RoomUser User, Vector2D From, Vector2D To, bool EndOfPath, bool Override)"

Above this line:

PHP:
if ((mGameMap[To.X, To.Y] == 3 && !EndOfPath && !Chair) || (mGameMap[To.X, To.Y] == 0) || (mGameMap[To.X, To.Y] == 2 && !EndOfPath))

Add this:
PHP:
if (mGameMap[To.X, To.Y] == 0)
            {
                if (User.Path.Count > 0)
                    User.Path.Clear();
                User.PathRecalcNeeded = false;
                return false;
            }

Debug, and it should hopefully help you out - but this isn't 100%.
The thing is I need to have OHF working. For it to work I need to be able to click almost anywhere. OHF = Old Habbo Football. I don't think this fix is good enough. Do you think you have time to improve this alittie? Thank you for your support! :D
 
@AlexTheGreat, @Sledmore
 
Hey,

I've made a little 'hacky' way of doing it, I haven't implemented Dream Pathfinder (as it seems a giant pain).

This isn't 100% it'll cause some issues if the path is already blocked, but hopefully it helps you a little to find out where to go from here?

This still needs work, just it might help you a little bit.

In GameMap.cs find ''public bool IsValidStep(Vector2D From, Vector2D To, bool EndOfPath, bool Override, bool Roller = false)"

Change:

PHP:
if ((mGameMap[To.X, To.Y] == 3 && !EndOfPath) || mGameMap[To.X, To.Y] == 0 || (mGameMap[To.X, To.Y] == 2 && !EndOfPath))
                return false;

To:

PHP:
if ((mGameMap[To.X, To.Y] == 3 && !EndOfPath) || (mGameMap[To.X, To.Y] == 2 && !EndOfPath))
                return false;

Then in the same file find "public bool IsValidStep2(RoomUser User, Vector2D From, Vector2D To, bool EndOfPath, bool Override)"

Above this line:

PHP:
if ((mGameMap[To.X, To.Y] == 3 && !EndOfPath && !Chair) || (mGameMap[To.X, To.Y] == 0) || (mGameMap[To.X, To.Y] == 2 && !EndOfPath))

Add this:
PHP:
if (mGameMap[To.X, To.Y] == 0)
            {
                if (User.Path.Count > 0)
                    User.Path.Clear();
                User.PathRecalcNeeded = false;
                return false;
            }

Debug, and it should hopefully help you out - but this isn't 100%.
Can't you take further look into this?? :p How to make it fully working. The thing is this is basically all I need. I've fixed the whole cms and everything all that is left is this. :( I know you're busy with updating PlusEMU + real life but can't you take 10 min and look into this? Thanks in advance!
 

Kristopher

Photographer
Dec 25, 2010
802
66
The thing is I need to have OHF working. For it to work I need to be able to click almost anywhere. OHF = Old Habbo Football. I don't think this fix is good enough. Do you think you have time to improve this alittie? Thank you for your support! :D
 
@AlexTheGreat, @Sledmore
 

Can't you take further look into this?? :p How to make it fully working. The thing is this is basically all I need. I've fixed the whole cms and everything all that is left is this. :( I know you're busy with updating PlusEMU + real life but can't you take 10 min and look into this? Thanks in advance!
He gave you a huge base. It's not 100% but what you have is enough to to learn how to fix what is going on. Just compare pathfinders etc..
 

NeedForSpreed

Member
May 18, 2014
326
71
He gave you a huge base. It's not 100% but what you have is enough to to learn how to fix what is going on. Just compare pathfinders etc..
I've been trying but with no succes unfortunately. I don't like to get spoon fed but I've tried my best and that's why I'm reaching out to you, the community for help. I've tried comparing it with butterfly emulator pathfinder but no luck, since plus pathfinder is really different.

Skickat från min FRD-L09 via Tapatalk
 
This thread has been up for quite awhile but no help yet besides Sledmore's almost fix :(
 

Core

Member
Nov 10, 2016
356
138
I've been trying but with no succes unfortunately. I don't like to get spoon fed but I've tried my best and that's why I'm reaching out to you, the community for help. I've tried comparing it with butterfly emulator pathfinder but no luck, since plus pathfinder is really different.

Skickat från min FRD-L09 via Tapatalk
 
This thread has been up for quite awhile but no help yet besides Sledmore's almost fix :(

You could iterate through the steps around the user? Like so;

Was wrote on devbest so recommend re writing as just used loads of spaces lol
Code:
public Point GetTileAroundUser(Point Coord)
{
    for(int X = -1; X <= 1; X++)
    {
       for(int Y = -1; Y <= 1; Y++)
       {
              if(IsValidStep(Coord.X + X, Coord.Y + Y))
              {
                   return new Point(Coord.X + X, Coord.Y + Y);
              }
       }
   }
   return null;
}
 

ShalawHibblo

New Member
Jun 26, 2013
23
1
You could iterate through the steps around the user? Like so;

Was wrote on devbest so recommend re writing as just used loads of spaces lol
Code:
public Point GetTileAroundUser(Point Coord)
{
    for(int X = -1; X <= 1; X++)
    {
       for(int Y = -1; Y <= 1; Y++)
       {
              if(IsValidStep(Coord.X + X, Coord.Y + Y))
              {
                   return new Point(Coord.X + X, Coord.Y + Y);
              }
       }
   }
   return null;
}

What should i do with this code?
where should I place it
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
You could loop through each point in the step and if that point is valid then just keep moving. Just test to see if the END point is valid instead of all steps in between , then loop through each point inbetween
 

ShalawHibblo

New Member
Jun 26, 2013
23
1
This is my only problem right now.

With out Disablediagonal
When I press the red boxes I have painted.(Look the picture)
My Account does not move there. I need help with this.


With Disablediagonal
When I press the red boxes I have painted.(Look the picture)
My Account does not move there. I need help with this.
 
Last edited:

Users who are viewing this thread

Top