Date: 2023/01/13 16:13:48 UTC-08:00
Type: Denizen Script
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
40
41
42
43
44
45
46
47
48
49
50
51
# Create a bossbar that points the player towards the waypoint selected
waypoint_bossbar:
type: task
debug: true
definitions: direction
script:
- narrate "running bossbar" targets:<player>
- bossbar auto waypoint players:<player> title:<[direction]> save:waypoint
- flag <player> waypoint_bossbar.active:<[direction]> expire:10s
waypoint_world:
type: world
debug: true
events:
on player clicks block:
- ratelimit player 1t
- define direction <player.location.direction[green_room.jester.spawn]>
- run waypoint_bossbar def:<[direction]>
on player walks flagged:waypoint_bossbar.active:
- ratelimit player 1s
#The direction of the waypoint
- define direction <player.location.direction[green_room.jester.spawn]>
#Distance between the player and the waypoint
- define distance <player.location.distance[green_room.jester.spawn].round_down>
#Location that the player is looking at
- define dir <player.location.direction>
- choose <[direction]>:
- case north:
- define direction "<green>Go this way <red>⬇ <green><bold>[<[distance]>]"
- run waypoint_bossbar def:<[direction]>
- case northwest:
- define direction "<green>Go this way <red>⬈ <green><bold>[<[distance]>]"
- run waypoint_bossbar def:<[direction]>
- case northeast:
- define direction "<green>Go this way <red>⬉ <green><bold>[<[distance]>]"
- run waypoint_bossbar def:<[direction]>
- case south:
- define direction "<green>Go this way <red>⬆ <green><bold>[<[distance]>]"
- run waypoint_bossbar def:<[direction]>
- case southwest:
- define direction "<green>Go this way <red>⬊ <green><bold>[<[distance]>]"
- run waypoint_bossbar def:<[direction]>
- case southeast:
- define direction "<green>Go this way <red>⬋ <green><bold>[<[distance]>]"
- run waypoint_bossbar def:<[direction]>
- case west:
- define direction "<green>Go this way <red>⮕ <green><bold>[<[distance]>]"
- run waypoint_bossbar def:<[direction]>
- case east:
- define direction "<green>Go this way <red>⬅ <green><bold>[<[distance]>]"
- run waypoint_bossbar def:<[direction]>