SCAR Code:
Procedure FindNPC(Tol : Integer; Click, Left : Boolean; Option : String);
Var
NPCx, NPCy, NPCx2, NPCy2 : Integer;
Begin
Repeat
If FindColorTolerance(NPCx, NPCy, {Color}, MSX1, MSY1, MSX2, MSY2, Tol) Then
If FindColorTolerance(NPCx2, NPCy2, {Color}, NPCx-20, NPCy-20, NPCx+20, NPCy+20, Tol) Then
If FindColorTolerance(NPCx2, NPCy2, {Color}, NPCx-20, NPCy-20, NPCx+20, NPCy+20, Tol) Then
If FindColorTolerance(NPCx2, NPCy2, {Color}, NPCx-20, NPCy-20, NPCx+20, NPCy+20, Tol) Then
If FindColorTolerance(NPCx2, NPCy2, {Color}, NPCx-20, NPCy-20, NPCx+20, NPCy+20, Tol) Then
If FindColorTolerance(NPCx2, NPCy2, {Color}, NPCx-20, NPCy-20, NPCx+20, NPCy+20, Tol) Then
Break;
Until(Not LoggedIn)
If Click Then
If Left Then Mouse(NPCx, NPCy, 0, 0, True);
Else
If Not Left Then
Begin
Mouse(NPCx, NPCy, 0, 0, False);
Wait(40+random(70));
ChooseOption(Option);
end;
end;