CephaXz
2012-08-24 09:29:09
Function PickItem: Boolean;
var
a: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS : Integer;
begin
repeat
FixDatSixHours;
FindNormalRandoms;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.58,0.87);
FindColorsTolerance(TPA, 5533524, MSX1, MSY1, MSX2, MSY2, 8);
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 20, 15);
//SortATPAFromSize(ATPA, 300, true);
if Length(ATPA) < 1 then
begin
writeln('blabla');
end else
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;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end; When my script reach this part, it will keep picking up items until inventory is full. But during this time, the memory usage keep going up, always end up having an error while my Simba memory usage is over 1.5gb.
Is it because of the repeating of color finding function that cause this? Or is it because of other causes. And if so, how can I resolve this problem?