swGunganNames.js (5054B)
1 var nm1 = ["", "", "", "", "b", "bl", "br", "c", "cr", "cl", "d", "f", "fl", "fr", "g", "h", "j", "k", "kl", "kr", "l", "m", "n", "p", "r", "s", "sk", "t", "w", "y", "z"]; 2 var nm2 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "oo", "oe", "ee", "ie", "ue", "ia", "au"]; 3 var nm3 = ["b", "bb", "bl", "bs", "d", "dr", "g", "gg", "k", "kf", "kn", "l", "ll", "llb", "lsb", "lsk", "ly", "m", "mb", "mf", "n", "nb", "nk", "nn", "nt", "p", "pp", "r", "rk", "rs", "rt", "rv", "s", "sm", "ss", "t", "tt", "v", "x", "z", "zz"]; 4 var nm4 = ["", "", "", "b", "c", "d", "f", "ff", "gg", "h", "k", "l", "m", "n", "nn", "p", "r", "rd", "rt", "s", "sh", "sk", "ss", "w"]; 5 var nm5 = ["", "", "", "", "", "b", "bl", "c", "cl", "d", "dh", "f", "fl", "fr", "h", "j", "kl", "kh", "l", "m", "n", "p", "r", "s", "sh", "spl", "t", "th", "w", "y"]; 6 var nm6 = ["bl", "bb", "b", "bs", "d", "dd", "dh", "f", "ff", "g", "l", "ll", "ls", "lb", "ls", "m", "mm", "mb", "mf", "n", "nb", "nn", "nd", "p", "pf", "pd", "pp", "r", "rt", "rs", "s", "ss", "sm", "sn", "sd", "t", "th", "tt", "w", "x", "z"]; 7 var nm7 = ["", "", "", "", "", "b", "d", "f", "ff", "g", "h", "l", "m", "n", "rs", "s", "ss", "w"]; 8 var nm8 = ["b", "c", "d", "f", "g", "gr", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "sh", "sl", "sq", "t", "tr", "w", "y", "w", "z"]; 9 var nm9 = ["bb", "bbl", "bl", "d", "db", "dr", "dt", "f", "ff", "g", "gl", "j", "kk", "ll", "lb", "ld", "ls", "m", "mb", "mf", "nd", "ng", "p", "pf", "r", "rd", "rm", "rp", "rs", "rsh", "s", "ss", "sb", "sd", "sm", "th", "tt", "ttl", "w", "z", "zb"]; 10 var nm10 = ["", "", "", "", "b", "d", "f", "g", "l", "ls", "m", "mk", "n", "nks", "nt", "p", "pps", "r", "rm", "rr", "rs", "rt", "s", "ss", "th", "w", "wn", "z", "zz"]; 11 var br = ""; 12 13 function nameGen(type) { 14 var tp = type; 15 $('#placeholder').css('textTransform', 'capitalize'); 16 var element = document.createElement("div"); 17 element.setAttribute("id", "result"); 18 for (i = 0; i < 10; i++) { 19 rnd6 = Math.floor(Math.random() * nm8.length); 20 rnd7 = Math.floor(Math.random() * nm2.length); 21 rnd8 = Math.floor(Math.random() * nm10.length); 22 if (i % 2 === 0) { 23 namelast = nm8[rnd6] + nm2[rnd7] + nm10[rnd8]; 24 } else { 25 rnd9 = Math.floor(Math.random() * nm9.length); 26 rnd11 = Math.floor(Math.random() * nm2.length); 27 namelast = nm8[rnd6] + nm2[rnd7] + nm9[rnd9] + nm2[rnd11] + nm10[rnd8]; 28 } 29 if (tp === 1) { 30 rnd = Math.floor(Math.random() * nm5.length); 31 rnd2 = Math.floor(Math.random() * nm2.length); 32 rnd4 = Math.floor(Math.random() * nm7.length); 33 if (i < 4) { 34 if (rnd < 4) { 35 while (rnd4 < 3) { 36 rnd4 = Math.floor(Math.random() * nm7.length); 37 } 38 } 39 names = nm5[rnd] + nm2[rnd2] + nm7[rnd4] + " " + namelast; 40 } else if (i < 7) { 41 while (rnd < 4) { 42 rnd = Math.floor(Math.random() * nm5.length); 43 } 44 names = nm5[rnd] + nm2[rnd2] + "-" + nm5[rnd] + nm2[rnd2] + " " + namelast; 45 } else { 46 rnd3 = Math.floor(Math.random() * nm6.length); 47 rnd5 = Math.floor(Math.random() * nm2.length); 48 names = nm5[rnd] + nm2[rnd2] + nm6[rnd3] + nm2[rnd5] + nm7[rnd4] + " " + namelast; 49 } 50 } else { 51 rnd = Math.floor(Math.random() * nm1.length); 52 rnd2 = Math.floor(Math.random() * nm2.length); 53 rnd4 = Math.floor(Math.random() * nm4.length); 54 if (i < 4) { 55 if (rnd < 4) { 56 while (rnd4 < 3) { 57 rnd4 = Math.floor(Math.random() * nm4.length); 58 } 59 } 60 names = nm1[rnd] + nm2[rnd2] + nm4[rnd4] + " " + namelast; 61 } else if (i < 7) { 62 while (rnd < 4) { 63 rnd = Math.floor(Math.random() * nm1.length); 64 } 65 while (rnd4 < 3) { 66 rnd4 = Math.floor(Math.random() * nm4.length); 67 } 68 names = nm1[rnd] + nm2[rnd2] + nm4[rnd4] + "-" + nm1[rnd] + nm2[rnd2] + nm4[rnd4] + " " + namelast; 69 } else { 70 rnd3 = Math.floor(Math.random() * nm3.length); 71 rnd5 = Math.floor(Math.random() * nm2.length); 72 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd5] + nm4[rnd4] + " " + namelast; 73 } 74 } 75 br = document.createElement('br'); 76 element.appendChild(document.createTextNode(names)); 77 element.appendChild(br); 78 } 79 if (document.getElementById("result")) { 80 document.getElementById("placeholder").removeChild(document.getElementById("result")); 81 } 82 document.getElementById("placeholder").appendChild(element); 83 }