Примеры кода

AutoRegister

function getName() {
    return "Example";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketChat(pBot, packetIn) {
    if(pBot.getParameter("authorization") == false) {
        if(packetIn.getChatComponent().getFormattedText().contains("/reg")) {
            pBot.sendMessage('/reg 123123 123123');
            pBot.setParameter("authorization", true);
        }
    }
}

Авторешение примера из чата

Подходят примеры по типу таких: 2+6, 10-5, 3*4, 12/3

function getName() {
    return "Example";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketChat(pBot, packetIn) {
    var message = ScriptAPI.stripColor(packetIn.getChatComponent().getFormattedText());
    var cleanedString = message.replace(/[^0-9\+\-\*\/]/g, '');
    if(cleanedString.length >= 3) {
        var result = eval(cleanedString);
        pBot.sendMessage(result);
    }
}

ForceMine Bypass [OLD]

Обход Title капчи на сервере mc.ForceMine.net

function getName() {
    return "ForceMine Bypa$$";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketTitle(pBot, packetIn) {
    if(pBot.getParameter("title_captcha") == null || pBot.getParameter("title_captcha") == false) {
        if(packetIn.type.toString() == "SUBTITLE") {
            var message = packetIn.message.getUnformattedText();
            if(message.length() == 5) {
                pBot.sendMessage(message);
                pBot.setParameter("title_captcha", true);
                ScriptAPI.sendMessage("Бот &d&l" + pBot.getNickname() + " &f&lпрошёл антибот!");
            }
        }
    }
}

SonnerFun Bypass [OLD]

Обход BossBar капчи на сервере mc.SonnerFun.su

function getName() {
    return "SonnerFun Bypa$$";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketUpdateBossInfo(pBot, packetIn) {
    if(pBot.getParameter("sonner_captcha") == null || pBot.getParameter("sonner_captcha") == false) {
        if(packetIn.getOperation().name() == "UPDATE_NAME") {
            var bossbar = packetIn.getName().getFormattedText();
            if(bossbar.contains("tcha")) {
                var captcha = bossbar.split("1§r§6")[1].split("§r")[0];
                pBot.sendMessage("/captcha " + captcha);
                pBot.setParameter("sonner_captcha", true);
                ScriptAPI.sendMessage("Бот &d&l" + pBot.getNickname() + " &f&lпрошёл антибот!");
            }
        }
    }
}

WiseGrief Bypass

Обход Title капчи на сервере mc.WiseGrief.pw

function getName() {
    return "WiseGrief Bypa$$";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketTitle(pBot, packetIn) {
    if(pBot.getParameter("title_captcha") == null || pBot.getParameter("title_captcha") == false) {
        if(packetIn.type.toString() == "TITLE") {
            var message = packetIn.message.getUnformattedText();
            if(message.length() == 4) {
                pBot.sendMessage(message);
                pBot.setParameter("title_captcha", true);
                ScriptAPI.sendMessage("Бот &d&l" + pBot.getNickname() + " &f&lпрошёл антибот!");
            }
        }
    }
}

DontCube Bypass

Обход Hologram капчи на сервере mc.DontCube.space

function getName() {
    return "DontCube Bypa$$";
}

function getAuthor() {
    return "KrytickYT";
}

function onUpdate(pBot) {
    if(pBot.getParameter("armorstand_captcha") == null || pBot.getParameter("armorstand_captcha") == false) {
        if(pBot.stimer1.hasReached(1000)) {
            pBot.stimer1.reset();
            var entityList = pBot.getWorld().loadedEntityList;
            for(var index = 0; index < entityList.size(); index++) {
                var entity = entityList.get(index);
                var entityName = ScriptAPI.stripColor(entity.getName());
                if(entityName.contains("Код") && entityName.contains(": ")) {
                    pBot.sendMessage(entityName.split(": ")[1]);
                    pBot.setParameter("armorstand_captcha", true);
                    ScriptAPI.sendMessage("Бот &d&l" + pBot.getNickname() + " &f&lпрошёл антибот!");
                }
            }
        }
    }
}

SaiMine Bypass

Обход говнокапчи на сервере saimine.gamepvp.ru

function getName() {
    return "Xueta Bypa$$";
}

function getAuthor() {
    return "KrytickYT";
}

function onUpdate(pBot, packetIn) {
    if(pBot.getParameter("xueta_captcha") == null || pBot.getParameter("xueta_captcha") == false) {
        if(pBot.windowTitle != null && pBot.windowTitle.contains("предмет где написано")) {
            for(var slot = 0; slot < pBot.player.openContainer.getInventory().size(); slot++) {
                var item = ScriptAPI.stripColor(pBot.player.openContainer.getInventory().get(slot).getDisplayName()).toLowerCase();
                if(item.equals("жми")) {
                    pBot.windowClick(slot, 0, ScriptAPI.getClickType("PICKUP"));
                    pBot.setParameter("xueta_captcha", true);
                    ScriptAPI.sendMessage("Бот &d&l" + pBot.getNickname() + " &f&lпрошёл антибот!");
                }
            }
        }
    }
}

BingoGrief Bypass

Обход простой крафт капчи на сервере mc.bingogrief.ru

function getName() {
    return "BingoGrief Bypa$$";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketChat(pBot, packetIn) {
    if(packetIn.getChatComponent().getFormattedText().contains("Скрафти верстак!")) {
        pBot.windowClick(36, 0, ScriptAPI.getClickType("PICKUP"));
        pBot.windowClick(-999, 4, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(2, 5, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(4, 5, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(3, 5, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(1, 5, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(-999, 6, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(0, 0, ScriptAPI.getClickType("QUICK_MOVE"));
    }
}

ActionCommand

Позволяет выполнять несколько действий одной командой

Команда .bots action i1 h1 d1 где i - invclick, h - hotbar, d - delay (ms)

var Thread = Java.type('java.lang.Thread');
var Runnable = Java.type('java.lang.Runnable');

function getName() {
    return "ActionCommand";
}

function getAuthor() {
    return "KrytickYT";
}

function onCommand_action(args) {
    if(ScriptAPI.getBots().length > 0) {
        if(args.length > 1) {
            var myRunnable = new Runnable({
                run: function() {
                    var bots = ScriptAPI.getBots();
                    for (var i = 1; i < args.length; i++) {
                        var action = args[i].toLowerCase();
                        if(action.startsWith("i")) {
                            var slot = action.split("i")[1];
                            if (slot >= 0 && slot < 64) {
                                for(var index = 0; index < bots.length; index++) {
                                    var pBot = bots[index];
                                    if(pBot.isOnline()) {
                                        pBot.windowClick(slot, 0, ScriptAPI.getClickType("PICKUP"));    
                                    }
                                }
                            } else {
                                ScriptAPI.sendMessage("Неизвестное значение для InvClick: " + action);
                            }
                        } else if(action.startsWith("h")) {
                            var slot = action.split("h")[1];
                            if (slot >= 0 && slot < 9) {
                                for(var index = 0; index < bots.length; index++) {
                                    var pBot = bots[index];
                                    if(pBot.isOnline()) {
                                        pBot.changeSlot(slot);
                                        pBot.useItem();
                                    }
                                }
                            } else {
                                ScriptAPI.sendMessage("Неизвестное значение для HotBar: " + action);
                            }
                        } else if(action.startsWith("d")) {
                            var delay = action.split("d")[1];
                            if (delay > 0) {
                                if(delay <= 10000) {
                                    Thread.sleep(delay);
                                } else {
                                    ScriptAPI.sendMessage("Задержка не может быть более 10 секунд!");
                                }
                            } else {
                                ScriptAPI.sendMessage("Неизвестное значение для Delay: " + action);
                            }
                        } else {
                            ScriptAPI.sendMessage("Неверный параметр: " + action);
                        }
                    }
                }
            });
            var thread = new Thread(myRunnable);
            thread.start();
            thread.join();
        } else {
            ScriptAPI.sendMessage("Неверное использование! Правильно: .bots action i1 h2 d100");
            ScriptAPI.sendMessage("i - Клик в инвентаре 0-63");
            ScriptAPI.sendMessage("h - Клик по хотбару 0-8");
            ScriptAPI.sendMessage("d - Задержка 0-10000мс");
        }
    } else {
            ScriptAPI.sendMessage("У вас нет активных ботов!");
    }
}

DynamiteMC Bypass

Обход чат капчи на сервере mc.dynamitemc.ru

function getName() {
    return "DynamiteMC";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketChat(pBot, packetIn) {
    var cleaned = ScriptAPI.stripColor(packetIn.getChatComponent().getFormattedText());
    if(cleaned.contains("Введите слово") && cleaned.contains("в чат")) {
        var word = cleaned.split("Введите слово ")[1].split(" ")[0];
        var words = ['помидор', 'майнкрафт', 'картофель', 'бутерброд', 'морковка']; //Если есть другие слова, добавите сами
        var similarWord = findMostSimilar(word, words);
        pBot.sendMessage(similarWord);

    }
}

function getLevenshteinDistance(a, b) {
    var dp = [];
    
    for (var i = 0; i <= a.length; i++) {
        dp[i] = [];
        for (var j = 0; j <= b.length; j++) {
            dp[i][j] = 0;
        }
    }
    
    for (i = 0; i <= a.length; i++) dp[i][0] = i;
    for (j = 0; j <= b.length; j++) dp[0][j] = j;
    
    for (i = 1; i <= a.length; i++) {
        for (j = 1; j <= b.length; j++) {
            var cost = (a.charAt(i - 1) === b.charAt(j - 1)) ? 0 : 1;
            dp[i][j] = Math.min(
                dp[i - 1][j] + 1,
                dp[i][j - 1] + 1,
                dp[i - 1][j - 1] + cost
            );
        }
    }
    
    return dp[a.length][b.length];
}

function findMostSimilar(word, wordList) {
    var minDistance = Number.POSITIVE_INFINITY;
    var mostSimilar = '';

    for (var i = 0; i < wordList.length; i++) {
        var candidate = wordList[i];
        var distance = getLevenshteinDistance(word, candidate);
        if (distance < minDistance) {
            minDistance = distance;
            mostSimilar = candidate;
        }
    }

    return mostSimilar;
}

Sonar OLD

Обход пакетчека от Sonar

Работает только на старых и предпоследних версиях плагина

function getName() {
    return "Sonar";
}

function getAuthor() {
    return "KrytickYT";
}

function onUpdate(pBot) {
    if(pBot.mc.playerController != null) {
        pBot.mc.playerController.updateController();
    }
}

WellMine Bypass

Обход капчи на сервере mc.wellmine.fun

Кликает на нужное сообщение для прохода проверки

function getName() {
    return "WellMine Bypass";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketChat(pBot, packetIn) {
    var siblings = packetIn.getChatComponent().getSiblings();
    for (var i = 0; i < siblings.size(); i++) {
        var component = siblings.get(i);
        if(component.getStyle() != null && component.getStyle().getClickEvent() != null) {
            var clickEvent = component.getStyle().getClickEvent();
            if(clickEvent.getAction().toString().equals("RUN_COMMAND")) {
                pBot.sendMessage(clickEvent.getValue());
                break;
            }
        }
    }
}

PhantomWorld Bypass [OLD]

Обход новой крафт капчи(верстак) на сервере mc.PhantomWorld.pw

function getName() {
    return "PhantomWorld";
}

function getAuthor() {
    return "KrytickYT";
}

function onUpdate(pBot) {
    if (pBot.windowTitle != null && pBot.windowTitle.contains("Crafting") && pBot.stimer1.hasReached(1000)) {
        pBot.stimer1.reset();
        var woodSlot = getWoodSlot(pBot);
        pBot.windowClick(woodSlot, 0, ScriptAPI.getClickType("PICKUP"));
        pBot.windowClick(-999, 4, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(1, 5, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(2, 5, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(4, 5, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(5, 5, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(-999, 6, ScriptAPI.getClickType("QUICK_CRAFT"));
        pBot.windowClick(0, 0, ScriptAPI.getClickType("QUICK_MOVE"));
        pBot.closeWindow();
    }
}


function getWoodSlot(pBot) {
    for(var slot = 0; slot < pBot.player.openContainer.getInventory().size(); slot++) {
        if(pBot.player.openContainer.getInventory().get(slot).getTranslationKey().equals("tile.wood.oak"))
            return slot;
    }
    return -1;
}

ForceMine Bypass

Обход чат капчи на сервере mc.ForceMine.net

function getName() {
    return "ForceMine2 Bypa$$";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketChat(pBot, packetIn) {
    var cleaned = ScriptAPI.stripColor(packetIn.getChatComponent().getFormattedText());
    if(cleaned.contains("цифры в чат - ")) {
        pBot.sendMessage(cleaned.split("цифры в чат - ")[1]);
    }
}

BetterCaptcha Bypass

Обход GUI капчи на серверах play.MoonMC.pro // mc.FunnyTime.su

var ArrayList = Java.type('java.util.ArrayList');

function getName() {
    return "FunnyTime";
}

function getAuthor() {
    return "KrytickYT";
}

function onUpdate(pBot) {
    if (pBot.windowTitle != null && pBot.stimer1.hasReached(1000)) {
        pBot.stimer1.reset();
        var title = ScriptAPI.stripColor(pBot.windowTitle);
        if(title.contains(" НА ")) {
            var needItem = findItem(title.split("НА ")[1].toLowerCase(), getItems(pBot));
            for (var slot = 0; slot < pBot.player.openContainer.getInventory().size(); slot++) {
                var item = ScriptAPI.translateItemKey(pBot.player.openContainer.getInventory().get(slot).getTranslationKey());
                if(item.equals(needItem)) {
                    pBot.windowClick(slot, 0, ScriptAPI.getClickType("PICKUP"));
                    return;
                }
            }
        }
    }
}

function getItems(pBot) {
    var items = new ArrayList();
    for (var slot = 0; slot < pBot.player.openContainer.getInventory().size(); slot++) {
        var item = ScriptAPI.translateItemKey(pBot.player.openContainer.getInventory().get(slot).getTranslationKey());
        if(!items.contains(item)) {
            items.add(item);
        }
    }

    return items.toArray();
}


function getLevenshteinDistance(a, b) {
    var dp = [];
    
    for (var i = 0; i <= a.length; i++) {
        dp[i] = [];
        for (var j = 0; j <= b.length; j++) {
            dp[i][j] = 0;
        }
    }
    
    for (i = 0; i <= a.length; i++) dp[i][0] = i;
    for (j = 0; j <= b.length; j++) dp[0][j] = j;
    
    for (i = 1; i <= a.length; i++) {
        for (j = 1; j <= b.length; j++) {
            var cost = (a.charAt(i - 1) === b.charAt(j - 1)) ? 0 : 1;
            dp[i][j] = Math.min(
                dp[i - 1][j] + 1,
                dp[i][j - 1] + 1,
                dp[i - 1][j - 1] + cost
            );
        }
    }
    
    return dp[a.length][b.length];
}

function findItem(word, wordList) {
    var minDistance = Number.POSITIVE_INFINITY;
    var mostSimilar = '';

    for (var i = 0; i < wordList.length; i++) {
        var candidate = wordList[i];
        var distance = getLevenshteinDistance(word, candidate);
        if (distance < minDistance) {
            minDistance = distance;
            mostSimilar = candidate;
        }
    }

    return mostSimilar;
}

FreeDon Bypass

Обход чат капчи(решение примера) на сервере mc.FreeDon.su

function getName() {
    return "FreeDon Bypass";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketChat(pBot, packetIn) {
    if(pBot.getParameter("math_state") == null || pBot.getParameter("math_state") == false) {
        var message = ScriptAPI.stripColor(packetIn.getChatComponent().getFormattedText());
        if(message.contains("    ")) {
            if(pBot.getParameter("math") == null) {
                pBot.setParameter("math", message);
            } else {
                pBot.setParameter("math", mergeStrings(message, pBot.getParameter("math")))
            }
        }
        var math = pBot.getParameter("math");
        if(message.contains("Введите ответ на пример в чат")) {
            var clMath = math.replace(/[^0-9\+\-\*\/]/g, '');
            if(clMath.length >= 3) {
                pBot.sendMessage(eval(clMath));
                pBot.setParameter("math", "");
                pBot.setParameter("math_state", true);
            }
        }
    }
}

function mergeStrings(str1, str2) {
    var arr1 = str1.split('');
    var arr2 = str2.split('');
    var minLength = Math.min(arr1.length, arr2.length);
    for (var i = 0; i < minLength; i++) {
        if (arr1[i] === ' ' && arr2[i] !== ' ') {
            arr1[i] = arr2[i];
        }
    }
    return arr1.join('');
}

GriefCube Bypass

Обход чат капчи на сервере mc.GriefCube.su

function getName() {
    return "GriefCube Bypa$$";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketChat(pBot, packetIn) {
    var cleaned = ScriptAPI.stripColor(packetIn.getChatComponent().getFormattedText());
    if(cleaned.contains(" - ") && cleaned.contains("в чат")) {
        pBot.sendMessage(cleaned.split(" - ")[1]);
    }
}

VayLand Bypass

Обход чат капчи + рег на сервере mc.VayLand.net

function getName() {
    return "VayLand Bypa$$";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketChat(pBot, packetIn) {
    var cleaned = ScriptAPI.stripColor(packetIn.getChatComponent().getFormattedText());
    if(cleaned.contains("Ваша капча » ")) {
        pBot.sendMessage("/register " + randomString(7) + " " + cleaned.split("Ваша капча » ")[1]);
    }
}

function randomString(length) {
    var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    var result = '';
    for (var i = 0; i < length; i++) {
        var randomIndex = Math.floor(Math.random() * characters.length);
        result += characters.charAt(randomIndex);
    }
    return result;
}

NLogin license click

Бот подтвердит в чате, что заходит с пиратского Minecraft

function getName() {
    return "nLogin click";
}

function getAuthor() {
    return "KrytickYT";
}

function SPacketChat(pBot, packetIn) {
    var siblings = packetIn.getChatComponent().getSiblings();
    for (var i = 0; i < siblings.size(); i++) {
        var component = siblings.get(i);
        if(component.getStyle() != null && component.getStyle().getClickEvent() != null) {
            var clickEvent = component.getStyle().getClickEvent();
            var cleaned = ScriptAPI.stripColor(component.getFormattedText());
            if(cleaned.contains("[Нет]") && clickEvent.getAction().toString().equals("RUN_COMMAND")) {
                pBot.sendMessage(clickEvent.getValue());
                break;
            }
        }
    }
}

StormHvH Bypass

Обход GUI капчи на сервере mc.StormHvH.su

function getName() {
    return "StormHvH";
}

function getAuthor() {
    return "KrytickYT";
}

function onUpdate(pBot) {
    if (pBot.windowTitle != null && pBot.stimer1.hasReached(1000)) {
        pBot.stimer1.reset();
        var title = ScriptAPI.stripColor(pBot.windowTitle);
        if(title.contains(" на ")) {
            for (var slot = 0; slot < pBot.player.openContainer.getInventory().size(); slot++) {
                var item = ScriptAPI.stripColor(pBot.player.openContainer.getInventory().get(slot).getDisplayName());
                if(title.contains(item)) {
                    pBot.windowClick(slot, 0, ScriptAPI.getClickType("PICKUP"));
                }
            }
        }
    }
}