# Create a bossbar that points the player towards the waypoint selected waypoint_bossbar: type: task debug: true definitions: direction script: - narrate "running bossbar" targets: - bossbar auto waypoint players: title:<[direction]> save:waypoint - flag waypoint_bossbar.active:<[direction]> expire:10s waypoint_world: type: world debug: true events: on player clicks block: - ratelimit player 1t - define direction - run waypoint_bossbar def:<[direction]> on player walks flagged:waypoint_bossbar.active: - ratelimit player 1s #The direction of the waypoint - define direction #Distance between the player and the waypoint - define distance #Location that the player is looking at - define dir - choose <[direction]>: - case north: - define direction "Go this way [<[distance]>]" - run waypoint_bossbar def:<[direction]> - case northwest: - define direction "Go this way [<[distance]>]" - run waypoint_bossbar def:<[direction]> - case northeast: - define direction "Go this way [<[distance]>]" - run waypoint_bossbar def:<[direction]> - case south: - define direction "Go this way [<[distance]>]" - run waypoint_bossbar def:<[direction]> - case southwest: - define direction "Go this way [<[distance]>]" - run waypoint_bossbar def:<[direction]> - case southeast: - define direction "Go this way [<[distance]>]" - run waypoint_bossbar def:<[direction]> - case west: - define direction "Go this way [<[distance]>]" - run waypoint_bossbar def:<[direction]> - case east: - define direction "Go this way [<[distance]>]" - run waypoint_bossbar def:<[direction]>