lisabe96 Posted January 22, 2016 Posted January 22, 2016 (edited) if (script.getDialogues().inDialogue()) { if (script.getDialogues().isPendingContinuation()) { script.getDialogues().clickContinue(); break; } } When I log the code, It says that I'm in a dialogue, but not that there's pending continuation. With other words, I'm stuck as it doesn't continue the dialogue. Am I missing something? Edited January 22, 2016 by lisabe96
FrostBug Posted January 22, 2016 Posted January 22, 2016 Sounds like a bug with the continuation method; perhaps the dialogues are different on tutorial island try something like this instead List<RS2Widget> diag = getWidgets().containingText("Click here to continue"); if(!diag.isEmpty()) { diag.get(0).interact(); }
lisabe96 Posted January 22, 2016 Author Posted January 22, 2016 (edited) Sounds like a bug with the continuation method; perhaps the dialogues are different on tutorial island try something like this instead List<RS2Widget> diag = getWidgets().containingText("Click here to continue"); if(!diag.isEmpty()) { diag.get(0).interact(); } It's weird, it sometimes works and sometimes not. Ill try your solution. Edit: Seems to be working this way, thanks! Edited January 22, 2016 by lisabe96
Flamezzz Posted January 22, 2016 Posted January 22, 2016 IsPendingContinuation() returns true iff it finds "to continue" or "please wait..." so your logic is flawed here.
lisabe96 Posted January 22, 2016 Author Posted January 22, 2016 IsPendingContinuation() returns true iff it finds "to continue" or "please wait..." so your logic is flawed here. What do you mean exactly?
demmonic Posted January 22, 2016 Posted January 22, 2016 What do you mean exactly? public boolean isPendingContinuation() { if (this.inDialogue()) { int IIiiiiIiii = this.IIiiiiIiii(IIiiIiIIII); if (IIiiiiIiii > 0) { if(this.widgets.getWidgetContainingText(IIiiiiIiii, new String[]{"to continue", "please wait..."}) != null) { return true; } return false; } List<RS2Widget> matching = this.widgets.containingText(new String[]{"to continue", "please wait..."}); if (matching != null && !matching.isEmpty()) { IIiiIiIIII.add(Integer.valueOf((matching.get(0)).getRootId())); return true; } } return false; }
lisabe96 Posted January 22, 2016 Author Posted January 22, 2016 public boolean isPendingContinuation() { if (this.inDialogue()) { int IIiiiiIiii = this.IIiiiiIiii(IIiiIiIIII); if (IIiiiiIiii > 0) { if(this.widgets.getWidgetContainingText(IIiiiiIiii, new String[]{"to continue", "please wait..."}) != null) { return true; } return false; } List<RS2Widget> matching = this.widgets.containingText(new String[]{"to continue", "please wait..."}); if (matching != null && !matching.isEmpty()) { IIiiIiIIII.add(Integer.valueOf((matching.get(0)).getRootId())); return true; } } return false; } Apparently osbot's logic is flawing then because it doesn't work half of the time, while frostbug's solution does all the time
matt123337 Posted January 23, 2016 Posted January 23, 2016 (edited) Apparently osbot's logic is flawing then because it doesn't work half of the time, while frostbug's solution does all the time No, you're is checking if "please wait" has already been clicked, and if so try to click continue... You're using the wrong method. Edited January 23, 2016 by matt123337
lisabe96 Posted January 23, 2016 Author Posted January 23, 2016 No, you're is checking if "please wait" has already been clicked, and if so try to click continue... You're using the wrong method. Then what's the right one?