Get help from the experts on variables, scripts, items, and other scary things.

## Best methods to organise random selections

one year ago
I want to set up a method of where I can have the system randomly select 1 out of x amount of choices.. what are the best methods to do this please?

Once this has been selected, at the same time I also want to then be able to randomly select a number from like 10-50.for example.. what I do this the same way as the first? And can this be done in the same motion at all?

## Best methods to organise random selections

one year ago
Edit: Oh, I see you've already asked about \$Dest, so my whole bit here is pretty stupid. Since you already know that, then you just want to generate a variable with a value between 1 and 50 and use if then. I have nothing to add and apologize for wasting your time.

## Best methods to organise random selections

one year ago
Don't worry it's fine, what youwere going to say could of helped at some point I recon.. what I'm really after I guess is an article on dice rolling and I may figure the rest out myself.. or try to.

E: I have managed to figure this out, so now if you know how to script it to select a random number between x and x depending on which selection was chosen from the first die roll that would be great please

The reason I say depending on first roll is because if it rolls a 1, the random number selection could be a random selection between 5-10.. and if it rolled a 2 then the random number selection could be between 7-19 for example

I get I could use another die roll but I wouldn't want me to be from 1-6 for instance I would need it from 5-10 or 7-19 as shown in this example. Hope i explained this enough.

E2: so I think what I'm asking is if 1D50 is 1 die roll with chance of rolling 1 to 50.. I am wanting the dice roll chances to be 15 to 50 not 1 to 50.

## Best methods to organise random selections

one year ago

The best way would probably just to use if/then like Ugilick said. As in:

``````
%DIEROLL = 1D50
IF %DIEROLL = 1 THEN %FINALNUM := 1D6 + 4
IF %DIEROLL = 2 THEN %FINALNUM := 1D8 + 6
etc.
``````

This is a lot of code for what you want, so you may prefer to use some different system. Or just put it in the global script. Alternatively, others may know a faster way of doing it.

To get a number between 15 and 50, do 1D35 + 15

## Best methods to organise random selections

one year ago
Jeez I feel like an idiot how could I not figure that out thank you for your help though

## Best methods to organise random selections

one year ago
Another method would be to use gated links that only show themselves when the number result is between the thresholds you want. That would use less scripting, but more links and settings.

So, you would %DIEROLL = 1D35 + 15
(As a page script maybe? Or else on the link that took you to the page.)

Then have several links on the page that superficially look alike but are only displayed between certain variables. The links can then enact another dice roll. This sidesteps the need for \$DEST