From my AIOPowerChopper script (Link in sig).
9/10 times this works perfectly but then the other 1/10 times it just hovers over the items one by one then exits the loop because of fs and then repeats this over and over until it eventually starts to find the uptext again, im 99% sure its the uptext (LogUpText := ['ow lo', 'low log']
but I just cant see what is wrong with it.
Simba Code:
procedure DropLogs(var Obj: Tree);
var
TPA: TPointArray;
P: TPoint;
LogDTM, i, fs: Integer;
begin
LogDTM := DTMFromString(Obj.LogDTM);
FindDTMs(LogDTM, TPA, MIX1, MIY1, MIX2, MIY2);
if (Length(TPA) < 1) then
begin
FreeDTM(LogDTM);
Exit;
end;
RAaSTPAEx(TPA, 10, 10);
For i := 0 To High(TPA) Do
begin
if (fs >= 4) then
begin
fs := 0;
FreeDTM(LogDTM);
Exit;
end;
MMouse(TPA[i].x, TPA[i].y, 5, 5);
if WaitUpTextMulti(Obj.LogUpText, 350 + Random(150)) then
begin
GetMousePos(P.x, P.y);
Mouse(P.x, P.y, 0, 0, mouse_Right);
if WaitOptionMulti(Obj.LogOption, 350 + Random(150)) then
begin
ChooseOptionMulti(Obj.LogOption);
end;
end else
IncEx(fs, 1);
end;
FreeDTM(LogDTM);
end;