Package rsb.methods

Class MethodProvider

java.lang.Object
rsb.methods.MethodProvider
Direct Known Subclasses:
Account, Bank, Calculations, Camera, Combat, Environment, Equipment, Game, GameGUI, GrandExchange, GroundItems, Interfaces, Inventory, Keyboard, Magic, Menu, Mouse, NPCs, Objects, Players, Prayer, RSCharacter, RSGroundItem, RSItem, RSModel, RSObject, RSPath, RSWidget, RSWidgetItem, Settings, Skills, Store, Tiles, Trade, Walking, Web, WorldHopper

public abstract class MethodProvider extends Object
A class that provides methods that use data from the game client. For internal use.
Author:
GigiaJ
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    random(double min, double max)
    Returns a linearly distributed pseudorandom double.
    int
    random(int min, int max)
    Returns a linearly distributed pseudorandom integer.
    int
    random(int min, int max, int sd)
    Returns a normally distributed pseudorandom integer about a mean centered between min and max with a provided standard deviation.
    int
    random(int min, int max, int mean, int sd)
    Returns a normally distributed pseudorandom integer with a provided standard deviation about a provided mean.
    void
    sleep(int toSleep)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • random

      public int random(int min, int max)
      Returns a linearly distributed pseudorandom integer.
      Parameters:
      min - The inclusive lower bound.
      max - The exclusive upper bound.
      Returns:
      Random integer min (less than or equal) to n (less than) max.
    • random

      public int random(int min, int max, int sd)
      Returns a normally distributed pseudorandom integer about a mean centered between min and max with a provided standard deviation.
      Parameters:
      min - The inclusive lower bound.
      max - The exclusive upper bound.
      sd - The standard deviation. A higher value will increase the probability of numbers further from the mean being returned.
      Returns:
      Random integer min (less than or equal to) n (less than) max from the normal distribution described by the parameters.
    • random

      public int random(int min, int max, int mean, int sd)
      Returns a normally distributed pseudorandom integer with a provided standard deviation about a provided mean.
      Parameters:
      min - The inclusive lower bound.
      max - The exclusive upper bound.
      mean - The mean (greater than or equal to min and less than max).
      sd - The standard deviation. A higher value will increase the probability of numbers further from the mean being returned.
      Returns:
      Random integer min (less than or equal) to n (less than) max from the normal distribution described by the parameters.
    • random

      public double random(double min, double max)
      Returns a linearly distributed pseudorandom double.
      Parameters:
      min - The inclusive lower bound.
      max - The exclusive upper bound.
      Returns:
      Random min (less than or equal) to n (less than) max.
    • sleep

      public void sleep(int toSleep)
      Parameters:
      toSleep - The time to sleep in milliseconds.