- Joined
- Sep 21, 2015
- Messages
- 22
- Thread Author
- #1
So I'm trying to stop execution while the player is mining, I came up with the following.
The issue I'm having is if the player gets through an entire mining cycle and still hasn't mined the ore, the animation starts over which briefly sets the animation id to -1. Does anyone know of a better way to accomplish this, that doesn't spam click the ore?
Ideally I'd be able to check if the ore is still available as well but I don't see such a property on the gameobject (I'm most likely overlooking this).
Edit:
Apparently isValid seems to do the trick, but I'm not sure what is being validated, is it the ore state, the original query for this object?
Code:
Execution.delayWhile(()->bot.player.getAnimationId() != -1 || bot.player.isMoving(), 2000, 45000);
The issue I'm having is if the player gets through an entire mining cycle and still hasn't mined the ore, the animation starts over which briefly sets the animation id to -1. Does anyone know of a better way to accomplish this, that doesn't spam click the ore?
Ideally I'd be able to check if the ore is still available as well but I don't see such a property on the gameobject (I'm most likely overlooking this).
Edit:
Apparently isValid seems to do the trick, but I'm not sure what is being validated, is it the ore state, the original query for this object?
Last edited: