Need help with a state

Ok, I created a state that makes you simply attack your allies when the enemy casts it on you. The only problem is my character keeps attacking itself. So I figured I would simply create a new skill type specifically for that state, and give it its own skill that attacks all allies when cast and lock everything else(including standard attack) when in that state.
However, here's my problem: The character under the state never casts it. It just simply waits. I need it to attack allies with that spell so it hits everyone since I can't guarantee that attacks aren't going to hit the character afflicted, I basically want them to turn against their allies.

How do I get, I guess in a way, a "confused" character cast spells?
I tried my best to try to find something similar to what I'm trying to make, but couldn't find anything. If there's a thread discussing this, feel free to simply link me 🙂
I'm not sure what you want that's different from the ordinary 'confused' state (state #5).

If the problem is that state #5 is set to 'Attack anyone', then copy it to a new slot and change the scope to 'Attack allies'.  If that's not what you want, could you post a screen shot of your state and tell us exactly how you want to be different from state #5.
The problem you are running into is by default, confused allies will never use skills besides attack. To fix that, look up DoubleX confusion edit, that will allow them to use their skills as well as attack when confused.
The problem you are running into is by default, confused allies will never use skills besides attack. To fix that, look up DoubleX confusion edit, that will allow them to use their skills as well as attack when confused.
Does that include making sure the character doesn't attack themselves, and just the allies?

The state's simply meant for an enemy to "control" the character.
It probably doesn't fix the whole not attack yourself part, but that might be fixable with an edit to the script by someone.
bgillisp is right.

DoubleX RMVXA Confusion Edit

http://forums.rpgmakerweb.com/index.php?/topic/21765-doublex-rmvxa-confusion-edit/

#------------------------------------------------------------------------------|

# * (v1.02a+)Always_Exclude_Self, default = false |

# Notetags will be ignored and all states with those restrictions will stop |

# the battlers from targeting themselves if Always_Exclude_Self is true |

# This setting only works on skills picking a single non-random target |

#------------------------------------------------------------------------------|

Always_Exclude_Self = false

This script has what you're looking for. Give it a try. 
bgillisp is right.

DoubleX RMVXA Confusion Edit

http://forums.rpgmakerweb.com/index.php?/topic/21765-doublex-rmvxa-confusion-edit/

#------------------------------------------------------------------------------|

# * (v1.02a+)Always_Exclude_Self, default = false |

# Notetags will be ignored and all states with those restrictions will stop |

# the battlers from targeting themselves if Always_Exclude_Self is true |

# This setting only works on skills picking a single non-random target |

#------------------------------------------------------------------------------|

Always_Exclude_Self = false

This script has what you're looking for. Give it a try. 
Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-a-state.41874/