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
  • Check if GE "Collect" widget is visible. Collecting early.


    AliasBots

    Recommended Posts

    Hey all,

    Lately, I've been trying to get my script to collect gold from GE whenever it's ready. If the button is there, I want to click it.

    The problem is, using

    getGrandExchange.collect(); 

    seems to only collect if an order is completely finished.

     

    And looking for the widget leads to it clicking even when the button isn't visible.

    WidgetChild collectButton = getWidgets().getWidgetChild(465, 6, 0);
    if(getGrandExchange().isOpen() && collectButton.isVisible() && collectButton != null){
        collectButton.interact("Collect to inventory");
        log("Item collected..");
    }

    This if statement always ends up as true.

    How can I check if things are ready to collect in the GE before the entire order has finished?

    Thanks for any help.

    Link to comment
    Share on other sites

    The last time I had problems with widgets it was because I didn't put the null check before the isVisible, so you could try that 😛

    besides that Idk how to work around it but gl

    Link to comment
    Share on other sites

    21 minutes ago, depwession said:

    The last time I had problems with widgets it was because I didn't put the null check before the isVisible, so you could try that 😛

    besides that Idk how to work around it but gl

    Thank you, I'll try this.

    Link to comment
    Share on other sites

    • 4 weeks later...

    As a followup, I think I finally figured it out.

    It looks like widget.getTextureID is -1 when not ready, 812 when ready, and 813 when hovered over.

    Either debug tool updates slowly, or it doesn't read as -1 again after collecting unless the exchange is closed and opened.

    Test around a little for bugs but this should help anyone wondering the same thing that I was.

    Link to comment
    Share on other sites

    • 1 year later...

    Archived

    This topic is now archived and is closed to further replies.

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