-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
chatty.sk
178 lines (166 loc) · 5.46 KB
/
chatty.sk
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
options:
#Put "on" to turn on that part of the script and "off" to turn off that part of the script!
announcement: on
mutechat: on
clearchat: on
censored: on
chatformat: on
join/leave msg: on
#Change the prefixes and permission message here!
bcprefix: &8&l[&5&lAnnouncement&8&l]
serverprefix: &3&lChatty &b&l»
pm: &3&lChatty &b&l» &4You can't do that!
#Change the permission commands here!
talkpower1: /pex user %arg-2% add chat.mute.bypass
talkpower2: /pex user %arg-2% remove chat.mute.bypass
#Change the permission nodes here!
chattyinfo: chatty.info #Permission to do /chattyinfo
broadcast: chatty.broadcast #Permission to do /bc or /broadcast
broadcastsee: chatty.broadcast.see #Permission to see the sent broadcast in a different world if the world is set
talkpower: chatty.chat.mute.talkpower #Permission to do /talkpower
chatmute: chatty.chat.mute #Permission to do /mutechat
chatbypass: chatty.chat.mute.bypass #Permission to talk when chat is muted
chatclear: chatty.clearchat #Permission to clear the chat
censoredbypass: chatty.censored.bypass #Permission to say words that are censored
command /chattyinfo:
permission: {@chattyinfo}
permission message: {@pm}
trigger:
send ""
send " &1&l----------"
send " &b&lInformation"
send "&1&l----------------"
send "&3Script Name: &9Chatty"
send "&3Creator: &9WolfyGameYT"
send "&3Version: &91.1"
send "&1&l----------------"
send ""
# vvv ANNOUNCEMENT vvv
command /bc [<world>] [<text>]:
permission: {@broadcast}
permission message: {@pm}
trigger:
if {@announcement} is on:
if arg-2 is not set:
send "{@serverprefix} &cPlease type something!"
if arg-2 is set:
if arg-1 is not set:
broadcast "{@bcprefix} &f%coloured arg-2%"
if arg-1 is set:
broadcast "{@bcprefix} &f%coloured arg-2%" to arg-1
if player has permission "{@broadcastsee}":
send "{@bcprefix} &d&l(%arg-1%&d&l) &f%coloured arg-2%"
if {@announcement} is off:
stop
command /broadcast [<world>] [<text>]:
permission: {@broadcast}
permission message: {@pm}
trigger:
if {@announcement} is on:
if arg-2 is not set:
send "{@serverprefix} &cPlease type something!"
if arg-2 is set:
if arg-1 is not set:
broadcast "{@bcprefix} &f%coloured arg-2%"
if arg-1 is set:
broadcast "{@bcprefix} &f%coloured arg-2%" to arg-1
if player has permission "{@broadcastsee}":
send "{@bcprefix} &d&l(%arg-1%&d&l) &f%coloured arg-2%"
if {@announcement} is off:
stop
# vvv MUTECHAT vvv
command /talkpower <text> <player>:
permission: {@talkpower}
permission message: {@pm}
trigger:
if {@mutechat} is on:
if arg-1 is set:
if arg-2 is not set:
send "{@serverprefix} &cPlease insert a username!"
if arg-2 is set:
if arg-1 is not "on" or "off" or "check":
send "{@serverprefix} &cPlease insert &c&lon&c, &c&loff&c&c, or &c&lcheck&c!"
if arg-1 is "on":
if arg-2 is set:
send "{@serverprefix} &7You're chat mute bypass has been &8enabled" to arg-2
make console execute "{@talkpower1}"
if arg-1 is "off":
if arg-2 is set:
send "{@serverprefix} &7You're chat mute bypass has been &8disabled" to arg-2
make console execute "{@talkpower2}"
if arg-1 is "check":
if arg-2 is set:
if arg-2 has permission "chat.mute.bypass":
send "{@serverprefix} &8%arg-2% &7has chat bypass &8enabled"
else if arg-2 does not have permission "chat.mute.bypass":
send "{@serverprefix} &8%arg-2% &7has chat bypass &8disabled"
if {@mutechat} is off:
stop
command /mutechat:
permission: {@chatmute}
permission message: {@pm}
trigger:
if {@mutechat} is on:
if {Globalchat} is not set:
set {Globalchat} to true
broadcast "{@serverprefix} &7Chat has been muted by &8%player%"
stop trigger
if {Globalchat} is set:
clear {Globalchat}
broadcast "{@serverprefix} &7Chat has been unmuted by &8%player%"
if {@mutechat} is off:
stop
on chat:
if {@mutechat} is on:
if {Globalchat} is true:
if player has permission "{@chatbypass}":
stop trigger
else:
cancel event
send "{@serverprefix} &7Chat is muted"
if {@mutechat} is off:
stop
# vvv CLEARCHAT vvv
command /clearchat:
permission: {@chatclear}
permission message: {@pm}
trigger:
if {@clearchat} is on:
loop 1000 times:
broadcast ""
broadcast "{@serverprefix} &7Chat cleared by &8%player%"
if {@clearchat} is off:
stop
# vvv CENSORED vvv
on chat:
if {@censored} is on:
if player does not have permission "{@censoredbypass}":
if message contains "censoredwordexample1" or "censoredwordexample2" or "censoredwordexample3":
cancel the event
message "&4(!) &cYou can't say that &4(!)"
if player has permission "{@censoredbypass}":
stop
if {@censored} is off:
stop
# vvv CHATFORMAT (might show an error if you're using the skunity parser, but is should still work) vvv
on chat:
if {@chatformat} is on:
set chat format to "%player's prefix%%player% %player's suffix%&e»&f %colored message%"
if {@chatformat} is off:
stop
# vvv JOIN/LEAVE MSG vvv
on first join:
if {@join/leave msg} is on:
send "{@serverprefix} &7Welcome %player% to the server!"
if {@join/leave msg} is off:
stop
on join:
if {@join/leave msg} is on:
send "{@serverprefix} &7%player% Joined"
if {@join/leave msg} is off:
stop
on quit:
if {@join/leave msg} is on:
send "{@serverprefix} &7%player% Left"
if {@join/leave msg} is off:
stop