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.
34 lines
2.0 KiB
JavaScript
34 lines
2.0 KiB
JavaScript
var br = "";
|
|
var triggered = 0;
|
|
|
|
function nameGen() {
|
|
var nm1 = ["Afa", "Angel", "Avalan", "Avalanche", "Basalt", "Basselt", "Behemoth", "Bigby", "Boomboom", "Boulder", "Bulder", "Bulk", "Bulkie", "Carbon", "Carbonne", "Chaperon", "Chappie", "Clank", "Clay", "Claye", "Clayton", "Cobble", "Cobbles", "Colos", "Colossus", "Core", "Crayg", "Dune", "Duster", "Fe", "Fey", "Firmis", "Geo", "Geode", "Goliath", "Gollum", "Granit", "Granite", "Granius", "Grant", "Graund", "Grav", "Gravity", "Grime", "Grimes", "Grine", "Gritt", "Guardian", "Heavy", "Hercules", "Iro", "Irone", "Irony", "Jumbo", "Keeper", "Klunk", "Klunker", "Leviathan", "Lios", "Lutu", "Lutum", "Mammoth", "Mountain", "Oria", "Oris", "Pala", "Paladin", "Pebble", "Pulvi", "Pulvis", "Quarris", "Quary", "Ratchet", "Roc", "Rusty", "Senti", "Sentinel", "Sentinelle", "Shackle", "Slab", "Slait", "Slate", "Smeagol", "Sod", "Soile", "Stark", "Tank", "Tera", "Terberis", "Terbis", "Terbius", "Terra", "Terrane", "Terros", "Thera", "Theran", "Therris", "Titan", "Tony", "Turf", "Turve", "Umber", "Ward", "Warden", "Whop", "Whopper"];
|
|
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);
|
|
}
|
|
}
|