Date: 2015/02/21 12:45:42 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
General:
type: world
events:
on server start:
- chunkload add location:-1345,70,-73,survive duration:-1s
- chunkload add location:-1825,64,-421,survive duration:-1s
- chunkload add location:-1227,67,-83,survive duration:-1s
- chunkload add location:-1384,65,-10,survive duration:-1s
- note "cu@-1250,11,-141,survive|-1187,125,-19,survive" as:msfarm1
- note "cu@-1399,11,-89,survive|-1250,125,44,survive" as:mistyshores
- note "cu@-1396,64,-37,survive|-1366,76,3,survive" as:msstables
- note "cu@-1429,11,-119,survive|-1220,125,74,survive" as:msborder
- note "cu@-1288,56,-48,survive|-1266,61,-24,survive" as:mschurchcrypt
- note "cu@-1293,49,-33,survive|-1274,52,-23,survive" as:mslowercrypt
- note "l@-1277.0,51.0,-35.0,survive" as:mscryptboss
- note "cu@-1611,11,-579,survive|-1318,125,-312,survive" as:agarthas
- note "cu@-1591,11,-311,survive|-1159,125,-90,survive" as:glisteningwoods
- note "cu@-1363,68,-223,survive|-1333,86,-90,survive" as:glisteningwoodspath1
- note "cu@-1415,68,-285,survive|-1338,86,-224,survive" as:glisteningwoodspath2
- note "cu@-1865,39,-475,survive|-1784,81,-410,survive" as:vestahut
# /ex showfake glass <cu@msborder.get_outline> duration:10s
- if <global.flag[mslowercryptboss]> == dead ^run s@MSLowerCryptBossRespawn
- run s@MSPriestSealCrypt
on 20:00 in survive:
# - ^run "script:MS Zombie Horde Event"
on player join:
- ^if <queue.exists[runichealing]> ^queue resume
- ^if <player.is_op> {
- ^narrate "<&5>WELCOME OPERATOR!"
- ^health <player> 100
- ^adjust <player> health_scale:40 }
else {
- ^health <player> 100
- ^adjust <player> health_scale:40 }
- ^if <player.flag[msstable_nonpayment]> {
- ^run s@narrate_msstable_nonpayment delay:3
- ^flag <player> msstable_nonpayment:! }
on player quit:
- ^if <queue.exists[runichealing]> ^queue pause
narrate_msstable_nonpayment:
type: task
script:
- ^narrate "<red>Your horse was removed from it's horse stall due to non-payment!! Balance<&co> <&a>$<player.money>" targets:<player>
Heal:
type: world
debug: false
events:
on player heals:
- ^if <context.reason> != "SATIATED" ^narrate "YOU were healed for <context.amount.asint>"
Damage:
type: world
debug: false
events:
on player shoots i@yewbow:
- shoot arrow origin:<player> speed:<context.force>
on player damaged by THORNS:
- ^narrate "<red>YOU were injured for <context.damage.asint> damage by thorns!"
on player damaged by MAGIC:
- ^narrate "<red>YOU were injured for <context.damage.asint> magic damage!"
on player damaged by POISON:
- ^narrate "<red>YOU were poisoned for <context.damage.asint> damage!"
on player damaged by FALL:
- ^narrate "<red>YOU fell for <context.damage.asint> damage!"
on player damaged by LAVA:
- ^narrate "<red>YOU were burned for <context.damage.asint> damage!"
on player damaged by FIRE:
- ^narrate "<red>YOU were burned for <context.damage.asint> damage!"
on player damaged by FIRE_TICK:
- ^narrate "<red>YOU were burned for <context.damage.asint> damage!"
on player damaged by BLOCK_EXPLOSION:
- ^if <cu@mslowercrypt.is_within[<player.location>]> ^inject s@MSLowerCryptExplodeDamage
else ^narrate "<red>YOU were injured for <context.damage.asint> damage!"
on player damaged by LIGHTNING:
- ^narrate "<red>YOU were shocked for <context.damage.asint> damage!"
on player damaged by entity:
#--------------------------------------MINIBOSSES---------------------------------------------
- ^if '<context.damager.custom_name.strip_color.contains[*Really Angry Skeleton]>' {
- ^determine <proc[ReallyAngrySkeletonAttack].context[<player>|<context.damager>]> }
#----------------------------------------BOSSES-----------------------------------------------
- ^if <context.damager> == <global.flag[mslowercryptboss]> {
- ^determine <proc[MSLowerCryptBossAttack].context[<player>|<context.damager>]> }
- ^if <context.damager> == <global.flag[VestatheWitch]> {
- ^determine <proc[VestatheWitchAttack].context[<player>|<context.damager>]> }
#-------------------------------------NORMAL MOBS---------------------------------------------
- ^if <context.damager.custom_name> != null ^narrate "<context.damager.custom_name> <red>hits YOU for <context.damage.asint> damage!"
else if <context.damager.is_player> {
- ^if <cu@mistyshores.is_within[<player.location>]> ^determine cancelled
- ^narrate "<context.damager.name.display> <red>hits YOU for <context.damage.asint> damage!" }
else if <context.damager.is_npc> ^narrate "<&4><context.damager.name.nickname> <red>hits YOU for <context.damage.asint> damage!"
else if <context.damager.entity_type> == SPIDER ^narrate "<&7><context.damager.name> <red>bites YOU for <context.damage.asint> damage!"
else if <context.damager.entity_type> == CAVE_SPIDER ^narrate "<&7><context.damager.name> <red>bites YOU for <context.damage.asint> damage!"
else if <context.damager.entity_type> == BAT ^narrate "<&7><context.damager.name> <red>bites YOU for <context.damage.asint> damage!"
else if <context.damager.entity_type> == PIG ^narrate "<&7><context.damager.name> <red>bites YOU for <context.damage.asint> damage!"
else ^narrate "<&7><context.damager.name> <red>hits YOU for <context.damage.asint> damage!"
on player damages entity:
- ^if <context.entity> == <global.flag[mslowercryptboss]> || <context.entity> == <global.flag[VestatheWitch]> ^queue clear
- define item <player.item_in_hand>
- ^if !<proc[ValidTargetCheck].context[<player>|<context.entity>|20]> ^determine cancelled
#--------------------------------------MINIBOSSES---------------------------------------------
- ^if '<context.entity.custom_name.strip_color.contains[*Really Angry Skeleton]>' {
- ^inject 's@ReallyAngrySkeletonDefend'
- ^if <proc[CustomItemCheck].context[%item%|<player>]> {
- ^determine <proc[CustomItemDamage].context[%item%|<player>|<context.entity>|<context.cause>]> }
else {
- ^inject 's@NarrateDamage'
- ^queue clear }
}
#-------------------------------------NORMAL MOBS---------------------------------------------
- ^if <proc[CustomItemCheck].context[%item%|<player>]> {
- ^determine <proc[CustomItemDamage].context[%item%|<player>|<context.entity>|<context.cause>]> }
else {
- ^inject 's@NarrateDamage'
- ^determine fulfilled }
Deaths:
type: world
debug: false
events:
#----------------------------------------PLAYER----------------------------------------------
# on suicide command:
# - ^define roll <util.random.int[50].to[100]>
# - ^flag player suicide:true
# - ^take %roll% money
# - ^announce "<&2><player.name> <&6>has lost $%roll% from suicide!"
on player respawns:
# - ^if <player.flag[suicide]> ^run 's@RespawnSuicide' delay:1
- ^if <player.has_flag[soulbound]> ^run 's@ReturnSoulboundItems' delay:1
SoulboundProtection:
type: world
debug: false
events:
on player drops i@magicegg:
- determine cancelled
on player drops i@herder:
- determine cancelled
on player drops i@staffofbountifulharvest:
- determine cancelled
on player drops i@bloodsucker:
- determine cancelled
on player drops i@trailofembers:
- determine cancelled
on player drops i@mscryptpaper:
- determine cancelled
on player drops i@mscryptkey:
- determine cancelled
on player drops i@BundleofMistyShoresWheat:
- ^determine cancelled
on player drops i@MistyShoresWatermelon:
- ^determine cancelled
on player drops i@MistyShoresPumpkin:
- ^determine cancelled
on player drops i@sunflare:
- determine cancelled
on player drops i@meteorite:
- determine cancelled
on player drops i@merrygoround:
- determine cancelled
on player drops i@heartburn:
- determine cancelled
on player drops i@cryptstalkersword:
- determine cancelled
on player drops i@cryptstalkerhelm:
- determine cancelled
on player drops i@cryptstalkerarmor:
- determine cancelled
on player drops i@cryptstalkerleggings:
- determine cancelled
on player drops i@cryptstalkerboots:
- determine cancelled
on player death:
- ^announce "<&b><player.name> <&6>has died at <player.location.simple>."
- ^flag player tempinv:!
- ^foreach <player.inventory.list_contents.aslist> {
- ^if <%value%.lore> contains '<&5><&8><&1><&9><&5><&o>soulbound' ^flag player "soulbound:->:%value%"
else ^flag player "tempinv:->:%value%
}
- ^if <player.equipment.helmet> != NULL {
- ^if <player.equipment.helmet.lore> contains '<&5><&8><&1><&9><&5><&o>soulbound' ^flag player "soulbound:->:<player.equipment.helmet>"
else ^flag player "tempinv:->:<player.equipment.helmet> }
- ^if <player.equipment.chestplate> != NULL {
- ^if <player.equipment.chestplate.lore> contains '<&5><&8><&1><&9><&5><&o>soulbound' ^flag player "soulbound:->:<player.equipment.chestplate>"
else ^flag player "tempinv:->:<player.equipment.chestplate> }
- ^if <player.equipment.leggings> != NULL {
- ^if <player.equipment.leggings.lore> contains '<&5><&8><&1><&9><&5><&o>soulbound' ^flag player "soulbound:->:<player.equipment.leggings>"
else ^flag player "tempinv:->:<player.equipment.leggings> }
- ^if <player.equipment.boots> != NULL {
- ^if <player.equipment.boots.lore> contains '<&5><&8><&1><&9><&5><&o>soulbound' ^flag player "soulbound:->:<player.equipment.boots>"
else ^flag player "tempinv:->:<player.equipment.boots> }
- ^if <player.flag[tempinv]> == NULL {
- ^determine "NO_DROPS" }
else {
- ^narrate "<&5>* you dropped<&8><&co> <&b><player.flag[tempinv].formatted>"
- ^determine "DROPS <player.flag[tempinv].aslist>" }
BindingStone:
type: world
events:
# on player right clicks m@grass with m@diamond_hoe in mistyshores:
# - determine cancelled
on player left clicks emerald_block in mistyshores:
- define mistyshores l@-1355.0,70.0,-61.0,survive
- ^if <context.location> == %mistyshores% {
- ^if <player.flag[respawnpoint]> == %mistyshores% {
- ^narrate "<&3>Misty Shores Binding Stone <&8>| <&e>You are already bound to this location!"
- ^determine cancelled }
- ^if <player.flag[bindingstoneclicked]> {
- ^flag player respawnpoint:%mistyshores%
- ^playeffect l@-1355.0,70.0,-61.0,survive portal qty:100
- ^playeffect <player.location> portal qty:150
- ^playsound l@-1355.0,70.0,-61.0,survive effect:portal_travel volume:2.0 pitch:2
- ^narrate "<&3>Misty Shores Binding Stone <&8>| <&e>You will now respawn here when you die!" }
else {
- ^flag player bindingstoneclicked duration:5
- ^narrate "<&3>Misty Shores Binding Stone <&8>| <&e>Click again if you would like to bind here!" }
- ^determine cancelled
}
on player respawns:
- if <player.flag[respawnpoint]> == null queue clear
- determine <player.flag[respawnpoint]>
Spawn:
type: world
events:
on spawn command:
- ^execute as_player 'mvs'
- ^determine fulfilled
NPCSpawns:
type: world
events:
on entity spawns in mistyshores:
- if <context.entity_type> == MUSHROOM_COW || <context.entity_type> == HORSE {
- determine cancelled }
# Temp:
# type: task
# script:
# - foreach <player.location.find.entities[horse].within[1000]> {
# - adjust %value% tame:false }
Temp:
type: task
script:
- foreach <player.location.find.entities[horse].within[10]>
- if <cu@mistyshores.is_within[<%value%.location>]> remove %value% }
# Remember, when whatever quest is completed, to run this command:
# - flag player respawnpoint:!
# To remove the respawnpoint and allow them to respawn normally
# - ^announce <context.reason>
#- ^run "script:ModifyBlockTest"
# on player damages player:
# - ^narrate "hi" target:<context.damager>
# - ^if <player.item_in_Hand> == i@WandofFire {
# - ^if <context.entity.custom_name> != null ^narrate "<&f>You damaged <&c><context.entity.custom_name> <&f>for <&c><context.damage.asint> <&f><context.cause> damage! <&8>[<&f><el@val[<math:<context.entity.health.asint>-<context.damage.asint>>].asint>/<context.entity.health.max.as_int><&8>]" targets:<player>
# ^else ^narrate "<&f>You damaged <&c><context.entity.name> <&f>for <&c><context.damage.asint> <&f><context.cause> damage! <&8>[<&f><el@val[<math:<context.entity.health.asint>-<context.damage.asint>>].asint>/<context.entity.health.max.as_int><&8>]" targets:<player> }
# on entity killed:
# on player enters cu@msborder:
# - ^run 's@MS Zombie Horde Scoreboard'
# on player exits cu@msborder:
# - ^run 's@MS Zombie Horde Scoreboard' scoreboardoff
# on player right clicks wood_button:
#- ^run "script:ModifyBlockTest"
# - ^define msfrontgatebuttonl <context.location>
# - ^announce '%msfrontgatebuttonl% has been pushed!'
# - ^announce <context.location.power>
# - if <context.location> == l@-1343.0,71.0,-77.0,survive {
# - run "ModifyBlockTest" }
#- cooldown duration:15s global "script:ModifyBlockTest" }
#- if <location.power>
#- modifyblock location:-1346,70,-80,survive material:101 height:6 depth:1
# }
# This event only runs once!
#on server start:
#- runtask 'daily_prizes' delay:1h
#on player login:
# on entity damages player:
# - narrate "<&c><context.damager.name> <&f>hits you for <&c><context.damage> <&f>damage!" targets:<context.entity>
#- announce '<player.name> has entered the game!'