-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrandTp.sk
39 lines (35 loc) · 2.05 KB
/
randTp.sk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function randomLocation(p: player):
set {_loc::new} to location(random number between -3296 and 4296, 0, random number between -3695 and 4695, world "world")
set {chunk::%{_p}%} to chunk at {_loc::new}
set {location::%{_p}%} to {_loc::new}
on region enter:
if player's world is "campus":
wait 2 ticks
if "%region at player%" contains "dokdo":
set {_loc::old} to player's location
while player's location is {_loc::old}:
randomLocation(player)
if {owned_chunk::%{chunk::%player%}%} is not set:
loop blocks above {location::%player%}:
if loop-block and block above loop-block and block 30 above loop-block are air:
if block under loop-block is not air:
set {location::%player%} to location of loop-block
teleport player to {location::%player%}
delete {chunk::%player%}
delete {location::%player%}
wait 1 ticks
stop loop
else if "%region at player%" contains "resourceland":
set {_loc::old} to player's location
while player's location is {_loc::old}:
set {_loc::new} to location(random number between -10000 and 10000, 0, random number between -10000 and 10000, world "recourcemyland")
set {location::%player%} to {_loc::new}
loop blocks above {location::%player%}:
if loop-block and block above loop-block and block 30 above loop-block are air:
if block under loop-block is not air:
set {location::%player%} to location of loop-block
teleport player to {location::%player%}
delete {chunk::%player%}
delete {location::%player%}
wait 1 ticks
stop loop