Paste #13926: Untitled Paste

Date: 2015/02/17 17:28:11 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


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
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627


# Time and Weather Changing Wizard with Questline
#
# To assign to an NPC, type:
# /npc assign --set "Time Changer"
#
#
# @author mythanical
# @script version 0.9
# @denizen v0.8.8+
# @last-updated Feb 28 2013
# @irc EsperNet IRC Network #denizen-dev
# @Minecraft Server - minecraft.geek.nz
# @Donate Bitcoin: 1Fzacc2gZ5NGRMXg5jWP6NcUkWei34xjzt

"Wizard":
    type: assignment

    default constants:

        # A list of constant values that you should change to suit your needs, for the quest line.
        BonesQty: 9
        RottenFleshQty: 10
        StringQty: 12
        EnderPearlQty: 1
        ChangeTimeFee: 100
        RewardAmount: 300
        Townname: 'Arrowin'

        # This is the locations of where the no_damage lightning bolts will hit when the NPC changes the
        # weather to stormy. This is purely for effect and immersion.
        Lightning Bolt One Location: "128,65,250,world"
        Lightning Bolt Two Location: "125,65,255,world"
        Lightning Bolt Three Location: "130,65,252,world"
        Lightning Bolt Four Location: "127,65,248,world"

    # Specify the priority of scripts when player interacts with NPC (higher number means higher priority)
    interact scripts:
    - 5 Wizard Quest Status
    - 10 Wizard Quest Line
    - 20 Wizard Quest One
    - 21 Wizard Quest Two
    - 22 Wizard Quest Three
    - 23 Wizard Quest Four
    - 30 Change Time Itself

    actions:
        on assignment:
        # This enables interaction with NPC via clicking, chatting, proximity and damage.
        - trigger name:chat toggle:true
        - trigger name:click toggle:true
        - trigger name:proximity toggle:true
        - trigger name:damage toggle:true
        # Make the NPC so they can be killed by the player. They will respawn a few seconds later.
        - execute as_npc "npc sel <npc.id>"
        - execute as_npc "trait health"
        - execute as_npc "npc vulnerable"

        # When a player kills the NPC, narrate something. On my server, I run another script instead that 
        # changes the alignment of the player for commiting such a heinous act.
        on death by player:
        - narrate "<red>You have killed <yellow><npc.name><red>. Are you pleased with yourself?"

"Wizard Quest Line":
    Requirements:
        Mode: All
        List:
        # This script will only run if the flag has none of the values listed below. That is what the 'minus'
        # in front of the FLAGGED means - e.g. where the flag WizardQuest does NOT have a value
        # of 'Completed' etc.
        - -FLAGGED PLAYER 'WizardQuest:Completed'
        - -FLAGGED PLAYER 'WizardQuest:Quest1'
        - -FLAGGED PLAYER 'WizardQuest:Quest2'
        - -FLAGGED PLAYER 'WizardQuest:Quest3'
        - -FLAGGED PLAYER 'WizardQuest:Quest4'
    type: interact

    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    # On player entering proximity range, run a script (located further down).
                    - ^runtask "script:Wizard Check Requirements"

            click trigger:
                script:
                # On clicking, run a slightly different script to check requirements before presenting quest stage 1.
                - ^runtask "script:Check Initial Quest Requirement"

            damage trigger:
                script:
                # When you hit the NPC, it will run the script called Warning (further below).
                - ^runtask "script:Warning"

        2:
            chat trigger:
                'Start Questline':
                    Trigger: /Yes/, I am interested. What is my first quest?
                    # This will start the quest line and put a flag against the player to indicate which stage they are at.
                    script:
                    - engage now
                    - chat "Great! Well, the first ingredient I need for my potion is <gold><cons:BonesQty><green> bones! Please bring it to me."
                    - chat "Each ingredient you bring me will earn you <gold><cons:RewardAmount><green> gold coins."
                    - narrate "<red> Stage 1 of 4 started."
                    - ^flag player "WizardQuest:Quest1"
                    - disengage
                'Deny Questline':
                    Trigger: /No/, I am not interested.
                    script:
                    # If the player says 'no', zap them back to the first step in 'Wizard Quest Line' script.
                    - chat "OH that is GRea..oh, what? Ok then. That is fine. Come back when you change your mind."
                    - narrate "<red><npc.name>'s eye twitches."
                    - ^zap 1 "script:Wizard Quest Line"

            proximity trigger:
                exit:
                    script:
                    # When player leaves NPC proximity, put them back to step 1 in 'Wizard Quest Line' script.
                    - ^zap 1 "script:Wizard Quest Line"

            click trigger:
                script:
                # I add this here, in case someone clicks the NPC while it's waiting for them to respond with a 'yes' or 'no'
                # so that they don't lose where they are in the dialog.
                - ^runtask "script:Check Initial Quest Requirement"

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Wizard Check Requirements":
    type: task

    script:
    # The if statement checks to see if the player is holding a sword, if they are then deny interaction until
    # player selects another item.
    - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
      else runtask "script:Wizard General Chat"

