jbx5 / devious-client

BSD 2-Clause "Simplified" License
82 stars 176 forks source link

Make pathfinding handle avoiding specific areas #355

Closed Sunderw3k closed 8 months ago

Sunderw3k commented 8 months ago

Is your feature request related to a problem? Please describe. There are cases when a path is dangerous for some specific builds (low hp, low level, etc). That risks the bot dying. Making the pathfinder able to avoid those paths stops that from happening as well as making it easier to do bosses etc where you have to avoid hazards like Scurrius etc.

Describe the solution you'd like Make the pathfinder use a list of WorldArea's of places you want to avoid, that would probably be passed by the script maker in the Walker.walkTo method.

Describe alternatives you've considered I haven't gotten anything else to work, but I think what I'm proposing is a reasonable request that might also help other script makers.

Additional context Example: When running to black chins from burning amulet to lvl 41 wildy the pathfinder is going to run through green dragons, I would like to avoid that by specifying that the area where dragons can roam is off limits.

A similar thing to what im proposing is done with avoidWilderness in addNeighbor.

jbx5 commented 8 months ago

This is script-specific. You can make your own path to accomplish this.

Sunderw3k commented 8 months ago

The issue is that sometimes the pathfinding should be dynamic, if I were to avoid specific tiles that change id need to know what the path is with only safe tiles. Which is what the pathfinding should handle, not the script.