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 boolean
Detects whether this anti-random should activate.long
Override to provide a time limit in seconds for this anti-random to complete.final void
init
(MethodContext ctx) For internal use only: initializes the method providers.final boolean
isActive()
final boolean
abstract int
loop()
void
onFinish()
final void
void
onStart()
Called after the method providers for this Random become available for use in initialization.final void
final void
setEnabled
(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:
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
Description copied from class:Methods
For 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:
onRepaint
in interfacePaintListener
-