-# Created by Mwthorn
-# 11-02-2016
-#
-# This scripts is basically used along with my other scripts,
-# it may not work if the other scripts are not installed
-#
-# Current Script Supports:
-# - Teams (By Mwthorn)
-
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
- - flag player Teams_Player_Menu_Respond:!
}
- if <player.has_flag[Teams_Player_Group]> {
- - determine "FORMAT:Chat_F_InTeam_<server.flag[Teams_Group_<player.flag[Teams_Player_Group]>_Rank]>"
+ - 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"
+ - 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> <&r><text>"
+ format: "<player.name.display> <&8><&chr[00BB]> <&r><text>"
-Chat_F_InTeam_1:
+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: "<&7><player.flag[Teams_Player_Group]> <&r><player.name.display> <&r><text>"
+ 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>"