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 right-click a widget?


    Rubick
     Share

    Recommended Posts

    You're going to have to draw a rectangle based on the widgets bounds then interact with getMouse

     

    Would i use getX and getY? Would I use mouse position coordinates? Sometimes the API isn't clear enough, although that's probably my inexperience showing. Thanks for the help mate, cheers.

    Link to comment
    Share on other sites

    Would i use getX and getY? Would I use mouse position coordinates? Sometimes the API isn't clear enough, although that's probably my inexperience showing. Thanks for the help mate, cheers.

    Okay so once you have your widget what you need to do is make a rectangle based on your widget

     

    First we null check our widget

    if(Widget != null){

    Then we make our rectangle

    Rectangle rect = new Rectangle(Widget.getRectangle().x, Widget.getRectangle().y, Widget.getRectangle().width-1, Widget.getRectangle().height-1);

    now we move our mouse into position

    getMouse().move(rect);

    Now we need to right click, so to right click we use 

    getMouse().click(true);  // true = right click, false = left click

    now this is where it gets interesting, we need to manually click an option that changes depending on where you right click.

    I cant do this part for you because I want you to understand how it's done.

    I'll do some of it underneath but I want you to find the point data.

     

    We need a new point to move the mouse to then we need to move the mouse to that point

    Point point = new Point(getMouse().getX(),getMouse().getY() + ??? ); // how far do we need to go down to select the option you want, collect the point data and add it to this code
    getMouse().move(point);
    getMouse().click(false); // now we use false to left click

    let me know if you get stuck again.

    Edited by Noodle Boy
    Link to comment
    Share on other sites

    Initialise and assign your widget first. In this case I have assigned it to make. Then this is for a right click. Put false instead of true for left click.

     

    getMouse().click(make.getRectangle(), true)

    Link to comment
    Share on other sites

    Okay so once you have your widget what you need to do is make a rectangle based on your widget

     

    First we null check our widget

    if(Widget != null){

    Then we make our rectangle

    Rectangle rect = new Rectangle(Widget.getRectangle().x, Widget.getRectangle().y, Widget.getRectangle().width-1, Widget.getRectangle().height-1);

    now we move our mouse into position

    getMouse().move(rect);

    Now we need to right click, so to right click we use 

    getMouse().click(true);  // true = right click, false = left click

    now this is where it gets interesting, we need to manually click an option that changes depending on where you right click.

    I cant do this part for you because I want you to understand how it's done.

    I'll do some of it underneath but I want you to find the point data.

     

    We need a new point to move the mouse to then we need to move the mouse to that point

    Point point = new Point(getMouse().getX(),getMouse().getY() + ??? ); // how far do we need to go down to select the option you want, collect the point data and add it to this code
    getMouse().move(point);
    getMouse().click(false); // now we use false to left click

    let me know if you get stuck again.

     

     

    Initialise and assign your widget first. In this case I have assigned it to make. Then this is for a right click. Put false instead of true for left click.

     

    getMouse().click(make.getRectangle(), true)

     

    Thank you for the time to explain this out for me, going to give it a shot now! 

    Link to comment
    Share on other sites

    getWidgets().getWidget(162).getChild(15).interact("Private: Show friends");

     

    Straight from the mule script itself. Should still be up to date.

    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.