Package rsb.script
Class Random
java.lang.Object
rsb.methods.Methods
rsb.script.Random
- All Implemented Interfaces:
EventListener,PaintListener
- Direct Known Subclasses:
LoginBot
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanDetects whether this anti-random should activate.longOverride to provide a time limit in seconds for this anti-random to complete.final voidinit(MethodContext ctx) For internal use only: initializes the method providers.final booleanisActive()final booleanabstract intloop()voidonFinish()final voidvoidonStart()Called after the method providers for this Random become available for use in initialization.final voidfinal voidsetEnabled(boolean enabled)
-
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:
trueif 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
truebefore the anti-random should be detected as having failed. If this time is reached the random and running script will be stopped.
-
init
Description copied from class:MethodsFor internal use only: initializes the method providers. -
isActive
public final boolean isActive() -
isEnabled
public final boolean isEnabled() -
setEnabled
public final void setEnabled(boolean enabled) -
run
-
onRepaint
- Specified by:
onRepaintin interfacePaintListener
-