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

amazonNames.js (2691B)


      1 var nm1 = ["b", "bl", "br", "c", "chr", "cl", "cr", "d", "dr", "f", "g", "gl", "gr", "h", "j", "k", "kl", "kr", "m", "n", "p", "ph", "ps", "pr", "r", "rh", "s", "sm", "sc", "t", "th", "v", "x", "", "", "", "", "", "", ""];
      2 var nm2 = ["a", "e", "i", "o", "u", "y", "ou", "ei", "oe", "ao", "io", "eo", "a", "e", "i", "o", "u"];
      3 var nm3 = ["c", "d", "k", "l", "m", "r", "s", "t", "x", "", "", "", "", "", "", "", "", "", "", ""];
      4 var nm4 = ["c", "d", "k", "l", "m", "r", "s", "t", "x", "nd", "nt", "lk", "lc", "ll", "ndr", "br", "st", "ch", "br", "cl", "ph", "rm", "pp", "pt", "rp", "nth", "th", "rg", "thr", "dm", "lth", "lc", "chr", "phn", "dr", "mn", "rr", "rrh"];
      5 var nm5 = ["a", "e", "i", "o", "u", "y", "", "", "", "", "", "", "", "", ""];
      6 var nm6 = ["adia", "ameia", "anta", "asca", "cabe", "ce", "cleia", "cyone", "cyra", "da", "dae", "dia", "dice", "dora", "enice", "esia", "estra", "estris", "gea", "gone", "haedra", "hyia", "ippe", "isbe", "ises", "leia", "lene", "lete", "liope", "lipe", "lyte", "mache", "meia", "nache", "nara", "neira", "nestra", "nia", "nippe", "noe", "nousa", "ope", "padia", "pedo", "peia", "pesia", "phale", "pyle", "pyte", "rera", "reto", "roe", "scyra", "ses", "sippe", "sose", "tane", "thippe", "thoe", "thya", "thye", "thyia", "ybe", "yche", "yle", "yme", "yne", "yope", "yrbe", "ytie"];
      7 
      8 function nameGen() {
      9     $('#placeholder').css('textTransform', 'capitalize');
     10     var br = "";
     11     var element = document.createElement("div");
     12     element.setAttribute("id", "result");
     13     for (i = 0; i < 10; i++) {
     14         if (i < 5) {
     15             rnd = Math.floor(Math.random() * nm1.length);
     16             rnd2 = Math.floor(Math.random() * nm2.length);
     17             rnd3 = Math.floor(Math.random() * nm3.length);
     18             rnd4 = Math.floor(Math.random() * nm5.length);
     19             rnd5 = Math.floor(Math.random() * nm6.length);
     20             names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm5[rnd4] + nm6[rnd5];
     21         } else {
     22             rnd = Math.floor(Math.random() * nm1.length);
     23             rnd2 = Math.floor(Math.random() * nm2.length);
     24             rnd3 = Math.floor(Math.random() * nm4.length);
     25             rnd4 = Math.floor(Math.random() * nm2.length);
     26             rnd5 = Math.floor(Math.random() * nm6.length);
     27             names = nm1[rnd] + nm2[rnd2] + nm4[rnd3] + nm2[rnd4] + nm6[rnd5];
     28         }
     29         br = document.createElement('br');
     30         element.appendChild(document.createTextNode(names));
     31         element.appendChild(br);
     32     }
     33     if (document.getElementById("result")) {
     34         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     35     }
     36     document.getElementById("placeholder").appendChild(element);
     37 }