Package org.dreambot.api.randoms
Class RandomSolver
- java.lang.Object
-
- org.dreambot.api.randoms.RandomSolver
-
- All Implemented Interfaces:
java.util.EventListener
,PaintListener
- Direct Known Subclasses:
BankPinConfirmSolver
,BankPinSolver
,BreakSolver
,DeathsDoor
,DismissBankNotificationTutorial
,DismissBankTutorial
,DismissSolver
,GameLayoutSolver
,GenieSolver
,LoginSolver
,RoofDisabler
,WelcomeScreenSolver
public abstract class RandomSolver extends java.lang.Object implements PaintListener, java.util.EventListener
-
-
Constructor Summary
Constructors Constructor Description RandomSolver(java.lang.String eventString)
RandomSolver(RandomEvent event)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
disable()
void
enable()
java.lang.String
getDebugInfo()
This will return state information about the solver useful for debuggingjava.lang.String
getEventString()
int
getMinimumRest()
boolean
isEnabled()
boolean
isForceDisable()
long
lastRan()
void
onFinish()
Runs once at the end (when shouldExecute first returns false); This method can be optionally overriddenabstract int
onLoop()
Runs as long as shouldExecute returns true; This method must be overriddenvoid
onPaint(java.awt.Graphics graphics)
Handles the graphic for the script.void
onPaint(java.awt.Graphics2D graphics)
Handles the graphic for the script.void
onStart()
Runs once when the random solver first activates; This method can be optionally overriddenvoid
setForceDisable(boolean forceDisable)
abstract boolean
shouldExecute()
Checks whether the random even solver should execute; This method must be overridden
-
-
-
Constructor Detail
-
RandomSolver
public RandomSolver(RandomEvent event)
-
RandomSolver
public RandomSolver(java.lang.String eventString)
-
-
Method Detail
-
getDebugInfo
public java.lang.String getDebugInfo()
This will return state information about the solver useful for debugging- Returns:
- state information about the solver
-
shouldExecute
public abstract boolean shouldExecute()
Checks whether the random even solver should execute; This method must be overridden- Returns:
- true as long as the random executor should be executing
-
onStart
public void onStart()
Runs once when the random solver first activates; This method can be optionally overridden
-
onLoop
public abstract int onLoop()
Runs as long as shouldExecute returns true; This method must be overridden- Returns:
- time to delay before next onLoop
-
onFinish
public void onFinish()
Runs once at the end (when shouldExecute first returns false); This method can be optionally overridden
-
getEventString
public java.lang.String getEventString()
-
onPaint
public void onPaint(java.awt.Graphics graphics)
Description copied from interface:PaintListener
Handles the graphic for the script.- Specified by:
onPaint
in interfacePaintListener
- Parameters:
graphics
- The Graphics instance sent from the canvas.
-
onPaint
public void onPaint(java.awt.Graphics2D graphics)
Description copied from interface:PaintListener
Handles the graphic for the script.- Specified by:
onPaint
in interfacePaintListener
- Parameters:
graphics
- The Graphics instance sent from the canvas.
-
disable
public void disable()
-
enable
public void enable()
-
isEnabled
public boolean isEnabled()
-
lastRan
public long lastRan()
-
isForceDisable
public boolean isForceDisable()
-
setForceDisable
public void setForceDisable(boolean forceDisable)
-
getMinimumRest
public int getMinimumRest()
-
-