Paste #5812: Untitled Paste

Date: 2014/06/26 23:26:19 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


KingsInitiateQuest:
  type: assignment

    KingsZombieQty: 10
    KingsZombieReward: 250
    KingsSkeletonQty: 10
    SkeletonReward: 250
    KingsCreeperQty: 5
    KingsCreeperReward: 250
  actions:
    on assignment:
    - trigger name:chat toggle:true
  interact scripts:
  - 10 KingsInitiation

KingsGuildMaster:
  type: assignment
  default constants:
    GuildNPC1Name: Gavoon
    GuildNPC2Name: Vandaag
  actions:
    on assignment:
    - trigger name:chat toggle:true
  interact scripts:
    - 10 KingsGuildMasterChallenge

KingsSkillsQuest:
  type: assignment
  default constants:
    QuestOneQty: 2
    QtyOneInWords: Two
    QuestTwoQty: 3
    QtyTwoInWords: Three
  actions:
    on assignment:
    - trigger name:chat toggle:true
  interact scripts:
    - 10 KingsSkillsEnhance

KingsDailyPvp:
  type: assignment
  default constants:
    KingsPVPQty: 2
    KingsArmorList: i@<util.random.int[310].to[313]>[enchantments=protection_environmental,4]
    KingsArmorQty: 1
    KingsResourceList: i@<util.random.int[264].to[266]>
    KingsResourceQty: <util.random.int[1].to[10]>
    KingsMiscList: i@<util.random.int[352].to[375]>
    KingsMiscQty: <util.random.int[1].to[10]>

  actions:
    on assignment:
    - trigger name:chat toggle:true
  interact scripts:
    - 10 KingsDailyPvpQuest

KingsGuildChest:
  type: item
  material: diamond_chestplate
  display name: Chest of the Fallen
  enchantments:
  - PROTECTION_ENVIRONMENTAL:2
  - DURABILITY:2
  lore:
  - The diamond chest of a fallen,
  - Guild member. Reforged by <npc.name>

KingsGuildLegs:
  type: item
  material: diamond_leggings
  display name: Legplates of the Fallen
  enchantments:
  - PROTECTION_ENVIRONMENTAL:2
  - DURABILITY:2
  lore:
  - These legplates definitly aren't new...

KingsGuildSword:
  type: item
  material: diamond_sword
  display name: Sword of the Flame
  enchantments:
  - FIRE_ASPECT:2
  - DAMAGE_ALL:2
  lore:
  - Forged with raw diamonds and blaze rods,
  - this sword is awarded to all PvP Guild initiates.

