Paste #36603: Edit of P#36602 - Untitled Paste

Date: 2016/10/04 02:08:44 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


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]>]>
      }
    }