Date: 2014/09/21 12:49:02 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#Violet Server World Scripts v0.111
#By TheGeek007
#9-21-14
VioletWorldScript:
type: world
events:
#this event fires when the server starts
on server start:
# clear the flag, it saves between reboots
- flag server naughtywords:!
#set a server flag with a list of naughty words
- flag server naughtywords:|:fuck|shit|damn|pussy|cunt|bitch|nigger|dick|penis| ass
#to add a naughty word /ex flag server naughtywords:->:word
#to remove a naughty word /ex flag server naughtywords:<-:word
#this event fires every time a player chats, even if they are muted
on player chats:
#this line stores a definition that replaces dirty words with *%@&
- define replacement <context.message.replace[regex:(?i)(<server.flag[naughtywords].as_list.replace[li@]>)].with[*%@&]>
#compare original message with replacement, returns true if the two are different
#big thanks to McMonkey for this line!
- if !<context.message.is[==].to[%replacement%]>
{
#Isi said he wants to be immune to the infractions. Lets test out name recognition on me and have
#Officer Jenny go batshit crazy on me for lulz. If Isiliden, then Officer Jenny will suck up to him
- if <player.name> == TheGeek007 then
{
#have Officer Jenny kill the Geek over and over
}
- if <player.name> == Isiliden then
{
#suck up here
}
else
#somebody other than Isi, lay down the law!
{
#Increment player.flag[infractions] if a naughty word is detected, with a timeout of 30 min
- flag player infractions:++ duration:30m
#- announce "DEBUG <player.name> has <player.flag[infractions]> infractions so far"
#1 infraction: warn
- if <player.flag[infractions]> == 1
{
- announce "<green>[Officer Jenny] <white><player.name> This is your <red>FIRST WARNING <white> for language! Curse again and <red>RANDOM MISFORTUNE <white> may befall you!"
}
#2 infractions: warn and random misfortune
- if <player.flag[infractions]> == 2
{
- announce "<green>[Officer Jenny] <white><player.name> This is your <red>SECOND WARNING <white> for language! Curse again and you will be muted for <red>15 minutes!"
- random
{
- run MisfortuneJenny
- run MisfortunePikachu
- run MisfortuneKoffing
- run MisfortuneVoltorb
}
}
#3 infractions: 15 min mute and random misfortune, add blind and confuse 1 min
- if <player.flag[infractions]> == 3
{
- announce "<green>Officer Jenny <white> used <yellow>Psyduck Tape<white> on <player.name> for 15 minutes! <red>Its super effective! <white>Curse again and you will be muted for <red>30 minutes!"
- execute as_server "mute <player.name> 15m"
- potion BLINDNESS duration:60
- potion CONFUSION duration:60
- random
{
- run MisfortuneJenny
- run MisfortunePikachu
- run MisfortuneVoltorb
- run MisfortuneKoffing
}
}
#4 infractions: 30 min mute and random misfortune, blind, confuse, and slow for 2 min
- if <player.flag[infractions]> == 4
{
- announce "<green>Officer Jenny <white> used <yellow>Psyduck Tape<white> on <player.name> for 30 minutes! <red>Its super effective! <white>Curse again and you will be muted for <red>45 minutes!"
- execute as_server "mute <player.name> 30m"
- potion BLINDNESS duration:120
- potion CONFUSION duration:120
- potion SLOW duration:120
- random
{
- run MisfortuneJenny
- run MisfortunePikachu
- run MisfortuneVoltorb
- run MisfortuneKoffing
}
}
#5 infractions: 45 min mute and random misfortune, blind, confuse, and slow for 3 min
- if <player.flag[infractions]> == 4
{
- announce "<green>Officer Jenny <white> used <yellow>Psyduck Tape<white> on <player.name> for 45 minutes! <red>Its super effective!"
- execute as_server "mute <player.name> 45m"
- potion BLINDNESS duration:180
- potion CONFUSION duration:180
- potion SLOW duration:180
- random
{
- run MisfortuneJenny
- run MisfortunePikachu
- run MisfortuneVoltorb
- run MisfortuneKoffing
}
}
#Lets set the replacement variable again, this time replacing "lag" with more positive words!
- random
{
- define replacement <context.message.replace[lag].with[I love this server!]>
- define replacement <context.message.replace[lag].with[This server rocks!]>
- define replacement <context.message.replace[lag].with[This server is awesome!]>
- define replacement <context.message.replace[lag].with[This server is the best!]>
- define replacement <context.message.replace[lag].with[This is my favorite server!]>
}
#this line does the actual replacement if curse words were detected
- determine %replacement%
}
#Makes players not able to use portals AT ALL!!! (YAY!)
on player uses portal:
- determine CANCELLED
on portal created:
- announce "<red>WARNING! Portal creation detected! This is a violation of server rules!"
on entity enters portal:
- if <server.flag[nospam]> == null then
{
- announce "<red>WARNING Portal activity detected at location <context.location>!"
}
- flag server nospam:true duration:5s
# doesn't work, good try though
- determine CANCELLED
MisfortuneJenny:
type: task
script:
- narrate "Officer Jenny's Growlithe used Fire Spin on <player.name> for Bad Language!"
- burn <player> duration:5
MisfortunePikachu:
type: task
script:
- narrate "A passing Pikachu is offended at <player.name>'s language and used Thunder!"
- strike <player.location>
MisfortuneVoltorb:
type: task
script:
- narrate "A passing Voltorb is offended at <player.name>'s language and used Explosion!"
- explode power:1 <player.location> fire
MisfortuneKoffing:
type: task
script:
- narrate "A passing Koffing is offended at <player.name>'s language and used Poison Gas!"
- potion CONFUSION duration:15
- potion POISON duration:10