KingsInitiation:
  Type: Interact
  Steps:
    1:
      Click Trigger:
        Script:
          - ^engage
          - chat "Well met and welcome friend! Interested in joining the Kings Guild?"
          - wait 2
          - chat "Only those who follow a divine path and pledge their lives to the King can join us."
          - wait 2
          - chat "If you are interested, you'll have to prove yourself to the King"
          - wait 2
          - chat "What say you knight?"
          - narrate "<white>You can say, <green>Yes<white> or <green>No<white>."
          - ^disengage
      Chat Trigger:
        1:
           Trigger: /Yes/, I'm interested in joining the Kings Guild.
           Script:
             - ^engage
             - chat "Very good, we'll get your training started now."
             - wait 2
             - chat "These challenges are to test your abilities against different opponents."
             - wait 2
             - chat "We will start off with simple targets, the walking dead."
             - wait 2
             - ^chat "I need you to go hunt down a kill <npc.constant[KingsZombieQty]> of these monsters. Dont let those zombies survive."
             - ^listen kill type:entity name:zombie qty:1 script:KingsZombieCheck
             - flag ZombieCount:0
             - ^zap
             - ^disengage
        2:
           Trigger: /No/, I do not wish to follow the Kings Guild. 
           Script:
             - ^engage
             - chat "Its not cut out for everyone."
             - wait 2
             - chat "Only a true knight can join the Kings Guild"
             - ^disengage
    2:     
      Click Trigger:
        Script:
          - ^engage
          - chat "You've only killed <flag.p:ZombieCount.asint> zombies..."
          - wait 2
          - chat "Are you too weak to handle our most basic challenge?"
          - wait 2
          - chat "Come back if you manage to handle the task at hand."
          - ^disengage
    3:
      Click Trigger:
        Script:
          - ^engage
          - chat "Brave knight! You've done well."
          - wait 2
          - chat "Come back to me when you're ready for your next challenge."
          - wait 2
          - ^give money qty:<npc.constant[KingsZombieReward]>
          - ^narrate "<red>You receieved <gold><npc.constant[KingsZombieReward]> dollars<red> from <npc.name>!"
          - ^flag ZombieCount:!
          - ^zap step:4
          - ^disengage
    4:
      Click Trigger:
          Script:
            - ^engage
            - chat "Wanting to slay more enemies of the King? Thats what we like to see."
            - wait 3
            - chat "I need you to prove yourself against opponents who are more swift and nimble!"
            - ^wait 3
            - ^chat "Kill <npc.constant[KingsSkeletonQty]> skeletons to prove your agility, what do you say?"
            - ^narrate "<white>You can say, <green>Yes<white> or <green>No<white>."
      Chat Trigger:
        1:
           Trigger: /Yes/, I will get right on that.
           Script:
             - ^engage
             - chat "Very good!"
             - wait 2
             - chat "Go on now, go hunting!"
             - ^listen kill type:entity name:skeleton qty:1 script:KingsSkeleCheck
             - ^flag KingsSkeleCount:0
             - ^zap step:5
             - ^disengage
        2:
           Trigger: /No/, I wont be able to handle that. 
           Script:
             - ^engage
             - wait 2
             - chat "Come back when you are prepared, Knight!"
             - ^disengage
    5:
      Click Trigger:
        Script:
          - ^engage
          - chat "You've only killed <flag.p:KingsSkeleCount.asint> skeletons..."
          - wait 2
          - chat "The king requires you to finish the task at hand."
          - ^disengage
    6:
      Click Trigger:
        Script:
          - ^engage
          - chat "<npc.constant[KingsSkeletonQty]> skeletons dead, very nicely done."
          - wait 2
          - chat "This time you really earned this reward!"
          - ^give money qty:<npc.constant[SkeletonReward]>
          - ^narrate "<red>You receieved <gold><npc.constant[SkeletonReward]> coins<red> from <npc.name>!"
          - wait 1
          - chat "Come back when you're ready for the final challenge."
          - ^flag KingsSkeleCount:!
          - ^zap 7
          - ^disengage
    7:
      Click Trigger:
        Script:
          - ^engage
          - chat "Back for the last challenge I see!"
          - wait 2
          - chat "For your final challenge, I need you to prove that you can handle the toughest of foes."
          - wait 2
          - chat "Kill <npc.constant[KingsCreeperQty]> creepers, and you will have proved your potential."
          - wait 2
          - chat "Think you can handle that?"
          - narrate "<white>You can say, <green>Yes<white> or <green>No<white>."
          - ^disengage
      Chat Trigger:
        1:
           Trigger: /Yes/, that'll be nothing.
           Script:
             - ^engage
             - chat "May the winds be at your back Knight. Serve the King!"
             - wait 2
             - chat "Return to me when you're done"
             - ^flag KingsCreeperCount:0
             - ^listen kill type:entity name:creeper qty:1 script:KingsCreeperCheck
             - ^zap step:8
             - ^disengage
        2:
           Trigger: /No/, I wont be able to handle that. 
           Script:
             - ^engage
             - chat "Then why waste the Kings time!"
             - ^disengage
    8:     
      Click Trigger:
        Script:
          - ^engage
          - chat "You've only killed <flag.p:KingsCreeperCount.asint> Creepers..."
          - wait 2
          - chat "Are you too weak to handle our most basic requirement?"
          - wait 2
          - chat "Come back if you manage to handle the task at hand."
          - ^disengage
    9:
      Click Trigger:
        Script:
          - ^engage
          - chat "You made it back in one piece I see. Thats surpising, I must admit."
          - wait 2
          - ^give money qty:<npc.constant[KingsCreeperReward]>
          - ^narrate "<red>You receieved <gold><npc.constant[KingsCreeperReward]> coins<red> from <npc.name>!"
          - wait 2
          - chat "You have passed all of my challenges, and have my recomendation to join the guild."
          - wait 2
          - chat "Go speak to the Guild Master, hes waiting at the Kings Guild Fort."
          - ^flag KingsCreeperCount:!
          - ^zap 10
          - ^zap script:KingsGuildMasterChallenge step:2
          - ^disengage
    10:
      Click Trigger:
        Script:
          - chat "You'll need to talk to the Guild Master for further instructions."

