Paste #9310: Untitled Paste

Date: 2014/09/05 18:19:54 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
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254


HandOfProphetWorldEvents:
  type: world
  events:
    on player damaged by lava:
    - if <player.inventory.contains[i@BlessingOfTheProphet]> determine cancelled
    on player right clicks with i@TaintedHolyWater:
    - take iteminhand
    - narrate "The medicine in the water heals you."
    - execute asserver "potion effect regen 1000 3 <player.name>"
    on player right clicks on iron_door:
    - if <server.flag[FidelisMilitisDoors].aslist> contains <context.location> {
        - if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == FidelisMilitis || <player.flag[HasFidelisMilitisKey]> {
            - power <context.location> duration:5s
            - playsound <player.location> sound:FIZZ
          } else {
            - narrate "<red>The door's locked. Looks like you need a key."
      }          
    on player presses button:
    - wait 1t
    - if <context.location> == <server.flag[PumpStation1]> {
        - narrate "<green>[Pump Station Console]<&co> Pump station 1 safety valve overriden for 180 seconds."
        - flag PumpStation1Actuated:true duration:180s
        - playsound <player.location> sound:PISTON_EXTEND
        - playsound <player.location> sound:AMBIENT_CAVE
      }
    - if <context.location> == <server.flag[PumpStation2]> {
        - narrate "<green>[Pump Station Console]<&co> Pump Station 2 safety valve overriden for 180 seconds."
        - flag PumpStation2Actuated:true duration:180s
        - playsound <player.location> sound:PISTON_EXTEND
        - playsound <player.location> sound:AMBIENT_CAVE
      }
    - if <context.location> == <server.flag[PumpDump]> {
        - if !<player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == HandOfTheProphet {
            - if !<player.flag[PumpStation1Actuated]> {
                - narrate "<red>Releasing pump 1 valves. Pressure levels safe."
              }
            - if !<player.flag[PumpStation2Actuated]> {
                - narrate "<red>Releasing pump 2 valves. Pressure levels safe."
              }
            - queue clear
          }
        - if !<player.flag[PumpStation2Actuated]> {
            - narrate "<red>Releasing pump 2 valves. Pressure levels safe."
            - queue clear
          }
        - if <player.flag[PumpStation2Actuated]> && <player.flag[PumpStation1Actuated]> && <player.flag[CompletedFidelisMilitisPurge]> {
            - narrate "<red>[Pipeworks Console] WARNING<&co> PUMP 1 PRESSURE UNSAFE. RELEASING PRESSURE TO SECOND LEVEL, SECTOR FOUR."
            - narrate "<red>[Pipeworks Console] WARNING<&co> PUMP 2 PRESSURE UNSAFE. RELEASING PRESSURE TO SECOND LEVEL, SECTOR FOUR."
            - run PumpSystemEffects def:<player>
            - flag CompletedFidelisMilitisPurge:true
          }
PumpSystemEffects:
  type: task
  script:
  - ^wait 1
  #define constants, can't look up sound information now.
  - define pistonSound PISTON_EXTEND
  - define waterLoop WATER
  - define watersound WATER_LOOP
  - define 
  - ^narrate "<red>[Pipeworks Console] PRESSURE EXCEEDS 10000. RELEASING."
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0.2
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0.1
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - wait 0.25
  - narrate "<red>You hear surprised screams from the level below."
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0  
  - wait 0.3
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - ^narrate "<red>[Pipeworks Console] PRESSURE EXCEEDS 7500. RELEASING."
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0.2
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0.1
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - wait 0.25  
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0  
  - wait 0.3
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - ^narrate "<red>[Pipeworks Console] PRESSURE EXCEEDS 7500. RELEASING."
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0.2
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0.1
  - wait 0.25
  - narrate "<red>A scream is abruptly silenced as someone smashes into the end of the sewer."
  - ^playsound <player.location> sound:HURT_FLESH volume:100 pitch:0.75
  - ^wait 0.1
  - ^playsound <player.location> sound:HURT_FLESH volume:100 pitch:0.73
  - ^wait 0.05
  - ^playsound <player.location> sound:HURT_FLESH volume:100 pitch:1.2
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - wait 0.25  
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0  
  - wait 0.3
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - ^narrate "<red>[Pipeworks Console] PRESSURE EXCEEDS 7500. RELEASING."
  - wait 2.5
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0.2
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0.1
  - wait 0.25
  - narrate "The screams stop. You only hear rushing water."
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - wait 0.25  
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0  
  - wait 0.3
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - ^narrate "<red>[Pipeworks Console] PRESSURE EXCEEDS 5000. RELEASING."
  - wait 5
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0.2
  - wait 0.4
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:WATER volume:100 pitch:0.1
  - wait 0.25
  - narrate "You hear someone clawing at the ceiling of the floor below."
  - ^playsound <player.location> sound:HURT_FLESH volume:100 pitch:0.75
  - ^wait 0.1
  - ^playsound <player.location> sound:HURT_FLESH volume:100 pitch:0.73
  - ^wait 0.2
  - ^playsound <player.location> sound:HURT_FLESH volume:100 pitch:1.2
   - ^playsound <player.location> sound:WOOD_CLICK volume:100 pitch:0.75
  - ^wait 0.1
  - ^playsound <player.location> sound:WOOD_CLICK volume:100 pitch:0.73
  - ^wait 0.43
  - ^playsound <player.location> sound:WOOD_CLICK volume:100 pitch:1.2
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^playsound <player.location> sound:SPLASH volume:100 pitch:0.75
  - ^wait 0.1
  - ^playsound <player.location> sound:SPLASH volume:100 pitch:0.73
  - ^wait 0.2
  - ^playsound <player.location> sound:SPLASH volume:100 pitch:1.2
   - ^playsound <player.location> sound:DIG_GRAVEL volume:100 pitch:0.75
  - ^wait 0.1
  - ^playsound <player.location> sound:DIG_GRAVEL volume:100 pitch:0.73
  - ^wait 0.2
  - ^playsound <player.location> sound:DIG_GRAVEL volume:100 pitch:1.2
  - wait 2
  - ^playsound <player.location> sound:HURT_FLESH volume:100 pitch:0.75
  - ^wait 0.6
  - ^playsound <player.location> sound:HURT_FLESH volume:100 pitch:0.73
  - ^wait 0.5
  - ^playsound <player.location> sound:HURT_FLESH volume:100 pitch:1.2
   - ^playsound <player.location> sound:ZOMBIE_WOOD volume:100 pitch:0.75
  - ^wait 1
  - ^playsound <player.location> sound:ZOMBIE_WOOD volume:100 pitch:0.73
  - ^wait 1
  - ^playsound <player.location> sound:ZOMBIE_WOOD volume:100 pitch:1.2
  - ^playsound <player.location> sound:ZOMBIE_WOOD volume:100 pitch:0.73
  - ^wait 2
  - ^playsound <player.location> sound:ZOMBIE_WOOD volume:100 pitch:1.2
  - ^playsound <player.location> sound:ZOMBIE_WOOD volume:100 pitch:0.73
  - ^wait 2.75
  - ^playsound <player.location> sound:ZOMBIE_WOOD volume:100 pitch:1.2
  - wait 2
  - ^run TakeKarma
  - wait 1
  - ^run TakeKarma
  - wait 2
  - ^run TakeKarma
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - wait 0.25  
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0  
  - wait 0.3
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - ^narrate "<red>[Pipeworks Console] PRESSURE EXCEEDS 2500. RELEASING."
  - wait 2
  - ^narrate "The clawing stops."
  - wait 7
  - ^run TakeKarma
  - ^wait 0.75
  - ^run TakeKarma
  - ^wait 0.8
  - ^run TakeKarma
  - ^wait 2
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - ^run TakeKarma
  - wait 1
  - ^run TakeKarma
  - wait 2
  - ^run TakeKarma
  - ^playsound <player.location> sound:WATER volume:100 pitch:0
  - wait 0.25
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - wait 0.25  
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0  
  - wait 0.3
  - ^playsound <player.location> sound:PISTON_EXTEND volume:100 pitch:0
  - ^wait 2
  - ^playsound <player.location> sound:FIZZ volume:100 pitch:1
  - ^playsound <player.location> sound:FIZZ volume:100 pitch:0
  - ^playsound <player.location> sound:FIZZ volume:100 pitch:2
  - wait 2
  - ^narrate "<green>[Pipeworks Console] Pressure normalizing. Flood release complete."
"Hand Of The Prophet":
    type: assignment
    interact scripts:
        - 100 HandOfTheProphet
    actions:
        on death by player:
            - narrate "not cool, man. Not cool."    
"Josiah Stone":
    type: assignment
    interact scripts:
        - 100 JosiahStone
    actions:
        on death by player:
            - chat "Why... why..."
            - flag HasKilled<npc.id>:true
            - run TakeKarma
"Fidelis Militis Guard":
    type: assignment
    interact scripts:
        - 100 FMGuard
    actions:
        on death by player:
            - chat "Aargh!"
            - flag HasKilled<npc.id>:true
            - run TakeKarma
        on assignment:
        - random {
            - flag npc "GuardName:Pvt. Smith"
            - flag npc "GuardName:Pvt. Jones"
            - flag npc "GuardName:Pvt. Fletcher"
            - flag npc "GuardName:Pvt. Schaffer"
            - flag npc "GuardName:Pvt. Udinov"
            - flag npc "GuardName:Pvt. Stukov"
            - flag npc "GuardName:Pvt. Alroya"
            - flag npc "GuardName:Pvt. Eastman"
            - flag npc "GuardName:Pvt. Leong"
         }
        on death by player:
        - random {
            - chat "<red>Aargh!"
            - chat "HONOR... THROUGH..."
            - chat "I..."
            - chat "HONOR THROUGH COMBAT!"
          }
        - random {
            - narrate "<red><npc.flag[GuardName]> coughs up blood and falls to the floor."
            - narrate "<red><npc.flag[GuardName]> succumbs to his wounds."
            - narrate "<red><npc.flag[GuardName]> collapses in a heap."
            - narrate "<red><npc.flag[GuardName]> stumbles and collapses."
            - narrate "<red><npc.flag[GuardName]> bleeds to death."
            - narrate "<red><npc.flag[GuardName]> falls over and drowns in a pool of blood."
          }
        - if !<player.flag[HasFidelisMilitisKey]> {
            - narrate "<red>You grab the key from the dead guard. You now have access to all Fidelis Militis doors."
            - flag HasFidelisMilitisKey:true
          }
        - run TakeKarma
        on enter proximity:
        - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == HandOfTheProphet {
                     - random {
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>Put your hands on your head!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>Stop! This is a restricted area!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>He's one of them! Kill him!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>Oh, they're gonna have to glue you back together."
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>I've been waiting for this. HONOR THROUGH COMBAT!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>I'm going to kill you!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>STOP!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>You can't be in here!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>You just made your grave!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>It's another one of those bastard cultists!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>You think you can fight me? Bring it on!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>There's no way out now!"
                         - narrate "<green>[<npc.flag[GuardName]>]-->[You]<&co><red>I got one! You're going down!"
                       }
                     - attack
           }
"JosiahStone":
    type: Interact
    Steps:
      1:
        Click Trigger:
            script:
                - ^if <player.flag[HasKilled<npc.id>]> {
                     - narrate "<red>The ghost of <npc.name> stares blankly into the void."
                     - queue clear
                   }
                - ^random {
                     - chat "What did I do to deserve this?"
                     - chat "This is wrong. You know it's wrong."
                     - chat "Don't do this!"
                     - chat "Please... I have a family!"
                     - chat "Who are you! What have you done to me?"
                     - chat "Please, I'm begging you!"
                     - chat "There's nothing you can do."
                   }
"FM Guard":
    type: Interact
    Steps:
      1:
        Click Trigger:
            script:
                - ^if <player.flag[HasKilled<npc.id>]> {
                     - narrate "<red>The ghost of <npc.flag[GuardName]> stares blankly into the void."
                     - queue clear
                   }
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == HandOfTheProphet {
                     - chat "<red>He's one of them! Attack!"
                     - attack
                   }
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == FidelisMilitis {
                     - ^random {
                          - chat "What's up, soldier?"
                          - chat "What can I do for you?"
                          - chat "Anything to report?"
                          - chat "What's going on?"
                          - chat "Good work out there. We need more soldiers like you."
                          - chat "I know we're just mercenaries but you did us proud out there."
                          - chat "Hail. Honor Through Combat."
                          - chat "Hail. Honor Through Combat."
                          - chat "I can't stick around to chat. I'm on duty."    
                        }
                   } else {
                     - random {
                         - chat "You don't belong here. Get out."
                         - chat "What do you want?"
                         - chat "What?"
                         - chat "Bothering the guards is a great way to get killed."
                         - chat "Leave me alone."
                         - chat "I'm not interested, outsider. Back off."
                         - chat "Back off."
                         - chat "You're not one of us. Get out."
                       }
                   }
TaintedHolyWater:
   type: item
   material: 373
   display name: "<bold>Tainted Holy Water"
   lore:
   - Despite what others might say
   - this water is clearly not holy.
   - It seems to have some kind of
   - medicine in it though.
BladeOfTheProphet:
   type: item
   material: iron_sword
   display name: "<bold>Blade Of The Prophet"
   lore:
   - This blade has some sort of curse on
   - it. Wonder what it does?
   - <gray>Right click to activate.
   enchantments:
   - DURABILITY:7
FMBlade:
   type: item
   material: iron_sword
   display name: "<bold>FM Blade"
   lore:
   - <yellow>Tier 3
   - This blade is sharper than anything you've ever seen. Looks vicious.
   enchantments:
   - DURABILITY:3
StolenHolyBookHOP:
   type: item
   material: book
   bound: true
   book: HolyBook
   display name: "<bold>Stolen Holy Book"
   lore:
   - <yellow>Quest Item; cannot be removed from inventory
   - The Fidelis Miltis have stolen this book. Return it.
   enchantments:
   - DURABILITY:7
StolenHolyBookHOP:
   type: item
   material: m@written_book
   bound: true
   book: HolyBook
   display name: "<bold>Stolen Holy Book"
   lore:
   - <yellow>Quest Item; cannot be removed from inventory
   - The Fidelis Miltis have stolen this book. Return it.
   enchantments:
   - DURABILITY:7
HolyBook: 
  type: book 
  title: <yellow>The Holy Book
  author: Prophet 
  signed: true
  # Each -line in the text section represents an entire page. 
  # To create a newline, use the tag <n>. To create a paragraph, use <p>. 
  text: 
  - 1 Vocavit autem Moysen, et locutus est ei Dominus de tabernaculo testimonii, dicens<&co>
  - 2 Loquere filiis Israël, et dices ad eos<&co> Homo, qui obtulerit ex vobis hostiam Domino de pecoribus, id est, de bobus et ovibus offerens victimas,
  - 3 si holocaustum fuerit ejus oblatio, ac de armento<&co> masculum immaculatum offeret ad ostium tabernaculi testimonii, ad placandum sibi Dominum<&co>
  - 4 ponetque manum super caput hostiæ, et acceptabilis erit, atque in expiationem ejus proficiens.
  - 5 Immolabitque vitulum coram Domino, et offerent filii Aaron sacerdotes sanguinem ejus, fundentes per altaris circuitum, quod est ante ostium tabernaculi<&co>
  - 6 detractaque pelle hostiæ, artus in frusta concident.
  - 7 Et subjicient in altari ignem, strue lignorum ante composita<&co>
  - 8 et membra quæ sunt cæsa, desuper ordinantes, caput videlicet, et cuncta quæ adhærent jecori,
  - 9 intestinis et pedibus lotis aqua<&co> adolebitque ea sacerdos super altare in holocaustum et suavem odorem Domino.
  - 10 Quod si de pecoribus oblatio est, de ovibus sive de capris holocaustum, masculum absque macula offeret<&co>
  - 11 immolabitque ad latus altaris, quod respicit ad aquilonem, coram Domino<&co> sanguinem vero illius fundent super altare filii Aaron per circuitum<&co>
  - 12 dividentque membra, caput, et omnia quæ adhærent jecori, et ponent super ligna, quibus subjiciendus est ignis<&co>
  - 13 intestina vero et pedes lavabunt aqua. Et oblata omnia adolebit sacerdos super altare in holocaustum et odorem suavissimum Domino.
  - 14 Si autem de avibus, holocausti oblatio fuerit Domino, de turturibus, aut pullis columbæ,
  - 15 offeret eam sacerdos ad altare<&co> et retorto ad collum capite, ac rupto vulneris loco, decurrere faciet sanguinem super crepidinem altaris<&co>
  - 16 vesiculam vero gutturis, et plumas projiciet prope altare ad orientalem plagam, in loco in quo cineres effundi solent,
  - 17 confringetque ascellas ejus, et non secabit, neque ferro dividet eam, et adolebit super altare, lignis igne supposito. Holocaustum est et oblatio suavissimi odoris Domino.
  1 Vocavit autem Moysen, et locutus est ei Dominus de tabernaculo testimonii, dicens<&co>
  - 2 Loquere filiis Israël, et dices ad eos<&co> Homo, qui obtulerit ex vobis hostiam Domino de pecoribus, id est, de bobus et ovibus offerens victimas,
  - 3 si holocaustum fuerit ejus oblatio, ac de armento<&co> masculum immaculatum offeret ad ostium tabernaculi testimonii, ad placandum sibi Dominum<&co>
  - 4 ponetque manum super caput hostiæ, et acceptabilis erit, atque in expiationem ejus proficiens.
  - 5 Immolabitque vitulum coram Domino, et offerent filii Aaron sacerdotes sanguinem ejus, fundentes per altaris circuitum, quod est ante ostium tabernaculi<&co>
  - 6 detractaque pelle hostiæ, artus in frusta concident.
  - 7 Et subjicient in altari ignem, strue lignorum ante composita<&co>
  - 8 et membra quæ sunt cæsa, desuper ordinantes, caput videlicet, et cuncta quæ adhærent jecori,
  - 9 intestinis et pedibus lotis aqua<&co> adolebitque ea sacerdos super altare in holocaustum et suavem odorem Domino.
  - 10 Quod si de pecoribus oblatio est, de ovibus sive de capris holocaustum, masculum absque macula offeret<&co>
  - 11 immolabitque ad latus altaris, quod respicit ad aquilonem, coram Domino<&co> sanguinem vero illius fundent super altare filii Aaron per circuitum<&co>
  - 12 dividentque membra, caput, et omnia quæ adhærent jecori, et ponent super ligna, quibus subjiciendus est ignis<&co>
  - 13 intestina vero et pedes lavabunt aqua. Et oblata omnia adolebit sacerdos super altare in holocaustum et odorem suavissimum Domino.
  - 14 Si autem de avibus, holocausti oblatio fuerit Domino, de turturibus, aut pullis columbæ,
  - 15 offeret eam sacerdos ad altare<&co> et retorto ad collum capite, ac rupto vulneris loco, decurrere faciet sanguinem super crepidinem altaris<&co>
  - 16 vesiculam vero gutturis, et plumas projiciet prope altare ad orientalem plagam, in loco in quo cineres effundi solent,
  - 17 confringetque ascellas ejus, et non secabit, neque ferro dividet eam, et adolebit super altare, lignis igne supposito. Holocaustum est et oblatio suavissimi odoris Domino.

"HandOfTheProphet":
    type: Interact
    Steps:
      1:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - ^engage
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == FidelisMilitis {
                     - ^chat "<red>What! You serve our mortal enemy, the Fidelis Militis!"
                     - ^queue clear
                   }
                - ^chat "Hail to you, mortal adventurer!"
                - ^chat "Do you wish to join the Hand Of The Prophet?"
                - ^chat "We cleanse this land of the infidels."
                - ^chat "If you serve us, you will be rewarded in this life and the next!"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'Yes'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Reject Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'No'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^disengage
        Chat Trigger:
            1:
                Trigger: /Yes/
                Script:
                    - run AddObjective "def:Cleansing Initiation|Slay Josiah Stone in the Cathedral Undercoft.|No location"
                    - chat "Your first task is to slay the infidel we have captured to prove yourself."
                    - flag FactionChoiceHandOfTheProphetFidelisMilitis:HandOfTheProphet
                    - zap
            2:
                Trigger: /No/
                Script:
                    - chat "As you wish, infidel."
      2:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - define objectiveCondition <player.flag[HasKilled1295]>
                - ^if %objectiveCondition% {
                    - chat "Excellent work, Initiate. You have proven your worth."
                    - run AddTitle "def:Initiate"
                    - chat "Take this holy water. It will cleanse your sickness."
                    - give i@TaintedHolyWater qty:1
                    - ^run CompleteObjective "def:Cleansing Initiation|<player.location>"
                    - ^give bread qty:40
                    - zap
                   } else {
                     - chat "You haven't done what I asked!"
                   }
                #If the script is already complete, add a third step that tells the user that there are no more quests.
      3:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - ^engage
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == FidelisMilitis {
                     - ^chat "<red>What! You serve our mortal enemy, the Fidelis Militis!"
                     - ^queue clear
                   }
                - ^chat "You have done well, Initiate. We now give you a task of great importance."
                - ^chat "Our new mortal enemy, The Fidelis Militis, have stolen our holy book."
                - ^chat "It was locked deep in the vaults of the Undercoft, and now they have taken it."
                - ^chat "The Fidelis Militis are a group of sellswords and mercenaries, and, while driven by honor and strength, have neither."
                - ^chat "The Sentinel Corps chased them out of the main town. They hide in the sewers. Go get the book."
                - ^chat "Be careful. The Fidelis Militis, while brutish, are deadly. Do not attract too undue attention. You must use stealth to get the book."
                - ^narrate "<gray>Guards follow patrols of the sewers. Do not attempt to fight the guards head on."
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'Yes'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Reject Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'No'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^disengage
        Chat Trigger:
            1:
                Trigger: /Yes/
                Script:
                    - run AddObjective "def:The Holy Book|Retrieve the Hand Of The Prophet's Holy Book from the sewers of New Dalantum.|No location"
                    - chat "Excellent. I'm counting on you!"
                    - flag FactionChoiceHandOfTheProphetFidelisMilitis:HandOfTheProphet
                    - zap
            2:
                Trigger: /No/
                Script:
                    - chat "How could you turn an opportunity to redeem yourself?"
      4:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - define objectiveCondition <player.inventory.contains[i@StolenHolyBookHOP]>
                - ^if %objectiveCondition% {
                    - take i@StolenHolyBookHOP
                    - chat "Excellent work, Initiate. You have proven your worth."
                    - run AddTitle "def:Initiate"
                    - chat "The heavens have forged you a blade, mighty warrior."
                    - give i@BladeOfTheProphet qty:1
                    - ^run CompleteObjective "def:Cult Priest|<player.location>"
                    - zap
                   } else {
                     - chat "You haven't done what I asked!"
                   }
      5:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - ^engage
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == FidelisMilitis {
                     - ^chat "<red>What! You serve our mortal enemy, the Fidelis Militis!"
                     - ^queue clear
                   }
                - ^chat "You have retrieved the book and restored order to The Hand Of The Prophet. The time is now to strike back at our enemies."
                - ^chat "We need to control access to the sewer system if we're going to defeat the Fidelis Militis."
                - ^chat "Make your way to the Pipeworks Control Station and clear it of all defenses. We will need it for the Purge."
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'Yes'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Reject Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'No'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^disengage
        Chat Trigger:
            1:
                Trigger: /Yes/
                Script:
                    - run AddObjective "def:Purge Preparations|Find the Sewer Pipeworks and slay the pipe operators inside.|No location"
                    - chat "Excellent. I'm counting on you!"
                    - flag FactionChoiceHandOfTheProphetFidelisMilitis:HandOfTheProphet
                    - zap
            2:
                Trigger: /No/
                Script:
                    - chat "How could you turn down an opportunity to redeem yourself?"
      6:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - define objectiveCondition "<player.flag[HasKilled1293]> && <player.flag[HasKilled1294]> && <player.flag[HasKilled1295]>"
                - ^if %objectiveCondition% {
                    - take i@StolenHolyBookHOP
                    - chat "Excellent work, Initiate. You have proven your worth."
                    - run AddTitle "def:Cult Bishop"
                    - chat "I have forseen your success, Priest <player.name>. This magical charm has my blessing. It will protect you from holy fire."
                    - give i@BlessingOfTheProphet qty:1
                    - ^run CompleteObjective "def:Purge Preparations|<player.location>"
                    - zap
                   } else {
                     - chat "You haven't done what I asked!"
                   }
      7:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - ^engage
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == FidelisMilitis {
                     - ^chat "<red>What! You serve our mortal enemy, the Fidelis Militis!"
                     - ^queue clear
                   }
                - ^chat "The time has come to purge the Fidelis Militis. These vermin have survived long enough."
                - ^chat "Unfortunately, the Fidelis Militis have discovered at least part of our plan. They have stationed several guards near the two pump stations we'll need to capture."
                - ^chat "We will flush out our enemies in a great flood."
                - ^chat "You must capture both the pump stations and activate the levers on both of them. Then you must make your way back to the Pipeworks or the system will automatically reset."
                - ^chat "If you make it to the Pipeworks, activate the main pump release."
                - ^chat "This will flood the Fidelis Militis base and slay them all."
                - ^chat "Will you cleanse this land of our enemies?"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'Yes'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Reject Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'No'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^disengage
        Chat Trigger:
            1:
                Trigger: /Yes/
                Script:
                    - run AddObjective "def:The Purge|Activate both the pump stations in the sewers. Then, within three minutes of activating the first one, activate the pump release to flood the FM base.|No location"
                    - chat "Excellent. I'm counting on you!"
                    - flag FactionChoiceHandOfTheProphetFidelisMilitis:HandOfTheProphet
                    - zap
            2:
                Trigger: /No/
                Script:
                    - chat "How could you turn down an opportunity to redeem yourself?"
      8:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - define objectiveCondition "<player.flag[HasKilled1293]> && <player.flag[HasKilled1294]> && <player.flag[HasKilled1295]>"
                - ^if %objectiveCondition% {
                    - take i@StolenHolyBookHOP
                    - chat "Excellent work, Initiate. You have proven your worth."
                    - run AddTitle "def:Cult Bishop"
                    - chat "I have forseen your success, Priest <player.name>. This magical charm has my blessing. It will protect you from holy fire."
                    - give i@BlessingOfTheProphet qty:1
                    - ^run CompleteObjective "def:Purge Preparations|<player.location>"
                    - zap
                   } else {
                     - chat "You haven't done what I asked!"
                   }

"PitInstructor":
    type: Interact
    Steps:
      1:
        Click Trigger:
            script:
                - ^chat "Not bad."
                - ^flag hasCompletedPit:true
"FidelisMilitis":
    type: Interact
    Steps:
      1:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - ^engage
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == HandOfTheProphet {
                     - ^chat "<red>What! He's one of those crazies!"
                     - ^queue clear
                   }
                - ^chat "What do you want?"
                - ^chat "Look, if you want to join us, you'll have to prove it."
                - ^chat "Lots of people want to join the Fidelis Militis. If you want in, you'll have to at least pass our basic test."
                - ^chat "In this facility there is an obstacle course called The Pit. Find it and run it. Talk to SSgt. Warren when you get there."
                - ^chat "If you succeed, we'll give you one of our blades. You'll be given jobs, and in exchange we'll pay you."
                - ^chat "We prefer to pay you in equipment."
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'Yes'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Reject Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'No'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^disengage
        Chat Trigger:
            1:
                Trigger: /Yes/
                Script:
                    - run AddObjective "def:The Pit|Run The Pit in the Fidelis Militis bunker.|No location"
                    - chat "Get to it. Run the Pit."
                    - flag FactionChoiceHandOfTheProphetFidelisMilitis:FidelisMilitis
                    - zap
            2:
                Trigger: /No/
                Script:
                    - chat "Look, we've got plenty of soldiers. Why did you bother wasting my time?"
      2:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - define objectiveCondition <player.flag[HasCompletedPit]>
                - ^if %objectiveCondition% {
                    - chat "Excellent work. Welcome to the Fidelis Militis, Private."
                    - run AddTitle "def:FM Private"
                    - chat "Enjoy the blade."
                    - give i@FMBlade qty:1
                    - ^run CompleteObjective "def:Cleansing Initiation|<player.location>"
                    - ^give bread qty:40
                    - zap
                   } else {
                     - chat "You haven't done what I asked!"
                   }
                #If the script is already complete, add a third step that tells the user that there are no more quests.
      3:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - ^engage
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == FidelisMilitis {
                     - ^chat "<red>What! You serve our mortal enemy, the Fidelis Militis!"
                     - ^queue clear
                   }
                - ^chat "You have done well, Initiate. We now give you a task of great importance."
                - ^chat "Our new mortal enemy, The Fidelis Militis, have stolen our holy book."
                - ^chat "It was locked deep in the vaults of the Undercoft, and now they have taken it."
                - ^chat "The Fidelis Militis are a group of sellswords and mercenaries, and, while driven by honor and strength, have neither."
                - ^chat "The Sentinel Corps chased them out of the main town. They hide in the sewers. Go get the book."
                - ^chat "Be careful. The Fidelis Militis, while brutish, are deadly. Do not attract too undue attention. You must use stealth to get the book."
                - ^narrate "<gray>Guards follow patrols of the sewers. Do not attempt to fight the guards head on."
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'Yes'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Reject Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'No'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^disengage
        Chat Trigger:
            1:
                Trigger: /Yes/
                Script:
                    - run AddObjective "def:The Holy Book|Retrieve the Hand Of The Prophet's Holy Book from the sewers of New Dalantum.|No location"
                    - chat "Excellent. I'm counting on you!"
                    - flag FactionChoiceHandOfTheProphetFidelisMilitis:HandOfTheProphet
                    - zap
            2:
                Trigger: /No/
                Script:
                    - chat "How could you turn an opportunity to redeem yourself?"
      4:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - define objectiveCondition <player.inventory.contains[i@StolenHolyBookHOP]>
                - ^if %objectiveCondition% {
                    - take i@StolenHolyBookHOP
                    - chat "Excellent work, Initiate. You have proven your worth."
                    - run AddTitle "def:Initiate"
                    - chat "The heavens have forged you a blade, mighty warrior."
                    - give i@BladeOfTheProphet qty:1
                    - ^run CompleteObjective "def:Cult Priest|<player.location>"
                    - zap
                   } else {
                     - chat "You haven't done what I asked!"
                   }
      5:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - ^engage
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == FidelisMilitis {
                     - ^chat "<red>What! You serve our mortal enemy, the Fidelis Militis!"
                     - ^queue clear
                   }
                - ^chat "You have retrieved the book and restored order to The Hand Of The Prophet. The time is now to strike back at our enemies."
                - ^chat "We need to control access to the sewer system if we're going to defeat the Fidelis Militis."
                - ^chat "Make your way to the Pipeworks Control Station and clear it of all defenses. We will need it for the Purge."
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'Yes'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Reject Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'No'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^disengage
        Chat Trigger:
            1:
                Trigger: /Yes/
                Script:
                    - run AddObjective "def:Purge Preparations|Find the Sewer Pipeworks and slay the pipe operators inside.|No location"
                    - chat "Excellent. I'm counting on you!"
                    - flag FactionChoiceHandOfTheProphetFidelisMilitis:HandOfTheProphet
                    - zap
            2:
                Trigger: /No/
                Script:
                    - chat "How could you turn down an opportunity to redeem yourself?"
      6:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - define objectiveCondition "<player.flag[HasKilled1293]> && <player.flag[HasKilled1294]> && <player.flag[HasKilled1295]>"
                - ^if %objectiveCondition% {
                    - take i@StolenHolyBookHOP
                    - chat "Excellent work, Initiate. You have proven your worth."
                    - run AddTitle "def:Cult Bishop"
                    - chat "I have forseen your success, Priest <player.name>. This magical charm has my blessing. It will protect you from holy fire."
                    - give i@BlessingOfTheProphet qty:1
                    - ^run CompleteObjective "def:Purge Preparations|<player.location>"
                    - zap
                   } else {
                     - chat "You haven't done what I asked!"
                   }
      7:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - ^engage
                - ^if <player.flag[FactionChoiceHandOfTheProphetFidelisMilitis]> == FidelisMilitis {
                     - ^chat "<red>What! You serve our mortal enemy, the Fidelis Militis!"
                     - ^queue clear
                   }
                - ^chat "The time has come to purge the Fidelis Militis. These vermin have survived long enough."
                - ^chat "Unfortunately, the Fidelis Militis have discovered at least part of our plan. They have stationed several guards near the two pump stations we'll need to capture."
                - ^chat "We will flush out our enemies in a great flood."
                - ^chat "You must capture both the pump stations and activate the levers on both of them. Then you must make your way back to the Pipeworks or the system will automatically reset."
                - ^chat "If you make it to the Pipeworks, activate the main pump release."
                - ^chat "This will flood the Fidelis Militis base and slay them all."
                - ^chat "Will you cleanse this land of our enemies?"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'Yes'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Reject Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'No'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
                - ^disengage
        Chat Trigger:
            1:
                Trigger: /Yes/
                Script:
                    - run AddObjective "def:The Purge|Activate both the pump stations in the sewers. Then, within three minutes of activating the first one, activate the pump release to flood the FM base.|No location"
                    - chat "Excellent. I'm counting on you!"
                    - flag FactionChoiceHandOfTheProphetFidelisMilitis:HandOfTheProphet
                    - zap
            2:
                Trigger: /No/
                Script:
                    - chat "How could you turn down an opportunity to redeem yourself?"
      8:
        Click Trigger:
            script:
                - ^run StandardDialogue def:<npc>
                - define objectiveCondition "<player.flag[HasKilled1293]> && <player.flag[HasKilled1294]> && <player.flag[HasKilled1295]>"
                - ^if %objectiveCondition% {
                    - take i@StolenHolyBookHOP
                    - chat "Excellent work, Initiate. You have proven your worth."
                    - run AddTitle "def:Cult Bishop"
                    - chat "I have forseen your success, Priest <player.name>. This magical charm has my blessing. It will protect you from holy fire."
                    - give i@BlessingOfTheProphet qty:1
                    - ^run CompleteObjective "def:Purge Preparations|<player.location>"
                    - zap
                   } else {
                     - chat "You haven't done what I asked!"
                   } 
"BugNPC":
    type: assignment
    interact scripts:
        - 100 Dummy
    actions:
        on death by player:
            - if <player.flag[bladeMasterGranaryQuest]> && <player.flag[bugsKilled]> < 10 {
                - flag player bugsKilled:++
                - narrate "You have killed <player.flag[bugsKilled].asint> of 10 bugs"
              }



  #Stati for quest
  #Intro- run when the player clicks on the quest for the first time, or if he hadn't accepted it previously.
  #Progress- What happens when the quest is in progress. Here is where you will run checks to determine whether or not they have completed the quest.
  #If they have, then you will run the Complete script. Refer to the template.
  #
ExampleQuestIntro:
  type: task
  script: 
  - ^chat "This is a default chat that uses the new chat framework."
  - ^narrate "This is the default narrate."
  - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'/acceptquest <player.flag[verifiedID]>'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
ExampleQuestAccept:
  type: task
  script:
  - if <player.flag[<script.name.replace[ACCEPT]>Progress]> == InProgress {
      - queue clear
    }
  - ^chat "Yay! Now do the damn quest."
  - ^narrate "This is the default narrate."
ExampleQuestInProgress:
  type: task
  script: 
  - ^chat "This is a default chat that uses the new chat framework."
  - ^narrate "This is the default narrate."
  - ^if <player.inventory.contains[i@Wand]> && !<player.flag[Completed<script.name.replace[INPROGRESS]>]> {
       - chat "<script.name.replace[INPROGRESS]>Complete"
       - run <script.name.replace[INPROGRESS]>Complete as:<npc>
     } else {
       - chat "Thanks for your help!"
     }
ExampleQuestComplete:
  type: task 
  script:
  - ^if !<player.flag[Completed<script.name.replace[COMPLETE]>]> {
       - ^chat "Thanks so much for your help!"
       - ^give bread qty:10
     }
  - ^flag player Completed<script.name.replace[COMPLETE]>:true
  - ^if <player.flag[<script.name.replace[COMPLETE]>Step]> == null {
       - ^flag <script.name.replace[COMPLETE]>Step:1
     }
  - ^flag player <script.name.replace[COMPLETE]>Step:++
  #If you want to add extra steps, you can use the QuestStep flag. Then, you can come back later.
  - ^chat "The quest is complete! Always remember to flag that you've given the reward."
  - ^narrate "This is the default narrate."
ExampleQuestNextStepIntro:
  type: task
  script: 
  - ^chat "This is a default chat that uses the new chat framework."
  - ^narrate "This is the default narrate."
  - ^execute asserver "tellraw <player.name> {'text':'','extra':[{'text':'Accept Quest','color':'%chatColor%','bold':'true','clickEvent':{'action':'run_command','value':'/acceptquest <player.flag[verifiedID]>'},'hoverEvent':{'action':'show_text','value':'Accept this quest.'}}]}"
ExampleQuestNextStepAccept:
  type: task
  script:
  - if <player.flag[<script.name.replace[ACCEPT]>Progress]> == InProgress {
      - queue clear
    }
  - ^chat "Yay! Now do the damn quest."
  - ^narrate "This is the default narrate."
ExampleQuestNextStepInProgress:
  type: task
  script: 
  - ^chat "This is a default chat that uses the new chat framework."
  - ^narrate "This is the default narrate."
  - ^if <player.inventory.contains[i@Wand]> && !<player.flag[Completed<script.name.replace[INPROGRESS]>]> {
       - chat "<script.name.replace[INPROGRESS]>Complete"
       - run <script.name.replace[INPROGRESS]>Complete as:<npc>
     } else {
       - chat "Thanks for your help!"
     }
ExampleQuestNextStepComplete:
  type: task 
  script:
  - ^if !<player.flag[Completed<script.name.replace[COMPLETE]>]> {
       - ^chat "Thanks so much for your help!"
       - ^give bread qty:10
     }
  - ^flag player Completed<script.name.replace[COMPLETE]>:true
  #If you want to add extra steps, you can use the QuestStep flag. Then, you can come back later.
  - ^chat "The quest is complete! Always remember to flag that you've given the reward."
  - ^narrate "This is the default narrate."
PlayVoices:
  type: task 
  script:
  - ^if <npc.flag[GenericVoice]> {
       - ^if <npc.location.world.time.period> == day {
            - ^random 2
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodday custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
          }
       - ^if <npc.location.world.time.period> == dawn {
            - ^random 2
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodmorning custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
          }
       - ^if <npc.location.world.time.period> == dusk {
            - ^random 2
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodevening custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
          }
       - ^if <npc.location.world.time.period> == night {
            - ^random 2
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
          }
     }
  - ^if !<npc.flag[GenericVoice]> {
       - ^if <npc.flag[VoicePrefix]> == Tyr {
            - ^random 8
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatdoyouneed custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatcanIdoforyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_greetingsmortal custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_godspeed custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_presencehonorsme custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_welcomeavenger custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hailtoyou custom
          }
       - ^if <npc.flag[VoicePrefix]> == Aka {
            - ^flag player ClickCount:++ duration:60s
            - ^if <player.flag[ClickCount]> > 15 {
                 - ^chat "<red>Stop pestering me!"
                 - ^playsound <npc.location> sound:custom.HostileDeclare custom
                 - ^queue clear
               }
            - ^random 4
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_orderwelcomes custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_greetings custom
            - ^if true {
                 - ^if <npc.location.world.time.period> == day {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodday custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dawn {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodmorning custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dusk {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodevening custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == night {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
               }
          }
       - ^if <npc.flag[VoicePrefix]> == Alk {
            - flag player ClickCount:++ duration:60s

            - ^if <player.flag[ClickCount]> > 5 {
                 - ^random 2
                 - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goaway custom
                 - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_stoppestering custom
                 - ^queue clear
               }
            - ^random 14
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_welcomeavenger custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatcanIdoforyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatdoyouneed custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatdoyouwant custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yourpresencehonorsme custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yesyesgoodbye custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodtoseeyouagain custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodtoseeyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_greetings custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hailtoyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_what custom
            - ^if true {
                 - ^if <npc.location.world.time.period> == day {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodday custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dawn {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodmorning custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dusk {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodevening custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == night {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
               }
          }
       - ^if <npc.flag[VoicePrefix]> == Cha {
            - ^random 8
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_greetings custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_heythere custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_needhelp custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatcanIdoforyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatchaneed custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
            - ^if true {
                 - ^if <npc.location.world.time.period> == day {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodday custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dawn {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodmorning custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dusk {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodevening custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == night {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
               }
          }
       - ^if <npc.flag[VoicePrefix]> == Dro {
            - ^random 11
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_allowtoadvise custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_approachandtrade custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_askandlearn custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_farewell custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodbye custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_needhelp custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_steelisstrong custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_takecare custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
            - ^if true {
                 - ^if <npc.location.world.time.period> == day {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodday custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dawn {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodmorning custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dusk {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodevening custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == night {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
               }
          }
       - ^if <npc.flag[VoicePrefix]> == Hal {
            - ^random 8
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodbye custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodtoseeyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hailtoyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_welcomeavenger custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yourpresence custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_ custom
          }
       - ^if <npc.flag[VoicePrefix]> == Hra {
            - ^random 8
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hailtoyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_greetings custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_returngreeting custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_welcomeavenger custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hailtoyou custom
            - ^if true {
                 - ^if <npc.location.world.time.period> == day {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodday custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dawn {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodmorning custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dusk {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodevening custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == night {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
               }
          }
       - ^if <npc.flag[VoicePrefix]> == Kas {
            - ^random 5
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_greetings custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_sisterhoodwelcomesyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_helloagainoutlander custom
            - ^if true {
                 - ^if <npc.location.world.time.period> == day {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodday custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dawn {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodmorning custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dusk {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodevening custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == night {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
               }
          }
       - ^if <npc.flag[VoicePrefix]> == Nat {
            - ^random 11
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_godspeed custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodtoseeyouagain custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_greetings custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hailtoyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_presencehonorsme custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_welcomeavenger custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatcanIdo custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatdoyouneed custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
            - ^if true {
                 - ^if <npc.location.world.time.period> == day {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodday custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dawn {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodmorning custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dusk {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodevening custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == night {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
               }
          }
       - ^if <npc.flag[VoicePrefix]> == Orm {
            - ^random 9
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hailtoyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_greetings custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodtoseeyouagain custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hailtoyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yourpresence custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatcanIdoforyou custom
            - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_whatdoyouneed custom
            - ^if true {
                 - ^if <npc.location.world.time.period> == day {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodday custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dawn {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodmorning custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == dusk {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_goodevening custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
                 - ^if <npc.location.world.time.period> == night {
                      - ^random 2
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_yes custom
                      - ^playsound <npc.location> sound:custom.<npc.flag[VoicePrefix]>_hello custom
                    }
               }
          }
     }