June 13, 20178 yr 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, 20178 yr by Johnxtrem
June 13, 20178 yr You on tutorial island? Tutorial island is a bit different since I believe you are always in dialogue
June 13, 20178 yr Author 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, 20178 yr by Johnxtrem
June 13, 20178 yr Not 100% sure, havent really editted my tut script in a while. Try sending a space. getKeyboard().typeString(" "); Edited June 13, 20178 yr by k9thebeast
June 13, 20178 yr Author 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...
June 13, 20178 yr Author 3 minutes ago, Juggles said: youre always in dialogue on tut island Hey, I know, but does that mean that clickContinue shoudln't work?
June 13, 20178 yr Author 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, 20178 yr by Johnxtrem
Create an account or sign in to comment