"Wizard General Chat":
    type: task

    script:
    # This will pick a random line for the NPC to say when the player enters proximity.
    - ^random 5
    - ^chat "Barack Obama, foreign policy wizard. I just have to laugh."
    - ^chat "We live as ripples of energy in the vast ocean of energy."
    - ^chat "Without silence, there cannot be any real appreciation in life, which is as delicate in its inner fabric as a closed rosebud."
    - ^chat "Nature reflects the moods of the wizard."
    - ^chat "My mind is the knife that cuts the continuum of space and time into neat slices of linear experience."

"Warning":
    type: task

    script:
    # When you hit (damage) the NPC, they will respond with one of the following 5 lines.
    - ^random 5
    - chat "<red>Oucch! <green>Why would you do that? If I die, you WILL regret it!"
    - chat "<red>Aaarrggg! <green>What did I ever do to you? Don't hit me again!"
    - chat "<red>Wha..why are you hurting me? <green>Oh, these cuts..they hurt so much."
    - chat "<red>Please don't hurt me! <green>I have never done anything bad to you!"
    - chat "<red>Owwee! <green>Don't do something now that you will regret later.."

"Deny Interaction":
    type: task

    script:
    # If you are holding a sword, checked by the if statement above, it will respond with
    # one of the following 5 lines.
    - ^random 5
    - ^chat "Oh, why do you come to me armed? Please put away your weapon first."
    - ^chat "Is that a..weapon in your hand? Please don't hurt me! You might regret it."
    - ^chat "<cons:Townname> is a friendly town, please put your weapon away!"
    - ^chat "It's courtesy to put your weapon away while talking to people in <cons:Townname>."
    - ^chat "Why is a weapon necessary here? Are we engaging in some kind of fight?"

"Check Initial Quest Requirement":
    type: task

    script:
    # If player is holding a sword, deny interaction otherwise run the quest dialog script below.
    - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
      else runtask "script:Wizard Quest Dialog"

"Wizard Quest Dialog":
    type: task

    script:
    # Present player with the option to 'yes' or 'no' to beginning the quest line. Then zap player to 
    # step 2 in 'Wizard Quest Line' above, where it's expecting a chat from the player.
    - chat "Hello there <player.name>! I need some very specific ingredients to make a secret potion."
    - narrate "<npc.name> scratches his chin.."
    - wait 3
    - chat "If you can help me get these ingredients together, I am willing to unlock you a service that only I can provide."
    - wait 4
    - chat "For a mere <gold><cons:ChangeTimeFee><green> gold coins, I will change the TIME or WEATHER! From day to night or night to day! Rain or sunshine, all at your command!"
    - wait 4
    - chat "Now tell me <player.name>, are you interested in unlocking this service?"
    - ^narrate "<red>Say:"
    - ^narrate "  <blue>Yes<blue> <gray>or<red> No"
    - ^zap 2 "script:Wizard Quest Line"

