Found a memory leak! :O
function MyClickToContinue: boolean;
var
Click: integer;
begin
if not IsLoggedIn then KillPlayer;
if not IsLoggedIn then Exit;
Result := FindNPCChatText('lick he', clickleft);
if Result then
begin
MouseBox(80, 347, 518, 413, 3);
Exit;
end;
Click := BitmapFromString(31, 9, 'beNqlUkEOgzAM4/9fGOLQ/WMS' +
'quA+icP2Ggg4DU5apklIOUSO47hpxn7JaRn7M3LquhUJkPfr4Qgld' +
'ppwLLzImZCORFMcJWuvae04rCqTnZs9msv6KGkvjQBiVZTMiQmipI' +
'Lh7WbpwF2Ln6JdOX3n52cagMSVFg5CmEyQXBAn7qcHkGm1eJiu4tQ' +
'bRaprQfLPtcS1FKu883AtLP77Wq52fvNarv5xRzbwaBi5');
Result := FindBitmapToleranceIn(Click, x, y, 177, 453, 355, 472, 4);
if Result then
begin
Mouse(x, y, 20, 4, true);
wait(100+Random(100));
MouseBox(80, 347, 518, 413, 3);
FreeBitmap(Click);
Exit;
end;
end;
This function will only free the bitmap if it found the bitmap.
I'd recommend changing the last bit to:
Result := FindBitmapToleranceIn(Click, x, y, 177, 453, 355, 472, 4);
if Result then
begin
Mouse(x, y, 20, 4, true);
wait(100+Random(100));
MouseBox(80, 347, 518, 413, 3);
end;
FreeBitmap(Click);
But both of our scripts are useless now anyways, so no matter. :P
Unless you intend on updating it.