Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- note = "allA, allA2 and allB are arrays of words";
- note = "id is either 1 or 3, depending on which command was used to call this code";
- rando = Math.random();
- if(rando >= 0.5){AA1 = allA2;}
- else{AA1 = allA;}
- rando = Math.random();
- if(rando >= 0.5){AA2 = allA2;}
- else{AA2 = allA;}
- rando = Math.random();
- if(rando >= 0.5){AA3 = allA2;}
- else{AA3 = allA;}
- if(id == 3){
- output = AA1[Math.floor(Math.random() * (AA1.length - 1))] + " " + allB[Math.floor(Math.random() * (allB.length - 1))] + " | " + AA2[Math.floor(Math.random() * (AA2.length - 1))] + " " + allB[Math.floor(Math.random() * (allB.length - 1))] + " | " + AA3[Math.floor(Math.random() * (AA3.length - 1))] + " " + allB[Math.floor(Math.random() * (allB.length - 1))];
- }
- else{
- output = AA1[Math.floor(Math.random() * (AA1.length - 1))] + " " + allB[Math.floor(Math.random() * (allB.length - 1))];
- }
- output;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement