Update index.js
This commit is contained in:
parent
9b23dff01d
commit
a8a7696233
1 changed files with 26 additions and 22 deletions
48
index.js
48
index.js
|
@ -9,9 +9,11 @@
|
|||
const { MessageBuilder } = require('prismarine-chat')('1.16');
|
||||
const registry = require('prismarine-registry')('1.16');
|
||||
const ChatMessage = require('prismarine-chat')(registry);
|
||||
const prefixes = ['radium:', 'r:', 'r!', 'radium!', 'r/', 'radium/', 'rad:', 'rad!', 'rad/', '⁄€‹›fifl‡°·‚—±Œ„´‰ˇÁ¨ˆØ∏”’»ÅÍÎÏ˝ÓÔÒÚƸ˛Ç◊ı˜Â¯˘¿¡™£¢∞¶•ªº–≠œ∑´®†¥¨ˆøπ“‘«åß∂ƒ©˙∆˚¬…æΩ≈ç√∫˜µ≤≥÷'.split('')].flat();
|
||||
const prefixes = ['radium:', 'r:', 'r!', 'radium.', 'r.', 'radium!', 'r/', 'radium/', 'rad:', 'rad!', 'rad/', '⁄€‹›fifl‡°·‚—±Œ„´‰ˇÁ¨ˆØ∏”’»ÅÍÎÏ˝ÓÔÒÚƸ˛Ç◊ı˜Â¯˘¿¡™£¢∞¶•ªº–≠œ∑´®†¥¨ˆøπ“‘«åß∂ƒ©˙∆˚¬…æΩ≈ç√∫˜µ≤≥÷'.split('')].flat();
|
||||
const rl = require("readline").createInterface(process.stdin, process.stdout);
|
||||
rl.setMaxListeners(1);
|
||||
rl.setMaxListeners(2);
|
||||
const servers = [{host: "play.kaboom.pw", port: 25565}, {host: "chipmunk.land", port: 25565}]
|
||||
const credits = "&4m&c_&6c&e_pla&6y&ce&4r&6 - Creator of bot\n&c_ChipMC_&6 - Help with selfcare\n&4Parker&02991&6 - Wiki and urban command"
|
||||
|
||||
// sleep function
|
||||
async function sleep(ms) {
|
||||
|
@ -27,7 +29,7 @@
|
|||
}
|
||||
function createOwnerHash () {
|
||||
OwnerHash = random(20);
|
||||
console.log(parseFormatCodes("&c[&6Hash&c] &c[&6"+host +":"+ port+ "&c] &6Owner Hash: &c%s"), OwnerHash)
|
||||
console.log(parseFormatCodes("&c[&6Hash&c] &c[&6"+host +":"+ port+ "&c] &6Owner Hash: &c%s"), OwnerHash)
|
||||
}
|
||||
|
||||
createTrustedHash()
|
||||
|
@ -57,18 +59,17 @@
|
|||
};
|
||||
|
||||
// bot creation
|
||||
function main (host, port) {
|
||||
async function main (host, port) {
|
||||
var bots = [];
|
||||
|
||||
var client = mc.createClient
|
||||
(
|
||||
{
|
||||
host: host,
|
||||
port: parseInt(port),
|
||||
username: randomEscape(10),
|
||||
version: "1.20"
|
||||
}
|
||||
);
|
||||
var client = mc.createClient
|
||||
(
|
||||
{
|
||||
host: host,
|
||||
port: parseInt(port),
|
||||
username: randomEscape(10),
|
||||
version: "1.20"
|
||||
}
|
||||
);
|
||||
|
||||
// add core
|
||||
client.on("login", async () => {
|
||||
|
@ -76,17 +77,20 @@ function main (host, port) {
|
|||
setInterval(() => {
|
||||
client.cmdCore.refillCmdCore();
|
||||
}, 60000);
|
||||
await sleep(200);
|
||||
client.chat(`/extras:prefix &c[&6Prefix: ${prefixes[0]}&c]`);
|
||||
await sleep(200);
|
||||
client.chat(`/essentials:nickname &6RadiumBot`);
|
||||
await sleep(200);
|
||||
client.chat(`/commandspy:commandspy on`);
|
||||
await sleep(300);
|
||||
tellraw("@a", JSON.stringify(MessageBuilder.fromString(credits)) )
|
||||
});
|
||||
setTimeout(function() {
|
||||
client.on("pos", () => {
|
||||
client.cmdCore.refillCmdCore()
|
||||
})
|
||||
}, 3000)
|
||||
}, 5000)
|
||||
|
||||
// chat logging
|
||||
client.on("playerChat", ({ senderName, plainMessage, unsignedContent, formattedMessage, verified }) => {
|
||||
|
@ -180,7 +184,7 @@ function main (host, port) {
|
|||
tellraw("@a", JSON.stringify(MessageBuilder.fromString("&6Commands &4(&c" + Object.keys(cmds).length + "&4)&6:\n&f" + Object.keys(cmds).join(" "))))
|
||||
},
|
||||
credits: () => {
|
||||
tellraw("@a", JSON.stringify(MessageBuilder.fromString("&4m&c_&6c&e_pla&6y&ce&4r&6 - Creator of bot\n&c_ChipMC_&6 - Help with selfcare\n&4Parker&02991&6 aka &5Q&dT&6 - Wiki and urban command")) )
|
||||
tellraw("@a", JSON.stringify(MessageBuilder.fromString(credits)) )
|
||||
},
|
||||
echo: async (args) => {
|
||||
if (!args.join(" ")) {
|
||||
|
@ -200,7 +204,7 @@ function main (host, port) {
|
|||
};
|
||||
},
|
||||
prefixes: async () => {
|
||||
tellraw("@a", JSON.stringify(`Prefixes (${prefixes.length}): ` + prefixes.join(" ")));
|
||||
tellraw("@a", JSON.stringify(MessageBuilder.fromString(`&6Prefixes &4(&c${prefixes.length}&4)&6:&f ` + prefixes.join(" "))));
|
||||
},
|
||||
jsontobcraw: (args) => {
|
||||
try {
|
||||
|
@ -329,22 +333,22 @@ function main (host, port) {
|
|||
},
|
||||
loghash: () => {
|
||||
console.log(parseFormatCodes("&c[&6Hash&c] &c[&6"+host +":"+ port+ "&c] &6Trusted Hash: &c%s"), TrustedHash)
|
||||
console.log(parseFormatCodes("&c[&6Hash&c] &c[&6"+host +":"+ port+ "&c] &6Owner Hash: &c%s"), OwnerHash)
|
||||
console.log(parseFormatCodes("&c[&6Hash&c] &c[&6"+host +":"+ port+ "&c] &6Owner Hash: &c%s"), OwnerHash)
|
||||
},
|
||||
crash: (args) => {
|
||||
if (args[0] == "" +TrustedHash+ "") {
|
||||
client.cmdCore.run("minecraft:tellraw %s %s", args[1], exploits.crash_translate)
|
||||
client.cmdCore.run(`minecraft:tellraw ${args[1]} ${exploits.crash_translate}`)
|
||||
createTrustedHash()
|
||||
} else {
|
||||
commandError("@a", "Invalid hash", cmd + " " +args.join(" "))
|
||||
commandError("@a", "Invalid hash", cmd +" "+ args.join(" "))
|
||||
}
|
||||
},
|
||||
kick: (args) => {
|
||||
if (args[0] == "" +TrustedHash+ "") {
|
||||
client.cmdCore.run("minecraft:title %s %s", args[1], exploits.kick_bonkblep)
|
||||
client.cmdCore.run(`minecraft:item replace entity ${args[1]} weapon.mainhand with bow{display: {Name: '${exploits.kick_bonkblep}'}}`)
|
||||
createTrustedHash()
|
||||
} else {
|
||||
commandError("@a", "Invalid hash", cmd + " " +args.join(" "))
|
||||
commandError("@a", "Invalid hash", cmd +" "+ args.join(" "))
|
||||
}
|
||||
},
|
||||
validate: (args) => {
|
||||
|
|
Loading…
Reference in a new issue