This is a set of two scripts: body and limb. Body goes in the root prim of your animated linkset, it needs a few modifications at the beginning (number of frames for each animation). Limb has to be slightly modified (limb, and base limb number where necessary) into a seperate version for each independently animated subset of child prims in your linkset (the script goes into each of the subset's prim).
Body script (loads the joints' positions, and their rotations for each animation frame, in either Euler/degree or Quaternion/radians format, from a notecard called "anims"

*REMOVED, see below for working script*
Limb element script (gets its relevant joint position and rotations info from the body and uses this to calculate its own local rotation and local position for each frame). This example defines the limb number 0, and indicates it should be attached to limb number 4.
*REMOVED, see below for working script*
Here is an example anim file that I wanted to test in my mammoth. The joints' positions are the first vector of each line (one line = one limb subset). It has 2 animations of 4 frames each, for 8 different limb subsets (4 lower legs and 4 upper legs). Rotations are in Euler format (in degrees).
CODE
<6, 2, -10>!<0, 12, 0>!<0, 4, 0>!<0, -2, 0>!<0, 14, 0>!<-5, 0, 0>!<-12, 0, 0>!<-3, 0, 0>!<2, 0, 0>
<6, -2, -10>!<0, -2, 0>!<0, 14, 0>!<0, 12, 0>!<0, 4, 0>!<5, 0, 0>!<12, 0, 0>!<3, 0, 0>!<-2, 0, 0>
<-7, 2, -10>!<0, -2, 0>!<0, 14, 0>!<0, 12, 0>!<0, 4, 0>!<5, 0, 0>!<12, 0, 0>!<3, 0, 0>!<-2, 0, 0>
<-7, -2, -10>!<0, 12, 0>!<0, 4, 0>!<0, -2, 0>!<0, 14, 0>!<-5, 0, 0>!<-12, 0, 0>!<-3, 0, 0>!<2, 0, 0>
<6, 2, -2>!<0, -9, 0>!<0, -6, 0>!<0, 4, 0>!<0, 11, 0>!<-5, 0, 0>!<-12, 0, 0>!<-3, 0, 0>!<2, 0, 0>
<6, -2, -2>!<0, 4, 0>!<0, 11, 0>!<0, -9, 0>!<0, -6, 0>!<5, 0, 0>!<12, 0, 0>!<3, 0, 0>!<-2, 0, 0>
<-7, 2, -2>!<0, 4, 0>!<0, 11, 0>!<0, -9, 0>!<0, -6, 0>!<5, 0, 0>!<12, 0, 0>!<3, 0, 0>!<-2, 0, 0>
<-7, -2, -2>!<0, -9, 0>!<0, -6, 0>!<0, 4, 0>!<0, 11, 0>!<-5, 0, 0>!<-12, 0, 0>!<-3, 0, 0>!<2, 0, 0>
Important: you have to define limbs from end to body.