Quote: "Yes but this only allows it to be true once in every X times. Random numbers would allow different consequences depending on the number generated."
If what I remember from statistics class, the following two "scripts" would net the exact same result:
Using "random=X":
:random=5:<do first random act>
:random=5:<do second random act>
:random=5:<do third random act>
:random=5:<do fourth random act>
::<do fifth random act>
Using your desired method:
:state=0:setvarrand=MyVar 1 5,state=1
:state=1,varequal=1:<do first random act>
:state=1,varequal=2:<do second random act>
:state=1,varequal=3:<do third random act>
:state=1,varequal=4:<do fourth random act>
:state=1,varequal=5:<do fifth random act>
Assuming each number is returned on a uniform basis, both of the above scripts would trigger each random act the same amount of times.
If that's true, then there's no need for a random variable setter if all you're wanting to do is check for a certain number in the range, just use the first script I put up. However, if you had planned to use the randomized variable for some other purpose (saying that the second script had Ply's Mod variables and the randomized variable could be used for setting parameters of other commands) then I could see a use for it.
The one and only,