schmidt73
2013-03-22 12:46:54
I would like to add a random event solver into my code, so I could cut magic trees essentially forever. There is no bank requires because on this private server whenever you cut down a tree instead of getting logs you get points. There is only one random event and it requires you to click on a portal and leave. It happens about once a hour and although my bot works well without it I would like to know how to solve a random event and it would help me to bot overnight.
program PkHonor;
{$i srl/srl.simba}
const
LOGS = 100;
Procedure ClickTree;
var
X,Y:Integer;
begin
repeat
if FindColorTolerance(X, Y, 14678264, 1, 5, 760, 502, 1) or
FindColorTolerance(X, Y, 12187896, 1, 5, 760, 502, 1)then
begin
mmouse(x, y,1,1);
wait(250);
ClickMouse(X, Y, mouse_Left)
wait(10000+random(5000));
end;
until (LOGS > 100);
end;
Begin
SetupSRL;
MouseSpeed := 30;
ClickTree;
end.