Flag Detector

Avatar

By Turtl 17 March 2019 13:01

Member · 501 comments

Suggestion:https://forum.ccbluex.net/thread.php?id=1067

My suggestion how to do it by checking Xmodules

Speed:
if (mc.thePlayer.fallDistance < 1.1)
{
test for flag
flag is speed for 99%
}

Fly:
if (mc.thePlayer.fallDistance >= 1.1)
{
test for fly
flag for fly 50% or 100% while nofall is disabled
flag for nofall 50% or 100% while fly is disabled
}

How to detect flags?
code (only detect flags, dont detect which one modules flag, checks XZ Flag and Y Flag):

Edit1: while Anybutton is enabled in If's it check flags while player click/hold buttons, but its unnecessary!

if (mc.thePlayer.ticksExisted % 3 == 0)
{
this.prevPos = curX + curZ;
this.PrevposY = curY - mc.thePlayer.fallDistance;
}
this.curPos = curX+curZ
this.curPosY = curY - mc.thePlayer.fallDistance;

if (mc.gameSettings.keyBindJump.isKeyDown())
{
this.AnybuttonJump = true;
}
else
{
this.AnybuttonJump = false;
}

if(mc.gameSettings.keyBindForward.isKeyDown() || mc.gameSettings.keyBindBack.isKeyDown() || mc.gameSettings.keyBindLeft.isKeyDown() || mc.gameSettings.keyBindRight.isKeyDown()){
this.Anybutton = true;
}
else
{
this.Anybutton = false;
}


if (flag_motioncheck == true && mc.thePlayer.motionY == 0 && this.prevPosY != this.curPosY /* && this.AnybuttonJump == true*/ ) {
times++
chat.print("flagged (y):" + times)
}

if (flag_motioncheck == true && mc.thePlayer.motionX == 0 && mc.thePlayer.motionZ == 0 && this.prevPos != this.curPos /*&& this.Anybutton == true*/ ) {
times++

chat.print("flagged :" + times)
}

Have fun etc

Last edited by Turtl (17 March 2019 13:02)


turtl gonna rape, uh sry, rap for u

Avatar

By yorik100 17 March 2019 13:15

Member · 838 comments

You can also check at the same time if motion == 0 because it's impossible to get 0 motion, even on the ground

Avatar

By Turtl 17 March 2019 13:43

Member · 501 comments
yorik100 wrote

You can also check at the same time if motion == 0 because it's impossible to get 0 motion, even on the ground

MotionX/Z or MotionY?
MotionY yes, motionX/Z no xd


turtl gonna rape, uh sry, rap for u

Avatar

By yorik100 17 March 2019 15:58

Member · 838 comments

Y motion ye

Avatar

By Turtl 17 March 2019 18:09

Member · 501 comments
yorik100 wrote

Y motion ye

MotionY on ground is ~~ -0.078


turtl gonna rape, uh sry, rap for u

Avatar

By yorik100 17 March 2019 18:28

Member · 838 comments

Not like I said it was impossible to have a 0 Y motion, no need to specify why smh

Avatar

By Senk Ju 17 March 2019 20:05

Administrator · 879 comments

It's theoretically possible to have a motionY of 0. It's just very unlikely. If you jump, motion at the high point should be exactly 0.


CCBlueX Co-Owner

Avatar

By yorik100 17 March 2019 20:09

Member · 838 comments
Senk Ju wrote

It's theoretically possible to have a motionY of 0. It's just very unlikely. If you jump, motion at the high point should be exactly 0.

It will never be

Avatar

By Turtl 18 March 2019 14:20

Member · 501 comments
yorik100 wrote
Senk Ju wrote

It's theoretically possible to have a motionY of 0. It's just very unlikely. If you jump, motion at the high point should be exactly 0.

It will never be

stand of soulsand, did


turtl gonna rape, uh sry, rap for u

Avatar

By Leejames2305 19 March 2019 14:35

Member · 84 comments

Good

Avatar

By OPHaxxorBounce 29 March 2019 16:23

Member · 25 comments

Can someone turn this into a liquidscript?


OPtimal.

Avatar

By Sms_Gamer_3808 29 March 2019 16:26

Member · 846 comments
OPHaxxorBounce wrote

Can someone turn this into a liquidscript?

Why? Nobody uses 1.12.2 version of lb anymore.


I don't exist

Avatar

By Aftery 31 March 2019 07:26

Banned · 784 comments

I don't know if liquidscript supports this but you could look for a S08PacketPlayerPosLook packet.


website
@Aftery#5051 on Discord
the amount of people trying to get me to share my scripts smh, i dont have them and i dont play minecraft that much anymore, stop asking me stupid shit