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

nagaNames.js (4332B)


      1 var nm1 = ["", "", "", "", "", "", "ch", "d", "dh", "dhr", "h", "hr", "j", "jy", "k", "kh", "kr", "ksh", "l", "m", "n", "p", "pr", "s", "sr", "t", "v", "vr"];
      2 var nm2 = ["a", "e", "i", "o", "u", "a", "a", "a", "a", "a", "a", "i", "i"];
      3 var nm3 = ["bh", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "v", "y", "bh", "d", "dg", "dh", "dhy", "dm", "dr", "g", "h", "hl", "hy", "j", "k", "kh", "ksh", "ky", "l", "lm", "lw", "m", "mkh", "mv", "mvr", "n", "nd", "ndh", "ng", "nj", "nkh", "nm", "nshtr", "nt", "nth", "p", "pt", "r", "rd", "rk", "rm", "rn", "rt", "ry", "s", "sh", "shk", "shm", "shn", "shp", "shth", "shtr", "sr", "st", "sth", "sw", "t", "th", "tr", "tt", "ttr", "ty", "v", "vy", "y", "yl"];
      4 var nm4 = ["a", "a", "a", "a", "a", "a", "a", "a", "a", "i", "u", "as", "at"];
      5 var nm5 = ["", "", "", "", "", "", "", "", "", "", "c", "cr", "ch", "d", "h", "k", "kr", "kh", "l", "r", "s", "s", "s", "sh", "sz", "sc", "sy", "sz", "sh", "t", "th", "x", "y", "z", "zs", "zh"];
      6 var nm6 = ["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", "aa", "ai", "ee", "ei", "ie"];
      7 var nm7 = ["c", "d", "dh", "k", "kh", "l", "r", "s", "sh", "t", "th", "x", "xh", "z", "zh", "c", "d", "k", "l", "r", "s", "t", "x", "z", "c", "d", "k", "l", "r", "s", "t", "x", "z", "s", "s", "sh", "sh", "cc", "ch", "ck", "cs", "csh", "cz", "dh", "dj", "kk", "kh", "ks", "ksh", "kz", "ll", "lh", "lz", "ls", "rr", "rc", "rg", "rh", "rj", "rs", "rsh", "rz", "rsz", "rt", "rth", "rc", "rk", "ss", "sc", "sh", "sk", "sz", "sy", "th", "tr", "ts", "tz", "tsh", "xh", "xs", "xz", "zh", "zs", "zz", "zs"];
      8 var nm8 = ["", "", "", "", "", "", "", "", "", "", "", "kh", "l", "r", "s", "sj", "ss", "sh", "sz", "t", "th", "x", "z", "zs"];
      9 var br = "";
     10 
     11 function nameGen() {
     12     $('#placeholder').css('textTransform', 'capitalize');
     13     var element = document.createElement("div");
     14     element.setAttribute("id", "result");
     15     for (i = 0; i < 10; i++) {
     16         if (i < 5) {
     17             rnd = Math.floor(Math.random() * nm5.length);
     18             rnd2 = Math.floor(Math.random() * nm6.length);
     19             rnd3 = Math.floor(Math.random() * nm7.length);
     20             rnd4 = Math.floor(Math.random() * nm6.length);
     21             rnd5 = Math.floor(Math.random() * nm8.length);
     22             if (i < 2) {
     23                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm8[rnd5];
     24             } else if (i < 4) {
     25                 rnd6 = Math.floor(Math.random() * nm7.length);
     26                 rnd7 = Math.floor(Math.random() * nm6.length);
     27                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd7] + nm7[rnd6] + nm6[rnd4] + nm8[rnd5];
     28             } else {
     29                 rnd6 = Math.floor(Math.random() * nm7.length);
     30                 rnd7 = Math.floor(Math.random() * nm6.length);
     31                 names = nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd6] + nm6[rnd7];
     32             }
     33         } else {
     34             rnd = Math.floor(Math.random() * nm1.length);
     35             rnd2 = Math.floor(Math.random() * nm2.length);
     36             rnd3 = Math.floor(Math.random() * nm3.length);
     37             rnd4 = Math.floor(Math.random() * nm4.length);
     38             if (i < 7) {
     39                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4];
     40             } else if (i < 9) {
     41                 rnd5 = Math.floor(Math.random() * nm2.length);
     42                 rnd6 = Math.floor(Math.random() * nm3.length);
     43                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd5] + nm3[rnd6] + nm4[rnd4];
     44             } else {
     45                 rnd5 = Math.floor(Math.random() * nm2.length);
     46                 rnd6 = Math.floor(Math.random() * nm3.length);
     47                 rnd7 = Math.floor(Math.random() * nm2.length);
     48                 rnd8 = Math.floor(Math.random() * nm3.length);
     49                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd5] + nm3[rnd6] + nm2[rnd7] + nm3[rnd8] + nm4[rnd4];
     50             }
     51         }
     52         br = document.createElement('br');
     53         element.appendChild(document.createTextNode(names));
     54         element.appendChild(br);
     55     }
     56     if (document.getElementById("result")) {
     57         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     58     }
     59     document.getElementById("placeholder").appendChild(element);
     60 }