Well this might come out not helpful but :
In Milkshape (or any other animation software) the last
Keyframe is set equal to the first
Keyframe for technical reasons i.e. that the interpolation of the Keyframe before the last targets the first Keyframe in order to have in between animation frames behave accordingly.
Don't confuse Keframes with actual animation Frames. Keyframes are target spots for the interpolation calculations between two of them .
At real time looping the looping should go First Frame to Last Frame(not Keyframe) -1.
So, just as a simple example, you might have set in Milkshape (keyframes between brackets) 17 frames total, It'd go like this: (1) ,2,3,4,(5),6,7,8,(9),10,11,12,(13),14,15,16,(17)=(1)
Your actual looping settings should go: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 i.e. 1-16
The hard part is to bind keyframes to character position gesture at even spots along the line in order to avoid uneven transitions.
Hope it makes sense.
P.S. If you need simple pre-made good animation sequences I suggest you to visit mixamo (free online animator) . If you're happy with what's there and you need to use .x files animated stuff just invest 60 $ in Ultimate Unwrap 3D Pro in order to convert your FBX animated characters from mixamo to .x
Also you can produce single combo animation files easily.
This will cut your animation workload and time to 1/10