WHEN HeadsUp
AND SomeConditions
AND Random <=25
AND list_of_hands_A
RaiseMax FORCE
WHEN HeadsUp
AND SomeConditions
AND Random <=50
AND list_of_hands_B
RaiseMax FORCE
WHEN HeadsUp
AND SomeConditions
AND Random <=75
AND list_of_hands_C
RaiseMax FORCE
WHEN HeadsUp
AND SomeConditions
AND list_of_hands_to_go_allin_always
RaiseMax FORCE

But according to OPPL Manual

Random Gets evaluated new each time it
gets used. So be careful if you code
sequences of random actions. If you
need a random function that stays
constant for some time you could
use the OpenHoldem symbols

What's the correct way to achieve what I need?
Do I need to declare a variable at the beginning of the script?

you are right, "Random" is only good when you have 2 possible scenarios.
try "randomround" instead: random number between (0.000-1.000) for the current round. Value is calculated only once in current round.

Example:

WHEN randomround<0.2 ...
WHEN randomround>=0.2 and randomround<0.5 ...
WHEN randomround>0.5 ...

// This line executes 26% of the time 0 .... 25, (0 is in the set 100 is not) < 25 yields 25% not <= 25
WHEN HeadsUp AND SomeConditions AND Random <=25 AND list_of_hands_A RaiseMax FORCE

// This line executes 37.74% of time, 51% of the remaining 74% not handled in the prior line of code
WHEN HeadsUp AND SomeConditions AND Random <=50 AND list_of_hands_B RaiseMax FORCE

//This line executes 27.56% of the time, 76% of the remaining 36.26% of hands not already handled
WHEN HeadsUp AND SomeConditions AND Random <=75 AND list_of_hands_C RaiseMax FORCE

// This line is only evaluated 8.7% of the time
WHEN HeadsUp AND SomeConditions AND list_of_hands_to_go_allin_always RaiseMax FORCE

That's how Random waterfall steps work. Hope the explanation helps.

beeaseful wrote: ↑Tue Nov 07, 2023 10:59 pm
Hello, on the same topic i would like to ask something to be sure i understood everything...

WHEN SomeConditions AND Random <=50 AND list_of_hands_A RaiseMax FORCE

WHEN SomeConditions AND Random <=100 AND list_of_hands_B RaiseMax FORCE

in this example if i understand correctly, it will go all in 50% of the time with list of hands A and 50% of the time with list of hands B

Am i correct ?

Random returns random number from 0 to 100, so in your example, it will shove 50% of time with handsA, and if not, it will always shove with handsB (because Random is always <=100). If it's what you want, then yes, correct.
You can just say: