java.lang.Object
net.botwithus.rs3.game.cs2.ScriptBuilder
ScriptBuilder allows you to create a handle or a descriptor representing a Jagex Client Script (CS2)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionSets the arguments the script takesid
(int id) Sets the script idInvokes a Jagex CS2 ScriptinvokeExact
(Object... args) Invokes the Jagex CS2 Script.static ScriptBuilder
of
(int id) Creates a newScriptBuilder
with the given idstatic ScriptHandle
ofVoid
(int id) Creates a script handle with no arguments and returnsSets the returned values of the script
-
Method Details
-
id
Sets the script id- Parameters:
id
- the ID of the script- Returns:
- the builder
-
args
Sets the arguments the script takes- Parameters:
args
- the arguments for the script- Returns:
- the builder
- See Also:
-
returns
Sets the returned values of the script- Parameters:
returns
- the return values of the script- Returns:
- the builder
- See Also:
-
invokeExact
Invokes the Jagex CS2 Script.Note: This function will throw a
LayoutMismatchException
if any of the layout do not match the passed arguments- Parameters:
args
- the arguments excepted by the CS2 Script- Returns:
- the values returned by the CS2 script
-
invoke
Invokes a Jagex CS2 ScriptNote: If any arguments are passed that mismatch the layout, then the argument will try and be converted to the layout, if for whatever reason it cannot be converted it will throw a
LayoutMismatchException
- Parameters:
args
- the arguments excepted by the CS2 Script- Returns:
- the values returned by the CS2 script
-
ofVoid
Creates a script handle with no arguments and returns- Parameters:
id
- the ID of the script- Returns:
- the newly created
ScriptHandle
-
of
Creates a newScriptBuilder
with the given id- Parameters:
id
- the id of the script- Returns:
- the
ScriptBuilder
-