Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Help about Widgets


    jarred788
     Share

    Recommended Posts

    Hello i am trying to interact with the Sawmill operator outside varrock. 

     

    I am able to get to him and click buy-planks from him but when the menu for which logs pop up i cant get past it :(.

     

     

    This is what i got so far. i would appreciate all the help :)

     

     

    getWalking().walk(planktile);

    NPC sawmill = getNpcs().closest(npc -> npc != null && npc.getName().equals("Sawmill operator"));
    if (sawmill.interact("Buy-plank")) ; {

    WidgetChild mill = getWidgets().getWidgetChild(403, 97);
    if (mill != null); {
    if (mill.interact("Buy All")) {

    }
    }

    }

    Link to comment
    Share on other sites

    thanks for this, but it still dosen't interact :(

    if (sawmill.interact("Buy-plank")) ; {
    
    WidgetChild mill = getWidgets().getWidgetChild(403, 97);
    if (mill != null); {
    if (mill.interact("Buy All")) {
    
    }
    }
    
    }
    

    you currently instantly try to find the widget and click buy all if you successfully click Buy planks, maybe move the code outside of the if and check if the interface is open, if it is buy the planks else talk to the guy to open it

    Link to comment
    Share on other sites

    • 3 months later...

    @@Dinh what does this line mean: WidgetChild mill = getWidgets().getWidgetChild(403, 97);, and this one mill, thanks in advance currently developing a construction bot for ultimate ironman mode

    Link to comment
    Share on other sites

    @@Dinh what does this line mean: WidgetChild mill = getWidgets().getWidgetChild(403, 97);, and this one mill, thanks in advance currently developing a construction bot for ultimate ironman mode

    Check out this link: https://dreambot.org/forums/index.php/topic/7901-ciphers-guide-to-using-widgets/?hl=widgets

     

    There's widgets and child widgets

    Link to comment
    Share on other sites

    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
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.