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
  • How to check and set zoom to default?


    jazberry
     Share

    Recommended Posts

    Having a noob struggle trying to auto check/set zoom to default.

    First I tried...

     

    if( getClientSettings().getZoomValue() != 50) {

    getClientSettings().setDefaultZoom();

    }

     

    But getZoomValue always returns 50 no matter what. So then I tried ...

     

    if( getClientSettings().getExactZoomValue() != 512) {

    getClientSettings().setDefaultZoom();

    }

     

    This at least made it inside the IF when zoom wasn't default, but 

     

    getClientSettings().setDefaultZoom();

     

    doesn't seem to do anything. I even tried opening the options tab before calling it and still nothing.

     

    What am I doing wrong?

    Link to comment
    Share on other sites

    Ah ok. Thanks.

     

    I came up with this as a workaround.

     

    if( getClientSettings().getExactZoomValue() != 512) {
       if(!getTabs().isOpen(Tab.OPTIONS)) {
          getTabs().openWithMouse(Tab.OPTIONS);
          sleep(400,800);
       }
       getMouse().click(new Point (Calculations.random(562,581),Calculations.random(267,283)),true);
       sleep(400,800);
       getClient().getMenu().clickAction("Restore Default Zoom");
    }
    

    If there's anything simpler, let me know.

    Link to comment
    Share on other sites

     

    Ah ok. Thanks.

     

    I came up with this as a workaround.

     

    if( getClientSettings().getExactZoomValue() != 512) {
       if(!getTabs().isOpen(Tab.OPTIONS)) {
          getTabs().openWithMouse(Tab.OPTIONS);
          sleep(400,800);
       }
       getMouse().click(new Point (Calculations.random(562,581),Calculations.random(267,283)),true);
       sleep(400,800);
       getClient().getMenu().clickAction("Restore Default Zoom");
    }
    

    If there's anything simpler, let me know.

     

     

    Use widgets for  clicking the default zoom icon/button thingy.

    Link to comment
    Share on other sites

    Didn't even notice widgets. lol Ty!

     

    In case anyone ever searches. Here's what I ended up with.

    if(getClientSettings().getExactZoomValue() != 512) {
       if(!getTabs().isOpen(Tab.OPTIONS)) {
          getTabs().openWithMouse(Tab.OPTIONS);
       }
       getWidgets().getWidgetChild(261,4).interact("Restore Default Zoom");
    }
    
    Edited by jazberry
    Link to comment
    Share on other sites

    • 4 weeks later...

    update: 

    if( getClientSettings().getExactZoomValue() != 512)
    

    This condition is always returning false, as getExactZoomValue() always returns 512. Hopefully, the API can be fixed in the future.

    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.