March 12, 20169 yr 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?
March 12, 20169 yr 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, 20169 yr by Extreme Scripts
March 12, 20169 yr 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, 20169 yr by Sinatra
March 12, 20169 yr Author 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
Create an account or sign in to comment