Confusion not attack only

Hello, I'm trying to figure out how to get my actors to use skills on each other (not the basic attack) when they are put in a "confused" like state by the enemy. I've been searching everywhere but can't find anything on it that works.
It takes a script, as by default, confusion only uses attack.

Moved to Script Requests

Original thread: https://forums.rpgmakerweb.com/threads/confusion-not-attack-only.87000/