Paste #22046: big ass script

Date: 2015/10/31 17:11:48 UTC-07: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
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821


#/ex note cu@x,y,z,world|x,y,z,world as:CUBOIDNAME
#on player enters CUBOIDNAME:
#- do stuff
DeathAssign:
    type: assignment 
    interact scripts:
    - 10 DeathQuest 
InterrogationAssign:
    type: assignment 
    interact scripts:
    - 10 Interrogation
chatformat:
    type: format
    format: "<&8><npc.name>: <&7><text>"
tonpc:
    type: format
    format: "<&8>You -> <npc.name>: <&7><text>"
questtip:
    type: format
    format: "<italic><&3><text>"
DeathQuest:
    type: interact 
    steps: 
        1:
            click trigger:
                script:
                - if <player.has_flag[inChat]> queue clear
                - flag player inChat
                - narrate format:chatformat "<player.name>, come here a moment. I need to speak with you."
                - wait 4
                - narrate format:chatformat "There have been some weird things happening lately."
                - wait 4
                - narrate format:chatformat "Let me take you there to investigate.."
                - wait 2
                - narrate "Would you like to be teleported to the Halloween Event? [Yes/No]"
                - flag player inChat:!
            chat trigger:
                1:
                    trigger: /Yes/, take me there.
                    script:
                    - if <player.has_flag[inChat]> queue clear
                    - flag player inChat
                    - flag player halloweenOrder:|:<li@Zexx|MOSQ|Campolar|Plaid|Kai|Vault.random[9999]>
                    - wait 1
                    - narrate format:chatformat "Here we go."
                    - cast spell:confusion duration:8 power:5
                    - cast blindness power:3 duration:5
                    - wait 2
                    - teleport <player> <l@639,6,224,SEASONAL.with_pose[-6,134]>
                    - wait 2
                    - narrate format:chatformat "Phew, it worked. You're now in Duat, the land of the dead."
                    - wait 3
                    - narrate format:chatformat "Speak with me again and I'll debrief you on the situation."
                    - wait 3
                    - narrate format:questtip "Please note! This event is not as easy as all the previous quests, it will require puzzle solving, note taking, and lots of brainpower! Please be prepared to take some time for this event as some key parts may not be repeatable!"
                    - wait 5
                    - flag player inChat:!
                    - zap step:2
        2: 
            click trigger: 
                script:
                - if <player.has_flag[inChat]> queue clear
                - flag player inChat
                - narrate format:chatformat "Ah, yes I see you're ready." 
                - wait 3
                - narrate format:chatformat "Something horrible has happened, there has been a murder."
                - wait 4
                - narrate format:chatformat "I have come to collect Dylan's soul, but I must find out who caused this atrocity."
                - wait 4
                - narrate format:chatformat "Now listen carefully."
                - wait 3
                - narrate format:chatformat "Follow the path and you will come to a mansion."
                - wait 4
                - narrate format:chatformat "There are only six people that live in that house, and it has to be one of them."
                - wait 5
                - narrate format:chatformat "I need you to interrogate each one of them and figure out who the criminal is."
                - wait 5
                - narrate format:chatformat "Return to me once you've narrowed down your options or figured it out."
                - flag player inInterrogationMode:|:<li@0|0|0|0|0|0>
                - flag player inChat:!
                - zap step:3
        3:
            click trigger:
                script:
                - if <player.has_flag[inChat]> queue clear
                - flag player inChat
                - narrate format:chatformat "What have you found?"
                - wait 2
                - narrate format:tonpc "Actually, I don't think I've talked to everyone yet."
                - wait 3
                - narrate format:tonpc "I will be back."
                - wait 2
                - narrate format:questtip "You still have to speak to all the suspects. Come back to Death when you've done so."
                - flag player inChat:!
        4:
            click trigger:
                script:
                - if <player.has_flag[inChat]> queue clear
                - flag player inChat
                - narrate format:chatformat "Greetings, <player.name>. What have you found?"
                - wait 3
                - narrate format:tonpc "Well, I think I've narrowed it down."
                - wait 4
                - narrate format:chatformat "Wonderful!"
                - wait 2
                - narrate format:chatformat "There's one thing I forgot to mention, it might lead you to some clues around."
                - wait 4
                - narrate format:tonpc "What is it?"
                - wait 3
                - narrate format:chatformat "When I was transporting Dylan to the afterlife, he told me these three things."
                - wait 4
                - narrate format:chatformat "1. <red><&dq>I never did care for wine.<&dq>"
                - wait 3
                - narrate format:chatformat "2. <red><&dq>Dancing was my favorite.<&dq>"
                - wait 3
                - narrate format:chatformat "3. <red><&dq>I thought I'd heard something upstairs..<&dq>"
                - wait 5
                - narrate format:chatformat "He also gave me this rock, I have no idea why. Take it."
                - give i@rock
                - wait 5
                - narrate format:chatformat "Go, <player.name>. I need you to figure out what these mean."
                - wait 3
                - narrate format:questtip "You'd better head back to the house and figure out what Dylan meant."
                - narrate format:questtip "<&c>Note: You do not have to complete this step, although the rewards are astronomically higher for solving the riddles (Ranges from $25k-$200k based on who gets it first)."
                - flag player clueMode
                - flag player inChat:!
                - zap step:5
        5:
            click trigger:
                script:
                - if <player.has_flag[inChat]> queue clear
                - narrate format:chatformat "You're back, have you come up with anything?"
                - wait 2
                - narrate "Are you ready to solve the murder? [Yes/No]"
            chat trigger:
                1:
                    trigger: /Yes/, I've got it.
                    script:
                    - narrate format:chatformat "Wonderful! Who do you think it was?"
                    - wait 2
                    - narrate "Enter in chat your choice. [Zexx, Plaid, Campolar, Kai, Vault, MOSQ]"
                2:
                    trigger: /No/, I'm still investigating.
                    script:
                    - narrate format:chatformat "Alright, return when you think you've got it."
                    - queue clear
                3:
                    trigger: /Zexx/ was the killer.
                    script:
                    - if <player.has_flag[inChat]> queue clear
                    - flag player inChat
                    - if <player.flag[halloweenKiller]> == "Zexx" {
                        - narrate format:chatformat "You did it! Congratulations!"
                        - wait 3
                        - narrate format:chatformat "I'm sure Dylan is forever grateful for your doing."
                        - if <global.flag[CashPile]> > 25000 {
                            - give money quantity:<global.flag[CashPile]>
                            - narrate "You received $<global.flag[CashPile]>!"
                            - flag global CashPile:/:2
                        } else if <global.flag[CashPile]> == 25000 && <player.has_flag[completedRiddles]>{
                            - give money quantity:25000
                            - narrate "You received $25,000!"
                        } else if !<player.has_flag[completedRiddles]> {
                            - give money quantity:10000
                            - narrate "You received $10,000!"
                            - wait 3
                            - narrate format:chatformat "Although you solved it, I don't think you used the riddles. Had you used the riddles to solve it, you would've received much more money!"
                            - wait 5
                        }
                        - narrate "Tune in for more events with Death."
                        - give i@credits
                        - flag player inChat:!
                        - flag player clueMode:!
                        - zap step:6
                    } else {
                        - narrate format:chatformat "Oh no! I don't think that's right!"
                        - wait 3
                        - narrate format:chatformat "It wasn't Zexx, it was <player.flag[halloweenKiller]>.."
                        - wait 4
                        - narrate format:chatformat "I was able to unscramble the riddles he gave me while you were gone."
                        - wait 3
                        - narrate format:chatformat "I was curious as to whether or not you were worthy of solving the puzzle."
                        - wait 5
                        - narrate format:chatformat "For your efforts you still receive $5,000 and some special items."
                        - wait 4
                        - narrate format:chatformat "If you think you want to make up for your failure, you can come back sometime and help me out around here!"
                        - wait 5
                        - narrate format:questtip "Coming Soon: Assisted Death"
                        - give money quantity:5000
                        - narrate "You received $5,000!"
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    }
                4:
                    trigger: /Plaid/ was the killer.
                    script:
                    - if <player.has_flag[inChat]> queue clear
                    - flag player inChat
                    - if <player.flag[halloweenKiller]> == "Plaid" {
                        - narrate format:chatformat "You did it! Congratulations!"
                        - wait 3
                        - narrate format:chatformat "I'm sure Dylan is forever grateful for your doing."
                        - if <global.flag[CashPile]> > 25000 {
                            - give money quantity:<global.flag[CashPile]>
                            - narrate "You received $<global.flag[CashPile]>!"
                            - flag global CashPile:/:2
                        } else if <global.flag[CashPile]> == 25000 && <player.has_flag[completedRiddles]>{
                            - give money quantity:25000
                            - narrate "You received $25,000!"
                        } else if !<player.has_flag[completedRiddles]> {
                            - give money quantity:10000
                            - narrate "You received $10,000!"
                            - wait 3
                            - narrate format:chatformat "Although you solved it, I don't think you used the riddles. Had you used the riddles to solve it, you would've received much more money!"
                            - wait 5
                        }
                        - narrate "Tune in for more events with Death."
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    } else {
                        - narrate format:chatformat "Oh no! I don't think that's right!"
                        - wait 3
                        - narrate format:chatformat "It wasn't Plaid, it was <player.flag[halloweenKiller]>.."
                        - wait 4
                        - narrate format:chatformat "I was able to unscramble the riddles he gave me while you were gone."
                        - wait 3
                        - narrate format:chatformat "I was curious as to whether or not you were worthy of solving the puzzle."
                        - wait 5
                        - narrate format:chatformat "For your efforts you still receive $5,000 and some special items."
                        - wait 4
                        - narrate format:chatformat "If you think you want to make up for your failure, you can come back sometime and help me out around here!"
                        - wait 5
                        - narrate format:questtip "Coming Soon: Assisted Death"
                        - give money quantity:5000
                        - narrate "You received $5,000!"
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    }
                5:
                    trigger: /Kai/ was the killer.
                    script:
                    - if <player.has_flag[inChat]> queue clear
                    - flag player inChat
                    - if <player.flag[halloweenKiller]> == "Kai" {
                        - narrate format:chatformat "You did it! Congratulations!"
                        - wait 3
                        - narrate format:chatformat "I'm sure Dylan is forever grateful for your doing."
                        - if <global.flag[CashPile]> > 25000 {
                            - give money quantity:<global.flag[CashPile]>
                            - narrate "You received $<global.flag[CashPile]>!"
                            - flag global CashPile:/:2
                        } else if <global.flag[CashPile]> == 25000 && <player.has_flag[completedRiddles]>{
                            - give money quantity:25000
                            - narrate "You received $25,000!"
                        } else if !<player.has_flag[completedRiddles]> {
                            - give money quantity:10000
                            - narrate "You received $10,000!"
                            - wait 3
                            - narrate format:chatformat "Although you solved it, I don't think you used the riddles. Had you used the riddles to solve it, you would've received much more money!"
                            - wait 5
                        }
                        - narrate "Tune in for more events with Death."
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    } else {
                        - narrate format:chatformat "Oh no! I don't think that's right!"
                        - wait 3
                        - narrate format:chatformat "It wasn't Kai, it was <player.flag[halloweenKiller]>.."
                        - wait 4
                        - narrate format:chatformat "I was able to unscramble the riddles he gave me while you were gone."
                        - wait 3
                        - narrate format:chatformat "I was curious as to whether or not you were worthy of solving the puzzle."
                        - wait 5
                        - narrate format:chatformat "For your efforts you still receive $5,000 and some special items."
                        - wait 4
                        - narrate format:chatformat "If you think you want to make up for your failure, you can come back sometime and help me out around here!"
                        - wait 5
                        - narrate format:questtip "Coming Soon: Assisted Death"
                        - give money quantity:5000
                        - narrate "You received $5,000!"
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    }
                6:
                    trigger: /campolar/ was the killer.
                    script:
                    - if <player.has_flag[inChat]> queue clear
                    - flag player inChat
                    - if <player.flag[halloweenKiller]> == "Campolar" {
                        - narrate format:chatformat "You did it! Congratulations!"
                        - wait 3
                        - narrate format:chatformat "I'm sure Dylan is forever grateful for your doing."
                        - if <global.flag[CashPile]> > 25000 {
                            - give money quantity:<global.flag[CashPile]>
                            - narrate "You received $<global.flag[CashPile]>!"
                            - flag global CashPile:/:2
                        } else if <global.flag[CashPile]> == 25000 && <player.has_flag[completedRiddles]>{
                            - give money quantity:25000
                            - narrate "You received $25,000!"
                        } else if !<player.has_flag[completedRiddles]> {
                            - give money quantity:10000
                            - narrate "You received $10,000!"
                            - wait 3
                            - narrate format:chatformat "Although you solved it, I don't think you used the riddles. Had you used the riddles to solve it, you would've received much more money!"
                            - wait 5
                        }
                        - narrate "Tune in for more events with Death."
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    } else {
                        - narrate format:chatformat "Oh no! I don't think that's right!"
                        - wait 3
                        - narrate format:chatformat "It wasn't campolar, it was <player.flag[halloweenKiller]>.."
                        - wait 4
                        - narrate format:chatformat "I was able to unscramble the riddles he gave me while you were gone."
                        - wait 3
                        - narrate format:chatformat "I was curious as to whether or not you were worthy of solving the puzzle."
                        - wait 5
                        - narrate format:chatformat "For your efforts you still receive $5,000 and some special items."
                        - wait 4
                        - narrate format:chatformat "If you think you want to make up for your failure, you can come back sometime and help me out around here!"
                        - wait 5
                        - narrate format:questtip "Coming Soon: Assisted Death"
                        - give money quantity:5000
                        - narrate "You received $5,000!"
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    }
                7:
                    trigger: /Vault/ was the killer.
                    script:
                    - if <player.has_flag[inChat]> queue clear
                    - flag player inChat
                    - if <player.flag[halloweenKiller]> == "Vault" {
                        - narrate format:chatformat "You did it! Congratulations!"
                        - wait 3
                        - narrate format:chatformat "I'm sure Dylan is forever grateful for your doing."
                        - if <global.flag[CashPile]> > 25000 {
                            - give money quantity:<global.flag[CashPile]>
                            - narrate "You received $<global.flag[CashPile]>!"
                            - flag global CashPile:/:2
                        } else if <global.flag[CashPile]> == 25000 && <player.has_flag[completedRiddles]>{
                            - give money quantity:25000
                            - narrate "You received $25,000!"
                        } else if !<player.has_flag[completedRiddles]> {
                            - give money quantity:10000
                            - narrate "You received $10,000!"
                            - wait 3
                            - narrate format:chatformat "Although you solved it, I don't think you used the riddles. Had you used the riddles to solve it, you would've received much more money!"
                            - wait 5
                        }
                        - narrate "Tune in for more events with Death."
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    } else {
                        - narrate format:chatformat "Oh no! I don't think that's right!"
                        - wait 3
                        - narrate format:chatformat "It wasn't Vault, it was <player.flag[halloweenKiller]>.."
                        - wait 4
                        - narrate format:chatformat "I was able to unscramble the riddles he gave me while you were gone."
                        - wait 3
                        - narrate format:chatformat "I was curious as to whether or not you were worthy of solving the puzzle."
                        - wait 5
                        - narrate format:chatformat "For your efforts you still receive $5,000 and some special items."
                        - wait 4
                        - narrate format:chatformat "If you think you want to make up for your failure, you can come back sometime and help me out around here!"
                        - wait 5
                        - narrate format:questtip "Coming Soon: Assisted Death"
                        - give money quantity:5000
                        - narrate "You received $5,000!"
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    }
                8:
                    trigger: /MOSQ/ was the killer.
                    script:
                    - if <player.has_flag[inChat]> queue clear
                    - flag player inChat
                    - if <player.flag[halloweenKiller]> == "MOSQ" {
                        - narrate format:chatformat "You did it! Congratulations!"
                        - wait 3
                        - narrate format:chatformat "I'm sure Dylan is forever grateful for your doing."
                        - if <global.flag[CashPile]> > 25000 {
                            - give money quantity:<global.flag[CashPile]>
                            - narrate "You received $<global.flag[CashPile]>!"
                            - flag global CashPile:/:2
                        } else if <global.flag[CashPile]> == 25000 && <player.has_flag[completedRiddles]>{
                            - give money quantity:25000
                            - narrate "You received $25,000!"
                        } else if !<player.has_flag[completedRiddles]> {
                            - give money quantity:10000
                            - narrate "You received $10,000!"
                            - wait 3
                            - narrate format:chatformat "Although you solved it, I don't think you used the riddles. Had you used the riddles to solve it, you would've received much more money!"
                            - wait 5
                        }
                        - narrate "Tune in for more events with Death."
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    } else {
                        - narrate format:chatformat "Oh no! I don't think that's right!"
                        - wait 3
                        - narrate format:chatformat "It wasn't MOSQ, it was <player.flag[halloweenKiller]>.."
                        - wait 4
                        - narrate format:chatformat "I was able to unscramble the riddles he gave me while you were gone."
                        - wait 3
                        - narrate format:chatformat "I was curious as to whether or not you were worthy of solving the puzzle."
                        - wait 5
                        - narrate format:chatformat "For your efforts you still receive $5,000 and some special items."
                        - wait 4
                        - narrate format:chatformat "If you think you want to make up for your failure, you can come back sometime and help me out around here!"
                        - wait 5
                        - narrate format:questtip "Coming Soon: Assisted Death"
                        - give money quantity:5000
                        - narrate "You received $5,000!"
                        - flag player inChat:!
                        - flag player clueMode:!
                        - give i@credits
                        - zap step:6
                    }
        6:
            click trigger:
                script:
                - if <player.has_flag[inChat]> queue clear
                - flag player inChat
                - narrate format:chatformat "Hi, <player.name>."
                - wait 2
                - narrate format:chatformat "What can I do for you?"
                - wait 4
                - narrate format:chatformat "At the moment you've done all you can from me."
                - wait 2
                - narrate format:questtip "You've completed Death's quest, please wait until a new one comes out to continue."
                - flag player inChat:!
