These should work =] It Uses ATPA's, but it inforces what you taught as well.
These should work based on what you taught us =].
SCAR Code:
program new;
{$i srl\srl.scar}
function Walk_To(Area : Integer) : Boolean;
var
A, X, Y : Integer;
AreaTPA : TPointArray;
AreaATPA : T2DPointArray;
RoadColor : Integer;
begin
RoadColor := Autocolor(Srl_VarrockRoadColor);
MakeCompass('N');
case Area of
1: begin
FindColorsTolerance(AreaTPA, RoadColor, MMX1, MMY1, MMX2, MMY2, 10);
SortTPAFrom(AreaTPA, Point(680, 49));
AreaATPA := TPAtoATPAEx(AreaTPA, 3, 7);
MiddleTPAEx(AreaATPA[0], X, Y);
end;
2: begin
FindColors(AreaTPA, 195836, MMX1, MMY1, MMX2, MMY2) // Searches for the static color in yellow dotz
AreaATPA := SplitTPAEx(AreaTPA, 5, 1);
SortATPASize(AreaATPA, True); // Gets the biggest box, which should be the bankers alligned together.
MiddleTPAEx(AreaATPA[0], X, Y);
end;
end;
Mouse(X, Y, 4, 4, True);
Wait(RandomRange(600, 1000));
if FlagPresent then Flag;
Result := True;
end;
begin
//ClearDebug;
SetupSRL;
Walk_To(1);
Walk_To(2);
end.
SCAR Code:
program L3ARN_FROM_GARRETT;
{$i srl\srl.scar}
function OpenVEBBank : Boolean;
var // No Time Marks were put in :P
A, X, Y : Integer;
TheBankersPoints : TPointArray;
TheBankersBoxs : T2DPointArray; // Heh added something a little extra :P
begin
if not LoggedIn then Exit;
if Random(4) = 1 then ClickNorth(True) else MakeCompass(360);
if FindColorsSpiralTolerance(MSCX, MSCY, TheBankersPoints, {ColorOfBankers}, MSX1, MSY1, MSX2, MSY2, 10) then //Already sorts them from closest to farthest
begin
Writeln('Found Bankers! Length of Banker Points is ' + IntToStr(Length(TheBankersPoints))); // Tells you the amount of points it got.
TheBankersBoxs := SplitTPAEx(TheBankersPoints, 10, 1); // The Bankers stand Horizontally, so a High width and low hieght is probably ideal.
for A := 0 to High(TheBankersBoxs) do
begin
//If we went over Bounds checking we could add that in here.
MiddleTPAEx(TheBankersBoxs[A], X, Y);
MMouse(X, Y, 4, 4);
if WaitUpTextMulti(['anker', 'ooth'], RandomRange(500, 600)) then
begin
Mouse(X, Y, 0, 0, False);
ChooseOptionMulti(['ank Bankers', 'uickly']);
if PinScreen then InPin({Players.Pin or w/e});
if BankScreen then
begin
Result := True;
Exit;
end;
end;
end;
end;
Wait(1);
end;
begin
//ClearDebug;
SetupSRL;
OpenVEBBank;
end.