Log in

View Full Version : -how do i make this loop-



rj
10-17-2011, 11:00 PM
program Autotwc; //by rjj95 aka thehatered
Var
X,Y: Integer;
begin //click tree icon
wait(500);
FindColorTolerance(X,Y,292097,516,0,760,170,3)
wait(200);
movemouse(x, y);
wait(200);
ClickMouse(x, y, Mouse_Left);
wait(2000);
//click tree
FindColorTolerance(X,Y,2839929,7,46,490,305,15)
wait(200);
movemouse(x, y);
wait(300);
ClickMouse(x, y, Mouse_Left);
wait(4500);
//click tinderbox
FindColorTolerance(X,Y,7039862,689,427,721,460,15)
wait(200);
movemouse(x, y);
wait(300);
ClickMouse(x, y, Mouse_Left);
wait(100);
//clicklogs
FindColorTolerance(X,Y,2509932,552,205,732,463,10)
wait(300);
movemouse(x, y);
wait(400);
ClickMouse(x, y, Mouse_Left);
wait(200);
end.

thanks in advanced!

euphemism
10-17-2011, 11:29 PM
The whole thing? Infinitely?:


program Autotwc; //by rjj95 aka thehatered
Var
X,Y: Integer;

procedure CutWood;
begin
//click tree icon

Wait(500);

FindColorTolerance(X, Y, 292097, 516, 0, 760, 170, 3);
Wait(200);
MoveMouse(x, y);
Wait(200);
ClickMouse(x, y, Mouse_Left);
Wait(2000);

//click tree

FindColorTolerance(X, Y, 2839929, 7, 46, 490, 305, 15);
Wait(200);
MoveMouse(x, y);
Wait(300);
ClickMouse(x, y, Mouse_Left);
Wait(4500);

//click tinderbox

FindColorTolerance(X, Y, 7039862, 689, 427, 721, 460, 15);
Wait(200);
MoveMouse(x, y);
Wait(300);
ClickMouse(x, y, Mouse_Left);
Wait(100);


//clicklogs

FindColorTolerance(X, Y, 2509932, 552, 205, 732, 463, 10);
Wait(300);
MoveMouse(x, y);
Wait(400);
ClickMouse(x, y, Mouse_Left);
Wait(200);
end;

begin

repeat
CutWood;
until False;

end.


Fixed some standards.

masterBB
10-17-2011, 11:47 PM
To extent euphemism:

program Autotwc; //by rjj95 aka thehatered
Var
X,Y: Integer;

procedure ClickTreeIcon;
begin
//click tree icon
Wait(500);

FindColorTolerance(X, Y, 292097, 516, 0, 760, 170, 3);
Wait(200);
MoveMouse(x, y);
Wait(200);
ClickMouse(x, y, Mouse_Left);
Wait(2000);
end;

procedure ClickTree;
//click tree

if not(FindColorTolerance(X, Y, 2839929, 7, 46, 490, 305, 15)) then
ClickTreeIcon; //I've added a failsafe
Wait(200);
MoveMouse(x, y);
Wait(300);
ClickMouse(x, y, Mouse_Left);
Wait(4500);
end;

procedure ClickTinderBox;
begin
//click tinderbox

FindColorTolerance(X, Y, 7039862, 689, 427, 721, 460, 15);
Wait(200);
MoveMouse(x, y);
Wait(300);
ClickMouse(x, y, Mouse_Left);
Wait(100);
end;

procedure ClickLogs;
begin
//clicklogs

FindColorTolerance(X, Y, 2509932, 552, 205, 732, 463, 10);
Wait(300);
MoveMouse(x, y);
Wait(400);
ClickMouse(x, y, Mouse_Left);
Wait(200);
end;

begin
ClickTreeIcon; // I gues you only have to do this once?
repeat
ClickTree;
ClickTinderBox;
ClickLogs;
until False;
end.


This is for an old version of runescape?

euphemism
10-18-2011, 12:12 AM
To extent euphemism:

-snip-

This is for an old version of runescape?

Careful, you may start writing the script for him. I think it is for a private server? So I am assuming it is more welcoming of botting.