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);
}
}