Yeah I'm trying vary hard to understand what you are both saying but it comes out the other side of my head like. Actually despite the fact that you were both telling me to correct the state numbers I really didn't understand exactly... I've only just come back to coding again and I'm not really good at it 
Anyway I made new codes here and I understand exactly what they do better than last time, however... this time round mugen has crashed due to an error I made most likely to do with the .CMD. It could be that I need to add additional parameters, but I'm currently working on it now and will add other types of codes to see what happens. If it's the CNS again you'll have to shoot me!
CNS
Spoiler, click to toggle visibilty
[StateDef 8591]
type = S
movetype = A
physics = S ;Stand
juggle = 0
anim = 3210 ;State of player
ctrl = 0
[State 8591, Helper]
type = Helper
trigger1 = time = 1
ID = 10000 ;State of helper
pos = -55,0
postype = back
stateno = 10000 ;State of helper
helpertype = normal
name = "Lancer" ;State 10000
keyctrl = 0
ownpal = 1
supermovetime = 1
[State 8591, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;--------------------------------------
[Statedef 10000]
type = S
movetype = I
physics = N
anim = 3210 ;state of player
velset = 4.7,0
ctrl = 0
[State 10000, 1]
type = HitOverride
trigger1 = time = 0
time = -1
attr = SCA, AA, AT, AP
slot = 0
stateno = 10003
[State 10000, 2]
type = sprpriority
trigger1 = Time = 0
value = 9999999
[State 10000, 4]
type = ChangeState
trigger1 = RootDist X <= -30
value = 10002
[State 10000, 5]
type = VelSet
trigger1 = RootDist X <= -30
x = 0
y = 0
[Statedef 10002]
type = S
movetype = A
physics = S
anim = 3230
velset = 0,0
ctrl = 0
[State 10002, som]
type = playsnd
trigger1 = AnimElem = 1
value = valordosom
[State 10002, 1]
type = Projectile
trigger1 = AnimElem = 4240
projanim =3240
projhitanim = 749
projhits = 20
projmisstime = 4
projshadow = -1
projpriority = 30
projremovetime = 150
projheightbound = -240, 100
projedgebound = 100
projscreenbound = 100
projid = 6004
velocity = 0.001
offset = 0,15
attr = S, HP
damage =500
animtype = heavy
guardflag = MA
hitflag = MAFDP
pausetime = 1,5
hitsound = 5,2
sparkxy = 500,500
guardsound = 6,0
ground.type = High
ground.slidetime = 25
ground.hittime = 25
ground.velocity = -10,-2
air.animtype = Back
air.velocity = -10,-2
air.recover = 0
air.fall = 1
down.velocity = -10
down.hittime = 30
down.bounce = 1
fall = 1
fall.recover = 0
[State 10002, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 10001
[Statedef 10001]
type = S
movetype = I
physics = N
anim = 5111
velset = -4.7,0
[State 10001, 1]
type = Veladd
trigger1 = Time > 0
x = 0
y = 0
[State 10001, win]
type = ChangeState
trigger1 = win = 1
value = 10006
[State 10001, lose]
type = ChangeState
trigger1 = Lose = 1
value = 10007
[State 10001, 3]
type = DestroySelf
trigger1 = BackEdgeBodyDist < -35
[Statedef 10003]
type = A
movetype = I
physics = N
anim = 5890
velset = -4,-4,0
[State 10003, 1]
type = Gravity
trigger1 = time >= 0
[State 10003, 2]
type = ChangeState
trigger1 = Pos Y >= -1
trigger1 = Pos Y > 0
value = 10004
[Statedef 10004]
type = S
movetype = I
physics = N
anim = 5899
velset = 0,0
[State 10004, 1]
type = Gravity
trigger1 = Time >= 32
[State 10004, 2]
type = ChangeState
trigger1 = animTime = 0
value = 10005
[Statedef 10005]
type = S
movetype = I
physics = N
anim = 5950
velset = 0,0
[State 10005, 2]
type = ChangeState
trigger1 = animTime = 0
value = 10001
[Statedef 10006]
type = S
movetype = I
physics = N
anim = 5999
velset = 0,0
[State 10006, 1]
type = DestroySelf
trigger1 = animTime = 0
[Statedef 10007]
type = S
movetype = I
physics = N
anim = 6799
velset = 0,0
[State 10007, 1]
type = DestroySelf
trigger1 = animTime = 0
CMD
Spoiler, click to toggle visibilty
;Canon Beam
[State -1, Lancer]
type = Helper
value = 8591
triggerall = command = "dd_x"
triggerall = power >= 5000
triggerall = statetype != A
triggerall = NumHelper(10000) < 2
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA, HA
trigger1 = stateno != 10000
trigger2 = movecontact