Paste #28534: Untitled Paste

Date: 2016/01/16 00:59:45 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


####################
#File for NPC Sage #
####################
##################################
# Assignment script for NPC Sage #
##################################
NPC_Sage_Tutorial:
  type: assignment
  actions:
    on assignment:
    - ^run Assign_Triggers npc:<npc> def:5|5|3
  interact scripts:
  - 1 NPC_Sage_Tutorial_Interact
################################
# Interact script for NPC Sage #
################################
NPC_Sage_Tutorial_Interact:
  type: interact
  steps:
      1:
            click trigger:
                script:
            chat trigger:
                1:
                      trigger: /Yes/
                      script:
                      - inject NPC_Sage_Yes_Event
                2:
                      trigger: /No/
                      script:
                      - inject NPC_Sage_No_Event
      2:
            click trigger:
                script:
                - narrate format:Talk_Format "Say 'next' to continue or 'cancel' to exit!"
            chat trigger:
                1:
                      trigger: /next/
                      script:
                      - flag <player> next
                2:
                      trigger: /cancel/
                      - ^run NPC_Sage_End_Event npc:<n@282>
###############################################################
# World script for hanlding player joining for the first time #
###############################################################
Sage_Tutorial:
  type: world
  events:
    on player logs in for the first time:
    - ^run Sage_Tutorial_Starting npc:<n@282>
    on player logs in:
    - if <player.has_flag[inEvent]> {
      - ^run Sage_Tutorial_Starting npc:<n@282>
      }
      else {
      - adjust <player> hide_entity:<n@282>
      - adjust <player> hide_entity:<n@284>
      }
    on player quits:
    - if <player.has_flag[inEvent]> {
      - ^run NPC_Sage_End_Event npc:<n@282>
      }
#########################################################
# Task script for handling the starting of the tutorial #
#########################################################
Sage_Tutorial_Starting:
  type: task
  script:
  - flag <player> inEvent
  - adjust <player> show_entity:<npc>
  - adjust <player> show_entity:<n@284>
  - adjust <player> spectate:<npc>
  - narrate format:Talk_Format "Greetings, <player.name> and welcome to Custom Kits! I'm Ecaxon the sage, you seem new around here..."
  - wait 2s
  - narrate format:Talk_Format "Would you like some help?"
  - wait 2s
  - narrat foramt:Server_Format "Type 'Yes' or 'No' in chat!"
##########################################
# Task script for handling NPC yes event #
##########################################
NPC_Sage_Yes_Event:
  type: task
  script:
  - zap 2
  - flag <player> eventQueue:<queue>
  - narrate format:Server_Format "You can exit anytime by saying 'cancel'!"
  - wait 2s
  - narrate format:Talk_Format "Great! Okay, so <player.name>, once again, welcome to the realm of Custom Kits!"
  - wait 3s
  - narrate format:Talk_Format "Something note-worthy about this realm is the sheer amount of NPCs wandering around!"
  - wait 2s
  - narrate format:Talk_Format "All of whom can be interacted with through typin in chat while looking at them or simply right clicking them!"
  - wait 3s
  - narrate format:Talk_Format "A very important thing to note is that very much like you and me, how you treat them will determine how they treat you!"
  - wait 3s
  - narrate format:Talk_Format "So, if you go around being a total jerk to them, don't be suprised if they turn hostile towards you!"
  - wait 3s
  - narrate format:Talk_Format "How the NPC treats you is based on the esteem you have which can be viewed using the command /Esteem (player) !"
  - wait 3s
  - narrate format:Talk_Format "That might be a-lot to digest so I'll pause here for now!"
  - wait 2s
  - narrate format:Talk_Format "Type 'next' in chat to continue!"
  - inject NPC_Sage_Wait_Next
  - narrate format:Talk_Format "Alright! Moving on to the actual game itself!"
  - wait 2s
  - narrate format:Talk_Format "So....Custom Kits! What is it?"
  - wait 2s
  - narrate format:Talk_Format "It's a unique twist on kit PvP where you start off with 200 Kit Points to build your kits..."
  - wait 3s
  - narrate format:Talk_Format "Items such as armour and weapons will each use up a different amount of kit points based on the individual item!"
  - wait 4s
  - narrate format:Talk_Format "The amount of kit points is always fixed at 200! So, you don't have to worry about that if you die!"
  - wait 3s
  - narrate format:Talk_Format "However, for consumable items such as potions and foodstuff, you are required to spend gold, the server's currency, to buy them!"
  - wait 4s
  - narrate format:Talk_Format "Upon dying, you will lose any consumable items you are carrying so be careful!"
  - wait 3s
  - narrate format:Talk_Format "I'll pause here once again!"
  - wait 2s
  - narrate format:Server_Format "Type 'next' in chat to continue!"
  - inject NPC_Sage_Wait_Next
  - narrate format:Talk_Format "Alright I shall not go too in-depth now as there are other NPCs specialising in those areas!"
  - wait 3s
  - narrate format:Talk_Format "Elizabeth the guide next to the map for example will give you a tour of this area!"
  - wait 3s
  - narrate format:Talk_Format "The warrior at the Highscores area will instruct you on the leaderboard system we have!"
  - wait 3s
  - narrate format:Talk_Format "And lastly, that creepy guy in a black hood in the guild hub will teach you all about the guild system we have!"
  - wait 3s
  - narrate format:Talk_Format "Alright! There's all for me now! If you ever need any help, feel free to find me by the waterfall!"
  - ^run NPC_Sage_End_Event npc:<npc>
