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.

33 lines
1.8 KiB
JavaScript

var br = "";
function nameGen() {
var nm1 = ["Bawlie", "Bello", "Bellow", "Blah", "Blare", "Blast", "Blaster", "Blue", "Booboo", "Boohoo", "Bummer", "Chagrin", "Chagrine", "Choly", "Dash", "Deso", "Dismal", "Doldrum", "Dole", "Dolor", "Drearie", "Drifter", "Dumps", "Floatie", "Frett", "Geist", "Gloom", "Glumglum", "Glyde", "Glydle", "Haunt", "Haunter", "Howl", "Howlie", "Lament", "Lamente", "Malaise", "Melan", "Melancholy", "Mewl", "Mewlie", "Mopes", "Mopey", "Mops", "Morbe", "Morbie", "Pessie", "Phantom", "Polter", "Screak", "Screaker", "Screamie", "Screech", "Scuddle", "Shriek", "Shrieker", "Skreak", "Sniffle", "Sniffler", "Snivel", "Sobbie", "Sorrow", "Spaire", "Spook", "Squeal", "Squealer", "Squealie", "Tonia", "Tragedy", "Trouble", "Troubles", "Vex", "Wailie", "Wayle", "Weep", "Weeper", "Weepie", "Whimper", "Whine", "Whiney", "Woe", "Yammer", "Yelp", "Yelper", "Yowlie"];
var element = document.createElement("div");
element.setAttribute("id", "result");
nTp = Math.random() * 50 | 0;
if (nTp === 0 && first !== 0 && triggered === 0) {
nTp = Math.random() * 5 | 0;
if (nTp === 0) {
creeper();
} else if (nTp < 3) {
herobrine();
} else {
enderman();
}
} else {
for (i = 0; i < 10; i++) {
rnd = Math.random() * nm1.length | 0;
nMs = nm1[rnd];
nm1.splice(rnd, 1);
br = document.createElement('br');
element.appendChild(document.createTextNode(nMs));
element.appendChild(br);
}
first++;
if (document.getElementById("result")) {
document.getElementById("placeholder").removeChild(document.getElementById("result"));
}
document.getElementById("placeholder").appendChild(element);
}
}