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

swSullustanNames.js (6341B)


      1 var nm1 = ["", "", "", "", "", "", "b", "bl", "br", "c", "d", "dl", "dw", "f", "fr", "g", "gr", "h", "j", "k", "kr", "l", "m", "n", "p", "q", "r", "s", "t", "tr", "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", "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", "au", "eo", "ie", "uu", "ea", "ee", "ia", "ao", "ue", "ae", "ay", "y", "ii", "ei", "iu", "ui", "oo", "ua", "yu"];
      3 var nm3 = ["b", "bb", "br", "d", "dm", "fr", "g", "ggl", "gl", "hs", "j", "kk", "l", "ll", "llr", "lth", "m", "md", "n", "nb", "nch", "nd", "ng", "nn", "nr", "pl", "r", "rg", "rk", "rl", "rn", "rr", "rth", "rw", "shr", "ss", "st", "t", "th", "w", "xt", "z"];
      4 var nm4 = ["", "", "", "", "", "b", "bb", "c", "d", "dt", "gg", "k", "kk", "l", "ld", "lld", "ln", "lss", "m", "n", "nb", "nt", "pt", "r", "rm", "rs", "rt", "s", "sh", "ss", "t", "tz", "v", "vv", "x"];
      5 var nm5 = ["", "", "", "", "", "", "", "", "", "", "b", "ch", "d", "f", "fr", "g", "h", "j", "k", "l", "m", "n", "r", "s", "t", "tr", "v", "w", "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", "ia", "ee", "uo", "ee", "aa", "uu", "ae", "ya", "yu"];
      7 var nm7 = ["b", "bb", "f", "ff", "fr", "gr", "gg", "gl", "hl", "hn", "hm", "l", "ll", "lb", "lm", "ln", "ld", "m", "md", "mb", "ml", "mm", "n", "nb", "nm", "ng", "nd", "p", "pp", "r", "rr", "rb", "rd", "rl", "rn", "s", "st", "sth", "sd", "sh", "ss", "t", "th", "tt", "vv"];
      8 var nm8 = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "l", "n", "nn", "r", "s", "ss", "th", "v", "x"];
      9 var nm9 = ["", "", "", "", "", "b", "bd", "br", "f", "fr", "g", "gh", "h", "j", "k", "l", "m", "n", "nh", "nr", "p", "pl", "r", "s", "sch", "sn", "sq", "st", "sw", "t", "ts", "v", "vh", "w", "y", "z"];
     10 var nm10 = ["a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "ia", "ie", "ei", "oo", "ee", "uu", "aa", "au", "ya", "ea", "ii", "iu", "ua"];
     11 var nm11 = ["b", "bb", "bbb", "d", "g", "gg", "gn", "hnt", "j", "kk", "l", "lk", "ll", "m", "mb", "mbl", "n", "nd", "ng", "nr", "ns", "ntr", "r", "rb", "rr", "rt", "rt", "s", "sc", "st", "tt", "v", "vn", "wn"];
     12 var nm12 = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "b", "bb", "bbs", "bl", "c", "cb", "d", "h", "k", "l", "ll", "ls", "m", "mb", "mm", "mp", "n", "nb", "nd", "nn", "nr", "nt", "p", "pt", "r", "rb", "rl", "rr", "rs", "rss", "s", "st", "t", "th", "v", "vv", "wn", "z"];
     13 var br = "";
     14 
     15 function nameGen(type) {
     16     var tp = type;
     17     $('#placeholder').css('textTransform', 'capitalize');
     18     var element = document.createElement("div");
     19     element.setAttribute("id", "result");
     20     for (i = 0; i < 10; i++) {
     21         rnd7 = Math.floor(Math.random() * nm9.length);
     22         rnd8 = Math.floor(Math.random() * nm10.length);
     23         rnd10 = Math.floor(Math.random() * nm12.length);
     24         if (i % 2 != 0) {
     25             while (rnd10 < 15) {
     26                 rnd10 = Math.floor(Math.random() * nm12.length);
     27             }
     28             namelast = nm9[rnd7] + nm10[rnd8] + nm12[rnd10];
     29         } else {
     30             rnd9 = Math.floor(Math.random() * nm10.length);
     31             rnd11 = Math.floor(Math.random() * nm11.length);
     32             namelast = nm9[rnd7] + nm10[rnd8] + nm11[rnd11] + nm10[rnd9] + nm12[rnd10];
     33         }
     34         if (tp === 1) {
     35             rnd = Math.floor(Math.random() * nm5.length);
     36             rnd2 = Math.floor(Math.random() * nm6.length);
     37             rnd5 = Math.floor(Math.random() * nm8.length);
     38             if (i < 3) {
     39                 while (rnd < 10) {
     40                     rnd = Math.floor(Math.random() * nm5.length);
     41                 }
     42                 names = nm5[rnd] + nm6[rnd2] + nm8[rnd5] + "  " + namelast;
     43             } else if (i < 7) {
     44                 rnd3 = Math.floor(Math.random() * nm7.length);
     45                 rnd4 = Math.floor(Math.random() * nm6.length);
     46                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm8[rnd5] + "  " + namelast;
     47             } else {
     48                 rnd3 = Math.floor(Math.random() * nm7.length);
     49                 rnd4 = Math.floor(Math.random() * nm6.length);
     50                 rnd6 = Math.floor(Math.random() * nm7.length);
     51                 rnd7 = Math.floor(Math.random() * nm6.length);
     52                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd6] + nm6[rnd7] + nm8[rnd5] + "  " + namelast;
     53             }
     54         } else {
     55             rnd = Math.floor(Math.random() * nm1.length);
     56             rnd2 = Math.floor(Math.random() * nm2.length);
     57             rnd5 = Math.floor(Math.random() * nm4.length);
     58             if (i < 5) {
     59                 while (rnd < 6) {
     60                     rnd = Math.floor(Math.random() * nm1.length);
     61                 }
     62                 names = nm1[rnd] + nm2[rnd2] + nm4[rnd5] + "  " + namelast;
     63             } else if (i < 8) {
     64                 rnd3 = Math.floor(Math.random() * nm3.length);
     65                 rnd4 = Math.floor(Math.random() * nm2.length);
     66                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + "  " + namelast;
     67             } else {
     68                 rnd3 = Math.floor(Math.random() * nm3.length);
     69                 rnd4 = Math.floor(Math.random() * nm2.length);
     70                 rnd6 = Math.floor(Math.random() * nm3.length);
     71                 rnd7 = Math.floor(Math.random() * nm2.length);
     72                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd6] + nm2[rnd7] + nm4[rnd5] + "  " + namelast;
     73             }
     74         }
     75         br = document.createElement('br');
     76         element.appendChild(document.createTextNode(names));
     77         element.appendChild(br);
     78     }
     79     if (document.getElementById("result")) {
     80         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     81     }
     82     document.getElementById("placeholder").appendChild(element);
     83 }