#----------------------------------
#  Task scripts used to give feed-
#  back while killing zombies. 
#----------------------------------
KingsZombieCheck:
  Type: Task
  Script:
    - ^flag ZombieCount:++
    - ^if <flag.p:ZombieCount.asint> >= <npc.constant[KingsZombieQty]> run KingsZombieReward
      else run KingsZombieContinue

KingsZombieContinue:
  Type: Task
  Script:
    - ^narrate "<red>*** <white>Kill Zombies - <flag.p:ZombieCount.asint>/<npc.constant[KingsZombieQty]> <red>***"
    - ^listen kill type:entity name:zombie qty:1 script:KingsZombieCheck

KingsZombieReward:
  Type: Task
  Script:
    - ^narrate "<red>*** <white>Kill Zombies - <flag.p:ZombieCount.asint>/<npc.constant[KingsZombieQty]> <red>***"
    - wait 1
    - ^narrate "You've killed <npc.constant[KingsZombieQty]> Zombies, return to <npc.name> at the PvP Guild."
    - ^zap script:KingsInitiation step:3

#----------------------------------
#  Task scripts used to give feed-
#  back while killing skeletons. 
#----------------------------------    
KingsSkeleCheck:
  Type: Task
  Script:
    - ^flag KingsSkeleCount:++
    - ^if <flag.p:KingsSkeleCount.asint> >= <npc.constant[KingsSkeletonQty]> run KingsSkeleReward
      else run KingsSkeleContinue

KingsSkeleContinue:
  Type: Task
  Script:
    - ^narrate "<red>*** <white>Kill Skeletons - <flag.p:KingsSkeleCount.asint>/<npc.constant[KingsSkeletonQty]> <red>***"
    - ^listen kill type:entity name:skeleton qty:1 script:KingsSkeleCheck

KingsSkeleReward:
  Type: Task
  Script:
    - ^narrate "<red>*** <white>Kill Skeletons - <flag.p:KingsSkeleCount.asint>/<npc.constant[KingsSkeletonQty]> <red>***"
    - wait 1
    - narrate "You've killed <npc.constant[KingsSkeletonQty]> Skeletons, return to <npc.name> at the PvP Guild."
    - zap script:KingsInitiation step:6

#----------------------------------
#  Task scripts used to give feed-
#  back while killing creepers. 
#---------------------------------- 
KingsCreeperCheck:
  Type: Task
  Script:
    - ^flag KingsCreeperCount:++
    - ^if <flag.p:KingsCreeperCount.asint> >= <npc.constant[KingsCreeperQty]> run KingsCreeperReward
      else run KingsCreeperContinue

KingsCreeperContinue:
  Type: Task
  Script:
    - ^narrate "<red>*** <white>Kill Creepers - <flag.p:KingsCreeperCount.asint>/<npc.constant[KingsCreeperQty]> <red>***"
    - ^listen kill type:entity name:creeper qty:1 script:KingsCreeperCheck

