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

Asked Apr 9, 2020·2 replies·Last activity 6 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.

How do i edit this and remove 3 numbers from being picked? for example i dont want it pull 13, 23, and 33. Thank you for any help I get 🙂

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

slight_smile.pngwink.png

2 replies

Here's a modified RNG.

$(eval a=[];for(i=1;i<=100;i++){if(![13,23,33].includes(i))a.push(i);}a[Math.floor(Math.random()*a.length)])

Perfect. TY!!!! and I appreciate it so much <3