Hel Posted April 8, 2018 Share Posted April 8, 2018 I've fiddled for a little bit and can't seem to figure out if it's possible, but I'm trying to check if I can reach a tile from a position that isn't my own. map.canReach seems to only be able to use the player's current position. Quote Link to comment Share on other sites More sharing options...
Mordred Posted April 8, 2018 Share Posted April 8, 2018 52 minutes ago, Slut said: I've fiddled for a little bit and can't seem to figure out if it's possible, but I'm trying to check if I can reach a tile from a position that isn't my own. map.canReach seems to only be able to use the player's current position. Your Sig just made me laugh, then question what the fuck education is.... 1 Quote Link to comment Share on other sites More sharing options...
Chris Posted April 8, 2018 Share Posted April 8, 2018 6 hours ago, Slut said: I've fiddled for a little bit and can't seem to figure out if it's possible, but I'm trying to check if I can reach a tile from a position that isn't my own. map.canReach seems to only be able to use the player's current position. just make your own with LocalRouteFinder if path != null return true : false; 2 Quote Link to comment Share on other sites More sharing options...
liverare Posted April 8, 2018 Share Posted April 8, 2018 public boolean canReach(Position from, Position to) { return !(new LocalPathFinder(bot).findPath(from,to).isEmpty()); } https://osbot.org/api/org/osbot/rs07/api/util/LocalPathFinder.html 2 Quote Link to comment Share on other sites More sharing options...
Hel Posted April 9, 2018 Author Share Posted April 9, 2018 Thankyou guys xx Quote Link to comment Share on other sites More sharing options...
Hel Posted April 9, 2018 Author Share Posted April 9, 2018 bump, localPathFinder only works within a certain area, kind've need a method that works over larger distances. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted April 9, 2018 Share Posted April 9, 2018 (edited) 6 minutes ago, Slut said: bump, localPathFinder only works within a certain area, kind've need a method that works over larger distances. You'll have to make your own web pathfinder for that EDIT: Or make a client suggestion for access to the webwalkers underlying pathfinder Edited April 9, 2018 by FrostBug Quote Link to comment Share on other sites More sharing options...
jasper078 Posted April 9, 2018 Share Posted April 9, 2018 9 hours ago, Slut said: bump, localPathFinder only works within a certain area, kind've need a method that works over larger distances. Tile flags are only available when a region is loaded, these are needed to decide whether or not something is reachable. You could dump the tile flags to work out if something is reachable over a larger area. 1 Quote Link to comment Share on other sites More sharing options...
dreameo Posted April 10, 2018 Share Posted April 10, 2018 hmm you can try this: create a webwalkevent and use setsourcepos(Position p) <-- I believe this sets the starting pos? then do prefretchreq on event and true/false should let you know if it's reachable. 1 Quote Link to comment Share on other sites More sharing options...