Jump to content

Stuck in dialogue


Recommended Posts

Posted (edited)

2ldIsLR.png

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 by lisabe96
Posted (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 by lisabe96
Posted

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;
    }
Posted
    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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...