Date: 2020/05/24 12:26:11 UTC-07: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
52
53
54
55
56
57
58
59
on_player_enters_cuboid_parkour:
type: world
events:
on player enters notable cuboid:
- define parkour_level <context.cuboids.filter[notable_name.starts_with[parkour_level]].after[_].after[_]||null>:
- if <[parkour_level]> == null:
- stop
- if <player.has_flag[parkour]>:
- flag player parkour:<[parkour_level]> duration:10m
- ratelimit <player> 5m
- narrate "<&a><&l>You made it to Level <[parkour_level]>!"
- title "title:<&c>Level <[parkour_level]>"
- else:
- narrate "<&c>Talk to the Parkour Master before attempting the course!"
# Commented so I know what the original was
# on player enters parkour_level_3:
# - if <player.has_flag[parkour]>:
# - flag player parkour:3 duration:10m
# - ratelimit <player> 5m
# - narrate "<&a><&l>You made it to Level 3!"
# - title "title:<&c>Level 3"
# - else:
# - narrate "<&c>Talk to the Parkour Master before attempting the course!"
on player enters parkour_finish_line:
- if <player.has_permission[not.a.perm]>:
- narrate "<&c>You can't play for real. But you made it to the top!"
- teleport <player> parkour_complete
- wait 1t
- flag player parkour:!
- title "title:<&a>Complete!"
- playsound <player> sound:entity_level_up volume:1.0 pitch:0.8
- firework <player.location> power:0.2 star primary:yellow fade:white flicker
- narrate "<&a><&l>You made it! Check the leaderboard!"
on player enters parkour_fall_reset:
- if <player.has_flag[parkour]>:
- define parkour_map <map[0/<player.location>|1/parkour_respawn_1|2/parkour_respawn_2|3/parkour_respawn_3]>
- teleport <[parkour_map].get[<player.flag[parkour]>]>
parkour_master_interact_command:
type: command
name: parkour
description: Starts the parkour
usage: /parkour
permission: custom.command.parkour
script:
- adjust <queue> linked_player:<server.match_player[<context.args.get[1]>]>
- if <player.has_flag[parkour]>:
- if <player.is_sneaking>:
- narrate "<&a>You have been removed from the challenge!"
- flag player parkour:!
- stop
- narrate "<&a><&l>You are ready to go!"
- else:
- flag player parkour:0 duration:10
- narrate "<&2><&m>=============================================<&nl><&nl><&a> Hey <&2><player.display_name><&nl><&a> do you think you can make it to the top?<&nl><&nl><&7> Game<&co><&a><&l> Spawn Parkour<&r><&nl><&nl> <&7>Instructions<&co><&a> Make your way to the top of the course<&nl><&a> Sneak Right-Click the parkour master to end,<&nl><&a> or type <&d>/parkour quit<&nl><&nl><&2><&m>============================================="