mika
2012-09-13 21:28:43
So im trying to make a bot for LOL and im trying to have a function that repeats untill it finds the accept button when it pops up using a DTM.
What am i doing wrong?
What am i doing wrong?
Function AcceptGame;
var
ACCEPT, x, y : Integer;
begin
ACCEPT :=DTMFromString('m1gAAAHic42JgYKhjYmAIAOIcIO4C4pVAvBGIZzJB5OKAOBiItYFqbYDYEQlrArEsEMsAsRwQ6wLxMkc2Bh8mRoYKZgaGVEYGhlggbgaKbwbi01wMDKuAdC4D8YCRSIwAAFXHDIM=');
repeat
if FINDDTM(ACCEPT, X, Y, 1, 1, 731, 80) then
begin
Result:= False;
Mouse(X, Y, 6, 6,true);
Wait(311 + Random(157))
Result:= True;
FreeDTM(ACCEPT);
Exit;
end
Until Result:= True;
end;