Paste #29267: Untitled Paste

Date: 2016/01/28 06:20:19 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569


#############################
# File for NPC Guild Master #
#############################

##########################################
# Assignment script for NPC Guild Master #
##########################################
NPC_Guild_Master:
  type: assignment
  actions:
    on assignment:
    - run Assign_Triggers
    - run Esteem_NPC_Responses
  interact scripts:
  - 1 NPC_Guild Master_Interact

####################################
# Interact script for Guild Master #
####################################
NPC_Guild Master_Interact:
  type: interact
  steps:
      1:
            click trigger:
                script:
                - inject NPC_Guild_Master_Greeting_Event
            chat trigger:
                1:
                      trigger: /Yes/ please!
                      script:
                      - inject NPC_Guild_Master_Tour_Yes
                      - inject Guild_Tour_Initialiser
                2:
                      trigger: Thanks, but /^no/ thanks.
                      script:
                      - inject NPC_Guild_Master_Tour_No
                3:
                      trigger: /Hullo/!
                      script:
                      - inject NPC_Guild_Master_Greeting_Event
                4:
                      trigger: /Sup/?
                      script:
                      - inject NPC_Guild_Master_Greeting_Event
                5:
                      trigger: /Hi/
                      script:
                      - inject NPC_Guild_Master_Greeting_Event
                6:
                      trigger: /Hello/
                      script:
                      - inject NPC_Guild_Master_Greeting_Event
                7:
                      trigger: /Greeting/s!
                      script:
                      - inject NPC_Guild_Master_Greeting_Event
                8:
                      trigger: /What's up/?
                      script:
                      - inject NPC_Guild_Master_Greeting_Event
                9:
                      trigger: /Who are you/?
                      script:
                      - inject NPC_Guild_Master_Who_Event
                10:
                       trigger: /What do you do/ for a living?
                       script:
                       - inject NPC_Guild_Master_Who_Event
                11:
                       trigger: /What's your job/?
                       script:
                       - inject NPC_Guild_Master_Who_Event
                12:
                       trigger: /How are you/?
                       script:
                       - inject NPC_Guild_Master_How_Event
                13:
                       trigger: /How's life/?
                       script:
                       - inject NPC_Guild_Master_How_Event
                14:
                       trigger: /How have you been/?
                       script:
                       - inject NPC_Guild_Master_How_Event
                15:
                       trigger: /How has it been/?
                       script:
                       - inject NPC_Guild_Master_How_Event
                16:
                       trigger: /you're a bitch/
                       script:
                       - inject NPC_Guild_Master_Rude_Event
                17:
                       trigger: /Undead/ garbage
                       script:
                       - inject NPC_Guild_Master_Rude_Event
                18:
                       trigger: Are you still /alive/?
                       script:
                       - inject NPC_Guild_Master_Rude_Event
                19:
                       trigger: /Mortal/
                       script:
                       - inject NPC_Guild_Master_Rude_Event
                20:
                       trigger: /Failure/
                       script:
                       - inject NPC_Guild_Master_Rude_Event
                21:
                       trigger: /fuck/ you
                       script:
                       - inject NPC_Guild_Master_Rude_Event
                22:
                       trigger: /credits/
                       script:
                       - narrate format:Server_Format "NPC Skin taken from PlanetMinecraft user: GeXile http://www.planetminecraft.com/skin/the-death-1422213/"

###################################################
# Assignment script for NPC Guild_Master Instance #
###################################################
NPC_Guild_Master_Instance:
  type: assignment
  debug: false
  actions:
    on assignment:
    - run Assign_Triggers npc:<npc>
  interact scripts:
  - 1 NPC_Guild_Master_Instance_Interact
#################################################
# Interact script for NPC Guild_Master Instance #
#################################################
NPC_Guild_Master_Instance_Interact:
  type: interact
  debug: false
  steps:
      1:
            click trigger:
                script:
                - flag <npc> next
                - narrate format:Talk_Format "Moving on..."
            chat trigger:
                1:
                      trigger: /cancel/
                      script:
                      - if <proc[Esteem_Determine]> == "liked" {
                        - narrate format:Talk_Format "Ah. Sure thing."
                        }
                        else if <proc[Esteem_Determine]> == "neutral" {
                        - narrate format:Talk_Format "Alright. See ya."
                        }
                        else if <proc[Esteem_Determine]> == "disliked" {
                        - narrate format:Talk_Format "Sure."
                        }
                      - ^run NPC_Guild_Master_End_Event def:<npc>

