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 move the mouse without clicking?


    botslave
     Share

    Recommended Posts

    Hi

     

    I'm just going through the tutorials, making a tea stealer..

     

    I was wondering how to have the mouse move back to the empty tea stall in anticipation for the next steal.

     

    Thanks.

    Link to comment
    Share on other sites

    getMouse.move()

    Should just stay at the same point unless something in your antiban causes it to move the mouse btw.

    Link to comment
    Share on other sites

    You need the Mouse class, do this by #getMouse(). There are many interesting methods to use, so I suggest referring to the API.

    Here is an example of a Mouse anti-ban (sloppy for various reasons) -- the fixed client screen dimensions are 765x503 pixels:

    {
         getMouse().move(new Point(Calculations.random(0, 765), Calculations.random(0, 503)));
    }

    or

    {
         getMouse().move(getGameObjects().getClosest(TEA_STALL_ID).getClickablePoint());
    }
    

    Edit: Read your post wrong. I posted the correct solution above. getClickablePoint() is randomized I believe.

    Edited by ArmyofDragons
    Link to comment
    Share on other sites

    Instead of moving the mouse to a point, do this

    getMouse().move(getGameObjects().getTopObjectOnTile(new Tile(@@@, ###, $$$)));
    

    and fill "@@@, ###, $$$" with the tea stall's coordinates. Now, the mouse will move to a random spot that's still on the stall.

    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.