Hello, i'm tryng to make a counter while webwalk but it never works. I guess no other process is running until the webwalk is finished.
Can anyone tell me how can i make a counter while walking?
Here's the code example:
int count = 0;
int counterRandom = random(1,15);
@Override
public int onLoop() throws InterruptedException {
if (myPlayer().isMoving()) {
count += 1;
sleep(1000);
log(count);
}
if (count == counterRandom) {
log("Done");
counterRandom = random(1,15);
count = 0;
}
return 0;
}