I'm facing a similar issue. I'm attempting to level up my magic, but it keeps trying to switch to a more powerful spell that I've unlocked, even though I don't have the necessary runes for it. Also, whenever it attempts to change the spell, it always defaults to defensive casting.
EDIT:
Okay, I've figured it out. It appears that you can actually select a specific spell and prevent it from casting in defensive mode. You need to go to the 'Targets' tab and click on 'Add' to create a new target. Choose 'Magic,' then select your desired magic spell. Make sure to uncheck the boxes for 'Progressive training,' 'Defensive casting,' and any other options you don't want enabled.
This should help clear up the confusion for those, like myself, who were having trouble training magic effectively.
By the way, the script is awesome! I love it!!