KingsCreeperReward:
  Type: Task
  Script:
    - ^narrate "<red>*** <white>Kill Creepers - <flag.p:KingsCreeperCount.asint>/<npc.constant[KingsCreeperQty]> <red>***"
    - wait 1
    - NARRATE "You've killed <npc.constant[KingsCreeperQty]> Creepers, return to <npc.name> at the PvP Guild."
    - zap script:KingsInitiation step:9

KingsGuildMasterChallenge:
  Type: Interact
  Steps:
    1:
      click trigger:
        script:
        - chat "Who are you...?"
    2:
      Click Trigger:
        Script:
          - ^engage
          - chat "Hopefully you live a little bit longer than the last few whelps, <PLAYER.name>."
          - wait 2
          - chat "Do you see yourself fit to join our guild?"
          - narrate "<white>You can say, <green>Yes<white> or <green>No<white>."
          - ^disengage
      Chat Trigger:
        1:
           Trigger: /Yes/, I am ready for anything.
           Script:
             - ^engage
             - wait 2
             - chat "Hunt down one of your own... Family, friend, or enemy... As long as you get some innocent blood on your hands."
             - wait 2
             - chat "Return to me when your finished..."
             - ^listen kill type:player qty:1 script:KingsGuildMasterReward
             - ^zap step:3
             - ^disengage
        2:
           Trigger: /No/, I need to  think about it.
           Script:
             - ^engage
             - wait 2
             - chat "Coward..."
             - wait 1
             - narrate "<dark_purple><npc.name> looks dissapointed."
             - ^disengage
    3:     
      Click Trigger:
        Script:
          - ^engage
          - chat "No blood on your hands?"
          - wait 2
          - chat "You know what needs to be done, whelp."
          - ^disengage
    4:
      Click Trigger:
        Script:
          - ^engage
          - chat "Good."
          - wait 2
          - chat "I will admit, you had the look of a killer about you..."
          - wait 2
          - chat "You have proved your worthiness to me, and solidified your place in this guild."
          - wait 2
          - chat "Take this sword - All guild members recieve this blade when they have proven themselves."
          - wait 1
          - ^give item:KingsGuildSword
          - ^narrate "<RED>You received an enchanted <aqua>Diamond Sword<red> from the Guild Master."
          - wait 2
          - narrate "<dark_purple><npc.name> smiles at you."
          - wait 2
          - ^chat "Leave nothing but ashes..."
          - ^flag server KingsGuildMembers:->:<player>
          - ^zap script:KingsSkillsEnhance step:2
          - ^zap script:KingsDailyPvpQuest step:2
          - ^zap step:5
          - ^disengage
    5:
      Click Trigger:
        Script:
          - ^engage
          - chat "Welcome back to the PVP Guild!"
          - wait 1
          - chat "If you are looking for a Guild task, speak to <npc.constant[GuildNPC1Name]> or <npc.constant[GuildNPC2Name]>."
          - ^disengage

KingsGuildMasterReward:
  Type: Task
  Script:
    - ^narrate "You've killed a player in the name of the PVP Guild!! Return to the Guild Master."  
    - ^zap script:KingsGuildMasterChallenge step:4

