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

diabloKhazra.js (1937B)


      1 var nm1 = ["", "", "", "", "b", "bl", "br", "ch", "cr", "d", "dr", "gh", "gr", "h", "hr", "k", "kr", "l", "m", "mw", "n", "r", "sh", "sk", "sn", "t", "th", "tr"];
      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", "oa", "ao", "au"];
      3 var nm3 = ["br", "d", "dr", "g", "gr", "ggr", "gl", "hg", "hl", "hgr", "lg", "lgh", "ld", "lz", "lb", "lghb", "ll", "lm", "ndr", "nd", "nz", "nr", "r", "rb", "rg", "rd", "rgr", "rt", "rth", "rz", "t", "wd"];
      4 var nm4 = ["", "", "", "ch", "d", "g", "gg", "k", "l", "lm", "m", "n", "nn", "r", "rg", "s", "sh", "t", "tch", "th", "wl"];
      5 var br = "";
      6 
      7 function nameGen() {
      8     $('#placeholder').css('textTransform', 'capitalize');
      9     var element = document.createElement("div");
     10     element.setAttribute("id", "result");
     11     for (i = 0; i < 10; i++) {
     12         nameMas();
     13         while (nMs === "") {
     14             nameMas();
     15         }
     16         br = document.createElement('br');
     17         element.appendChild(document.createTextNode(nMs));
     18         element.appendChild(br);
     19     }
     20     if (document.getElementById("result")) {
     21         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     22     }
     23     document.getElementById("placeholder").appendChild(element);
     24 }
     25 
     26 function nameMas() {
     27     rnd = Math.floor(Math.random() * nm1.length);
     28     rnd2 = Math.floor(Math.random() * nm2.length);
     29     rnd3 = Math.floor(Math.random() * nm3.length);
     30     rnd4 = Math.floor(Math.random() * nm2.length);
     31     rnd5 = Math.floor(Math.random() * nm4.length);
     32     if (i < 5) {
     33         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5];
     34     } else {
     35         rnd6 = Math.floor(Math.random() * nm3.length);
     36         rnd7 = Math.floor(Math.random() * nm2.length);
     37         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd6] + nm2[rnd7] + nm4[rnd5];
     38     }
     39     testSwear(nMs);
     40 }