waldyn Posted May 30, 2014 Share Posted May 30, 2014 public int onLoop() throws InterruptedException { switch (getState()) { case ATTACK: ... break; case DROP: ... client.getInventory().dropAll(); break; } return random(200, 300); } what is the point behind "return random(200,300);" in the onLoop() method? I saw this in Pandemic's tutorial! Link to comment Share on other sites More sharing options...
Dreamliner Posted May 30, 2014 Share Posted May 30, 2014 public int onLoop() throws InterruptedException { switch (getState()) { case ATTACK: ... break; case DROP: ... client.getInventory().dropAll(); break; } return random(200, 300); } what is the point behind "return random(200,300);" in the onLoop() method? I saw this in Pandemic's tutorial! It makes the onLoop() Thread sleep x amount of milliseconds Link to comment Share on other sites More sharing options...
waldyn Posted May 30, 2014 Author Share Posted May 30, 2014 It makes the onLoop() Thread sleep x amount of milliseconds thought so. just after decompiling some other scripts I have seen people use that method and sleep(x); so it's really confusing. Thanks a lot. Link to comment Share on other sites More sharing options...