SCAR Code:
{********************************************************************************
Function TreeWalk(WhatTree: String; x1, y1, x2, y2: Integer) : Boolean;
By: NaumanAkhlaQ
Description: Walks to a tree in a specified area, for use in the MiniMap
Direction: In the string 'WhatTree' the valid arguments are 'RareTree' and 'Tree'
********************************************************************************}
Function TreeWalk(WhatTree: String; x1, y1, x2, y2: Integer) : Boolean;
Var
Tree : array [0..2] of Integer;
i : Integer;
// x,y : Integer;
begin
Tree[0] := 2250789;
Tree[1] := 2315315;
Tree[2] := 2442328;
Begin
Case WhatTree of
'Tree': Begin
For i:= 0 to 2 do
If FindColorSpiralTolerance(x,y,Tree[i],x1,y1,x2,y2,48) then
Begin
Writeln('Tree Found!')
Result:= True;
Exit;
end else
Writeln('Tree Not Found, Exiting');
Exit;
end;
'RareTree' : Begin
If FindSymbolIn(x,y,'Tree',x1,y1,x2,y2) then
Begin
Writeln('Tree Found!')
Result:= True
Exit;
end else
Writeln('Tree Not Found, Exiting');
Exit;
end;
end;
end;
end;
SCAR Code:
If TreeWalk('Tree',603, 38,609, 44) then
SCAR Code:
If TreeWalk('RareTree',605, 31,659, 4) then
SCAR Code:
If TreeWalk('Tree',603, 38,609, 44) then
Begin
Location := Yews;
Mouse(x,y,1,1,true)
end;