Package org.rspeer.game.script
Class Script
- java.lang.Object
-
- org.rspeer.game.script.Script
-
- Direct Known Subclasses:
TaskScript
public abstract class Script extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Script.State
-
Constructor Summary
Constructors Constructor Description Script()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GameAccount
getAccount()
Break
getBreakProfile()
static Path
getDataDirectory()
com.google.inject.Injector
getInjector()
ScriptMeta
getMeta()
Script.State
getState()
boolean
isInterruptable(ScriptMeta meta)
boolean
isPassiveForceEnabled(ScriptMeta meta)
boolean
isSafeToBreak()
int
loop()
Deprecated.With the existence of tick synchronization, loop scripts are heavily discouraged & haram.void
onFinish()
void
onHighlightTextboxClientScript(ClientScriptEvent event)
For internal use only.void
onSceneUpdate(SceneUpdateEvent event)
void
onStart(com.google.gson.JsonElement args)
void
processArgs(String args)
void
setAccount(GameAccount account)
void
setBreakProfile(Break breakProfile)
void
setState(Script.State state)
void
setState(Script.State state, String args)
-
-
-
Method Detail
-
getDataDirectory
public static Path getDataDirectory()
-
loop
@Deprecated public int loop()
Deprecated.With the existence of tick synchronization, loop scripts are heavily discouraged & haram. The game tick is the core at which RuneScape operates and as such, we should be building our scripts around that. This ensures consistency with data from the game, and smoothness in scripts. Do not use loop!!!
-
isInterruptable
public boolean isInterruptable(ScriptMeta meta)
- Returns:
true
if aDynamicPassive
script can take over the script. For example birdhouses or farm runs
-
isSafeToBreak
public boolean isSafeToBreak()
- Returns:
true
if the player is in a safe state to break. The default behaviour of this method checks if the player is in combat, in an instance or has the bank open.
-
isPassiveForceEnabled
public boolean isPassiveForceEnabled(ScriptMeta meta)
- Returns:
true
if aDynamicPassive
script should run, regardless of if the user has enabled or added it
-
onStart
public void onStart(com.google.gson.JsonElement args)
-
processArgs
public void processArgs(String args)
-
onFinish
public void onFinish()
-
getInjector
public final com.google.inject.Injector getInjector()
-
getState
public Script.State getState()
-
setState
public final void setState(Script.State state)
-
setState
public final void setState(Script.State state, String args)
-
getMeta
public final ScriptMeta getMeta()
-
getAccount
public GameAccount getAccount()
-
setAccount
public void setAccount(GameAccount account)
-
getBreakProfile
public Break getBreakProfile()
-
setBreakProfile
public void setBreakProfile(Break breakProfile)
-
onSceneUpdate
public final void onSceneUpdate(SceneUpdateEvent event)
-
onHighlightTextboxClientScript
public final void onHighlightTextboxClientScript(ClientScriptEvent event)
For internal use only. Closes the bank tutorial interface
-
-