May 3, 20196 yr Hey guys, When my bot is close to the coordinates it has to go to and it gets the new command: getWalking().walk(AREA); It just ignores it and thinks it's there already, I have to same problem when I'm using webWalk instead of the normal walk function. Does anyone perhaps know when I'm doing wrong here? Edited May 3, 20196 yr by Evesy typo's
May 3, 20196 yr I'm not exactly sure what it was but IIRC it checks if you are within X tiles to the destination, so when you get close to the target it returns true. Meaning if you wanted to get to a specific tile you would need to add a custom method, see below. private static boolean walk(Script script, Position position) { WalkingEvent event = new WalkingEvent(position); event.setMinDistanceThreshold(0); return script.execute(event).hasFinished(); } I could be wrong maybe better to check with someone who isn't as rusty as me when it comes to the methods.
May 3, 20196 yr If you're within 2-3 tiles it thinks you're in the area. Use the code above to override it
May 3, 20196 yr Author 1 hour ago, fhhhphgj said: I'm not exactly sure what it was but IIRC it checks if you are within X tiles to the destination, so when you get close to the target it returns true. Meaning if you wanted to get to a specific tile you would need to add a custom method, see below. private static boolean walk(Script script, Position position) { WalkingEvent event = new WalkingEvent(position); event.setMinDistanceThreshold(0); return script.execute(event).hasFinished(); } I could be wrong maybe better to check with someone who isn't as rusty as me when it comes to the methods. 8 minutes ago, Juggles said: If you're within 2-3 tiles it thinks you're in the area. Use the code above to override it Thanks a lot guys! Noob question coming in: how do I implement this?..
May 3, 20196 yr walk(script, position); 18 minutes ago, Evesy said: Thanks a lot guys! Noob question coming in: how do I implement this?..
May 3, 20196 yr https://osbot.org/api/org/osbot/rs07/event/WalkingEvent.html#setMinDistanceThreshold-int-
May 4, 20196 yr Author Thanks a lot everyone, I'm going to try it out today! 6 hours ago, Zummy said: Why can't you set min distance for webwalk, I was wondering that the other day? Yes I'm also wondering this now haha
Create an account or sign in to comment