drWhoSontaranNames.js (3841B)
1 var nm1 = ["B", "Br", "D", "Dr", "Gr", "J", "K", "Kr", "L", "N", "M", "S", "Sk", "Sn", "St", "T", "Tr", "V", "Vr"]; 2 var nm2 = ["a", "e", "i", "o", "u", "y", "aa", "ee"]; 3 var nm3 = ["g", "gg", "gt", "gh", "k", "kt", "kk", "l", "ll", "nt", "nx", "r", "rl", "rr", "rk", "rn", "rg", "sk"]; 4 var nm4 = ["a", "e", "i", "o", "u"]; 5 var nm5 = ["d", "g", "gr", "j", "k", "kr", "l", "mt", "ng", "nt", "r", "rt", "rn", "st", "ts", "th", "v"]; 6 var nm6 = ["", "", "g", "k", "l", "m", "n", "r", "x"]; 7 var nm7 = ["Adept", "Admired", "Aggressive", "Aggressor", "Agile", "Ambitious", "Assassin", "Avenger", "Beast", "Behemoth", "Bloodbringer", "Bloodhunter", "Bloodied", "Bold", "Brave", "Brilliant", "Brutal", "Butcher", "Champion", "Clever", "Corruptor", "Crafty", "Crooked", "Cunning", "Danger", "Dapper", "Defiant", "Diligent", "Doombringer", "Eliminator", "Enforcer", "Enormous", "Exalted", "Executioner", "Expert", "Fearless", "Glorious", "Grand", "Great", "Hunter", "Illustrious", "Immortal", "Incredible", "Infamous", "Inventor", "Killer", "Knowing", "Loyal", "Magnificent", "Marvelous", "Master", "Masterful", "Menace", "Merciless", "Mighty", "Paragon", "Powerful", "Prestigious", "Proud", "Razor", "Reckless", "Reliable", "Ruthless", "Slayer", "Sneaky", "Stark", "Stout", "Strong", "Terrific", "Terror", "Turbulent", "Undefeated", "Valiant", "Vengeful", "Victorious", "Vigilant", "Warlord", "Warmonger", "Warrior", "Wild", "Wonderful", "Wrathful", "Wretched", "Zealous"]; 8 var nm8 = ["B", "D", "G", "J", "K", "L", "N", "M", "S", "T", "V"]; 9 var nm9 = ["d", "g", "gg", "gr", "k", "kr", "kk", "l", "ll", "ng", "n", "nn", "r", "rl", "rr", "rk", "rn", "rg", "st", "sk", "th", "v"]; 10 11 function nameGen() { 12 var br = ""; 13 var element = document.createElement("div"); 14 element.setAttribute("id", "result"); 15 for (i = 0; i < 10; i++) { 16 rnd = Math.floor(Math.random() * nm1.length); 17 rnd7 = Math.floor(Math.random() * nm8.length); 18 rnd8 = Math.floor(Math.random() * nm4.length); 19 rnd9 = Math.floor(Math.random() * nm9.length); 20 rnd10 = Math.floor(Math.random() * nm4.length); 21 rnd11 = Math.floor(Math.random() * nm6.length); 22 if (i < 5) { 23 rnd2 = Math.floor(Math.random() * nm2.length); 24 rnd3 = Math.floor(Math.random() * nm3.length); 25 rnd4 = Math.floor(Math.random() * nm7.length); 26 names = nm8[rnd7] + nm4[rnd8] + nm9[rnd9] + nm4[rnd10] + nm6[rnd11] + " " + nm1[rnd] + nm2[rnd2] + nm3[rnd3] + " the " + nm7[rnd4]; 27 } else if (i < 8) { 28 rnd2 = Math.floor(Math.random() * nm4.length); 29 rnd3 = Math.floor(Math.random() * nm5.length); 30 rnd4 = Math.floor(Math.random() * nm4.length); 31 rnd5 = Math.floor(Math.random() * nm6.length); 32 rnd6 = Math.floor(Math.random() * nm7.length); 33 names = nm8[rnd7] + nm4[rnd8] + nm9[rnd9] + nm4[rnd10] + nm6[rnd11] + " " + nm1[rnd] + nm4[rnd2] + nm5[rnd3] + nm4[rnd4] + nm6[rnd5] + " the " + nm7[rnd6]; 34 } else { 35 rnd2 = Math.floor(Math.random() * nm4.length); 36 rnd3 = Math.floor(Math.random() * nm5.length); 37 rnd4 = Math.floor(Math.random() * nm4.length); 38 rnd5 = Math.floor(Math.random() * nm3.length); 39 rnd6 = Math.floor(Math.random() * nm7.length); 40 names = nm8[rnd7] + nm4[rnd8] + nm9[rnd9] + nm4[rnd10] + nm6[rnd11] + " " + nm1[rnd] + nm4[rnd2] + nm5[rnd3] + nm4[rnd4] + nm3[rnd5] + " the " + nm7[rnd6]; 41 } 42 br = document.createElement('br'); 43 element.appendChild(document.createTextNode(names)); 44 element.appendChild(br); 45 } 46 if (document.getElementById("result")) { 47 document.getElementById("placeholder").removeChild(document.getElementById("result")); 48 } 49 document.getElementById("placeholder").appendChild(element); 50 }