yetanotherbot 4 Share Posted April 2, 2020 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 Hashtag 1 Link to comment Share on other sites More sharing options...
Hashtag 8369 Share Posted April 2, 2020 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); } una_maquina 1 Link to comment Share on other sites More sharing options...
yetanotherbot 4 Author Share Posted April 2, 2020 Nice refinement. Thanks for taking the time to highlight those methods. PS I see you picked up on my C# naming conventions Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now