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
  • Random calculations for anti ban?


    Bladez

    Recommended Posts

    Hey, getting back into scripting after quite some time away from it. Wondering if anyone could tel me why this is throwing an error or if there is a better way to do it?
    compiles fine but throws an error in the console every time it gets triggered.

    I think it could be due to the integers im using for the calculations, i want to move the mouse somewhere randomly between attack and strength on the skills page but im not sure how to do it.
    I just took the mouse position coordinates from the top left of the attack skill box and then took the coordinates from the bottom right of the strength skill box.

    Many TIA

                int min = 1;
                int max = 2;
                int random_int = (int)Math.floor(Math.random()*(max-min+1)+min);
    
            if (random_int == 2){
                if (!Tabs.isOpen(Tab.SKILLS)) {
                    Tabs.open(Tab.SKILLS);
                    Mouse.move(new Point(Calculations.random(551, 213), Calculations.random(610, 269)));
                    sleep(3000, 4800);
                } else {
                    Mouse.move(new Point(Calculations.random(551, 213), Calculations.random(610, 269)));
                    sleep(3000, 5600);
                }
            }

     

    Edited by Bladez
    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
    ×
    ×
    • 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.