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

swCloneNames.js (6815B)


      1 var nm1 = ["", "", "", "", "", "b", "bl", "br", "c", "ch", "cr", "d", "dr", "f", "g", "gr", "h", "j", "k", "l", "m", "n", "pr", "r", "s", "st", "t", "th", "tr", "v", "x", "z"];
      2 var nm2 = ["a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "a", "e", "i", "o", "u", "y", "ai", "aa", "ay", "ee", "ye", "oa", "oo", "yo"];
      3 var nm3 = ["'c", "'d", "'k", "'r", "'t", "c", "d", "dd", "d'", "d'r", "f", "ff", "g", "g'", "h", "j", "k", "k'", "l", "ll", "l'", "m", "mm", "n", "n'r", "nc", "nd", "ng", "n'g", "ngl", "nl", "nn", "nt", "n't", "pp", "r", "r'", "rb", "r'b", "rd", "rg", "rl", "rr", "rt", "ss", "t", "tt", "v", "z"];
      4 var nm4 = ["a", "e", "i", "o", "y", "a", "e", "i", "o", "y", "a", "e", "i", "o", "y", "a", "e", "i", "o", "y", "a", "e", "i", "o", "y", "a", "e", "i", "o", "y", "a", "e", "i", "o", "y", "a", "e", "i", "o", "y", "a", "e", "i", "o", "y", "ie", "ii", "oo"];
      5 var nm5 = ["d", "l", "m", "n", "r", "t", "v", "z"];
      6 var nm6 = ["", "", "", "", "", "", "b", "c", "ck", "d", "f", "g", "k", "l", "ll", "m", "mm", "n", "nch", "nd", "ng", "nk", "nks", "nn", "nnk", "p", "r", "rc", "rk", "rg", "rr", "rrt", "rt", "s", "ss", "t", "tt", "v", "x", "xx", "y", "yk", "z"];
      7 var nm7 = ["Access", "Action", "Adventure", "Aftermath", "Agent", "Alarm", "Ambition", "Anger", "Animal", "Answer", "Arch", "Aspect", "Attack", "Attention", "Award", "Band", "Basis", "Battle", "Bead", "Beam", "Beast", "Beat", "Beetle", "Belts", "Bit", "Bite", "Bits", "Bitter", "Blade", "Blades", "Blank", "Blow", "Boar", "Bones", "Bonus", "Border", "Brake", "Brass", "Brave", "Break", "Breath", "Brick", "Broad", "Brother", "Brush", "Buddy", "Bug", "Bugs", "Burn", "Burner", "Burst", "Burster", "Cable", "Candle", "Cannon", "Canvas", "Case", "Cash", "Cast", "Catch", "Catcher", "Cause", "Chain", "Chains", "Champ", "Champion", "Chance", "Change", "Chaos", "Charge", "Charger", "Chase", "Checkmate", "Cheek", "Cheeks", "Chemistry", "Chess", "Chip", "Clerk", "Click", "Clocks", "Cloud", "Club", "Clue", "Code", "Coil", "Cold", "Comb", "Concept", "Control", "Copper", "Courage", "Course", "Craft", "Crash", "Creator", "Creature", "Cross", "Crush", "Crusher", "Cub", "Curiosity", "Curious", "Cycle", "Dance", "Data", "Database", "Death", "Delight", "Design", "Designer", "Device", "Dexterity", "Diamond", "Dirt", "Discovery", "Dish", "Disk", "Doc", "Dock", "Dog", "Double", "Draft", "Dream", "Drift", "Drifter", "Drive", "Driver", "Drum", "Drummer", "Due", "Dust", "Duty", "Edge", "Effect", "Emergency", "Emphasis", "End", "Energy", "Error", "Escape", "Event", "Exit", "Extreme", "Fang", "Fangs", "Fault", "Fear", "Fearless", "Feather", "Feature", "Feedback", "Fight", "Fighter", "Fire", "Flame", "Flight", "Flock", "Flow", "Fluke", "Focus", "Freedom", "Frog", "Frogger", "Game", "Gate", "Ghost", "Gift", "Goal", "Grade", "Greatness", "Guard", "Guest", "Guide", "Habit", "Hammer", "Harm", "Hate", "Heart", "Hell", "Hold", "Honor", "Hook", "Hope", "Horror", "Impact", "Impulse", "Incident", "Ink", "Insect", "Iron", "Jam", "Joker", "Junior", "Justice", "Killer", "Knife", "Knot", "Laugh", "Laughter", "Law", "Leather", "Limit", "Limitless", "Liquid", "Lock", "Locket", "Machine", "Magic", "Major", "Marcher", "Mask", "Memory", "Middle", "Midnight", "Might", "Moment", "Muscle", "Music", "Night", "Omen", "Order", "Ornament", "Owl", "Patience", "Player", "Pocket", "Poison", "Spider"];
      8 var nm8 = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
      9 var nm9 = ["", "-", "-", "-"];
     10 var br = "";
     11 
     12 function nameGen(type) {
     13     var tp = type;
     14     $('#placeholder').css('textTransform', 'capitalize');
     15     var element = document.createElement("div");
     16     element.setAttribute("id", "result");
     17     for (i = 0; i < 10; i++) {
     18         nameMas();
     19         while (nMs === "") {
     20             nameMas();
     21         }
     22         br = document.createElement('br');
     23         element.appendChild(document.createTextNode(nMs));
     24         element.appendChild(br);
     25     }
     26     if (document.getElementById("result")) {
     27         document.getElementById("placeholder").removeChild(document.getElementById("result"));
     28     }
     29     document.getElementById("placeholder").appendChild(element);
     30 }
     31 
     32 function nameMas() {
     33     rnd = Math.random() * nm1.length | 0;
     34     rnd2 = Math.random() * nm2.length | 0;
     35     rnd3 = Math.random() * nm6.length | 0;
     36     if (i < 2) {
     37         while (nm6[rnd3] === nm1[rnd]) {
     38             rnd = Math.random() * nm1.length | 0;
     39         }
     40         nMs = nm1[rnd] + nm2[rnd2] + nm6[rnd3];
     41     } else if (i < 6) {
     42         rnd4 = Math.random() * nm3.length | 0;
     43         rnd5 = Math.random() * nm4.length | 0;
     44         if (i < 6) {
     45             while (nm3[rnd4] === nm6[rnd3] || nm3[rnd4] === nm1[rnd]) {
     46                 rnd4 = Math.random() * nm3.length | 0;
     47             }
     48             nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm6[rnd3];
     49         } else {
     50             rnd6 = Math.random() * nm5.length | 0;
     51             rnd7 = Math.random() * nm4.length | 0;
     52             while (nm5[rnd6] === nm6[rnd3] || nm3[rnd4] === nm5[rnd6]) {
     53                 rnd6 = Math.random() * nm5.length | 0;
     54             }
     55             nMs = nm1[rnd] + nm2[rnd2] + nm3[rnd4] + nm4[rnd5] + nm5[rnd6] + nm4[rnd7] + nm6[rnd3];
     56         }
     57     } else if (i < 7) {
     58         rnd = Math.random() * nm7.length | 0;
     59         nMs = nm7[rnd];
     60     } else if (i === 7) {
     61         nTp = Math.random() * 4 | 0;
     62         rnd = Math.random() * 99 | 0;
     63         rnd2 = Math.random() * 99 | 0;
     64         fPrt = rnd.toString() + rnd2.toString();
     65         if (fPrt.length < 4) {
     66             rnd3 = Math.random() * 9999 | 0;
     67             nMs = "CT-" + fPrt + "-" + rnd3;
     68         } else {
     69             if (nTp < 3) {
     70                 nMs = "CT-" + fPrt;
     71             } else {
     72                 rnd3 = Math.random() * 9999 | 0;
     73                 nMs = "CT-" + fPrt + "-" + rnd2;
     74             }
     75         }
     76     } else {
     77         nTp = Math.random() * 4 | 0;
     78         if (nTp === 0) {
     79             rnd = Math.random() * 9999 | 0;
     80             nMs = rnd;
     81         } else {
     82             rnd = Math.random() * 999 | 0;
     83             rnd2 = Math.random() * nm8.length | 0;
     84             rnd5 = Math.random() * nm9.length | 0;
     85             if (nTp === 1) {
     86                 nMs = nm8[rnd2] + nm9[rnd5] + rnd;
     87             } else {
     88                 rnd3 = Math.random() * nm8.length | 0;
     89                 if (nTp < 3) {
     90                     nMs = nm8[rnd2] + nm8[rnd3] + nm9[rnd5] + rnd;
     91                 } else {
     92                     rnd4 = Math.random() * nm8.length | 0;
     93                     nMs = nm8[rnd2] + nm8[rnd3] + nm8[rnd4] + nm9[rnd5] + rnd;
     94                 }
     95             }
     96         }
     97     }
     98     testSwear(nMs);
     99 }