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

wakfuOsamodas.js (2568B)


      1 var nm1 = ["a", "e", "i", "e", "", "", "", ""];
      2 var nm2 = ["d", "g", "h", "k", "l", "m", "n", "q", "r", "v", "z"];
      3 var nm3 = ["a", "a", "e", "o"];
      4 var nm4 = ["b", "br", "d", "dr", "g", "gr", "ld", "lg", "lk", "k", "kr", "n", "nd", "nk", "nv", "nz", "v", "vr", "z"];
      5 var nm5 = ["a", "i", "o", "a", "i", "o", "a", "i", "o", "ia", "io"];
      6 var nm6 = ["c", "d", "g", "k", "n", "q", "", "", ""];
      7 var nm7 = ["", "", "", "c", "f", "h", "m", "n", "q", "v", "z"];
      8 var nm8 = ["au", "a", "o", "a", "o", "e"];
      9 var nm9 = ["d", "h", "l", "ll", "lm", "lv", "n", "q", "r", "rl", "v", "y", "z"];
     10 var nm10 = ["ue", "i", "o", "i", "o", "a", "e"];
     11 var nm11 = ["h", "l", "n", "r", "sh", "y"];
     12 var nm12 = ["a", "e", "a", "e", "i", "o", "ile", "ine"];
     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         if (tp === 1) {
     22             nameFem();
     23             while (nMs === "") {
     24                 nameFem();
     25             }
     26         } else {
     27             nameMas();
     28             while (nMs === "") {
     29                 nameMas();
     30             }
     31         }
     32         br = document.createElement('br');
     33         element.appendChild(document.createTextNode(nMs));
     34         element.appendChild(br);
     35     }
     36     if (document.getElementById("result")) {
     37         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     38     }
     39     document.getElementById("placeholder").appendChild(element);
     40 }
     41 
     42 function nameMas() {
     43     rnd = Math.random() * nm1.length | 0;
     44     rnd2 = Math.random() * nm2.length | 0;
     45     rnd3 = Math.random() * nm3.length | 0;
     46     rnd4 = Math.random() * nm4.length | 0;
     47     rnd5 = Math.random() * nm5.length | 0;
     48     rnd6 = Math.random() * nm6.length | 0;
     49     while (nm2[rnd2] === nm4[rnd4] || nm4[rnd4] === nm6[rnd6]) {
     50         rnd4 = Math.random() * nm4.length | 0;
     51     }
     52     nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm4[rnd4] + nm5[rnd5] + nm6[rnd6];
     53     testSwear(nMs);
     54 }
     55 
     56 function nameFem() {
     57     rnd = Math.random() * nm7.length | 0;
     58     rnd2 = Math.random() * nm8.length | 0;
     59     rnd3 = Math.random() * nm9.length | 0;
     60     rnd4 = Math.random() * nm10.length | 0;
     61     rnd5 = Math.random() * nm11.length | 0;
     62     rnd6 = Math.random() * nm12.length | 0;
     63     while (nm7[rnd] === nm9[rnd3] || nm9[rnd3] === nm11[rnd5]) {
     64         rnd3 = Math.random() * nm9.length | 0;
     65     }
     66     nMs = nm7[rnd] + nm8[rnd2] + nm9[rnd3] + nm10[rnd4] + nm11[rnd5] + nm12[rnd6];
     67     testSwear(nMs);
     68 }