Jump to content

help (Skript)


Shadow_UTubes

Recommended Posts

Im trying to teleport a player to second highest block on the map (if you use a plugin tell me the name)

 

command /queue_vilage:
    trigger:
        set {_x} to random number between -28 and 28
        set {_z} to random number between 211 and 151
        set {_loc} to block at location({_x}, 0, {_z})
        set {__loc} to highest block at {_loc}
loop blocks between block at {_loc} and block at {__loc}:
        if loop-block is air:
            set {_bloc} to block 2 below loop-block
            teleport player to {_bloc}

Link to comment
Share on other sites

Thank you alot, what about this?

My new code is

command /queue_vilage:
    trigger:
        set {_x} to random integer between -28 and 28
        set {_z} to random integer between 211 and 151
        set {_loc} to block at location({_x}, 0, {_z})
        set {__loc} to highest block at {_loc}
loop blocks between block at {_loc} and block at {__loc}:
        if loop-block is air:
                set {_bloc} to block 2 below loop-block
                teleport player to {_bloc}

791854095_ScreenShot2021-11-23at4_35_08PM.png.4d5599065caa628033e3a0a3360017d3.png

Edited by Shadow_UTubes
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...