Jump to content

Help closing 'play now' screen


Alakazizam

Recommended Posts

So SOMETIMES my game takes a minuet to load up after putting in the login info and it seems like the handler stops before selecting the 'play now' button and it just stays stuck.
I tried adding a check to see if the Play Now widget is not visible before running the main part of my script and if it is, interact with it. But it for some reason is not interacting with it. Any advice from you lovely people?

Link to comment
Share on other sites

@Override
    public int onLoop() throws InterruptedException {
        if(getWidgets().get(378, 74) == null || !getWidgets().get(378, 74).isVisible()) {
          
          // my script
          
          } else {
            mouse.click(random(290, 480), random(305, 370), false);
        }
        return 602;
    }

 

I just tried changing the widget interact to a mouse click and its just not doing anything. That particular widget is the "Play Now" button

Link to comment
Share on other sites

35 minutes ago, xcx said:

try logging or printing, Is it the widget not being found?

Try running this, Haven't tested it but it might work

if (getWidgets().getWidgetContainingText("CLICK HERE TO PLAY") != null)
{
// Requires mouse click 
 getWidgets().getWidgetContainingAction("Play").interact("Play");
}

 

Made updates, now we wait lol


Edit:
Still no luck, it's not seeing the widget for some reason.

Edited by Alakazizam
Link to comment
Share on other sites

42 minutes ago, Alakazizam said:

Made updates, now we wait lol


Edit:
Still no luck, it's not seeing the widget for some reason.

are you sure that the code in the onLoop is being reached?

also Explv says disable random events if you overwrite it, Looks like he grabs the PLAY NOW text widget too haven't made my own yet though so can't really help much more

 

Link to comment
Share on other sites

2 hours ago, xcx said:

are you sure that the code in the onLoop is being reached?

also Explv says disable random events if you overwrite it, Looks like he grabs the PLAY NOW text widget too haven't made my own yet though so can't really help much more

 

Yeah it was in the onLoop. I changed it to look for a widget containing "Welcome to Old School RuneScape" and mouse click in the area containing the click here to play button and it seems to be running smoothly. Been semi monitoring it.

Link to comment
Share on other sites

Nevermind. Still hanging up. Last few messages on the log are


[INFO][Bot #1][09/20 02:01:40 AM]: Started random solver : Auto Login
[INFO][Bot #1][09/20 02:01:48 AM]: Successfully logged in, waiting for welcome screen.
[INFO][Bot #1][09/20 02:02:13 AM]: Login completion failed.

Then it runs my onStart but the window is still up to click play and my checks to see if the widgets are there are saying they aren't

Link to comment
Share on other sites

4 hours ago, Alakazizam said:

Nevermind. Still hanging up. Last few messages on the log are


[INFO][Bot #1][09/20 02:01:40 AM]: Started random solver : Auto Login
[INFO][Bot #1][09/20 02:01:48 AM]: Successfully logged in, waiting for welcome screen.
[INFO][Bot #1][09/20 02:02:13 AM]: Login completion failed.

Then it runs my onStart but the window is still up to click play and my checks to see if the widgets are there are saying they aren't

enable -debug when you launch and see if any null errors are being thrown somewhere and not being logged

Link to comment
Share on other sites

2 hours ago, Alakazizam said:

Is this something I can do in OSBot or are you talking about the IDE debug? Can't find a debug option on the client

when you launch add the cli args -debug or --debug can't remember if cli accepts 1 or 2 - 's

 

But I've had troubles in the past where it would print to the debugger for errors instead of the log

  • Like 1
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...