Puppy2233
|
  |
| Joined: 14 Feb 2011 |
| Total Posts: 10444 |
|
|
| 20 Oct 2015 04:19 PM |
I didn't get anywhere. what are some good guides to scripting?
why am I not on my alt |
|
|
| Report Abuse |
|
redlego98
|
  |
| Joined: 11 Jul 2008 |
| Total Posts: 8870 |
|
|
| 20 Oct 2015 04:22 PM |
I'm just going to put this here. I was bored.
var upCase = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]; var lowCase = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]; var numChar = ["0","1","2","3","4","5","6","7","8","9"]; var specChar = ["!","@","#","$","%","&"];
var maxChar = prompt("Max Characters"); var sCharAllow = confirm("Are special characters allowed?");
var rChoiceYS = Math.ceil(Math.random()*4); var rChoiceNS = Math.ceil(Math.random()*3);
var upCharChoice = Math.ceil(Math.random()*26-1); var lowCharChoice = Math.ceil(Math.random()*26-1); var numChoice = Math.ceil(Math.random()*10-1); var specChoice = Math.ceil(Math.random()*6-1);
function sCharYSwitch(y) { switch (y) { case 1: console.log(upCase[upCharChoice]); break; case 2: console.log(lowCase[lowCharChoice]); break; case 3: console.log(numChar[numChoice]); break; case 4: console.log(specChar[specChoice]); break; default: console.log("This shouldn't happen."); break; } }
function sCharNSwitch(n) { switch (n) { case 1: console.log(upCase[upCharChoice]); break; case 2: console.log(lowCase[lowCharChoice]); break; case 3: console.log(numChar[numChoice]); break; default: console.log("This shouldn't happen."); break; } }
function final() { switch (sCharAllow) { case true: sCharYSwitch(rChoiceYS); break; case false: sCharNSwitch(rChoiceNS); break; default: console.log("This shouldn't happen."); break; }}
for (var i = 0; i < maxChar; i++) { rChoiceYS = Math.ceil(Math.random()*4); rChoiceNS = Math.ceil(Math.random()*3); upCharChoice = Math.ceil(Math.random()*26-1); lowCharChoice = Math.ceil(Math.random()*26-1); numChoice = Math.ceil(Math.random()*10-1); specChoice = Math.ceil(Math.random()*6-1); final(); }
Yes, I realize it is terribly inefficient.
A strange game. The only winning move is not to play. |
|
|
| Report Abuse |
|
Puppy2233
|
  |
| Joined: 14 Feb 2011 |
| Total Posts: 10444 |
|
|
| 20 Oct 2015 04:23 PM |
I'LL TOY WITH IT
why am I not on my alt |
|
|
| Report Abuse |
|
nickyny
|
  |
| Joined: 09 Aug 2012 |
| Total Posts: 4067 |
|
|
| 20 Oct 2015 04:23 PM |
k
youll never get my swiggity swoogity sam |
|
|
| Report Abuse |
|