Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(a==`help`){
- r;
- }else{
- b=a.match(/\d+\s?d\s?\d+/gi);
- if(b){
- c=b.map(z=>z.split(`d`).map(y=>parseInt(y.trim())));
- d=[];
- for(i=0;i<b.length;i++){
- d[i]=[];
- for(j=0;j<c[i][0];j++){
- d[i].push(Math.ceil(Math.random()*c[i][1]));
- }
- }
- b.map((z,i)=>`🎲 ${z}: ${d[i].join(` `)} Total: ${d[i].reduce((f,g)=>f+g)}/${c[i][0]*c[i][1]}`).join(` `).slice(0,400);
- }else{
- `🎲 ${Math.ceil(Math.random()*100)}`;
- }}
Add Comment
Please, Sign In to add comment