KingsSkillsEnhance:
  Type: Interact
  Steps:
    1:
      click trigger:
        script:
        - narrate "<dark_purple><npc.name> stares directly into your eyes..."
        - wait 2
        - chat "Are you lost..?"
    2:
      Click Trigger:
        Script:
          - ^engage
          - chat "The Guild Master says you're the best new member we have..."
          - wait 2
          - chat "How about a little fun, <player.name>?"
          - wait 2
          - narrate "<dark_purple><npc.name> grins meniachly at you..."
          - narrate "<white>You can say, <green>Yes<white> or <green>No<white>."
          - ^disengage
      Chat Trigger:
        1:
           Trigger: /Yes/, lets have a little fun.
           Script:
             - ^engage
             - wait 2
             - chat "<npc.constant[QtyOneInWords]> bodies, thats all we need."
             - wait 2
             - chat "See you soon."
             - ^listen kill type:player qty:1 script:KingsSkillQCheck
             - ^flag KingsSkillQCount:0
             - ^zap step:3
             - ^disengage
        2:
           Trigger: /No/, I'll pass.
           Script:
             - ^engage
             - chat "Hah, you call yourself a killer."
             - wait 2
             - chat "I've killed creepers with more spine than you."
             - wait 1
             - ^narrate "<dark_purple><npc.name> points to a statue of creeper spines."
             - ^disengage
    3:     
      Click Trigger:
        Script:
          - ^engage
          - wait 2
          - chat "I expect you have your victims bound and gagged by now... Go finish the job. "
          - wait 2
          - chat "Don't keep them waiting."
          - ^disengage
    4:
      Click Trigger:
        Script:
          - ^engage
          - chat "Finally, <PLAYER.name>..."
          - wait 2
          - chat "Don't tell me how you killed them, It's more fun that way."
          - wait 2
          - chat "Of course, your reward!"
          - ^give item:KingsGuildChest
          - ^narrate "<RED>You received a set of enchanted <aqua>Diamond Chestplate<red>."
          - wait 2
          - chat "Now go do something else - I have corpses to tend to."
          - wait 2
          - narrate "...maybe you should return to <npc.name> later..."
          - ^flag KingsSkillQCount:!
          - ^flag KingsSkillQ2
          - ^zap 5
          - ^disengage
    5:
      Click Trigger:
        Script:
          - ^engage
          - narrate "<dark_purple><npc.name> giggles excitedly!"
          - wait 2
          - chat "Back for more blood, <PLAYER.name>?"
          - wait 1
          - ^narrate "<white>You can say, <green>Yes<white> or <green>No<white>."
          - ^disengage
      Chat Trigger:
        1:
           Trigger: /Yes/, I am.
           Script:
             - ^engage
             - wait 2
             - chat "How delightful! I need more meat for the hounds..."
             - wait 2
             - chat "Go tender up some meat."
             - wait 2
             - chat "By 'meat', I mean humans..."
             - wait 2
             - ^narrate "<dark_purple><npc.name> licks his lips."
             - ^listen kill type:player qty:1 script:KingsSkillQCheck
             - ^zap step:6
             - ^disengage
        2:
           Trigger: /No/, I'll pass.
           Script:
             - ^engage
             - chat "I guess the dogs will be eating you tonight."
             - wait 2
             - ^narrate "<dark_purple><npc.name> begins sharpening a knife..."
             - ^disengage
    6:     
      Click Trigger:
        Script:
          - ^engage
          - chat "Back so soon...?"
          - wait 2
          - chat "If you don't get us the meat soon, the hounds will starve..."
          - wait 2
          - ^chat "They only eat fresh meat, and we are all out of prisoners. Get moving!"
          - ^disengage
    7:
      Click Trigger:
        Script:
          - ^engage
          - narrate "<dark_purple><npc.name> begins nibbling on the 'meat' you gathered..."
          - wait 2
          - chat "Fantastic..."
          - wait 2
          - narrate "<dark_purple><npc.name> takes a large chunk of 'meat' and begins chewing on it..."
          - wait 2
          - narrate "<dark_purple><npc.name> reaches into his pocket..."
          - wait 1
          - ^give item:KingsGuildLegs
          - ^narrate "<RED>You received enchanted <aqua>Diamond Legplates."
          - wait 2
          - narrate "<dark_purple><npc.name> shoos you away... Still chewing..."
          - wait 2
          - narrate "<BLUE>You can't help but think - That human flesh wasn't for the dogs..."
          - ^flag KingsSkillQCount:!
          - ^flag KingsSkillQ2:!
          - ^zap 8
          - ^disengage
    8:
      Click Trigger:
        Script:
          - ^engage
          - narrate "<dark_purple><npc.name> gnaws on a large chunk of what looks like beef jerky."
          - wait 2
          - narrate "<dark_purple><npc.name> smiles at you. Little pieces of 'meat' dotting his grin."
          - narrate "<RED>You have finished this quest."
          - ^disengage

