Checking whether a range of states is not present in any party member?

So, I have a fortune teller that using RNG to apply either a positive or negative status effect (such as double gold or reduced hit rate) and I do not want players to cheese the system by repeatedly talking to the fortune teller in order to get the desired result.

Basically, there are 10 possible status effects that can be applied when you talk to the fortune teller. And these status effects are applied to the entire party and lasts until that party member dies.

What I want to do is make it so that if any party member has one of these status effects still active, the fortune teller will not read your fortune.

The status effects in question are: 193-198, 205-208

Is there a script call that I can put into a conditional branch that checks whether any party member has any status effect from 193-198 and 205-208 where if the condition is false (no party member has any of those 10 states), the else would be the reading of your fortune?

Please and Thank You!
Hey,

In your event condition branch, use the script call:
Ruby:
l.any?{|s| $game_party.members.any?{|a| a.state?(s)}}
With l an array of state ids, for instance you can use this in your case:
Ruby:
[193,194,195,196,197,198,205,206,207,208].any?{|s| $game_party.members.any?{|a| a.state?(s)}}
VX Ace will not let me enter that code. Nothing happens when I paste it in. The "script" remains blank

1749309108884.png



I tried pasting random text into it and that pasts but your code it refuses.

Edit: This is why I copying from web browsers! They add a bunch of stuff that you did not highlight!

I copied ONLY what was in the one line ruby code box and when I pasted it into notepad++ and it pasted a few extra blank lines.


It is just like highlighting literally just a user name or a link and copying just the name but things like "Profile ID" and "Greatest Contributor" also get pasted even though those were not highlighted.


This bug is as old as browsers themselves.
Wouldn't this be easy to cheese via save scumming?

Original thread: https://forums.rpgmakerweb.com/threads/checking-whether-a-range-of-states-is-not-present-in-any-party-member.178162/