Paste #7480: Untitled Paste

Date: 2014/07/26 01:40:31 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


# +----------------------------------
# |   Quest: Gaining Trust
# +----------------------------------

Ship_Captain_Orgoroth:
    type: assignment
    interact scripts:
    - 10 Orgoroth_Intro
    actions:
        on assignment:
        - trigger name:chat state:False radius:20
        - trigger name:click state:False
        - trigger name:proximity state:False
        - lookclose <npc> state:true

Orgoroth_Intro:
    type: task
    Script:
      - ^spawn <npc> <npc.anchor[starto]>
      - wait 2
      - lookclose <npc> state:true
      - walk <npc.anchor[endo]> auto_range
      - narrate "<aqua>The door creaks as the captain steps through into the hull."
      - wait 2
      - look <player> <npc.location>
      - narrate "<green>[Captain] -> You<&co> <yellow> We have arrived at Orgoroth."
      - wait 2
      - narrate "<green>[Captain] -> You<&co> <yellow> We are always looking for more deckhands,"
      - wait 2
      - narrate "<green>[Captain] -> You<&co> <yellow> If you need to travel between cities."
      - wait 2
      - narrate "<green>[Captain] -> You<&co> <yellow> Come find me on the top deck if you are interested."
      - wait 1
      - switch l@0,0,0,world state:off
      - switch l@0,0,0,world state:on
      - walk <npc.anchor[despawn]> auto_range
      - wait 1
      - Despawn <npc>
      - finish
Urghat:
    type: assignment
    interact scripts:
    - 10 Urghat_Script
    actions:
        on assignment:
        - trigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:false
        on death:
        - ^execute as_npc "npc respawn -1"
        - ^execute as_server "npc select 0"
        - ^execute as_server "sentry target remove player:<player.name>"
# Not sure if I need to make the npc invulnerable again since he respawned, or if it's auto. We'll have to test that out if you don't know        
        - wait 1
        - narrate "<green>You fight well. Urghat teach outsider."
        - flag player Outsider
        - flag player Cheat_Death:!
        - flag player Fight_Urghat_1:!
        - zap step:END script:Urghat_Script
        - run A_New_Beginning_Comepleted_Orgoroth