KingsSkillQCheck:
  Type: Task
  Script:
    - ^flag KingsSkillQCount:++
    - ^if <player.flag[KingsSkillQ2]> {
      - ^if <player.flag[KingsSkillQCount].asint> >= <npc.constant[QuestTwoQty]> run SkillQReward
        else run KingsSkillQContinue
      } else {
      - ^if <player.flag[KingsSkillQCount].asint> >= <npc.constant[QuestOneQty]> run SkillQReward
        else run KingsSkillQContinue
      }

KingsSkillQContinue:
  Type: Task
  Script:
    - ^if <player.flag[KingsSkillQ2]> {
      - ^narrate "<red>*** <white>Kill Players - <flag.p:KingsSkillQCount.asint>/<npc.constant[QuestTwoQty]> <red>***"
      } else {
      - ^narrate "<red>*** <white>Kill Players - <flag.p:KingsSkillQCount.asint>/<npc.constant[QuestOneQty]> <red>***"
      }
    - ^listen kill type:player qty:1 script:KingsSkillQCheck

SkillQReward:
  Type: Task
  Script:
    - ^if <player.flag[KingsSkillQ2]> {
      - ^narrate "<red>*** <white>Kill Players - <flag.p:KingsSkillQCount.asint>/<npc.constant[QuestTwoQty]> <red>***"
      - wait 1
      - narrate "You've killed <npc.constant[QuestTwoQty]> Players, return to <npc.name> at the PvP Guild."
      - zap script:KingsSkillsEnhance step:7
      } else {
      - ^narrate "<red>*** <white>Kill Players - <flag.p:KingsSkillQCount.asint>/<npc.constant[QuestOneQty]> <red>***"
      - wait 1
      - narrate "You've killed <npc.constant[QuestOneQty]> Players, return to <npc.name> at the PvP Guild."
      - zap script:KingsSkillsEnhance step:4
      }