#######################################
# Task script for handling tour event #
#######################################
Guild_Tour_Initialiser:
  type: task
  debug: false
  script:
  - ^create <npc> "<&2>Guild Master<&r>" <npc.location> save:guildMasterInstance
  - ^assignment set script:NPC_Guild_Mastter_Instance npc:<entry[guildMasterInstance].created_npc>
  - ^flag <player> instancedGuildMaster:<entry[guildMasterInstance].created_npc>
  - ^flag <player> inEvent
  - zap s@NPC_Guild_Master_Interact 2
  - ^adjust <player> hide_entity:<n@84>
  - ^adjust <server.list_online_players.exclude[<player>]> hide_entity:<entry[guildMasterInstance].created_npc>
  - ^run NPC_Guild_Master_Walk npc:<entry[guildMasterInstance].created_npc>
  - ^run NPC_Guild_Master_DistanceChecker npc:<entry[guildMasterInstance].created_npc>
  - queue clear

###########################
# Task script for Walking #
###########################
NPC_Guild_Master_Walk:
  type: task
  debug: false
  script:
  - flag <npc> walkQueue:<queue>
  - inject NPC_Guild_Event_Introduction
  - foreach <npc.anchor.list>:
    - ~walk <npc.anchor[<def[Value]>]> auto_range
    - flag <npc> point:<def[Value]>
    - choose <def[Value]>:
      - case "HighScore":
        - inject NPC_Guild_Event_HighScore
      - case "GuildShop":
        - inject NPC_Guild_Event_GuildShop
      - case "Advertise":
        - inject NPC_Guild_Event_Advertise
      - case "WarLobby":
        - inject NPC_Guild_Event_WarLobby
        - inject NPC_Guild_Master_End_Event

################################
# Task script for Introduction #
################################
NPC_Guild_Event_Introduction:
  type: task
  debug: false
  script:
  - narrate format:Talk_Format "Alright mortal....You're standing in the guild hub, as if it was't obvious enough..."
  - wait 2s
  - narrate format:Talk_Format "This is the place for you to engage in guild battles with other guides.... or if you're really bad at PvP, to feed the bloodlust of others."
  - wait 3s
  - narrate format:Server_Format "Click me to continue"
  - inject NPC_Guild_Master_Wait

#############################
# Task script for HighScore #
#############################
NPC_Guild_Event_HighScore:
  type: task
  debug: false
  script:
  - inject NPC_Guild_Event_Wait_Arrival
  - narrate format:Talk_Format "Alright, in-front of us are the highscores..."
  - wait 1s
  - narrate format:Talk_Format "Which contain the top 3 guilds with the all time highest number of kills..."
  - wait 2s
  - narrate format:Server_Format "Click me to continue"
  - inject NPC_Guild_Master_Wait

##############################
# Task script for guild shop #
##############################
NPC_Guild_Event_GuildShop:
  type: task
  debug: false
  script:
  - inject NPC_Guild_Event_Wait_Arrival
  - narrate format:Talk_Format "And here's the guild shop...the one stop area to buy all your guild junk..."
  - wait 2s
  - narrate format:Talk_Format "Note that you got to be the guild master in order to buy the majority of guild items."
  - wait 2s
  - narrate format:Server_Format_Format "Click me to continue"
  - inject NPC_Guild_Master_Wait

#############################
# Task script for advertise #
#############################
NPC_Guild_Event_Advertise:
  type: task
  debug: false
  script:
  - inject NPC_Guild_Event_Wait_Arrival
  - narrate format:Talk_Format "Alright, on the top floor here is the place for advertising your crappy guild."
  - wait 2s
  - narrate format:Talk_Format "Just ask your guild master to find a spot somewhere here and rent it..."
  - wait 3s
  - narrate format:Talk_Format "Be sure to be quick.....the spots are rather limited I'm afraid."
  - wait 2s
  - narrate format:Server_Format_Format "Click me to continue"
  - inject NPC_Guild_Master_Wait

