Just made my first TPA/ATPA function thanks to NKN's tut! It works pretty well, getting to the correct spot after ~2-3 mouse movements, ill just have to adjust the color to fix that, but I was wondering If I had formatted everything correctly, and if I did it how its supposed to be done.
Simba Code:
program ATPATesting;
{$i srl/srl.simba}
var
x, y:integer;
Function FindBankCustom(var x, y:integer):boolean;
var
Sex, SeY, i, Counter:Integer;
BankTPA:TPointArray;
BankATPA : T2DPointArray;
begin
FindColorsSpiralTolerance(SeX, SeY, BankTPA, 4412773, MSX1, MSY1, MSX2 - 10, MSY2, 12);
BankATPA := SplitTPA(BankTPA, 8);
for i := 0 to high(BankATPA) do
begin
if MiddleTPAEX(BankATPA[i], SeX, SeY) then
Mmouse(SeX, SeY, 3, 3);
wait(randomrange(150, 400));
if IsUptextMultiCustom(['Bank Bank', 'Bank ban', 'ank Ban']) then
begin
writeln('Bank found!');
x := SeX;
y := SeY
Result := true;
Exit;
end;
end;
end;
begin
SetupSRL
FindBankCustom(x, y);
Clickmouse2(mouse_left);
end.