Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //wait for Condition
- Condition waitForAnimation = new Condition() {
- @Override
- public boolean active() {
- General.sleep(50, 100); // reduces cpu usage
- return Player.getAnimation() != -1;
- }
- }
- Timing.waitCondition(waitForAnimation, General.random(1500, 2000));
- //for loop
- for (int i = 0; i < 20 && Player.getAnimation() == -1; i++) {
- General.sleep(75, 100);
- }
- //while loop
- long mark = System.currentTimeMillis();
- while (Player.getAnimation() == -1 && Timing.timeFromMark(mark) <= General.random(1500, 2000)) {
- General.sleep(50, 100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement