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. Cant find problem in my code

Cant find problem in my code

Scheduled Pinned Locked Moved Solved ScriptAPI
4 Posts 3 Posters 571 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.
  • V Offline
    V Offline
    v4peu5er
    wrote on last edited by
    #1

    Cant find problems
    but it wont work

    /// api_version=2
    
    var script = registerScript({
        name: "Bowbomb",
        version: "0.1",
        authors: ["v4peu5er"]
    });
    
    var C04PacketPlayerPosition = Java.type("net.minecraft.network.play.client.C03PacketPlayer.C04PacketPlayerPosition");
    var C0BPacketEntityAction = Java.type("net.minecraft.network.play.client.C0BPacketEntityAction");
    
    script.registerModule({
    	name: "Bowbomb",
    	description: "Makes arrows superfast",
    	category: "combat"
    	
    	}, function (module) {
    	module.on("enable", function() {
    		netHandler.addToSendQueue(new C0BPacketEntityAction(mc.player, C0BPacketEntityAction.Action.START_SPRINTING));
    		for (i = 0; i < 128; i++) {
    				netHandler.addToSendQueue(new C04PacketPlayerPosition(player.posX, player.posY - 0.0000000001, player.posZ, true));
    				netHandler.addToSendQueue(new C04PacketPlayerPosition(player.posX, player.posY + 0.0000000001, player.posZ, false));
    			}
    		});			
    	});
    
    

    Hopefully im not going to be low iq this time

    kaduvertK 1 Reply Last reply
    0
    • V v4peu5er

      Cant find problems
      but it wont work

      /// api_version=2
      
      var script = registerScript({
          name: "Bowbomb",
          version: "0.1",
          authors: ["v4peu5er"]
      });
      
      var C04PacketPlayerPosition = Java.type("net.minecraft.network.play.client.C03PacketPlayer.C04PacketPlayerPosition");
      var C0BPacketEntityAction = Java.type("net.minecraft.network.play.client.C0BPacketEntityAction");
      
      script.registerModule({
      	name: "Bowbomb",
      	description: "Makes arrows superfast",
      	category: "combat"
      	
      	}, function (module) {
      	module.on("enable", function() {
      		netHandler.addToSendQueue(new C0BPacketEntityAction(mc.player, C0BPacketEntityAction.Action.START_SPRINTING));
      		for (i = 0; i < 128; i++) {
      				netHandler.addToSendQueue(new C04PacketPlayerPosition(player.posX, player.posY - 0.0000000001, player.posZ, true));
      				netHandler.addToSendQueue(new C04PacketPlayerPosition(player.posX, player.posY + 0.0000000001, player.posZ, false));
      			}
      		});			
      	});
      
      

      Hopefully im not going to be low iq this time

      kaduvertK Offline
      kaduvertK Offline
      kaduvert
      wrote on last edited by kaduvert
      #2

      maybe define netHandler

      var netHandler = mc.thePlayer.sendQueue
      

      edit: you may also define player

      var player = mc.thePlayer
      

      i also highly encourage you to get familiar with the basics of javascript and the LiquidBounce scripting environment

      V 1 Reply Last reply
      0
      • kaduvertK kaduvert

        maybe define netHandler

        var netHandler = mc.thePlayer.sendQueue
        

        edit: you may also define player

        var player = mc.thePlayer
        

        i also highly encourage you to get familiar with the basics of javascript and the LiquidBounce scripting environment

        V Offline
        V Offline
        v4peu5er
        wrote on last edited by
        #3

        @somedudeyouveneverheardof
        thx
        i just started learning javascrpt and lb api a few days ago. Im pretty unfamiliar with java before cuz i mainly use python.
        anyway thx for ur answer

        Ali00035A 1 Reply Last reply
        0
        • V v4peu5er has marked this topic as solved on
        • V v4peu5er

          @somedudeyouveneverheardof
          thx
          i just started learning javascrpt and lb api a few days ago. Im pretty unfamiliar with java before cuz i mainly use python.
          anyway thx for ur answer

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

          @v4peu5er If you can learn Python, it won't be hard for you to learn basics of JS.

          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