Package net.storm.api.interact
Class AutomatedMenu
java.lang.Object
net.storm.api.interact.AutomatedMenu
- All Implemented Interfaces:
Automation
Represents an automated menu interaction that can be queued for execution.
This class encapsulates all the data required to execute a game menu action, whether it's interacting with an NPC, using an item, clicking a game object, or any other right-click menu option. It implements the Builder pattern for convenient construction of menu actions.
The menu entry structure follows the game's internal format with:
option- The action text (e.g., "Attack", "Use", "Talk-to")target- The target entity nameidentifier- Entity-specific identifier (NPC index, object ID, etc.)opcode- TheMenuActiontypeparam0,param1- Additional action parameters
Example usage:
AutomatedMenu menu = AutomatedMenu.builder()
.option("Attack")
.target("Goblin")
.identifier(npcIndex)
.opcode(MenuAction.NPC_SECOND_OPTION)
.param0(0)
.param1(0)
.build();
menu.queue(client);
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
AutomatedMenu
public AutomatedMenu()
-
-
Method Details
-
queue
Queues this automated menu action for execution via the client.This is a convenience method that delegates to
IClient.interact(AutomatedMenu). The action will be processed by the interaction system according to the configuredInteractMethod.- Parameters:
client- the game client to queue the interaction with
-
toString
Returns a string representation of this automated menu for debugging.Includes all relevant parameters: param0, param1, identifier, opcode, option, target, click point, item ID, and world view ID.
-