I'm trying to recognize when it's no longer fishing by a time since the inventory has been + 1. Trying the following code it doesn't always write the line 'caught one!' every time one is caught OR my character stops fishing and it writes it a bunch of 'caught one'. It will click the spot while fishing and no click when not fishing
Procedure works prior to adding the repeat and marktimes
Simba Code:
Procedure Fishy;
var
SeX, SeY, PlusOne, FishCounter: Integer;
Begin
PlusOne:= InvCount + 1;
SeX:= MSCX;
SeY:= MSCY;
why If FindObjCustom(SeX, SeY, ['Cage', 'Fishing'], [7956571, 9998731,9406078], 10) Then
WriteLn('Found Spot!');
Begin
Case Random(2) Of
0:Mouse(SeX,SeY, 5,5, True);
1: Begin
Mouse(SeX,SeY,4,4,False);
WaitOption('Cage',Randomrange(100,300));
Wait(300 + Randomrange(300,500));
End;
End;
End;
Repeat
wait(1000);
If InvCount=PlusOne Then
Begin
WriteLn('Caught One!');
MarkTime(FishCounter);
End;
Until (TimeFromMark(FishCounter) > 8000);
End;