King
2013-03-31 11:05:08
function for the life of me will not find the uptext period >.< Is it broken?
My code:
My debug box (so you know it is finding the color):

Debug says, could not find rock, which means that it isn't finding the uptext after finding the color, how do I fix this? :P
My code:
function FindRocks: Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
I, X, Y: Integer;
R: TPoint;
begin
FindNormalRandoms;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.03, 0.24);
if FindColorsSpiralTolerance(X, Y, TPA, 4422036, MSX1, MSY1, MSX2, MSY2, 15) then
begin
if (Length(TPA) >= 5) then
begin
ATPA := TPAtoATPAEx(TPA, 40, 40);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
DebugATPA(ATPA, '');
for i := Low(ATPA) to High(ATPA) do
begin
if GetArrayLength(ATPA[i]) > 5 then
begin
MMouse(x, y, 2, 2);
if (waitUpTextMulti(['Mine', 'Rock'], 250)) then
begin
BeforeClick := InvCount;
ClickMouse2(true);
wait(RandomRange(250, 300));
FFlag(1);
status := 'Clicked Rock';
writeln('Staus:' + Status);
result := True;
exit;
end
else
begin
result := false;
status := 'Couldnt Find Rock';
writeln('Staus:' + Status);
exit;
end;
end;
end;
end;
end;
end;My debug box (so you know it is finding the color):
Debug says, could not find rock, which means that it isn't finding the uptext after finding the color, how do I fix this? :P