Jump to content

Problem with crossing wilderness ditch


kani339

Recommended Posts

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