Date: 2020/07/17 23:06:14 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
68
69
70
channel:
type: world
events:
on server start:
- if !<yaml[channel].list_keys[]||null> == null:
- yaml create id:channel
- yaml id:channel set general:->:general
- yaml load:channel.yml id:channel
on player chats:
- determine passively cancelled
- narrate <green><player.name>:<aqua><context.message> targets:<server.flag[<player.flag[channel]>]>
on player joins:
- if !<player.has_flag[channelpermission]>:
- flag <player> channelpermission:general
- flag <player> channel:general
- flag server <player.flag[channel]>:->:<player>
on player quits:
- flag server <player.flag[channel]>:<-:<player>
on channel_select command:
- flag server <player.flag[channel]>:<-:<player>
- flag <player> channel:<context.args.get[1]>
- flag server <player.flag[channel]>:->:<player>
- narrate "<green>joined:<aqua><context.args.get[1]> <green>channel"
- determine fulfilled
change_channel:
type: command
name: channel
debug: true
description:
usage:
allowed help: false
script:
- foreach <player.flag[channelpermission]> as:perms:
- foreach <yaml[channel].read[<[perms]>]> as:channels:
- narrate "<element[<blue>click here:<green><[channels]>].on_click[/channel_select <[channels]>]>"
- wait 10t
create_channel:
type: command
name: create_channel
debug: true
description:
usage:
allowed help:
- if <player.is_op>:
- narrate "args as follows /create_channel level_of_permission channel_name"
script:
- if <player.is_op>:
- if !<yaml[channel].list_keys[]||null> == null:
- yaml create id:channel
- yaml id:channel set <context.args.get[2]>:->:<context.args.get[1]>
- yaml savefile:channel.yml id:channel
channel_perm:
type: command
name: channel_perm
debug: false
description:
usage:
allowed help:
script:
- if <player.is_op>:
- flag <server.match_player[<context.args.get[1]>]> channelpermission:->:<context.args.get[2]>
whisper:
type: command
name: whisper
debug: false
description:
usage:
allowed help:
script:
- narrate <green>from<&sp><player.name>:<red><context.raw_args.after[<context.args.get[1]>]> targets:<server.match_player[<context.args.get[1]>]>