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.
45 lines
3.1 KiB
JavaScript
45 lines
3.1 KiB
JavaScript
var nm1 = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
|
|
var nm2 = ["", "-", "-", "-"];
|
|
var nm3 = ["Abyss", "Advance ", "Aftermath ", "Alarm", "Ambush ", "Anarchy ", "Arch", "Ash", "Awe", "Bait", "Bane", "Barrage ", "Battle", "Bench", "Blade", "Blast ", "Blitz ", "Blizzard ", "Blood", "Bomb", "Bone", "Brake", "Brave ", "Brawl", "Break", "Brute ", "Burst ", "Buster", "Camo", "Cannon", "Chain", "Chaos", "Charge ", "Chasm ", "Chemic", "Cloud", "Coil", "Core ", "Coup", "Courage ", "Coven", "Cover", "Crash", "Crown", "Crush", "Cyclone ", "Dark ", "Dawn", "Decoy ", "Detonation ", "Dire ", "Dirt", "Dock", "Dread ", "Droid ", "Dusk", "Dust", "Eclipse ", "Edge", "End", "Eradictation ", "Fall ", "Fear ", "Fire", "Flock", "Fog", "Force ", "Frost", "Fury ", "Galaxy ", "Ghost", "Glacier", "Gravity ", "Hammer ", "Hate ", "Havoc ", "Hook", "Hysteria ", "Ice ", "Inferno ", "Infinity ", "Invasion ", "Ire ", "Light ", "Lunar", "Mad", "Mania ", "Master ", "Maverick ", "Mayhem ", "Mist ", "Moon", "Mud", "Night", "Orbital ", "Order ", "Panic ", "Patriot ", "Pestilence ", "Phantom ", "Phase", "Photo", "Plasma", "Power ", "Pressure ", "Prism ", "Prison ", "Probe ", "Pulse", "Quake", "Rage ", "Rampage ", "Rebel ", "Reform ", "Requiem ", "Rift ", "Risk", "Royal ", "Ruin", "Rush ", "Salt ", "Shade", "Shifter ", "Siege ", "Skirmish ", "Snow", "Solar", "Solo ", "Spite ", "Stress", "Strike", "Strike ", "Synth ", "Task", "Tempest ", "Throne ", "Thunder", "Torrent ", "Trail", "Trauma ", "Tremor", "Vault ", "Veil", "Victory ", "Whip", "Wing", "Wreck"];
|
|
var br = "";
|
|
|
|
function nameGen() {
|
|
$('#placeholder').css('textTransform', 'capitalize');
|
|
var element = document.createElement("div");
|
|
element.setAttribute("id", "result");
|
|
for (i = 0; i < 10; i++) {
|
|
if (i < 5) {
|
|
nTp = Math.random() * 4 | 0;
|
|
if (nTp === 0) {
|
|
rnd = Math.random() * 9999 | 0;
|
|
names = rnd;
|
|
} else {
|
|
rnd = Math.random() * 999 | 0;
|
|
rnd2 = Math.random() * nm1.length | 0;
|
|
rnd5 = Math.random() * nm2.length | 0;
|
|
if (nTp === 1) {
|
|
names = nm1[rnd2] + nm2[rnd5] + rnd;
|
|
} else {
|
|
rnd3 = Math.random() * nm1.length | 0;
|
|
if (nTp < 3) {
|
|
names = nm1[rnd2] + nm1[rnd3] + nm2[rnd5] + rnd;
|
|
} else {
|
|
rnd4 = Math.random() * nm1.length | 0;
|
|
names = nm1[rnd2] + nm1[rnd3] + nm1[rnd4] + nm2[rnd5] + rnd;
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
rnd = Math.random() * nm3.length | 0;
|
|
names = nm3[rnd] + "trooper";
|
|
}
|
|
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);
|
|
}
|