I found this in the Armada 2 directory, maybe the codemonkeys can use this.
; This shader does the per-vertex dot3 work.
; It transforms the light vector by the basis vectors
; passed into the shader.
; The basis vectors only need to change if the model's
; shape changes.
; The output vector is stored in the diffuse channel
; (use the menu to look at the generated light vector)
;
;#define v0 v0
;#define V_NORMAL v1
;#define V_TEXTURE v2
;#define V_S v3
;#define V_T v4
;#define V_SxT v5
;#define r3 r3
;
vs.1.0
; Transform position to clip space and output it
dp4 oPos.x, v0, c[2]
dp4 oPos.y, v0, c[3]
dp4 oPos.z, v0, c[4]
dp4 oPos.w, v0, c[5]
; transform light by basis vectors to put it
; into texture space
dp3 r3.x, v3.xyz, c[6]
dp3 r3.y, v4.xyz, c[6]
dp3 r3.z, v5.xyz, c[6]
; Normalize the light vector
dp3 r3.w, r3, r3
rsq r3.w, r3.w
mul r3, r3, r3.w
; Scale to 0-1
add r3, r3, c[0]
mul oD0, r3, c[1]
; Set alpha to 1
mov oD0.w, c[0].w
; output tex coords
mov oT0, v2