Guys, I'm planning to use TPA's and T2dPointArrays to find my iron rocks.
this is my "part of the script for finding the rocks" Can you guys tell me What i do next, and how I can now put this into my script?
SCAR Code:
function Findores:boolean;
var
tx,ty,i: integer;
IronPoints: TpointArray;
Iron2D : T2DPointArray;
Ironpoint : Tpoint;
begin
if not LoggedIn then Exit;
x:=MSCX;
y:=MSCY;
begin
FindColorsSpiralTolerance(x,y,IronPoints,3030370,MSX1,MSY1,MSX2,MSY2,10);
Iron2D:= TPAtoATPAEx(IronPoints,30,30);
for i:= 0 to length(Iron2D)-1 do
begin
if not LoggedIn then
begin
break;
end;
IronPoint:= MiddleTPA(Iron2D[i]);
tx:= IronPoint.X;
ty:= IronPoint.Y;
MMouse(tx,ty,2,2);
wait(90+ random(45));
if isuptext('ine')then
begin
GetMousePos(x,y);
OreColor:= GetColor(tx,ty);
MineIron:= true;
result:= true;
break;
exit;
end;
end;
end;
end;