Skip to main content

Utility Event Actions

UtilityEventActions collects Eternal-style one-shot utility actions that are safe to expose without credential handling.

Methods

  • dropAll(int... itemIds) - drops every matching inventory item ID.
  • toggleRun() / toggleRun(boolean) - clicks the run orb. The boolean overload currently dispatches the same toggle because the stable state check is layout/client dependent.
  • toggleAcceptAid(boolean) - fails closed with FAILED; this is exposed as an explicit unsupported boundary until a stable settings widget path is verified.
  • logout() - clicks the logout button when visible.

Behavior notes:

  • dropAll validates null/empty input before touching inventory state.
  • Utility methods are result-aware and reuse existing InteractionStatus values.

Drop Cleanup Items

Use dropAll for low-value cleanup when every matching stack should be dropped. The method returns the last successful drop result, or a failure if no matching items were found.

InteractionResult result = UtilityEventActions.dropAll(995, 1925); // coins, bucket
if (result.failed()) {
log.debug("Drop cleanup skipped: {}", result.getMessage());
}

Run Toggle Boundary

The boolean overload is exposed for compatibility, but it currently queues the same run-orb toggle as toggleRun(). Only call it when your caller has already decided a toggle is appropriate.

if (shouldStartRunning()) {
InteractionResult result = UtilityEventActions.toggleRun(true);
if (result.failed()) {
log.debug("Run toggle failed: {}", result.getMessage());
}
}

Unsupported Settings

toggleAcceptAid(...) currently fails closed. Keep that failure explicit instead of silently assuming the setting changed.

InteractionResult result = UtilityEventActions.toggleAcceptAid(false);
if (result.failed()) {
log.debug("Accept Aid remains manual: {}", result.getMessage());
}