mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 02:35:08 +02:00
random ID's
This commit is contained in:
parent
b2f153f897
commit
5bd7f55e84
3
index.js
3
index.js
@ -2,7 +2,8 @@ const { generateRocketeer } = require("./nft-media/rocketeer");
|
|||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
for (var id = 1; id <= 3475; id++) {
|
while (true) {
|
||||||
|
const id = Math.floor(Math.random() * (999998) + 1)
|
||||||
console.log("Generating Cpn Chad " + id);
|
console.log("Generating Cpn Chad " + id);
|
||||||
console.log(await generateRocketeer(id));
|
console.log(await generateRocketeer(id));
|
||||||
}
|
}
|
||||||
|
@ -33,14 +33,6 @@ async function generateRocketeer(id) {
|
|||||||
value: Math.floor(Date.now() / 1000),
|
value: Math.floor(Date.now() / 1000),
|
||||||
});
|
});
|
||||||
|
|
||||||
// Special editions
|
|
||||||
const edition = { trait_type: "edition", value: "regular" };
|
|
||||||
if (id <= 50) edition.value = "genesis";
|
|
||||||
if (id >= 3475 - 166) edition.value = "straggler";
|
|
||||||
if (id % 42 === 0) edition.value = "hitchhiker";
|
|
||||||
if ((id - 1) % 42 == 0) edition.value = "generous";
|
|
||||||
rocketeer.attributes.push(edition);
|
|
||||||
|
|
||||||
// Create description
|
// Create description
|
||||||
rocketeer.description = `${rocketeer.name} is a proud member of the ${
|
rocketeer.description = `${rocketeer.name} is a proud member of the ${
|
||||||
rocketeer.attributes.find(({ trait_type }) => trait_type == "patch").value
|
rocketeer.attributes.find(({ trait_type }) => trait_type == "patch").value
|
||||||
@ -95,7 +87,7 @@ async function generateRocketeer(id) {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
return rocketeer.image;
|
return rocketeer.name + ": `" + "' @ " + rocketeer.image;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user