MZ Requesting help eventing a specific type of skill

Hi everyone. I've got a Merchant character in my game's party. One of his main battle actions "Sell", which tries to convince the opposing party to give the Merchant a certain amount of Gold.

Right now, I have the skill set to a common event that says "1 in 4 chance of gaining x random amount of gold" when used.

It works, but it's not the functionality that I really want. I'd like it to work something like this:
-The skill would calculate how many of the opponents "pass" based on each enemy's stats
-Each opponent that has passed will provide x~y gold randomly
-The party gains X gold based on how many enemies passed and how much gold each one rolled for the pass.

I would appreciate any help in setting this up with events. I'm familiar with using script calls, but this is getting a little bit further than my skill level allows solo. Thanks!
no need for any script call - that can be done completely with eventing.

you can use control variable : Game data to get any data on an enemy.
check for HP=0 to determine if the enemy< exists, then calculate whatever you want with the other stats,
it's a lot of control variable commands with conditional branches and other commands mixed in, but nothing really complex.
Hi everyone. I've got a Merchant character in my game's party. One of his main battle actions "Sell", which tries to convince the opposing party to give the Merchant a certain amount of Gold.

Right now, I have the skill set to a common event that says "1 in 4 chance of gaining x random amount of gold" when used.

It works, but it's not the functionality that I really want. I'd like it to work something like this:
-The skill would calculate how many of the opponents "pass" based on each enemy's stats
-Each opponent that has passed will provide x~y gold randomly
-The party gains X gold based on how many enemies passed and how much gold each one rolled for the pass.

I would appreciate any help in setting this up with events. I'm familiar with using script calls, but this is getting a little bit further than my skill level allows solo. Thanks!
If you can tell me what your pass condition is, I can tell you how to do this with a script if you'd rather avoid the nest of branches and variable checks.
no need for any script call - that can be done completely with eventing.

you can use control variable : Game data to get any data on an enemy.
check for HP=0 to determine if the enemy< exists, then calculate whatever you want with the other stats,
it's a lot of control variable commands with conditional branches and other commands mixed in, but nothing really complex.
Thank you! I didn't think checking for HP=0 would work, but it works great.

Original thread: https://forums.rpgmakerweb.com/threads/requesting-help-eventing-a-specific-type-of-skill.178009/