Parfait pour la condition, mais le système de région fonctionne pas, peux-tu m'éclairer ?
options:
min.x: -5000
max.x: 5000
min.z: -5000
max.z: 5000
avoid: air or water block or lava block or stone block or sandstone block or mossy cobblestone block or dirt block
perm: rtp
cooldown: 2 minute
region: spawn
cout: 500
Command /rtp:
permission: {@perm}
trigger:
set {_waited} to difference between {rtp.%player%.lastused} and now
if {_waited} is less than {@cooldown}:
message "&f&lEbe&6&llion &f: &cTu dois attendre %difference between {@cooldown} and {_waited}% pour refaire ceci."
stop
if player's balance >= {@cout}:
if "%region at player%" is "{@region}":
remove {@cout} from player's balance
send "&f&lEbe&6&llion &f: &eTéléportation en cours de chargement." to player
wait 1 second
apply resistance 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 {rtp.%player%.lastused} to now
else:
message "&f&lEbe&6&llion &f: Tu ne peux pas te tp hors du spawn !"
else:
message "&f&lEbe&6&llion &f: &cIl te faut au moins {@cout}$ !"