haloSangheiliNames.js (2794B)
1 var nm1 = ["b", "c", "d", "f", "gr", "j", "k", "kh", "l", "mr", "n'th", "r", "rt", "s", "t", "th", "v", "x", "z", "", ""]; 2 var nm2 = ["a", "e", "i", "o", "u", "y"]; 3 var nm3 = ["da", "do", "g", "ga", "ha", "ka", "kan", "ko", "l", "la", "pa", "po", "r", "ra", "re", "ro", "s", "sa", "san", "so", "sze", "t", "ta", "tan", "to", "va", "vo", "vu", "za", "ze", "zo"]; 4 var nm4 = ["Cha", "Da", "Dra", "Ga", "Go", "Ha", "Ka", "Ko", "Kra", "Ku", "La", "Lo", "Lu", "Ma", "Mda", "Mo", "Mu", "Na", "Nra", "Nu", "Ra", "Re", "Ro", "Sa", "Sra", "Su", "Ta", "Te", "Tra", "Tu", "Va", "Vo", "Vra", "Vu", "Wa", "Za", "Zo", "Zu"]; 5 var nm5 = ["cam", "dam", "dom", "dum", "fam", "fum", "gam", "gram", "gum", "ham", "hom", "kam", "lcam", "lkam", "ma", "man", "nam", "ngam", "nom", "ntak", "ralum", "ram", "rom", "rum", "sam", "sov", "sum", "tam", "tan", "ttin", "tum", "vam", "vum", "zam", "zum"]; 6 var nm6 = ["b", "c", "d", "f", "h", "g", "k", "kh", "l", "m", "n", "r", "sh", "s", "t", "th", "v", "x", "z"]; 7 var nm7 = ["a", "e", "o", "u"]; 8 var nm8 = ["ea", "ha", "he", "ia", "ie", "io", "la", "le", "lo", "ma", "me", "mi", "mo", "n", "na", "ne", "pa", "sa", "se", "sha", "she", "so", "wa", "we", "xa", "xe", "xi", "ya", "ye", "yo"]; 9 var nm9 = ["", "", "ee", "", "ai"]; 10 11 function nameGen(type) { 12 $('#placeholder').css('textTransform', 'capitalize'); 13 var tp = type; 14 var br = ""; 15 var element = document.createElement("div"); 16 element.setAttribute("id", "result"); 17 for (i = 0; i < 10; i++) { 18 if (tp === 1) { 19 rnd = Math.floor(Math.random() * nm6.length); 20 rnd2 = Math.floor(Math.random() * nm7.length); 21 rnd3 = Math.floor(Math.random() * nm8.length); 22 rnd4 = Math.floor(Math.random() * nm4.length); 23 rnd5 = Math.floor(Math.random() * nm5.length); 24 rnd6 = Math.floor(Math.random() * nm9.length); 25 names = nm6[rnd] + nm7[rnd2] + nm8[rnd3] + " '" + nm4[rnd4] + nm5[rnd5] + nm9[rnd6]; 26 } else { 27 rnd = Math.floor(Math.random() * nm1.length); 28 rnd2 = Math.floor(Math.random() * nm2.length); 29 rnd3 = Math.floor(Math.random() * nm3.length); 30 rnd4 = Math.floor(Math.random() * nm4.length); 31 rnd5 = Math.floor(Math.random() * nm5.length); 32 rnd6 = Math.floor(Math.random() * nm9.length); 33 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + " '" + nm4[rnd4] + nm5[rnd5] + nm9[rnd6]; 34 } 35 br = document.createElement('br'); 36 element.appendChild(document.createTextNode(names)); 37 element.appendChild(br); 38 } 39 if (document.getElementById("result")) { 40 document.getElementById("placeholder").removeChild(document.getElementById("result")); 41 } 42 document.getElementById("placeholder").appendChild(element); 43 }