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

stormlightArchive.js (10528B)


      1 var nm1 = ["", "", "", "b", "bl", "c", "d", "g", "gr", "h", "j", "k", "l", "m", "n", "r", "s", "t", "th", "v", "w", "y"];
      2 var nm2 = ["a", "e", "o", "a", "e", "o", "a", "e", "o", "a", "a", "a", "e", "i", "o", "u", "a", "e", "i", "o", "oa", "ea", "ia", "ai", "io"];
      3 var nm3 = ["b", "br", "d", "k", "l", "lh", "ll", "m", "mm", "n", "r", "rf", "rr", "rt", "sh", "st", "t", "th", "v"];
      4 var nm4 = ["", "", "", "b", "ds", "ft", "h", "ks", "l", "lds", "lp", "m", "n", "nn", "r", "rd", "rks", "rl", "s", "sh", "st", "t", "th", "v", "w", "z"];
      5 var nm5 = ["", "", "", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "w"];
      6 var nm6 = ["a", "ee", "ae", "ia", "ai", "i", "e", "a", "e", "i", "a", "e", "i", "a", "e", "i", "a", "a", "a", "a"];
      7 var nm7 = ["d", "l", "lh", "ll", "m", "mm", "n", "nk", "nl", "r", "rh", "sm", "s", "sh", "sn", "t", "th", "v", "w"];
      8 var nm8 = ["", "", "", "", "", "", "d", "h", "l", "m", "n", "s", "t", "th", "v"];
      9 var nm9 = ["", "", "", "", "c", "d", "g", "h", "k", "kh", "l", "m", "n", "r", "s", "st", "t", "v", "w"];
     10 var nm10 = ["a", "e", "o", "i", "a", "a", "e", "o", "i", "a", "a", "e", "o", "i", "a", "io", "ea"];
     11 var nm11 = ["d", "g", "k", "l", "m", "n", "p", "r", "s", "sh", "st", "t", "th", "v"];
     12 var nm12 = ["", "", "", "", "", "", "a", "e", "o", "i", "a", "a", "e", "o", "i", "a", "a", "e", "o", "i", "a", "io", "ea"];
     13 var nm13 = ["", "", "", "", "", "", "d", "g", "k", "l", "m", "n", "p", "r", "s", "sh", "st", "t", "th", "v"];
     14 var nm14 = ["c", "d", "g", "m", "n", "s", "t", "th", "v", "w"];
     15 var nm15 = ["", "", "", "b", "d", "h", "j", "l", "m", "n", "p", "r", "v", "w"];
     16 var nm16 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "a", "ue", "ia"];
     17 var nm17 = ["d", "j", "k", "kk", "l", "m", "n", "r", "sh", "s", "ss", "t", "v"];
     18 var nm18 = ["", "", "", "d", "l", "n", "m", "r", "s", "sh", "t"];
     19 var nm19 = ["", "", "", "f", "h", "l", "m", "n", "s", "sh", "t", "th", "v", "w"];
     20 var nm20 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "a", "ue", "ia"];
     21 var nm21 = ["d", "f", "j", "h", "l", "ll", "m", "n", "r", "ss", "s", "t"];
     22 var nm22 = ["", "", "", "", "", "", "l", "n", "m", "r", "s", "sh", "th"];
     23 var nm23 = ["b", "d", "g", "h", "j", "k", "l", "m", "n", "r", "s", "t"];
     24 var nm24 = ["a", "e", "i"];
     25 var nm25 = ["f", "h", "j", "k", "l", "ll", "lm", "m", "n", "r", "v"];
     26 var nm26 = ["", "a", "e", "i"];
     27 var nm27 = ["", "f", "h", "j", "k", "l", "ll", "lm", "m", "n", "r", "v"];
     28 var nm28 = ["d", "l", "n", "r"];
     29 var nm29 = ["cn", "cl", "dv", "dvl", "dr", "gm", "gl", "gv", "km", "kl", "k", "mn", "mst", "mv", "mw", "mr", "nm", "nr", "nst", "nv", "nw", "nl", "tr", "ts", "tv", "tm", "tn", "t", "tvl", "vl", "vm", "vn", "vst"];
     30 var nm30 = ["a", "e", "o", "i", "y"];
     31 var nm31 = ["cv", "cl", "cn", "km", "kn", "krn", "k", "kv", "lm", "ln", "lrn", "ll", "lb", "nm", "nr", "nd", "nt", "m", "mt", "mrn", "md", "rn", "lrm", "rm"];
     32 var nm32 = ["", "", "", "", "", "hs", "hsh", "hth", "htn", "kn", "km", "ks", "kst", "kh", "lm", "ln", "ll", "lb", "lst", "ls", "lt", "nm", "nr", "nd", "nt", "m", "mt", "ms", "msh", "msl", "md", "shlv", "sn"];
     33 var nm33 = ["a", "e", "o", "i", "y"];
     34 var nm34 = ["cl", "dv", "dr", "dh", "dl", "gh", "gl", "gm", "gn", "h", "hr", "hl", "kl", "kh", "kn", "km", "kv", "l", "ln", "lm", "ls", "mn", "mw", "mh", "nw", "nl", "nh", "th", "thr", "trh", "ts", "tw", "tm", "tn", "vl", "vn", "r"];
     35 var br = "";
     36 
     37 function nameGen(type) {
     38     $('#placeholder').css('textTransform', 'capitalize');
     39     var tp = type;
     40     var element = document.createElement("div");
     41     element.setAttribute("id", "result");
     42     for (i = 0; i < 10; i++) {
     43         if (i < 4) {
     44             rnd = Math.floor(Math.random() * nm9.length);
     45             rnd2 = Math.floor(Math.random() * nm10.length);
     46             rnd3 = Math.floor(Math.random() * nm11.length);
     47             rnd4 = Math.floor(Math.random() * nm10.length);
     48             rnd5 = Math.floor(Math.random() * nm11.length);
     49             rnd6 = Math.floor(Math.random() * nm12.length);
     50             rnd7 = Math.floor(Math.random() * nm13.length);
     51             if (rnd6 < 6) {
     52                 rnd7 = 0;
     53             } else {
     54                 while (rnd7 < 6) {
     55                     rnd7 = Math.floor(Math.random() * nm13.length);
     56                 }
     57             }
     58             rnd8 = Math.floor(Math.random() * nm10.length);
     59             rnd9 = Math.floor(Math.random() * nm14.length);
     60             lname = nm9[rnd] + nm10[rnd2] + nm11[rnd3] + nm10[rnd4] + nm11[rnd5] + nm12[rnd6] + nm13[rnd7] + nm10[rnd8] + nm14[rnd9];
     61         } else if (i < 7) {
     62             rnd = Math.floor(Math.random() * nm23.length);
     63             rnd2 = Math.floor(Math.random() * nm24.length);
     64             rnd3 = Math.floor(Math.random() * nm25.length);
     65             rnd4 = Math.floor(Math.random() * nm24.length);
     66             rnd5 = Math.floor(Math.random() * nm25.length);
     67             rnd6 = Math.floor(Math.random() * nm26.length);
     68             rnd7 = Math.floor(Math.random() * nm27.length);
     69             if (rnd6 < 1) {
     70                 rnd7 = 0;
     71             } else {
     72                 while (rnd7 < 1) {
     73                     rnd7 = Math.floor(Math.random() * nm27.length);
     74                 }
     75             }
     76             rnd8 = Math.floor(Math.random() * nm24.length);
     77             rnd9 = Math.floor(Math.random() * nm28.length);
     78             sname = nm23[rnd] + nm24[rnd2] + nm25[rnd3] + nm24[rnd4] + nm25[rnd5] + nm26[rnd6] + nm27[rnd7] + nm24[rnd8] + nm28[rnd9];
     79         }
     80         if (tp === 1) {
     81             if (i < 2) {
     82                 rnd = Math.floor(Math.random() * nm5.length);
     83                 rnd2 = Math.floor(Math.random() * nm6.length);
     84                 rnd3 = Math.floor(Math.random() * nm8.length);
     85                 while (rnd < 3) {
     86                     rnd = Math.floor(Math.random() * nm5.length);
     87                 }
     88                 names = nm5[rnd] + nm6[rnd2] + nm8[rnd3] + " " + lname;
     89             } else if (i < 4) {
     90                 rnd = Math.floor(Math.random() * nm5.length);
     91                 rnd2 = Math.floor(Math.random() * nm6.length);
     92                 rnd3 = Math.floor(Math.random() * nm7.length);
     93                 rnd4 = Math.floor(Math.random() * nm6.length);
     94                 rnd5 = Math.floor(Math.random() * nm8.length);
     95                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm8[rnd5] + " " + lname;
     96             } else if (i < 6) {
     97                 rnd = Math.floor(Math.random() * nm19.length);
     98                 rnd2 = Math.floor(Math.random() * nm20.length);
     99                 rnd3 = Math.floor(Math.random() * nm22.length);
    100                 while (rnd < 3) {
    101                     rnd = Math.floor(Math.random() * nm19.length);
    102                 }
    103                 while (rnd3 < 6) {
    104                     rnd3 = Math.floor(Math.random() * nm22.length);
    105                 }
    106                 rnd4 = Math.floor(Math.random() * nm20.length);
    107                 names = nm19[rnd] + nm20[rnd2] + nm22[rnd3] + nm20[rnd4] + " " + sname;
    108             } else if (i < 7) {
    109                 rnd = Math.floor(Math.random() * nm19.length);
    110                 rnd2 = Math.floor(Math.random() * nm20.length);
    111                 rnd3 = Math.floor(Math.random() * nm21.length);
    112                 rnd4 = Math.floor(Math.random() * nm20.length);
    113                 rnd5 = Math.floor(Math.random() * nm22.length);
    114                 names = nm19[rnd] + nm20[rnd2] + nm21[rnd3] + nm20[rnd4] + nm22[rnd5] + " " + sname;
    115             } else {
    116                 rnd = Math.floor(Math.random() * nm32.length);
    117                 rnd2 = Math.floor(Math.random() * nm33.length);
    118                 rnd3 = Math.floor(Math.random() * nm34.length);
    119                 names = nm32[rnd] + nm33[rnd2] + nm34[rnd3];
    120             }
    121         } else {
    122             if (i < 2) {
    123                 rnd = Math.floor(Math.random() * nm1.length);
    124                 rnd2 = Math.floor(Math.random() * nm2.length);
    125                 rnd3 = Math.floor(Math.random() * nm4.length);
    126                 if (rnd < 3) {
    127                     while (rnd3 < 3) {
    128                         rnd3 = Math.floor(Math.random() * nm4.length);
    129                     }
    130                 } else {
    131                     while (rnd3 < 3) {
    132                         rnd3 = Math.floor(Math.random() * nm4.length);
    133                     }
    134                 }
    135                 names = nm1[rnd] + nm2[rnd2] + nm4[rnd3] + " " + lname;
    136             } else if (i < 4) {
    137                 rnd = Math.floor(Math.random() * nm1.length);
    138                 rnd2 = Math.floor(Math.random() * nm2.length);
    139                 rnd3 = Math.floor(Math.random() * nm3.length);
    140                 rnd4 = Math.floor(Math.random() * nm2.length);
    141                 rnd5 = Math.floor(Math.random() * nm4.length);
    142                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + " " + lname;
    143             } else if (i < 6) {
    144                 rnd = Math.floor(Math.random() * nm15.length);
    145                 rnd2 = Math.floor(Math.random() * nm16.length);
    146                 rnd3 = Math.floor(Math.random() * nm18.length);
    147                 if (rnd < 3) {
    148                     while (rnd3 < 3) {
    149                         rnd3 = Math.floor(Math.random() * nm18.length);
    150                     }
    151                 } else {
    152                     while (rnd3 < 3) {
    153                         rnd3 = Math.floor(Math.random() * nm18.length);
    154                     }
    155                 }
    156                 names = nm15[rnd] + nm16[rnd2] + nm18[rnd3] + " " + sname;
    157             } else if (i < 7) {
    158                 rnd = Math.floor(Math.random() * nm15.length);
    159                 rnd2 = Math.floor(Math.random() * nm16.length);
    160                 rnd3 = Math.floor(Math.random() * nm17.length);
    161                 rnd4 = Math.floor(Math.random() * nm16.length);
    162                 rnd5 = Math.floor(Math.random() * nm18.length);
    163                 names = nm15[rnd] + nm16[rnd2] + nm17[rnd3] + nm16[rnd4] + nm18[rnd5] + " " + sname;
    164             } else {
    165                 rnd = Math.floor(Math.random() * nm29.length);
    166                 rnd2 = Math.floor(Math.random() * nm30.length);
    167                 rnd3 = Math.floor(Math.random() * nm31.length);
    168                 names = nm29[rnd] + nm30[rnd2] + nm31[rnd3];
    169             }
    170         }
    171         br = document.createElement('br');
    172         element.appendChild(document.createTextNode(names));
    173         element.appendChild(br);
    174     }
    175     if (document.getElementById("result")) {
    176         document.getElementById("placeholder").removeChild(document.getElementById("result"));
    177     }
    178     document.getElementById("placeholder").appendChild(element);
    179 }