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

swJawaNames.js (5215B)


      1 var nm1 = ["", "", "", "", "", "b", "bl", "brr", "ch", "d", "h", "hr", "j", "k", "kl", "kr", "kt", "m", "mn", "n", "nb", "p", "pl", "pr", "r", "rk", "sn", "sq", "t", "th", "tt", "ts", "v", "w", "wr", "z"];
      2 var nm2 = ["a", "e", "i", "o", "u", "a", "e", "i", "a", "e", "i", "o", "u", "a", "e", "i", "a", "e", "i", "o", "u", "a", "e", "i", "a", "e", "i", "o", "u", "a", "e", "i", "a", "e", "i", "o", "u", "a", "e", "i", "oe", "ee", "ii", "ee", "ia", "ui", "eo"];
      3 var nm3 = ["b", "bb", "bl", "bw", "d", "g", "j", "k", "k't", "k'ch", "k'k", "kch", "kk", "kt", "kth", "l", "lh", "lv", "m", "n", "ng", "nz", "pt", "r", "rk", "s", "ss", "t", "th", "thch", "tj", "tk", "tt", "ttj", "z", "zj", "zz"];
      4 var nm4 = ["", "", "", "", "c", "dt", "g", "h", "k", "kk", "kth", "l", "n", "nk", "nt", "pp", "r", "s", "t", "th", "tk", "w", "x", "zz"];
      5 var nm5 = ["", "", "", "", "b", "bh", "bl", "ch", "dh", "d", "h", "k", "kh", "kw", "kl", "kn", "l", "m", "n", "p", "pl", "r", "rh", "rw", "s", "sh", "sn", "sl", "th", "ts", "tw", "v", "vl", "w", "wh"];
      6 var nm7 = ["b", "d", "f", "g", "h", "k", "l", "m", "n", "p", "r", "s", "t", "v", "w"];
      7 var nm8 = ["", "", "", "", "", "c", "d", "h", "k", "l", "m", "n", "s", "t"];
      8 var nm9 = ["", "", "", "", "b'", "b", "d'n", "d", "f", "h", "j", "k", "k'", "kl", "kr", "kk", "l", "m", "m'", "nk", "n", "p", "pt", "q", "q'", "s", "t", "tl", "th", "w"];
      9 var nm11 = ["c", "d", "g", "h", "j", "k", "l", "m", "n", "q", "r", "s", "t", "v", "z"];
     10 var nm12 = ["", "", "", "", "", "c", "d", "hs", "k", "kt", "kth", "l", "m", "n", "r", "s", "y", "z"];
     11 var br = "";
     12 
     13 function nameGen(type) {
     14     var tp = type;
     15     $('#placeholder').css('textTransform', 'capitalize');
     16     var element = document.createElement("div");
     17     element.setAttribute("id", "result");
     18     for (i = 0; i < 10; i++) {
     19         rnd7 = Math.floor(Math.random() * nm9.length);
     20         rnd8 = Math.floor(Math.random() * nm2.length);
     21         rnd10 = Math.floor(Math.random() * nm12.length);
     22         if (i % 3 === 0 && i % 2 != 0) {
     23             while (rnd7 < 4) {
     24                 rnd7 = Math.floor(Math.random() * nm9.length);
     25             }
     26             while (rnd10 < 5) {
     27                 rnd10 = Math.floor(Math.random() * nm12.length);
     28             }
     29             namelast = nm9[rnd7] + nm2[rnd8] + nm12[rnd10];
     30         } else if (i % 2 === 0) {
     31             rnd9 = Math.floor(Math.random() * nm2.length);
     32             rnd11 = Math.floor(Math.random() * nm11.length);
     33             namelast = nm9[rnd7] + nm2[rnd8] + nm11[rnd11] + nm2[rnd9] + nm12[rnd10];
     34         } else {
     35             rnd9 = Math.floor(Math.random() * nm2.length);
     36             rnd11 = Math.floor(Math.random() * nm11.length);
     37             rnd12 = Math.floor(Math.random() * nm2.length);
     38             rnd13 = Math.floor(Math.random() * nm11.length);
     39             namelast = nm9[rnd7] + nm2[rnd8] + nm11[rnd11] + nm2[rnd9] + nm11[rnd13] + nm2[rnd12] + nm12[rnd10];
     40         }
     41         if (tp === 1) {
     42             rnd = Math.floor(Math.random() * nm5.length);
     43             rnd2 = Math.floor(Math.random() * nm2.length);
     44             rnd5 = Math.floor(Math.random() * nm8.length);
     45             if (i < 6) {
     46                 rnd3 = Math.floor(Math.random() * nm7.length);
     47                 rnd4 = Math.floor(Math.random() * nm2.length);
     48                 names = nm5[rnd] + nm2[rnd2] + nm7[rnd3] + nm2[rnd4] + nm8[rnd5] + "  " + namelast;
     49             } else {
     50                 rnd3 = Math.floor(Math.random() * nm7.length);
     51                 rnd4 = Math.floor(Math.random() * nm2.length);
     52                 rnd5b = Math.floor(Math.random() * nm7.length);
     53                 rnd6 = Math.floor(Math.random() * nm2.length);
     54                 names = nm5[rnd] + nm2[rnd2] + nm7[rnd3] + nm2[rnd4] + nm7[rnd5b] + nm2[rnd6] + nm8[rnd5] + "  " + namelast;
     55             }
     56         } else {
     57             rnd = Math.floor(Math.random() * nm1.length);
     58             rnd2 = Math.floor(Math.random() * nm2.length);
     59             rnd5 = Math.floor(Math.random() * nm4.length);
     60             if (i < 4) {
     61                 while (rnd < 5) {
     62                     rnd = Math.floor(Math.random() * nm1.length);
     63                 }
     64                 names = nm1[rnd] + nm2[rnd2] + nm4[rnd5] + "  " + namelast;
     65             } else if (i < 7) {
     66                 rnd3 = Math.floor(Math.random() * nm3.length);
     67                 rnd4 = Math.floor(Math.random() * nm2.length);
     68                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + "  " + namelast;
     69             } else {
     70                 rnd3 = Math.floor(Math.random() * nm3.length);
     71                 rnd4 = Math.floor(Math.random() * nm2.length);
     72                 rnd5b = Math.floor(Math.random() * nm3.length);
     73                 rnd6 = Math.floor(Math.random() * nm2.length);
     74                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd5b] + nm2[rnd6] + nm4[rnd5] + "  " + namelast;
     75             }
     76         }
     77         br = document.createElement('br');
     78         element.appendChild(document.createTextNode(names));
     79         element.appendChild(br);
     80     }
     81     if (document.getElementById("result")) {
     82         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     83     }
     84     document.getElementById("placeholder").appendChild(element);
     85 }