Jump to content

Please Help no one has in over a month (Skript)


shadowutubesss

Recommended Posts

Im trying to reach the second highest block at a location.

 

My 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

Link to comment
Share on other sites

17 hours ago, shadowutubesss said:

 

Im trying to reach the second highest block at a location.

 

My 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

use this
 

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 location({_x}, 0, {_z})
		set {_loc2} to location of block below highest block at {_loc}
		loop blocks between {_loc} and {_loc2}:
			if loop-block is air:
				set {_bloc} to block 2 below loop-block
				teleport player to {_bloc}
				stop loop

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

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...