In your script type...
void collapseJoints( string jointnames, string collapseToJoint )
none
tba
Category: Script events