October 4, 20223 yr 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, 20223 yr by Maxo
October 4, 20223 yr 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, 20223 yr by Khaleesi
October 4, 20223 yr 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");
October 4, 20223 yr 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 😉
October 6, 20223 yr 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.
October 13, 20223 yr Author 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
October 13, 20223 yr 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
Create an account or sign in to comment