######################################
# Task script for handling No events #
######################################
NPC_Sage_No_Event:
  type: task
  script:
  - 
  - narrate format:Talk_Format "Okay then, feel free to find me by the waterfall if you ever need any help!"
  - ^run NPC_Sage_End_Event npc:<npc>
####################################
# Task script for ending the event #
####################################
NPC_Sage_End_Event:
  type: task
  script:
  - zap s@NPC_Sage_Tutorial_Interact 1
  - flag <player> inEvent:!
  - queue <npc.flag[eventQueue]> clear
  - adjust <player> spectate:<player>
  - adjust <player> hide_entity:<n@284>
  - adjust <player> hide_entity:<n@282>
##################################
# Task script for handling waits #
##################################
NPC_Sage_Wait_Next:
  type: task
  script:
  - flag <player> next:!
  - while <player.has_flag[next].not> {
    - wait 1s
    }
  - flag <player> next:!
###################################################
# Scripts for the NPC Sage found in the pavillion #
###################################################
##################################
# Assignment script for NPC Sage #
##################################
NPC_Sage:
  type: assignment
  actions:
    on assignment:
    - ^run Assign_Triggers npc:<npc> 
    - ^run Esteem_NPC_Responses npc:<npc> def:0|2|0|0|0|0
    - ^run Assign_Walk_Flags npc:<npc> def:5|10
  interact scripts:
  - 1 NPC_Sage_Interact
################################
# Interact script for NPC Sage #
################################
NPC_Sage_Interact:
  type: interact
  steps:
      1:
            click trigger:
                script:
                - inject NPC_Sage_Greeting_Event
            chat trigger: 
                1:
                      trigger: /Advise me/
                      script:
                      - if <player.has_flag[inEvent]> {
                        - narrate format:Talk_Format "Don't keep the others waiting, come back to me when you have finished your other tour."
                        }
                        else {
                        - narrate format:Talk_Format "Very well now..."
                        - ^run NPC_Sage_Yes_Event npc:<n@282>
                        }
                2:
                      trigger: /Advice me/
                      script:
                      - if <player.has_flag[inEvent]> {
                        - narrate format:Talk_Format "Don't keep the others waiting, come back to me when you have finished your other tour."
                        }
                        else {
                        - narrate format:Talk_Format "Very well now..."
                        - ^run NPC_Sage_Yes_Event npc:<n@282>
                        }
                3:
                      trigger: /Guide me/
                      script:
                      - if <player.has_flag[inEvent]> {
                        - narrate format:Talk_Format "Don't keep the others waiting, come back to me when you have finished your other tour."
                        }
                        else {
                        - narrate format:Talk_Format "Very well now..."
                        - ^run NPC_Sage_Yes_Event npc:<n@282>
                        }
                4:
                      trigger: /Hello/
                      script:
                      - inject NPC_Sage_Greeting_Event
                5:
                      trigger: /Hullo/
                      script:
                      - inject NPC_Sage_Greeting_Event
                6:
                      trigger: /Hi/
                      script:
                      - inject NPC_Sage_Greeting_Event
                7:
                      trigger: /Sup/?
                      script:
                      - inject NPC_Sage_Greeting_Event
                8:
                      trigger: /What's up/?
                      script:
                      - inject NPC_Sage_Greeting_Event
                9:
                      trigger: /Yo/!
                      script:
                      - inject NPC_Sage_Greeting_Event
                10:
                       trigger: /Greeting/s!
                       script:
                       - inject NPC_Sage_Greeting_Event
                11:
                       trigger: /Who are you/?
                       script:
                       - inject NPC_Sage_Who_Event
                12:
                       trigger: What's your /job/ around here?
                       script:
                       - inject NPC_Sage_Who_Event
                13:
                       trigger: /What do you do/?
                       script:
                       - inject NPC_Sage_Who_Event
                14:
                       trigger: /How are you/?
                       script:
                       - inject NPC_Sage_How_Event
                15:
                       trigger: /How's life/?
                       script:
                       - inject NPC_Sage_How_Event
                16:
                       trigger: /How has life been/?
                       script:
                       - inject NPC_Sage_How_Event
                17:
                       trigger: /How have you been/?
                       script:
                       - inject NPC_Sage_How_Event
                18:
                       trigger: /How has it been/?
                       script:
                       - inject NPC_Sage_How_Event
                19:
                       trigger: /How is life/?
                       script:
                       - inject NPC_Sage_How_Event
                20:
                       trigger: /Fuck/ you!
                       script:
                       - inject NPC_Sage_Rude_Event
                21:
                       trigger: /Senile/ piece of garbage!
                       script:
                       - inject NPC_Sage_Rude_Event
                22:
                       trigger: /Idiot/
                       script:
                       - inject NPC_Sage_Rude_Event
                23:
                       trigger: You /Suck/!
                       script:
                       - inject NPC_Sage_Rude_Event
                24:
                       trigger: /Jerk/!
                       script:
                       - inject NPC_Sage_Rude_Event
                25:
                       trigger: /Credits/
                       script:
                       - narrate format:Server_Format "Credits: source unknown"
