April 8, 20187 yr 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.
April 8, 20187 yr 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....
April 8, 20187 yr 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;
April 8, 20187 yr 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
April 9, 20187 yr Author bump, localPathFinder only works within a certain area, kind've need a method that works over larger distances.
April 9, 20187 yr 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, 20187 yr by FrostBug
April 9, 20187 yr 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.
April 10, 20187 yr 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.
Create an account or sign in to comment