AntiAFk plugin bypass

This commit is contained in:
MrGeorgen
2020-04-28 13:28:12 +02:00
parent 9c7b405c94
commit eb1ec1383f
3 changed files with 16 additions and 3 deletions

View File

@ -1,11 +1,12 @@
# 2smart2wait
A fork of the popular proxy to wait out 2b2t.org's way too long queue.(https://github.com/surprisejedi/2lazy2wait)
A fork of the popular proxy to wait out 2b2t.org's way too long queue. [2lazy2wait](https://github.com/surprisejedi/2lazy2wait)
# Features
- costum ETA calculator
- use the play command if you to play at a specified time
- chunk caching
- stores the minecraft login token to avoid account blocking
- antiAFK pulgin bypass
# How to install
1. Download node.js and install it. On non-windows platforms, you also need npm.
@ -42,7 +43,6 @@ Do not repeatedly stop and start the queue, eventually you will not be able to l
# Known issues
- starting the queue will revoke your minecraft token. this means that you will not be able to join normal minecraft servers until you restart the game
- starting the queue too many times in a row can sometimes boot you out of your minecraft account (starting the queue or connecting in the minecraft client will tell you "wrong email or password"). to fix this, log in to your account at minecraft.net, then restart minecraft. both of these issues are limitations put in place by mojang to prevent account stealing, and are not fixable.
- Some people report not being able to ride animals using this proxy.
- 2b2t sometimes bugs out and removes you from the queue without telling you. In this case, your queue position will no longer move. Reconnect to fix this.
- If you connect after the the queue is finnished or reconnect the proxy will send cached chunk data. Otherwise you would fly in a emtpy world. Other data however like entities are not chached and will not displayed correctly. You can move out of render distance and come back to fix this issue. Sometimes the client renders a cached chunk with a blank texture.

View File

@ -24,5 +24,6 @@
"notification": { // sends a message via discord if the place in the queue reaches the specified number
"enabled": true, // you must send the bot a message once.
"queuePlace": 20
}
},
"antiAntiAFK": true // to bypass antiAFK plugins
}

View File

@ -29,6 +29,7 @@ var doing;
var calcInterval;
var authInterval;
var reconnectinterval;
var antiAntiAFk;
webserver.restartQueue = config.reconnect.notConnectedQueueEnd;
if (config.webserver) {
webserver.createServer(config.ports.web); // create the webserver
@ -107,6 +108,7 @@ function join() {
webserver.isInQueue = true;
activity("Starting the queue...");
let finishedQueue = false;
antiAntiAfkmsg();
client.on("packet", (data, meta) => { // each time 2b2t sends a packet
switch (meta.name) {
case "map_chunk":
@ -208,6 +210,7 @@ function join() {
server.on('login', (newProxyClient) => { // handle login
setTimeout(sendChunks, 50)
if (config.antiAntiAFK) clearInterval(antiAntiAFk);
newProxyClient.write('login', loginpacket);
newProxyClient.write('position', {
x: 0,
@ -237,6 +240,9 @@ function join() {
filterPacketAndSend(data, meta, client);
//console.log("meta: " + JSON.stringify(meta) + "\ndata: " + JSON.stringify(data))
});
newProxyClient.on("end", () => {
antiAntiAfkmsg();
})
proxyClient = newProxyClient;
});
@ -453,6 +459,12 @@ function calcTime(msg) {
}
function antiAntiAfkmsg() {
if (config.antiAntiAFK) antiAntiAFk = setInterval(function () {
client.write("chat", { message: "{\"text\":\">\"}", position: 1 })
}, 50000)
}
module.exports = {
startQueue: function () {
startQueuing();