Date: 2020/07/28 03:31:43 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Chat Formatter:
type: world
debug: false
events:
on player joins:
- flag <player> channel:default
- if <player.has_permission[novachat.staffc]> == true:
- flag <player> staffchat:allow
on player chats:
- determine passively cancelled
- choose <player.flag[channel]>:
- case trade:
- narrate "<&5>Trade <&d>» <&d><player.name> <&7>» <&d><context.message>" targets:<server.online_players>
- announce to_console "<&5>Trade <&d>» <&d><player.name> <&7>» <&d><context.message>"
- case towny:
- narrate "<&c>Boop!"
- case nation:
- narrate "<&b>Boop!"
- case staff:
- narrate "<&e><&a>Staff Chat<&e> » <&f><player.name> <&e>» <&a><context.message>" targets:<server.online_players_flagged[staffchat].filter[flag[staffchat].is[==].to[allow]]>
- case default:
- narrate "<Player.chat_prefix.parse_color><player.name><Player.chat_suffix.parse_color> » <context.message>" targets:<server.online_players>
- announce to_console "<Player.chat_prefix.parse_color><player.name><Player.chat_suffix.parse_color> » <context.message>"
on player quits:
- flag <player> channel:!
# <server.online_players_flagged[channel].filter[flag[channel].is[==].to[trade]]> # Old Channel checker, may use in the future.
Change_Channel:
type: command
name: channel
description: Changes your current chat channel.
usage: /channel <<>channel<>>
aliases:
- ch
script:
# Picks an argument and runs the code for that argument. "Choose an argument and if the case is x then do x.y"
- choose <context.args.get[1]||None>:
- case trade tr:
- flag <player> channel:trade
- narrate "Channel switched to <&5>Trade"
- case towny t:
- narrate "<&c>Sorry, this command is currently disabled."
- case nation n:
- narrate "<&c>Sorry, this command is currently disabled."
- case staff sc s:
- flag <player> channel:staff
- narrate "Channel switched to <&e>Staff"
- case global general g:
- flag <player> channel:default
- narrate "Channel switched to <&a>General"
- default:
- narrate "<&c>Channel not found! Available channels are<&nl><&a>Global<&c>, <&5>Trade<&c>, <&6>Town<&c>, and <&b>Nation<&c>."
whisper:
type: command
name: whisper
debug: false
description:
usage:
aliases:
- w
- pm
- wh
- dm
- msg
allowed help:
script:
- if !<server.online_players.contains[<server.match_player[<context.args.get[1]>]>]>:
- narrate '<&c>You need to specify a person!'
- narrate '<&7>From: <&a><player.name> <&7>»<&f><context.raw_args.after[<context.args.get[1]>]>' targets:<server.match_player[<context.args.get[1]>]>
# v--v-- Staff Commands --v--v #
Pause Chat:
type: command
name: pausechat
description: Stops players from chatting
usage: /pausechat
aliases:
- pc
- chatpause
- pause
- silence
script:
- narrate "<&c>This command is currently disabled or you do not have permission."