1.) Does the script use SRL?
2.) Whats findobj3? I use FindObjArea
3.) Maybe the script should be like this?
SCAR Code:
var
JugsTaken, GrapesTaken : Integer;
Procedure PickJug;
begin
z := z+1
repeat
If(findobj3(xx, yy,'Jug', 8158598, 2))then
begin
wait(5000+random(2000))
Mouse(xx, yy, 0, 0, false)
ChooseOption(x, y, 'Take')
JugsTaken := JugsTaken+1
end;
until(InvCount = z)
end;
Procedure PickGrapes;
begin
z := z+1
repeat
begin
If(findobj3(xx, yy,'Grapes', 8328362, 3))then
wait(5000+random(2000))
Mouse(xx, yy, 0, 0, false)
ChooseOption(x, y, 'Take')
GrapesTaken := GrapesTaken+1
end;
until(InvCount = z)
end;
Procedure PickupStuff;
begin
repeat
PickJug;
PickGrapes;
until(GrapesTaken >= 14)and(JugsTaken >= 14)
end;