gnollNames.js (6911B)
1 var nm1 = ["", "", "", "", "", "br", "d", "dr", "g", "gr", "gh", "gn", "k", "kh", "kr", "m", "r", "rr", "t", "th", "tr", "thr", "v", "x", "z"]; 2 var nm2 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "y", "y", "aa", "ei", "ia", "ou", "ua", "uo"]; 3 var nm3 = ["br", "g", "gr", "gn", "gl", "gz", "gv", "gg", "grr", "ghr", "hr", "hg", "kz", "kr", "kn", "kz", "kk", "lg", "lz", "lk", "lr", "mk", "mm", "mr", "ng", "nr", "ngr", "ndr", "nk", "nkr", "r", "rr", "rg", "rgr", "rk", "rkr", "x", "xx", "v", "vk", "vg", "zg", "zz", "zr"]; 4 var nm4 = ["r", "rr", "rg", "rrg", "rk", "c", "k", "kk", "x", "kx", "z", "zz", "t", "h", "n"]; 5 var nm5 = ["", "", "", "", "", "", "b", "d", "dh", "dr", "g", "gl", "gr", "grr", "gn", "h", "hr", "kh", "kn", "l", "m", "mr", "n", "p", "r", "rh", "rr", "rrh", "s", "sh", "sr", "sn", "sz", "t", "th", "tr", "trr", "ts", "v", "z", "zh"]; 6 var nm6 = ["a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "aa", "ae", "ai", "ea", "ei", "ie", "ia", "ui"]; 7 var nm7 = ["b", "bn", "bl", "d", "dd", "dn", "g", "gh", "gg", "gz", "gr", "hr", "hz", "hg", "hn", "hl", "hrr", "l", "ll", "lr", "lm", "ln", "lg", "lz", "lv", "mn", "mv", "ms", "ng", "nk", "nr", "nz", "nv", "r", "rr", "rh", "rg", "rt", "rtr", "rth", "rx", "s", "ss", "sz", "sr", "szr", "str", "sl", "sn", "sg", "sh", "szh", "t", "th", "thr", "ts", "thn", "tn", "tz", "tzs", "tsz", "tsh", "thv", "thg", "thm", "thn", "w", "wv", "vn", "vg", "vl", "vr", "zr", "zn", "zl", "zh", "zs", "zsh"]; 8 var nm8 = ["", "", "", "", "", "r", "rh", "hr", "h", "hn", "s", "sh", "z", "hz", "th", "rth"]; 9 var nm9 = ["", "", "", "", "", "b", "d", "g", "gn", "gr", "k", "kr", "kn", "m", "r", "rr", "s", "sz", "sr", "t", "th", "tr", "thr", "v", "x", "z"]; 10 var nm10 = ["a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "aa", "ei", "ou", "ua", "ue", "ei", "ai", "ia"]; 11 var nm11 = ["b", "bb", "d", "dd", "g", "gg", "gr", "gn", "gl", "gv", "grr", "ghr", "hr", "hg", "hn", "hl", "hz", "l", "ll", "lg", "lz", "lv", "lk", "lm", "m", "mm", "mr", "mv", "mk", "mg", "nk", "nn", "nz", "nv", "ng", "ngr", "r", "rr", "rg", "rh", "rhg", "rn", "rm", "rl", "rz", "x", "xr", "z", "zz", "zs", "zn", "zl", "zg"]; 12 var nm12 = ["", "", "", "c", "l", "n", "m", "h", "r", "rr", "th", "t"]; 13 var nm13 = ["Ash", "Blight", "Blood", "Boom", "Brine", "Broken", "Burst", "Clay", "Crack", "Cracked", "Damp", "Dead", "Dirt", "Dreck", "Dregs", "Dust", "Fail", "Far", "Fast", "Filth", "Fizz", "Fizzle", "Foam", "Froth", "Fungi", "Fungus", "Glop", "Gold", "Goo", "Gore", "Grapple", "Grease", "Grime", "Ground", "Gunk", "Lard", "Loose", "Lump", "Mire", "Mole", "Muck", "Mucus", "Mud", "Murk", "Ooze", "Pebble", "Pest", "Rent", "River", "Rot", "Salt", "Sand", "Scourge", "Scum", "Scuz", "Silt", "Slab", "Sleaze", "Slime", "Sludge", "Snore", "Snot", "Soil", "Soot", "Sore", "Split", "Stain", "Sweat", "Tame", "Woe", "Zest"]; 14 var nm14 = ["barb", "bash", "basher", "beam", "blase", "blast", "bolt", "boot", "brass", "cast", "cheek", "clash", "claw", "cloak", "club", "crook", "dance", "death", "dent", "ear", "ears", "eye", "eyes", "face", "fang", "fangs", "feet", "finger", "fingers", "fist", "fists", "foot", "frown", "fuse", "gall", "gaze", "gleam", "glob", "gob", "grapnel", "grappler", "grin", "grinder", "guard", "guise", "hallow", "hammer", "hand", "hands", "head", "hook", "hunter", "knob", "knuckle", "mask", "maw", "mouth", "mug", "nail", "nails", "nose", "paw", "pince", "pincer", "pinch", "scowl", "scrap", "shrapnel", "skin", "smile", "smirk", "snag", "spear", "stick", "talon", "teeth", "thumb", "tine", "toe", "toes", "tongue", "tooth", "tusk", "watch", "wizzle"]; 15 var br = ""; 16 17 function nameGen(type) { 18 $('#placeholder').css('textTransform', 'capitalize'); 19 var tp = type; 20 var element = document.createElement("div"); 21 element.setAttribute("id", "result"); 22 nTp = Math.random() * 100 | 0; 23 for (i = 0; i < 10; i++) { 24 if (nTp === 0) { 25 nmLast = "The Regular Gnoll"; 26 } else { 27 rnd12 = Math.floor(Math.random() * nm13.length); 28 rnd22 = Math.floor(Math.random() * nm14.length); 29 nmLast = nm13[rnd12] + nm14[rnd22]; 30 } 31 if (tp === 1) { 32 rnd = Math.floor(Math.random() * nm5.length); 33 rnd2 = Math.floor(Math.random() * nm6.length); 34 rnd3 = Math.floor(Math.random() * nm8.length); 35 if (rnd < 5) { 36 while (rnd3 < 5) { 37 rnd3 = Math.floor(Math.random() * nm8.length); 38 } 39 } 40 if (i < 5) { 41 names = nm5[rnd] + nm6[rnd2] + nm8[rnd3] + " " + nmLast; 42 } else { 43 rnd4 = Math.floor(Math.random() * nm6.length); 44 rnd5 = Math.floor(Math.random() * nm7.length); 45 names = nm5[rnd] + nm6[rnd2] + nm7[rnd5] + nm6[rnd4] + nm8[rnd3] + " " + nmLast; 46 } 47 } else if (tp === 2) { 48 rnd = Math.floor(Math.random() * nm9.length); 49 rnd2 = Math.floor(Math.random() * nm10.length); 50 rnd3 = Math.floor(Math.random() * nm12.length); 51 if (rnd < 5) { 52 while (rnd3 < 5) { 53 rnd3 = Math.floor(Math.random() * nm12.length); 54 } 55 } 56 if (i < 5) { 57 names = nm9[rnd] + nm10[rnd2] + nm12[rnd3] + " " + nmLast; 58 } else { 59 rnd4 = Math.floor(Math.random() * nm10.length); 60 rnd5 = Math.floor(Math.random() * nm11.length); 61 names = nm9[rnd] + nm10[rnd2] + nm11[rnd5] + nm10[rnd4] + nm12[rnd3] + " " + nmLast; 62 } 63 } else { 64 rnd = Math.floor(Math.random() * nm1.length); 65 rnd2 = Math.floor(Math.random() * nm2.length); 66 rnd3 = Math.floor(Math.random() * nm4.length); 67 if (rnd < 5) { 68 while (rnd3 < 5) { 69 rnd3 = Math.floor(Math.random() * nm4.length); 70 } 71 } 72 if (i < 5) { 73 names = nm1[rnd] + nm2[rnd2] + nm4[rnd3] + " " + nmLast; 74 } else { 75 rnd4 = Math.floor(Math.random() * nm2.length); 76 rnd5 = Math.floor(Math.random() * nm4.length); 77 names = nm1[rnd] + nm2[rnd2] + nm4[rnd5] + nm2[rnd4] + nm4[rnd3] + " " + nmLast; 78 } 79 } 80 br = document.createElement('br'); 81 element.appendChild(document.createTextNode(names)); 82 element.appendChild(br); 83 } 84 if (document.getElementById("result")) { 85 document.getElementById("placeholder").removeChild(document.getElementById("result")); 86 } 87 document.getElementById("placeholder").appendChild(element); 88 }