"Wizard Quest One":
    Requirements:
        Mode: All
        List:
        # On interaction with NPC, check to see if player has 1. accepted the quest line and 2. got enough bones.
        - FLAGGED PLAYER 'WizardQuest:Quest1'
        - ITEM 352 QTY:<cons:BonesQty>
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    # On entering proximity the NPC already 'knows' the player has enough bones.
                    - chat "Great! Seems like you've got what I need."
                    - narrate "<red>Right click <npc.name> to hand him the <gray>Bones."

            click trigger:
                script:
                # NPC takes bones, he rewards you with the 'RewardAmount' you specified in the constant
                # value at the top of the script and enables stage 2 in the quest line.
                - ^engage now
                - ^take 'item:352' qty:<cons:BonesQty>
                - narrate "<red>You hand <npc.name> <cons:BonesQty> bones."
                - wait 1
                - chat "Thank you <player.name>. Here take this."
                - wait 1
                - narrate "<red><npc.name> gives you <gold><cons:RewardAmount><red> coins."
                - give money qty:<cons:RewardAmount>
                - ^flag player "WizardQuest:Quest2"
                - chat "<player.name>, now I will need <gray><cons:RottenFleshQty> rotten flesh<green>! Please bring it to me."
                - wait 1
                - narrate "<red> Stage 2 of 4 started."
                - ^disengage

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Wizard Quest Two":
    Requirements:
        Mode: All
        List:
        # Check if player is on stage 2 of questline and has enough rotten flesh.
        - FLAGGED PLAYER 'WizardQuest:Quest2'
        - ITEM 367 QTY:<cons:RottenFleshQty>
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - chat "Great! Seems like you've got what I need."
                    - narrate "<red>Right click <npc.name> to hand him the <gray>Rotten Flesh."

            click trigger:
                script:
                # take flesh, reward player and flag stage 3 of quest line.
                - ^engage now
                - ^take 'item:367' qty:<cons:RottenFleshQty>
                - narrate "<red>You hand <npc.name> <cons:RottenFleshQty> Rotten Flesh."
                - wait 1
                - chat "Thank you <player.name>. Here take this."
                - wait 1
                - narrate "<red><npc.name> gives you <gold><cons:RewardAmount><red> coins."
                - give money qty:<cons:RewardAmount>
                - ^flag player "WizardQuest:Quest3"
                - chat "Next I need you to bring me <gray><cons:StringQty> string<green> from those disgusting hairy spiders!"
                - wait 1
                - narrate "<red> Stage 3 of 4 started."
                - ^disengage

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Wizard Quest Three":
    Requirements:
        Mode: All
        List:
        # Check if player is on stage 3 of questline and has enough string.
        - FLAGGED PLAYER 'WizardQuest:Quest3'
        - ITEM 287 QTY:<cons:StringQty>
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - chat "Great! Seems like you've got what I need."
                    - narrate "<red>Right click <npc.name> to hand him the <gray><cons:StringQty> String."

            click trigger:
                script:
                - ^engage now
                - ^take 'item:287' qty:<cons:StringQty>
                - narrate "<red>You hand <npc.name> <cons:StringQty> String."
                - wait 1
                - chat "Thank you <player.name>. Here take this."
                - wait 1
                - narrate "<red><npc.name> gives you <gold><cons:RewardAmount><red> coins."
                - give money qty:<cons:RewardAmount>
                - ^flag player "WizardQuest:Quest4"
                - chat "For the last ingredient, I need <cons:EnderPearlQty> Ender Pearl! Kill an Enderman and bring me one."
                - wait 1
                - narrate "<red> Last Stage started."
                - ^disengage

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Wizard Quest Four":
    Requirements:
        Mode: All
        List:
        - FLAGGED PLAYER 'WizardQuest:Quest4'
        - ITEM 368 QTY:<cons:EnderPearlQty>
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - chat "Great! Seems like you've got what I need."
                    - narrate "<red>Right click <npc.name> to hand over the <gray><cons:EnderPearlQty> Ender Pearl."

            click trigger:
                script:
                # Player hands NPC ender pearl/s, NPC flags completion of quest line and also offers the player a 1
                # time free voucher for changing the time or whether. Player can decide to use it now or later.
                - ^engage now
                - ^take 'item:368' qty:<cons:EnderPearlQty>
                - narrate "<red>You hand <npc.name> <cons:EnderPearlQty> Ender Pearl."
                - wait 1
                - chat "Fantastic <player.name>! Here take this."
                - wait 1
                - narrate "<red><npc.name> gives you <gold><cons:RewardAmount><red> coins."
                - give money qty:<cons:RewardAmount>
                - ^flag player "WizardQuest:Completed"
                - ^flag player "WizardVoucher:Unused"
                - chat "Now that you have handed me all the ingredients, I will combine them together!"
                - wait 1
                - narrate "<red><npc.name> mixes the ingredients together."
                - wait 5
                - narrate "<red><npc.name> then applies the mixture to his...face."
                - wait 3
                - chat "Yes! It worked perfectly. Anti-aging cream! I LOOK YOUNG AGAIN!"
                - wait 3
                - chat "Thank you <player.name>! Anyway, I promised you my services. For a small fee,<gold> <cons:ChangeTimeFee><green> coins, I can change TIME and WEATHER for you!"
                - wait 3
                - chat "Your first one is free! Do you want to give it a try now?"
                - ^narrate "<red>Say:"
                - ^narrate "  <blue>Yes<blue> <gray>or<red> No"
                - ^zap 2 "script:Change Time Itself"
                - ^disengage

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Change Time Itself":
    Requirements:
        Mode: All
        List:
        # Check to see if all quests had completed and since this script is the higest priority in the list specified
        # at the top of script, it means the user will from now on only get these dialog options below. The quest line
        # has been completed and cannot be repeated.
        - FLAGGED PLAYER 'WizardQuest:Completed'
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - ^runtask "script:Wizard Check Requirements"
                    - narrate "<red>Right click <npc.name> to start TIME and WEATHER change dialog."

            click trigger:
                script:
                # When the player clicks on the NPC, it checks to see if they have a sword, if not it will start
                # the dialog asking the player what they would like to change the time or weather to.
                - ^engage now
                - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
                  else runtask "script:Change Time Itself Dialog"
                - ^disengage

            damage trigger:
                script:
                - ^runtask "script:Warning"
        2:
            chat trigger:
                'Change Weather Now':
                    Trigger: /Yes/, I would like to try changing TIME or WHEATHER now.
                    script:
                    # This 'yes' and 'no' chat trigger is used if the player decides to try changing the time
                    # or weather immediately after completing the quest line.
                    - engage now
                    - runtask "script:Change Time Itself Dialog"
                    - disengage
                'Do Not Change Weather Now':
                    Trigger: /No/, I do not wish to use my free TIME or WHEATHER change voucher right now.
                    script:
                    - chat "Very well, come back to me once you change your mind!"
                    - ^zap 1 "script:Change Time Itself"

            click trigger:
                script:
                - ^engage now
                - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
                  else runtask "script:Change Time Itself Dialog"
                - ^disengage

            proximity trigger:
                exit:
                    script:
                    - ^zap 3 "script:Wizard Quest Line"

            damage trigger:
                script:
                - ^runtask "script:Warning"

        3:
            chat trigger:
                'Day Time':
                    Trigger: I would like it to be /day/time please.
                    script:
                    # If player says 'day' it will run the relevant script for changing the time to day. The same
                    # goes for the other chat options below. If the player doesn't have enough money, run the
                    # 'Wizard Not Enough Money' script which will display a simple message.
                    - engage now
                    - if <player.money> >= <cons:ChangeTimeFee> runtask "script:Change to Day"
                      else runtask "script:Wizard Not Enough Money"
                    - disengage
                'Night Time':
                    Trigger: I would like it to be /night/time please.
                    script:
                    - engage now
                    - if <player.money> >= <cons:ChangeTimeFee> runtask "script:Change to Night"
                      else runtask "script:Wizard Not Enough Money"
                    - disengage
                'Sunshine':
                    Trigger: I would like it to be /sunny/ please.
                    script:
                    - engage now
                    - if <player.money> >= <cons:ChangeTimeFee> runtask "script:Change to Sunshine"
                      else runtask "script:Wizard Not Enough Money"
                    - disengage
                'Storm':
                    Trigger: I would like it to be /stormy/ please.
                    script:
                    - engage now
                    - if <player.money> >= <cons:ChangeTimeFee> runtask "script:Change to Storm"
                      else runtask "script:Wizard Not Enough Money"
                    - disengage
                'Rain':
                    Trigger: I would like it to be /rainy/ please.
                    script:
                    - engage now
                    - if <player.money> >= <cons:ChangeTimeFee> runtask "script:Change to Rain"
                      else runtask "script:Wizard Not Enough Money"
                    - disengage
                'No Weather Change':
                    Trigger: /Nevermind/ but thank you.
                    script:
                    - chat "No problem, come see me when you change your mind."

            click trigger:
                script:
                - ^engage now
                - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
                  else runtask "script:Change Time Itself Dialog"
                - ^disengage

            proximity trigger:
                exit:
                    script:
                    - ^zap 1 "script:Change Time Itself"

            damage trigger:
                script:
                - ^runtask "script:Warning"

