Date: 2016/02/22 04:10:21 UTC-08: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
Chat_Events:
type: world
debug: false
events:
on player chats:
- if <player.has_flag[Teams_Player_Menu_Respond]> {
- determine cancelled passively
- execute as_player "team <player.flag[Teams_Player_Menu_Respond]> <context.message>"
- flag player Teams_Player_Menu_Respond:!
- queue clear
}
- if <player.has_flag[Teams_Player_Group]> {
- if <server.flag[Teams_Group_<player.flag[Teams_Player_Group]>_Leaders].contains[<player>]> {
- determine "FORMAT:Chat_F_InTeam_leader"
}
else {
- determine "FORMAT:Chat_F_InTeam"
}
}
- determine "FORMAT:Chat_F_Normal"
# Element to change the message.
# "FORMAT:" + dScript to set the format script the message should use.
# "RECIPIENTS:" + dList(dPlayer) to set the list of players that will receive the message.
# <context.message> returns the player's message as an Element.
# <context.format> returns the chat message's format.
# <context.recipients> returns a list of all players that will receive the chat.
Chat_F_Normal:
type: format
format: "<player.name.display> <&8><&chr[00BB]> <&r><text>"
Chat_F_InTeam:
type: format
format: "<s@Teams_Data.yaml_key[config.ranks.colors.<server.flag[Teams_Group_<player.flag[Teams_Player_Group]>_Rank]>].parse_color><player.flag[Teams_Player_Group]> <&r><player.name.display> <&8><&chr[00BB]> <&r><text>"
Chat_F_InTeam_leader:
type: format
format: "<s@Teams_Data.yaml_key[config.ranks.colors.<server.flag[Teams_Group_<player.flag[Teams_Player_Group]>_Rank]>].parse_color>*<player.flag[Teams_Player_Group]> <&r><player.name.display> <&8><&chr[00BB]> <&r><text>"