SCAR Code:
Tree:= BitmapFromString(8, 1, '68783458583D383824' +
'707834485022687834384822586036');
function FindTreeDeformed(var ObjX, ObjY :integer; UpText1, UpText2: String; BMP, a, b, c, d: integer): Boolean;
var
acc, ref : Extended;
var
XT, YT,times,tol : Integer;
begin
ref:=0.9; tol:=0;
for times:=1 to 4 do
begin
FindDeformedBitmapToleranceIn(BMP, XT, YT, a, b, c, d, tol, 2, True, acc);
if (acc >= ref) then
begin
MMouse(XT+8,YT,0,0);
if (IsUpText(UpText1) or IsUpText(UpText2)) then
begin
ObjX:=XT;
ObjY:=YT;
Result := True;
Exit;
end;
end;
ref := ref - 0.1;
tol:=tol+10;
FTWait(1);
end;
end;
//----------------------------------------------------------------------------//
function ChopTree : Boolean;
var CX, CY, RT, ChopTime, StopTime, ChP : Integer;
begin
if ( FindTreeDeformed(CX, CY, 'Tre' , 'ree', Tree, MSX1,MSY1,MSX2,MSY2 )) then
begin
Mouse ( CX+20, CY, 10, 0, True );
FindBirdsNest;
FlagFTWait;
FTWait(4);
if not InChatMulti('wing','axe','ree') then
begin
Result:=False;
Exit;
end;
MarkTime ( ChopTime );
repeat
MarkTime ( StopTime );
FTWait(5);
if ( ChopTime+15000 < StopTime ) then Break;
ChP:=ChP+1;
if FawkiDebug then writeln('Chop pass:'+IntToStr(ChP));
if InChatMulti('adv','atu','ance') then Exit;
until ( InChatMulti('get','log','ogs') );
if InChatMulti('get','log','ogs') then
begin
Result := True;
TreeCount:=TreeCount+1;
end;
end;
end;