- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





Staff Pick: Chat Pings


By mcmonkey
Created: 2014/11/19 17:20:29 UTC-08:00 (10 years and 35 days ago)
Edited: 2015/02/25 12:53:56 UTC-08:00 (9 years and 302 days ago)
Likes: 2

Staff pick as of: 2014/11/19 17:20:36 UTC-08:00 (10 years and 35 days ago)
Denizen Version: 0.9.6
Script Version: 1.0
Description:

Make a noise when somebody says your name!


Download script | View raw 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
3600

# +--------------------
# |
# | C h a t   P i n g s
# |
# | Alerts when somebody says your name
#
# @author mcmonkey
# @date 2014 / 11 / 19
# @build 1534
# @version 1.1
#
# Installation:
# Just put the script in your scripts folder and reload.
#
# Usage:
# Just say someone's name, everything is automatic.
#
#
# ---------------------------- END HEADER ----------------------------

chat_ping_world:
    type: world
    debug: false
    events:
        on player chats:
        - foreach <server.list_online_players> {
          - if <context.message.contains[<def[value].name>]> || <context.message.contains[<def[value].name.display.strip_color>]> {
            - announce to_console "<&6>Denizen<&co> <&7><player.name> mentions <%value%.name>"
            - narrate targets:%value% "<player.name><&b> mentioned you!"
            - playsound <def[value].location> sound:successful_hit
            }
          }








View History