I'm just trying to make a simple auto clicker for a non-RS game... I have done this before with SCAR numerous times but I am pretty unfamiliar with SIMBA and I don't understand why it's not working. The script compiles, but the mouse goes to the top left of the client and clicks no matter what. It's like the X and Y variables aren't actually working, because I replaced them with fixed coordinates and the mouse worked properly. Help?? Also, I have a few procedures that aren't currently being called, the only procedure I want to make sure is working right now is the 'clicktree' procedure.
UPDATE: Ok so now the mouse no longer goes to the top left of the screen, I just removed the line of code within the clicktree procedure that establishes the X,Y variables. Now, the mouse does everything except move to the actual X and Y coordinates. It clicks and finds the tree, but doesn't actually move.
Code:
program EW;
{$i srl-6/srl.simba}
const
tree=4608;
treenight = 2560;
tar = 3881787;
rock = 1052688;
food = 1318290;
bar= 16777215 ;
var
X1,Y1:Integer;
procedure clicktree;
var X1,Y1:Integer;
begin
if(findcolortolerance(X1,Y1,1471145, 441, 146, 1130, 625,1)) then
writeln('foundtree');
//movemouse(X, Y);
wait(500);
writeln('inbetween');
mouse(X1,Y1,1);
writeln('clicked');
wait(14000);
end;
//if(not(findcolortolerance(x,y,tree, 442, 137, 1159, 672,1))) then
//begin
//writeln('didntfindtree');
//end;
procedure clicktreenight;
var
b,n:integer;
begin
if(findcolortolerance(b,n,treenight,631, 279, 933, 477,1)) then
movemouse(b,n);
wait(14000);
clickmouse(b,n,1);
end;
procedure notcollecting;
var
b,n:integer;
begin
if(not(findcolor(b,n,bar,802, 411,802, 411))) then
wait(500);
end;
begin
repeat
clicktree;
until(false);
end.