[HELP] how to have an attack have multiple outcomes and statuses

So for my game, i want one of the enemies do an attack that has a sort of gamble effect. I have 5 effects that could pop up, Poison 30%, Hypnotized 25%, Sleep, 20%, Crying 15%, or Healing 10%. How could I do this? Also, each one will have custom diolague so it will have to be an event
two ways depending on what you want.

the simple way would be to have all those effects on the skill and each one will have its own chance - but this can result in multiple effects and won't have a dialogue either.

the other way is to attach a common event to the skill and that event will then run.
however depending on which maker and how you want it to affect the battle the event can get rather complex and you might need a plugin to change timing (by default all common events are executed last on the turn)
yes, i will iron out the details... but exactly how what do i actually put in the common event?
I think you could do something like this
result of rand(20) stored in a variable (we call it '5%').
grouping 20 conditionals* each checking from 1 to 20 against the '5%'(variable)
if the result is 1...or 4 (whatever result) cast this spell, then anything you want.

Every spell will have 5% of showing up. So you could stack more than 1 result to 'add' more chances.
Like

1 , 2, 3 and 4 will cast 'Fire'. That would be 20% of casting that one.
5, 6 , 7 will cast 'Tornado'. That would be 15%.
8 to 14 will cast 'Heal'. That would be 35%.
and go on.

If you want to be more specific or short you should use a plugin instead of event.


*You can set more variables by using script calls.

Original thread: https://forums.rpgmakerweb.com/threads/help-how-to-have-an-attack-have-multiple-outcomes-and-statuses.137480/