Date: 2020/04/30 21:16:40 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
nature_spellbook:
type: item
display name: "<&a><&l>Spellbook of Nature"
mechanisms:
custom_model_data: 123456
material: stick
entangle:
type: item
display name: <&5><&l>Entangle
material: cobweb
lore:
- "<&o>Summon soul sand to slow your target's movement!"
nature_heal:
type: item
display name: <&a><&l>Heal
material: legacy_red_rose
lore:
- "<&o>Summon powerful redstone ores"
- "<&o>to heal yourself and other around you!"
spring:
type: item
display name: <&2><&l>Spring
material: ender_pearl
lore:
- "<&o>Summon slime blocks beneath you to"
- "<&o>launch yourself and others into the air!"
glow:
type: item
display name: <&e><&l>Glow
material: glowstone
lore:
- "<&o>Make everything visible in your strike!"
nature_spellbook_gui:
type: inventory
inventory: chest
title: <&a><&l>Spellbook of Nature
size: 9
slots:
- [entangle] [nature_heal] [spring] [glow] [] [] [] [] []
clear_nature_spells:
type: command
name: clearnaturespells
usage: /clearnaturespells
script:
- flag player natureheal:!
- flag player entangle:!
- flag player spring:!
- flag player glow:!
opennaturebook:
type: world
events:
on player right clicks with nature_spellbook:
- inventory open d:nature_spellbook_gui
on player drags in nature_spellbook_gui:
- determine cancelled
on player clicks entangle in nature_spellbook_gui:
- execute as_op clearnaturespells silent
- narrate "<&a><&l>You selected <&5><&l>Entangle<&a><&l>!"
- flag player entangle
- inventory close d:<context.inventory>
on player clicks nature_heal in nature_spellbook_gui:
- execute as_op clearnaturespells silent
- narrate "<&a><&l>You selected <&5><&l>Heal<&a><&l>!"
- flag player natureheal
- inventory close d:<context.inventory>
on player clicks spring in nature_spellbook_gui:
- execute as_op clearnaturespells silent
- narrate "<&a><&l>You selected <&2><&l>Spring<&a><&l>!"
- flag player spring
- inventory close d:<context.inventory>
on player clicks glow in nature_spellbook_gui:
- execute as_op clearnaturespells silent
- narrate "<&a><&l>You selected <&e><&l>Glow<&a><&l>!"
- flag player glow
- inventory close d:<context.inventory>
nature_heal_spell:
type: world
events:
on player right clicks with nature_staff:
- if !<player.has_flag[natureheal]>:
- stop
- if <context.item.nbt[charge]> == 0:
- narrate "<&c>Your Nature Staff is out of charges!"
- playsound ENTITY_LLAMA_SPIT <player.location> pitch:-1
- stop
- if <player.has_flag[magic_cooldown]>:
- playsound ENTITY_LLAMA_SPIT <player.location> pitch:-1
- stop
- define charge:<context.item.nbt[charge].sub[1]>
- define target <player.cursor_on.simple.as_location>
- define nearplayers <[target].find.players.within[5]>
- define area <[target].find.surface_blocks.within[5]>
- define path <[target].points_between[<player.location>].distance[1]>
- define distance <[target].distance[<player.location>]>
- if <[distance]> >= 5:
- narrate "<&c>Target area too far."
- stop
- flag player magicxp:+:20
- actionbar "<&a><&l>+20 Magic XP"
- if <player.flag[magicxp]> >= <server.flag[magiclevels].get_sub_items[1].get[<player.flag[magiclvl]>]>:
- flag player magiclvl:+:1
- playsound <player.location> ENTITY_PLAYER_LEVELUP
- toast "Congratulations! Your magic level is now <player.flag[magiclvl]>."
- inventory adjust slot:<player.held_item_slot> nbt:charge/<[charge]>
- inventory adjust slot:<player.held_item_slot> "display_name:<&a><italic>Nature Staff <&5>Charges <&e><&l>[<[charge]>]"
- flag player magic_cooldown duration:1s
- foreach <[path].reverse>:
- wait 1t
- playsound ENTITY_ILLUSIONER_CAST_SPELL <player.location> pitch:1
- playeffect redstone <[value].simple.as_location> special_data:1|white visibility:1000 quantity:25
- foreach <[area]>:
- showfake redstone_ore <[value]> players:<server.list_online_players> d:1s
- playeffect heart <[target]> visibility:1000 quantity:500 offset:3
- wait 4t
- playeffect heart <[target]> visibility:1000 quantity:500 offset:3
- wait 4t
- playeffect heart <[target]> visibility:1000 quantity:500 offset:3
- foreach <[nearplayers]>:
- heal 4 <[value]>
- narrate "<&a>You healed <[value].name>."
- if <[charge]> == 0:
- narrate "<&c>Your Nature Staff has ran out of charges!"
entangle_spell:
type: world
events:
on player right clicks with nature_staff:
- if !<player.has_flag[entangle]>:
- stop
- if <context.item.nbt[charge]> == 0:
- narrate "<&c>Your Nature Staff is out of charges!"
- playsound ENTITY_LLAMA_SPIT <player.location> pitch:-1
- stop
- if <player.has_flag[magic_cooldown]>:
- playsound ENTITY_LLAMA_SPIT <player.location> pitch:-1
- stop
- flag player magicxp:+:20
- actionbar "<&a><&l>+20 Magic XP"
- if <player.flag[magicxp]> >= <server.flag[magiclevels].get_sub_items[1].get[<player.flag[magiclvl]>]>:
- flag player magiclvl:+:1
- playsound <player.location> ENTITY_PLAYER_LEVELUP
- toast "Congratulations! Your magic level is now <player.flag[magiclvl]>."
- define charge:<context.item.nbt[charge].sub[1]>
- inventory adjust slot:<player.held_item_slot> nbt:charge/<[charge]>
- inventory adjust slot:<player.held_item_slot> "display_name:<&a><italic>Nature Staff <&5>Charges <&e><&l>[<[charge]>]"
- flag player magic_cooldown duration:5s
- define target <player.cursor_on.simple.as_location>
#in the future target distance is dependent on mage level
- define area <[target].find.surface_blocks.within[3]>
- define path <[target].points_between[<player.location>].distance[1]>
- playeffect enchantment_table <player.location> visibility:100 quantity:100
- foreach <[path].reverse>:
- wait 1t
#- playsound entity_fox_screech <player.location> pitch:-3
- playsound ENTITY_ILLUSIONER_CAST_SPELL <player.location> pitch:1
- playeffect redstone <[value].simple.as_location> special_data:1|green visibility:1000 quantity:100
- playeffect totem <[target]> visibility:1000 quantity:2000 offset:1
- foreach <[area]>:
- showfake soul_sand <[value]> players:<server.list_online_players> duration:5s
- playeffect totem <[target]> visibility:100 quantity:3000
- if <[charge]> == 0:
- narrate "<&c>Your Nature Staff has ran out of charges!"
on player right clicks with nature_staff in ardeenlibrary:
- if <player.has_flag[libspellcasting]>:
- yaml id:locations load:locations.yml
- define magma <yaml[locations].read[ardeenlibmagmaspell].get_sub_items[1].get[1]>
- define path <[magma].points_between[<player.location>].distance[1]>
- narrate "<&c>A blazing beam of heat shoots you from the globe!"
- hurt 10 <player>
- foreach <[path]>:
- playsound ENTITY_ILLUSIONER_CAST_SPELL <player.location> pitch:1
- playeffect redstone <[value].simple.as_location> special_data:2|red visibility:100 quantity:100
- stop
- flag player libspellcasting
- narrate "<&c>Librarian<&f>: Do not spellcast in my Library!"
spring_spell:
type: world
events:
on player right clicks with nature_staff:
- if !<player.has_flag[spring]>:
- stop
- if <context.item.nbt[charge]> == 0:
- narrate "<&c>Your Nature Staff is out of charges!"
- playsound ENTITY_LLAMA_SPIT <player.location> pitch:-1
- stop
- if <player.has_flag[magic_cooldown]>:
- playsound ENTITY_LLAMA_SPIT <player.location> pitch:-1
- stop
- define charge:<context.item.nbt[charge].sub[1]>
- define target <player.cursor_on.simple.as_location>
- define nearplayers <[target].find.players.within[5]>
- define area <[target].find.surface_blocks.within[2]>
- define path <[target].points_between[<player.location>].distance[1]>
- define distance <[target].distance[<player.location>]>
- if <[distance]> >= 3:
- narrate "<&c>Target area too far."
- stop
- flag player magicxp:+:20
- actionbar "<&a><&l>+20 Magic XP"
- if <player.flag[magicxp]> >= <server.flag[magiclevels].get_sub_items[1].get[<player.flag[magiclvl]>]>:
- flag player magiclvl:+:1
- playsound <player.location> ENTITY_PLAYER_LEVELUP
- toast "Congratulations! Your magic level is now <player.flag[magiclvl]>."
- inventory adjust slot:<player.held_item_slot> nbt:charge/<[charge]>
- inventory adjust slot:<player.held_item_slot> "display_name:<&a><italic>Nature Staff <&5>Charges <&e><&l>[<[charge]>]"
- flag player natureheal_cooldown duration:1s
- foreach <[path].reverse>:
- wait 1t
- playsound ENTITY_ILLUSIONER_CAST_SPELL <player.location> pitch:1
- playeffect redstone <[value].simple.as_location> special_data:1|yellow visibility:1000 quantity:25
- foreach <[area]>:
- showfake slime_block <[value]> players:<server.list_online_players> d:1s
- push <player>
- playeffect slime <[target]> visibility:1000 quantity:500 offset:3
- wait 4t
- playeffect slime <[target]> visibility:1000 quantity:500 offset:3
- wait 4t
- playeffect slime <[target]> visibility:1000 quantity:500 offset:3
- if <[charge]> == 0:
- narrate "<&c>Your Nature Staff has ran out of charges!"
glow_spell:
type: world
events:
on player right clicks with nature_staff:
- if !<player.has_flag[glow]>:
- stop
- define charge:<context.item.nbt[charge].sub[1]>
- if <context.item.nbt[charge]> == 0:
- narrate "<&c>Your Nature Staff is out of charges!"
- playsound ENTITY_LLAMA_SPIT <player.location> pitch:-1
- stop
- if <player.has_flag[magic_cooldown]>:
- playsound ENTITY_LLAMA_SPIT <player.location> pitch:-1
- stop
- flag player magicxp:+:20
- actionbar "<&a><&l>+20 Magic XP"
- if <player.flag[magicxp]> >= <server.flag[magiclevels].get_sub_items[1].get[<player.flag[magiclvl]>]>:
- flag player magiclvl:+:1
- playsound <player.location> ENTITY_PLAYER_LEVELUP
- toast "Congratulations! Your magic level is now <player.flag[magiclvl]>."
- define charge:<context.item.nbt[charge].sub[1]>
- inventory adjust slot:<player.held_item_slot> nbt:charge/<[charge]>
- inventory adjust slot:<player.held_item_slot> "display_name:<&a><italic>Nature Staff <&5>Charges <&e><&l>[<[charge]>]"
- flag player magic_cooldown duration:5s
#duration dependent on mage level
- define duration 2
- define target <player.cursor_on.simple.as_location>
#in the future target distance is dependent on mage level
- define area <[target].find.surface_blocks.within[10]>
- define path <[target].points_between[<player.location>].distance[1]>
- playeffect enchantment_table <player.location> visibility:100 quantity:100
- foreach <[path].reverse>:
- wait 1t
- playsound ENTITY_ILLUSIONER_CAST_SPELL <player.location> pitch:10
- playeffect redstone <[value].simple.as_location> special_data:1|yellow visibility:1000 quantity:100
- define entities <[target].find.entities.within[20]>
- playeffect flash <[target]> visibility:1000 quantity:2000 offset:5
- playeffect totem <[target]> visibility:100 quantity:3000 offset:5
- light <[target]> 15 duration:<[duration]>
- foreach <[entities]>:
- glow <[value]>
- wait <[duration]>s
- foreach <[entities]>:
- glow <[value]> false
- if <[charge]> == 0:
- narrate "<&c>Your Nature Staff has ran out of charges!"
on player right clicks with nature_staff in ardeenlibrary:
- if <player.has_flag[libspellcasting]>:
- yaml id:locations load:locations.yml
- define magma <yaml[locations].read[ardeenlibmagmaspell].get_sub_items[1].get[1]>
- define path <[magma].points_between[<player.location>].distance[1]>
- narrate "<&c>A blazing beam of heat shoots you from the globe!"
- hurt 10 <player>
- foreach <[path]>:
- playsound ENTITY_ILLUSIONER_CAST_SPELL <player.location> pitch:1
- playeffect redstone <[value].simple.as_location> special_data:2|red visibility:100 quantity:100
- stop
- flag player libspellcasting
- narrate "<&c>Librarian<&f>: Do not spellcast in my Library!"