;'God - Open Door' command

If GetUserAccess(#USERID) > 0
	X = #XPOS
	Y = #YPOS
	
	;Open the door the player is standing ontop of
	OpenDoor(#MAPID,X,Y)
	
	;Open the door the player is looking at
	If GetUserDirection(#USERID) = #DIR_UP
		OpenDoor(#MAPID,X,Y-1)
	ElseIf GetUserDirection(#USERID) = #DIR_DOWN
		OpenDoor(#MAPID,X,Y+1)
	ElseIf GetUserDirection(#USERID) = #DIR_LEFT
		OpenDoor(#MAPID,X-1,Y)
	ElseIf GetUserDirection(#USERID) = #DIR_RIGHT
		OpenDoor(#MAPID,X+1,Y)
	EndIf
EndIf

Continue = 1