###########################################
# Task script for handling greeting event #
###########################################
NPC_Sage_Greeting_Event:
  type: task
  script:
  - walk stop
  - queue <npc.flag[walkQueue]> pause
  - if <proc[Esteem_Determine]> == "liked" {
    - random {
      - narrate format:Talk_Format "Greetings, child."
      - narrate format:Talk_Format "How's it going <player.name>?"
      - narrate format:Talk_Format "Good to see you, <player.name>."
      - narrate format:Talk_Format "How's it going, <player.name>"
      - narrate format:Talk_Format "It's a pleasure meeting you."
      - narrate format:Talk_Format "Drink with me, friend!"
      }
    }
    else if <proc[Esteem_Determine]> == "neutral" {
    - random {
      - narrate format:Talk_Format "Hello there <player.name>"
      - narrate format:Talk_Format "Great to see you <player.name>"
      - narrate format:Talk_Format "Hello <player.name>"
      - narrate format:Talk_Format "Good to see you young one."
      - narrate format:Talk_Format "Isn't the view marvellous, <player.name>?"
      - narrate format:Talk_Format "Good to see you, friend."
      }
    }
    else if <proc[Esteem_Determine]> == "disliked" {
    - random {
      - narrate format:Talk_Format "Hello!"
      - narrate format:Talk_Format "Good to see you!"
      - narrate format:Talk_Format "How is it going, <player.name>?"
      - narrate format:Talk_Format "Good day <player.name>"
      - narrate format:Talk_Format "Great seeing you, <player.name>"
      - narrate format:Talk_Format "It's good to see you..."
      }
    }
  - walk <npc.anchor[<npc.flag[anchorPoint]>]>
  - queue <npc.flag[walkQueue]> resume
#######################################
# Task script for handling how script #
#######################################
NPC_Sage_How_Event:
  type: task
  script:
  - walk stop
  - queue <npc.flag[walkQueue]> pause
  - if <proc[Esteem_Determine]> == "liked" {
    - random {
      - narrate format:Talk_Format "I'm doing extremely well, thanks for asking."
      - narrate format:Talk_Format "My life has been good, will you just look at that scenery."
      - narrate format:Talk_Format "Good, good!"
      - narrate format:Talk_Format "Life has been good to me..."
      - narrate format:Talk_Format "It's been like a story pulled out from a book... It only gets better..."
      - narrate format:Talk_Format "It just keeps getting better as the years keep rolling by."
      }
    }
    else if <proc[Esteem_Determine]> == "neutral" {
    - random {
      - narrate format:Talk_Format "I've been feeling good..."
      - narrate format:Talk_Format "I've been doing well."
      - narrate format:Talk_Format "How can you not say it's been great when you get to view this scenery all day long?"
      - narrate format:Talk_Format "It's stunning what you can do with a little work..."
      - narrate format:Talk_Format "I'm doing well...how are you?"
      - narrate format:Talk_Format "I've been good, how about you?"
      }
    }
    else if <proc[Esteem_Determine]> == "disliked" {
    - random {
      - narrate format:Talk_Format "Old age never hindered me, and never will."
      - narrate format:Talk_Format "Haha! Life's a bed of roses for me now!"
      - narrate format:Talk_Format "How can you ever grow old from relishing this view at every moment of the day?"
      - narrate format:Talk_Format "Hatred is the root of all evil..."
      - narrate format:Talk_Format "Life will never be bad to you forever..."
      - narrate format:Talk_Format "Life just keeps giving and taking."
      }
    }
  - walk <npc.anchor[<npc.flag[anchorPoint]>]>
  - queue <npc.flag[walkQueue]> resume
  - ^run Esteem_Modify def:<npc.flag[modifyPolite]>
