(solved) How to make a "random" rommand that is not really random

Asked Feb 7, 2025·2 replies·Last activity 1 year 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 i want to make an "aura" command that when typed will have a 50% to output a text message and 30% to an other text message and a 10% one, and 2 5% ones and i am bad at javascript and no time to learn it at all

2 replies

Try:

$(eval r=Math.random()*100; r<50?"Here goes the message for 50%.":r<80?"Here goes the message for 30%.":r<90?"Here goes the message for 10%.":r<95?"Here goes the message for 5% (option 1).":"Here goes the message for 5% (option 2).")
Purple Tiger said:
$(eval r=Math.random()*100; r<50?"Here goes the message for 50%.":r<80?"Here goes the message for 30%.":r<90?"Here goes the message for 10%.":r<95?"Here goes the message for 5% (option 1).":"Here goes the message for 5% (option 2).")

it worked! thank you so much