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

lolVestayaNames.js (2502B)


      1 var nm1 = ["d", "h", "l", "m", "n", "r", "t", "v", "z"];
      2 var nm2 = ["a", "a", "e", "e", "o"];
      3 var nm3 = ["d", "dr", "g", "gr", "l", "ld", "lr", "lk", "k", "ng", "r", "rg", "rk", "rv", "rz", "v", "z"];
      4 var nm4 = ["a", "a", "e", "e", "i", "o"];
      5 var nm5 = ["d", "d", "l", "n", "n", "r", "r", "s", "z"];
      6 var nm6 = ["", "", "f", "h", "l", "m", "n", "r", "t", "x", "y", "z"];
      7 var nm7 = ["ee", "ie", "ei", "aa", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o"];
      8 var nm8 = ["hk", "hn", "hr", "k", "l", "ll", "m", "n", "r", "s", "t", "v", "y", "z"];
      9 var nm9 = ["a", "a", "e", "i", "i", "i", "o", "o"];
     10 var nm10 = ["", "", "", "", "", "", "h"];
     11 
     12 function nameGen(type) {
     13     var tp = type;
     14     $('#placeholder').css('textTransform', 'capitalize');
     15     var br = "";
     16     var element = document.createElement("div");
     17     element.setAttribute("id", "result");
     18     for (i = 0; i < 10; i++) {
     19         if (tp === 1) {
     20             nameFem();
     21             while (nMs === "") {
     22                 nameFem();
     23             }
     24         } else {
     25             nameMas();
     26             while (nMs === "") {
     27                 nameMas();
     28             }
     29         }
     30         br = document.createElement('br');
     31         element.appendChild(document.createTextNode(nMs));
     32         element.appendChild(br);
     33     }
     34     if (document.getElementById("result")) {
     35         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     36     }
     37     document.getElementById("placeholder").appendChild(element);
     38 }
     39 
     40 function nameMas() {
     41     nTp = Math.random() * 3 | 0;
     42     rnd = Math.random() * nm1.length | 0;
     43     rnd2 = Math.random() * nm2.length | 0;
     44     rnd3 = Math.random() * nm5.length | 0;
     45     rnd5 = Math.random() * nm3.length | 0;
     46     rnd4 = Math.random() * nm4.length | 0;
     47     while (nm3[rnd5] === nm1[rnd] && nm3[rnd5] === nm5[rnd3]) {
     48         rnd5 = Math.random() * nm3.length | 0;
     49     }
     50     nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd5] + nm4[rnd4] + nm5[rnd3];
     51     testSwear(nMs);
     52 }
     53 
     54 function nameFem() {
     55     nTp = Math.random() * 3 | 0;
     56     rnd = Math.random() * nm6.length | 0;
     57     rnd2 = Math.random() * nm7.length | 0;
     58     rnd3 = Math.random() * nm8.length | 0;
     59     rnd4 = Math.random() * nm9.length | 0;
     60     rnd5 = Math.random() * nm10.length | 0;
     61     while (nm10[rnd5] === nm8[rnd3] && nm6[rnd] === nm8[rnd3]) {
     62         rnd3 = Math.random() * nm8.length | 0;
     63     }
     64     nMs = nm6[rnd] + nm7[rnd2] + nm8[rnd3] + nm9[rnd4] + nm10[rnd5];
     65     testSwear(nMs);
     66 }