Sin
2012-03-07 17:18:51
function FindNearestNPC(var x,y:Integer;Click,Wait:Boolean):Boolean;
var
NPC:TPoint;
begin
if FindColorSpiralTolerance(NPC.x,NPC.y,65536,558,6,690,153,4) then
begin
Result := True;
if (Click = True) and (Result = True) then
Mouse(NPC.x,NPC.y,1,1,True);
if Wait = True then
begin
FFlag(1);
Wait(750 + random(250));
end;
end;
end; x,y = Stores info of NPC locations.
Click = Whether to click or not.
Wait = Whether to wait until not moving or not.
It's been really useful for me in fighting scripts and even my ZMI :)