CCBlueX Forum

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

    Script does not work

    Scripts
    7
    12
    417
    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.
    • Maeyse
      Maeyse last edited by Senk Ju

      I tried to make a regen script that I got from a hack can someone tell me if something is wrong

      var scriptName = "Regen2"
      var scriptAuthor = "Maeyse"
      var scriptVersion = 1.0
      var Block = Java.type('net.minecraft.block.Block');
      var BlockAir = Java.type('net.minecraft.block.BlockAir');
      var BlockHopper = Java.type('net.minecraft.block.BlockHopper');
      var C03PacketPlayer = Java.type('net.minecraft.network.play.client.C03PacketPlayer';)
      var Potion = Java.type('net.minecraft.potion.Potion');
      var AxiAlignedBB = Java.type('net.minecraft.util.AxisAlignedBB';)
      var BlockPos = Java.type('net.minecraft.util.BlockPos';)
      var MathHelper = Java.type('net.minecraft.util.MathHelper';)
      var client = new client()
      var clientClient
      
      function client() {
          this.getName = function() {
              return "Regen2"
          }
          this.getCategory = function() {
              return "Combat"
          )
          var name = "speed3",
              var min = 0.0 D,
                  var max = 56.0 D,
                      var increment = 1.0 D
      )
      var double packet = 8.0 D;
      (
          name = "speed3",
          min = 0.0 D,
          max = 56.0 D,
          increment = 1.0 D
      )
      var double potionPacket = 8.0 D;
      (
          var name = "speed3",
              var min = 0.0 D,
                  var max = 56.0 D,
                      var increment = 1.0 D
      )
      var double health = 8.0 D;
      var boolean potion = true;
      
      var void onUpdate(UpdateEvent event) {
          int i;
          if (this.potion) {
              if (ClientUtils.player().getActivePotionEffect(Potion.regeneration) != null && ClientUtils.player().getActivePotionEffect(Potion.regeneration).getDuration() > 0 && (double) ClientUtils.player().getMaxHealth() <= this.health * 20.0 D && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals(State.POST)) {
                  for (i = 0;
                      (double) i < this.potionPacket; ++i) {
                      ClientUtils.player().getActivePotionEffect(Potion.regeneration).deincrementDuration();
                      ClientUtils.packet(new C03PacketPlayer(true));
                  }
              }
          } else if ((double) ClientUtils.player().getMaxHealth() <= this.health * 20.0 D && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals(State.POST)) {
              for (i = 0;
                  (double) i < this.packet; ++i) {
                  ClientUtils.packet(new C03PacketPlayer(true));
              }
          }
      
      }
      
      var boolean isInsideBlock() {
          for (int x = MathHelper.floor_double(ClientUtils.player().boundingBox.minX); x < MathHelper.floor_double(ClientUtils.player().boundingBox.maxX) + 1; ++x) {
              for (int y = MathHelper.floor_double(ClientUtils.player().boundingBox.minY); y < MathHelper.floor_double(ClientUtils.player().boundingBox.maxY) + 1; ++y) {
                  for (int z = MathHelper.floor_double(ClientUtils.player().boundingBox.minZ); z < MathHelper.floor_double(ClientUtils.player().boundingBox.maxZ) + 1; ++z) {
                      Block block = ClientUtils.world().getBlockState(new BlockPos(x, y, z)).getBlock();
                      if (block != null && !(block instanceof BlockAir)) {
                          AxisAlignedBB boundingBox = block.getCollisionBoundingBox(ClientUtils.world(), new BlockPos(x, y, z), ClientUtils.world().getBlockState(new BlockPos(x, y, z)));
                          if (block instanceof BlockHopper) {
                              boundingBox = new AxisAlignedBB((double) x, (double) y, (double) z, (double)(x + 1), (double)(y + 1), (double)(z + 1));
                          }
      
                          if (boundingBox != null && ClientUtils.player().boundingBox.intersectsWith(boundingBox)) {
                              return true;
                          }
                      }
                  }
              }
          }
      
          return false;
      }
      }
      
      Plumer Man banana1221 notautismatall 5 Replies Last reply Reply Quote 0
      • I
        idk my name last edited by

        stop spamming no one will help you

        1 Reply Last reply Reply Quote 2
        • I
          idk my name last edited by idk my name

          This post is deleted!
          Maeyse 1 Reply Last reply Reply Quote 0
          • Maeyse
            Maeyse @idk my name last edited by

            @idk-my-name if you are so good why don't you help me man
            that script you did doesn't work

            I 1 Reply Last reply Reply Quote 0
            • I
              idk my name @Maeyse last edited by

              @maeyse why i should

              Maeyse 2 Replies Last reply Reply Quote 0
              • Maeyse
                Maeyse @idk my name last edited by

                @idk-my-name I don't know why you are

                1 Reply Last reply Reply Quote 0
                • Maeyse
                  Maeyse @idk my name last edited by

                  @idk-my-name what is wrong in the script?

                  1 Reply Last reply Reply Quote 0
                  • Plumer Man
                    Plumer Man @Maeyse last edited by

                    @maeyse Script skidded and u using double

                    1 Reply Last reply Reply Quote 1
                    • banana1221
                      banana1221 @Maeyse last edited by

                      @maeyse start by removing all the "D" and double
                      imma think a little more

                      1 Reply Last reply Reply Quote 0
                      • banana1221
                        banana1221 @Maeyse last edited by

                        @maeyse give me the pure java code

                        1 Reply Last reply Reply Quote 0
                        • notautismatall
                          notautismatall @Maeyse last edited by

                          @maeyse Is it javascript or java? I see both in there

                          Or did you just copy the java code and paste it into a blank script?

                          1 Reply Last reply Reply Quote 0
                          • Plumer Man
                            Plumer Man @Maeyse last edited by

                            This post is deleted!
                            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