Bladez 0 Share Posted May 9, 2022 (edited) 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 May 9, 2022 by Bladez Link to comment Share on other sites More sharing options...
Bladez 0 Author Share Posted May 9, 2022 Nevermind, just realised what i needed to do. All sorted now! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now