"Change Time Itself Dialog":
    type: task

    script:
    # This presents the user will a list of options to change the time and weather. It then 'zaps' them to
    # step 3 in the 'Change Time Itself' script where it's expecting one of the values given below.
    - ^engage now
    - chat "What would you like to change the TIME or WEATHER to?"
    - wait 1
    - ^narrate "<red>Say:"
    - ^narrate "  <blue>Day<blue>     - <gold><cons:ChangeTimeFee> coins"
    - ^narrate "  <blue>Night<blue>    - <gold><cons:ChangeTimeFee> coins"
    - ^narrate "  <green>Sunny<blue>  - <gold><cons:ChangeTimeFee> coins"
    - ^narrate "  <green>Rainy<blue>   - <gold><cons:ChangeTimeFee> coins"
    - ^narrate "  <green>Stormy<blue>  - <gold><cons:ChangeTimeFee> coins"
    - ^narrate "<red>'<blue>Nevermind<red>' if you're not interested in changing the weather."
    - ^disengage
    - ^zap 3 "script:Change Time Itself" 

"Wizard Not Enough Money":
    type: task

    script:
    # This is the script that runs if you don't have enough money to change the time.
    # It then 'zaps' the player back to the first step in the script called 'Change Time Itself'.
    - narrate "<red>Unfortunately you do not have enough money."
    - zap 1 "script:Change Time Itself"