AfterMathAssign:
    type: assignment
    interact scripts:
    - 10 AfterMath
AfterMath:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if !<player.has_flag[clueMode]> || <player.has_flag[inChat]> queue clear
                - flag player inChat
                - narrate format:chatformat "Oh my goodness!"
                - wait 3
                - narrate format:chatformat "It cannot be!"
                - wait 2
                - narrate format:chatformat "Someone has gotten my plea for help!"
                - wait 5
                - narrate format:chatformat "Thank you so much <player.name> for finding me."
                - wait 3
                - narrate format:tonpc "What happened?!"
                - wait 3
                - narrate format:chatformat "It's a long story really.."
                - wait 5
                - narrate format:chatformat "You see, I have been having troubles with <player.flag[halloweenKiller]> lately.."
                - wait 4
                - narrate format:chatformat "We haven't been getting along lately."
                - wait 3
                - narrate format:chatformat "I accidentally tripped them in the hallway yesterday, and that must've been the last straw."
                - wait 4
                - narrate format:chatformat "We have had troubles for at least three months now and I am sort of glad that they did it."
                - wait 5
                - narrate format:chatformat "Now I can rest in peace in Nimbus."
                - wait 3
                - narrate format:chatformat "This is the old spawn of the server, from back in the day."
                - wait 4
                - narrate format:chatformat "It's my own paradise, my slice of heaven in the sky."
                - wait 5
                - narrate format:chatformat "I'm glad that you were able to decode my message."
                - wait 4
                - narrate format:chatformat "Now that you know who the killer is, you can help Death to serve justice."
                - wait 5
                - narrate format:chatformat "But keep my location a secret, as only those worthy of solving the puzzle deserve to know of my new location."
                - wait 6
                - narrate format:chatformat "Go, be the hero <player.name>."
                - wait 3
                - narrate format:questtip "You've hit the jackpot! Go talk to Death to give him the news!"
                - teleport <player> <l@207,208,157,world.with_pose[0,270]>
                - flag player inChat:!
                - flag player completedRiddles
                - flag player clueMode:!