############################
# Task script for WarLobby #
############################
NPC_Guild_Event_WarLobby:
  type: task
  debug: false
  script:
  - inject NPC_Guild_Event_Wait_Arrival
  - narrate format:Talk_Format "Alright...lastly... In the basement...are the 30 year old virgins.... I mean..."
  - wait 2s
  - narrate format:Talk_Format "The War lobby, the place where guilds meet up to challenge each other to a battle."
  - wait 2s
  - narrate format:Talk_Format "The portal in the middle allows you to spectate a match currently in progress...."
  - wait 2s
  - narrate format:Talk_Format "Alright that's it for the tour, I'm out.... peace...."
  - wait 5s


##################################################
# Task script for waiting for a player to arrive #
##################################################
NPC_Guild_Event_Wait_Arrival:
  type: task
  debug: false
  script:
  - while <npc.distance[<player.location>]> > 4 {
    - wait 1s
    }

##################################################
# Task script for handling the distance checking #
##################################################
NPC_Guild_Master_DistanceChecker:
  type: task
  debug: false
  script:
  - while <npc.has_flag[point].not> {
    - wait 1s
    }
  - flag distanceCheckerQueue:<queue>
  - while <player.has_flag[instancedGuildMaster]> {
    - if <npc.location.distance[<player.location>]> < 5 && <npc.has_flag[isPaused]> {
      - walk <npc.anchor[<npc.flag[point]>]>
      - queue <npc.flag[walkQueue]> resume
      - flag <npc> isPaused:!
      }
      else if <npc.location.distance[<player.location>]> >= 5 && <npc.location.distance[<player.location>]> <= 10 && <npc.has_flag[isPaused].not> {
      - walk stop
      - queue <npc.flag[walkQueue]> pause
      - flag <npc> isPaused
      }
      else if <npc.location.distance[<player.location>]> > 10 {
      - narrate format:Talk_Format "Wow! Just run off like that!"
      - ^run Esteem_Modify def:<n@84.flag[modifyRude]>
      - ^run NPC_Guild_Master_End_Event def:<npc>
      }
    - wait 1s
    }
###############################
# Task script for ending tour #
###############################
NPC_Guild_Master_End_Event:
  type: task
  debug: false
  definitions: guildMaster
  script:
  - queue <def[guildMaster].as_npc.flag[walkQueue]> clear
  - queue <def[guildMaster].as_npc.flag[distanceCheckerQueue]> clear
  - flag <player> instancedGuildMaster:!
  - flag <player> inEvent:!
  - adjust <player> show_entity:<n@84>
  - zap s@NPC_Guild_Master_Interact 1
  - remove <def[guildMaster].as_npc>
####################################
# Task script for handling waiting #
####################################
NPC_Guild_Master_Wait:
  type: task
  debug: false
  script:
  - flag <npc> next:!
  - while <npc.has_flag[next].not> {
    - wait 1s
    }
  - flag <npc> next:!
############################
# Task script for greeting #
############################
NPC_Guild Master_Greeting_Event:
  type: task
  script:
  - if <proc[Esteem_Determine]> == "liked" {
    - random {
      - narrate format:Talk_Format "Greetings, traveller, are you looking for some help?"
      - narrate format:Talk_Format "Hello <player.name>, I sense the confusion in you. Do you need help?"
      - narrate format:Talk_Format "Do you need any help?"
      - narrate format:Talk_Format "Good to see you today...Can I help with anything?"
      - narrate format:Talk_Format "What brings you here today mortal?"
      - narrate format:Talk_Format "Hello <player.name>, can I help you?"
      }
    }
    else if <proc[Esteem_Determine]> == "neutral" {
    - random {
      - narrate format:Talk_Format "Good day, mortal, you look lost. Need some help?"
      - narrate format:Talk_Format "Great to see you mortal, what brings here today?"
      - narrate format:Talk_Format "Hello <player.name>, do you need help with anything?"
      - narrate format:Talk_Format "Greetings <player.name>, may I help you?"
      - narrate format:Talk_Format "Oh hey mortal, may I help you?"
      - narrate format:Talk_Format "Hey....do you need help?"
      }
    }
    else if <proc[Esteem_Determine]> == "disliked" {
    - random {
      - narrate format:Talk_Format "Mortal....what brings you here today?"
      - narrate format:Talk_Format "Are you looking for something mortal?"
      - narrate format:Talk_Format "Hahahha....Mortal, am I correct to say you need help?"
      - narrate format:Talk_Format "Hi mortal, what brings you to the guild hub...?"
      - narrate format:Talk_Format "Hi mortal, are you looking for help?"
      - narrate format:Talk_Format "Greetings mortal, do you need my help with anything?"
      }
    }

