Class ScriptHandle

java.lang.Object
net.botwithus.rs3.game.cs2.ScriptHandle

public final class ScriptHandle extends Object
The ScriptHandle class represents a handle to one of Jagexs CS2 scripts. This class implements the Closeable interface so ensure that the handle is closed upon completion of execution.
See Also:
  • Method Details

    • invokeExact

      public List<ReturnValue> invokeExact(Object... args)
      Executes the Jagex Script with exact arguments, if any arguments do not match what is passed a LayoutMismatchException is thrown.
      Parameters:
      args - the arguments that the Jagex script excepts.
      Returns:
      the values the Jagex script returns
    • invoke

      public List<ReturnValue> invoke(Object... args)
      Executes the Jagex Script with the provided arguments, if any arguments do not match there will be an attempt to convert them to the excepted argument. In any case the attempted conversion fails an LayoutMismatchException is thrown.
      Parameters:
      args - the arguments for the Jagex Script
      Returns:
      the returned values from the Jagex Script