mgtHumans.js (15865B)
1 var nm1 = ["", "", "", "b", "c", "cr", "d", "dr", "g", "l", "n", "r", "t", "tr", "v"]; 2 var nm2 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "ai", "ie", "ea", "ia"]; 3 var nm3 = ["d", "dr", "dd", "g", "gr", "gn", "kn", "kk", "kr", "l", "ll", "lr", "lb", "lv", "ng", "nd", "nv", "r", "rc", "rr", "rk", "rt", "sr", "v", "vr", "x"]; 4 var nm4 = ["d", "m", "n", "r", "t", "y", "z"]; 5 var nm5 = ["", "", "", "c", "d", "l", "n", "r", "s", "x"]; 6 var nm6 = ["", "", "", "", "", "ch", "f", "h", "j", "l", "m", "n", "ph", "s", "sh", "th", "v", "y"]; 7 var nm7 = ["a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "ou", "ia", "ea", "ae", "ei", "ie"]; 8 var nm8 = ["d", "dr", "l", "ll", "lm", "ln", "lv", "m", "mm", "n", "ndr", "nr", "nl", "ng", "nth", "r", "rr", "rl", "sm", "s", "st", "sh", "t", "th", "x", "y", "z"]; 9 var nm9 = ["l", "ll", "ly", "m", "n", "nt", "nz", "r", "rr", "s", "sh", "v", "x"]; 10 var nm10 = ["b", "br", "c", "d", "g", "gr", "j", "k", "l", "m", "s", "t", "v", "z"]; 11 var nm11 = ["a", "e", "i", "o", "u"]; 12 var nm12 = ["ct", "cn", "cc", "ddl", "dr", "dk", "dl", "gss", "gz", "gs", "kk", "kt", "ks", "ll", "ld", "lld", "lv", "ltr", "nc", "ntr", "nd", "nk", "nz", "rc", "rtr", "rk", "rs", "rn", "st", "sc", "shc", "ts", "tk", "zc", "ztr"]; 13 var nm13 = ["c", "n", "ns", "nd", "r", "rd", "s", "ss"]; 14 var nm15 = ["alpen", "amber", "ash", "autumn", "axe", "barley", "battle", "bear", "black", "blade", "blaze", "blood", "blue", "bone", "boulder", "bright", "bronze", "burning", "cask", "chest", "cinder", "clan", "claw", "clear", "cliff", "cloud", "cold", "common", "coven", "crag", "crest", "crow", "crystal", "dark", "dawn", "day", "dead", "death", "deep", "dew", "dirge", "distant", "doom", "down", "dragon", "dream", "dusk", "dust", "eagle", "earth", "elf", "ember", "even", "fallen", "far", "farrow", "feather", "fern", "fire", "fist", "flame", "flat", "flint", "fog", "fore", "forest", "four", "free", "frost", "frozen", "full", "fuse", "gloom", "glory", "glow", "gold", "gore", "grand", "grass", "gray", "great", "green", "grizzly", "hallow", "hallowed", "hammer", "hard", "haven", "hawk", "haze", "heart", "heavy", "hell", "high", "hill", "holy", "honor", "horse", "humble", "hydra", "ice", "iron", "keen", "laughing", "leaf", "light", "lightning", "lion", "lone", "long", "low", "luna", "marble", "marsh", "master", "meadow", "mild", "mirth", "mist", "molten", "monster", "moon", "morning", "moss", "mountain", "mourn", "mourning", "nether", "nickle", "night", "noble", "nose", "oat", "ocean", "orb", "pale", "peace", "phoenix", "pine", "plain", "pride", "proud", "pyre", "rage", "rain", "rapid", "raven", "red", "regal", "rich", "river", "rock", "rose", "rough", "rumble", "rune", "sacred", "sage", "saur", "sea", "serpent", "shade", "shadow", "sharp", "shield", "silent", "silver", "simple", "single", "skull", "sky", "slate", "smart", "snake", "snow", "soft", "solid", "spider", "spirit", "spring", "stag", "star", "steel", "stern", "still", "stone", "storm", "stout", "strong", "summer", "sun", "swift", "tall", "tarren", "terra", "three", "thunder", "titan", "tree", "true", "truth", "tusk", "twilight", "two", "void", "war", "water", "wheat", "whisper", "whit", "white", "wild", "willow", "wind", "winter", "wise", "wolf", "wood", "wooden", "wyvern", "young"]; 15 var nm16 = ["arm", "arrow", "ash", "axe", "bane", "bash", "basher", "beam", "beard", "belly", "bend", "bender", "binder", "blade", "blaze", "bleeder", "blight", "blood", "bloom", "blossom", "blower", "bluff", "bone", "bough", "bow", "brace", "braid", "branch", "brand", "breaker", "breath", "breeze", "brew", "bringer", "brook", "brooke", "brow", "caller", "chaser", "chewer", "claw", "cleaver", "cloud", "crag", "creek", "crest", "crusher", "cut", "cutter", "dancer", "dane", "dew", "doom", "down", "draft", "dream", "dreamer", "drifter", "dust", "eye", "eyes", "fall", "fallow", "fang", "feather", "fire", "fist", "flame", "flare", "flaw", "flayer", "flow", "flower", "follower", "force", "forest", "forge", "fury", "gaze", "gazer", "gem", "glade", "gleam", "glide", "gloom", "glory", "glow", "grain", "grip", "grove", "guard", "gust", "hair", "hammer", "hand", "heart", "hell", "helm", "hide", "horn", "hunter", "jumper", "keep", "keeper", "killer", "lance", "lash", "leaf", "less", "light", "mane", "mantle", "mark", "maul", "maw", "might", "moon", "more", "mourn", "oak", "orb", "ore", "peak", "pelt", "pike", "punch", "rage", "reaper", "reaver", "rider", "ridge", "ripper", "river", "roar", "rock", "root", "run", "runner", "scar", "scream", "scribe", "seeker", "shade", "shadow", "shaper", "shard", "shield", "shine", "shot", "shout", "singer", "sky", "slayer", "snarl", "snout", "snow", "soar", "song", "sorrow", "spark", "spear", "spell", "spire", "spirit", "splitter", "sprinter", "stalker", "star", "steam", "steel", "stone", "stream", "strength", "stride", "strider", "strike", "striker", "sun", "surge", "swallow", "swift", "sword", "sworn", "tail", "taker", "talon", "thorn", "thorne", "tide", "toe", "track", "trap", "trapper", "tree", "vale", "valor", "vigor", "walker", "ward", "watcher", "water", "weaver", "whirl", "whisk", "whisper", "willow", "wind", "winds", "wing", "wolf", "wood", "woods", "wound"]; 16 var nm17 = ["b", "ch", "d", "f", "g", "h", "j", "l", "m", "q", "sh", "t", "x", "y", "z", "zh"]; 17 var nm18 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "ia", "ua", "oa", "ai", "uo", "iu", "iao"]; 18 var nm19 = ["b", "ch", "h", "j", "l", "m", "nch", "nf", "ng", "ngf", "ngg", "ngh", "ngp", "ngw", "ngsh", "ngz", "ngzh", "nh", "nj", "nl", "nm", "nsh", "ny", "q", "sh", "t", "w", "x"]; 19 var nm20 = ["", "", "", "", "n", "ng"]; 20 var nm21 = ["b", "ch", "d", "f", "h", "j", "l", "m", "n", "q", "r", "sh", "x", "y", "z"]; 21 var nm22 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "eu", "iao", "iu", "ei", "uia", "ia", "ao", "ui", "ua"]; 22 var nm23 = ["d", "f", "h", "j", "l", "nd", "nf", "ng", "ngch", "ngj", "ngm", "ngzh", "nh", "nm", "nr", "nt", "nx", "ny", "nzh", "q", "sh", "t", "w", "zh"]; 23 var nm25 = ["b", "ch", "d", "f", "g", "h", "j", "k", "m", "n", "r", "ry", "s", "sh", "t", "ts", "w", "y"]; 24 var nm26 = ["a", "e", "i", "o", "u"]; 25 var nm27 = ["b", "ch", "d", "g", "j", "k", "m", "n", "nj", "nn", "np", "nt", "nz", "r", "s", "sh", "t", "ts", "w", "y", "z"]; 26 var nm28 = ["Aberrant", "Abyssal", "Academy", "Accursed", "Advanced", "Aerie", "Afflicted", "Agile", "Alabaster", "Ancestral", "Ancient", "Angelic", "Arcane", "Bandit", "Battle", "Bold", "Brilliant", "Bruised", "Defiant", "Delirious", "Deserted", "Devoted", "Dutiful", "Exalted", "Fearless", "Focused", "Forsaken", "Fury", "Gifted", "Grand", "Grim", "Hidden", "Honorable", "Humble", "Lone", "Lost", "Loyal", "Minor", "Mysterious", "Nervous", "Nimble", "Obedient", "Old", "Powerful", "Prime", "Proud", "Reckless", "Remorseful", "Royal", "Shady", "Silent", "Stark", "Suspicious", "Swift", "Venerated", "Vengeful", "Vigilant", "Violent", "Wicked", "Wild", "Worn", "Wretched", "Zephyr"]; 27 var nm29 = ["Adept", "Arcanist", "Archer", "Artisan", "Bard", "Bladeweaver", "Champion", "Cleric", "Conjurer", "Dancer", "Escort", "Explorer", "Guard", "Guardian", "Gunslinger", "Hero", "Hunter", "Illusionist", "Infiltrator", "Inquisitor", "Journeyman", "Keeper", "Knight", "Legionnaire", "Lookout", "Mage", "Marine", "Mechanic", "Mercenary", "Minion", "Navigator", "Outrider", "Paratrooper", "Patrol", "Pilot", "Ranger", "Recruit", "Recruiter", "Rider", "Rogue", "Runner", "Sage", "Scavenger", "Scout", "Seer", "Sentinel", "Shepherd", "Shieldguard", "Soldier", "Specialist", "Spellweaver", "Spy", "Stormsinger", "Technician", "Tender", "Trooper", "Vanguard", "Veteran", "Warden", "Warmonger", "Warrior", "Watch", "Watcher", "Weaver"]; 28 var br = ""; 29 30 function nameGen(type) { 31 $('#placeholder').css('textTransform', 'capitalize'); 32 var tp = type; 33 var element = document.createElement("div"); 34 element.setAttribute("id", "result"); 35 for (i = 0; i < 10; i++) { 36 if (i % 3 === 0) { 37 rnd = Math.floor(Math.random() * nm10.length); 38 rnd2 = Math.floor(Math.random() * nm11.length); 39 rnd3 = Math.floor(Math.random() * nm13.length); 40 lName = nm10[rnd] + nm11[rnd2] + nm13[rnd3]; 41 } else if (i % 2 === 0) { 42 rnd = Math.floor(Math.random() * nm10.length); 43 rnd2 = Math.floor(Math.random() * nm11.length); 44 rnd3 = Math.floor(Math.random() * nm12.length); 45 rnd4 = Math.floor(Math.random() * nm11.length); 46 rnd5 = Math.floor(Math.random() * nm13.length); 47 lName = nm10[rnd] + nm11[rnd2] + nm12[rnd3] + nm11[rnd4] + nm13[rnd5]; 48 } else { 49 rnd = Math.floor(Math.random() * nm15.length); 50 rnd2 = Math.floor(Math.random() * nm16.length); 51 while (nm15[rnd] === nm16[rnd2]) { 52 rnd2 = Math.floor(Math.random() * nm16.length); 53 } 54 lName = nm15[rnd] + nm16[rnd2]; 55 } 56 if (tp === 1) { 57 if (i < 4) { 58 rnd = Math.floor(Math.random() * nm6.length); 59 rnd2 = Math.floor(Math.random() * nm7.length); 60 rnd3 = Math.floor(Math.random() * nm8.length); 61 rnd4 = Math.floor(Math.random() * nm7.length); 62 while (nm8[rnd3] === nm6[rnd]) { 63 rnd3 = Math.floor(Math.random() * nm8.length); 64 } 65 if (i < 2) { 66 names = nm6[rnd] + nm7[rnd2] + nm8[rnd3] + nm7[rnd4] + " " + lName; 67 } else { 68 rnd5 = Math.floor(Math.random() * nm9.length); 69 rnd6 = Math.floor(Math.random() * nm7.length); 70 names = nm6[rnd] + nm7[rnd2] + nm8[rnd3] + nm7[rnd4] + nm9[rnd5] + nm7[rnd6] + " " + lName; 71 } 72 } else if (i < 6) { 73 rnd = Math.floor(Math.random() * nm21.length); 74 rnd2 = Math.floor(Math.random() * nm22.length); 75 rnd3 = Math.floor(Math.random() * nm20.length); 76 rnd4 = Math.floor(Math.random() * nm21.length); 77 rnd5 = Math.floor(Math.random() * nm22.length); 78 rnd6 = Math.floor(Math.random() * nm23.length); 79 rnd7 = Math.floor(Math.random() * nm22.length); 80 rnd8 = Math.floor(Math.random() * nm20.length); 81 if (i < 5) { 82 names = nm21[rnd] + nm22[rnd2] + nm20[rnd3] + " " + nm21[rnd4] + nm22[rnd5] + nm23[rnd6] + nm22[rnd7] + nm20[rnd8]; 83 } else { 84 names = nm21[rnd4] + nm22[rnd5] + nm23[rnd6] + nm22[rnd7] + nm20[rnd8] + " " + nm21[rnd] + nm22[rnd2] + nm20[rnd3]; 85 } 86 } else if (i < 8) { 87 rnd = Math.floor(Math.random() * nm25.length); 88 rnd2 = Math.floor(Math.random() * nm26.length); 89 rnd3 = Math.floor(Math.random() * nm27.length); 90 rnd4 = Math.floor(Math.random() * nm26.length); 91 rnd5 = Math.floor(Math.random() * nm27.length); 92 rnd6 = Math.floor(Math.random() * nm26.length); 93 rnd7 = Math.floor(Math.random() * nm25.length); 94 rnd8 = Math.floor(Math.random() * nm26.length); 95 rnd9 = Math.floor(Math.random() * nm27.length); 96 rnd10 = Math.floor(Math.random() * nm26.length); 97 if (i < 7) { 98 names = nm25[rnd] + nm26[rnd2] + nm27[rnd3] + nm26[rnd4] + nm27[rnd5] + nm26[rnd6] + " " + nm25[rnd7] + nm26[rnd8] + nm27[rnd9] + nm26[rnd10]; 99 } else { 100 names = nm25[rnd7] + nm26[rnd8] + nm27[rnd9] + nm26[rnd10] + " " + nm25[rnd] + nm26[rnd2] + nm27[rnd3] + nm26[rnd4] + nm27[rnd5] + nm26[rnd6]; 101 } 102 } else { 103 rnd = Math.floor(Math.random() * nm28.length); 104 rnd2 = Math.floor(Math.random() * nm29.length); 105 names = nm28[rnd] + " " + nm29[rnd2]; 106 } 107 } else { 108 if (i < 4) { 109 rnd = Math.floor(Math.random() * nm1.length); 110 rnd2 = Math.floor(Math.random() * nm2.length); 111 rnd3 = Math.floor(Math.random() * nm3.length); 112 rnd4 = Math.floor(Math.random() * nm2.length); 113 rnd5 = Math.floor(Math.random() * nm5.length); 114 while (nm3[rnd3] === nm1[rnd]) { 115 rnd3 = Math.floor(Math.random() * nm3.length); 116 } 117 if (rnd < 3) { 118 while (rnd5 < 3) { 119 rnd5 = Math.floor(Math.random() * nm5.length); 120 } 121 } 122 if (i < 2) { 123 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm5[rnd5] + " " + lName; 124 } else { 125 rnd6 = Math.floor(Math.random() * nm4.length); 126 rnd7 = Math.floor(Math.random() * nm2.length); 127 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd6] + nm2[rnd7] + nm5[rnd5] + " " + lName; 128 } 129 } else if (i < 6) { 130 rnd = Math.floor(Math.random() * nm17.length); 131 rnd2 = Math.floor(Math.random() * nm18.length); 132 rnd3 = Math.floor(Math.random() * nm20.length); 133 rnd4 = Math.floor(Math.random() * nm17.length); 134 rnd5 = Math.floor(Math.random() * nm18.length); 135 rnd6 = Math.floor(Math.random() * nm19.length); 136 rnd7 = Math.floor(Math.random() * nm18.length); 137 rnd8 = Math.floor(Math.random() * nm20.length); 138 if (i < 5) { 139 names = nm17[rnd] + nm18[rnd2] + nm20[rnd3] + " " + nm17[rnd4] + nm18[rnd5] + nm19[rnd6] + nm18[rnd7] + nm20[rnd8]; 140 } else { 141 names = nm17[rnd4] + nm18[rnd5] + nm19[rnd6] + nm18[rnd7] + nm20[rnd8] + " " + nm17[rnd] + nm18[rnd2] + nm20[rnd3]; 142 } 143 } else if (i < 8) { 144 rnd = Math.floor(Math.random() * nm25.length); 145 rnd2 = Math.floor(Math.random() * nm26.length); 146 rnd3 = Math.floor(Math.random() * nm27.length); 147 rnd4 = Math.floor(Math.random() * nm26.length); 148 rnd5 = Math.floor(Math.random() * nm27.length); 149 rnd6 = Math.floor(Math.random() * nm26.length); 150 rnd7 = Math.floor(Math.random() * nm25.length); 151 rnd8 = Math.floor(Math.random() * nm26.length); 152 rnd9 = Math.floor(Math.random() * nm27.length); 153 rnd10 = Math.floor(Math.random() * nm26.length); 154 if (i < 7) { 155 names = nm25[rnd] + nm26[rnd2] + nm27[rnd3] + nm26[rnd4] + nm27[rnd5] + nm26[rnd6] + " " + nm25[rnd7] + nm26[rnd8] + nm27[rnd9] + nm26[rnd10]; 156 } else { 157 names = nm25[rnd7] + nm26[rnd8] + nm27[rnd9] + nm26[rnd10] + " " + nm25[rnd] + nm26[rnd2] + nm27[rnd3] + nm26[rnd4] + nm27[rnd5] + nm26[rnd6]; 158 } 159 } else { 160 rnd = Math.floor(Math.random() * nm28.length); 161 rnd2 = Math.floor(Math.random() * nm29.length); 162 names = nm28[rnd] + " " + nm29[rnd2]; 163 } 164 } 165 br = document.createElement('br'); 166 element.appendChild(document.createTextNode(names)); 167 element.appendChild(br); 168 } 169 if (document.getElementById("result")) { 170 document.getElementById("placeholder").removeChild(document.getElementById("result")); 171 } 172 document.getElementById("placeholder").appendChild(element); 173 }