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 classScript.State
-
Constructor Summary
Constructors Constructor Description Script()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GameAccountgetAccount()BreakgetBreakProfile()static PathgetDataDirectory()com.google.inject.InjectorgetInjector()ScriptMetagetMeta()Script.StategetState()booleanisInterruptable(ScriptMeta meta)booleanisPassiveForceEnabled(ScriptMeta meta)booleanisSafeToBreak()intloop()Deprecated.With the existence of tick synchronization, loop scripts are heavily discouraged & haram.voidonFinish()voidonHighlightTextboxClientScript(ClientScriptEvent event)For internal use only.voidonMouseDataUpdate(SceneUpdateEvent event)voidonStart(com.google.gson.JsonElement args)voidprocessArgs(String args)voidsetAccount(GameAccount account)voidsetBreakProfile(Break breakProfile)voidsetState(Script.State state)voidsetState(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:
trueif aDynamicPassivescript can take over the script. For example birdhouses or farm runs. The default return of this method isisSafeToBreak()
-
isSafeToBreak
public boolean isSafeToBreak()
- Returns:
trueif 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:
trueif aDynamicPassivescript 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)
-
onMouseDataUpdate
public final void onMouseDataUpdate(SceneUpdateEvent event)
-
onHighlightTextboxClientScript
public final void onHighlightTextboxClientScript(ClientScriptEvent event)
For internal use only. Closes the bank tutorial interface
-
-