diff --git a/runelite-api/src/main/java/net/runelite/api/ScriptArguments.java b/runelite-api/src/main/java/net/runelite/api/ScriptArguments.java
new file mode 100644
index 0000000000..c3e89f56a4
--- /dev/null
+++ b/runelite-api/src/main/java/net/runelite/api/ScriptArguments.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2019 Abex
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.runelite.api;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.SOURCE)
+@Documented
+@Target(ElementType.FIELD)
+@interface ScriptArguments
+{
+ /**
+ * The number of int arguments the script takes
+ */
+ int integer() default 0;
+
+ /**
+ * The number of string arguments the script takes
+ */
+ int string() default 0;
+}
diff --git a/runelite-api/src/main/java/net/runelite/api/ScriptID.java b/runelite-api/src/main/java/net/runelite/api/ScriptID.java
index 355aa5cffa..671c0c4e23 100644
--- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java
+++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java
@@ -34,6 +34,7 @@ public final class ScriptID
*
int how far down to scroll
*
*/
+ @ScriptArguments(integer = 3)
public static final int UPDATE_SCROLLBAR = 72;
/**
@@ -43,11 +44,13 @@ public final class ScriptID
* String Message to send
*
*/
+ @ScriptArguments(integer = 1, string = 1)
public static final int CHATBOX_INPUT = 96;
/**
* Rebuilds the chatbox
*/
+ @ScriptArguments()
public static final int BUILD_CHATBOX = 216;
/**
@@ -58,6 +61,7 @@ public final class ScriptID
* String Player to send private message to
*
*/
+ @ScriptArguments(string = 1)
public static final int OPEN_PRIVATE_MESSAGE_INTERFACE = 107;
/**
@@ -66,6 +70,7 @@ public final class ScriptID
* String Message Prefix. Only used inside the GE search interfaces
*
*/
+ @ScriptArguments(string = 1)
public static final int CHAT_TEXT_INPUT_REBUILD = 222;
/**
@@ -73,6 +78,7 @@ public final class ScriptID
*
* Takes 13 widget ids of various parts of the bank interface
*/
+ @ScriptArguments(integer = 17)
public static final int BANK_LAYOUT = 277;
/**
@@ -82,17 +88,20 @@ public final class ScriptID
* int (boolean) Restore to chat view
*
*/
+ @ScriptArguments(integer = 2)
public static final int RESET_CHATBOX_INPUT = 299;
/**
* Readies the chatbox panel for things like the chatbox input
* Inverse of RESET_CHATBOX_INPUT
*/
+ @ScriptArguments(integer = 1)
public static final int CLEAR_CHATBOX_PANEL = 677;
/**
* Builds the chatbox input widget
*/
+ @ScriptArguments()
public static final int CHAT_PROMPT_INIT = 223;
/**
@@ -103,19 +112,21 @@ public final class ScriptID
* String Item Name
*
*/
+ @ScriptArguments(integer = 2, string = 1)
public static final int DEATH_KEEP_ITEM_EXAMINE = 1603;
/**
* Checks the state of the given stash unit.
*
* - int (loc) The stash unit object id
- * - int Bitpacked stash unit states
- * - int Bitpacked stash unit states 2
- * - int Bitpacked stash unit states 3
+ * - int Bitpacked stash unit states
+ * - int Bitpacked stash unit states 2
+ * - int Bitpacked stash unit states 3
*
*
* Returns a pair of booleans indicating if the stash unit is built and if it is filled
*/
+ @ScriptArguments(integer = 4)
public static final int WATSON_STASH_UNIT_CHECK = 1479;
/**
@@ -128,6 +139,7 @@ public final class ScriptID
* int (QuestState) the normalized state of the quest
*
*/
+ @ScriptArguments(integer = 1)
public static final int QUESTLIST_PROGRESS = 2267;
/**
@@ -137,6 +149,7 @@ public final class ScriptID
* int Number of lines
*
*/
+ @ScriptArguments(integer = 2)
public static final int DIARY_QUEST_UPDATE_LINECOUNT = 2523;
/**
@@ -148,6 +161,7 @@ public final class ScriptID
* int Reset zoom position
*
*/
+ @ScriptArguments(integer = 2)
public static final int CAMERA_DO_ZOOM = 42;
/**
@@ -156,11 +170,13 @@ public final class ScriptID
* This is used to eat events when you want a menu action attached to it
* because you need an op listener attached to it for it to work
*/
+ @ScriptArguments()
public static final int NULL = 10003;
/**
* Send a private message.
*/
+ @ScriptArguments(string = 2)
public static final int PRIVMSG = 10004;
/**
@@ -171,5 +187,6 @@ public final class ScriptID
* int Amount of exp to drop
*
*/
+ @ScriptArguments(integer = 2)
public static final int XPDROP_DISABLED = 2091;
}