#######################################
# Task script for handling who script #
#######################################
NPC_Sage_Who_Event:
  type: task
  script:
  - walk stop
  - queue <npc.flag[walkQueue]> pause
  - if <proc[Esteem_Determine]> == "liked" {
      - random {
        - narrate format:Talk_Format "Who am I is not the question to ask, but rather what do I do?"
        - narrate format:Talk_Format "My name is Exacon, I'm one of the great Sages of this land, one of the last in fact."
        - narrate format:Talk_Format "I am Exacon the great Sage, and may I ask, who are you?"
        - narrate format:Talk_Format "Exacon is my name, guiding new travellers around is my job."
        - narrate format:Talk_Format "Guiding new travellers around is my duty as a Sage."
        - narrate format:Talk_Format "Good to see you young one, I'm Exacon the sage."
        }
      }
      else if <proc[Esteem_Determine]> == "neutral" {
      - random {
        - narrate format:Talk_Format "I'm a sage, I guide travellers new to this realm."
        - narrate format:Talk_Format "Travellers from afar often need guidance which I give."
        - narrate format:Talk_Format "I'm one of the sages in this realm tasked with the guidance of the new travellers."
        - narrate format:Talk_Format "I intrdouce all new travellers to this realm, including you."
        - narrate format:Talk_Format "My work as a sage is no trivial task."
        - narrate format:Talk_Format "Guiding new travellers can sometimes be challenging."
        }
      }
      else if <proc[Esteem_Determine]> == "disliked" {
      - random {
        - narrate format:Talk_Format "The sage council has tasked me with the guidance of new travellers like you."
        - narrate format:Talk_Format "I'm Exacon, I was one of the youngest to join the Sage's council."
        - narrate format:Talk_Format "I am Exacon, one of the sages tasked with guiding new travllers very much like you..."
        - narrate format:Talk_Format "How's it going young one? I'm Exacon."
        - narrate format:Talk_Format "The Sage council has me responsible for the guidance of new travellers."
        - narrate format:Talk_Format "I'm Exacon, the great Sage."
        }
      }
  - walk <npc.anchor[<npc.flag[anchorPoint]>]>
  - queue <npc.flag[walkQueue]> resume
########################################
# Task script for handling rude events #
########################################
NPC_Sage_Rude_Event:
  type: task
  script:
  - walk stop
  - queue <npc.flag[walkQueue]> pause
  - if <proc[Esteem_Determine]> == "liked" {
      - random {
        - narrate format:Talk_Format "Don't be so angsty young one."
        - narrate format:Talk_Format "Kindness is a language which the deaf can hear and the blind can see."
        - narrate format:Talk_Format "Please stop swearing so much now..."
        - narrate format:Talk_Format "Don't be so irrational now..."
        - narrate format:Talk_Format "Why do you have to be so uptight?"
        - narrate format:Talk_Format "Relax young one."
        }
      }
      else if <proc[Esteem_Determine]> == "neutral" {
      - random {
        - narrate format:Talk_Format "Hatred is the seed of all evil... don't let it get to you..."
        - narrate format:Talk_Format "Displaying a little respect never harms anyone."
        - narrate format:Talk_Format "Being nice will go a long way."
        - narrate format:Talk_Format "Why do you have to be so angsty?"
        - narrate format:Talk_Format "Calm down young one."
        - narrate format:Talk_Format "Stop swearing so much child."
        }
      }
      else if <proc[Esteem_Determine]> == "disliked" {
      - random {
        - narrate format:Talk_Format "Be nice to others and others will be nice to you."
        - narrate format:Talk_Format "Don't be so impolite now young one."
        - narrate format:Talk_Format "I was once very much like you, young and impulsive, but later on in life you will understand why being nice to others is important."
        - narrate format:Talk_Format "Why do you have to be so rude towards everyone including me?"
        - narrate format:Talk_Format "There's no cost for being nice to others."
        - narrate format:Talk_Format "Plato once said 'Be kind, for everyone you meet is fighting a harder battle.'"
        }
      }
  - walk <npc.anchor[<npc.flag[anchorPoint]>]>
  - queue <npc.flag[walkQueue]> resume