Interrogation:
    type: interact 
    steps: 
        1:
            click trigger:
                script:
                - if !<player.has_flag[inInterrogationMode]> {
                    - RANDOM {
                        - narrate format:chatformat "What are you doing? I have nothing for you."
                        - narrate format:chatformat "Can I help you?"
                        - narrate format:chatformat "Who are you and why are you here?"
                        - narrate format:chatformat "I didn't know they let visitors here."
                        - narrate format:chatformat "Did you hear about the murder? Such a tragedy."
                        - narrate format:chatformat "*grumbles*"
                    }
                }
                - if <player.has_flag[inChat]> queue clear
                - flag player inChat
                - narrate format:tonpc "I have some questions for you, <npc.name>."
                - if <player.flag[halloweenOrder].get[1]> == <npc.name> {
                    - if <player.flag[inInterrogationMode].get[1]> == "1" {
                        - narrate format:chatformat "What? I've already helped you."
                        - narrate format:questtip "You've already bugged <npc.name> enough. You'd best be on your way."
                        - flag player inChat:!
                        - queue clear
                    }
                    - wait 3
                    - narrate format:chatformat "Huh? Oh hello, what is it?"
                    - wait 4
                    - narrate format:tonpc "Where were you last night?"
                    - wait 3
                    - narrate format:chatformat "Well last night I was in the library catching up on my studies with <player.flag[halloweenOrder].get[3]>."
                    - wait 5
                    - narrate format:chatformat "We were so deep in our books we didn't find out about what happened until this morning."
                    - wait 4
                    - narrate format:tonpc "And did you see or notice anyone in the house last night?"
                    - wait 5
                    - narrate format:chatformat "I was pretty focused on my work."
                    - wait 3
                    - narrate format:chatformat "I don't recall seeing anyone wandering about, sorry."
                    - flag player inInterrogationMode[1]:1
                    - wait 3
                    - narrate format:questtip "You feel like you've gained enough information from <npc.name>, you'd best move on."
                    - flag player inChat:!
                } else if <player.flag[halloweenOrder].get[2]> == <npc.name> {
                    - if <player.flag[inInterrogationMode].get[2]> == "2" {
                        - narrate format:chatformat "What? I've already helped you."
                        - narrate format:questtip "You've already bugged <npc.name> enough. You'd best be on your way."
                        - flag player inChat:!
                        - queue clear
                    }
                    - wait 3
                    - narrate format:chatformat "Hey, of course."
                    - wait 4
                    - narrate format:tonpc "Where were you last night?"
                    - wait 3
                    - narrate format:chatformat "Last night? Well I was star gazing in the courtyard all night, I ended up falling asleep out there."
                    - wait 4
                    - narrate format:chatformat "It's quite peaceful, you should try it sometime."
                    - wait 4
                    - narrate format:tonpc "And did you see or notice anyone in the house last night?"
                    - wait 5
                    - narrate format:chatformat "Yeah, when I was heading outside I saw <player.flag[halloweenOrder].get[1]> and <player.flag[halloweenOrder].get[3]> with their heads in some books."
                    - wait 3
                    - narrate format:tonpc "Okay, thank you <npc.name>."
                    - flag player inInterrogationMode[2]:2
                    - wait 3
                    - narrate format:questtip "You feel like you've gained enough information from <npc.name>, you'd best move on."
                    - flag player inChat:!
                } else if <player.flag[halloweenOrder].get[3]> == <npc.name> {
                    - if <player.flag[inInterrogationMode].get[3]> == "3" {
                        - narrate format:chatformat "What? I've already helped you."
                        - narrate format:questtip "You've already bugged <npc.name> enough. You'd best be on your way."
                        - flag player inChat:!
                        - queue clear
                    }
                    - wait 3
                    - narrate format:chatformat "Oh yes hello, certainly."
                    - wait 4
                    - narrate format:tonpc "Where were you last night?"
                    - wait 3
                    - narrate format:chatformat "Well you see, I have missed a few days of class so I was in the library catching up on my work with <player.flag[halloweenOrder].get[1]>."
                    - wait 5
                    - narrate format:chatformat "Why do you ask?"
                    - wait 3
                    - narrate format:tonpc "I was sent to investigate."
                    - wait 3
                    - narrate format:chatformat "Ah, okay. Anything else?"
                    - wait 4
                    - narrate format:tonpc "Yes, did you see or notice anyone in the house last night?"
                    - wait 5
                    - narrate format:chatformat "I do recall seeing <player.flag[halloweenOrder].get[2]> walk past the library looking suspicious.."
                    - wait 3
                    - narrate format:chatformat "Then again, they're always tinkering with something or wandering about."
                    - wait 4
                    - narrate format:chatformat "Oh! I also saw <player.flag[halloweenOrder].get[6]> come out of the mine."
                    - wait 5
                    - narrate format:chatformat "Wow, I really should've been more focused on my work."
                    - flag player inInterrogationMode[3]:3
                    - wait 3
                    - narrate format:questtip "You feel like you've gained enough information from <npc.name>, you'd best move on."
                    - flag player inChat:!
                } else if <player.flag[halloweenOrder].get[4]> == <npc.name> {
                    - if <player.flag[inInterrogationMode].get[4]> == "4" {
                        - narrate format:chatformat "What? I've already helped you."
                        - narrate format:questtip "You've already bugged <npc.name> enough. You'd best be on your way."
                        - flag player inChat:!
                        - queue clear
                    }
                    - wait 3
                    - narrate format:chatformat "What can I do for you?"
                    - wait 4
                    - narrate format:tonpc "I'm investigating the murder, where were you last night?"
                    - wait 3
                    - narrate format:chatformat "Oh um, I was in bed all day."
                    - wait 4
                    - narrate format:chatformat "I was feeling ill and didn't leave my room too much."
                    - wait 4
                    - narrate format:chatformat "I heard about what happened to Dylan, what a horrible thing. I really liked him."
                    - wait 5
                    - narrate format:tonpc "Yes, it is. Did you see or notice anyone in the house last night?"
                    - wait 5
                    - narrate format:chatformat "Well I was asleep all night, so no I did not."
                    - wait 3
                    - narrate format:tonpc "Okay, thank you <npc.name>."
                    - wait 3
                    - narrate format:chatformat "I hope you catch the one who did it, justice is due."
                    - flag player inInterrogationMode[4]:4
                    - wait 4
                    - narrate format:questtip "You feel like you've gained enough information from <npc.name>, you'd best move on."
                    - flag player inChat:!
                } else if <player.flag[halloweenOrder].get[5]> == <npc.name> {
                    - if <player.flag[inInterrogationMode].get[5]> == "5" {
                        - narrate format:chatformat "What? I've already helped you."
                        - narrate format:questtip "You've already bugged <npc.name> enough. You'd best be on your way."
                        - flag player inChat:!
                        - queue clear
                    }
                    - wait 3
                    - narrate format:chatformat "What is it? I am busy."
                    - wait 4
                    - narrate format:tonpc "I'm looking into the murder, where were you last night?"
                    - wait 3
                    - narrate format:chatformat "I went to town to meet some friends and have a drink."
                    - wait 5
                    - narrate format:tonpc "So you were not in the house then?"
                    - wait 5
                    - narrate format:chatformat "Correct."
                    - wait 3
                    - narrate format:tonpc "Okay, thank you <npc.name>."
                    - flag player inInterrogationMode[5]:5
                    - wait 3
                    - narrate format:questtip "You feel like you've gained enough information from <npc.name>, you'd best move on."
                    - flag player inChat:!
                } else if <player.flag[halloweenOrder].get[6]> == <npc.name> {
                    - if <player.flag[inInterrogationMode].get[6]> == "6" {
                        - narrate format:chatformat "What? I've already helped you."
                        - narrate format:questtip "You've already bugged <npc.name> enough. You'd best be on your way."
                        - flag player inChat:!
                        - queue clear
                    }
                    - wait 3
                    - narrate format:chatformat "What is wrong? Have I done something?"
                    - wait 4
                    - narrate format:tonpc "I don't know, have you? Where were you last night?"
                    - wait 3
                    - narrate format:chatformat "I was busy collecting resources in the mine."
                    - wait 4
                    - narrate format:chatformat "We've been running low here so I decided to stock up on coal for the winter."
                    - wait 5
                    - narrate format:tonpc "So you were not in the house then?"
                    - wait 5
                    - narrate format:chatformat "No, I got back late and everyone seemed to be asleep."
                    - wait 4
                    - narrate format:chatformat "Wait, no I do recall seeing a light on in the library."
                    - wait 3
                    - narrate format:tonpc "Okay, thank you <npc.name>."
                    - flag player inInterrogationMode[6]:6
                    - wait 3
                    - narrate format:questtip "You feel like you've gained enough information from <npc.name>, you'd best move on."
                    - flag player inChat:!
                } else {
                    - narrate "ERROR - REPORT TO SERVER ADMIN PLEASE"
                }
                - if !<player.flag[inInterrogationMode].contains[1|2|3|4|5|6]> queue clear
                - wait 2
                - narrate format:questtip "You've spoken with every suspect, you should head back to Death."
                - flag player halloweenKillers:|:li@<player.flag[halloweenOrder].as_list.get[2].to[5].remove[3]>
                - flag player halloweenKiller:<player.flag[halloweenKillers].get[<util.random.int[1].to[3]>]>
                - zap DeathQuest step:4
