dontpanic
2007-02-17 20:49:30
This kindof works, however it sometimes clicks the wrong pheasent. It usually works though.
{.include srl/srl.scar}
var
ff1,ff2,ff3,ff4:integer;
procedure SetupFf;
begin
ff1:= DTMFromString('78DA633465606038C18002164F6E64E002D28' +
'C503EA32490380561B341C5A4BD9D51D518018993A86A0AFDA551' +
'D400008F090647');
ff2:=DTMFromString('78DA63BCC7C0C020CA8002125C2418B880342' +
'394CF7817484841D86C50B1FA2805543527818408AA1A511B3314' +
'35004A9A0534');
ff3:= DTMFromString('78DA635CC8C8C0E0C58002164F6E64E002D28' +
'C503EE34A20CB07C266C3A5663590E589AA26D34B1A55CD1220CB' +
'0C558D90A1368A1A00F1DB089F');
ff4:=DTMFromString('78DA63EC626460D0076224B07872230317908' +
'68932B6005986101E1B2E358D40963901354D40960901350D4096' +
'1D116AAC08A8990164B9A0AA91F67646510300C50D10AA');
end;
function FindForester2:boolean;
begin
Result:=FindObj(x,y,'eaky',608105,5);
end;
function FindNumbText(Text:string):boolean;
begin
Result:=FindText(x,y,Text,npcChars,379, 364,504, 423);
end;
function Forester:boolean;
var
dtmtouse,ffMark:longint;
begin
if(not(FindForester2)) then Exit;
WriteLn('Found Freaky Forester, trying to solve');
Result:=True;
MarkTime(ffMark);
repeat
FindForester2;
Mouse(x,y,0,0,true);
Flag;
wait(700+random(1000));
dtmtouse:=-1;
if(TimeFromMark(ffMark)>120000 ) then begin
writeln('Error solving!!!');
Logout;
Exit;
end;
WriteLn('Checking for number');
if(FindNumbText('one')) then dtmtouse:=ff1;
if(FindNumbText('two')) then dtmtouse:=ff2;
if(FindNumbText('three')) then dtmtouse:=ff3;
if(FindNumbText('four')) then dtmtouse:=ff4;
until not (dtmtouse=-1);
writeln('Found a number');
MarkTime(ffMark);
repeat
repeat
wait(100);
if(TimeFromMark(ffMark)>120000 ) then begin
writeln('Error solving!!!');
Logout;
Exit;
end;
until(FindMSDtm(x,y,dtmtouse));
Mouse(x,y,0,0,false);
wait(10+random(50));
until ClickOption('Attack',1);
Flag;
wait(6000+random(1000));
FindObj(x,y,'Take',2971261,10);
ClickMouse(x,y,true);
wait(100);
Flag;
wait(500+random(500));
Mouse(593, 80,1,1,true);
Flag;
wait(1000+random(100));
Mouse(660, 84,1,1,true);
Flag;
wait(1000+random(100));
repeat
FindForester2;
Mouse(x,y,0,0,false);
wait(100+random(100));
if(TimeFromMark(ffMark)>120000 ) then begin
writeln('Error solving!!!');
Logout;
Exit;
end;
until ClickOption('Talk',1);
Flag;
wait(1000+random(1000));
{MMouse(272, 448,1,30);
wait(300+random(100));
repeat
Mouse(272, 448,1,30,true);
wait(1000+random(500));
until(not(FindColor(x,y,275, 444,499, 459,16777215)));
} Mouse(710, 76,2,2,true);
Flag;
wait(1000+random(1000));
repeat
wait(100);
until FindObj(x,y,'Portal',11264995,10);
Mouse(x,y,0,0,true);
wait(3000+random(1000));
WriteLn('Solved Forester!');
end;
begin
SetupSRL;
SetupFf;
ActivateClient;
wait(100);
BenMouse:=False;
Forester;
end.