Jump to content

Someone please help with my rtp skript


nbiz24

Recommended Posts

I need it so people cant rtp in the pvp world. Cause They can get out of the box when i dont want them to. So someone plz make it so they can rtp in the world pvp

 

command /rtp:
    cooldown: 5 seconds
    cooldown message: &4Stop! &cYou can only teleport to a random location every 5 seconds.
    trigger:
        set {_x} to round(random number between -10000 and 10000)
        set {_z} to round(random number between -10000 and 10000)
        set {_block} to block at location at ({_x}, 0, {_z}) in world event-world
        loop all blocks above {_block}:
            if loop-block is air:
                block below loop-block is not water
                block below loop-block is not air
                if block above loop-block is air:
                    teleport player to loop-block
                    send "&aTeleported to a random location" to player

Link to comment
Share on other sites

options:
  pvp: (Your pvp world)


command /rtp:
    cooldown: 5 seconds
    cooldown message: &4Stop! &cYou can only teleport to a random location every 5 seconds.
    trigger:
      if payer's world is not world("{@pvp}"):
        set {_x} to round(random number between -10000 and 10000)
        set {_z} to round(random number between -10000 and 10000)
        set {_block} to block at location at ({_x}, 0, {_z}) in world event-world
        loop all blocks above {_block}:
            if loop-block is air:
                block below loop-block is not water
                block below loop-block is not air
                if block above loop-block is air:
                    teleport player to loop-block
                    send "&aTeleported to a random location" to player

 

 

hope this helps

Edited by Yo_The_pro19
typo

 

350kb.gif.0ff78007b131dd46bab00eb5980d6c35.gif

Yo_the_pro19

owner of Aqua-lands.net

rank: VIP 

 

 

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