Clue1:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if !<player.has_flag[clueMode]> || <player.has_flag[inChat]> queue clear
                - flag player inChat
                - narrate format:chatformat "Wh-who is that?"
                - wait 3
                - narrate format:chatformat "<player.name>?"
                - wait 2
                - narrate format:chatformat "H-Help."
                - wait 4
                - narrate format:questtip "The mysterious apparition sends a gust of wind towards you with a piece of paper in it."
                - give i@CluePaper1 1
                - flag player inChat:!
                - zap step:2
Clue1Assign:
    type: assignment 
    interact scripts:
    - 10 Clue1
Clue2:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if !<player.has_flag[clueMode]> || <player.has_flag[inChat]> queue clear
                - flag player inChat
                - narrate format:chatformat "Who?"
                - wait 3
                - narrate format:questtip "This ghost doesn't seem like the talking type. You mysteriously find a paper at your feet."
                - wait 2
                - give i@CluePaper2 1
                - flag player inChat:!
                - zap step:2
Clue2Assign:
    type: assignment 
    interact scripts:
    - 10 Clue2
Clue3:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if !<player.has_flag[clueMode]> || <player.has_flag[inChat]> queue clear
                - narrate format:chatformat "Who goes there!"
                - wait 3
                - narrate format:chatformat "Begone!"
                - wait 4
                - narrate format:questtip "You're left feeling dazed and confused with a piece of paper."
                - wait 2
                - give i@CluePaper3 1
                - flag player inChat:!
                - zap step:2