"Change to Day":
    type: task

    script:
    # This is the actual script that 'uses' up the voucher and doesn't charge the player for
    # the first time they use the service, that then executes the command to the server to change
    # time to day, then play a sound effect and announce server wide that the NPC has changed
    # it to day. Zap the player back to the first step in the 'Change Time Itself' script.
    - chat "Day it is!"
    - ^if <flag.p:WizardVoucher> == 'Used' take money qty:<cons:ChangeTimeFee>
      else narrate "<red>You use your <gold>'One Free Time or Weather Change'<red> voucher."
    - ^if <flag.p:WizardVoucher> == 'Used' narrate "<red>You pay <npc.name> <gold><cons:ChangeTimeFee><green> coins."
    - ^flag player "WizardVoucher:Used"
    - wait 2
    - execute as_npc "time set day"
    - ^playsound sound:AMBIENCE_CAVE location:<player.location>
    - announce "<dark_purple><npc.name> cast a mystical spell to change time to DAY!"
    - zap 1 "script:Change Time Itself"

"Change to Night":
    type: task

    script:
    - chat "You know the monsters come out at night, right? Very well. Night it is!"
    - ^if <flag.p:WizardVoucher> == 'Used' take money qty:<cons:ChangeTimeFee>
      else narrate "<red>You use your <gold>'One Free Time or Weather Change'<red> voucher."
    - ^if <flag.p:WizardVoucher> == 'Used' narrate "<red>You pay <npc.name> <gold><cons:ChangeTimeFee><green> coins."
    - ^flag player "WizardVoucher:Used"
    - wait 2
    - execute as_npc "time set night"
    - ^playsound sound:AMBIENCE_CAVE location:<player.location>
    - announce "<dark_purple><npc.name> casts a mystical spell to change time to NIGHT!"
    - zap 1 "script:Change Time Itself"

