mgtDjinn.js (4631B)
1 var nm1 = ["", "", "", "", "b", "d", "g", "h", "j", "k", "m", "r", "s", "v", "z"]; 2 var nm2 = ["a", "e", "i", "o", "u"]; 3 var nm3 = ["d", "g", "h", "k", "j", "l", "m", "n", "nth", "r", "rh", "s", "t", "z"]; 4 var nm4 = ["g", "m", "mg", "nd", "r", "rg", "s", "v", "z"]; 5 var nm5 = ["g", "k", "j", "l", "m", "n", "r", "s", "t", "z"]; 6 var nm6 = ["b", "c", "d", "m", "r"]; 7 var nm7 = ["Djinn", "Loremaster", "Weaver", "Sage", "Djinn", "Djinn", "Djinn", "Djinn", "Djinn", "Djinn", "Master", "Mahatma", "Savant"]; 8 var nm8 = ["Amusement", "Autumn", "Balance", "Chance", "Chances", "Change", "Competition", "Deceit", "Deception", "Desire", "Destinations", "Destinies", "Favors", "Fear", "Fire", "Flames", "Flight", "Frost", "Games", "Harmony", "Humor", "Ice", "Illumination", "Invention", "Jewels", "Knowledge", "Laughs", "Laughter", "Lies", "Light", "Magic", "Music", "Passages", "Play", "Pleasure", "Purpose", "Questions", "Requests", "Rewards", "Riddles", "Servitude", "Slavery", "Smiles", "Smoke", "Smoke and Mirrors", "Snow", "Solitude", "Spirits", "Spring", "Summer", "Surprises", "Thoughts", "Thrills", "Thunder", "Time", "Truth", "Vacation", "Voyages", "Water", "Wind", "Winter", "Wisdom", "Wishes", "the Air", "the Clouds", "the Destiny", "the Forest", "the Labyrinth", "the Lamp", "the Maze", "the Mountain", "the Realm", "the Sea", "the Senses", "the Sky", "the Swamp", "the Voyage", "the Weather", "the World"]; 9 var nm9 = ["Aerial", "Aura", "Aurora", "Autumn", "Avian", "Balance", "Borealis", "Brine", "Chance", "Competition", "Cyclone", "Deception", "Desire", "Destiny", "Dew", "Favor", "Fire", "Flame", "Flight", "Frost", "Gale", "Game", "Gust", "Harmony", "Hellion", "Ice", "Illumination", "Invention", "Jewel", "Knowledge", "Laughter", "Light", "Music", "Nebula", "Ozone", "Passage", "Pleasure", "Riddle", "Servitude", "Smiles", "Smoke", "Snow", "Solitude", "Spirits", "Spring", "Storm", "Summer", "Surprise", "Thrill", "Thunder", "Time", "Truth", "Vapor", "Voyage", "Water", "Wind", "Winter", "Wisdom", "Zephyr"]; 10 var br = ""; 11 12 function nameGen() { 13 $('#placeholder').css('textTransform', 'capitalize'); 14 var element = document.createElement("div"); 15 element.setAttribute("id", "result"); 16 for (i = 0; i < 10; i++) { 17 if (i < 6) { 18 rnd = Math.floor(Math.random() * nm1.length); 19 rnd2 = Math.floor(Math.random() * nm2.length); 20 rnd3 = Math.floor(Math.random() * nm3.length); 21 rnd4 = Math.floor(Math.random() * nm2.length); 22 rnd5 = Math.floor(Math.random() * nm5.length); 23 rnd6 = Math.floor(Math.random() * nm7.length); 24 if (i < 3) { 25 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm5[rnd5] + " " + nm7[rnd6]; 26 } else if (i < 5) { 27 rnd8 = Math.floor(Math.random() * nm4.length); 28 rnd9 = Math.floor(Math.random() * nm2.length); 29 while (nm4[rnd8] === nm3[rnd3]) { 30 rnd8 = Math.floor(Math.random() * nm4.length); 31 } 32 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd8] + nm2[rnd9] + nm5[rnd5] + " " + nm7[rnd6]; 33 } else { 34 rnd8 = Math.floor(Math.random() * nm4.length); 35 rnd9 = Math.floor(Math.random() * nm2.length); 36 rnd10 = Math.floor(Math.random() * nm5.length); 37 rnd11 = Math.floor(Math.random() * nm2.length); 38 while (nm4[rnd8] === nm3[rnd3]) { 39 rnd8 = Math.floor(Math.random() * nm4.length); 40 } 41 while (nm5[rnd10] === nm3[rnd3] || nm5[rnd10] === nm4[rnd8]) { 42 rnd10 = Math.floor(Math.random() * nm5.length); 43 } 44 names = nm1[rnd] + nm2[rnd2] + nm3[rnd3] + nm2[rnd4] + nm4[rnd8] + nm2[rnd9] + nm5[rnd10] + nm2[rnd11] + nm5[rnd5] + " " + nm7[rnd6]; 45 } 46 } else if (i < 8) { 47 rnd = Math.floor(Math.random() * nm7.length); 48 rnd2 = Math.floor(Math.random() * nm8.length); 49 names = nm7[rnd] + " of " + nm8[rnd2]; 50 } else { 51 rnd = Math.floor(Math.random() * nm9.length); 52 rnd2 = Math.floor(Math.random() * nm7.length); 53 names = nm9[rnd] + " " + nm7[rnd2]; 54 } 55 br = document.createElement('br'); 56 element.appendChild(document.createTextNode(names)); 57 element.appendChild(br); 58 } 59 if (document.getElementById("result")) { 60 document.getElementById("placeholder").removeChild(document.getElementById("result")); 61 } 62 document.getElementById("placeholder").appendChild(element); 63 }