Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. Support
  3. [Help] Porting Core.

[Help] Porting Core.

Scheduled Pinned Locked Moved Unsolved Support
13 Posts 4 Posters 3.4k Views
  • 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.
  • O Offline
    O Offline
    OmNomNom
    wrote on last edited by
    #1

    Can someone help me convert CzechHek's antibot script from Core to the Script Api 2 version?

    I'm an idiot, so if anyone would be kind enough to help me out.

    ///api_version=2
    (script = registerScript({
        name: "MatrixAntiBot",
        authors: ["CzechHek"],
        version: "3.5"
    })).import("Core.lib");
    
    module = {
        category: "Combat",
        onPacket: function (e) {
            if (e.getPacket().wrapped instanceof S41PacketServerDifficulty) wasAdded = false;
            if (mc.thePlayer && e.getPacket().wrapped instanceof S38PacketPlayerListItem && e.getPacket().wrapped.getAction() == "ADD_PLAYER") {
                name = (info = e.getPacket().wrapped.getEntries().get(0)).getProfile().getName();
                if (!wasAdded) wasAdded = name == mc.thePlayer.getName();
                else if (!mc.thePlayer.isSpectator() && !mc.thePlayer.capabilities.allowFlying && info.getPing() && info.getGameMode() != "NOT_SET") e.cancelEvent(), print("§2§lRemoved a bot§a:", name);
            }
        }
    }
    
    var wasAdded;
    

    ^This is for liquidbounce B73, and I want to use it on a custom build (liquiddrip)

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vinci
      wrote on last edited by vinci
      #2

      here is it

      var scriptName = "MatrixAntiBot";
      var scriptAuthor = "CzechHek";
      var scriptVersion = 3.5;
      var S38PacketPlayerListItem = Java.type("net.minecraft.network.play.server.S38PacketPlayerListItem");
      var S41PacketServerDifficulty = Java.type("net.minecraft.network.play.server.S41PacketServerDifficulty");
      var wasAdded;
      
      function MatrixAntiBot() {
          this.getName = function() {
              return "MatrixAntiBot";
          };
          this.getDescription = function() {
              return "antibot (matrix proof)";
          };
          this.getCategory = function() {
              return "Combat";
          };
          this.onPacket = function(e) {
              if (e.getPacket() instanceof S41PacketServerDifficulty) wasAdded = false;
              if (e.getPacket() instanceof S38PacketPlayerListItem && e.getPacket().getAction() == "ADD_PLAYER") {
                  var info = e.getPacket().getEntries().get(0);
                  var name = info.getProfile().getName();
      			
                  if (!wasAdded) {
                      wasAdded = name != mc.thePlayer.getName();
                  } else if (mc.thePlayer && !mc.thePlayer.isSpectator() && !mc.thePlayer.capabilities.allowFlying && info.getPing() && info.getGameMode() != "NOT_SET") {
                      chat.print("Removed a bot");
                      e.cancelEvent();
                  }
              }
          }
      }
      
      var matrixantibot = new MatrixAntiBot();
      
      function onEnable() {
          moduleManager.registerModule(matrixantibot);
      };
      
      function onDisable() {
          moduleManager.unregisterModule(matrixantibot);
      };
      

      it seems to be working but not sure
      it's a 5-months old script it's probs patched tho

      CzechHekC RafayR O 5 Replies Last reply
      2
      • V vinci

        here is it

        var scriptName = "MatrixAntiBot";
        var scriptAuthor = "CzechHek";
        var scriptVersion = 3.5;
        var S38PacketPlayerListItem = Java.type("net.minecraft.network.play.server.S38PacketPlayerListItem");
        var S41PacketServerDifficulty = Java.type("net.minecraft.network.play.server.S41PacketServerDifficulty");
        var wasAdded;
        
        function MatrixAntiBot() {
            this.getName = function() {
                return "MatrixAntiBot";
            };
            this.getDescription = function() {
                return "antibot (matrix proof)";
            };
            this.getCategory = function() {
                return "Combat";
            };
            this.onPacket = function(e) {
                if (e.getPacket() instanceof S41PacketServerDifficulty) wasAdded = false;
                if (e.getPacket() instanceof S38PacketPlayerListItem && e.getPacket().getAction() == "ADD_PLAYER") {
                    var info = e.getPacket().getEntries().get(0);
                    var name = info.getProfile().getName();
        			
                    if (!wasAdded) {
                        wasAdded = name != mc.thePlayer.getName();
                    } else if (mc.thePlayer && !mc.thePlayer.isSpectator() && !mc.thePlayer.capabilities.allowFlying && info.getPing() && info.getGameMode() != "NOT_SET") {
                        chat.print("Removed a bot");
                        e.cancelEvent();
                    }
                }
            }
        }
        
        var matrixantibot = new MatrixAntiBot();
        
        function onEnable() {
            moduleManager.registerModule(matrixantibot);
        };
        
        function onDisable() {
            moduleManager.unregisterModule(matrixantibot);
        };
        

        it seems to be working but not sure
        it's a 5-months old script it's probs patched tho

        CzechHekC Offline
        CzechHekC Offline
        CzechHek
        wrote on last edited by
        #3

        @nvinci probably not

        1 Reply Last reply
        1
        • V vinci

          here is it

          var scriptName = "MatrixAntiBot";
          var scriptAuthor = "CzechHek";
          var scriptVersion = 3.5;
          var S38PacketPlayerListItem = Java.type("net.minecraft.network.play.server.S38PacketPlayerListItem");
          var S41PacketServerDifficulty = Java.type("net.minecraft.network.play.server.S41PacketServerDifficulty");
          var wasAdded;
          
          function MatrixAntiBot() {
              this.getName = function() {
                  return "MatrixAntiBot";
              };
              this.getDescription = function() {
                  return "antibot (matrix proof)";
              };
              this.getCategory = function() {
                  return "Combat";
              };
              this.onPacket = function(e) {
                  if (e.getPacket() instanceof S41PacketServerDifficulty) wasAdded = false;
                  if (e.getPacket() instanceof S38PacketPlayerListItem && e.getPacket().getAction() == "ADD_PLAYER") {
                      var info = e.getPacket().getEntries().get(0);
                      var name = info.getProfile().getName();
          			
                      if (!wasAdded) {
                          wasAdded = name != mc.thePlayer.getName();
                      } else if (mc.thePlayer && !mc.thePlayer.isSpectator() && !mc.thePlayer.capabilities.allowFlying && info.getPing() && info.getGameMode() != "NOT_SET") {
                          chat.print("Removed a bot");
                          e.cancelEvent();
                      }
                  }
              }
          }
          
          var matrixantibot = new MatrixAntiBot();
          
          function onEnable() {
              moduleManager.registerModule(matrixantibot);
          };
          
          function onDisable() {
              moduleManager.unregisterModule(matrixantibot);
          };
          

          it seems to be working but not sure
          it's a 5-months old script it's probs patched tho

          RafayR Offline
          RafayR Offline
          Rafay
          wrote on last edited by
          #4

          @nvinci Its not patched and will not be soon

          V 1 Reply Last reply
          1
          • RafayR Rafay

            @nvinci Its not patched and will not be soon

            V Offline
            V Offline
            vinci
            wrote on last edited by
            #5

            Oh alright

            1 Reply Last reply
            0
            • V vinci

              here is it

              var scriptName = "MatrixAntiBot";
              var scriptAuthor = "CzechHek";
              var scriptVersion = 3.5;
              var S38PacketPlayerListItem = Java.type("net.minecraft.network.play.server.S38PacketPlayerListItem");
              var S41PacketServerDifficulty = Java.type("net.minecraft.network.play.server.S41PacketServerDifficulty");
              var wasAdded;
              
              function MatrixAntiBot() {
                  this.getName = function() {
                      return "MatrixAntiBot";
                  };
                  this.getDescription = function() {
                      return "antibot (matrix proof)";
                  };
                  this.getCategory = function() {
                      return "Combat";
                  };
                  this.onPacket = function(e) {
                      if (e.getPacket() instanceof S41PacketServerDifficulty) wasAdded = false;
                      if (e.getPacket() instanceof S38PacketPlayerListItem && e.getPacket().getAction() == "ADD_PLAYER") {
                          var info = e.getPacket().getEntries().get(0);
                          var name = info.getProfile().getName();
              			
                          if (!wasAdded) {
                              wasAdded = name != mc.thePlayer.getName();
                          } else if (mc.thePlayer && !mc.thePlayer.isSpectator() && !mc.thePlayer.capabilities.allowFlying && info.getPing() && info.getGameMode() != "NOT_SET") {
                              chat.print("Removed a bot");
                              e.cancelEvent();
                          }
                      }
                  }
              }
              
              var matrixantibot = new MatrixAntiBot();
              
              function onEnable() {
                  moduleManager.registerModule(matrixantibot);
              };
              
              function onDisable() {
                  moduleManager.unregisterModule(matrixantibot);
              };
              

              it seems to be working but not sure
              it's a 5-months old script it's probs patched tho

              O Offline
              O Offline
              OmNomNom
              wrote on last edited by
              #6

              @nvinci thank you!

              1 Reply Last reply
              0
              • V vinci

                here is it

                var scriptName = "MatrixAntiBot";
                var scriptAuthor = "CzechHek";
                var scriptVersion = 3.5;
                var S38PacketPlayerListItem = Java.type("net.minecraft.network.play.server.S38PacketPlayerListItem");
                var S41PacketServerDifficulty = Java.type("net.minecraft.network.play.server.S41PacketServerDifficulty");
                var wasAdded;
                
                function MatrixAntiBot() {
                    this.getName = function() {
                        return "MatrixAntiBot";
                    };
                    this.getDescription = function() {
                        return "antibot (matrix proof)";
                    };
                    this.getCategory = function() {
                        return "Combat";
                    };
                    this.onPacket = function(e) {
                        if (e.getPacket() instanceof S41PacketServerDifficulty) wasAdded = false;
                        if (e.getPacket() instanceof S38PacketPlayerListItem && e.getPacket().getAction() == "ADD_PLAYER") {
                            var info = e.getPacket().getEntries().get(0);
                            var name = info.getProfile().getName();
                			
                            if (!wasAdded) {
                                wasAdded = name != mc.thePlayer.getName();
                            } else if (mc.thePlayer && !mc.thePlayer.isSpectator() && !mc.thePlayer.capabilities.allowFlying && info.getPing() && info.getGameMode() != "NOT_SET") {
                                chat.print("Removed a bot");
                                e.cancelEvent();
                            }
                        }
                    }
                }
                
                var matrixantibot = new MatrixAntiBot();
                
                function onEnable() {
                    moduleManager.registerModule(matrixantibot);
                };
                
                function onDisable() {
                    moduleManager.unregisterModule(matrixantibot);
                };
                

                it seems to be working but not sure
                it's a 5-months old script it's probs patched tho

                O Offline
                O Offline
                OmNomNom
                wrote on last edited by
                #7

                @nvinci Nevermind, it doesn't seem to be working. It just prints Bot is removed but the bot doesn't disappear

                V 1 Reply Last reply
                0
                • O OmNomNom

                  @nvinci Nevermind, it doesn't seem to be working. It just prints Bot is removed but the bot doesn't disappear

                  V Offline
                  V Offline
                  vinci
                  wrote on last edited by
                  #8

                  @omnomnom oh, what server did you test it? so I can try to fix it

                  O 1 Reply Last reply
                  0
                  • V vinci

                    @omnomnom oh, what server did you test it? so I can try to fix it

                    O Offline
                    O Offline
                    OmNomNom
                    wrote on last edited by
                    #9

                    @nvinci I tried it on JartexNetwork.

                    1 Reply Last reply
                    0
                    • V vinci

                      here is it

                      var scriptName = "MatrixAntiBot";
                      var scriptAuthor = "CzechHek";
                      var scriptVersion = 3.5;
                      var S38PacketPlayerListItem = Java.type("net.minecraft.network.play.server.S38PacketPlayerListItem");
                      var S41PacketServerDifficulty = Java.type("net.minecraft.network.play.server.S41PacketServerDifficulty");
                      var wasAdded;
                      
                      function MatrixAntiBot() {
                          this.getName = function() {
                              return "MatrixAntiBot";
                          };
                          this.getDescription = function() {
                              return "antibot (matrix proof)";
                          };
                          this.getCategory = function() {
                              return "Combat";
                          };
                          this.onPacket = function(e) {
                              if (e.getPacket() instanceof S41PacketServerDifficulty) wasAdded = false;
                              if (e.getPacket() instanceof S38PacketPlayerListItem && e.getPacket().getAction() == "ADD_PLAYER") {
                                  var info = e.getPacket().getEntries().get(0);
                                  var name = info.getProfile().getName();
                      			
                                  if (!wasAdded) {
                                      wasAdded = name != mc.thePlayer.getName();
                                  } else if (mc.thePlayer && !mc.thePlayer.isSpectator() && !mc.thePlayer.capabilities.allowFlying && info.getPing() && info.getGameMode() != "NOT_SET") {
                                      chat.print("Removed a bot");
                                      e.cancelEvent();
                                  }
                              }
                          }
                      }
                      
                      var matrixantibot = new MatrixAntiBot();
                      
                      function onEnable() {
                          moduleManager.registerModule(matrixantibot);
                      };
                      
                      function onDisable() {
                          moduleManager.unregisterModule(matrixantibot);
                      };
                      

                      it seems to be working but not sure
                      it's a 5-months old script it's probs patched tho

                      CzechHekC Offline
                      CzechHekC Offline
                      CzechHek
                      wrote on last edited by
                      #10

                      @nvinci said in [Help] Porting Core.:

                      here is it

                                  if (!wasAdded) {
                                      wasAdded = name != mc.thePlayer.getName();
                      

                      @omnomnom said in [Help] Porting Core.:

                                  if (!wasAdded) wasAdded = name == mc.thePlayer.getName();
                      
                      O V 2 Replies Last reply
                      1
                      • CzechHekC CzechHek

                        @nvinci said in [Help] Porting Core.:

                        here is it

                                    if (!wasAdded) {
                                        wasAdded = name != mc.thePlayer.getName();
                        

                        @omnomnom said in [Help] Porting Core.:

                                    if (!wasAdded) wasAdded = name == mc.thePlayer.getName();
                        
                        O Offline
                        O Offline
                        OmNomNom
                        wrote on last edited by OmNomNom
                        #11

                        @czechhek Oh so do I just replace that, and this is what it should be, right?

                        if (!wasAdded) wasAdded = name == mc.thePlayer.getName();
                                      else if (mc.thePlayer && !mc.thePlayer.isSpectator() && !mc.thePlayer.capabilities.allowFlying && info.getPing() && info.getGameMode() != "NOT_SET") {
                                        chat.print("§2§lRemoved a Matrix bot§a");
                                        e.cancelEvent();
                        
                        1 Reply Last reply
                        0
                        • CzechHekC CzechHek

                          @nvinci said in [Help] Porting Core.:

                          here is it

                                      if (!wasAdded) {
                                          wasAdded = name != mc.thePlayer.getName();
                          

                          @omnomnom said in [Help] Porting Core.:

                                      if (!wasAdded) wasAdded = name == mc.thePlayer.getName();
                          
                          V Offline
                          V Offline
                          vinci
                          wrote on last edited by
                          #12

                          @czechhek I've already tried this, but it removed all players from the server (loyisa's test server)
                          but maybe it should work in jartextnetwork

                          O 1 Reply Last reply
                          0
                          • V vinci

                            @czechhek I've already tried this, but it removed all players from the server (loyisa's test server)
                            but maybe it should work in jartextnetwork

                            O Offline
                            O Offline
                            OmNomNom
                            wrote on last edited by
                            #13

                            @nvinci after the change, it doesn't work as well.

                            1 Reply Last reply
                            0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            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
                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups