Package org.rsbot.script.internal

Examples of org.rsbot.script.internal.BreakHandler


    } catch (final ThreadDeath ignored) {
    } catch (final Throwable ex) {
      log.log(Level.SEVERE, "Error starting script: ", ex);
    }
    if (start) {
      final BreakHandler breakHandler = new BreakHandler(this);
      setRunning(true);
      register();
      log.info("Script started.");
      try {
        while (isRunning()) {
          if (!isPaused()) {
            if (AccountManager.isTakingBreaks(account.getName())) {
              if (breakHandler.isBreaking()) {
                if (System.currentTimeMillis() - lastNotice > 600000) {
                  lastNotice = System.currentTimeMillis();
                  log.info("Breaking for " + Timer.format(breakHandler.getBreakTime()));
                }
                if (game.isLoggedIn() && breakHandler.getBreakTime() > 60000) {
                  game.logout(true);
                }
                try {
                  sleep(5000);
                } catch (final ThreadDeath td) {
                  break;
                }
                continue;
              } else {
                breakHandler.tick();
              }
            }
            if (checkForRandoms()) {
              continue;
            }
View Full Code Here

TOP

Related Classes of org.rsbot.script.internal.BreakHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.