for a static sleep you can just use sleep, not really recommended since a bit of lag can mess up your script pretty quick.
And you don't wanna sleep fro to long, bcs that will make the script really slow^^
You can use conditional sleeps instead
https://osbot.org/api/org/osbot/rs07/utility/ConditionalSleep.html
For example:
new ConditionalSleep( 5000, 100) {
@Override
public boolean condition() throws InterruptedException {
return script.myPlayer().isAnimating();
}
}.sleep();
Sleeps for a maximum of 5000ms OR until the player is animating.
This will check every 100ms