Jump to content

issues with widgets


Ayylmao420

Recommended Posts

It's hard to go off your word alone when both Explv and myself have working TutIsland scripts relying on the notion of "Click to Continue", and you haven't given us the latest code that's producing the issues you're describing.

    public static RS2Widget getClickToContinueWidget(ScriptContext ctx) {
        return ctx.getWidgets()
                .getAll()
                .stream()
                .filter(f -> f.isVisible() && f.getMessage() != null && (f.getMessage().contains(TEXT_LOOKUP_CLICKHERETOCONTINUE) || f.getMessage().contains(TEXT_LOOKUP_CLICKTOCONTINUE)))
                .findFirst()
                .orElse(null);
    }

 

Edited by NoxMerc
Link to comment
Share on other sites

10 hours ago, NoxMerc said:

It's hard to go off your word alone when both Explv and myself have working TutIsland scripts relying on the notion of "Click to Continue", and you haven't given us the latest code that's producing the issues you're describing.


    public static RS2Widget getClickToContinueWidget(ScriptContext ctx) {
        return ctx.getWidgets()
                .getAll()
                .stream()
                .filter(f -> f.isVisible() && f.getMessage() != null && (f.getMessage().contains(TEXT_LOOKUP_CLICKHERETOCONTINUE) || f.getMessage().contains(TEXT_LOOKUP_CLICKTOCONTINUE)))
                .findFirst()
                .orElse(null);
    }

 

He is trying to explain to you that he does not want the bot to draw a box around the word “Please waiting” he wants the script to sleep when it does not see “Click to Continue”. And the only problem is that OSBot does not have the “Please wait” widget available.

He is a perfectionist. His script already clicks to continue he just wants it to sleep when it doesn’t ask to click. 

I think it’s an anti ban method he is working on for Botting multiple tut island accounts.

Link to comment
Share on other sites

There's already a method that'll find widgets containing text. Try it:

public boolean isContinueWidgetVisible() {
	List<RS2Widget> l = widgets.containingText("Click here to continue", "Click to continue");
	return l != null && !l.isEmpty();
}

Then you could do something like:

ConditionalSleep sleepyTime;

if (isContinueWidgetVisible()) { // can we continue?
	
	if (keyboard.typeString(" ", false)) { // k let's try press space bar (false = no pressy enter!)
		
		sleepyTime = new ConditionalSleep(5000) { // k now lets create new conditional sleep
			
			@Override
			public boolean condition() throws InterruptedException {
				return !isContinueWidgetVisible();
			}
		};
		
		// k now let's see if sleepy wakes up
		if (sleepyTime.sleep()) {
			// yay interface went away!
		}
	}
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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