Added cwts.json & (incomplete) loadout.js

This commit is contained in:
ThunderE75 2022-01-30 21:56:01 +05:30
parent 86fc3500d5
commit bab4d6a5ba
4 changed files with 251 additions and 1 deletions

View file

@ -472,7 +472,7 @@ module.exports = {
value: "E04",
},
{
name: "KRM_262",
name: "KRM 262",
value: "E05",
},
{

78
command/CODM/loadout.js Normal file
View file

@ -0,0 +1,78 @@
const { MessageEmbed } = require("discord.js"); //@night0721 You need to make this
const items = require("../../util/Data/loadout.json");
module.exports = {
name: "class",
description: "Generate A Random Loadout",
category: "CODM",
run: async (client, interaction) => {
// const data = async () => {
// const d = await model.findOne({});
// const types = d.Categories;
// const names = d.Primary;
// const category = types[Math.floor(Math.random() * types.length)];
// const weapons = names[0][category];
// return `${weapons[Math.floor(Math.random() * weapons.length)]}`;
// };
// const primary_weapon = await data();
// const primary = primary_weapon.replace(/[ -]/g, "_").replace(/\./g, "");
// const slots = shuffle(Object.keys(Attachments[primary][0]));
// const slot_1 = slots.next().value,
// slot_2 = slots.next().value,
// slot_3 = slots.next().value,
// slot_4 = slots.next().value,
// slot_5 = slots.next().value;
const result = new MessageEmbed()
.setColor(client.color)
.setFooter(`Made by ${client.author}`)
.setURL(client.web)
.setTitle(`🎲 A Randomly Generated Loadout 🎲`)
.setDescription(
`This loadout is a randomly generated, Also try, \`\`\`\`/gun\`\`\`\` to get a randomally generated primary weapon gunsmith build`
)
.addFields(
{
name: `Secondary Weapon`,
value: ``,
inline: true,
},
{
name: `Operator Skill`,
value: ``,
inline: true,
},
{
name: `Scorestreak`, // 3 perks
value: ``,
inline: true,
},
{
name: `Red Perk`,
value: ``,
inline: true,
},
{
name: `Green Perk`,
value: ``,
inline: true,
},
{
name: `Blue Perk`,
value: ``,
inline: true,
}
)
.setTimestamp();
interaction.followUp({ embeds: [result] });
// function* shuffle(array) {
// let i = array.length;
// while (i--) {
// yield array.splice(Math.floor(Math.random() * (i + 1)), 1)[0];
// }
// }
// function getAttachment(gun, slot) {
// const ca = Attachments[gun][0][slot];
// return ca[Math.floor(Math.random() * ca.length)];
// }
},
};

74
util/Data/cwts.json Normal file
View file

@ -0,0 +1,74 @@
{
"A01": "Type 25",
"A02": "M16",
"A03": "AK117",
"A04": "AK-47",
"A05": "ASM10",
"A06": "M4",
"A07": "BK57",
"A08": "LK24",
"A09": "ICR-1",
"A10": "Man-o-War",
"A11": "KN-44",
"A12": "HBRa3",
"A13": "HVK-30",
"A14": "DR-H",
"A15": "Peacekeeper MK2",
"A16": "FR .556",
"A17": "AS VAL",
"A18": "CR-56 AMAX",
"A19": "M13",
"A20": "Swordfish",
"A21": "Kilo 141",
"B01": "XPR-50",
"B02": "Arctic .50",
"B03": "M21 EBR",
"B04": "DL Q33",
"B05": "Locus",
"B06": "NA-45",
"B07": "Outlaw",
"B08": "Rytec AMR",
"B09": "SVD",
"C01": "S36",
"C02": "UL736",
"C03": "RPD",
"C04": "M4 LMG",
"C05": "Chopper",
"C06": "Holger 26",
"C07": "Hades",
"C08": "PKM",
"D01": "RUS-79u",
"D02": "Chicom",
"D03": "PDW-57",
"D04": "Razorback",
"D05": "MSMC",
"D06": "HG40",
"D07": "Pharo",
"D08": "GKS",
"D09": "Cordite",
"D10": "QQ9",
"D11": "Fennec",
"D12": "AGR 556",
"D13": "QXR",
"D14": "PP19 Bizon",
"D15": "MX9",
"D16": "CBR4",
"D17": "PPSh 41",
"E01": "HS2126",
"E02": "BY15",
"E03": "HS0405",
"E04": "Striker",
"E05": "KRM 262",
"E06": "Echo",
"E07": "R9-0",
"F01": "Kilo Bolt-Action",
"F02": "SKS",
"F03": "SP-R 208",
"F04": "MK2",
"G01": "J358",
"G02": "MW11",
"G03": ".50 GS",
"G04": "Renetti",
"G05": "Shorty",
"G06": "Crossbow"
}

98
util/Data/loadout.json Normal file
View file

@ -0,0 +1,98 @@
{
"secondary": [ // No Weapons from pistol catagory
"Knife / Base Melee",
"Axe",
"Shovel",
"Baseball Bat",
"Nunchucks",
"Prizefighter",
"Wrench",
"Sickle",
"Machete",
"Katana",
"FHJ-18",
"SMRS",
"D13 Sector",
"Thumper"
],
"perk_1": [ // Red Perks
"Fast Recover",
"Persistence",
"Flak Jacket",
"Skulker",
"Agile",
"Lightweight",
"Restock",
"Tactician",
"Overclock",
"Martyrdom",
"Iron Lungs"
],
"perk_2": [ // Green Perks
"Vulture",
"Toughness",
"Tracker",
"Ghost",
"Cold Blooded",
"Hard Wired",
"Quick Fix",
"Amped",
"Recon",
"Gung-Ho"
],
"perk_3": [ // Blue Perks
"Hard Line",
"Demo Expert",
"Tactical Mask",
"Alert",
"Engineer",
"Dead Silence",
"Shrapnel",
"Hard Alert",
"Launcher Plus"
],
"scorestreek": [
"Shield Turret",
"UAV",
"Shock RC",
"Hunter Killer Drone",
"Care Package",
"Counter UAV",
"MQ-27 Dragonfire",
"SAM Turret",
"Predator Missile",
"Hawk X3",
"Sentry Gun",
"Lightning Strike",
"Orbital Laser",
"XS1 Goliath",
"Cluster Strike",
"Chopper Gunner",
"Stealth Chopper",
"Swarm",
"Napalm",
"Advance UAV",
"EMP Systems",
"VTOL"
],
"operator_skill": [
"Purifier",
"War Machine",
"Death Machine",
"Tranform Shield",
"K9 UNIT",
"Sparrow",
"Tempest",
"H.I.V.E. ",
"Gravity Spikes",
"Annihilator",
"Shadow Blade",
"Equalizer",
"Ballistic Shield",
"Gravity Vortex Gun",
"Bull Charge",
"Kinetic Armor",
"TAK-5",
"Munitions Box"
]
}