Interaction Results
InteractionResult is the common return type for new mutating action APIs. It keeps legacy wrappers usable while giving new code enough detail to decide whether to retry, wait, or abort.
Core fields:
status: machine-readableInteractionStatus.message: short human-readable explanation.targetTypeandtargetName: the target that was searched or acted on.requestedAction: cleaned action name or list of requested actions.actionIndex: RuneLite menu action index when one was resolved.availableActions: cleaned actions seen on the target.
Example:
InteractionResult result = NPCActions.interact("Banker", "Bank");
if (result.failed()) {
log.debug("{} target={} action={}",
result.getStatus(),
result.getTargetName(),
result.getRequestedAction());
}
Status guidance:
TARGET_NOT_FOUND: collection query did not locate a target.TARGET_NULL: caller passed a null direct target.ACTION_NOT_FOUND: target existed but did not expose the requested action.WIDGET_NOT_FOUNDorWIDGET_HIDDEN: widget-specific target problems.BANK_NOT_OPEN: bank-only action was called when bank UI was unavailable.MOVEMENT_NOT_QUEUEDorPACKET_NOT_QUEUED: low-level queueing failed.
Use succeeded() and failed(); do not compare messages.
InteractionApi Execution Pipeline
Mutating action methods return a structured InteractionResult. The exact
guards and target-resolution steps vary by action; the diagram below is a
representative target interaction, not a required implementation order for
every action class.