You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
3.9 KiB
JavaScript
59 lines
3.9 KiB
JavaScript
var nm1 = ["", "", "", "", "c", "f", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "sh", "t", "w", "z"];
|
|
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", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "ee", "ae", "ou", "uo", "ui", "ao", "uu", "ai", "ue", "yu", "yo", "ya", "ai", "ay"];
|
|
var nm3 = ["b", "g", "j", "l", "m", "mb", "nnsh", "nsh", "r", "s", "s", "s", "sh", "sh", "sh", "sh", "shj", "ss", "ss", "ss", "ssh", "ssh", "t", "th", "z"];
|
|
var nm4 = ["b", "g", "j", "l", "l", "m", "m", "r", "r", "s", "ss", "t", "t", "th", "th", "z", "z"];
|
|
var nm5 = ["a", "e", "i", "o", "u"];
|
|
var nm6 = ["", "", "", "", "", "hn", "hl", "l", "m", "n", "ng", "r", "s", "sh", "th"];
|
|
var nm7 = ["Adventurous", "Agile", "Ambitious", "Aqualyte", "Aquatic", "Austere", "Beastmaster", "Bold", "Brainy", "Brave", "Bright", "Brilliant", "Bubblemaker", "Carefree", "Cheerful", "Cheery", "Clever", "Confident", "Curious", "Delightful", "Dependable", "Determined", "Dexterous", "Dutiful", "Eel-Charmer", "Elder", "Euphoric", "Faithful", "Fascinated", "Fisherman", "Frugal", "Generous", "Gentle", "Golden", "Graceful", "Happy", "Helpful", "Honest", "Kind", "Little", "Lively", "Lucky", "Mellow", "Metalworker", "Modest", "Mysterious", "Nimble", "Observant", "Optimistic", "Outgoing", "Peaceful", "Pearldiver", "Pearlkeeper", "Pearlshaper", "Pearlwarden", "Pearlwatcher", "Perfumed", "Pleasant", "Pondshaper", "Pondspeaker", "Pondtaster", "Pondwarden", "Pondwatcher", "Poolshaper", "Poolspeaker", "Pooltaster", "Poolwarden", "Poolwatcher", "Precious", "Pristine", "Protective", "Punctual", "Quick", "Radiant", "Rapid", "Reliable", "Rivershaper", "Riverspeaker", "Rivertaster", "Riverwarden", "Riverwatcher", "Scrollmaker", "Seeker", "Serious", "Sharp", "Silent", "Silkmaker", "Sincere", "Smiling", "Splasher", "Springtender", "Steepmaster", "Strong", "Swift", "Thirsty", "Tired", "Tranquil", "Trusty", "Vigilant", "Wandering", "Watershaper", "Waterspeaker", "Watertaster", "Waterwarden", "Waterwatcher", "Waterworker", "Wise", "Young"];
|
|
var br = "";
|
|
|
|
function nameGen(type) {
|
|
var tp = type;
|
|
$('#placeholder').css('textTransform', 'capitalize');
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
nameMas();
|
|
while (nMs === "") {
|
|
nameMas();
|
|
}
|
|
rnd = Math.random() * nm7.length | 0;
|
|
names = nm7[rnd] + " " + nMs;
|
|
br = document.createElement('br');
|
|
element.appendChild(document.createTextNode(names));
|
|
element.appendChild(br);
|
|
}
|
|
if (document.getElementById("result")) {
|
|
document.getElementById("placeholder").removeChild(document.getElementById("result"));
|
|
}
|
|
document.getElementById("placeholder").appendChild(element);
|
|
}
|
|
|
|
function nameMas() {
|
|
nTp = Math.random() * 6 | 0;
|
|
rnd = Math.random() * nm1.length | 0;
|
|
rnd2 = Math.random() * nm2.length | 0;
|
|
rnd3 = Math.random() * nm6.length | 0;
|
|
if (nTp < 2) {
|
|
while (nm1[rnd] === nm6[rnd3]) {
|
|
rnd = Math.random() * nm1.length | 0;
|
|
}
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm6[rnd3];
|
|
} else if (nTp < 4) {
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
rnd5 = Math.random() * nm5.length | 0;
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm5[rnd5] + nm6[rnd3];
|
|
} else {
|
|
rnd4 = Math.random() * nm3.length | 0;
|
|
rnd5 = Math.random() * nm5.length | 0;
|
|
rnd6 = Math.random() * nm4.length | 0;
|
|
rnd7 = Math.random() * nm5.length | 0;
|
|
if (nTp === 4) {
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm5[rnd5] + nm4[rnd6] + nm5[rnd7] + nm6[rnd3];
|
|
} else {
|
|
nMs = nm1[rnd] + nm2[rnd2] + nm4[rnd6] + nm5[rnd7] + nm3[rnd4] + nm5[rnd5] + nm6[rnd3];
|
|
}
|
|
}
|
|
testSwear(nMs);
|
|
}
|