Date: 2020/05/27 17:10:06 UTC-07:00
Type: Denizen Script
random_teleport:
type: command
usage: /rtp
name: rtp
description: teleports you to a random place
aliases:
- randomteleport
- takemesomewherenew
- imfeelingrandy
debug: false
script:
- flag server "playersLastLocation:<player.location>"
- flag server "randomx:<util.random.int[-10000].to[10000]>"
- flag server "randomy:<util.random.int[-10000].to[10000]>"
- chunckload <player.location.add[<server.flag[randomx]>,0,<server.flag[randomy]>].chunk>
#- if <chunk.surface_blocks.material> = lava:
# - inject random_teleport
- teleport <player> <location[<server.flag[randomx]>,0,<server.flag[randomy]>].highest>
- adjust <player> potion_effects:DAMAGE_RESISTANCE,100,80,false,false,false