Clue3Assign:
    type: assignment 
    interact scripts:
    - 10 Clue3
CluePaper1:
    type: item
    material: i@paper
    display name: <&4>Clue 1
    lore:
    - <&c>High in the skies,
    - <&c>my kingdom lies.
CluePaper2:
    type: item
    material: i@paper
    display name: <&4>Clue 2
    lore:
    - <&c>Not far from the center,
    - <&c>only the elite may enter.
CluePaper3:
    type: item
    material: i@paper
    display name: <&4>Clue 3
    lore:
    - <&c>After fighting crime all day,
    - <&c>here I wash all the dirt away.
rock:
    type: item
    material: i@stone
    display name: <&7>Mysterious Rock
    lore:
    - <&8>It's quite heavy..
credits:
    type: item
    material: i@diamond
    display name: <&3>Credits
    lore:
    - <&9>Built by
    - campolar
    - plaid_hoody3
    - KaiSkyfire
    - irbDylan
    - <&9>Dialogue written by
    - Porkey111
    - irbDylan
    - <&9>Coded by
    - irbDylan
ResetCommand:
    type: command
    name: ResetCommand
    description: Reset the Halloween Progress for yourself
    permission: need.dis
    usage: /resetcrap
    script:
    - if !<player.is_op||<context.server>> {
        - narrate "<red>You don't have permission."
        - queue clear
    }
    - flag player halloweenOrder:!
    - flag player inChat:!
    - flag player halloweenKillers:!
    - flag player halloweenKiller:!
    - flag player inInterrogationMode:!
    - zap Clue1 step:1
    - zap Clue2 step:1
    - zap Clue3 step:1
    - zap DeathQuest step:1
    - zap Interrogation step:1
    - flag player clueMode:!
    - flag player completedRiddles:!
    - narrate "Successfully reset."