Urghat_Script:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                      - if <player.flag[A_New_Story_Begins_Orgoroth]> {
                        - flag player Name_Warning:!
                        - playsound <player> sound:seagulls custom
                        - lookclose <npc> state:false
                        - look <npc> l@0,0,0,world
                        - narrate "<aqua>As you step off the boat, you notice a grunt sent to oversee the undocking of supplies."
                        - wait 2
                        - narrate "<aqua>A strong warrior approaches the grunt."
                        - wait 2
                        - narrate "<green>[Urghat] -> [Grunt]<&co> <yellow>We got everything?"
                        - wait 3
                        - narrate "<green>[Grunt] -> [Urghat]<&co> <yellow>All here, Urghat. Grunt have it stocked next sun-down."
                        - wait 1
                        - narrate "<aqua>Urghat turns her head towards you."
                        - lookclose <npc> state:true
                        - wait 1
                        - narrate "<green>[Urghat] -> You<&co> <yellow>Hmph. Outsider what be your name?"
                        - narrate "<red>Write your character name. Seperate spaces with underscores. E.g. Firstname_Lastname"
                        - zap step:2
                        }
        2:
            chat Trigger:
                1:
                    Trigger: "/regex:.* .*/"
                    Script:
                      - narrate "<red> ONLY write your character name. Separate spaces with underscores. E.g. FirstName_LastName"
                2:
                    Trigger: "/regex:.*anus.*|.*Anus.*|.*fuck.*|.*Fuck.*|.*shit.*|.*Shit.*|.*Balls.*|.*balls.*|.*penis.*|.*Penis.*|.*Arse.*|.*Anus.*|.*Pirate.*|.*pirate.*|.*Dick.*|.*dick.*|lol.*bitch.*|.*Bitch.*|.*Boner.*|.*Arithia.*|.*arithia.*|.*Butt.*|.*butt.*|.*Camel.*|.*camel.*|.*wonderdude.*|.*Wonderdude.*|.*Owner.*|.*owner.*|.*Douche.*|.*douche.*|.*douche.*|.*Damn.*|.*damn.*|.*dildo.*|.*Dildo.*|.*Fag.*|.*fag.*|.*dumass.*|.*Dumass.*|.*Dumbass.*|.*dumbass.*|.*fatass.*|.*Fatass.*|.*fuk.*|.*Fuk.*|.*cunt.*|.*Cunt.*|.*nigger.*|.*Nigger.*|.*niggah.*|.*Niggah.*|.*pussy.*|.*Pussy.*|.*shit.*|.*Shit.*|.*queef.*|.*Queef.*|.*queer.*|.*Queer.*|.*skank.*|.*Skank.*|.*slut.*|.*Slut.*|.*testicle.*|.*Testicle.*|.*titties.*|.*Titties.*|.*Vagina.*|.*vagina.*|.*whore.*|.*Whore.*|.*Fat_ass.*|.*fat_ass.*|.*faggot.*|.*Faggot.*|.*Fucker.*|.*fucker.*|.*erection.*|.*Erection.*|.*Drem_.*|.*drem_.*|.*OoUNSTOPABL3oO.*|.*Admin.*|.*admin.*|.*God.*|.*jesus.*|.*jesus.*|.*bieber.*|.*Bieber.*|.*Person.*|.*person.*|.*Bacon.*|.*bacon.*|.*Bing.*|.*Bing.*|.*pong.*|.*Pong.*|.*Asshat.*|.*asshat.*|.*AssHat.*|.*Ass_Hat.*|.*ass_hat.*|.*Assmunch.*|.*assmunch.*|.*Ass_Munch.*|.*Anal.*|.*anal.*|.*Genital.*|.*genital.*|.*Clam.*|.*clam.*|.*Hairy.*|.*hairy.*|.*tampon.*|.*Tampon.*|.*Vulva.*|.*vulva.*|.*snatch.*|.*Snatch.*|.*clit.*|.*Clit.*|.*0.*|.*1.*|.*3.*|.*4.*|.*5.*|.*6.*|.*7.*|.*8.*|.*9.*|.*cunnilingus.*|.*Cunnilingus.*|.*Moose.*|.*Bongos.*|.*bongos.*|.*fart.*|.*Fart.*|.*Phalus.*|.*phalus.*|.*troll.*|.*Troll.*|.*Throbb.*|.*throbb.*|.*ramrod.*|.*Ramrod.*|.*RamRod.*|.*Dingle.*|.*dingle.*|.*spunk.*|.*Shoot.*|.*shoot.*|.*twat.*|.*Twat.*|.*sperm.*|.*Sperm.*|.*Twink.*|.*twink.*|.*Morning.*|.*moan.*|.*Moan.*|.*morning.*|.*wood.*|.*Wood.*|.*Trouser.*|.*trouser.*|.*snake.*|.*Snake.*|.*Snack.*|.*snack.*|.*Fanny.*|.*fanny.*|.*Head.*|.*head.*|.*gobble.*|.*Gobble.*|.*Choke.*|.*choke.*|.*Shower.*|.*Spank.*|.*spank.*|.*Dominatrix.*|.*dominatrix.*|.*drugs.*|.*Drugs.*|.*shower.*|.*Cooter.*|.*cooter.*|.*Beaver.*|.*beaver.*|.*tunnel.*|.*Tunnel.*|.*suck.*|.*Suck.*|.*Hole.*|.*hole.*|.*vibrator.*|.*vibrator.*|.*furry.*|.*Furry.*|.*mound.*|.*Mound.*|.*Biscuit.*|.*biscuit.*|.*Horny.*|.*horny.*|.*Meat.*|.*meat.*|.*Groin.*|.*groin.*|.*Joystick.*|.*joystick.*|.*love.*|.*Love.*|.*kock.*|.*Kock.*|.*Pimp.*|.*pimp.*|.*mod.*|.*Mod.*|.*moderator.*|.*Moderator.*|.*swag.*|.*Swag.*|.*Yolo.*|.*yolo.*|.*Gandalf.*|.*gandalf.*|.*Satan.*|.*staff.*|.*Staff.*|.*Death.*|.*death.*|.*Doctor.*|.*doctor.*|.*Ass.*|.*Juicy.*|.*juicy.*|.*Major.*|.*major.*/"
                    Script:
                      - if <player.flag[Name_Warning]> {
                        - execute as_server "ban <player.name> For choosing an inapropiate name (<context.message>), this is automated so if you feel this is unjustified please contact staff on www.arithia.com"
                        }
                      - if !<player.flag[Name_Warning]> {
                        - narrate "<&4>--=== WARNING ===--"
                        - narrate "<red>Please choose an approiate rp name!"
                        - narrate "<red>If you think <context.message> is approiate for a serious character name, contact staff!"
                        - narrate "<red>Write your character name. Seperate spaces with underscores. E.g. Firstname_Lastname"
                        - flag player Name_Warning
                        - zap step:2
                        }
                3:
                    Trigger: "/regex:.*King.*|.*Queen.*|.*queen.*|.*king.*|.*Prince.*|.*prince.*|.*slayer.*|.*Slayer.*|.*champion.*|.*Champion.*|.*ripper.*|.*Ripper.*|.*Paladin.*|.*paladin.*|.*Princess.*|.*princess.*|.*Emperor.*|.*Empress.*|.*Master.*|.*Lord.*|.*dwarf.*|.*Dwarf.*|.*mage.*|.*Mage.*|.*Wizard.*|.*wizard.*|.*hero.*|.*Hero.*|.*Assasin.*|.*assasin.*|.*Cleric.*|.*cleric.*|.*Sir.*|.*sir.*|.*Lady.*|.*lady.*|.*Baron.*|.*baron.*|.*Maquise.*|.*Captain.*|.*captain.*/"
                    Script:
                      - narrate "<red>You cannot name your character <context.message>, Please don't use titles in your character name."
                      - narrate "<red>Write your character name. Seperate spaces with underscores. E.g. Firstname_Lastname"
                      - zap step:2
                4:
                    Trigger: "/regex:.+/"
                    Script:
                      - execute as_server "name <player.name> <context.message>"
                      - if <player.flag[Character]> == 1 {
                        - flag player "Char1_Name:<context.message>"
                        }
                      - if <player.flag[Character]> == 2 {
                        - flag player "Char2_Name:<context.message>"
                        }
                      - narrate "<red>Are you sure you want to name your character <context.message>?"
                      - zap step:ConfirmName
            Click Trigger:
                Script:
                - narrate "<green>[Urghat] -> You<&co> <yellow>Write your character name. Seperate spaces with underscores. E.g. <red>Firstname_Lastname"
                - zap step:2
        ConfirmName:
            chat Trigger:
                1:
                    Trigger: "/regex:.*Yes.*|.*yes.*|.*Yeah.*|.*yeah.*|.*okay.*|.*Okay.*|.*sure.*|.*alright.*/"
                    Script:
                      - wait 1
                      - narrate "<green>[Urghat] -> You<&co> <yellow>Is <player.name> great fighter?"
                      - zap step:4
                2:
                    Trigger: "/regex:.+/"
                    Script:
                      - execute as_server "removename <player.name>"
                      - narrate "<red>Write your character name. Separate spaces with underscores. E.g. Firstname_Lastname"
                      - zap step:2
        4:
            chat trigger:
                1:
                    trigger: "/regex:.*Yes.*|.*yes.*|.*yeah.*|.*Yeah.*|.*okay.*|.*Okay.*|.*sure.*|.*Sure.*|.*alright.*|.*Alright.*|.*fine.*|.*Fine.*/"
                    script:
                      - wait 1
                      - narrate "<green>[Urghat] -> You<&co> <yellow>Hmph. Outsider may learn ways if outsider fight Grunt in fist-fight again. You fight Grunt?"
                      - zap step:Question
                2:
                    trigger: "/regex:.+/"
                    script:
                      - wait 1
                      - narrate "<green>[Urghat] -> You<&co> <yellow>Puny weakling. Urghat teach you ways so you not die."
                      - if <player.in_group[GenderFemale]> {
                        - narrate "<green>[Urghat] -> You<&co> <yellow>Besides - Urghat like small girls..."
                        }
                      - flag player Weakling
                      - zap step:END script:Urghat_Script
                      - run A_New_Beginning_Comepleted_Orgoroth
        Question:
            chat trigger:
                1:
                    trigger: "/regex:.*Yes.*|.*yes.*|.*yeah.*|.*Yeah.*|.*okay.*|.*Okay.*|.*sure.*|.*Sure.*|.*alright.*|.*Alright.*|.*fine.*|.*Fine.*/"
                    script:
                      - wait 1
                      - narrate "<green>[Urghat] -> You<&co> <yellow>Get ready. Grunt fight you, now."
                      - flag player Cheat_Death
                      - flag player Fight_Urghat_1
                      - wait 2
                      - narrate "<red>Fight begins in 3..."
                      - wait 3
                      - narrate "<red>Fight begins in 2..."
                      - wait 3
                      - narrate "<red>Fight begins in 1..."
                      - wait 3
                      - narrate "<red>Fight!"
                      - ^execute as_server "npc select 0"
                      - ^execute as_server "sentry target add player:<player.name>"
                      - ^execute as_server "npc vulnerable"
                      - ^execute as_server "npc health --set 30"
                2:
                    trigger: "/regex:.+/"
                    script:
                      - wait 1
                      - narrate "<green>[Urghat] -> You<&co> <yellow>Puny weakling. Urghat teach you ways so you not die."
                      - if <player.in_group[GenderFemale]> {
                        - narrate "<green>[Urghat] -> You<&co> <yellow>Besides - Urghat like small girls..."
                        }
                      - flag player Weakling
                      - zap step:END script:Urghat_Script
                      - run A_New_Beginning_Comepleted_Orgoroth
        END:
            click trigger:
                script:
                  - wait 1
                  - narrate "<green>[Urghat] -> You<&co> <yellow>You meet Urghat at training grounds and Urghat teach you ways now!"

