Jump to content

Issue with dialogue continuation


Recommended Posts

I can't find anything on the API to simplify NPC dialogue continuation.

Here's a snippet, which flags an error on the last line.

selectOption doesn't allow for multiple entries, I guess?

	private void buy() {
		if (!BEER_AREA.contains(getAPIContext().localPlayer().getLocation())) {
			getAPIContext().webWalking().walkTo(BEER_AREA.getCentralTile());
		} else if (!isActioning()) {
			final NPC camarst = getAPIContext().npcs().query().nameContains("Camarst").results().nearest();
			if (camarst != null) {
				camarst.interact("Talk-to");
				Time.sleep(5_000, () -> getAPIContext().dialogues().isDialogueOpen());
	            String[] options = new String[]{"Click here to continue",
	                    "Got anything strong to drink?"};
	            getAPIContext().dialogues().selectOption(options);
			}
		}
	}

 

Link to comment
Share on other sites

2 hours ago, lol_marcus said:

I can't find anything on the API to simplify NPC dialogue continuation.

Here's a snippet, which flags an error on the last line.

selectOption doesn't allow for multiple entries, I guess?



	private void buy() {
		if (!BEER_AREA.contains(getAPIContext().localPlayer().getLocation())) {
			getAPIContext().webWalking().walkTo(BEER_AREA.getCentralTile());
		} else if (!isActioning()) {
			final NPC camarst = getAPIContext().npcs().query().nameContains("Camarst").results().nearest();
			if (camarst != null) {
				camarst.interact("Talk-to");
				Time.sleep(5_000, () -> getAPIContext().dialogues().isDialogueOpen());
	            String[] options = new String[]{"Click here to continue",
	                    "Got anything strong to drink?"};
	            getAPIContext().dialogues().selectOption(options);
			}
		}
	}

 

https://epicbot.com/javadocs/

Look for dialogue api again

Edited by Proto
Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...