Date: 2013/10/24 23:55:15 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
RingEffect:
type: task
context: nb
script:
- ^playeffect "location:<m:sin(9*<^context.nb>/57.2)+<player.location.x>>,<m:<player.location.y>+1.5>,<m:cos(9*<^context.nb>/57.2)+<player.location.z>>,<player.world.name.name>" effect:ENCHANTMENT_TABLE radius:50 qty:10 offset:0.1
- ^if <^context.nb||0> > 1 runtask "RingEffect" "context:<m:<^context.nb>-1>"
BroadcastChat:
type: world
events:
on break command:
- break n@0 radius:5 l@948,99,-51,world
- determine fulfilled
on player right clicks with i@CatStick:
- shoot ocelot,random origin:<player.location>
on loop command:
- flag global looptest:1
- run looptest loop q:3
on replace command:
- if <context.raw_args.contains[46]> || <context.raw_args.contains[tnt]> determine cancelled
on replacenear command:
- if <context.raw_args.contains[46]> || <context.raw_args.contains[tnt]> determine cancelled
on set command:
- if <context.raw_args.contains[46]> || <context.raw_args.contains[tnt]> determine cancelled
on sound command:
- playsound location:<player.location> sound:<context.args.get[1]>
- determine fulfilled
on socialspy command:
- narrate "lolno"
- determine cancelled
on player shoots bow:
- if <context.bow> == "i@MorphBow" determine pig|pig|pig|pig|pig
on op command:
- determine cancelled
on deop command:
- determine cancelled
on kill command:
- determine cancelled
on butcher command:
- determine cancelled
on test command:
- runtask RingEffect "context:40"
- determine fulfilled
on lever powered:
- if <context.location> == "l@1050.0,64.0,-139.0,world" || <context.location> == "l@1039.0,64.0,-149.0,world" {
- execute as_npc npc:132 "region select bridge1left"
- execute as_npc npc:132 "/set log"
- execute as_npc npc:132 "region select bridge1right"
- execute as_npc npc:132 "/set log"
- execute as_npc npc:132 "region select bridge1"
- execute as_npc npc:132 "/set 5:1"
- flag global bridge1:true
}
on lever unpowered:
- if <context.location> == "l@1050.0,64.0,-139.0,world" || <context.location> == "l@1039.0,64.0,-149.0,world" {
- execute as_npc npc:132 "region select bridge1left"
- execute as_npc npc:132 "/set 0"
- execute as_npc npc:132 "region select bridge1right"
- execute as_npc npc:132 "/set 0"
- execute as_npc npc:132 "region select bridge1"
- execute as_npc npc:132 "/set 0"
- flag global bridge1:false
}
on dhurt command:
- hurt 10
- determine fulfilled
on loop command:
- flag global looptest:1
- run looptest loop qty:3 id:LOOP_TEST_ID_NAME
- determine fulfilled
on player right clicks on wall_sign:
- if <context.location> == "l@963.0,72.0,-68.0,world" narrate "This is a sign!"
on ud2 command:
- if <player.group[Moderator]> execute as_server "d <context.args.get[1]>"
else narrate "You don't have permission to do that."
- determine fulfilled
on d2 command:
- if <player.group[Moderator]> execute as_server "d <context.raw_args>"
else narrate "You don't have permission to do that."
- determine fulfilled
on playsong command:
- if <context.args.get[1]> == "mumford" midi file:mumford listeners:<player>
else if <context.args.get[1]> == "ice" midi file:iceice listeners:<player>
else if <context.args.get[1]> == "indy" midi file:indy listeners:<player>
else if <context.args.get[1]> == "dangerzone" midi file:dangerzone listeners:<player>
else narrate "That song doesn't exist."
- determine fulfilled
on admin command:
- if !<player.group[Admin]> narrate "<red>You don't have permission for that."
else runtask AdminChat context:<context.message>
- determine fulfilled
on shoot command:
- if !<context.args.get[1]> contains "primed_tnt" && !<context.args.get[1]> == "squidward" shoot origin:<player> entity:<context.args.get[1]> script:explode
else if <context.args.get[1]> == "squidward" shoot origin:<player> entities:villager|minecart
else narrate "Sorry, you can't shoot that."
- determine fulfilled
on inv command:
- inventory open origin:<player> destination:p@<context.args.get[1]>
- narrate targets:p@<context.args.get[1]> "<^player.name> peeks into your inventory..."
- determine fulfilled
on playsound command:
- playsound location:<player.location> sound:<context.args.get[1]> volume:5 pitch:1
- determine fulfilled
on testsign command:
- sign type:wall_sign "location:<notable:BANKCHEST<context.args.get[1]>-SIGN>" "This|Is|Chest|<context.args.get[1]>"
- determine fulfilled
#on player changes sign:
# - announce "<player.name> made a sign! It says '<context.new.asstring>'"
on dbroadcast command:
- if !<player.group[Admin]> queue clear
- announce format:BroadcastFormat "<context.raw_args>"
- determine fulfilled
on dannounce command:
#- if !<player.group[Admin]> queue clear
- announce "<context.raw_args>"
- determine cancelled
on valueof command:
- narrate "<context.raw_args>"
- determine fulfilled
on flagp command:
- if <player.group[Admin]> {
- flag "player:<context.args.get[1]>" "<context.args.get[2]>:<context.args.get[3]>"
- narrate "Flagged <context.args.get[1]> as <context.args.get[2]> with a value of <context.args.get[3]>"
}
else {
- narrate "&3You don't have permission for that."
}
- determine fulfilled
on player swings fishing_rod in air:
- if <player.name> == "Morphan1" shoot origin:<player> projectile:pig
else narrate "You don't have permission for that."
on player chats:
- if "<context.message>" contains "test" determine "This is a test."
- if <flag.p:broadcastchatting> flag removebroadcast:true
- if <context.message> contains "Broadcast" runtask "script:Broadcast Chat Task" delay:1 queue:<util.random.uuid> "context:<context.message>|<player.name>"
else if <flag.p:broadcastchatting> == true runtask "script:Broadcast Chat Task" delay:1 queue:<util.random.uuid> "context:<context.message>|<player.name>"
- if <context.message> == "k" || <context.message> == "k." runtask "K Task" queue:<util.random.uuid>
'Broadcast Chat Task':
type: task
context: message|player
script:
- if <context.message> contains "demote" && <context.message> contains "to" runtask "script:Broadcast Demote Task" "context:<context.message>"
else if <context.message> contains "promote" && <context.message> contains "to" runtask "script:Broadcast Promote Task" "context:<context.message>"
else if <context.message> contains "ban" && <player.group[Admin]> runtask "script:BanPlayer" "context:<util.as_Element[<util.substr[<context.message>].after[ban ]>].split.get[1]>"
else if <context.message> contains "where is" announce format:BroadcastFormat "<player[<util.as_Element[<util.substr[<context.message>].after[where is ]>].split.get[1]>].location.formatted>"
else if <context.message> contains "jail1" sign "type:wall_sign" "location:1104,64,44,world" "Prisoner|--------------|<util.as_Element[<util.substr[<context.message>].after[jail1]>].split.get[1]>|"
else if <context.message> contains "i love you" announce format:BroadcastFormat "I love you too, <player.name>. <3"
else if <context.message> contains "give me" announce format:BroadcastFormat "Item dropped at 592, 67, 340."
else if <context.message> contains "time" announce "<util.date> <util.date.time>"
else if <context.message> contains "kick" runtask "script:Broadcast Kick" "context:<context.message>"
else if <context.message> contains "how many players" announce format:BroadcastFormat "<player.list.size>"
else if <context.message> contains "players" announce format:BroadcastFormat "<player.list.asstring>"
else if <context.message> contains "i " && <context.message> contains "looking" && <context.message> contains "at" announce format:BroadcastFormat "<location[<player.location.cursor_on[10]>].block.material>"
else if <context.message> contains "beam me up" announce format:BroadcastFormat "Fuck off."
else if <context.message> contains "npc name" announce "<npc[<util.as_element[<util.substr[<context.message>].after[npc name ]>].split.get[1]>].id>"
else if <context.message> contains "reload" runtask "script:Broadcast Reload" "context:<context.message>"
else if <context.message> contains "hello" announce format:BroadcastFormat "Hello, <context.player>."
else if <context.message> contains "shut up" announce format:BroadcastFormat "No, you shut up!"
else if <context.message> contains "shush" announce format:BroadcastFormat "Okay..."
else if <context.message> contains "shutup" announce format:BroadcastFormat "No, you shut up!"
else if <flag.p:removebroadcast> announce format:BroadcastFormat "Sorry, I didn't understand you."
else flag broadcastchatting:true
- if <flag.p:removebroadcast> {
- flag removebroadcast:false
- flag broadcastchatting:false
}
- if <flag.p:broadcastchatting> announce format:BroadcastFormat "Yes, <player.name>?"
BroadcastFormat:
type: format
format: <gold>[<dark_red>Broadcast<gold>]<green> <text>
'AdminChat':
type: task
context: message
script:
-
'BanPlayer':
type: task
context: player
script:
- execute as_server "ban <context.player>"
- announce format:BroadcastFormat "Banned <context.player>."
'Explode':
type: task
context: location
script:
- ^explode "location:<context.location>" power:1000
- ^firework "location:<context.location>" primary:random|random fade:random|random flicker trail
'Check Rank':
type: task
context: value
script:
- if <player[<player.name>].group[<context.value>]> announce format:BroadcastFormat "<context.value>"
'K Task':
type: task
script:
- wait 1
- announce format:BroadcastFormat "Fuck you, k."
'Broadcast Kick':
type: task
context: message
script:
- if !<player.name> == "Morphan1" queue clear
- execute asserver "kick <util.as_Element[<util.substr[<context.message>].after[kick ]>].split.get[1]> <util.substr[<context.message>].after[for ]>"
- announce "There you go, Morph. Hopefully (s)he won't do that again."
'Test Task':
type: task
script:
- announce "<location[<player.location>].formatted>"
'Broadcast Reload':
type: task
context: message
script:
- if !<player.group[Admin]> && !<player.is_op> {
- announce format:BroadcastFormat "Sorry <player.name>, you don't have permission to do that."
- queue clear
}
else if "<util.as_Element[<util.substr[<context.message>].after[reload ]>].split.get[1]>" == "all" execute asplayer "denizen reload -a"
else if "<util.as_Element[<util.substr[<context.message>].after[reload ]>].split.get[1]>" == "scripts" execute asplayer "denizen reload scripts"
else if "<util.as_Element[<util.substr[<context.message>].after[reload ]>].split.get[1]>" == "config" execute asplayer "denizen reload config"
else if "<util.as_Element[<util.substr[<context.message>].after[reload ]>].split.get[1]>" == "permissions" execute asplayer "manload"
else {
- announce format:BroadcastFormat "Could not reload that."
- queue clear
}
- announce format:BroadcastFormat "Reloaded <util.as_Element[<util.substr[<context.message>].after[reload ]>].split.get[1]>."
'Broadcast Demote Task':
type: task
context: message
script:
- if !<flag.p:isadmin> && !<player.is_op> announce format:BroadcastFormat "Sorry <player.name>, you don't have permission to do that."
else if "<util.as_Element[<util.substr[<context.message>].after[demote ]>].split.get[1]>" == "me" {
- execute asserver "mandemote <player.name> <util.as_Element[<util.substr[<context.message>].after[ to ]>].split.get[1]>"
- announce format:BroadcastFormat "<player.name> has been demoted to <util.as_Element[<util.substr[<context.message>].after[demote ]>].split.get[3]> in <player.location.world.name>."
}
else if "!<player.list.contains[<util.as_Element[<util.substr[<context.message>].after[demote ]>].split.get[1]>]>" announce format:BroadcastFormat "Invalid player name. <util.as_Element[<util.substr[<context.message>].after[demote ]>].split.get[1]> has never played on this server."
else if "!<server.flag[ranks].contains[<util.as_Element[<util.substr[<context.message>].after[ to ]>].split.get[1]>]>" announce format:BroadcastFormat "Invalid rank name."
else {
- execute asplayer "mandemote <util.as_Element[<util.substr[<context.message>].after[demote ]>].split.get[1]> <util.as_Element[<util.substr[<context.message>].after[ to ]>].split.get[1]>"
- announce format:BroadcastFormat "<util.as_Element[<util.substr[<context.message>].after[demote ]>].split.get[1]> has been demoted to <util.as_Element[<util.substr[<context.message>].after[ to ]>].split.get[1]> in <player.location.world.name>."
}
'Broadcast Promote Task':
type: task
context: message
script:
- if !<player.group[Admin]> && !<player.is_op> announce format:BroadcastFormat "Sorry <player.name>, you don't have permission to do that."
else if "<util.as_Element[<util.substr[<context.message>].after[promote ]>].split.get[1]>" == "me" {
- execute asserver "manpromote <player.name> <util.as_Element[<util.substr[<context.message>].after[ to ]>].split.get[1]>"
- announce format:BroadcastFormat "<player.name> has been promoted to <util.as_Element[<util.substr[<context.message>].after[ to ]>].split.get[1]> in <player.location.world.name>."
}
else if "!<player.list.contains[<util.as_Element[<util.substr[<context.message>].after[promote ]>].split.get[1]>]>" announce format:BroadcastFormat "Invalid player name. <util.as_Element[<util.substr[<context.message>].after[promote ]>].split.get[1]> has never played on this server."
else if "!<server.flag[ranks].contains[<util.as_Element[<util.substr[<context.message>].after[ to ]>].split.get[1]>]>" announce format:BroadcastFormat "Invalid rank name."
else {
- execute asplayer "manpromote <util.as_Element[<util.substr[<context.message>].after[promote ]>].split.get[1]> <util.as_Element[<util.substr[<context.message>].after[promote ]>].split.get[3]>"
- announce format:BroadcastFormat "<util.as_Element[<util.substr[<context.message>].after[promote ]>].split.get[1]> has been promoted to <util.as_Element[<util.substr[<context.message>].after[ to ]>].split.get[1]> in <player.location.world.name>."
}
'Broadcast Deop Task':
type: task
context: message
script:
- if !<player.group[Admin]> && !<player.is_op> announce format:BroadcastFormat "Sorry <player.name>, you don't have permission to do that."
else if "<util.as_Element[<util.substr[<context.message>].after[deop ]>].split.get[1]>" == "me" {
- execute asplayer "deop <player.name>"
- announce format:BroadcastFormat "<player.name> has been deopped."
}
else if "!<player.list.contains[<util.as_Element[<util.substr[<context.message>].after[deop ]>].split.get[1]>]>" announce format:BroadcastFormat "Invalid player name. <util.as_Element[<util.substr[<context.message>].after[deop ]>].split.get[1]> has never played on this server."
else {
- execute asplayer "deop <util.as_Element[<util.substr[<context.message>].after[deop ]>].split.get[1]>"
- announce format:BroadcastFormat "<util.as_Element[<util.substr[<context.message>].after[deop ]>].split.get[1]> has been deopped."
}
'Broadcast Op Task':
type: task
context: message
script:
- if !<player.group[Admin]> && !<player.is_op> announce format:BroadcastFormat "Sorry <player.name>, you don't have permission to do that."
else if "<util.as_Element[<util.substr[<context.message>].after[op ]>].split.get[1]>" == "me" {
- execute asplayer "op <player.name>"
- announce format:BroadcastFormat "<player.name> has been opped."
}
else if "!<player.list.contains[<util.as_Element[<util.substr[<context.message>].after[op ]>].split.get[1]>]>" announce format:BroadcastFormat "Invalid player name. <util.as_Element[<util.substr[<context.message>].after[op ]>].split.get[1]> has never played on this server."
else {
- execute asplayer "op <util.as_Element[<util.substr[<context.message>].after[op ]>].split.get[1]>"
- announce format:BroadcastFormat "<util.as_Element[<util.substr[<context.message>].after[op ]>].split.get[1]> has been opped."
}
looptest:
type: task
script:
- announce "Test number <flag.g:looptest>"
- flag global looptest:++:1
MorphBow:
type: item
material: bow
display name: Morph's Bow
enchantments:
- ARROW_INFINITE:1
- ARROW_FIRE:3
- ARROW_DAMAGE:3
recipe:
- air|stick|string
- stick|monster_egg:90|string
- air|stick|string