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