The script consists of 8 combats , so it is long, also all the combats are similiar so posting the whole thing is pointless.
I think there's the problem:
function onCastSpell(cid, var)
addEvent(doCombat, 0, cid, combat1, var)
addEvent(doCombat, 50, cid, combat2, var)...