Hello
I used to hate doors, but in the past few days I seem to have past a milestone in SCAR scripting
Anyways, this procedure is really easy to use.
All you have to do is put in the color of the door, and SCAR will open it for it.
If it doesn't find the door (open/closed), it'll turn the camera after five tries.
This is the procedure:
SCAR Code:
procedure DoorOpener(Color:Integer);
var
Tries : Integer;
begin
repeat
Wait(500 + Random(100));
if(FindColorSpiralTolerance(x, y, Color, MSX1, MSY1, MSX2, MSY2, 5))then
MMouse(x, y, 1, 1);
Tries := Tries + 1;
if(Tries >= 5)then
begin
KeyDown(37);
Wait(1000 + Random(500));
KeyUp(37);
Tries := 0;
end;
until(IsUpText('Door') or IsUpText('Gate'));
if(IsUpText('pen'))then
begin
Mouse(x, y, 0, 0, False);
ChooseOption(x, y, 'pen');
Writeln('Found closed door.');
Writeln('Opened door.');
end;
if(IsUpText('Close'))then
begin
Writeln('Door was already open.');
Exit;
end;
end;
This is the short procedure, the part you need:
Have fun with it 
Tell me if you find any bugs.
BTW:
Is this the right board to post stuff like this?