Maxo Posted October 4, 2022 Share Posted October 4, 2022 (edited) I can not get this to work so it moves one position to the south, it does log all the loggers, but does not move. I have tried putting a conditional sleep after the walk but doesn't work The idea is that when player is standing on a fire in the 'firemakingStartingArea' and tries to light a log, the message pops up, and it moves one tile to the south. Edited October 4, 2022 by Maxo 1 Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted October 4, 2022 Share Posted October 4, 2022 (edited) Reading the documentation usually helps https://osbot.org/api/org/osbot/rs07/api/Walking.html By default the threshold is set 2 and 5 ^ You will have create your own WalkingEvent and set setMinDistanceThreshold(0) WalkingEvent event = new WalkingEvent(position); event.setMinDistanceThreshold(0); execute(event); You should never execute any code thats interacts with the game in any way in the onMessage method in my opinion, should only be done in the onLoop. Also mirror mode can skip messages very easily, so checking messages should never affect any script logic Edited October 4, 2022 by Khaleesi 1 1 Quote Link to comment Share on other sites More sharing options...
Gunman Posted October 4, 2022 Share Posted October 4, 2022 Like Khal said wouldn't recommend doing that in the onMessage. But an alternative to walk a tile that short of a distance you can also just directly interact with the tile new Position(0, 0, 0).interact(getBot(), "Walk here"); 1 1 Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted October 4, 2022 Share Posted October 4, 2022 17 minutes ago, Gunman said: Like Khal said wouldn't recommend doing that in the onMessage. But an alternative to walk a tile that short of a distance you can also just directly interact with the tile new Position(0, 0, 0).interact(getBot(), "Walk here"); Even better 1 Quote Link to comment Share on other sites More sharing options...
FushigiBot Posted October 6, 2022 Share Posted October 6, 2022 Rather than using onmessage, setup an animation timeout timer that resets everytime it animates. Set it to 5-10 secs or so and have it move tiles if it doesnt animate within that time. onMessage is unreliable in mirror. 1 Quote Link to comment Share on other sites More sharing options...
Maxo Posted October 13, 2022 Author Share Posted October 13, 2022 On 10/6/2022 at 3:08 AM, FushigiBot said: Rather than using onmessage, setup an animation timeout timer that resets everytime it animates. Set it to 5-10 secs or so and have it move tiles if it doesnt animate within that time. onMessage is unreliable in mirror. Is there a way to just check if there is a fire on the tile where i am standing? Seems stupid to just try and and see if it works every time Quote Link to comment Share on other sites More sharing options...
Gunman Posted October 13, 2022 Share Posted October 13, 2022 4 hours ago, Maxo said: Is there a way to just check if there is a fire on the tile where i am standing? Seems stupid to just try and and see if it works every time Yeah, use a lamba to filter it to your position https://www.programiz.com/java-programming/lambda-expression Quote Link to comment Share on other sites More sharing options...