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. Scripts
  3. scripting help for noobs xd

scripting help for noobs xd

Scheduled Pinned Locked Moved Scripts
3 Posts 3 Posters 279 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Schneelein
    wrote on last edited by
    #1

    so, ive tried to make a script to change the onground timer value to a different one than the inair value but ive got the problem that the value doesnt change with this code here:
    var Timer_Value = value.createInteger("Speed", 1, 1, 10);
    if(mc.thePlayer.onGround) {
    mc.timer.timerSpeed = Timer_Value;
    } else {
    if(!mc.thePlayer.onGround) {
    mc.timer.timerSpeed = 1;
    so im asking what is wrong or broken that it doesnt work

    sxviolenceS FaaatPotatoF 2 Replies Last reply
    0
    • sxviolenceS Offline
      sxviolenceS Offline
      sxviolence
      replied to Schneelein on last edited by
      #2

      @Schneelein var Timer_Value = value.createInteger("Speed", 1, 1, 10);
      if(mc.thePlayer.onGround) {
      mc.timer.timerSpeed = Timer_Value;
      } else {
      if(!mc.thePlayer.onGround) {
      mc.timer.timerSpeed = 1;
      }
      });

      module.on("packet", function(eventData) {
      
      });
      

      });

      1 Reply Last reply
      0
      • FaaatPotatoF Offline
        FaaatPotatoF Offline
        FaaatPotato
        replied to Schneelein on last edited by FaaatPotato
        #3

        @Schneelein

        ///api_version=2
        (script = registerScript({
            name: "TimerHandle",
            version: "1.0",
            authors: ["You"]
        })).import("Core.lib"); //just assumed your using core since you used value.createInteger, if not just put Core.lib in scripts folder
        
        list = [ //put values in here, looks clean if multiple
            onGroundValue = value.createFloat("OnGroundTimer", 1, 1, 10) //use float instead of integer, its more percise yet lets you adjust from 1.0 to 10.0 like you did it
        ]
        
        module = {
            name: "TimerHandle",
            category: "Misc",
            description: "Helps you to learn",
            tag: script.scriptVersion,
            values: list, //import list here so the module knows what to use
        
            //now the actual module
            onUpdate: function() {
                if (mc.thePlayer.onGround) {
                    mc.timer.timerSpeed = onGroundValue.get()
                } else if (!mc.thePlayer.onGround /*you could add a check for water etc if you want to be faster there as well*/) {
                    mc.timer.timerSpeed = 1;
                }
            },
            onDisable: function() {
                mc.timer.timerSpeed = 1; //If you disable the module while being onGround you may stay faster than vanilla, so reset onDisable!
            }
        }
        

        The issue with yours is probably the core module structure without importing core but from what you've posted i can't really tell.

        Ah yes i figured out what your problem was:
        you did

        mc.timer.timerSpeed = Timer_Value
        

        but it must be

        mc.timer.timerSpeed = module.settings.Timer_Value.get()
        //or if you are using core
        mc.timer.timerSpeed = Timer_Value.get()
        

        i suggest you read this and try simple stuff

        1 Reply Last reply
        0

        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