Jump to content

/Wild script


landonhalley

Recommended Posts

Generate 2 random numbers. One for the x and one for the z. Then teleport them to the highest solid block at that location.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

 

 

 

On 3/31/2021 at 9:48 PM, landonhalley said:

Does anyone know how to make a skript for my survival server where you can do /wild and it will tp you to the wild.

options:
    min.x: -250 #DO NOT TOUCH!
    max.x: 250 #DO NOT TOUCH!
    min.z: -250 #DO NOT TOUCH!
    max.z: 250 #DO NOT TOUCH!
    avoid: air or water block or lava block or stone block or sandstone block or mossy cobblestone block or dirt block
    perm: sparx.wild #CHANGE TO YOUR PERMISSION!
    cooldown: 1 second #CHANGE TO YOUR COOLDOWN! (Formats: second/s, minute/s, hour/s, day/s)

Command /wild:
    permission: {@perm}
    trigger:
        set {_waited} to difference between {wild.%player%.lastused} and now
        if {_waited} is less than {@cooldown}:
            message "&7(&6!&7) &eYou must wait &6%difference between {@cooldown} and {_waited}% &ebefore using this command again."
            stop
        
        send "&7(&6!&7) &eTeleporting to the Wilderness." to player
        send "&7(&6&lREMINDER&r&7) &6PvP &eis allowed in this area!" to player
        wait 1 tick
        send "&7(&6!&7) &eTeleporting in 3 Seconds."
        wait 1 second
        send "&7(&6!&7) &eTeleporting in 2 Seconds."
        wait 1 second
        send "&7(&6!&7) &eTeleporting in 1 Second."
        wait 2 second
        apply blindness 100 to player for 6 seconds
        wait 1 tick
        set {_loc::old} to player's location
        while player's location is {_loc::old}:
            set {_loc::new} to location at random number between {@min.x} and {@max.x}, 0, random number between {@min.z} and {@max.z}
            loop blocks above {_loc::new}:
                if loop-block and block above loop-block are air:
                    if block under loop-block is not {@avoid}:
                        set {_loc::new} to location of loop-block
                        teleport player to {_loc::new}
                        stop loop
                        wait 10 ticks
        set {wild.%player%.lastused} to now

image.png.6b83388bece6fb7d874e120f33c8dd96.png


IGN ➣ Pickey ( Soon ) 
Joined MineHut ➣ January 7th 2019
Joined Forums ➣ January 11th 2021
 
Admin on NotedGens
Manager on NotedGens
Developer on Cropied
Developer on Gennow (Genable)

==========================================
Best Job: Badlion ( Client Moderator [ Failed Trial / Demoted] )
Retired From: InvadedLands ( Moderator )
Retired From:  MineTime ( Sr.Moderator )
Retired From: Hero Mines ( Helper )
Link to comment
Share on other sites

On 4/2/2021 at 12:53 PM, Chloe30k said:

 

 

 

options:
    min.x: -250 #DO NOT TOUCH!
    max.x: 250 #DO NOT TOUCH!
    min.z: -250 #DO NOT TOUCH!
    max.z: 250 #DO NOT TOUCH!
    avoid: air or water block or lava block or stone block or sandstone block or mossy cobblestone block or dirt block
    perm: sparx.wild #CHANGE TO YOUR PERMISSION!
    cooldown: 1 second #CHANGE TO YOUR COOLDOWN! (Formats: second/s, minute/s, hour/s, day/s)

Command /wild:
    permission: {@perm}
    trigger:
        set {_waited} to difference between {wild.%player%.lastused} and now
        if {_waited} is less than {@cooldown}:
            message "&7(&6!&7) &eYou must wait &6%difference between {@cooldown} and {_waited}% &ebefore using this command again."
            stop
        
        send "&7(&6!&7) &eTeleporting to the Wilderness." to player
        send "&7(&6&lREMINDER&r&7) &6PvP &eis allowed in this area!" to player
        wait 1 tick
        send "&7(&6!&7) &eTeleporting in 3 Seconds."
        wait 1 second
        send "&7(&6!&7) &eTeleporting in 2 Seconds."
        wait 1 second
        send "&7(&6!&7) &eTeleporting in 1 Second."
        wait 2 second
        apply blindness 100 to player for 6 seconds
        wait 1 tick
        set {_loc::old} to player's location
        while player's location is {_loc::old}:
            set {_loc::new} to location at random number between {@min.x} and {@max.x}, 0, random number between {@min.z} and {@max.z}
            loop blocks above {_loc::new}:
                if loop-block and block above loop-block are air:
                    if block under loop-block is not {@avoid}:
                        set {_loc::new} to location of loop-block
                        teleport player to {_loc::new}
                        stop loop
                        wait 10 ticks
        set {wild.%player%.lastused} to now

You can infact change the options at the first few lines. It will set how far you can spawn from 0, 0

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

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

 

Link to comment
Share on other sites

Yup!

Edited by Chloe30k
image.png.6b83388bece6fb7d874e120f33c8dd96.png


IGN ➣ Pickey ( Soon ) 
Joined MineHut ➣ January 7th 2019
Joined Forums ➣ January 11th 2021
 
Admin on NotedGens
Manager on NotedGens
Developer on Cropied
Developer on Gennow (Genable)

==========================================
Best Job: Badlion ( Client Moderator [ Failed Trial / Demoted] )
Retired From: InvadedLands ( Moderator )
Retired From:  MineTime ( Sr.Moderator )
Retired From: Hero Mines ( Helper )
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...