KingsDailyPvpQuest:
  Type: Interact
  Steps:
    1:
      Click Trigger:
        Script:
          - engage
          - ^random {
            - narrate "<dark_purple><npc.name> smiles at you."
            - narrate "<dark_purple><npc.name> jumps in circles!"
            - narrate "<dark_purple><npc.name> shivers wildly."
            }
          - wait 2
          - ^random {
            - chat "Hey! Fancy seeing you here! Go play."
            - chat "Don't make me call my friends!"
            - chat "You! You! You don't seem to belong here..."
            }
    2:
      Click Trigger:
        Script:
          - engage
          - ^random {
            - chat "Its so good to see you <PLAYER.name>!"
            - chat "Hey there!"
            - chat "Oh! Hey! <PLAYER.name>! Come over here!"
            - chat "I'm so excited! I just can't contain myself!"
            }
          - wait 2
          - ^random {
            - chat "Are you up for some 'activities'?"
            - chat "Are you here for your 'medication'?"
            - chat "Would you like some 'candy'?"
            }
          - wait 2
          - narrate "<BLUE>*** This is a daily quest! ***"
          - wait 1
          - narrate "<white>You can say, <green>Yes<white> or <green>No<white>."
          - disengage
      Chat Trigger:
        1:
           Trigger: /Yes/... I think...
           Script:
             - engage
             - wait 2
             - chat "Great! Now go beat the living hell out of <npc.constant[KingsPVPQty]> people!"
             - wait 2
             - narrate "<dark_purple><npc.name> jumps in circles!"
             - wait 2
             - narrate "<BLUE>Go kill <npc.constant[KingsPVPQty]> players, then return to <npc.name>!"
             - wait 2
             - narrate "<RED>*** Cheating *** -> AKA farming town members, or asking to kill other people for quest credit will result in a warning!"
             - ^listen kill type:player qty:1 script:KingsDPCheck id:DP_<player>
             - ^flag KingsPVPCount:0
             - ^zap step:3
             - disengage
        2:
           Trigger: /No/... Your crazy.
           Script:
             - chat "Whatever, Bro."
    3:     
      Click Trigger:
        Script:
          - engage
          - ^random {
            - chat "Go! Go! Go! Kill! Yeah!"
            - chat "Woohoo! So excited! Go <PLAYER.name>!"
            - chat "<PLAYER.name>! Erm.. Your not done? Booooo!"
            }
          - disengage
    4:
      Click Trigger:
        Script:
          - engage
          - ^random {
            - narrate "<dark_purple><npc.name> punches you in the mouth!"
            - narrate "<dark_purple><npc.name> looks at you lovingly..."
            - chat "Yes! Finally! Oh my god!"
            - narrate "<dark_purple><npc.name> flails his arms wildly!"
            - chat "Your finished! Hooray!"
            }
          - wait 2
          - narrate "<BLUE>This guy is obviously insane..."
          - wait 2
          - narrate "<dark_purple><npc.name> throws a bag of random loot at you..."
          - wait 1
          - ^give <npc.constant[KingsArmorList]> qty:<npc.constant[KingsArmorQty]>
          - ^give <npc.constant[KingsResourceList]> qty:<npc.constant[KingsResourceQty]>
          - ^give <npc.constant[KingsMiscList]> qty:<npc.constant[KingsMiscQty]>
          - wait 2
          - ^narrate "<dark_purple><npc.name> cheers excitedly!"
          - wait 2
          - ^narrate "<BLUE>You have finished the PVP Daily quest! Come back tomorrow and claim your bag of loot!"
          - ^zap step:5
          - ^flag KingsDPCooldown duration:24h
          - ^flag server KingsDPCooldownList:->:<player>
          - disengage
    5:
      click trigger:
        script:
        - chat "Come back tomorrow for more fun!"
        - wait 2
        - narrate "<dark_purple><npc.name> smiles at you."
        - wait 1
        - narrate "<BLUE>You've already completed the Daily PVP Quest for today!!"

KingsDPCheck:
  Type: Task
  Script:
    - ^flag KingsPVPCount:++
    - ^if <flag.p:KingsPVPCount.asint> >= <npc.constant[KingsPVPQty]> runtask KingsDPReward
      else runtask KingsDPContinue

KingsDPContinue:
  Type: Task
  Script:
    - ^narrate "<red>*** <white>Kill Players - <flag.p:KingsPVPCount.asint>/<npc.constant[KingsPVPQty]> <red>***"
    - ^listen kill type:player qty:1 script:KingsDPCheck id:DP_<player>

KingsDPReward:
  Type: Task
  Script:
    - ^narrate "<red>*** <white>Kill Players - <flag.p:KingsPVPCount.asint>/<npc.constant[KingsPVPQty]> <red>***"
    - wait 1
    - ^narrate "You've killed <npc.constant[KingsPVPQty]> Players, return to <npc.name> at the PvP Guild."
    - ^flag KingsPVPCount:!
    - ^zap script:KingsDailyPvpQuest step:4

KingsDPWorld:
    type: world
    events:
        on time changes in w@world:
        - if <server.flag[KingsDPCooldownList]> == "null" queue clear
        - foreach <server.flag[KingsDPCooldownList].as_list> {
          - if !<%value%.as_player.flag[KingsDPCooldown]> && <s@KingsDailyPvpQuest.step[%value%]> != "2" {
            - zap script:KingsDailyPvpQuest step:2 player:%value%
            - flag server KingsDPCooldownList:<-:%value%
            - if <%value%.as_player.is_online> {
              - narrate player:%value% "<blue>You feel a weird chill go down your spine..."
              - narrate player:%value% "<red>The PVP Guild calls for you, return soon!"
              }
            }
          }