RandomTP 随机传送 [Skript]
作者:ridalarry
发布时间:2015年11月27日
原生版本:未知
测试支持:未知
传送到随机地点
点此下载插件详细介绍
🚀 RandomTP Skript 插件是一个简单的随机传送插件,它利用 Skript 脚本引擎实现,无需其他依赖。允许玩家传送到地图上的随机位置。
⚙️ 命令、权限及描述
-
/randomtp:randomtp.use[传送到随机位置]
💡 命令别名
/rtp/wild/random
🛠️ 可配置项
- 消息 (Messages)
- 传送距离 (Amount of blocks to tp far away from your location)
- 避免传送的方块 (Avoid blocks)
- 允许传送的世界 (Worlds)
- 权限 (Permission)
⚙️ 示例配置
options:
max-distance: 1000 # Maximum distance to teleport from spawn
min-distance: 250 # Minimum distance to teleport from spawn
cooldown: 60 # Cooldown in seconds
price: 0 # Price to use the command
world: world # World to teleport in
# List of blacklisted blocks
blacklist: lava, water, cactus
# Message sent when the player teleports
teleport-message: &aYou have been teleported to a random location!
# Message sent when the player is on cooldown
cooldown-message: &cYou must wait %{difference between {rtp::%player%} and now}% before using this command again!
# Message sent when the player doesn't have enough money
no-money-message: &cYou don't have enough money to use this command!
# Message sent when the player is in a blacklisted world
blacklisted-world-message: &cYou cannot use this command in this world!
# Message sent when the player is in a dangerous location
dangerous-location-message: &cCould not find a safe location, please try again!
trigger:
if command is "/randomtp":
if player has permission "randomtp.use":
if {rtp::%player%} is not set:
if player's world is not "%{world}%":
send "%{prefix}% %{blacklisted-world-message}%" to player
stop
if {money.%player%} is less than {%price%}:
send "%{prefix}% %{no-money-message}%" to player
stop
if {%price%} > 0:
remove {%price%} from {money.%player%}
send "%{prefix}% &aYou have paid %{price%}$ to use this command!" to player
set {rtp::%player%} to now
set {_location} to a random location in radius {%max-distance%} of player
while block at {_location} is in {%blacklist%}:
set {_location} to a random location in radius {%max-distance%} of player
if block at {_location} is not safe:
send "%{prefix}% %{dangerous-location-message}%" to player
stop
teleport player to {_location}
send "%{prefix}% %{teleport-message}%" to player
else:
if difference between {rtp::%player%} and now is less than {%cooldown%} seconds:
send "%{prefix}% %{cooldown-message}%" to player
stop
else:
if player's world is not "%{world}%":
send "%{prefix}% %{blacklisted-world-message}%" to player
stop
if {money.%player%} is less than {%price%}:
send "%{prefix}% %{no-money-message}%" to player
stop
if {%price%} > 0:
remove {%price%} from {money.%player%}
send "%{prefix}% &aYou have paid %{price%}$ to use this command!" to player
set {rtp::%player%} to now
set {_location} to a random location in radius {%max-distance%} of player
while block at {_location} is in {%blacklist%}:
set {_location} to a random location in radius {%max-distance%} of player
if block at {_location} is not safe:
send "%{prefix}% %{dangerous-location-message}%" to player
stop
teleport player to {_location}
send "%{prefix}% %{teleport-message}%" to player
else:
send "&cYou don't have permission to use this command!" to player