mgtTroll.js (4809B)
1 var nm1 = ["b", "bh", "br", "d", "dh", "dr", "g", "gh", "gr", "kh", "khr", "r", "th", "tr", "thr", "v", "z", "zh"]; 2 var nm2 = ["u", "u", "u", "u", "u", "o", "a"]; 3 var nm3 = ["b", "bv", "bb", "bl", "d", "dd", "dr", "dv", "dz", "g", "gg", "gl", "gn", "gv", "gz", "k", "kk", "kl", "kv", "lb", "ld", "lg", "l", "ll", "ln", "lr", "lt", "lz", "lv", "m", "md", "mg", "ml", "mr", "mz", "nd", "nv", "nz", "nl", "nd", "ndr", "ng", "ngr", "ngb", "ngz", "r", "rr", "rl", "rv", "rz", "v", "vl", "vn", "z", "zd", "zg", "zl", "zn"]; 4 var nm4 = ["c", "d", "g", "l", "lg", "ld", "n", "ng", "nd", "rd", "rg"]; 5 var nm5 = ["amber", "ash", "bitter", "blaze", "blunt", "bone", "boulder", "brick", "bristle", "broad", "cave", "cinder", "claw", "crag", "dim", "dirge", "dust", "far", "fern", "flask", "flint", "fog", "fore", "forge", "gloom", "grand", "gravel", "grim", "heavy", "hill", "horn", "keen", "krag", "lone", "low", "moss", "mourn", "mud", "oat", "orb", "pale", "pyre", "rend", "saur", "shadow", "skull", "sky", "slate", "snake", "spore", "stone", "tall", "terra", "tree", "tusk", "whit", "wild"]; 6 var nm6 = ["back", "bane", "beam", "belly", "belt", "bend", "blade", "blight", "bough", "braid", "branch", "brand", "breath", "brew", "bridge", "brow", "claw", "crag", "crest", "flare", "flaw", "force", "fury", "gaze", "grip", "grog", "gut", "hide", "hood", "horn", "howl", "husk", "jaw", "lance", "lash", "limb", "lock", "mane", "mark", "maw", "scar", "scrub", "shard", "shroud", "snarl", "spine", "stride", "strike", "stub", "surge", "toe", "trap"]; 7 var nm7 = ["Aggressor", "Assailant", "Barbarian", "Battler", "Brawler", "Bruiser", "Brute", "Bully", "Castaway", "Degenerate", "Derelict", "Exile", "Fiend", "Hireling", "Merc", "Mercenary", "Outcast", "Sadist", "Savage", "Scrapper", "Shaman", "Slugger", "Troll", "Troll", "Troll", "Troll", "Troll", "Troll", "Troll", "Troll", "Troll", "Troll", "Troll", "Troll", "Troll", "Trow", "Trow", "Trow", "Trow", "Trow", "Trow", "Vagabond", "Vagrant", "Warrior", "Wildcat", "Wildling", "Wretch"]; 8 var nm8 = ["Abandoned", "Aching", "Aged", "Aggressive", "Albino", "Ancient", "Angry", "Anxious", "Arctic", "Bitter", "Blind", "Bony", "Broken", "Bruised", "Bush", "Careless", "Cave", "Cavern", "Charging", "Clever", "Clueless", "Clumsy", "Colossal", "Confused", "Corrupt", "Corrupted", "Crafty", "Crooked", "Cruel", "Defiant", "Diligent", "Dull", "Eager", "Elder", "Enraged", "Fearless", "Feisty", "Fickle", "Forest", "Forsaken", "Fungus", "Gloomy", "Grave", "Greedy", "Grim", "Grotesque", "Harvester", "Haunting", "Hedge", "Hidden", "Horned", "Hungry", "Hunting", "Jaded", "Jungle", "Juvenile", "Lanky", "Limping", "Lone", "Lost", "Lumbering", "Marsh", "Meager", "Mountain", "Noxious", "Numb", "Oblivious", "Ocean", "Powerful", "Primal", "Prime", "Pygmy", "Rash", "Reckless", "River", "Sea", "Selfish", "Shady", "Shameless", "Skinny", "Sneaking", "Sneaky", "Sniveling", "Swamp", "Swift", "Troubled", "Twin", "Vicious", "Vile", "Wicked", "Wrathful", "Wretched"]; 9 var br = ""; 10 11 function nameGen() { 12 $('#placeholder').css('textTransform', 'capitalize'); 13 var element = document.createElement("div"); 14 element.setAttribute("id", "result"); 15 for (i = 0; i < 10; i++) { 16 if (i < 6) { 17 rnd = Math.random() * nm1.length | 0; 18 rnd2 = Math.random() * nm2.length | 0; 19 rnd3 = Math.random() * nm4.length | 0; 20 while (nm4[rnd3] === nm1[rnd]) { 21 rnd3 = Math.random() * nm4.length | 0; 22 } 23 if (i < 3) { 24 names = nm1[rnd] + nm2[rnd2] + nm4[rnd3]; 25 } else { 26 rnd4 = Math.random() * nm3.length | 0; 27 rnd5 = Math.random() * nm2.length | 0; 28 while (nm4[rnd3] === nm3[rnd4]) { 29 rnd4 = Math.random() * nm3.length | 0; 30 } 31 names = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm2[rnd5] + nm4[rnd3]; 32 } 33 } else if (i < 8) { 34 rnd = Math.random() * nm5.length | 0; 35 rnd2 = Math.random() * nm6.length | 0; 36 while (nm5[rnd] === nm6[rnd2]) { 37 rnd2 = Math.random() * nm6.length | 0; 38 } 39 rnd3 = Math.random() * nm7.length | 0; 40 names = nm5[rnd] + nm6[rnd2] + " " + nm7[rnd3]; 41 } else { 42 rnd = Math.random() * nm8.length | 0; 43 rnd2 = Math.random() * nm7.length | 0; 44 names = nm8[rnd] + " " + nm7[rnd2]; 45 } 46 br = document.createElement('br'); 47 element.appendChild(document.createTextNode(names)); 48 element.appendChild(br); 49 } 50 if (document.getElementById("result")) { 51 document.getElementById("placeholder").removeChild(document.getElementById("result")); 52 } 53 document.getElementById("placeholder").appendChild(element); 54 }