rem "AT"
rem (AT,1) or (AT,2)
GetFaza(Open)
#Yes
##IFelem(A%1)
###Yes
####IsDoorFree(door)
#####No
######Stop
####LegalPlace
#####No
######SD(RA~)
######SetFaza(HideSD)
######Exit
####IsDoorLock(door)
#####Yes
######SD(RA~)
######SetFaza(HideSD)
######Exit
####SD(GA~)
####SD(RB+)
####LegalANT
#####Yes
######SetFaza(WaitDatch)
######IFparam(%1=1)
#######Yes
########OpenToZ(door,Z1)
#######No
########OpenOutZ(door,Z1)
#####No
######Goto Metka:CloseDoor
