Another option that may help you optomize the map is to grab a tool like Magos or (Better yet) Oinerwinkles Animation Remover.
Open up the model, rename the attack animations and any other animation you dont want to Delete 1,2,3,4,5,etc. In Magos, if you delete them, it won't lower the file size but they wont' be in the way, better just to rename them. In Oinerwinkles, if you remove each of them, it will lower the file size, probably by a lot (150+kb for 8 attack animations). However to delete them in Oinerwinkles they have to be mdls, so you'll want a file converter like Yogbul's File Converter.
If you removed them with oinerwinkles, then from there convert it back to a mdx using a conversion tool like Yogbul's File Converter. It's safe and easier than programming and making spellbooks, trust me.