I agree with masterBB; wrappers will help substantially here. I had the same problem before with an early version of LividFarmer; something to do with constantly searching for a color, getting a TPA, and then slipping that into a 2DTPA. Let me modify your function a bit and we'll see if it's any better for you.
Simba Code:
Function PickItem: Boolean;
var
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS : Integer;
begin
Result := False; //Let's start off by making this function, by default, False
tmpCTS := GetColorToleranceSpeed; //Set all of these just one time...
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.58,0.87);
repeat
FixDatSixHours;
FindNormalRandoms;
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5533524, MSX1, MSY1, MSX2, MSY2, 8); //Let's use spiral instead
TPAtoATPAExWrap(TPA, 20, 15, ATPA);
SortATPAFromFirstpoint(ATPA, Point(MSCX, MSCY)); //Sort this ATPA from our middle screen
if (Length(ATPA) > 0) then //Only proceed if...
begin
MP := MiddleTPA(ATPA[0]);
MMouse(MP.x, MP.y, 1, 1);
if WaitUptext('ake', 500) then
ClickMouse2(mouse_Left);
end;
wait(RandomRange(300, 600));
until(InvFull);
Result := InvFull;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
Let me know if that helps any.