mgtCephalids.js (3291B)
1 var nm1 = ["a", "o", "", "", "", "", "", "", "", ""]; 2 var nm2 = ["b", "d", "g", "l", "ll", "m", "n", "r", "t", "v"]; 3 var nm3 = ["a", "o", "a", "o", "a", "o", "a", "o", "a", "o", "u", "e", "i"]; 4 var nm4 = ["c", "d", "dh", "g", "kh", "l", "ll", "n", "nn", "s", "ss", "sh", "t", "th", "tt", "v", "w", "z", "zh"]; 5 var nm5 = ["d", "l", "m", "n", "t", "th"]; 6 var nm6 = ["Abandoned", "Acclaimed", "Aggressive", "Agitated", "Ambitious", "Ancient", "Bitter", "Bold", "Broken", "Callous", "Careless", "Cautious", "Corrupt", "Corrupted", "Crooked", "Cruel", "Dangerous", "Defiant", "Delirious", "Deserted", "Devoted", "Diligent", "Discrete", "Dreary", "Eager", "Enraged", "Evil", "Fearless", "Fickle", "Forsaken", "Frightening", "Grand", "Grave", "Grim", "Gruesome", "Haunting", "Hideous", "Husky", "Infernal", "Juvenile", "Keen", "Livid", "Loathsome", "Lone", "Lost", "Lumbering", "Mad", "Mindless", "Monstrous", "Nasty", "Needy", "Noxious", "Obedient", "Petty", "Powerful", "Prime", "Ragged", "Rash", "Reckless", "Somber", "Spiteful", "Trifling", "Turbulent", "Unfit", "Useless", "Vicious", "Villainous", "Violent", "Weak", "Wicked", "Wild", "Woeful", "Wrathful", "Wretched", "Zealous"]; 7 var nm7 = ["Agent", "Aristocrat", "Broker", "Bully", "Chandler", "Charmer", "Conjurer", "Dealer", "Defacer", "Diviner", "Escort", "Explorer", "Guard", "Guardian", "Illusionist", "Informer", "Lookout", "Looter", "Mage", "Marauder", "Mediator", "Merchant", "Monger", "Negotiator", "Noble", "Operative", "Oppressor", "Outrider", "Overlord", "Overseer", "Patrician", "Patrol", "Pillager", "Pioneer", "Plunderer", "Ravager", "Recruiter", "Retailer", "Sage", "Scout", "Sentinel", "Sneak", "Soothsayer", "Spellbinder", "Spoiler", "Spy", "Taskmaster", "Trader", "Tyrant", "Vandal", "Vanguard", "Vendor", "Watcher"]; 8 var br = ""; 9 10 function nameGen() { 11 $('#placeholder').css('textTransform', 'capitalize'); 12 var element = document.createElement("div"); 13 element.setAttribute("id", "result"); 14 for (i = 0; i < 10; i++) { 15 rnd7 = Math.floor(Math.random() * nm6.length); 16 rnd8 = Math.floor(Math.random() * nm7.length); 17 if (i < 6) { 18 rnd = Math.floor(Math.random() * nm1.length); 19 rnd2 = Math.floor(Math.random() * nm2.length); 20 rnd3 = Math.floor(Math.random() * nm3.length); 21 rnd4 = Math.floor(Math.random() * nm4.length); 22 while (nm2[rnd2] === nm4[rnd4]) { 23 rnd4 = Math.floor(Math.random() * nm4.length); 24 } 25 rnd5 = Math.floor(Math.random() * nm3.length); 26 rnd6 = Math.floor(Math.random() * nm5.length); 27 while (nm5[rnd6] === nm4[rnd4]) { 28 rnd6 = Math.floor(Math.random() * nm5.length); 29 } 30 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm3[rnd5] + nm5[rnd6] + ", " + nm6[rnd7] + " " + nm7[rnd8]; 31 } else { 32 names = nm6[rnd7] + " " + nm7[rnd8]; 33 } 34 br = document.createElement('br'); 35 element.appendChild(document.createTextNode(names)); 36 element.appendChild(br); 37 } 38 if (document.getElementById("result")) { 39 document.getElementById("placeholder").removeChild(document.getElementById("result")); 40 } 41 document.getElementById("placeholder").appendChild(element); 42 }