Package rs.kreme.ksbot.api.interfaces
Interface Interactable
-
- All Known Implementing Classes:
KSGroundItem,KSItem,KSNPC,KSObject,KSPlayer
public interface Interactable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String[]getActions()default java.awt.geom.Rectangle2DgetClickBounds()Retrieves the clickable screen bounds of the object, if applicable.default intgetOptionIndex(java.lang.String action)Finds the index of a specified action in the NPC's available actions.default booleanhasAction(java.lang.String action)voidinteract(int index)voidinteract(int index, net.runelite.api.MenuAction menuAction)voidinteract(int index, net.runelite.api.MenuAction menuAction, int param0, int param1)booleaninteract(java.lang.String action)voidinteract(net.runelite.api.MenuAction menuAction)
-
-
-
Field Detail
-
ctx
static final KSContext ctx
-
-
Method Detail
-
getActions
java.lang.String[] getActions()
-
interact
boolean interact(java.lang.String action)
-
interact
void interact(int index)
-
interact
void interact(int index, net.runelite.api.MenuAction menuAction, int param0, int param1)
-
interact
void interact(int index, net.runelite.api.MenuAction menuAction)
-
interact
void interact(net.runelite.api.MenuAction menuAction)
-
hasAction
default boolean hasAction(java.lang.String action)
-
getOptionIndex
default int getOptionIndex(java.lang.String action)
Finds the index of a specified action in the NPC's available actions.- Parameters:
action- the name of the action to search for.- Returns:
- the index of the action in the action array, or -1 if not found.
-
getClickBounds
default java.awt.geom.Rectangle2D getClickBounds()
Retrieves the clickable screen bounds of the object, if applicable. Currently supports KSItem instances by delegating to their widget.- Returns:
- the Rectangle2D click bounds, or null if unavailable.
-
-