How to make mobs use their spells?

One of my testers is now running through Felwood and complains about the Jaedenar Adepts and Cultists meleeing instead of casting their spells

I know that these spells are defined for the mobs on the creature_template table. What do I need to do to get mobs to use them? Is there some kind of AI definition that needs to be set?

They are not defined in creature_template, the spellX fields in creature_template are only used for totems and vehicles / MCd creatures.

If you want NPCs to cast spells, you have to use SAI.

How is this done? My testers are complaining about caster mobs whacking on them in melee instead of casting, and I would like to fix this.

You need to script the creature using SmartAI, there’s a section in the wiki about it.