Date: 2020/04/17 02:01:15 UTC-07:00
Type: Denizen Script
RtpCmd:
type: command
name: techrtp
usage: /techrtp
description: "Basically rtp"
permission: tech.rtp
permission message: No
script:
- if <player.has_flag[cooldown]>:
- narrate "<&8>[<&a>Random Teleport<&8>] <&7>Please wait <&a><player.flag[cooldown].expiration.in_minutes.round> <&7>minutes to teleport to a new random location."
- narrate "Searching for a random location..."
- repeat 5:
- wait 10t
- define loc "<util.random.int[-4000].to[4000]>,1,<util.random.int[-4000].to[4000]>,world"
- chunkload <def[loc].as_location.chunk> duration:2s
- define fuckoff <list[water|lava|fire]>
- if <def[fuckoff].contains[<def[loc].as_location.highest.material.name>]>:
- if <def[loop_index]> == 5:
- narrate "<&8>[<&a>Random Teleport<&8>] <&7>No safe location was found, please try again."
- queue next
- else:
- teleport <player> <def[loc].as_location.add[0,<def[loc].as_location.highest.y>,0].center>
- narrate "<&8>[<&a>Random Teleport<&8>] <&7>You've been teleported to a random location."
- flag player cooldown d:10m
- queue clear