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

darkEyeTulamides.js (4304B)


      1 var nm1 = ["", "", "", "b", "bh", "br", "ch", "d", "f", "h", "j", "k", "kh", "m", "n", "r", "s", "sh", "t", "y", "z"];
      2 var nm2 = ["aa", "ai", "a", "a", "a", "e", "i", "o", "u", "u"];
      3 var nm3 = ["b", "bd", "chm", "cht", "d", "dl", "f", "h", "j", "k", "kh", "khb", "l", "lh", "lm", "m", "mm", "n", "nd", "r", "rh", "rk", "rkh", "sh", "sl", "sn", "sr", "ss", "st", "wl", "z"];
      4 var nm4 = ["ai", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u", "a", "e", "i", "u"];
      5 var nm5 = ["b", "d", "dd", "f", "m", "mm", "r", "sh", "y", "z"];
      6 var nm6 = ["a", "a", "e", "i", "o", "u", "u"];
      7 var nm7 = ["", "b", "d", "f", "h", "k", "kh", "l", "m", "n", "r", "z"];
      8 var nm8 = ["", "", "", "", "d", "f", "h", "j", "m", "n", "r", "rh", "s", "sh", "t", "y", "z", "zh"];
      9 var nm9 = ["ai", "a", "a", "e", "e", "i", "o", "u", "a", "a", "e", "e", "i", "o", "u", "a", "a", "e", "e", "i", "o", "u"];
     10 var nm10 = ["b", "d", "f", "fr", "h", "l", "lh", "ll", "llh", "lm", "m", "n", "r", "sh", "sm", "y", "yr", "z", "zh", "zm"];
     11 var nm11 = ["ei", "a", "a", "e", "i", "i", "o", "u", "a", "a", "e", "i", "i", "o", "u", "a", "a", "e", "i", "i", "o", "u", "a", "a", "e", "i", "i", "o", "u"];
     12 var nm12 = ["b", "d", "dr", "l", "m", "n", "ndr", "nn", "r", "s", "sh", "y"];
     13 var nm13 = ["a", "a", "e", "e", "i"];
     14 var nm14 = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "h", "l", "n", "t", "th"];
     15 var br = "";
     16 
     17 function nameGen(type) {
     18     var tp = type;
     19     var element = document.createElement("div");
     20     element.setAttribute("id", "result");
     21     for (i = 0; i < 10; i++) {
     22         nameMas();
     23         while (nMs === "") {
     24             nameMas();
     25         }
     26         names = nMs.charAt(0).toUpperCase() + nMs.slice(1);
     27         if (tp === 1) {
     28             nameFem();
     29             while (nMs === "") {
     30                 nameFem();
     31             }
     32             names = nMs.charAt(0).toUpperCase() + nMs.slice(1) + " saba " + names;
     33         } else {
     34             nameMas();
     35             while (nMs === "") {
     36                 nameMas();
     37             }
     38             names = nMs.charAt(0).toUpperCase() + nMs.slice(1) + " ibn " + names;
     39         }
     40         br = document.createElement('br');
     41         element.appendChild(document.createTextNode(names));
     42         element.appendChild(br);
     43     }
     44     if (document.getElementById("result")) {
     45         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     46     }
     47     document.getElementById("placeholder").appendChild(element);
     48 }
     49 
     50 function nameFem() {
     51     nTp = Math.random() * 3 | 0;
     52     rnd = Math.random() * nm8.length | 0;
     53     rnd2 = Math.random() * nm9.length | 0;
     54     rnd3 = Math.random() * nm10.length | 0;
     55     rnd4 = Math.random() * nm13.length | 0;
     56     rnd7 = Math.random() * nm14.length | 0;
     57     if (nTp < 2) {
     58         while (nm10[rnd3] === nm8[rnd]) {
     59             rnd3 = Math.random() * nm10.length | 0;
     60         }
     61         nMs = nm8[rnd] + nm9[rnd2] + nm10[rnd3] + nm13[rnd4] + nm14[rnd7];
     62     } else {
     63         rnd5 = Math.random() * nm11.length | 0;
     64         rnd6 = Math.random() * nm12.length | 0;
     65         while (nm12[rnd6] === nm10[rnd3] || nm10[rnd3] === nm8[rnd]) {
     66             rnd3 = Math.random() * nm10.length | 0;
     67         }
     68         nMs = nm8[rnd] + nm9[rnd2] + nm10[rnd3] + nm11[rnd5] + nm12[rnd6] + nm13[rnd4] + nm14[rnd7];
     69     }
     70     testSwear(nMs);
     71 }
     72 
     73 function nameMas() {
     74     nTp = Math.random() * 5 | 0;
     75     rnd = Math.random() * nm1.length | 0;
     76     rnd2 = Math.random() * nm2.length | 0;
     77     rnd3 = Math.random() * nm7.length | 0;
     78     rnd4 = Math.random() * nm3.length | 0;
     79     rnd5 = Math.random() * nm4.length | 0;
     80     if (nTp < 3) {
     81         while (nm3[rnd4] === nm1[rnd] || nm3[rnd4] === nm7[rnd3]) {
     82             rnd4 = Math.random() * nm3.length | 0;
     83         }
     84         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm7[rnd3];
     85     } else {
     86         rnd6 = Math.random() * nm5.length | 0;
     87         rnd7 = Math.random() * nm6.length | 0;
     88         while (nm3[rnd4] === nm5[rnd6] || nm5[rnd6] === nm7[rnd3]) {
     89             rnd6 = Math.random() * nm5.length | 0;
     90         }
     91         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd6] + nm6[rnd7] + nm7[rnd3];
     92     }
     93     testSwear(nMs);
     94 }