Package org.rsbot.script.task

Examples of org.rsbot.script.task.LoopTask


    return Collections.unmodifiableMap(getTasks());
  }


  public void pauseScript(final int id) {
    final LoopTask s = getTasks().get(id);
    s.setPaused(!s.isPaused());
    if (s instanceof Script) {
      if (s.isPaused()) {
        ((Script) s).onPause();
      } else {
        ((Script) s).onResume();
      }
    }
    if (s.isPaused()) {
      for (final ScriptListener l : listeners) {
        l.scriptPaused(this);
      }
    } else {
      for (final ScriptListener l : listeners) {
        l.scriptResumed(this);
      }
    }
    for (final Map.Entry<Integer, LoopTask> lt : getTasks().entrySet()) {
      lt.getValue().setPaused(s.isPaused());
    }
  }
View Full Code Here


      lt.getValue().setPaused(s.isPaused());
    }
  }

  public void stopScript(final int id) {
    final LoopTask script = getTasks().get(id);
    if (script != null) {
      script.stop();
      remove(id);
      notifyStop();
    }
  }
View Full Code Here

TOP

Related Classes of org.rsbot.script.task.LoopTask

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.