Class Script

java.lang.Object
org.rspeer.game.script.Script
Direct Known Subclasses:
TaskScript

public abstract class Script extends Object
  • Constructor Details

    • Script

      public Script()
  • Method Details

    • getDataDirectory

      public static Path getDataDirectory()
    • loop

      @Deprecated public int 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

      public boolean isInterruptable(ScriptMeta meta)
      Returns:
      true if a DynamicPassive script can take over the script. For example birdhouses or farm runs. The default return of this method is isSafeToBreak()
    • 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 a DynamicPassive 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)