In order for the template functions to properly animate your animation cycles you need to label each frame of animation in that cycle by the name of the state: stand, walk, run, duck, crawl, jump, swim, attack, or death, plus a frame number (starting from 0).
Partial MED frame list
For example, if the walk cycle of your player character had four frames you would label those frames as such: 'walk0', 'walk1', 'walk2', 'walk3'.
The Complete Walk Cycle in MED ('walk0'..'walk3')
The order of the animation cycles does not matter as long as you start with the 'stand' state (i.e. 'stand', 'walk', 'run'… works the same as 'stand', 'run', 'walk'…) and the frames within each cycle should be in order and grouped together.