Eval RNG with 3 numbers with set responses

Thank you for the help on my last post. My question is can you have rng 1-100 and have 3 of the number have a set response? What I mean by that if someone hits 1, 3, and 33 it would have a response of something I can type up.

$(eval const responses = [’ $(user) $(eval Math.floor((Math.random() * 100) + 1))! ’];responses[Math.floor(Math.random() * responses.length)]

for example with this code. If it rngs a 1 it would say awesome luck. If it rngs a 3 it would say you have bad luck and so on?

Continued from Eval RNG 1-100 with a few numbers removed from the responses

The array b contains the special messages for rolling 13, 23, or 33.

$(eval a=[];b=[`You have awesome luck!`,`You have bad luck!`,`...`];for(i=1;i<=100;i++){if(![13,23,33].includes(i))a.push(b.shift());}a[Math.floor(Math.random()*a.length)])
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.