# By the way, I figured these flags were already given when they chose the city they wanted. Tell me if otherwise please                  
A_New_Beginning_Comepleted_Orgoroth:
    type: task
    script:
      - if <player.flag[A_New_Story_Begins_Orgoroth]> {
        - flag player Quest_A_New_Story_Begins_Completed_Orgoroth
        - flag player Quest_A_New_Story_Begins:!
        - flag player Quest_A_New_Story_Begins_Orgoroth:!
        - narrate "<blue> Quest completed<&co> <Gold>A new Story Begins"
        - flag player Orgoroth_Reputation:0
        - flag player Orgoroth_Reputation:+:25
        - wait 1
        - give i@Orgoroth_Reputation_Book qty:1
        - wait 1
        - narrate "<green>[Urghat] -> You<&co> <yellow>Urghat want you to take supplies to armory. You do and Urghat teach you ways."
        - wait 2
        - narrate "<green>[Urghat] -> You<&co> <yellow>You meet Urghat at training grounds and Urghat teach you."
        - give i@Supply_Crate qty:1
        - narrate "<Dark_Green>You've received a <gold>Supply Crate <Dark_Green> from Urghat"
        - flag player Quest_Gearing_Up_Orgoroth:0
        - narrate "<blue> Quest started<&co> <gold> Gearing Up!"
        - narrate "<blue> Quest Objective<&co> <gold> Take the supplies to the armory."
        }

