
Originally Posted by
YoHoJo
Look at my post too (#2, and the picture one).
Simple change your line, to be like the line I posted in post #2, easy.
I did use it, It does not work.
The way im testing this is, I make the mouse speed really slow so that is 99% chance not to click on it therfor showing the yellow click marks:
Simba Code:
procedure ClickNPC;
var
X, Y,cx,cy: Integer;
begin // kill npc
WriteLn('Attacking skeleton...');
if FindColorTolerance(X, Y, NPC, tleft, tright, bleft, bright, tolerence) then
begin
MouseSpeed:=5;
mmouse(x, y,1,1);
GetMousePos(cx,cy);
ClickMouse(X, Y, Mouse_Left);
//if FindColorTolerance(X,Y,65535,cx-10,cy-10,cx+10,cy+10,20) then
if FindColorTolerance(x,y,65535,cx-10,cy-10,cx+10,cy+10,5) then
begin
WriteLn('Shit, we misclicked retrying!');
ClickNPC;
end else
WriteLn('Attacked skeleton!');
CheckCombat;
end;
end;
But.. I used your method and It did not repeat the procedure like it is suposed to.