Package net.runelite.api
Interface ScriptEvent
-
public interface ScriptEvent
-
-
Field Summary
Fields Modifier and Type Field Description static int
KEY_CHAR
static int
KEY_CODE
static int
MENU_OP
static int
MOUSE_X
static int
MOUSE_Y
static String
NAME
static int
WIDGET_ID
static int
WIDGET_INDEX
static int
WIDGET_TARGET_ID
static int
WIDGET_TARGET_INDEX
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getMouseX()
Parent relative x coordinate for mouse related eventsint
getOp()
Gets the menu index of the eventString
getOpbase()
Gets the target of the menu optionWidget
getSource()
Gets the widget theWIDGET_ID
andWIDGET_INDEX
args are substituted withint
getTypedKeyChar()
Get the typed character, ascii.int
getTypedKeyCode()
Jagex typed keycodevoid
run()
Executes a cs2 script specified by this event This method must be ran on the client thread and is not reentrantScriptEvent
setSource(Widget widget)
Sets the widget theWIDGET_ID
andWIDGET_INDEX
args are substituted with.
-
-
-
Field Detail
-
MOUSE_X
static final int MOUSE_X
- See Also:
- Constant Field Values
-
MOUSE_Y
static final int MOUSE_Y
- See Also:
- Constant Field Values
-
MENU_OP
static final int MENU_OP
- See Also:
- Constant Field Values
-
WIDGET_ID
static final int WIDGET_ID
- See Also:
- Constant Field Values
-
WIDGET_INDEX
static final int WIDGET_INDEX
- See Also:
- Constant Field Values
-
WIDGET_TARGET_ID
static final int WIDGET_TARGET_ID
- See Also:
- Constant Field Values
-
WIDGET_TARGET_INDEX
static final int WIDGET_TARGET_INDEX
- See Also:
- Constant Field Values
-
KEY_CODE
static final int KEY_CODE
- See Also:
- Constant Field Values
-
KEY_CHAR
static final int KEY_CHAR
- See Also:
- Constant Field Values
-
NAME
static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSource
Widget getSource()
Gets the widget theWIDGET_ID
andWIDGET_INDEX
args are substituted with
-
setSource
ScriptEvent setSource(Widget widget)
Sets the widget theWIDGET_ID
andWIDGET_INDEX
args are substituted with. This is useful for running widget listeners- See Also:
Widget.getOnLoadListener()
-
getOp
int getOp()
Gets the menu index of the event- Returns:
- the index
-
getOpbase
String getOpbase()
Gets the target of the menu option- Returns:
- the target
- See Also:
MenuOptionClicked
-
getMouseX
int getMouseX()
Parent relative x coordinate for mouse related events
-
getTypedKeyCode
int getTypedKeyCode()
Jagex typed keycode- Returns:
-
getTypedKeyChar
int getTypedKeyChar()
Get the typed character, ascii.- Returns:
-
run
void run()
Executes a cs2 script specified by this event This method must be ran on the client thread and is not reentrant
-
-