Class DialogueService
- java.lang.Object
-
- net.openosrs.api.service.dialogue.DialogueService
-
@Singleton public class DialogueService extends java.lang.ObjectVisible dialogue actions plus packet-only input resume commands.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDialogueService.Snapshot
-
Constructor Summary
Constructors Constructor Description DialogueService(WidgetService widgets, PacketDispatcher packets)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AmountInputServiceamountInputs()booleancanContinue()voidchoose(int oneBasedIndex)voidchoose(java.lang.String text)voidchoose(SearchResult result)Selects an entry from the item search.booleancontainsText(java.lang.String expected)Match a known speaker/body/header before consuming a delayed dialogue step.voidcontinueDialogue()voidenterAmount(int amount)Submit only an already visible native numeric input.voidenterName(java.lang.String name)voidenterObject(int itemId)booleanhasOption(java.lang.String text)booleanhasOptions()java.util.List<WidgetRef>options()AmountInputService.OperationrequestAmount(int amount, int mode, WidgetRef origin, java.lang.Runnable open, java.lang.String promptWord)Opens X and waits for its own numeric prompt before native submission.java.util.List<SearchResult>searchResults()The entries listed under the open chatbox item search, in the order shown.DialogueService.Snapshotsnapshot()Immutable visible dialogue state for transition checks; no game action.
-
-
-
Constructor Detail
-
DialogueService
@Inject public DialogueService(WidgetService widgets, PacketDispatcher packets)
-
-
Method Detail
-
amountInputs
public AmountInputService amountInputs()
-
requestAmount
public AmountInputService.Operation requestAmount(int amount, int mode, WidgetRef origin, java.lang.Runnable open, java.lang.String promptWord)
Opens X and waits for its own numeric prompt before native submission.
-
canContinue
public boolean canContinue()
-
hasOptions
public boolean hasOptions()
-
snapshot
public DialogueService.Snapshot snapshot()
Immutable visible dialogue state for transition checks; no game action.
-
containsText
public boolean containsText(java.lang.String expected)
Match a known speaker/body/header before consuming a delayed dialogue step.
-
hasOption
public boolean hasOption(java.lang.String text)
-
continueDialogue
public void continueDialogue()
-
options
public java.util.List<WidgetRef> options()
-
choose
public void choose(java.lang.String text)
-
choose
public void choose(int oneBasedIndex)
-
enterAmount
public void enterAmount(int amount)
Submit only an already visible native numeric input. Prefer requestAmount for delayed X.
-
enterName
public void enterName(java.lang.String name)
-
enterObject
public void enterObject(int itemId)
-
searchResults
public java.util.List<SearchResult> searchResults()
The entries listed under the open chatbox item search, in the order shown.
-
choose
public void choose(SearchResult result)
Selects an entry from the item search. With the mouse, the cursor scrolls the list until the entry is on screen before clicking it.
-
-