Script to make enemy (or friendly) attack someone at random

Hello.. I'm searching for a script (VX ACE) for past week or so that let's you cast a spell on target and forcing that target to attack one of friendlies by random. I'm making a illusion spell that mind controls enemy to force them do that.
'Scripts' is where people who have written a completed script they want to share with others can post it.
Moved to: RGSS3 Script Requests
Why do you need a script to do this? Applying the Confusion state will make them do this.
Why do you need a script to do this? Applying the Confusion state will make them do this.
Honestly: I forgot about it. Lying: There is none

Original thread: https://forums.rpgmakerweb.com/threads/script-to-make-enemy-or-friendly-attack-someone-at-random.118153/