lolIoniaNames.js (3100B)
1 var nm1 = ["ch", "h", "k", "kh", "l", "s", "sh", "y", "z", "zh"]; 2 var nm2 = ["ai", "ee", "ie", "ui", "uo", "a", "o", "e", "i", "u"]; 3 var nm3 = ["d", "k", "m", "n", "r", "s", "sh", "z"]; 4 var nm4 = ["uo", "ui", "a", "a", "e", "e", "i", "o", "o", "u"]; 5 var nm5 = ["", "", "", "", "", "", "h", "n", "n"]; 6 var nm8 = ["", "", "d", "h", "f", "n", "ph", "s", "x", "z"]; 7 var nm9 = ["a", "a", "e", "i", "i", "o", "y"]; 8 var nm10 = ["hn", "hr", "k", "l", "ll", "n", "nn", "ndr", "r", "rh", "s", "sh", "y", "z"]; 9 var nm11 = ["a", "a", "e", "e", "i", "o"]; 10 var nm12 = ["l", "n", "r", "s", "z"]; 11 var nm13 = ["ia", "ea", "ei", "a", "a", "i", "i", "e", "a", "a", "i", "i", "e", "a", "a", "i", "i", "e"]; 12 var nm14 = ["", "", "", "", "", "", "", "h"]; 13 14 function nameGen(type) { 15 $('#placeholder').css('textTransform', 'capitalize'); 16 var tp = type; 17 var br = ""; 18 var element = document.createElement("div"); 19 element.setAttribute("id", "result"); 20 for (i = 0; i < 10; i++) { 21 if (tp === 1) { 22 nameFem(); 23 while (nMs === "") { 24 nameFem(); 25 } 26 } else { 27 nameMas(); 28 while (nMs === "") { 29 nameMas(); 30 } 31 } 32 br = document.createElement('br'); 33 element.appendChild(document.createTextNode(nMs)); 34 element.appendChild(br); 35 } 36 if (document.getElementById("result")) { 37 document.getElementById("placeholder").removeChild(document.getElementById("result")); 38 } 39 document.getElementById("placeholder").appendChild(element); 40 } 41 42 function nameMas() { 43 nTp = Math.random() * 5 | 0; 44 rnd = Math.random() * nm1.length | 0; 45 rnd2 = Math.random() * nm2.length | 0; 46 rnd3 = Math.random() * nm5.length | 0; 47 if (nTp < 3) { 48 nMs = nm1[rnd] + nm4[rnd2] + nm5[rnd3]; 49 } else { 50 rnd5 = Math.random() * nm3.length | 0; 51 rnd4 = Math.random() * nm4.length | 0; 52 while (nm3[rnd5] === nm1[rnd] && nm3[rnd5] === nm5[rnd3]) { 53 rnd5 = Math.random() * nm3.length | 0; 54 } 55 while (rnd2 < 6 && rnd4 < 2) { 56 rnd4 = Math.random() * nm4.length | 0; 57 } 58 nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd5] + nm4[rnd4] + nm5[rnd3]; 59 } 60 testSwear(nMs); 61 } 62 63 function nameFem() { 64 nTp = Math.random() * 6 | 0; 65 rnd = Math.random() * nm8.length | 0; 66 rnd2 = Math.random() * nm9.length | 0; 67 rnd3 = Math.random() * nm14.length | 0; 68 rnd4 = Math.random() * nm10.length | 0; 69 rnd5 = Math.random() * nm11.length | 0; 70 while (nm8[rnd] === nm10[rnd4] || nm10[rnd4] === nm14[rnd3]) { 71 rnd4 = Math.random() * nm10.length | 0; 72 } 73 if (nTp < 4) { 74 nMs = nm8[rnd] + nm9[rnd2] + nm10[rnd4] + nm11[rnd5] + nm14[rnd3]; 75 } else { 76 rnd6 = Math.random() * nm12.length | 0; 77 rnd7 = Math.random() * nm13.length | 0; 78 while (nm10[rnd4] === nm12[rnd6] || nm12[rnd6] === nm14[rnd3]) { 79 rnd6 = Math.random() * nm12.length | 0; 80 } 81 nMs = nm8[rnd] + nm9[rnd2] + nm10[rnd4] + nm11[rnd5] + nm12[rnd6] + nm13[rnd7] + nm14[rnd3]; 82 } 83 }