so right now your line doPlayerAddMagLevel(cid, MAGIC_LEVEL, 6)
it passes wrong parameters, right syntax is:
doPlayerAddMagLevel(cid, amount)
Because your line passes wrong parameters, it takes the default value, which is 1, then adds 1 to your character
change your line to...