Math.random function

Asked Aug 6, 2021·1 reply·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

So currently I have a command that uses the Math.random function to pull a random name off a list of names when a specific command is given. Is there a way to weight this so the names on the list have different rarities as opposed to the same chance of being chosen? So for example most are super common, but two or three are really rare to come up.

1 reply

Hiya, with $(eval) you can build your own logic in JavaScript that gives extra weight to certain names in your list. If you don’t know how to code, probably the easiest solution is to add the same name multiple times in your list.