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
  • Snippet #1 - Disable Aid Fool!


    yetanotherbot

    Recommended Posts

    Just a little one to get started.

    I couldn't see an obvious native method to disable aid. Hopefully I'm not reinventing the wheel.

    public void DisableAid(){
        if((getPlayerSettings().getConfig(427) & 1) == 1){
            getTabs().open(Tab.OPTIONS);
            WidgetChild aidToggle = getWidgets().getWidgetChild(261, 94);
            if(aidToggle != null){
                log("DisableAid() >> Disabling Aid");
                aidToggle.interact("Toggle Accept Aid");
                sleep(600);
            }
        }
    }

    YAB

    Link to comment
    Share on other sites

    Nice to see a snippet from you! Have a look at my version I made from your's, perhaps you notice some neat things about our API.

        public boolean disableAid(){
            if ((getPlayerSettings().getConfig(427) & 1) == 0)
                return true;
            if (!getTabs().open(Tab.OPTIONS))
                return false;
            WidgetChild aidToggle = getWidgets().getWidgetChild(261, 94);
            return aidToggle != null
                    && aidToggle.isVisible()
                    && aidToggle.interact("Toggle Accept Aid")
                    && sleepUntil(() -> (getPlayerSettings().getConfig(427) & 1) == 0, 2000);
        }

     

    Link to comment
    Share on other sites

    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.