CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Macros ?

    Suggestions
    7
    7
    288
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T S
      T S last edited by

      I suggest adding a macro editor where u can add macro keys for example /tpaccept will be typed in chat when u press a certain key

      exit scammed 1 Reply Last reply Reply Quote 0
      • ChocoPie_isme
        ChocoPie_isme Banned last edited by

        ccbluex won't do any changes of liquidbounce until the cross-version is done

        1 Reply Last reply Reply Quote 0
        • helloana
          helloana last edited by

          nothing relevant but /tpyes also works and is shorter

          1 Reply Last reply Reply Quote 0
          • exit scammed
            exit scammed @T S last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • scorpion3013
              scorpion3013 Moderator last edited by

              There are many mods for stuff like that, so use a mod.

              1 Reply Last reply Reply Quote 0
              • Senk Ju
                Senk Ju Admin last edited by

                You can use this script I made a while ago.

                Syntax
                .macro add <key> <command...>
                .macro remove <key>

                eg.:
                .macro add i killaura range 3.4
                .macro remove i

                Make sure the module called 'Macros' is enabled!

                var scriptName = "Macros";
                var scriptAuthor = "Senk Ju";
                var scriptVersion = 1.0;
                
                var File = Java.type("java.io.File");
                var FileReader = Java.type("java.io.FileReader");
                var BufferedReader = Java.type("java.io.BufferedReader");
                var FileWriter = Java.type("java.io.FileWriter");
                var BufferedWriter = Java.type("java.io.BufferedWriter");
                var Keyboard = Java.type("org.lwjgl.input.Keyboard");
                var LiquidBounce = Java.type("net.ccbluex.liquidbounce.LiquidBounce");
                
                var macros = {};
                var prefix = LiquidBounce.commandManager.getPrefix();
                
                function chatSyntax(message) {
                    chat.print("§8[§9§lMacros§8] §3Syntax: §7" + prefix + message);
                }
                
                function chatText(message) {
                    chat.print("§8[§9§lMacros§8] §3" + message);
                } 
                
                function readFile(filePath) {
                    try {
                        var file = new File(filePath);
                        var reader = new BufferedReader(new FileReader(file));
                        var content = [];
                        var line;
                
                        while ((line = reader.readLine()) !== null) {
                            content.push(line);
                        }
                
                        return content;
                    } catch (err) {}
                }
                
                function writeFile(path, string) {
                    try {
                        writer = new BufferedWriter(new FileWriter(path));
                        writer.write(string);
                
                        writer.close();
                    } catch (err) {}
                }
                
                function saveMacros() {
                    var macrosJson = JSON.stringify(macros);
                
                    writeFile(mc.mcDataDir + "/lb-macros.json", macrosJson);
                }
                
                function loadMacros() {
                    macros = JSON.parse(readFile(mc.mcDataDir + "/lb-macros.json").join(""));
                }
                
                function joinArray(array, startIndex) {
                    var joinedString = "";
                
                    for (var i = startIndex; i < array.length; i++) {
                        joinedString += array[i] + " ";
                    }
                
                    return joinedString.trim();
                }
                
                function MacroModule() {
                
                    this.getName = function() {
                        return "Macros";
                    };
                
                    this.getDescription = function() {
                        return "Allows you to bind commands to keys.";
                    };
                
                    this.getCategory = function() {
                        return "Misc";
                    };
                
                    this.onKey = function(event) {
                        var key = event.getKey();
                
                        if (macros[key]) {
                            commandManager.executeCommand(prefix + macros[key]);
                        }
                    };
                }
                
                function MacroCommand() {
                
                    this.getName = function() {
                        return "macro";
                    };
                
                    this.getAliases = function() {
                        return ["macros"];
                    };
                
                    this.execute = function(args) {
                        if (args.length <= 1) {
                            chatSyntax("macro <add/remove>");
                            return;
                        }
                
                        switch (args[1]) {
                            case "add":
                                if (args.length <= 3) {
                                    chatSyntax("macro add <key> <command...>");
                                    return;
                                }
                
                                var key = args[2].toUpperCase();
                                var keyCode = Keyboard.getKeyIndex(key);
                                var command = joinArray(args, 3);
                
                                macros[keyCode] = command;
                
                                saveMacros();
                                chatText("Successfully bound command '§7" + command + "§3' to key '§7" + key + "§3'.");
                
                                break;
                
                            case "remove":
                                if (args.length <= 2) {
                                    chatSyntax("macro remove <key>");
                                    return;
                                }
                
                                var key = args[2].toUpperCase();
                                var keyCode = Keyboard.getKeyIndex(key);
                
                                if (macros[keyCode]) {
                                    delete macros[keyCode];
                                    chatText("Successfully removed macro.");
                                    saveMacros();
                                } else {
                                    chatText("Macro does not exist!");
                                }
                
                                break;
                
                            default:
                                chatSyntax("macro <add/remove>");
                        }
                    };
                }
                
                var macroModule = new MacroModule();
                var macroCommand = new MacroCommand();
                
                function onLoad() {
                    loadMacros();
                }
                
                function onEnable() {
                    moduleManager.registerModule(macroModule);
                    commandManager.registerCommand(macroCommand);
                }
                
                function onDisable() {
                    moduleManager.unregisterModule(macroModule);
                    commandManager.unregisterCommand(macroCommand);
                }
                
                Joel kek 1 Reply Last reply Reply Quote 1
                • Joel kek
                  Joel kek @Senk Ju last edited by

                  @senk-ju Can i make the marco press my 2 slot and then hold right click that i can autogap xD

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  About
                  • Terms of Service
                  • Privacy Policy
                  • Status
                  • Contact Us
                  Downloads
                  • Releases
                  • Source code
                  • License
                  Docs
                  • Tutorials
                  • CustomHUD
                  • AutoSettings
                  • ScriptAPI
                  Community
                  • Forum
                  • Guilded
                  • YouTube
                  • Twitter
                  • D.Tube