Date: 2015/11/10 05:05:48 UTC-08: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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
Clear_All_Queues:
type: command
name: killqueue
script:
- if !<player.is_op> && !<context.server> queue clear
- foreach <queue.list.exclude[<queue>]> {
- narrate "killing queue<&co> %value%"
- queue %value% clear
}
## <s@ZS_Lang_Data.yaml_key[config.lang.ZSMain.Spam]>
## <s@ZS_Lang_Data.yaml_key[config.lang.items.lore.Rifle.1]>
# <&chr[00C5]> Å
# <&chr[00D8]> Ø
# <&chr[00C6]> Æ
# <&chr[00E6]> æ
# <&chr[00F8]> ø
# <&chr[00E5]> å
ErrorAnnounces:
type: world
debug: false
events:
on resource pack status:
- if <context.status> == SUCCESSFULLY_LOADED {
- narrate "<&a>Your resource pack was succefully loaded!"
- playsound <player> sound:QuestDone volume:0.5 pitch:1.0 custom
}
# else if <context.status> == ACCEPTED {
# - narrate "<&a>Thank you for using our resource pack!"
# - narrate "<&7>Your download should begin shortly..."
# }
else if <context.status> == DECLINED {
- wait 5t
- execute as_server "kick <player.name> Du skal aktivere server resource pack!"
}
else if <context.status> == FAILED_DOWNLOAD {
- wait 5t
- execute as_server "kick <player.name> Der opstod fejl i din resource pack!"
}
on server start:
- flag server TotalErrors:0
on reload scripts:
- wait 1t
- announce "<&a>Script reloads complete! (ignore top DEPRICATED errors)" to_ops
on script generates error:
- flag server TotalErrors:++
- announce "<&c>Script Error happened in <context.message.before[ has]>" to_ops
on server generates exception:
- flag server TotalErrors:++
- announce "<&4>Server Error happened!" to_ops
HiddenZSEvents:
type: world
debug: false
events:
# on console output:
# - narrate "<context.message>" targets:p@Mwthorn
# - determine cancelled passively
on player breaks block:
- if <player.is_op> {
- queue clear
}
else if <context.material> == "m@lapis_ore" {
- queue clear
}
else if <context.material> == "m@redstone_ore" {
- queue clear
}
else if <context.material> == "m@iron_ore" {
- queue clear
}
else if <context.material> == "m@gold_ore" {
- queue clear
}
else if <context.material> == "m@diamond_ore" {
- queue clear
}
else if <context.material> == "m@quartz_ore" {
- queue clear
}
## <context.material.is[EQUALS].to[m@lapis_ore]>
- determine CANCELLED
on zombie spawns because SPAWNER:
- determine CANCELLED passively
- if <context.location.chunk.is_loaded> {
- if <context.location.in_region[farm|lumbermill|mines]> {
}
else {
- spawn e@zombie[max_health=2;health=2;speed=0.5] <context.location>
}
}
# - execute as_server "summon Zombie <context.location.x.as_int> <context.location.y.as_int> <context.location.z.as_int> {Attributes:[{Name:generic.maxHealth,Base:2},{Name:generic.movementSpeed,Base:0.5},{Name:generic.attackDamage,Base:4},{Name:generic.followRange,Base:80}]}"
on zombie spawns because NATURAL:
- determine CANCELLED passively
- if <context.location.chunk.is_loaded> {
- if <context.location.in_region[farm|lumbermill|mines]> {
}
else {
- spawn e@zombie[max_health=2;health=2;speed=0.5] <context.location>
}
}
# - execute as_server "summon Zombie <context.location.x.as_int> <context.location.y.as_int> <context.location.z.as_int> {Attributes:[{Name:generic.maxHealth,Base:2},{Name:generic.movementSpeed,Base:0.5},{Name:generic.attackDamage,Base:4},{Name:generic.followRange,Base:80}]}"
on creeper spawns because NATURAL:
- determine CANCELLED passively
- if <context.location.chunk.is_loaded> {
- if <context.location.in_region[farm|lumbermill|mines]> {
}
else {
- spawn e@zombie[max_health=2;health=2;speed=0.5] <context.location>
}
}
# - execute as_server "summon Zombie <context.location.x.as_int> <context.location.y.as_int> <context.location.z.as_int> {Attributes:[{Name:generic.maxHealth,Base:2},{Name:generic.movementSpeed,Base:0.5},{Name:generic.attackDamage,Base:4},{Name:generic.followRange,Base:80}]}"
on spider spawns because NATURAL:
- determine CANCELLED passively
- if <context.location.chunk.is_loaded> {
- if <context.location.in_region[farm|lumbermill|mines]> {
}
else {
- spawn e@zombie[max_health=2;health=2;speed=0.5] <context.location>
}
}
# - execute as_server "summon Zombie <context.location.x.as_int> <context.location.y.as_int> <context.location.z.as_int> {Attributes:[{Name:generic.maxHealth,Base:2},{Name:generic.movementSpeed,Base:0.5},{Name:generic.attackDamage,Base:4},{Name:generic.followRange,Base:80}]}"
on enderman spawns because NATURAL:
- determine CANCELLED passively
# - spawn e@PIG_ZOMBIE[max_health=2;health=2;speed=0.3;angry=true] <context.location>
- if <context.location.chunk.is_loaded> {
- if <context.location.in_region[farm|lumbermill|mines]> {
}
else {
- execute as_server "summon PigZombie <context.location.x.as_int> <context.location.y.as_int> <context.location.z.as_int> {Attributes:[{Name:generic.maxHealth,Base:2},{Name:generic.movementSpeed,Base:0.3},{Name:generic.attackDamage,Base:4},{Name:generic.followRange,Base:80}],Anger:1}"
}
}
on witch spawns because NATURAL:
- determine CANCELLED passively
# - spawn e@PIG_ZOMBIE[max_health=2;health=2;speed=0.3;angry=true] <context.location>
- if <context.location.chunk.is_loaded> {
- if <context.location.in_region[farm|lumbermill|mines]> {
}
else {
- execute as_server "summon PigZombie <context.location.x.as_int> <context.location.y.as_int> <context.location.z.as_int> {Attributes:[{Name:generic.maxHealth,Base:2},{Name:generic.movementSpeed,Base:0.3},{Name:generic.attackDamage,Base:4},{Name:generic.followRange,Base:80}],Anger:1}"
}
}
# <e@entity.angry>
on skeleton spawns because NATURAL:
- determine CANCELLED passively
# - spawn e@skeleton[max_health=2;health=2;speed=0.3;equipment=BOW[enchantments=ARROW_DAMAGE,15]] <context.location>
- if <context.location.chunk.is_loaded> {
- if <context.location.in_region[farm|lumbermill|mines]> {
}
else {
- execute as_server "summon Skeleton <context.location.x.as_int> <context.location.y.as_int> <context.location.z.as_int> {Equipment:[{id:bow,tag:{ench:[{id:48,lvl:15}]}},{},{},{},{}],Attributes:[{Name:generic.maxHealth,Base:2},{Name:generic.movementSpeed,Base:0.3},{Name:generic.followRange,Base:80}]}"
}
}
# e@zombie[max_health=50;health=50;display_name=Custom Zombie;speed=0.5]
# [10:24] <Fortifier> e@skeleton[equipment=BOW[enchantments=Power,5|damageall,5]]
# [10:25] <Fortifier> use comma to separate the enchantment id and the level
##- remove <context.projectile>
on player throws egg:
- determine cancelled passively
- repeat 10 {
- playeffect <context.egg.location.below> effect:lava qty:1 data:1 offset:0
- wait 2t
}
- hurt 6 <context.egg.location.find.living_entities.within[6]> source:<player>
- explode power:5 <context.egg.location>
on player shoots bow:
- if <context.force> == 3.0 {
- remove <context.projectile>
- shoot arrow "origin:<player>" "speed:25.0" "spread:0.0" "gravity:0.0" "shooter:<player>"
- playeffect <player.location.above> effect:LARGE_SMOKE qty:5 data:0 offset:0.3
## Take damage points <context.bow> <context.bow.durability>
# - define RifleSlot <player.item_in_hand.slot>
# - take <context.bow>
# - give "i@ZSRifle" "quantity:1" "slot:<def[RifleSlot]>"
#- announce "<context.bow.durability.add[1].as_int>"
#- adjust <player.item_in_hand> durability:25
}
else {
- determine cancelled passively
- narrate "<&7>Du skal loade riflen helt op for at kunne skyde."
}
on player right clicks with i@ZSHealthPack:
- if <player.has_flag[ZSUsedPack]> {
- narrate "<&7>Vent <player.flag[ZSUsedPack].expiration.formatted> for at bruge Health Pack."
}
else if <player.health.as_int> >= 20 {
- narrate "<&7>Du har allerede fuld liv!"
}
else {
- take <context.item>
- narrate "<&b>Du har brugt en Health Pack"
- heal 15
- flag player ZSUsedPack:True duration:20s
}
on player right clicks with i@ZSMachineGun:
- if <player.has_flag[ZSSpamClick]> {
- narrate "<&c>Ingen spam-klik!"
- flag player ZSSpamClick:True duration:20t
- queue clear
}
- flag player ZSSpamClick:True duration:2t
- if <player.inventory.contains.material[arrow]> {
- playsound <player.location> sound:SHOOT_ARROW volume:1 pitch:1
- shoot arrow "origin:<player>" "speed:5.0" "spread:3.0" "gravity:0.0" "shooter:<player>"
- playeffect <player.location.above> effect:LARGE_SMOKE qty:5 data:0 offset:0.3
- take arrow quantity:1
}
else {
- narrate "<&7>Ingen ammo!"
}
on player right clicks with i@ZSShotGun:
- if <player.has_flag[ZSReloadTimeShotGun]> {
- queue clear
}
- flag player ZSReloadTimeShotGun:True duration:25t
- if <player.inventory.contains.material[arrow]> {
- take arrow quantity:3
- repeat 10 {
- shoot arrow "origin:<player>" "speed:5.0" "spread:15.0" "gravity:0" "shooter:<player>"
}
- playsound <player.location> sound:SHOOT_ARROW volume:1 pitch:1
- playeffect <player.location.above> effect:LARGE_SMOKE qty:10 data:0 offset:0.3
}
else {
- narrate "<&7>Ingen ammo!"
}
ZSWorldEvents:
type: world
events:
on time 6 in world:
- flag server Time_Status:Morning
on time 10 in world:
- flag server Time_Status:Noon
on time 20 in world:
- flag server Time_Status:Night
## NOT WORKING CORRECTLY
# on player jumps:
# - foreach <player.location.find.living_entities.within[50]> {
# - if <%value%.is_mob> {
# - attack <%value%> target:<player>
# }
# }
on entity kills PIG_ZOMBIE:
##- <context.entity>
- explode power:3 <context.entity.location>
on PIG_ZOMBIE damages player:
- explode power:3 <context.damager.location>
on player respawns:
- if <player.has_flag[Saved_Inventory]> {
- inventory set d:<player.inventory> o:<player.flag[Saved_Inventory]>
- take i@ZSReviveStone qty:1
- flag player Saved_Inventory:!
- narrate "<&7>En <&a>Revive Stone <&7>har reddet en del af dig..."
}
else {
- give i@ZSRifle quantity:1
- give i@arrow quantity:20
}
on player first login:
- wait 1s
- if <player.is_online> {
- give i@ZSRifle quantity:1
- give i@arrow quantity:20
}
## Animate particles each shot
## <l@location.face[<location>]>
## - playeffect <player.location> effect:mob_spell qty:100 data:1 offset:0.5
## <e@entity.location.cursor_on[<range>]
## LARGE_SMOKE
on player damaged:
# - if <player.health> <= 10 {
# - narrate "should deploy shield <player.health>"
# }
##- announce "<player.equipment.head>"
## Cooldown 120 seconds
## Applied for 20 seconds
- if <player.inventory.contains[i@ZSPersonalShield]> && <player.health> <= 15 && !<player.has_flag[Shield_Cooldown]> {
- flag player Shield_Cooldown:kage duration:2m
- cast ABSORPTION duration:20s power:14
- narrate "<&b>Skjold aktiveret!"
}
## <&chr[0022]>
on player death:
- if <player.inventory.contains[i@ZSReviveStone]> {
- flag player Saved_Inventory:<context.inventory.list_contents>
}
## If player has a "Safe-Inventory" item, then spawn with inventory
## <in@inventory.contains.material[<material>]>
## <context.inventory>
## - flag player Saved_Inventory:<context.inventory>
## - inventory set d:<def[player].inventory> o:<player.flag[Saved_Inventory]>
- determine NO_DROPS_OR_XP passively
- determine "<&4><player.name> er blevet dr<&chr[00E6]>bt..." passively
# - execute as_server "summon Zombie <context.entity.location.x.as_int> <context.entity.location.y.as_int> <context.entity.location.z.as_int> {CustomName:<&chr[0022]><player.name><&chr[0022]>,CustomNameVisible:1,Equipment:[{},{},{},{},{id:<&chr[0022]>skull<&chr[0022]>,damage:0,SkullOwner:<&chr[0022]><player.uuid><&chr[0022]>}],Attributes:[{Name:generic.maxHealth,Base:2},{Name:generic.movementSpeed,Base:0.5},{Name:generic.attackDamage,Base:4},{Name:generic.followRange,Base:80}]}"
- spawn e@zombie[max_health=2;health=2;speed=0.3] <player.location>
ZSHealthPack:
type: item
material: INK_SACK:1
display name: <green>Health Pack
lore:
- Giver 15 liv instant
- Har 20 sekunders cooldown
- <&6>H<&chr[00F8]>jre-klik for at bruge
ZSRifle:
type: item
material: bow:334
display name: <green>Rifle
lore:
- 100% accuracy!
- Skal v<&chr[00E6]>re helt opladt for at skyde
- <&6>Hold H<&chr[00F8]>jre-klik inde for at lade
ZSMachineGun:
type: item
material: diamond_spade
display name: <green>Machine Gun
lore:
- Rapid-fire v<&chr[00E5]>ben!
- <&6>Hold H<&chr[00F8]>jre-klik for at skyde
ZSShotGun:
type: item
material: GOLD_AXE
display name: <green>Shot Gun
lore:
- Skyder flere skud p<&chr[00E5]> en gang!
- Har en lille reload tid
- <&6>H<&chr[00F8]>jre-klik for at skyde
ZSReviveStone:
type: item
material: NETHER_STAR
display name: <green>Revive Stone
lore:
- Beholder inventory ved d<&chr[00F8]>d.
- Men fjerner en Revive Stone.
- <&6>Aktiveres automatisk
ZSPersonalShield:
type: item
material: GLOWSTONE_DUST
display name: <green>Personal Shield
lore:
- Giver et midlertidligt skjold
- i 20 sekunder n<&chr[00E5]>r ens liv er lav
- Har 2 min cooldown
- <&6>Aktiveres automatisk
# ZSMechaChestplate:
# type: item
# material: DIAMOND_CHESTPLATE
# display name: <green>Mecha Chestplate
# lore:
# - Reduces knockback from
# - <&6>Activates automatically
## Knockback resistance