Jump to content

Problem with crossing wilderness ditch


Recommended Posts

Posted (edited)

Hello, i just started to getting into scripting for Osbot and faced a problem with crossing wilderness ditch. I searched forums and found couple of solutions but unfortunately none of them worked for me.

So my problem is when script is clicking on cross wilderness there is a pop-up with message  "Enter wilderness" script is waiting for several seconds before clicking on it but unfortuantly it just click again on "cross"

if i test this separately bu just manually clicking on "Cross wilderness" it is working but not all code together.

I would appreciate your help.

Thank you!

 

RS2Widget enterWild = getWidgets().getWidgetContainingText("Enter Wilderness");
RS2Object wildDitch = getObjects().closest("Wilderness Ditch");

if (wildDitch != null && !myPlayer().isAnimating()) {
    wildDitch.interact("Cross");
    sleep(10000);
    if(enterWild != null) {
        log("Enter Wilderness");
        enterWild.interact("Enter Wilderness");
        sleep(8000);
    }
}
Edited by kani339

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