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

swIthorianNames.js (7020B)


      1 var nm1 = ["", "", "", "", "", "b", "br", "ch", "cl", "d", "dr", "f", "g", "gr", "h", "j", "jh", "jw", "k", "kr", "l", "m", "n", "p", "ph", "pl", "pw", "q", "r", "s", "sn", "spr", "st", "t", "th", "tr", "v", "vl", "w", "wh", "y", "z"];
      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", "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", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "aa", "oo", "ea", "ua", "eo", "ou", "ee", "ao", "ii", "aa", "ui", "au", "uu", "ie"];
      3 var nm3 = ["'kl", "'tr", "b", "bb", "c", "d", "dl", "ff", "g", "gg", "ggj", "h", "k", "kk", "kl", "kn", "l", "ld", "lj", "ll", "lln", "lm", "ln", "lr", "lt", "m", "mf", "ml", "mw", "n", "nc", "nd", "nf", "ngt", "nst", "nt", "nw", "pl", "r", "rf", "rgl", "rl", "rm", "rn", "rr", "rt", "rth", "s", "sh", "sh't", "sm", "ss", "sthm", "t", "th", "thw", "tr", "tt", "v", "vv", "w", "wb", "x", "xx", "z", "zl", "zz"];
      4 var nm4 = ["", "", "", "", "", "b", "bb", "bs", "c", "cl", "d", "g", "gg", "hp", "j", "k", "l", "ls", "m", "mm", "n", "nk", "ph", "r", "rd", "rg", "rl", "rn", "rr", "s", "ss", "t", "th", "v", "w", "wl", "x", "z"];
      5 var nm5 = ["", "", "", "", "b", "bh", "ch", "cw", "d", "dh", "f", "fr", "gh", "gw", "h", "kh", "kl", "l", "m", "n", "ph", "pl", "pw", "r", "rh", "s", "sh", "sw", "sl", "t", "th", "tw", "v", "vl", "vh", "w", "wh", "y"];
      6 var nm6 = ["a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "ee", "oo", "uu", "ii"];
      7 var nm7 = ["'sh", "'th", "bl", "ch", "dh", "dw", "f", "ff", "gh", "gw", "h", "hh", "kh", "kw", "ks", "l", "ls", "ll", "ln", "lm", "lth", "lsh", "lw", "m", "mm", "mf", "mw", "mn", "ml", "mw", "n", "nd", "ndr", "nf", "nw", "nsh", "ph", "rsh", "rs", "rf", "rl", "rh", "r", "rw", "rn", "rm", "rth", "sh", "sf", "sv", "sw", "shw", "ss", "sn", "sm", "th", "thw", "thl", "v", "w", "wh", "wl", "ws", "wsh"];
      8 var nm8 = ["", "", "", "", "", "", "", "", "", "b", "f", "g", "h", "l", "m", "mm", "n", "ph", "r", "s", "sh", "ss", "th", "w"];
      9 var nm9 = ["", "", "", "", "b", "c", "ch", "cr", "d", "fl", "fr", "h", "l", "m", "n", "nh", "p", "pw", "r", "s", "sl", "t", "v", "w", "z"];
     10 var nm10 = ["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", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "ee", "oo", "ea", "ee", "au", "ua"];
     11 var nm11 = ["b", "bb", "bbl", "bl", "d", "dd", "f", "fl", "g", "h", "j", "k", "l", "ll", "lt", "m", "mfl", "n", "nd", "nt", "pr", "q", "r", "rk", "rt", "rtk", "s", "t", "th", "tr", "v", "w", "wm", "wr", "xl", "z"];
     12 var nm12 = ["", "", "", "", "", "b", "bb", "d", "g", "hl", "k", "l", "ll", "m", "n", "ngs", "nd", "nn", "r", "rlq", "s", "t", "th", "thh", "ts", "w"];
     13 var br = "";
     14 
     15 function nameGen(type) {
     16     var tp = type;
     17     $('#placeholder').css('textTransform', 'capitalize');
     18     var element = document.createElement("div");
     19     element.setAttribute("id", "result");
     20     for (i = 0; i < 10; i++) {
     21         rnd7 = Math.floor(Math.random() * nm9.length);
     22         rnd8 = Math.floor(Math.random() * nm10.length);
     23         rnd10 = Math.floor(Math.random() * nm12.length);
     24         if (i % 3 === 0 && i % 2 != 0) {
     25             while (rnd7 < 3) {
     26                 rnd7 = Math.floor(Math.random() * nm9.length);
     27             }
     28             while (rnd10 < 4) {
     29                 rnd10 = Math.floor(Math.random() * nm12.length);
     30             }
     31             namelast = nm9[rnd7] + nm10[rnd8] + nm12[rnd10];
     32         } else if (i % 2 === 0) {
     33             rnd9 = Math.floor(Math.random() * nm10.length);
     34             rnd11 = Math.floor(Math.random() * nm11.length);
     35             namelast = nm9[rnd7] + nm10[rnd8] + nm11[rnd11] + nm10[rnd9] + nm12[rnd10];
     36         } else {
     37             rnd9 = Math.floor(Math.random() * nm10.length);
     38             rnd11 = Math.floor(Math.random() * nm11.length);
     39             rnd12 = Math.floor(Math.random() * nm10.length);
     40             rnd13 = Math.floor(Math.random() * nm11.length);
     41             namelast = nm9[rnd7] + nm10[rnd8] + nm11[rnd11] + nm10[rnd9] + nm11[rnd13] + nm10[rnd12] + nm12[rnd10];
     42         }
     43         if (tp === 1) {
     44             rnd = Math.floor(Math.random() * nm5.length);
     45             rnd2 = Math.floor(Math.random() * nm6.length);
     46             rnd5 = Math.floor(Math.random() * nm8.length);
     47             if (i < 4) {
     48                 while (rnd < 5) {
     49                     rnd = Math.floor(Math.random() * nm5.length);
     50                 }
     51                 names = nm5[rnd] + nm6[rnd2] + nm8[rnd5] + "  " + namelast;
     52             } else if (i < 7) {
     53                 rnd3 = Math.floor(Math.random() * nm7.length);
     54                 rnd4 = Math.floor(Math.random() * nm6.length);
     55                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm8[rnd5] + "  " + namelast;
     56             } else {
     57                 rnd3 = Math.floor(Math.random() * nm7.length);
     58                 rnd4 = Math.floor(Math.random() * nm6.length);
     59                 rnd5b = Math.floor(Math.random() * nm7.length);
     60                 rnd6 = Math.floor(Math.random() * nm6.length);
     61                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd5b] + nm6[rnd6] + nm8[rnd5] + "  " + namelast;
     62             }
     63         } else {
     64             rnd = Math.floor(Math.random() * nm1.length);
     65             rnd2 = Math.floor(Math.random() * nm2.length);
     66             rnd5 = Math.floor(Math.random() * nm4.length);
     67             if (i < 4) {
     68                 while (rnd < 5) {
     69                     rnd = Math.floor(Math.random() * nm1.length);
     70                 }
     71                 names = nm1[rnd] + nm2[rnd2] + nm4[rnd5] + "  " + namelast;
     72             } else if (i < 7) {
     73                 rnd3 = Math.floor(Math.random() * nm3.length);
     74                 rnd4 = Math.floor(Math.random() * nm2.length);
     75                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + "  " + namelast;
     76             } else {
     77                 rnd3 = Math.floor(Math.random() * nm3.length);
     78                 rnd4 = Math.floor(Math.random() * nm2.length);
     79                 rnd5b = Math.floor(Math.random() * nm3.length);
     80                 rnd6 = Math.floor(Math.random() * nm2.length);
     81                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm3[rnd5b] + nm2[rnd6] + nm4[rnd5] + "  " + namelast;
     82             }
     83         }
     84         br = document.createElement('br');
     85         element.appendChild(document.createTextNode(names));
     86         element.appendChild(br);
     87     }
     88     if (document.getElementById("result")) {
     89         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     90     }
     91     document.getElementById("placeholder").appendChild(element);
     92 }