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. Chinese
  3. [JS]Protect 2.0(一个保护你的js不被圈钱带神使用的js)(已更新)

[JS]Protect 2.0(一个保护你的js不被圈钱带神使用的js)(已更新)

Scheduled Pinned Locked Moved Chinese
9 Posts 4 Posters 2.8k 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.
  • CookieChineseC Offline
    CookieChineseC Offline
    CookieChinese
    wrote on last edited by
    #1

    protect-logo.png


    欢迎来到ProtectJS 2.0版本
    这个是面向JS开发者的若想使用需要有一些JS基础

    作者
    • mumy:开发制作
    • Cookie:提供灵感
    • As丶One:开创者

    什么是ProtectJS

    ProtectJS可以用来保护你自己的JS不被他人随便利用


    我该怎么使用它?

    将下载来的压缩包里的JS解压到你LiquidBounce配置里的script/lib目录下(若没有该目录请创建)
    然后在你所需要保护的JS里调用这个函数来判断是否检查到相对应的内容

    script.import("lib\\Protect 2.0.js"); //导入此JS,若失败则报错
    /*此版本可提供的检查*/
    protect({
        global: [], //全局
        texts: [], //hud文本
        fonts: [], //字体
        titles: [], //游戏标题
        values: [], //设置值
        scripts: [], //脚本
        modules: [], //功能
        settings: [], //设置
        category: [], //功能分区
        mods: [], //mod
        names: [], //名称
        resourcepacks: [] //材质
    }); //正常返回true,否则返回false
    

    如果检查到了则返回false,反之为true,至于返回false如何处理取决于你自己


    完整的JS示例
    var scriptName = "AntiBotScript";
    var scriptVersion = 0.1;
    var scriptAuthor = "mumy++";
    
    var EntityUtils = Java.type("net.ccbluex.liquidbounce.utils.EntityUtils"); //导入EntityUtils类
    
    function AntiBotScript() {
    
        this.getName = function() {
            return "AntiBotScript";
        }
    
        this.getDescription = function() {
            return "AntiBot-Script, By-mumy";
        }
    
        this.getCategory = function() {
            return "Misc";
        }
    
        this.onUpdate = function() {
            var entityList = mc.theWorld.loadedEntityList; //获取加载到的实体列表
            for (var i in entityList) { //循环遍历列表
                var entity = entityList[i]; //声明entity变量指向当前实体
                if (EntityUtils.isSelected(entity, true)) { //使用EntityUtils类的公开静态方法来判断结果是否为假人
                    mc.theWorld.removeEntity(entity); //删除实体
                }
            }
        }
    	
    }
    
    function onLoad() {}
    
    function onEnable() {
        script.import("lib\\Protect 2.0.js"); //导入保护js
        var flag = protect({
            scripts: ["AsAntiBot"] //这里选择一个js作为检查对象,如果该js存在则返回false
        }); //调用保护函数,如果正常返回true,否则返回false
        if (!flag) { //如果返回为false则取消加载js
            return;
        }
        client = moduleManager.registerModule(new AntiBotScript());
    }
    
    function onDisable() {
        moduleManager.unregisterModule(client);
    }
    

    历史版本

    • ProtectJS lib接口版 https://forums.ccbluex.net/topic/1688

    下载

    • Protect 2.0.zip

    后传

    关于这个Protect的一些故事

    Cookie:“你知道为什么我是创作灵感吗”
    Cookie:“我对As丶One说可以绑定图片来防止别人使用”
    Cookie:“As丶One就做了”
    //当时As丶One写AsFly时Cookie提出的一个主意
    //最初版Protect就是这么来的

    后来AsFly被解码就开源了,Protect独立出来成为一个JS
    这个JS自从上一次发布了lib接口版后时隔近一年才再次更新
    不过这个JS圈子可能不怎么需要这类JS了,所以我不确定这JS能否继续被采用

    文稿by mumy(有些烂请见谅*)
    Ali00035A 1 Reply Last reply
    0
    • CookieChineseC CookieChinese

      protect-logo.png


      欢迎来到ProtectJS 2.0版本
      这个是面向JS开发者的若想使用需要有一些JS基础

      作者
      • mumy:开发制作
      • Cookie:提供灵感
      • As丶One:开创者

      什么是ProtectJS

      ProtectJS可以用来保护你自己的JS不被他人随便利用


      我该怎么使用它?

      将下载来的压缩包里的JS解压到你LiquidBounce配置里的script/lib目录下(若没有该目录请创建)
      然后在你所需要保护的JS里调用这个函数来判断是否检查到相对应的内容

      script.import("lib\\Protect 2.0.js"); //导入此JS,若失败则报错
      /*此版本可提供的检查*/
      protect({
          global: [], //全局
          texts: [], //hud文本
          fonts: [], //字体
          titles: [], //游戏标题
          values: [], //设置值
          scripts: [], //脚本
          modules: [], //功能
          settings: [], //设置
          category: [], //功能分区
          mods: [], //mod
          names: [], //名称
          resourcepacks: [] //材质
      }); //正常返回true,否则返回false
      

      如果检查到了则返回false,反之为true,至于返回false如何处理取决于你自己


      完整的JS示例
      var scriptName = "AntiBotScript";
      var scriptVersion = 0.1;
      var scriptAuthor = "mumy++";
      
      var EntityUtils = Java.type("net.ccbluex.liquidbounce.utils.EntityUtils"); //导入EntityUtils类
      
      function AntiBotScript() {
      
          this.getName = function() {
              return "AntiBotScript";
          }
      
          this.getDescription = function() {
              return "AntiBot-Script, By-mumy";
          }
      
          this.getCategory = function() {
              return "Misc";
          }
      
          this.onUpdate = function() {
              var entityList = mc.theWorld.loadedEntityList; //获取加载到的实体列表
              for (var i in entityList) { //循环遍历列表
                  var entity = entityList[i]; //声明entity变量指向当前实体
                  if (EntityUtils.isSelected(entity, true)) { //使用EntityUtils类的公开静态方法来判断结果是否为假人
                      mc.theWorld.removeEntity(entity); //删除实体
                  }
              }
          }
      	
      }
      
      function onLoad() {}
      
      function onEnable() {
          script.import("lib\\Protect 2.0.js"); //导入保护js
          var flag = protect({
              scripts: ["AsAntiBot"] //这里选择一个js作为检查对象,如果该js存在则返回false
          }); //调用保护函数,如果正常返回true,否则返回false
          if (!flag) { //如果返回为false则取消加载js
              return;
          }
          client = moduleManager.registerModule(new AntiBotScript());
      }
      
      function onDisable() {
          moduleManager.unregisterModule(client);
      }
      

      历史版本

      • ProtectJS lib接口版 https://forums.ccbluex.net/topic/1688

      下载

      • Protect 2.0.zip

      后传

      关于这个Protect的一些故事

      Cookie:“你知道为什么我是创作灵感吗”
      Cookie:“我对As丶One说可以绑定图片来防止别人使用”
      Cookie:“As丶One就做了”
      //当时As丶One写AsFly时Cookie提出的一个主意
      //最初版Protect就是这么来的

      后来AsFly被解码就开源了,Protect独立出来成为一个JS
      这个JS自从上一次发布了lib接口版后时隔近一年才再次更新
      不过这个JS圈子可能不怎么需要这类JS了,所以我不确定这JS能否继续被采用

      文稿by mumy(有些烂请见谅*)
      Ali00035A Offline
      Ali00035A Offline
      Ali00035
      wrote on last edited by
      #2

      @cookiechinese What is this supposed to be

      1 Reply Last reply
      0
      • MxmbleeM Offline
        MxmbleeM Offline
        Mxmblee
        wrote on last edited by
        #3

        我都不会做,请问你可以教我做配置吗?

        Ali00035A 1 Reply Last reply
        0
        • F Offline
          F Offline
          freerobuxgen2022
          wrote on last edited by freerobuxgen2022
          #4

          help me i cant configure this

          read the thread again

          1 Reply Last reply
          0
          • MxmbleeM Mxmblee

            我都不会做,请问你可以教我做配置吗?

            Ali00035A Offline
            Ali00035A Offline
            Ali00035
            wrote on last edited by
            #5

            @mxmblee why do you want to use this?

            MxmbleeM 1 Reply Last reply
            0
            • Ali00035A Ali00035

              @mxmblee why do you want to use this?

              MxmbleeM Offline
              MxmbleeM Offline
              Mxmblee
              wrote on last edited by
              #6

              @ali00035 我并没有使用它,我问一下别人可不可以教我😅

              Ali00035A 1 Reply Last reply
              0
              • MxmbleeM Mxmblee

                @ali00035 我并没有使用它,我问一下别人可不可以教我😅

                Ali00035A Offline
                Ali00035A Offline
                Ali00035
                wrote on last edited by
                #7

                @mxmblee And why do you want someone to teach you on how to use this? Are you gonna make a script?

                MxmbleeM 1 Reply Last reply
                0
                • Ali00035A Ali00035

                  @mxmblee And why do you want someone to teach you on how to use this? Are you gonna make a script?

                  MxmbleeM Offline
                  MxmbleeM Offline
                  Mxmblee
                  wrote on last edited by
                  #8

                  @ali00035 我不想做一个脚本,但是我想做一个配置

                  Ali00035A 1 Reply Last reply
                  0
                  • MxmbleeM Mxmblee

                    @ali00035 我不想做一个脚本,但是我想做一个配置

                    Ali00035A Offline
                    Ali00035A Offline
                    Ali00035
                    wrote on last edited by
                    #9

                    @mxmblee This thing probably only applies to scripts.

                    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