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

wildstarMechari.js (4382B)


      1 var nm1 = ["", "", "", "", "", "c", "d", "gl", "h", "l", "m", "p", "pr", "r", "s", "t", "tr", "v", "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", "y", "y", "io", "au", "ei"];
      3 var nm3 = ["c", "cr", "chr", "ct", "g", "gn", "gz", "kr", "kt", "kx", "kn", "l", "lb", "ll", "mph", "n", "ph", "pr", "ps", "r", "rx", "rc", "rct", "rm", "rv", "rz", "st", "sp", "t", "tr", "v", "x", "xt", "c", "g", "l", "n", "r", "t", "v", "x"];
      4 var nm4 = ["", "c", "cs", "n", "m", "r", "s", "t", "x"];
      5 var nm5 = ["", "", "", "", "", "c", "d", "h", "l", "m", "n", "ph", "phr", "s", "sh", "t", "th", "v", "z"];
      6 var nm6 = ["a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "y", "y", "y", "ia", "au", "ie", "io"];
      7 var nm7 = ["b", "br", "c", "d", "dr", "f", "fr", "fn", "fl", "gh", "lv", "ln", "lm", "lz", "lph", "lf", "m", "mz", "mr", "mn", "n", "nv", "nz", "r", "rk", "rv", "rz", "rs", "t", "th", "v", "x", "z", "zn", "b", "c", "d", "f", "m", "n", "r", "t", "v", "x", "z", "b", "c", "d", "f", "m", "n", "r", "t", "v", "x", "z"];
      8 var nm8 = ["", "", "", "", "", "c", "h", "n", "l", "ll", "s", "sh", "th", "x"];
      9 var nm9 = ["Alpha", "Beta", "Bi", "Cen", "Cent", "Centi", "Chi", "Dec", "Deca", "Decem", "Delta", "Di", "Dodeca", "Du", "Duo", "Duodec", "Ennea", "Epsilon", "Eta", "Gamma", "Hec", "Hecato", "Hect", "Hep", "Hept", "Hepta", "Hex", "Hexa", "Iota", "Kappa", "Kilo", "Lambda", "Milli", "Mono", "Mu", "Non", "Nove", "Nu", "Nulli", "Oc", "Oct", "Octa", "Octo", "Ogdo", "Omega", "Penta", "Phi", "Pi", "Psi", "Quadri", "Quadru", "Rho", "Sedec", "Semi", "Sep", "Sept", "Sigma", "Tau", "Tetra", "Theta", "Tri", "Trio", "Unci", "Uni", "Upsilon", "Xi", "Zeta"];
     10 var nm10 = ["bit", "byt", "coil", "col", "cue", "cy", "frag", "gine", "helix", "hicle", "jet", "lap", "lic", "lit", "lix", "logy", "loop", "maton", "mech", "mic", "mics", "net", "nic", "nics", "niq", "nis", "nism", "nix", "nogy", "nox", "pin", "ping", "pute", "ram", "rom", "ron", "ser", "sor", "tec", "tic", "tics", "ton", "tred", "tric", "tron", "vex", "vox", "ware", "xis", "zip"];
     11 var br = "";
     12 
     13 function nameGen(type) {
     14     $('#placeholder').css('textTransform', 'capitalize');
     15     var tp = type;
     16     var element = document.createElement("div");
     17     element.setAttribute("id", "result");
     18     for (i = 0; i < 10; i++) {
     19         rnd6 = Math.floor(Math.random() * nm9.length);
     20         rnd7 = Math.floor(Math.random() * nm10.length);
     21         lname = nm9[rnd6] + nm10[rnd7];
     22         if (tp === 1) {
     23             rnd = Math.floor(Math.random() * nm5.length);
     24             rnd2 = Math.floor(Math.random() * nm6.length);
     25             rnd3 = Math.floor(Math.random() * nm7.length);
     26             rnd4 = Math.floor(Math.random() * nm6.length);
     27             if (i < 5) {
     28                 rnd5 = Math.floor(Math.random() * nm8.length);
     29                 if (rnd < 5) {
     30                     while (rnd5 < 5) {
     31                         rnd5 = Math.floor(Math.random() * nm8.length);
     32                     }
     33                 }
     34                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + " " + lname;
     35             } else {
     36                 rnd6 = Math.floor(Math.random() * nm7.length);
     37                 rnd7 = Math.floor(Math.random() * nm6.length);
     38                 names = nm5[rnd] + nm6[rnd2] + nm7[rnd3] + nm6[rnd4] + nm7[rnd6] + nm6[rnd7] + " " + lname;
     39             }
     40         } else {
     41             rnd = Math.floor(Math.random() * nm1.length);
     42             rnd2 = Math.floor(Math.random() * nm2.length);
     43             rnd3 = Math.floor(Math.random() * nm3.length);
     44             rnd4 = Math.floor(Math.random() * nm2.length);
     45             rnd5 = Math.floor(Math.random() * nm4.length);
     46             if (rnd < 5) {
     47                 while (rnd5 === 0) {
     48                     rnd5 = Math.floor(Math.random() * nm4.length);
     49                 }
     50             }
     51             names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5] + " " + lname;
     52         }
     53         br = document.createElement('br');
     54         element.appendChild(document.createTextNode(names));
     55         element.appendChild(br);
     56     }
     57     if (document.getElementById("result")) {
     58         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     59     }
     60     document.getElementById("placeholder").appendChild(element);
     61 }