Jump to content

Bank pin solver not working


Recommended Posts

I'm trying to debug my script.

getBank.open()

log("next step")

This is my entire script, its located in the "loop" section.

The script clicks on the banker, opens the PIN interface then, the log comes up. After some time I get

Script exeecutor is taking too long to suspend; restarting now...." "Shutting down script background executors"

Then the bank pin solver starts and CORRECTLY ENTERS THE PIN. Followed by

"Terminated script my script"

 

I can't for the life of me figure out what the heck is happening. The back pin solver is "working" but will never work while my script is running.

when I wait for  the bank to open, the solver never comes up.

Does anyone know what is happening here? I have also tried a conditional wait for the bank to be open and I get similar strange behavior. Thanks!

Edited by driedApricots
Link to comment
Share on other sites

Use this:

    public boolean sleeped(String text, int timeout, BooleanSupplier condition) {
        return new ConditionalSleep(timeout) {
            @Override
            public boolean condition() throws InterruptedException {
                return condition.getAsBoolean();
            }
        }.sleep();
    }

 

 

and in your script:

 

if (getBank().isOpen()) {
log("Bank is currently open");
return random(800, 1400);
}
log("Attempting to open bank...");
if (!getBank().open()) {
log("...didn't open bank, try again...");
return random(800, 1400);
}
boolean didSucceed = sleeped("Wait up to 10s for bank to open", 10000, () -> getBank().isOpen();
if (!didSucceed) {
log("Waited the whole 10 seconds and bank didn't open...");
return 600;
}
log("Bank successfully opened");
return 600;
 

Link to comment
Share on other sites

  • 1 month later...

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...