You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
4.4 KiB
JavaScript

function nameGen() {
var nm1 = ["Allots", "Anvils", "Bags", "Bales", "Balls", "Barrels", "Bars", "Birds", "Blocks", "Boards", "Boars", "Bolts", "Boulders", "Bricks", "Buckets", "Cannonballs", "Cannons", "Casts", "Chains", "Chests", "Chickens", "Chunks", "Clumps", "Cobbles", "Coins", "Cows", "Crates", "Crowns", "Crumbs", "Crystals", "Cubes", "Darts", "Disks", "Drums", "Feathers", "Flakes", "Fractions", "Fragments", "Grains", "Grains of Sand", "Halfs", "Hammers", "Heads", "Headstones", "Hearts", "Horses", "Horseshoes", "Hunks", "Ingots", "Keystones", "Leaves", "Links", "Loaves", "Logs", "Lumps", "Marbles", "Monoliths", "Morsels", "Nails", "Nuggets", "Obelisks", "Orbs", "Parcels", "Pebbles", "Peels", "Pellets", "Petals", "Pieces", "Plates", "Plumes", "Portions", "Pouches", "Prongs", "Purses", "Quills", "Rings", "Rocks", "Rods", "Sacks", "Sandbags", "Scales", "Shackles", "Shares", "Shingles", "Skins", "Skulls", "Slabs", "Slates", "Slats", "Stalks", "Sticks", "Tablets", "Thrones", "Tiles", "Timbers", "Tomes", "Trunks", "Wedges"];
var nm2 = ["Bags", "Barrels", "Basins", "Baskets", "Baths", "Beads", "Bins", "Bottles", "Bowls", "Boxes", "Buckets", "Bushels", "Canisters", "Cans", "Canteens", "Capsules", "Carafes", "Cartons", "Cases", "Caskets", "Casks", "Cauldrons", "Chests", "Churns", "Cisterns", "Coffers", "Cradles", "Crocks", "Cylinders", "Drips", "Drops", "Drums", "Duffels", "Firkins", "Flagons", "Flasks", "Glasses", "Grains", "Handfuls", "Hogsheads", "Holes", "Hollows", "Jars", "Jugs", "Kegs", "Morsels", "Mouthfuls", "Mugs", "Packets", "Pails", "Pebbles", "Phials", "Pinches", "Pipes", "Pitchers", "Pockets", "Pods", "Ponds", "Pools", "Pots", "Pouches", "Purses", "Sacks", "Saddlebags", "Satchels", "Scatterings", "Skins", "Spoons", "Sprinklings", "Steins", "Stones", "Tankards", "Tanks", "Thimbles", "Trunks", "Tubs", "Tuns", "Urns", "Vases", "Vats", "Vesicles", "Vessels", "Vials", "Wells"];
var nm3 = ["Arms", "Arrow-Flights", "Arrows", "Belts", "Blades", "Bodies", "Breadths", "Canes", "Crowflights", "Eyes", "Fields", "Fingers", "Fists", "Flags", "Flagstaffs", "Flights", "Gardens", "Hairs", "Half-Arms", "Half-Fingers", "Half-Legs", "Hands", "Heads", "Hooves", "Horns", "Knots", "Leagues", "Legs", "Lengths", "Logs", "Loops", "Margins", "Masts", "Meadows", "Nails", "Needles", "Paces", "Palms", "Parks", "Pastures", "Pikes", "Planks", "Plots", "Poles", "Ranges", "Reeds", "Rinks", "Rods", "Shafts", "Spears", "Spikes", "Spires", "Stakes", "Stalks", "Staves", "Stonethrows", "Stretches", "Strides", "Studs", "Tails", "Throws", "Tiles", "Trunks", "Tusks", "Twigs", "Wingspans"];
var nm4 = ["Beats", "Bells", "Blinks", "Candlemarks", "Candles", "Chimes", "Chronos", "Clacks", "Clicks", "Clips", "Counts", "Crowflights", "Crows", "Cups", "Cycles", "Dawns", "Daybits", "Dials", "Drips", "Droplets", "Drops", "Dusks", "Ebbs", "Eclipses", "Equinox", "Flashes", "Floods", "Flows", "Full-Moons", "Gears", "Grains", "Half Days", "Half-Moons", "Halfdays", "Halfseasons", "Harvests", "Heartbeats", "Jingles", "Jumps", "Lapses", "Marks", "Meltings", "Moments", "Moonrises", "Moons", "Nights", "Oscillations", "Pendulums", "Percolations", "Pops", "Prayers", "Pulses", "Quarter Days", "Repeats", "Rings", "Ripples", "Rotations", "Rushes", "Seasons", "Snaps", "Solstices", "Springs", "Starfalls", "Starrises", "Strides", "Strikes", "Sun-Cycles", "Suns", "Sunsets", "Surges", "Ticks", "Tides", "Tolls", "Turns", "Twists", "Wanings", "Waves", "Waxings", "Wicks", "Wingflaps"];
var br = "";
var element = document.createElement("div");
element.setAttribute("id", "result");
for (i = 0; i < 12; i++) {
if (i < 3) {
rnd = Math.random() * nm1.length | 0;
names = nm1[rnd];
nm1.splice(rnd, 1);
} else if (i < 6) {
rnd = Math.random() * nm2.length | 0;
names = nm2[rnd];
nm2.splice(rnd, 1);
} else if (i < 9) {
rnd = Math.random() * nm3.length | 0;
names = nm3[rnd];
nm3.splice(rnd, 1);
} else {
rnd = Math.random() * nm4.length | 0;
names = nm4[rnd];
nm4.splice(rnd, 1);
}
br = document.createElement('br');
element.appendChild(document.createTextNode(names));
element.appendChild(br);
}
if (document.getElementById("result")) {
document.getElementById("placeholder").removeChild(document.getElementById("result"));
}
document.getElementById("placeholder").appendChild(element);
}