RuneMate / Issues

Client and API Issue tracking. See README for more information.
8 stars 0 forks source link

The Web returns a null path when attempting to walk from between canifis and fenkenstrain's castle to south of port phasmatys #47

Closed do-men closed 5 years ago

do-men commented 5 years ago

Describe the bug WebPath cannot generate a path to south of port phasmatys. There are no interactions required to traverse that path.

Affected game modes: RS3.

RuneMate version: 2.96.1

To Reproduce Try to generate a WebPath to an area south of port phasmatys.

Please include the code used to produce this bug. WebPath path = Traversal.getDefaultWeb.getPathBuilder.buildTo(new Area.Rectangular(new Coordinate(3685, 3404, 0), new Coordinate(3690, 3393, 0)))

Expected behaviour Expected a traversal to given area.

Screenshots image

Cannot generate path from "You are here" to "Your marker"

Additional context There's a new mining site down there since Mining rework came through.

ccarpenter04 commented 5 years ago

Please attempt to generate smaller paths in between that start location and the destination and try to determine where the problematic area is. There's likely an obstacle or a region that it deems blocked off that is causing the issue.

do-men commented 5 years ago

image

Web returns null even when being 1 square away from target area. The picture above is just another representation of where web returns null.

ccarpenter04 commented 5 years ago

Please provide your exact code in use along with coordinates you've attempted to generate a path to it from without success.

do-men commented 5 years ago

Please provide your exact code in use along with coordinates you've attempted to generate a path to it from without success.

area = Locations.valueOf(bot.getOreLocation()).getArea(); //area gets value of new Area.Rectangular(new Coordinate(3685, 3404, 0), new Coordinate(3690, 3393, 0)) WebPath webpath = Traversal.getDefaultWeb().getPathBuilder().buildTo(area); if (webpath != null) { webpath.step(); bot.setStatus("Pathing to Mining area"); bot.getLogger().info("pathing to mining area"); } else { bot.setStatus("Cannot generate path"); bot.getLogger().info("cannot generate path"); }

ccarpenter04 commented 5 years ago

First of all, you're building the area incorrectly (although it'll fix your mistake internally), it's supposed to be bottomLeft and topRight, not topLeft and bottomRight. Secondly, by passing a Locatable such as an Area to it, it's going to call Locatable.getPosition(), which for Areas returns the center-most coordinate according to the documentation. So find out what it's returning as center and check to make sure it's actually able to be walked on (along with surrounding coordinates) and ensure it's reachable.

do-men commented 5 years ago

After making sure area.getPosition() returns a reachable coordinate it works. Thanks for elaborating!

ccarpenter04 commented 5 years ago

So this issue can be closed as developer error?

do-men commented 5 years ago

Correct.