######################################
# Task script for handling how event #
######################################
NPC_Guild Master_How_Event:
  type: task
  script:
  - if <proc[Esteem_Determine]> == "liked" {
    - random {
      - narrate format:Talk_Format "Good...Never been better."
      - narrate format:Talk_Format "Great....I wish I was still alive though..."
      - narrate format:Talk_Format "Good...except for not being able to eat..."
      - narrate format:Talk_Format "Life? I'm dead!"
      - narrate format:Talk_Format "I'm dead...how did you think I feel?"
      - narrate format:Talk_Format "Good.....Haven't been better..."
      }
    }
    else if <proc[Esteem_Determine]> == "neutral" {
    - random {
      - narrate format:Talk_Format "Pretty good, the after-life is pretty relaxing."
      - narrate format:Talk_Format "It's pretty good being dead....free from everything and the confines of this world."
      - narrate format:Talk_Format "Not bad at all."
      - narrate format:Talk_Format "Pretty good."
      - narrate format:Talk_Format "Well, the after-life is pretty comfy..."
      - narrate format:Talk_Format "I need a break from taking a break."
      }
    }
    else if <proc[Esteem_Determine]> == "disliked" {
    - random {
      - narrate format:Talk_Format "It gets boring..."
      - narrate format:Talk_Format "Pretty decent."
      - narrate format:Talk_Format "It's boring sometimes."
      - narrate format:Talk_Format "So lonely..."
      - narrate format:Talk_Format "I feel so different..."
      - narrate format:Talk_Format "I feel.... different."
      }
    }
  - ^run Esteem_Modify def:<npc.flag[modifyPolite]>
######################################
# Task script for handling who event #
######################################

NPC_Guild Master_Who_Event:
  type: task
  script:
  - if <proc[Esteem_Determine]> == "liked" {
    - random {
      - narrate format:Talk_Format "I was the master of the guilds....Until I finally fell in combat..."
      - narrate format:Talk_Format "I"m Evander, the former master of the guilds...."
      - narrate format:Talk_Format "My name...is Evander....I was the guild master here....until I died."
      - narrate format:Talk_Format "I was Evander the guild master....."
      - narrate format:Talk_Format "I'm the spirit of Evander.....I still roam the halls..."
      - narrate format:Talk_Format ""
      }
    }
    else if <proc[Esteem_Determine]> == "neutral" {
    - random {
      - narrate format:Talk_Format "I am...or rather I was Evander, the master of the guilds..."
      - narrate format:Talk_Format "Well, I'm dead for a start. So everything else is irrelevant."
      - narrate format:Talk_Format "I was Evander the Guild_Master master."
      - narrate format:Talk_Format "I am the spirit of the guild master Evander... Boo!"
      - narrate format:Talk_Format "I was the great Guild_Master master, Evander."
      - narrate format:Talk_Format "I'm a ghost....."
      }
    }
    else if <proc[Esteem_Determine]> == "disliked" {
    - random {
      - narrate format:Talk_Format "I am the ghost of Evander the Guild_Master master."
      - narrate format:Talk_Format "I'm just a lonely spirit."
      - narrate format:Talk_Format "I'm the spirit of Evander.."
      - narrate format:Talk_Format "BOoooo!"
      - narrate format:Talk_Format "I'm Evander..."
      - narrate format:Talk_Format "The ghost of Evander I am..."
      }
    }

########################################
# Task script for handling rude events #
########################################

