offline-fantasy-name-generators

Offline version of www.fantasynamegenerators.com
git clone https://git.neptards.moe/neptards/offline-fantasy-name-generators.git
Log | Files | Refs | README

pathfinderDrow.js (5855B)


      1 var nm1 = ["", "", "", "", "", "br", "bh", "c", "dh", "dr", "f", "g", "gr", "gh", "j", "k", "kr", "kh", "m", "n", "ph", "q", "r", "s", "t", "v", "w", "x", "z"];
      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", "y", "y", "y", "io", "ae", "ou", "ie", "ui", "yi", "ey"];
      3 var nm3 = ["bn", "bs", "bz", "c", "cn", "cm", "cr", "dr", "dn", "g", "gn", "gv", "gg", "k", "kr", "kz", "kn", "kq", "l", "lf", "lm", "lr", "lq", "lc", "lv", "m", "mm", "mr", "mz", "ml", "mdr", "n", "ndr", "nd", "nz", "nc", "nq", "r", "rc", "rn", "rr", "rz", "rdr", "rq", "t", "tr", "v", "vr", "vdr"];
      4 var nm4 = ["", "", "", "c", "d", "g", "n", "r", "rn", "ss", "v", "x"];
      5 var nm5 = ["", "", "", "", "", "b", "c", "d", "f", "g", "h", "j", "l", "m", "n", "p", "ph", "q", "r", "s", "sc", "t", "th", "tr", "v", "w", "x", "z"];
      6 var nm6 = ["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", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "y", "ia", "ae", "ie", "ei", "ya", "ee", "ai"];
      7 var nm7 = ["b", "b", "b", "bv", "br", "c", "c", "c", "cr", "cs", "cn", "d", "d", "d", "dr", "dh", "dv", "fr", "h", "h", "h", "kr", "kn", "kl", "kv", "ksh", "l", "l", "l", "ll", "ll", "lm", "lv", "lr", "lq", "lsh", "mbr", "mr", "mv", "n", "n", "n", "nn", "nd", "nsh", "ns", "nz", "nv", "nr", "p", "p", "p", "ph", "phr", "r", "r", "r", "rn", "rsh", "rq", "s", "s", "s", "ss", "sh", "shr", "sc", "str", "v", "v", "vvn", "vr"];
      8 var nm8 = ["", "", "", "", "", "", "", "", "", "", "h", "l", "n", "nth", "s", "ss"];
      9 var nm9 = ["", "", "", "", "b", "c", "d", "g", "j", "k", "m", "n", "p", "q", "r", "s", "shr", "t", "th", "v", "w", "x", "z"];
     10 var nm10 = ["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", "y", "y", "y", "y", "ae", "iu", "ei", "ie", "ia", "ai", "ee"];
     11 var nm11 = ["d", "dr", "g", "gn", "gr", "ld", "lr", "ldr", "lv", "lz", "m", "mr", "n", "nd", "nn", "ng", "nr", "ndr", "nz", "nvr", "r", "rq", "rdr", "rz", "rv", "s", "sr", "shr", "str", "vr", "vn", "x", "xr", "zr", "z"];
     12 var nm12 = ["", "", "", "", "", "c", "d", "h", "n", "rc", "s", "sh", "t", "th", "v", "x"];
     13 var br = "";
     14 
     15 function nameGen(type) {
     16     $('#placeholder').css('textTransform', 'capitalize');
     17     var tp = type;
     18     var element = document.createElement("div");
     19     element.setAttribute("id", "result");
     20     for (i = 0; i < 10; i++) {
     21         rnd10 = Math.floor(Math.random() * nm9.length);
     22         rnd11 = Math.floor(Math.random() * nm10.length);
     23         rnd12 = Math.floor(Math.random() * nm12.length);
     24         rnd13 = Math.floor(Math.random() * nm11.length);
     25         rnd14 = Math.floor(Math.random() * nm10.length);
     26         if (i % 2 === 0) {
     27             rnd15 = Math.floor(Math.random() * nm11.length);
     28             rnd16 = Math.floor(Math.random() * nm10.length);
     29             nameLast = nm9[rnd10] + nm10[rnd11] + nm11[rnd13] + nm10[rnd14] + nm11[rnd15] + nm10[rnd16] + nm12[rnd12];
     30         } else {
     31             nameLast = nm9[rnd10] + nm10[rnd11] + nm11[rnd13] + nm10[rnd14] + nm12[rnd12];
     32         }
     33         if (tp === 1) {
     34             rnd = Math.floor(Math.random() * nm5.length);
     35             rnd2 = Math.floor(Math.random() * nm6.length);
     36             rnd3 = Math.floor(Math.random() * nm7.length);
     37             rnd4 = Math.floor(Math.random() * nm6.length);
     38             rnd5 = Math.floor(Math.random() * nm8.length);
     39             if (i < 4) {
     40                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm8[rnd5] + " " + nameLast;
     41             } else if (i < 8) {
     42                 rnd6 = Math.floor(Math.random() * nm7.length);
     43                 rnd7 = Math.floor(Math.random() * nm6.length);
     44                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd6] + nm6[rnd7] + nm8[rnd5] + " " + nameLast;
     45             } else {
     46                 rnd6 = Math.floor(Math.random() * nm7.length);
     47                 rnd7 = Math.floor(Math.random() * nm6.length);
     48                 rnd8 = Math.floor(Math.random() * nm7.length);
     49                 rnd9 = Math.floor(Math.random() * nm6.length);
     50                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd6] + nm6[rnd7] + nm7[rnd8] + nm6[rnd9] + nm8[rnd5] + " " + nameLast;
     51             }
     52         } else {
     53             rnd = Math.floor(Math.random() * nm1.length);
     54             rnd2 = Math.floor(Math.random() * nm2.length);
     55             rnd3 = Math.floor(Math.random() * nm3.length);
     56             rnd4 = Math.floor(Math.random() * nm2.length);
     57             rnd5 = Math.floor(Math.random() * nm4.length);
     58             if (i < 2) {
     59                 while (rnd < 5) {
     60                     rnd = Math.floor(Math.random() * nm1.length);
     61                 }
     62                 while (rnd5 < 3) {
     63                     rnd5 = Math.floor(Math.random() * nm4.length);
     64                 }
     65                 names = nm1[rnd] + nm2[rnd2] + nm4[rnd5] + "  " + nameLast;
     66             } else if (i < 7) {
     67                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + " " + nameLast;
     68             } else {
     69                 rnd6 = Math.floor(Math.random() * nm3.length);
     70                 rnd7 = Math.floor(Math.random() * nm2.length);
     71                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd6] + nm2[rnd7] + nm4[rnd5] + " " + nameLast;
     72             }
     73         }
     74         br = document.createElement('br');
     75         element.appendChild(document.createTextNode(names));
     76         element.appendChild(br);
     77     }
     78     if (document.getElementById("result")) {
     79         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     80     }
     81     document.getElementById("placeholder").appendChild(element);
     82 }