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

djinnNames.js (7166B)


      1 var nm1 = ["", "", "", "", "", "b", "bh", "d", "dh", "g", "gh", "h", "j", "k", "m", "n", "r", "s", "sh", "y", "z"];
      2 var nm2 = ["a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "a", "e", "i", "o", "u", "aa", "ee", "ua", "ai", "oo"];
      3 var nm3 = ["b", "bb", "br", "d", "h", "k", "kh", "m", "n", "nq", "q", "s", "sh", "sm", "ss", "sf", "st", "t", "z", "zz"];
      4 var nm4 = ["b", "bb", "d", "h", "k", "m", "n", "r", "rr", "rh", "s", "sh", "ss", "z", "zz"];
      5 var nm5 = ["", "", "", "", "d", "f", "l", "m", "n", "sh", "z"];
      6 var nm6 = ["", "", "", "", "", "", "", "", "f", "g", "gh", "h", "j", "k", "kh", "l", "m", "n", "ph", "r", "s", "sh", "t", "th", "w", "y", "z"];
      7 var nm7 = ["a", "e", "i", "o", "u", "a", "a", "i", "a", "e", "i", "o", "u", "a", "a", "i", "a", "e", "i", "o", "u", "a", "a", "i", "aa", "ee", "ai", "ia"];
      8 var nm8 = ["b", "d", "dh", "dr", "f", "ff", "l", "ll", "m", "mn", "r", "s", "sh", "ss", "t", "th", "w", "y", "z"];
      9 var nm9 = ["d", "f", "ff", "l", "ll", "m", "n", "r", "s", "ss", "t", "w", "y", "z"];
     10 var nm10 = ["", "", "", "", "", "", "", "", "h", "l", "n"];
     11 var nm11 = ["", "", "", "", "", "bh", "d", "dh", "g", "gh", "h", "j", "k", "kh", "m", "n", "r", "s", "sh", "y", "z"];
     12 var nm12 = ["a", "e", "i", "o", "u", "a", "a", "i", "a", "e", "i", "o", "u", "a", "a", "i", "a", "e", "i", "o", "u", "a", "a", "i", "aa", "ee", "ai"];
     13 var nm13 = ["b", "bb", "d", "h", "kh", "l", "m", "n", "r", "rr", "s", "sh", "ss", "t", "th", "z", "zz"];
     14 var nm14 = ["b", "d", "h", "l", "ll", "m", "n", "r", "rr", "s", "ss", "t", "y", "z", "zz"];
     15 var nm15 = ["", "", "", "h", "l", "m", "n", "s", "z"];
     16 var nm16 = ["Accomplished", "Adored", "Adventurous", "Amazing", "Ancient", "Austere", "Beloved", "Better", "Bold", "Bountiful", "Brilliant", "Carefree", "Courageous", "Creative", "Cruel", "Daring", "Devoted", "Dreamy", "Elegant", "Enchanted", "Enlightened", "Exalted", "Extravagant", "Fair", "Fantastic", "Fearless", "Fesity", "First", "Flawless", "Fortunate", "Friendly", "Generous", "Gentle", "Gifted", "Giving", "Glamorous", "Glorious", "Gorgeous", "Graceful", "Gracious", "Grand", "Grandiose", "Great", "Handsome", "Happy", "Harmonious", "Heavenly", "Honest", "Honored", "Humble", "Idolized", "Illustrious", "Impeccable", "Incredible", "Intrepid", "Jolly", "Joyful", "Joyous", "Kind", "Kindhearted", "Light", "Lovable", "Loyal", "Lucky", "Luminous", "Lustrous", "Luxurious", "Magnificent", "Majestic", "Marvelous", "Mighty", "Mysterious", "Original", "Pleasant", "Pleasing", "Powerful", "Precious", "Proud", "Pure", "Radiant", "Rewarding", "Rich", "Royal", "Sane", "Scented", "Serene", "Silent", "Simple", "Spectacular", "Stunning", "Superior", "Swift", "Tender", "Terrific", "Treasured", "Tremendous", "Trustworthy", "Truthful", "Unequaled", "Venerated", "Vibrant", "Victorious", "Virtuous", "Wealthy", "Wise", "Wonderful"];
     17 var br = "";
     18 
     19 function nameGen(type) {
     20     $('#placeholder').css('textTransform', 'capitalize');
     21     var tp = type;
     22     var element = document.createElement("div");
     23     element.setAttribute("id", "result");
     24     for (i = 0; i < 10; i++) {
     25         rnd16 = Math.floor(Math.random() * nm16.length);
     26         if (tp === 1) {
     27             rnd = Math.floor(Math.random() * nm6.length);
     28             rnd2 = Math.floor(Math.random() * nm7.length);
     29             rnd3 = Math.floor(Math.random() * nm8.length);
     30             rnd4 = Math.floor(Math.random() * nm7.length);
     31             rnd5 = Math.floor(Math.random() * nm10.length);
     32             while (nm8[rnd3] === nm6[rnd]) {
     33                 rnd3 = Math.floor(Math.random() * nm8.length);
     34             }
     35             if (i < 6) {
     36                 names = nm6[rnd] + nm7[rnd2] + nm8[rnd3] + nm7[rnd4] + nm10[rnd5] + " the " + nm16[rnd16];
     37             } else {
     38                 rnd6 = Math.floor(Math.random() * nm9.length);
     39                 rnd7 = Math.floor(Math.random() * nm7.length);
     40                 while (nm9[rnd6] === nm8[rnd3]) {
     41                     rnd6 = Math.floor(Math.random() * nm9.length);
     42                 }
     43                 if (i < 8) {
     44                     names = nm6[rnd] + nm7[rnd2] + nm8[rnd3] + nm7[rnd4] + nm9[rnd6] + nm7[rnd7] + nm10[rnd5] + " the " + nm16[rnd16];
     45                 } else {
     46                     names = nm6[rnd] + nm7[rnd2] + nm8[rnd3] + nm9[rnd6] + nm7[rnd7] + nm7[rnd4] + nm10[rnd5] + " the " + nm16[rnd16];
     47                 }
     48             }
     49         } else if (tp === 2) {
     50             rnd = Math.floor(Math.random() * nm11.length);
     51             rnd2 = Math.floor(Math.random() * nm12.length);
     52             rnd3 = Math.floor(Math.random() * nm13.length);
     53             rnd4 = Math.floor(Math.random() * nm12.length);
     54             rnd5 = Math.floor(Math.random() * nm15.length);
     55             while (nm13[rnd3] === nm11[rnd]) {
     56                 rnd3 = Math.floor(Math.random() * nm13.length);
     57             }
     58             if (i < 6) {
     59                 names = nm11[rnd] + nm12[rnd2] + nm13[rnd3] + nm12[rnd4] + nm15[rnd5] + " the " + nm16[rnd16];
     60             } else {
     61                 rnd6 = Math.floor(Math.random() * nm14.length);
     62                 rnd7 = Math.floor(Math.random() * nm12.length);
     63                 while (nm14[rnd6] === nm13[rnd3]) {
     64                     rnd6 = Math.floor(Math.random() * nm14.length);
     65                 }
     66                 if (i < 8) {
     67                     names = nm11[rnd] + nm12[rnd2] + nm13[rnd3] + nm12[rnd4] + nm14[rnd6] + nm12[rnd7] + nm15[rnd5] + " the " + nm16[rnd16];
     68                 } else {
     69                     names = nm11[rnd] + nm12[rnd2] + nm14[rnd6] + nm12[rnd7] + nm13[rnd3] + nm12[rnd4] + nm15[rnd5] + " the " + nm16[rnd16];
     70                 }
     71             }
     72         } else {
     73             rnd = Math.floor(Math.random() * nm1.length);
     74             rnd2 = Math.floor(Math.random() * nm2.length);
     75             rnd3 = Math.floor(Math.random() * nm3.length);
     76             rnd4 = Math.floor(Math.random() * nm2.length);
     77             rnd5 = Math.floor(Math.random() * nm5.length);
     78             while (nm3[rnd3] === nm1[rnd]) {
     79                 rnd3 = Math.floor(Math.random() * nm3.length);
     80             }
     81             if (i < 6) {
     82                 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm5[rnd5] + " the " + nm16[rnd16];
     83             } else {
     84                 rnd6 = Math.floor(Math.random() * nm4.length);
     85                 rnd7 = Math.floor(Math.random() * nm2.length);
     86                 while (nm4[rnd6] === nm3[rnd3]) {
     87                     rnd6 = Math.floor(Math.random() * nm4.length);
     88                 }
     89                 if (i < 8) {
     90                     names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd6] + nm2[rnd7] + nm5[rnd5] + " the " + nm16[rnd16];
     91                 } else {
     92                     names = nm1[rnd] + nm2[rnd2] + nm4[rnd6] + nm2[rnd7] + nm3[rnd3] + nm2[rnd4] + nm5[rnd5] + " the " + nm16[rnd16];
     93                 }
     94             }
     95         }
     96         br = document.createElement('br');
     97         element.appendChild(document.createTextNode(names));
     98         element.appendChild(br);
     99     }
    100     if (document.getElementById("result")) {
    101         document.getElementById("placeholder").removeChild(document.getElementById("result"));
    102     }
    103     document.getElementById("placeholder").appendChild(element);
    104 }