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

G

GolikeAzzis

@GolikeAzzis
About
Posts
4
Topics
2
Shares
0
Groups
0
Followers
1
Following
0

Posts

Recent Best Controversial

  • [HELP] Converting Core scripts to Script API v2 scripts.
    G GolikeAzzis

    @czechhek Oh okay, thanks.

    ScriptAPI

  • [HELP] Converting Core scripts to Script API v2 scripts.
    G GolikeAzzis

    @skiddermaster412 After testing this, it did not work. I'm trying to fix it by reading more scripts. Thank you for your help though.

    ScriptAPI

  • [HELP] Converting Core scripts to Script API v2 scripts.
    G GolikeAzzis

    Hi, so I need help converting a Core script to the normal Script API version. I am using a custom build of Liquidbounce (Lint), so Core scripts don't work on it (From what I noticed). And I'm a complete noob at scripting.

    What do I need to do to convert this script from Core to the normal API v2 version?

    This script is by CzechHek

    ///api_version=2
    (script = registerScript({
        name: "AutoSafeWalk",
        version: "1.3",
        authors: ["CzechHek"]
    })).import("Core.lib");
    
    module = {
        category: "Movement",
        description: "SafeWalk that activates if there is a gap exceeding maximal fall distance.",
        values: [
            airsafe = value.createBoolean("AirSafe", true),
            maxfalldistance = value.createInteger("MaxFallDistance", 5, 0, 255)
        ],
        onMove: function (e) {
            (mc.thePlayer.onGround || airsafe.get()) && e.setSafeWalk(!isAboveGround());
        }
    }
    
    function isAboveGround() {
        for (i = 0, bp = new BlockPos(mc.thePlayer); i++ < maxfalldistance.get();) if (!mc.theWorld.isAirBlock(bp.down(i))) return true
    }
    

    This is what I could figure out so far from studying the normal API v2 scripts. (No, it doesn't work after I tested it.)

    ///api_version=2
    var script = registerScript({
        name: "AutoSafeWalk",
        version: "1.3",
        authors: ["CzechHek"]
    });
    
    script.registerModule({
        name: "AutoSafeWalk"
        category: "Movement",
        description: "SafeWalk that activates if there is a gap exceeding maximal fall distance.",
        values: [
            airsafe = value.createBoolean("AirSafe", true),
            maxfalldistance = value.createInteger("MaxFallDistance", 5, 0, 255)
        ],
        onMove: function (e) {
            (mc.thePlayer.onGround || airsafe.get()) && e.setSafeWalk(!isAboveGround());
        }
    });
    
    function isAboveGround() {
        for (i = 0, bp = new BlockPos(mc.thePlayer); i++ < maxfalldistance.get();) if (!mc.theWorld.isAirBlock(bp.down(i))) return true
    }
    

    I apologize in advance if I sound stupid.

    ScriptAPI
  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups