Package rsb.methods

Class Environment


public class Environment extends MethodProvider
Bot environment related operations.
Author:
GigiaJ
  • Field Details

  • Constructor Details

  • Method Details

    • setUserInput

      public void setUserInput(int mask)
      Controls the available means of user input when user input is disabled. Disable all: setUserInput(0); Enable keyboard only: setUserInput(Environment.INPUT_KEYBOARD); Enable mouse and keyboard: setUserInput(Environment.INPUT_MOUSE | Environment.INPUT_KEYBOARD);
      Parameters:
      mask - flags indicating which types of input to allow
    • saveScreenshot

      public void saveScreenshot(boolean hideUsername)
      Takes and saves a screenshot.
      Parameters:
      hideUsername - true to cover the player's username; otherwise false
    • takeScreenshot

      public BufferedImage takeScreenshot(boolean hideUsername)
      Takes a screenshot.
      Parameters:
      hideUsername - true to cover the player's username; otherwise false
      Returns:
      The screen capture image.
    • enableRandom

      public boolean enableRandom(String name)
      Enables a random event solver.
      Parameters:
      name - the anti-random's (manifest) name (case insensitive)
      Returns:
      true if random was found and set to enabled; otherwise false
    • disableRandom

      public boolean disableRandom(String name)
      Disables a random event solver.
      Parameters:
      name - the anti-random's (manifest) name (case insensitive)
      Returns:
      true if random was found and set to disabled; otherwise false
    • enableRandoms

      public void enableRandoms()
      Enables all random event solvers.
    • disbleRandoms

      @Deprecated public void disbleRandoms()
      Deprecated.
      Disables all randoms.
    • disableRandoms

      public void disableRandoms()