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

warhammerLizardmen.js (3023B)


      1 var nm = ["c", "cr", "ch", "g", "h", "kr", "m", "n", "q", "qr", "t", "tl", "x", "xlt", "y", "z"];
      2 var nm1 = ["", "", "", "", "", "c", "cr", "ch", "g", "h", "kr", "m", "n", "q", "qr", "t", "tl", "x", "xlt", "y", "z"];
      3 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", "oa", "aui", "a'u", "o'e", "o'a", "u'a", "a'e", "e'a"];
      4 var nm3 = ["c", "cc", "ch", "cht", "chtl", "cn", "ct", "ctl", "d", "h", "hc", "hg", "hp", "ht", "htl", "htz", "k", "kt", "l", "lch", "lh", "ll", "lm", "ln", "lp", "lt", "lx", "m", "n", "nd", "nh", "nq", "nt", "ntl", "p", "q", "r", "szc", "t", "tl", "tt", "tz", "tzc", "tzp", "tzt", "x", "xc", "xch", "xt", "xtl", "xy", "y", "z", "zc", "zd", "zq", "ztl"];
      5 var nm4 = ["", "", "", "c", "ch", "cl", "k", "l", "n", "p", "r", "tl", "x"];
      6 var nm5 = ["c", "ch", "cl", "k", "l", "n", "p", "r", "tl", "x"];
      7 var br = "";
      8 
      9 function nameGen() {
     10     $('#placeholder').css('textTransform', 'capitalize');
     11     var element = document.createElement("div");
     12     element.setAttribute("id", "result");
     13     for (i = 0; i < 10; i++) {
     14         rnd = Math.floor(Math.random() * nm1.length);
     15         rnd2 = Math.floor(Math.random() * nm2.length);
     16         rnd3 = Math.floor(Math.random() * nm3.length);
     17         rnd4 = Math.floor(Math.random() * nm2.length);
     18         rnd5 = Math.floor(Math.random() * nm4.length);
     19         if (i < 3) {
     20             if (rnd < 5) {
     21                 while (rnd5 < 3) {
     22                     rnd5 = Math.floor(Math.random() * nm4.length);
     23                 }
     24             }
     25             names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5];
     26         } else if (i < 6) {
     27             rnd6 = Math.floor(Math.random() * nm3.length);
     28             rnd7 = Math.floor(Math.random() * nm2.length);
     29             names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd6] + nm2[rnd7] + nm4[rnd5];
     30         } else if (i < 8) {
     31             rnd6 = Math.floor(Math.random() * nm.length);
     32             rnd7 = Math.floor(Math.random() * nm2.length);
     33             names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + "-" + nm[rnd6] + nm2[rnd7];
     34         } else {
     35             rnd = Math.floor(Math.random() * nm.length);
     36             rnd5 = Math.floor(Math.random() * nm5.length);
     37             rnd6 = Math.floor(Math.random() * nm.length);
     38             rnd7 = Math.floor(Math.random() * nm2.length);
     39             rnd8 = Math.floor(Math.random() * nm5.length);
     40             names = nm[rnd] + nm2[rnd2] + nm5[rnd5] + "-" + nm[rnd6] + nm2[rnd7] + nm3[rnd3] + nm2[rnd4] + nm5[rnd8];
     41         }
     42         br = document.createElement('br');
     43         element.appendChild(document.createTextNode(names));
     44         element.appendChild(br);
     45     }
     46     if (document.getElementById("result")) {
     47         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     48     }
     49     document.getElementById("placeholder").appendChild(element);
     50 }