lol_marcus Posted April 23, 2021 Share Posted April 23, 2021 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); } } } Quote Link to comment Share on other sites More sharing options...
Proto Posted April 23, 2021 Share Posted April 23, 2021 (edited) 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 April 23, 2021 by Proto Quote Link to comment Share on other sites More sharing options...
Eitlaek Posted July 25, 2022 Share Posted July 25, 2022 Yes, you would want to get options[0] or options[1] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.