SCAR Code:
Function OpenDoor(Rotate: Boolean): Boolean;
Var
TPA, TPA2: TPointArray;
C, X, Y, I: Integer;
TP: TPoint;
Begin
If(Not(LoggedIn))Then Exit;
For I := 0 To 3 Do
Begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2189191, 20, 20, MSX2 - 10, MSY2 - 10, 10);
For C := 0 To GetArrayLength(TPA) - 1 Do
Begin
TP := TPA[c];
FindColorsTolerance(TPA2, 2189191, TP.x - 25, TP.y - 25, TP.x + 25, TP.y + 25, 10);
If(GetArrayLength(TPA2) > 150)Then
Begin
MiddleTPAEx(TPA2, X, Y);
MMouse(X, Y, 5, 5);
If(Pos('lose', GetUpText) > 0)Then
Begin
Result := True;
Exit;
End Else
Begin
If(Pos('pen', GetUpText) > 0)Then
Begin
GetMousePos(X, Y);
Mouse(X, Y, 1, 1, True);
Result := True;
Exit;
End;
End;
End;
End;
If Not Rotate Then
Begin
Exit;
End Else
Begin
ActivateClient;
Wait(125 + Random(25));
SendArrowSilentWait(1, 1100 + Random(150));
End;
End;
End;