Package rsb.script

Class Random

All Implemented Interfaces:
EventListener, PaintListener
Direct Known Subclasses:
LoginBot

public abstract class Random extends Methods implements PaintListener
  • Field Details

    • i

      public int i
    • up

      public boolean up
  • Constructor Details

    • Random

      public Random()
  • Method Details

    • activateCondition

      public abstract boolean activateCondition()
      Detects whether this anti-random should activate.
      Returns:
      true if the current script should be paused and control passed to this anti-random's loop.
    • loop

      public abstract int loop()
    • onStart

      public void onStart()
      Called after the method providers for this Random become available for use in initialization.
    • onFinish

      public void onFinish()
    • getTimeout

      public long getTimeout()
      Override to provide a time limit in seconds for this anti-random to complete.
      Returns:
      The number of seconds after activateCondition returns true before the anti-random should be detected as having failed. If this time is reached the random and running script will be stopped.
    • init

      public final void init(MethodContext ctx)
      Description copied from class: Methods
      For internal use only: initializes the method providers.
      Overrides:
      init in class Methods
      Parameters:
      ctx - The MethodContext.
    • isActive

      public final boolean isActive()
    • isEnabled

      public final boolean isEnabled()
    • setEnabled

      public final void setEnabled(boolean enabled)
    • run

      public final void run(Script ctx)
    • onRepaint

      public final void onRepaint(Graphics g)
      Specified by:
      onRepaint in interface PaintListener