Date: 2023/07/02 18:02:01 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
60
61
62
63
64
65
66
67
cutscene:
type: command
name: cutscene
debug: true
description: A custom cutscene script for fariasmp
usage: /cutscene
permission message: Sorry!
script:
- if <player.has_flag[cutscene]>:
- run exitcutscene
- else:
- run startcutscene
exitcutscene:
type: task
script:
- narrate cutscene stopped
- flag <player> cutscene:!
#return to saved location when cutscene is exited.
- teleport <player> <player.flag[location]>
# remove the old location flag now it's used
- flag <player> location:!
#put back in gms when cutscene is ended
- adjust gamemode survival
startcutscene:
type: task
script:
# save current location so we can return to it
- flag <player> location:<player.location>
# flag them as cutscene active
- flag <player> cutscene
# put the player in gmsp
- adjust gamemode spectator
- wait 5s
- run exitcutscene
cutscenehandler:
type: world
debug: false
events:
# block all commands when cutscene is running
on command:
- if <player.has_flag[cutscene]>:
- determine FULFILLED
# if they join and they didnt leave the cutscene properly, force kick them out.
on player joins:
- if <player.has_flag[cutscene]>:
- run exitcutscene