XYZ to spline

3ds Max script to generate a spline from a long list of XYZ coordinates.
Miauu from scriptspot.com was kind enough to help me with this.