# +----------------------------------
# |   Armory
# +----------------------------------

Armory_Grunt:
    type: assignment
    interact scripts:
    - 10 Armory_Grunt_Script
    actions:
        on assignment:
        - trigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:true
        on death:
        - ^execute as_npc "npc respawn -1"
        - ^execute as_server "npc select 0"
        - ^execute as_server "sentry target remove player:<player.name>"
        - flag player Grunt_Defeated
        - flag player Cheat_Death:!
        - flag player Fight_Grunt:!
        - zap step:Armory_Grunt_Defeated script:Armory_Grunt_Script

Armory_Grunt_Script:
    type: interact
    steps:
        1:
            click trigger:
                script:
                  - if <player.flag[Quest_Gearing_Up_Orgoroth]> == 0 {
                    - narrate "<green>[Armory Grunt] -> You<&co> <yellow>You have supplies for Grunt? Urghat send outsider?"
                    }
                  - if <player.flag[Quest_Gearing_Up_Orgoroth]> == 1 {
                    - narrate "<green>[Armory Grunt] -> You<&co> <yellow>You go find Urghat at Training Grounds."
                    }
                  - if <player.flag[Quest_Gearing_Up_Orgoroth]> == 2 {
                    - narrate "<green>[Armory Grunt] -> You<&co> <yellow>Outsider cheated! You go find Urghat and bring him armor crate. He teach you lesson!"
                    }
            chat trigger:
                1:
                    trigger: "/regex:.*Yes.*|.*yes.*|.*yeah.*|.*Yeah.*|.*okay.*|.*Okay.*|.*sure.*|.*Sure.*|.*alright.*|.*Alright.*|.*fine.*|.*Fine.*/"
                    script:
                      - if <player.inventory.contains[i@Supply_Crate]> {
                        - take i@Supply_Crate qty:1
                        - narrate "<green>[Armory Grunt] -> You<&co> <yellow>Grunt thank outsider. Grunt get supplies faster."
                        - wait 2
                        - narrate "<green>[Armory Grunt] -> You<&co> <yellow>Outsider can have set of armor. Grunt no need anymore."
                        - give i@chainmail_helmet qty:1
                        - give i@chainmail_chestplate qty:1 
                        - give i@chainmail_leggings qty:1
                        - give i@chainmail_boots qty:1
                        - flag player Quest_Gearing_Up_Orgoroth:1
                        - wait 2
                        - narrate "<dark_green>You have received a set of <gold>Chainmail Armor from Armory Grunt!"
                        - wait 2
                        - narrate "<blue>New Quest Objective<&co> <gold>Find Urghat at the Training Grounds."
                        }
                2:
                    trigger: "/regex:.+/"
                    script:
                      - wait 1
                      - narrate "<green>[Armory Grunt] -> You<&co> <yellow>Me think outsider steal from Grunt. Grunt teach outsider a lesson!"
                      - wait 2
                      - flag player Cheat_Death
                      - flag player Fight_Grunt
                      - wait 2
                      - narrate "<red>Fight begins in 3..."
                      - wait 3
                      - narrate "<red>Fight begins in 2..."
                      - wait 3
                      - narrate "<red>Fight begins in 1..."
                      - wait 3
                      - narrate "<red>Fight!"
                      - ^execute as_server "npc select 0"
                      - ^execute as_server "sentry target add player:<player.name>"
                      - ^execute as_server "npc vulnerable"
                      - ^execute as_server "npc health --set 30"
        Armory_Grunt_Defeated:
            click trigger:
                script:
                  - if <player.flag[Grunt_Defeated]> {
                    - if <player.in_group[GenderMale]> {
                      - wait 1
                      - narrate "<green>[Armory Grunt] -> You<&co> <yellow>Outsider is strong. Outsider give Grunt honorable fight. Grunt give outsider armor."
                      - give i@chainmail_helmet qty:1
                      - give i@chainmail_chestplate qty:1 
                      - give i@chainmail_leggings qty:1
                      - give i@chainmail_boots qty:1
                      - flag player Quest_Gearing_Up_Orgoroth:1
                      - narrate "<dark_green>You have received a set of Chainmail Armor from the Armory Grunt."
                      - wait 2
                      - narrate "<blue>New Quest Objective<&co> <gold>Fing Urghat at the Training Grounds."
                      }
                      else {
                      - wait 1
                      - narrate "<green>[Armory Grunt] -> You<&co> <yellow>Outsider cheat. Grunt is dishonored - Grunt lose to woman."
                      - wait 2
                      - narrate "<green>[Armory Grunt] -> You<&co> <yellow>Grunt needs more training. You take armor to Urghat. He teach you lesson."
                      - give i@Armor_Crate qty:1
                      - flag player Quest_Gearing_Up_Orgoroth:2
                      - wait 2
                      - narrate "<green>[Armory Grunt] -> You<&co> <yellow>You've received an armor crate from the Armory Grunt!"
                      - wait 2
                      - narrate "<blue>New Quest Objective<&co> <gold>Take the armor crate to Urghat in the Training Grounds."
                      }
                    }

