Class Script
java.lang.Object
org.rspeer.game.script.Script
- Direct Known Subclasses:
TaskScript
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Pathfinal com.google.inject.Injectorfinal ScriptMetagetMeta()getState()booleanisInterruptable(ScriptMeta meta) booleanbooleanintloop()Deprecated.With the existence of tick synchronization, loop scripts are heavily discouraged invalid input: '&' haram.voidonFinish()voidonStart(com.google.gson.JsonElement args) voidprocessArgs(String args) voidsetAccount(GameAccount account) voidsetBreakProfile(Break breakProfile) final voidsetState(Script.State state) final voidsetState(Script.State state, String args)
-
Constructor Details
-
Script
public Script()
-
-
Method Details
-
getDataDirectory
-
loop
Deprecated.With the existence of tick synchronization, loop scripts are heavily discouraged invalid input: '&' 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!!!- See Also:
-
isInterruptable
- 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
- 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
-
onFinish
public void onFinish() -
getInjector
public final com.google.inject.Injector getInjector() -
getState
-
setState
-
setState
-
getMeta
-
getAccount
-
setAccount
-
getBreakProfile
-
setBreakProfile
-