"Change to Sunshine":
    type: task

    script:
    # Same as above except the server command is slightly different, this time using 'weather' instead of 'time set'.
    - chat "Ahh, nothing quite like the warmth of the sun... to fry zombies! Haha."
    - ^if <flag.p:WizardVoucher> == 'Used' take money qty:<cons:ChangeTimeFee>
      else narrate "<red>You use your <gold>'One Free Time or Weather Change'<red> voucher."
    - ^if <flag.p:WizardVoucher> == 'Used' narrate "<red>You pay <npc.name> <gold><cons:ChangeTimeFee><green> coins."
    - ^flag player "WizardVoucher:Used"
    - wait 2
    - execute as_npc "weather clear"
    - ^playsound sound:AMBIENCE_CAVE location:<player.location>
    - announce "<dark_purple><npc.name> casts a mystical spell to change the weather to SUNSHINE!"
    - zap 1 "script:Change Time Itself"

"Change to Rain":
    type: task

    script:
    - chat "I'm singing in the rain, I'm just siiiingi... oh sorry. Yes, make it rain!"
    - ^if <flag.p:WizardVoucher> == 'Used' take money qty:<cons:ChangeTimeFee>
      else narrate "<red>You use your <gold>'One Free Time or Weather Change'<red> voucher."
    - ^if <flag.p:WizardVoucher> == 'Used' narrate "<red>You pay <npc.name> <gold><cons:ChangeTimeFee><green> coins."
    - ^flag player "WizardVoucher:Used"
    - wait 2
    - execute as_npc "weather rain"
    - ^playsound sound:AMBIENCE_CAVE location:<player.location>
    - announce "<dark_purple><npc.name> casts a mystical spell causing it to RAIN!"
    - zap 1 "script:Change Time Itself"

"Change to Storm":
    type: task

    script:
    # This is where those lightning bolts will hit the locations you set at the top of the script.
    - chat "Thunderbolts of lightning very very frightening! I bring you a STORM!"
    - ^if <flag.p:WizardVoucher> == 'Used' take money qty:<cons:ChangeTimeFee>
      else narrate "<red>You use your <gold>'One Free Time or Weather Change'<red> voucher."
    - ^if <flag.p:WizardVoucher> == 'Used' narrate "<red>You pay <npc.name> <gold><cons:ChangeTimeFee><green> coins."
    - ^flag player "WizardVoucher:Used"
    - wait 2
    - strike no_damage "location:<cons:Lightning Bolt One Location>"
    - strike no_damage "location:<cons:Lightning Bolt Two Location>"
    - strike no_damage "location:<cons:Lightning Bolt Three Location>"
    - strike no_damage "location:<cons:Lightning Bolt Four Location>"
    - execute as_npc "weather thunder"
    - ^playsound sound:AMBIENCE_CAVE location:<player.location>
    - announce "<dark_purple><npc.name> casts a mystical spell to create a STORM!"
    - zap 1 "script:Change Time Itself"

"Wizard Quest Status":
    Requirements:
        Mode: All
        List:
        # This is the lowest priority script and basically runs as a last resort if none of the other scripts have
        # had their requirements met. This script provides the player with feed back on what they still need to do
        # to succesfully complete the other scripts. It'll do so on the player entering proximity or by them clicking
        # the NPC.
        - -FLAGGED PLAYER 'WizardQuest:Completed'
    type: interact

    steps:
        1:
            proximity trigger:
                entry:
                    script:
                    - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
                      else if <flag.p:WizardQuest> == 'Quest1' chat "Hi <player.name>, I'm still eagerly waiting for the <gold><cons:BonesQty><green> bones."
                      else if <flag.p:WizardQuest> == 'Quest2' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:RottenFleshQty> rotten flesh<green>."
                      else if <flag.p:WizardQuest> == 'Quest3' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:StringQty> String."
                      else if <flag.p:WizardQuest> == 'Quest4' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:EnderPearlQty> Ender Pearl."

            click trigger:
                script:
                - if 267|268|272|276 contains <player.item_in_hand.id> runtask "script:Deny Interaction"
                  else if <flag.p:WizardQuest> == 'Quest1' chat "Hi <player.name>, I'm still eagerly waiting for the <gold><cons:BonesQty><green> bones."
                  else if <flag.p:WizardQuest> == 'Quest2' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:RottenFleshQty> rotten flesh<green>."
                  else if <flag.p:WizardQuest> == 'Quest3' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:StringQty> String."
                  else if <flag.p:WizardQuest> == 'Quest4' chat "Hi <player.name>, I'm still eagerly waiting for the <gray><cons:EnderPearlQty> Ender Pearl."