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

rsAviansie.js (2700B)


      1 var nm1 = ["", "", "", "c", "ch", "g", "h", "k", "kr", "n", "q", "qh", "r", "sk", "sq", "skr", "t", "v", "z"];
      2 var nm2 = ["a'a", "ee'a", "e'a", "i'a", "o'", "ee", "ia", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o", "a", "e", "i", "o"];
      3 var nm3 = ["k'r", "p'r", "w'p", "w'k", "w'n", "b", "c", "cr", "fr", "k", "kr", "l", "lk", "ln", "lr", "n", "nr", "ns", "pr", "r", "rh", "rm", "rr", "sm", "sr", "sk", "skr"];
      4 var nm4 = ["i'", "a'", "e'", "a", "i", "a", "i", "a", "i", "e", "e", "a", "i", "a", "i", "a", "i", "e", "e", "a", "i", "a", "i", "a", "i", "e", "e"];
      5 var nm5 = ["d", "h", "r", "s", "sh", "y", "z"];
      6 var nm6 = ["ae", "oo", "ee", "ia", "ei", "aa", "a", "a", "a", "i", "i", "e", "e", "y", "y", "a", "a", "a", "i", "i", "e", "e", "y", "y"];
      7 var nm7 = ["", "", "", "k", "l", "n", "s", "sh", "th"];
      8 var br = "";
      9 
     10 function nameGen() {
     11     $('#placeholder').css('textTransform', 'capitalize');
     12     var element = document.createElement("div");
     13     element.setAttribute("id", "result");
     14     for (i = 0; i < 10; i++) {
     15         nameMas();
     16         while (nMs === "") {
     17             nameMas();
     18         }
     19         br = document.createElement('br');
     20         element.appendChild(document.createTextNode(nMs));
     21         element.appendChild(br);
     22     }
     23     if (document.getElementById("result")) {
     24         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     25     }
     26     document.getElementById("placeholder").appendChild(element);
     27 }
     28 
     29 function nameMas() {
     30     nTp = Math.random() * 3 | 0;
     31     rnd = Math.random() * nm1.length | 0;
     32     rnd2 = Math.random() * nm2.length | 0;
     33     rnd3 = Math.random() * nm3.length | 0;
     34     rnd4 = Math.random() * nm4.length | 0;
     35     rnd5 = Math.random() * nm7.length | 0;
     36     if (rnd2 < 5) {
     37         while (rnd3 < 5) {
     38             rnd3 = Math.random() * nm3.length | 0;
     39         }
     40         while (rnd4 < 3) {
     41             rnd4 = Math.random() * nm4.length | 0;
     42         }
     43     }
     44     if (rnd3 < 5) {
     45         while (rnd4 < 3) {
     46             rnd4 = Math.random() * nm4.length | 0;
     47         }
     48     }
     49     while (nm3[rnd3] === nm1[rnd] || nm3[rnd3] === nm7[rnd5]) {
     50         rnd3 = Math.random() * nm3.length | 0;
     51     }
     52     if (nTp < 2) {
     53         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm7[rnd5];
     54     } else {
     55         rnd6 = Math.random() * nm6.length | 0;
     56         rnd7 = Math.random() * nm5.length | 0;
     57         while (nm3[rnd3] === nm5[rnd7] || nm5[rnd7] === nm7[rnd5]) {
     58             rnd7 = Math.random() * nm5.length | 0;
     59         }
     60         nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm6[rnd6] + nm5[rnd7] + nm4[rnd4] + nm7[rnd5];
     61     }
     62     testSwear(nMs);
     63 }