NPC_Guild Master_Rude_Event:
  type: task
  script:
  - if <proc[Esteem_Determine]> == "liked" {
    - random {
      - narrate format:Talk_Format "Be careful..."
      - narrate format:Talk_Format "Don't test my patience mortal."
      - narrate format:Talk_Format "It's never smart to make a spirit angry."
      - narrate format:Talk_Format "You really want to try anger a spirit?"
      - narrate format:Talk_Format "Are you mocking me?"
      - narrate format:Talk_Format "You're asking for trouve aren't you..."
      }
    }
    else if <proc[Esteem_Determine]> == "neutral" {
    - random {
      - narrate format:Talk_Format "So let me get this straight... you're trying to offend a spirit?"
      - narrate format:Talk_Format "Watch your words....mortal."
      - narrate format:Talk_Format "Don't you dare..."
      - narrate format:Talk_Format "You would not want to make me angry, mortal."
      - narrate format:Talk_Format "You face the wrath of Evander..."
      - narrate format:Talk_Format "Don't you dare..."
      }
    }
    else if <proc[Esteem_Determine]> == "disliked" {
    - random {
      - narrate format:Talk_Format "Why do you say so?"
      - narrate format:Talk_Format "You underestimate my powers..."
      - narrate format:Talk_Format "Do not test me mortal."
      - narrate format:Talk_Format "INCUR MY WRATH MORTAL..."
      - narrate format:Talk_Format "RAWWWWRRRRRR"
      - narrate format:Talk_Format "A curse upon you lad...."
      }
    }
  - ^run Esteem_Modify def:<npc.flag[modifyRude]>

#######################################
# Task script for handling yes events #
#######################################

NPC_Guild Master_Yes_Event:
  type: task
  script:
  - if <proc[Esteem_Determine]> == "liked" {
    - random {
      - narrate format:Talk_Format "Let's get started....This way..."
      - narrate format:Talk_Format "This way please."
      - narrate format:Talk_Format "Great, let's get this tour started."
      - narrate format:Talk_Format "This way please."
      - narrate format:Talk_Format "Good, let's get going."
      - narrate format:Talk_Format "Let's get this moving along."
      }
    }
    else if <proc[Esteem_Determine]> == "neutral" {
    - random {
      - narrate format:Talk_Format "Alright let's start."
      - narrate format:Talk_Format "Let's get the tour started..."
      - narrate format:Talk_Format "This way please."
      - narrate format:Talk_Format "Let's go this way first."
      - narrate format:Talk_Format "Sure, this way."
      - narrate format:Talk_Format "Let's go."
      }
    }
    else if <proc[Esteem_Determine]> == "disliked" {
    - random {
      - narrate format:Talk_Format "Alright mortal....this way...."
      - narrate format:Talk_Format "Let's get moving."
      - narrate format:Talk_Format "Move."
      - narrate format:Talk_Format "This way."
      - narrate format:Talk_Format "Go."
      - narrate format:Talk_Format "Move now."
      }
    }


######################################
# Task script for handling no events #
######################################

NPC_Guild Master_No_Event:
  type: task
  script:
  - if <proc[Esteem_Determine]> == "liked" {
    - random {
      - narrate format:Talk_Format "Fair choice."
      - narrate format:Talk_Format "Alright, just come back anything."
      - narrate format:Talk_Format "Sure, I'll be here waiting."
      - narrate format:Talk_Format "Fair enough."
      - narrate format:Talk_Format "Uh sure."
      - narrate format:Talk_Format "Okay."
      }
    }
    else if <proc[Esteem_Determine]> == "neutral" {
    - random {
      - narrate format:Talk_Format "Anything."
      - narrate format:Talk_Format "Anything you wish."
      - narrate format:Talk_Format "Sure. Just come back when you want to."
      - narrate format:Talk_Format "Just come back anytime."
      - narrate format:Talk_Format "Whatever floats your boat."
      - narrate format:Talk_Format "Sure, just come back when you want to."
      }
    }
    else if <proc[Esteem_Determine]> == "disliked" {
    - random {
      - narrate format:Talk_Format "Anything."
      - narrate format:Talk_Format "Good choice."
      - narrate format:Talk_Format "Whatever."
      - narrate format:Talk_Format "Ok."
      - narrate format:Talk_Format "Fine."
      - narrate format:Talk_Format "Alright."
      }
    }