Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • 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. ScriptAPI
  3. I dont have ANY idea why this script is broken.

I dont have ANY idea why this script is broken.

Scheduled Pinned Locked Moved Unsolved ScriptAPI
4 Posts 3 Posters 589 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.
  • R Offline
    R Offline
    rthrthwtrhg
    wrote on last edited by A Former User
    #1

    So, everytime i use MoveUtil & reload, it doesnt do anything. Heres the script:

    var script = registerScript({
        name: 'NCPSpeed',
        version: '1.3.3.7',
        authors: ["Kellohylly"]
    });
    
    var MoveUtils = Java.type("net.ccbluex.liquidbounce.utils.MovementUtils");
    
    script.registerModule({
        name: 'NCPSpeed',
        category: 'Fun',
        description: '',
        tag: ''
    }, function (module) {
        module.on('disable', function() {
            mc.timer.timerSpeed = 1;
        });
    
        module.on('motion', function(e) {
            if (mc.thePlayer.onGround) {
                MoveUtils.strafe(0.485);
                mc.thePlayer.jump();
            }
        });
    });
    

    It would be nice if someone would know how to fix this.

    CzechHekC FaaatPotatoF 2 Replies Last reply
    0
    • R rthrthwtrhg

      So, everytime i use MoveUtil & reload, it doesnt do anything. Heres the script:

      var script = registerScript({
          name: 'NCPSpeed',
          version: '1.3.3.7',
          authors: ["Kellohylly"]
      });
      
      var MoveUtils = Java.type("net.ccbluex.liquidbounce.utils.MovementUtils");
      
      script.registerModule({
          name: 'NCPSpeed',
          category: 'Fun',
          description: '',
          tag: ''
      }, function (module) {
          module.on('disable', function() {
              mc.timer.timerSpeed = 1;
          });
      
          module.on('motion', function(e) {
              if (mc.thePlayer.onGround) {
                  MoveUtils.strafe(0.485);
                  mc.thePlayer.jump();
              }
          });
      });
      

      It would be nice if someone would know how to fix this.

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

      @rthrthwtrhg
      Ports to kotlin + removal of unnecessary @JvmStatic means that you have to access LB utils and fields with kotlin getters and static .INSTANCE.

      In this case MoveUtils.INSTANCE.strafe(), but its arguments have also changed, you have to put a few booleans as well, look at MovementUtils source.

      ScriptAPI should get its own built-in utils to simplify stuff.

      FaaatPotatoF 1 Reply Last reply
      1
      • R rthrthwtrhg

        So, everytime i use MoveUtil & reload, it doesnt do anything. Heres the script:

        var script = registerScript({
            name: 'NCPSpeed',
            version: '1.3.3.7',
            authors: ["Kellohylly"]
        });
        
        var MoveUtils = Java.type("net.ccbluex.liquidbounce.utils.MovementUtils");
        
        script.registerModule({
            name: 'NCPSpeed',
            category: 'Fun',
            description: '',
            tag: ''
        }, function (module) {
            module.on('disable', function() {
                mc.timer.timerSpeed = 1;
            });
        
            module.on('motion', function(e) {
                if (mc.thePlayer.onGround) {
                    MoveUtils.strafe(0.485);
                    mc.thePlayer.jump();
                }
            });
        });
        

        It would be nice if someone would know how to fix this.

        FaaatPotatoF Offline
        FaaatPotatoF Offline
        FaaatPotato
        wrote on last edited by FaaatPotato
        #3

        @rthrthwtrhg

        Ported it for you and added

        • NoMoveStop -> makes you stop if you dont press any movement key
        • OnlyOnMove -> requires you to press movement keys to speed up
        ///api_version=2
        (script = registerScript({
            name: "NCPSpeed",
            version: "1.3.3.7",
            authors: ["Kellohylly"]
        }));
        
        script.registerModule({
            name: "NCPSpeed",
            category: "Fun",
            description: "NCP-Speed",
            settings: {
                nomovestop: Setting.boolean({
                    name: "NoMoveStop",
                    default: false
                }),
                onlyonmove: Setting.boolean({
                    name: "OnlyOnMove",
                    default: false
                }),
            },
        }, function (module) {
            module.on("disable", function() {
                mc.timer.timerSpeed = 1;
            });
            module.on("motion", function() {
                if (mc.thePlayer.onGround) {
                    if ((module.settings.onlyonmove.get() && !isMoving()) || (module.settings.nomovestop.get() && !isMoving())) return;
                    
                    mc.thePlayer.jump();
                    //represents MovementUtils.strafe()
                    var yaw = mc.thePlayer.rotationYaw * Math.PI / 180 //represents Math.rad(deg)
                    mc.thePlayer.motionX = -Math.sin(yaw) * 0.485
                    mc.thePlayer.motionZ = Math.cos(yaw) * 0.485
                }
            });
            module.on("move", function(e) {
                if (module.settings.nomovestop.get() && !isMoving()) e.zeroXZ()
            });
        });
        
        //represents MovementUtils.isMoving() -> true/false
        function isMoving() {
            if (mc.thePlayer.movementInput.moveForward != 0 || mc.thePlayer.movementInput.moveStrafe != 0) return true;
        }
        
        1 Reply Last reply
        0
        • CzechHekC CzechHek

          @rthrthwtrhg
          Ports to kotlin + removal of unnecessary @JvmStatic means that you have to access LB utils and fields with kotlin getters and static .INSTANCE.

          In this case MoveUtils.INSTANCE.strafe(), but its arguments have also changed, you have to put a few booleans as well, look at MovementUtils source.

          ScriptAPI should get its own built-in utils to simplify stuff.

          FaaatPotatoF Offline
          FaaatPotatoF Offline
          FaaatPotato
          wrote on last edited by FaaatPotato
          #4

          @CzechHek

          🗣️🗣️🗣️🗣️🔥 some1 needs to add own little utils to ScriptAPI

          1 Reply Last reply
          0
          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