the second UV set works exactly like the first, except that it is used for the second texture. A Brush may have multiple textures. With the "BrushTexture" Command you can use the "Index" Parameter to define the texture layer you want to use with this texture. Usually it is 0 for the ordinary textures and 1 for the lightmap.
See also: CreateBrush, PaintMesh, VertexTexCoords...
See also: CreateBrush, PaintMesh, VertexTexCoords...