Jump to content

I have a question on the function of this certain line of code


waldyn

Recommended Posts

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

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...