Aggghhhh this is doing my head in! I want to check weather my character is currently mining and I plan to do this by checking the colors at the co-ordinate I just clicked to see if they match the ore color (if they don't then there is no ore left in the rock).
So far I have this:
SCAR Code:
program PhetersWestVarrockClayMiner;
{.include SRL/SRL.scar}
var
ClayTPA : TPointArray;
procedure MineClay;
var
i, x, y :integer;
begin
FindColorsSpiralTolerance(MSCx, MSCy, ClayTPA, 5873344, MSx1, MSy1, MSx2, MSy2, 10);
//Click rock from ClayTPA
for i := 0 to High(ClayTPA) do
begin
MMouse (ClayTPA[i].x, ClayTPA[i].y, 2, 2);
if (IsUpTextMultiCustom(['ine', 'ocks'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('Mine');
break;
end;
end;
//Check if Ore is gone
begin
//code that will check if the color at x, y matches the color 5873344 (with tolerance of 10) which is the color that I built ClayTPA from
end;
end;
begin
SetupSRL;
ClearDebug;
MineClay;
end.
Thanks