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
A class that provides methods that use data from the game client. For
internal use.
- Author:
- GigiaJ
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublerandom(double min, double max) Returns a linearly distributed pseudorandomdouble.intrandom(int min, int max) Returns a linearly distributed pseudorandom integer.intrandom(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.intrandom(int min, int max, int mean, int sd) Returns a normally distributed pseudorandom integer with a provided standard deviation about a provided mean.voidsleep(int toSleep)
-
Field Details
-
methods
-
-
Constructor Details
-
MethodProvider
-
-
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 pseudorandomdouble.- 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.
-