Date: 2016/10/04 02:08:44 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
Full Chat Script:
debug: false
type: world
events:
on player chats:
- determine passively cancelled
- if <player.flag[chat.spam_counter]||0> >= 5
{
- narrate "<dark_green><bold>[<yellow>Spam<dark_green><bold>] <red>Do not spam the chat! <dark_red><bold>[<yellow><player.flag[cSpam].expiration.after[d@].before[s].round_to[1]||0>s<dark_red><bold>]"
- queue clear
}
- flag <player> chat.spam_counter:++ d:5s
- if <player.has_flag[chat.global]>
{
- define Name <player.name.display>
- define Msg <context.message>
- bungee <bungee.list_servers>
{
- narrate "<gray><bold>[<dark_green><bold>G<gray><bold>] <gray>| <yellow><def[Name]> <dark_green><bold>>>> <green><def[Msg]>" targets:<server.get_online_players_flagged[chat.global]>
}
}
else
{
- if <context.message.starts_with[!]>
{
- if <pl.has_flag[chat.shout_CD]>
{
- narrate "<dark_green><bold>[<yellow>Spam<dark_green><bold>] <red>You need to wait before you can shout again! <dark_red><bold>[<yellow><pl.flag[chat.shout_CD].expiration.after[@].before[s].round_to[1]||0>s<dark_red><bold>]"
- queue clear
}
- flag player chat.shout_CD d:20s
- narrate "<context.message.after[!]>" format:cForm_Shout01 targets:<player.location.find.players.within[<server.flag[cShout]>]>
}
else
{
- narrate "<context.message>" format:cForm_Local01 targets:<player.location.find.players.within[<server.flag[cLocal]>]>
}
}