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


    Rubick

    Recommended Posts

    Posted

    Maybe it's a tab, or widgets works too. But I'm trying to select the "Public" option, from "Friends" private chat.

    Posted

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

    Posted

    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.

    Posted

    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.

    Posted

    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)

    Posted

    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! 

    Posted

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

     

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

    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.