The Hero of Time Posted March 12, 2016 Share Posted March 12, 2016 After an hour of running my script, it ran into this problem [iNFO][bot #1][03/12 03:19:30 AM]: [debug] starting walking it's stuck in webwalking, constantly trying to reach the place.. i would like a 10 second timeout or something, that after a while it will just move away, or do something that will fix it while ::toggleroofs might fix it, there are definitely cases where it wouldn't, so how does this work in cases where it doesnt fix it? Quote Link to comment Share on other sites More sharing options...
Extreme Scripts Posted March 12, 2016 Share Posted March 12, 2016 (edited) use WebWalkEvent and you can set Break conditions. http://osbot.org/api/org/osbot/rs07/event/WebWalkEvent.html Reasoning for it being like that: Uses the default WebWalkEvent which has a threshold distance. So if it comes within a certain amount of tiles (I think the threshold is 2/3 can't remember then it will return true as it arriving at the position). Edited March 12, 2016 by Extreme Scripts Quote Link to comment Share on other sites More sharing options...
Chris Posted March 12, 2016 Share Posted March 12, 2016 (edited) WebWalkEvent toDestination = new WebWalkEvent(INodeRouteFinder.createAdvanced(), destination); //can do Position position || try area.getRandomPosition(); toDestination.setBreakCondition(new Condition() { //if true, break the walker. @Override public boolean evaluate() { return condition; //area.contains(myPos) || pos.distance() <= threshold } }); execute(toDestination); Edited March 12, 2016 by Sinatra 1 Quote Link to comment Share on other sites More sharing options...
The Hero of Time Posted March 12, 2016 Author Share Posted March 12, 2016 WebWalkEvent toDestination = new WebWalkEvent(INodeRouteFinder.createAdvanced(), destination); //can do Position position || try area.getRandomPosition(); toDestination.setBreakCondition(new Condition() { //if true, break the walker. @Override public boolean evaluate() { return condition; //area.contains(myPos) || pos.distance() <= threshold } }); execute(toDestination); tyvm for the snippet ill have a look at it later, 3;39 am now ayy lmao 1 Quote Link to comment Share on other sites More sharing options...
Keven Posted March 12, 2016 Share Posted March 12, 2016 ayy lmao Quote Link to comment Share on other sites More sharing options...