# +----------------------------------
# |   Training Grounds
# +----------------------------------

Training_Grounds_Script:
    type: interact
    steps:
        1:
            click trigger:
                script:
                  - if <player.flag[Quest_Gearing_Up_Orgoroth]> == 1 {
                    - if <player.flag[Weakling]> {
                      - wait 1
                      - narrate "<green>[Urghat] -> You<&co> <yellow>Weakling returns to Urghat! Weakling has armor from Grunt? Weakling did good."
                      - flag player Orgoroth_Reputation:+:50
                      - wait 2
                      - narrate "<gold>You gained <blue>50 Orgoroth Reputation <gold>for comepleteing the quest!"
                      - zap step:Urghat_Teaches
                      }
                      else {
                      - wait 1
                      - narrate "<green>[Urghat] -> You<&co> <yellow>Outsider returns to Urghat! Outsider has armor from Grunt? Outsider did good."
                      - flag player Orgoroth_Reputation:+:50
                      - wait 2
                      - narrate "<gold>You gained <blue>50 Orgoroth Reputation <gold>for comepleteing the quest!"
                      - zap step:Urghat_Teaches
                      }
                    }
                  - if <player.flag[Quest_Gearing_Up_Orgoroth]> == 2 {
                    - if <player.inventory.contains[i@Armor_Crate]> {
                      - narrate "<aqua>You give the armor crate to Urghat."
                      - take i@Armor_Crate qty:1
                      - if <player.flag[Weakling]> {
                        - wait 2
                        - narrate "Hmph. Weakling is weak. Must Urghat do everything? Armor for weakling. Weakling will need it."
                        - give i@chainmail_helmet qty:1
                        - give i@chainmail_chestplate qty:1 
                        - give i@chainmail_leggings qty:1
                        - give i@chainmail_boots qty:1
                        - wait 2
                        - narrate "<dark_green>You have received a set of Chainmail Armor from Urghat."
                        - flag player Orgoroth_Reputation:+:50
                        - wait 2
                        - narrate "<gold>You gained <blue>50 Orgoroth Reputation <gold>for comepleteing the quest!"
                        - zap step:Urghat_Teaches
                        }
                        else {
                        - wait 2
                        - narrate "Hmph. Outsider is weak. Must Urghat do everything? Armor for outsider. Outsider will need it."
                        - give i@chainmail_helmet qty:1
                        - give i@chainmail_chestplate qty:1 
                        - give i@chainmail_leggings qty:1
                        - give i@chainmail_boots qty:1
                        - wait 2
                        - narrate "<dark_green>You have received a set of Chainmail Armor from Urghat."
                        - flag player Orgoroth_Reputation:+:50
                        - wait 2
                        - narrate "<gold>You gained <blue>50 Orgoroth Reputation <gold>for comepleteing the quest!"
                        - zap step:Urghat_Teaches
                        }
                      }
                    }
                  - if <player.flag[Quest_Gearing_Up_Orgoroth]> == 0 {
                    - narrate "<green>[Urghat] -> You<&co> <yellow>You take supplies to armory."
                  - if <player.flag[Quest_Gearing_Up_Orgoroth]> == 3 {
                    - if <player.flag[Weakling]> {
                      - wait 2
                      - narrate "<green>[Urghat] -> You<&co> <yellow>You do well for weakling!"
                      }
                    - wait 2
                    - narrate "<green>[Urghat] -> You<&co> <yellow><player.name> help Urghat slay bad thing. Urghat give <player.name> man-coin."
                    - wait 1
                    - give money qty:50
                    - narrate "<dark_green>You've received 50 ducats from Urghat!"
                    - wait 2
                    - narrate "<green>[Urghat] -> You<&co> <yellow><player.name> came as outsider, but help protect village. Outsider one of us now! Urghat respect <player.name>!"
                    - wait 2
                    - narrate "<aqua>Urghat pounds a heavy fist on his chest as a sign of respect."
                    - wait 2
                    - narrate "<gold>You gained <blue>300 Orgoroth Reputation <gold>for comepleteing the quest!"
                    - flag player Orgoroth_Reputation:+:300
                    - wait 2
                    - narrate "<dark_green>You are now a Commoner of Orgoroth!"
                    - wait 2
                    - narrate "<green>[Urghat] -> You<&co> <yellow>Since <player.name> is one of us now, <player.name> can buy house in Orgoroth!"
                    - wait 2
                    - narrate "<green>[Urghat] -> You<&co> <yellow>Speak to Great Cheiftan's Shaman! He help you get house and job!"
                    - wait 2
                    - narrate "<orange>The Shaman is the Great Cheiftan's advisor."
                    - wait 2
                    - narrate "<orange>The Shaman preforms various menial tasks for the Great Cheiftan."
                    - wait 2
                    - narrate "<orange>If you need a job, or would like to buy a house, you should visit the Shaman."
                    - flag player Quest_Gearing_Up_Orgoroth:!
                    }
A_Bad_Initiaion_Orgoroth:
    type: interact
    steps:
        1:
            click trigger:
                script:
                  - flag player Quest_A_Bad_Initiaion_Orgoroth
                  - if <player.flag[Weakling]> {
                    - wait 2
                    - narrate "<green>[Urghat] -> You<&co> <yellow>Now Urghat teach Weakling."
                    - run Grunt_Task
                    }
                    else {
                    - wait 2
                    - narrate "<green>[Urghat] -> You<&co> <yellow> Now Urghat teach Outsider."
                    - run Grunt_Task
                    }
        Follow_Urghat:
            proximity trigger:
                entry:
                    script:
                      - if <player.flag[Quest_Gearing_Up_Orgoroth]> > 0 {
                        - if <player.flag[Weakling]> {
                          - wait 2
                          - narrate "<green>[Urghat] -> You<&co> <yellow>Come! Urghat show weakling how to be strong! Urghat teach weakling!"
                          - wait 2
                          - narrate "<green>[Urghat] -> You<&co> <yellow>You find hole in Qamyom wall! You wait for Urghat - Urghat meet you there!"
                          - wait 2
                          - narrate "<blue>Quest Started<&co> <gold>A Bad Initiation
                          - wait 2
                          - narrate "<blue>Quest Objective<&co> <gold>Find the collapsed canyon wall."
                          }
                          else {
                          - wait 2
                          - narrate "<green>[Urghat] -> You<&co> <yellow>Come! Urghat show outsider how to be strong! Urghat teach outsider!
                          - wait 2
                          - narrate "<green>[Urghat] -> You<&co> <yellow>You find hole in Qamyom wall! You wait for Urghat - Urghat meet you there!"
                          - wait 2
                          - narrate "<blue>Quest Started<&co> <gold>A Bad Initiation
                          - wait 2
                          - narrate "<blue>Quest Objective<&co> <gold>Find the collapsed canyon wall."
                          }
                        }
Random_Grunt:
    type: assignment
    interact scripts:
    - 10 Grunt_Task
    actions:
        on assignment:
        - tigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:false

Grunt_Task:
    type: task
    script:
      - spawn <npc> <npc.anchor[random_grunt_spawn]>
      - walk <npc.anchor[random_grunt_come]> auto_range
      - wait 1
      - narrate "<green>[Grunt] -> [Urghat]<&co> <yellow>Urghat! Qamyom wall collapsed! Bad thing inside! Bad thing need to die!"
      - walk <npc.anchor[random_grunt_leave]> auto_range
      - wait 1
      - despawn <npc>
      - zap step:Follow_Urghat script:A_Bad_Initiaion_Orgoroth
      - finish

Qamyom_Wall_Script:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                      - if <player.flag[Weakling]> {
                        - narrate "<green>[Urghat] -> You<&co> <yellow>Weakling is slow. Here. Weakling will need bow and arrows to defend from bad thing. You stay behind Urghat."
                        - wait 1
                        - give i@bow qty:1
                        - narrate "<dark_green>You've received a bow from Urghat!"
                        - wait 1
                        - give i@arrow qty:20
                        - narrate "<dark_green>You've received 20 arrows from Urghat!"
                        - wait 2
                        - narrate "<green>[Urghat] -> You<&co> <yellow>Weakling go that way. That way is safer. Weakling slow Urghat down if weakling go with Urghat.
                        - wait 2
                        - narrate "<green>[Urghat] -> You<&co> <yellow>We meet at end of tunnel to slay bad thing."
                        }
                        else {
                        - narrate "<green>[Urghat] -> You<&co> <yellow>Outsider is slow. Here. Outsider take sword to slay bad thing! You strong! Outsider help Urghat!"
                        - wait 1
                        - give i@iron_sword qty:1
                        - narrate "<dark_green>You've received a, iron sword from Urghat!"
                        - wait 2
                        - narrate "<green>[Urghat] -> You<&co> <yellow>Outsider go that way, make sure that was is cleared. Urghat go round and do the same."
                        - wait 2
                        - narrate "<green>[Urghat] -> You<&co> <yellow>We meet at end of tunnel to slay bad thing."
                        }
# Is the chest able to be an npc? Or....? I'm overall confused with this chest thing so please explain this to me...
A_Bad_Initiation_Chest_Orgoroth:
    type: assignment
    interact scripts:
    - 10 A_Bad_Initiation_Chest_Script_Orgoroth
    actions:
        on assignment:
        - trigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:false

# Done now so when they walk into the boss room, the mob is already there as it says in the script
A_Bad_Initiation_Chest_Script_Orgoroth:
    type: interact
    steps:
        1:
            proximity Trigger:
                entry:
                    Script:
                      - if <player.flag[Quest_A_Bad_Initiation_Orgoroth]> {
                        - narrate "<gold>Treasure Chests can contain many unique things, including mythic items!"
                        - wait 2
                        - narrate "<gold>You can find Identification Tomes in Treasure Chests or buy them from our store."
                        - wait 2
                        - narrate "<gold>Identification Tomes will identify Unidentified Mythic Gear."
                        - wait 2
                        - narrate "<gold>Treasure Chests can also contain spells, gold, money, and other valuables."
                        - execute as_server "mm mobs spawn PigZombie 1 world,0,0,0"
                        - zap step:1 script:Pig_Zombie_Fight
                        }

# This NPC needs to be a sentry, so we can add a target for the Pig Zombie when necessary
Urghat_Pig_Zombie:
    type: assignment
    interact scripts:
    - 10 Pig_Zombie_Fight
    actions:
        on assignment:
        - trigger name:chat state:true
        - trigger name:click state:true
        - trigger name:proximity state:true
        - lookclose <npc> state:false

Pig_Zombie_Fight:
    type: interact
    steps:
        1:
            proximity trigger:
                entry:
                    script:
                      - if <player.flag[Quest_A_Bad_Initiation_Orgoroth]> {
                        - narrate "<green>[Urghat] -> You<&co> <yellow><player.name> help Urghat slay bad thing! Bad thing will DIE!"
                        - wait 1
                        - narrate "<aqua>Urghat rushes forward with a feirce roar and begins to attack the bad thing! Help him!
                        - ^execute as_server "select npc 0"
                        - ^execute as_server "sentry target add entity:pig_zombie"
        Pig_Zombie_Defeat:
            proximity trigger:
                entry:
                    script:
                      - if <player.flag[Pig_Zombie_Defeated]> {
                        - wait 1
                        - narrate "<green>[Urghat] -> You<&co> <yellow>Urghat think <player.name> do well helping kill bad thing!"
                        - wait 2
                        - narrate "<green>[Urghat] -> You<&co> <yellow>Meet Urghat at training grounds. Urghat give you reward."
                        - wait 2
                        - narrate "<gold>You gained <blue>125 Orgoroth Reputation <gold> for slaying the 'Bad Thing'!"
                        - player flag Orgoroth_Reputation:+:125
                        - wait 2
                        - narrate "<blue>New Quest Objective<&co> <gold>Return to Urghat at the Training Grounds!"
                        - flag player Quest_Gearing_Up_Orgoroth:3
                        }
Armor_Crate:
    type: item
    material: NOTE_BLOCK
    display name: <gold>Armor Crate
    lore:
    - <gray>A small crate containing
    - <gray>armor for Urghat.

Supply_Crate:
    type: item
    material: NOTE_BLOCK
    display name: <gold>Supply Crate
    lore:
    - <gray>a small crate containing
    - <gray>rations for the guardhouse.

Bad_Things_Axe:
    type: item
    material: iron_axe
    display name: <gold>Bad Thing's Axe
    lore:
    - <gray>The axe the bad thing
    - <gray>dropped at the Qamyom hole.

Orgoroth_Reputation_Book:
    type: book
    title: Reputation
    author: Arithia
    signed: true
    text:
    - You can earn City Reputation by completing quests! <n>Quests can be found all over. You can talk to NPCs to obtain quests. <n>The more quests you complete, the more reputation you'll gain with that city.
    - Gaining reputation can unlock items at each city's reputation vendor. <n><n>You can also unlock Noble status, by maximizing your reputation with Cathar. <n>You cannot unlock Noble status for any other cities, unless you renounce Cathar. 
    - Renouncing your loyalty will label you a Traitor.<n>It will require a lot of work to regain reputation with that city after being labeled a Traitor. <n>Once you renounce your loyalty, you will be able to gain Noble status in another city.
    - For more information on Questing and Reputation, view our How to Play guide: <n>http://www.arithia.com/guide

# +----------------------------------
# |  Pig Zombie Dies
# +----------------------------------

# Add to world script
World_Script:
    type: world
    events:
        on pig_zombie death:
        - if <player.flag[Quest_A_Bad_Initiation_Orgoroth]> {
          - determine li@Bad_Things_Axe
          - flag player Pig_Zombie_Defeated
          - zap step:Pig_Zombie_Defeat script:Pig_Zombie_Fight
          }

# +----------------------------------
# |  Player death and Spawn Handling
# +----------------------------------
# A little bit I needed to add in the world script also for this script. Replace the 0 with npc id
        on player death:
        - if <player.flag[Cheat_Death]> {
          - determine cancelled
          - if <player.flag[Fight_Rarke_1]> {
            - ^execute as_npc "npc select 130"
            - ^execute as_server "sentry target remove player:<player.name>"
            - flag player Cheat_Death:!
            - flag player Fight_Rarke_1:!
            - ^zap step:Quest_Failed script:Rolfar_Script
            }
          - if <player.flag[Fight_Urghat_1]> {
            - ^execute as_npc "npc select 0"
            - ^execute as_server "sentry target remove player:<player.name>"
            - flag player Cheat_Death:!
            - flag player Fight_Urghat_1:!
            - wait 1
            - narrate "<green>[Urghat] -> You<&co> <yellow>Hmph. Outsider may learn ways if outsider fight Grunt in fist-fight again. You fight Grunt another time?"
            - zap step:Question script:Urghat_Script
            }
          } else {
          - flag player Just_Died duration:10m
          - define list li@
          - define list2 li@
          - foreach <context.inventory.list_contents.full> {
            - if <def[value].material.name> != firework_charge {
              - define list <def[list].include[%value%]>
              } else {
              - define list2 <def[list2].include[%value%]>
              }
          }
          }
        - flag player kept_items:%list2%
        - determine %list%
        on player respawns:
        - run Respawn_Script delay:1t
        - flag player Just_Died duration:5m