Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Bug WebPath returning null

Joined
Apr 24, 2018
Messages
2
i couldn't find anything here on the forums helping with this issue so hopefully this post can be the last.

i'm trying to just walk from the east fally bank to south of fally and it's failing to build a default path

Code:
private final Coordinate standCoord = new Coordinate(3003, 3312, 0);
private final Area treeArea = new Area.Circular(standCoord, 8);

if (Players.getLocal() != null && !treeArea.contains(Players.getLocal())) {
    final WebPath path = Traversal.getDefaultWeb().getPathBuilder().buildTo(standCoord);
    if (path == null) {
        System.out.println("tree path is null");
        return;
    }
    path.step(true);
}

i'm also doing the same thing for walking to the bank, only difference is is i'm using Rectangular for bankArea.

i just switched from another botting client and so i'm pretty new to the runemate api if it's changed or i'm doing something wrong any help is great, thanks.
 
cuppa.drink(java);
Joined
Mar 13, 2018
Messages
6,966
Web path has been mostly broken for about a year. Cloud does seem to be more actively updating now though, so it's possible it'll get fixed within the order of weeks/a couple months, but that hasn't been completely confirmed.

You'll want to use regionpaths for short distances (or stitched together ones for long distances), or waypointpath for long, or a custom web, or bresenham for very short/as a backup.
 
Joined
Jun 20, 2015
Messages
161
Ah ok, thanks
 
RegionPath keeps clicking about 1/4 the distance to the edge of the minimap rather than right at the edge, is that also a known bug?
 
cuppa.drink(java);
Joined
Mar 13, 2018
Messages
6,966
RegionPath keeps clicking about 1/4 the distance to the edge of the minimap rather than right at the edge, is that also a known bug?
It's a known aspect, not 100% sure if it'd be considered a bug or not. There are options for setMaxDistance (I forget the exact function) but I never got them to work. What I did to get around it was check each vertex from the path and click the one that was furthest out while still clickable on minimap. Not the most efficient thing to do, but yeah
 
Joined
Jun 20, 2015
Messages
161
It's a known aspect, not 100% sure if it'd be considered a bug or not. There are options for setMaxDistance (I forget the exact function) but I never got them to work. What I did to get around it was check each vertex from the path and click the one that was furthest out while still clickable on minimap. Not the most efficient thing to do, but yeah
Cloud says here that it's supposed to click the furthest point on the path: Question - How to walk efficiently?
So I guess it's a bug. I'll use that workaround for now, thanks.
 
Joined
Apr 19, 2018
Messages
14
@dahnae I appreciate the files there :) was able to start building my webPath.

I noticed it doesnt seem to handle doors/other obstacles by default.
Is there anything special I have to do to import those?
 
Go check out new bots and give helpful feedback.
Joined
Jan 31, 2016
Messages
5,413
@dahnae I appreciate the files there :) was able to start building my webPath.

I noticed it doesnt seem to handle doors/other obstacles by default.
Is there anything special I have to do to import those?

you would have to create an enum and handler for doors/obstacles

I think my new version supports some of it... Let me upload the .zip here...
 

Attachments

  • WebMaker.zip
    8.3 KB · Views: 31
Joined
Apr 19, 2018
Messages
14
@awesome123man Looks like both versions did, It was just rendering the name of the objects as white text on a white background so it was impossible to use, adjusted that now and it works well.

Might do a little more improving on it as far as recognizing the correct objects to be added to the web, still a lot of manual work to map everything even with this tool.

Mostly for doors, should be pretty easy to detect the direction the door is facing and automatically place the input/output cords accordingly.

EDIT: Doors are weird with how the direction is setup, probably gunna just set the input/output based on the door cord + checking which tiles next to the door are walkable.

Ladders/stairs might be able to get away with parsing through the options and doing a +1 or -1 to the Z axis based on which options it found("Climb Up" +1, "Climb Down" -1).
 
Last edited:
Joined
Dec 10, 2014
Messages
3,255
@awesome123man Looks like both versions did, It was just rendering the name of the objects as white text on a white background so it was impossible to use, adjusted that now and it works well.

Might do a little more improving on it as far as recognizing the correct objects to be added to the web, still a lot of manual work to map everything even with this tool.

Mostly for doors, should be pretty easy to detect the direction the door is facing and automatically place the input/output cords accordingly.

EDIT: Doors are weird with how the direction is setup, probably gunna just set the input/output based on the door cord + checking which tiles next to the door are walkable.

Ladders/stairs might be able to get away with parsing through the options and doing a +1 or -1 to the Z axis based on which options it found("Climb Up" +1, "Climb Down" -1).
If I remember correctly, doors are pretty consistent, at least normal doors. I think you can use the orientation angle (might have to slightly modify it, .e.g +45) to work out which coordinate is the coordinate past the closed door.
It's been a while and I've got old man brain so I could be mis-remembering. The main issue was that the direction didn't line up with the door, a north facing door had a north-west direction or something, but the difference was consistent and could be rectified.
 
Joined
Apr 19, 2018
Messages
14
If I remember correctly, doors are pretty consistent, at least normal doors. I think you can use the orientation angle (might have to slightly modify it, .e.g +45) to work out which coordinate is the coordinate past the closed door.
It's been a while and I've got old man brain so I could be mis-remembering. The main issue was that the direction didn't line up with the door, a north facing door had a north-west direction or something, but the difference was consistent and could be rectified.

Yup that is what I'm finding as I dig more into it as well, I was just being a dummy the first time around.
 
Joined
Dec 10, 2014
Messages
3,255
Yup that is what I'm finding as I dig more into it as well, I was just being a dummy the first time around.
Also ladders and stairs aren't always as simple as Z +/- 1, in some cases they can lead to a location on another plane a long way away.
I think I used to do something like, if a staircase/ladder exists on coordinate z+/-1 and the name matches, and it has an action that corresponds with the staircase/ladder I'm currently looking at.

The one thing I struggled with most was minimization, since having a 1:1 graph isn't exactly feasible for the RuneMate Web format, but I can't say that I spend too much time dealing with it and settled for something that just worked.
 
Top