Johnxtrem Posted June 13, 2017 Posted June 13, 2017 (edited) Hey, I'm having issue with dialogs. dialogues.clickContinue(); sometimes just doesn't want to continue the conversation. Its like it doesn't find the widget or something. Here's my code to finish a dialogue. private void FinishDialogue() throws InterruptedException { while (true) { boolean isPending = new ConditionalSleep(6*1000) { @Override public boolean condition() throws InterruptedException { return dialogues.isPendingContinuation(); } }.sleep(); if (isPending) { dialogues.clickContinue(); sleep(650, 1050); continue; } break; } } Any directions to help solve this would be appreciated, thanks! Edited June 13, 2017 by Johnxtrem
k9thebeast Posted June 13, 2017 Posted June 13, 2017 You on tutorial island? Tutorial island is a bit different since I believe you are always in dialogue
Johnxtrem Posted June 13, 2017 Author Posted June 13, 2017 (edited) 2 minutes ago, k9thebeast said: You on tutorial island? Tutorial island is a bit different since I believe you are always in dialogue I am indeed Interesting, I'll check a couple of things then. But what could be the reason just dialogues.clickContinue() doesn't work? Thanks! Edited June 13, 2017 by Johnxtrem
k9thebeast Posted June 13, 2017 Posted June 13, 2017 (edited) Not 100% sure, havent really editted my tut script in a while. Try sending a space. getKeyboard().typeString(" "); Edited June 13, 2017 by k9thebeast
Johnxtrem Posted June 13, 2017 Author Posted June 13, 2017 2 minutes ago, k9thebeast said: Not 100% sure, havent really editted my tut script in a while. Try sending a space. getKeyboard().typeString(" "); I just checked and isPendingContinuation and inDialogue always returns true, so its kinda "annoying" to detect every part when exactly it is done. I've already tried the keyboard method, works but, yeah...
Johnxtrem Posted June 13, 2017 Author Posted June 13, 2017 3 minutes ago, Juggles said: youre always in dialogue on tut island Hey, I know, but does that mean that clickContinue shoudln't work?
Johnxtrem Posted June 13, 2017 Author Posted June 13, 2017 (edited) Solved it like this: private void FinishDialogue() throws InterruptedException { while (IsPendingContinue()) { ClickContinue(); sleep(650, 1050); } } private boolean ClickContinue() { if (!IsPendingContinue()) return false; keyboard.pressKey(32); return true; } private boolean IsPendingContinue() { List<RS2Widget> widgetsList = widgets.getAll().stream().filter (w -> w.getMessage().equals("Click here to continue")).collect(Collectors.toList()); return widgetsList.size() > 0; } Edited June 15, 2017 by Johnxtrem 3