Help Script fly

Avatar

By LaVacheMilka 12 March 2019 17:54

Member · 93 comments

how can I make strafe my character in the air like on the fly vanilla of liquidbounce

Avatar

By Survi_G 12 March 2019 19:05

Member · 186 comments

I do not know how the Strafe works in ScriptApi, but you can combine strafe it with your flight.

Strafe Module + Your Script
how?

exemple

var scriptName = "Fly";
var scriptAuthor = "By Survi_G";
var scriptVersion = 1.4;
var strafeModule = moduleManager.getModule("Strafe");

strafeModule.setState(true) your put in onEnable

Last edited by Survi_G (12 March 2019 19:06)

Avatar

By LaVacheMilka 12 March 2019 20:15

Member · 93 comments
Survi_G wrote

I do not know how the Strafe works in ScriptApi, but you can combine strafe it with your flight.

Strafe Module + Your Script
how?

exemple

var scriptName = "Fly";
var scriptAuthor = "By Survi_G";
var scriptVersion = 1.4;
var strafeModule = moduleManager.getModule("Strafe");

strafeModule.setState(true) your put in onEnable

var scriptName = "TestFly";
var scriptAuthor = "LaVacheMilka";
var scriptVersion = 1.0;
var strafeModule = moduleManager.getModule("Strafe");

function FlyModule() {

    this.getName = function() {
        return "TestFly";
    }

    this.getDescription = function() {
        return "TestFly"
    }

    this.getCategory = function() {
        return "Misc";
    }

    this.onUpdate = function() {
        mc.gameSettings.keyBindJump.pressed = false;
        mc.thePlayer.motionY = 0.0;
        mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.00000000115, mc.thePlayer.posZ)
        mc.thePlayer.setSprinting(true);
        mc.thePlayer.onGround = true;
        strafeModule.setState (true)
    }

    this.onDisable = function() {
        mc.timer.timerSpeed = 1;
    }
}

I did as you told me when I want to add speed with mc.theplayer.motionX Y and I noticed that his strafe works more

Last edited by LaVacheMilka (12 March 2019 20:15)

Avatar

By LaVacheMilka 12 March 2019 20:22

Member · 93 comments
Survi_G wrote

I do not know how the Strafe works in ScriptApi, but you can combine strafe it with your flight.

Strafe Module + Your Script
how?

exemple

var scriptName = "Fly";
var scriptAuthor = "By Survi_G";
var scriptVersion = 1.4;
var strafeModule = moduleManager.getModule("Strafe");

strafeModule.setState(true) your put in onEnable

and I want to know how to add the strafe in its code without activating the strafe module in LiquidBounce

Avatar

By Survi_G 12 March 2019 20:22

Member · 186 comments

but you want it to run constantly strafe?


If you only want it to be activated, put it like that.

var scriptName = "TestFly";
var scriptAuthor = "LaVacheMilka";
var scriptVersion = 1.0;
var strafeModule = moduleManager.getModule("Strafe");

function FlyModule() {

    this.getName = function() {
        return "TestFly";
    }

    this.getDescription = function() {
        return "TestFly"
    }

    this.getCategory = function() {
        return "Misc";
    }

    this.onEnable = function() {
       strafeModule.setState(true)
    }

    this.onUpdate = function() {
        mc.gameSettings.keyBindJump.pressed = false;
        mc.thePlayer.motionY = 0.0;
        mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.00000000115, mc.thePlayer.posZ)
        mc.thePlayer.setSprinting(true);
        mc.thePlayer.onGround = true;
    }

    this.onDisable = function() {
        mc.timer.timerSpeed = 1;
        strafeModule.setState(false)
    }
}

Last edited by Survi_G (12 March 2019 20:24)

Avatar

By LaVacheMilka 12 March 2019 20:32

Member · 93 comments
Survi_G wrote

but you want it to run constantly strafe?


If you only want it to be activated, put it like that.

var scriptName = "TestFly";
var scriptAuthor = "LaVacheMilka";
var scriptVersion = 1.0;
var strafeModule = moduleManager.getModule("Strafe");

function FlyModule() {

    this.getName = function() {
        return "TestFly";
    }

    this.getDescription = function() {
        return "TestFly"
    }

    this.getCategory = function() {
        return "Misc";
    }

    this.onEnable = function() {
       strafeModule.setState(true)
    }

    this.onUpdate = function() {
        mc.gameSettings.keyBindJump.pressed = false;
        mc.thePlayer.motionY = 0.0;
        mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.00000000115, mc.thePlayer.posZ)
        mc.thePlayer.setSprinting(true);
        mc.thePlayer.onGround = true;
    }

    this.onDisable = function() {
        mc.timer.timerSpeed = 1;
        strafeModule.setState(false)
    }
}

Ok I found the problem my otherwise there is a way to not display the strafe module in the arraylist and clickgui that he is hidden at wholesale