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

lotrOrcNames.js (1792B)


      1 var nm1 = ["b", "br", "c", "cr", "d", "dr", "g", "gh", "gr", "k", "kr", "l", "m", "r", "s", "sh", "sr"];
      2 var nm2 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "au"];
      3 var nm3 = ["cb", "cd", "cr", "db", "dd", "fd", "fth", "g", "gb", "gd", "gg", "gl", "gr", "gz", "h", "lcm", "ld", "lf", "lg", "rb", "rc", "rd", "rg", "rz", "shn", "thr", "z", "zb", "zg", "zr", "zz"];
      4 var nm4 = ["c", "d", "dh", "f", "g", "gh", "kh", "l", "r", "rg", "sh", "t", "th", "", "", ""];
      5 var nm5 = ["a", "o", "u", "au"];
      6 var br = "";
      7 
      8 function nameGen() {
      9     $('#placeholder').css('textTransform', 'capitalize');
     10     var element = document.createElement("div");
     11     element.setAttribute("id", "result");
     12     for (i = 0; i < 10; i++) {
     13         if (i < 5) {
     14             rnd = Math.floor(Math.random() * nm1.length);
     15             rnd2 = Math.floor(Math.random() * nm2.length);
     16             rnd3 = Math.floor(Math.random() * nm3.length);
     17             rnd4 = Math.floor(Math.random() * nm2.length);
     18             rnd5 = Math.floor(Math.random() * nm4.length);
     19             names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd5];
     20         } else {
     21             rnd = Math.floor(Math.random() * nm5.length);
     22             rnd2 = Math.floor(Math.random() * nm3.length);
     23             rnd3 = Math.floor(Math.random() * nm2.length);
     24             rnd4 = Math.floor(Math.random() * nm4.length);
     25             names = nm5[rnd] + nm3[rnd2] + nm2[rnd3] + nm4[rnd4];
     26         }
     27         br = document.createElement('br');
     28         element.appendChild(document.createTextNode(names));
     29         element.appendChild(br);
     30     }
     31     if (document.getElementById("result")) {
     32         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     33     }
     34     document.getElementById("placeholder").appendChild(element);
     35 }