Paste #16314: Edit of P#16313 - Edit of P#16312 - Edit of P#16311 - Untitled Paste

Date: 2015/06/05 20:11:15 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


#######################
# Guildmaster scripts #
#######################
GuildMaster:
    type: assignment
    interact scripts:
        - 10 Join Guild
    actions:
        on assignment:
            - trigger name:click state:true
            - trigger name:chat state:true
            - narrate "Guild Master Ready!"

Join Guild:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if <player.has_flag[GuildMember]> {
                    - narrate format:NPCChat "You're already a member of the guild."
                }
                else {
                    - narrate format:NPCChat "Welcome to the Guardian's Guild!"
                    - wait 1
                    - narrate format:NPCChat "We live to serve the city of C.O.R.E!"
                    - wait 1
                    - narrate format:NPCChat "Do you wish to join the Guardian's Guild?"
                    - wait 1
                    - narrate "You can say <green>Yes <white>or <green>No."
                    - zap step:2
                }
        2:
            chat trigger:
                1:
                    trigger: /Yes/, I'll join the guild.
                    script:
                        - narrate format:NPCChat "Great!, go talk to the Knight downstairs for your first assignment!"
                        - wait 1
                        - narrate "<yellow>You stop talking to the Guildmaster."
                        - flag player TalkToKnight
                        - flag player GuildMember
                        - disengage
                2:
                    trigger: /No/, i'm not interested.
                    script:
                        - narrate format:NPCChat "That's fine, come back if you're interested."
                        - narrate "<yellow>You stop talking to the Guildmaster."
                        - disengage
##################
# Knight scripts #
##################
Knight:
    type: assignment
    interact scripts:
        - 10 KnightDuty
    actions:
        on assignment:
            - trigger name:click state:true
            - trigger name:chat state:true
            - narrate "Questing ready!"

KnightDuty:
    type: interact
    steps:
        1:
            click trigger:
                script:
                    - if <player.has_flag[TalkToKnight]> {
                        - narrate format:NPCChat "<red>...!!!!..."
                        - wait 1
                        - narrate format:NPCChat "Hello! <gold><player.name> <white>, Glad to see you're alive."
                        - wait 1
                        - random {
                            - narrate format:NPCChat "While you're here could you give me a hand?"
                            - narrate format:NPCChat "If you don't mind could you help me out?"
                            - narrate format:NPCChat "Hey, to pass the time how about I give you an assignment?"
                            - narrate format:NPCChat "Lets do an assignment!"
                        }
                        - wait 1
                        - narrate "<yellow>You can say <green>Yes <yellow>or <green>No <yellow>."
                        - zap step:2
                    }
                    else {
                        - random {
                            - narrate format:NPCChat "Hello fellow adventurer!"
                            - narrate format:NPCChat ".....Sometimes I wish I was a bird....."
                            - narrate format:NPCChat "...Mhm, Yes it'll be done. Hello <player.name>, I didn't see you there."
                            - narrate format:NPCChat "I shall forever help my Guildmaster!"
                            - narrate format:NPCChat "The Guardians Guild serves you!"
                            - narrate format:NPCChat "Talk to the Guildmaster if you want to take up assignments."
                        }
                    }
        2:
            chat trigger:
                1:
                    trigger: /Yes/, i'd like to do an assignment
                    script:
                        - narrate format:NPCChat "Great!"
                        - wait 1
                        - narrate format:NPCChat "We have 3 assignments: Zombie Outbreak!, Rising Dead! and Moving Cacti!"
                        - wait 0.7
                        - narrate "<yellow>You can choose <dark_green>Zombie, <white>Dead or <green>Cacti"
                        - zap step:3
                2:
                    trigger: /No/, I'm too busy.
                    script:
                        - random {
                            - narrate format:NPCChat "Dont waste my time!"
                            - narrate format:NPCChat "I see, Come back when you're ready."
                            - narrate format:NPCChat "Darn, I needed your help."
                        }
                        - narrate "<yellow> You stop talking to the Knight."
        3:
            chat trigger:
                1:
                    trigger: I'll take the /Zombie/ Outbreak.
                    script:
                        - narrate format:NPCChat "Oooooo, You're going to be a ZHunter."
                        - wait 1
                        - narrate format:NPCChat "There's been a Zombie Outbreak outside of the city."
                        - wait 1
                        - narrate format:NPCChat "Talk to the Zombie Hunter next to the stables outside of the town."
                        - flag player TalkToZHunter
                2:
                    trigger: Lemme' at the Rising /Dead/.
                    script:
                        - if <player.has_flag[SkeletonQuest_Cooldown]> {
                            - narrate format:NPCChat "You can not do this assignment."
                            - wait 1
                            - narrate format:NPCChat "Come back later to do the assignment again."
                        }
                        else {
                            - narrate format:NPCChat "I see, so you're into graves."
                            - wait 1
                            - narrate format:NPCChat "The dead have been popping up everywhere outside of the town."
                            - wait 1
                            - narrate format:NPCChat "Talk to the Grave Digger to the left of the main entrance."
                            - flag player TalkToGDigger
                        }

                3:
                    trigger: Lets stop these Moving /Cacti/.
                    script:
                        - if <player.has_flag[CreeperQuest_Cooldown]> {
                            - narrate format:NPCChat "You can not do this assignment."
                            - wait 1
                            - narrate format:NPCChat "Come back later to do the assignment again."
                        }
                        else {
                            - narrate format:NPCChat "So you like milk."
                            - wait 1
                            - narrate format:NPCChat "We've had multiple sightings of moving cacti."
                            - wait 1
                            - narrate format:NPCChat "Talk to the monk on the hill outside of town."
                            - flag player TalkToMonk
                        }
#########################
# Zombie Hunter scripts #
#########################
ZombieHunter:
    type: assignment
    interact scripts:
        - 10 Zombie Quest interact
    actions:
        on assignment:
            - narrate "Zombie hunter ready!"

Zombie Quest interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                    # Accept
                    - if <player.has_flag[TalkToZHunter]> {
                        - narrate format:NPCChat "Yo, over here!"
                        - wait 1
                        - narrate format:NPCChat "Really? They sent a weakling like you?"
                        - wait 0.8
                        - narrate format:NPCChat "<dark_red>...Geez that Guardian's Guild is useless..."
                        - wait 1
                        - narrate format:NPCChat "Anyway..... Your assignment is to kill 25 <dark_green>Zombies."
                        - wait 1
                        - narrate "<yellow> You stopped talking to the Zombie Hunter."
                        - flag player ZombieKills:0
                        - flag player TalkToZHunter:!
                    }
                    # Checking count / Reward
                    else if <player.has_flag[ZombieKills]> {
                        # Tell the player how many they have killed and to come back later
                        - if <player.flag[ZombieKills].as_int> < 25 {
                            - narrate format:NPCChat "You have only killed <player.flag[ZombieKills].as_int> Zombies."
                            - wait 1
                            - narrate format:NPCChat "Come back when you have killed enough."
                            - narrate "<yellow>You stop talking to the Zombie Hunter."
                        }
                        # Reward
                        else {
                            - narrate format:NPCChat "Well would you look at that!"
                            - wait 1
                            - narrate format:NPCChat "It seems some people aren't so bad in the Guardian's Guild."
                            - wait 1
                            - narrate format:NPCChat "I guess I should give you your reward."
                            - adjust <player> 'level:<player.xp.level.add[5]>'
                            - give money qty:250
                            - narrate "<blue>You have recieved <gold>$250<blue> and <yellow>5 Levels<blue>."
                            - wait 1
                            - narrate format:NPCChat "Return to the Guild Knight for another assignment."
                            - wait 1
                            - narrate "<yellow>You stopped talking to the Zombie Hunter."
                            - flag player ZombieKills:!
                            - flag player TalkToKnight
                        }
                    }
                    # Deny
                    else {
                        - random {
                            - narrate format:NPCChat "Hey, Beat it!"
                            - narrate format:NPCChat "You have to talk to the Guardian's Guild Knight first."
                            - narrate format:NPCChat "...That Guardian's Guild is full of naive and dimwitted adventurers..."
                            - narrate format:NPCChat "...I wonder how many marshmallows I can fit in my mouth..."
                            - narrate format:NPCChat "I've never seen the owner of C.O.R.E but I think he's an idiot, Dont tell anyone I said that."
                        }
                    }
########################
# Grave Digger scripts #
########################
GraveDigger:
    type: assignment
    interact scripts:
        - 10 Grave Digger Quest interact
    actions:
        on assignment:
            - narrate "Gravedigger ready!"

Grave Digger Quest interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                    # Accept
                    - if <player.has_flag[TalkToGDigger]> {
                        - narrate format:NPCChat "Hey!"
                        - wait 1
                        - narrate format:NPCChat "So you're the new member?"
                        - wait 0.8
                        - narrate format:NPCChat "<dark_red>...I'm going to have a talk with Galaxy..."
                        - wait 1
                        - narrate format:NPCChat "Anyway..... Your assignment is to kill 25 Skeletons."
                        - wait 1
                        - narrate "<yellow> You stopped talking to the <gray>Grave Digger."
                        - flag player SkeletonKills
                        - flag player TalkToGDigger:!
                    }
                    # Checking count / Reward
                    else if <player.has_flag[SkeletonKills]> {
                    # Tell the player how many they have killed and to come back later
                        - if <player.flag[SkeletonKills].as_int> < 25 {
                            - narrate format:NPCChat "You have only killed <player.flag[SKills].as_int> Skeletons."
                            - wait 1
                            - narrate format:NPCChat "Come back when you have killed enough."
                            - narrate "<yellow>You stop talking to the Grave Digger."
                        }
                        # reward
                        else {
                            - narrate format:NPCChat "Great!"
                            - wait 1
                            - narrate format:NPCChat "The Guardian's Guild, I might ask for more help from them."
                            - wait 1
                            - narrate format:NPCChat "Here's the payout of your hard work."
                            - random {
                                - give i@iron_ingot qty:5
                                - give i@arrow qty:32
                                - give i@gold_ingot qty:2
                                - give i@dirt qty:64
                                - give i@leather_chestplate qty:1
                                - give i@leather_leggings qty:1
                                - give i@leather_boots qty:1
                                - give i@leather_helmet qty:1
                                - give i@bone qty:16
                                - give i@skeleton_skull qty:1
                            }
                            - adjust <player> 'level:<player.xp.level.add[5]>'
                            - give money qty:500
                            - narrate "<blue>You have recieved <gold>$500<blue>, <yellow>5 Levels <blue>and a random reward."
                            - wait 1
                            - narrate format:NPCChat "Return to the Guild Knight for another assignment."
                            - wait 1
                            - narrate "<yellow>You stopped talking to the <gray>Grave Digger<yellow>."
                            - flag player SkeletonKills:!
                            - flag player SkeletonQuest_Cooldown d:12h
                            - flag player TalkToKnight
                        }
                    }
                    else {
                        - random {
                            - narrate format:NPCChat "Get out of here!"
                            - narrate format:NPCChat "Before you see me, Talk to the Knight in that guild, I can't remember the name."
                            - narrate format:NPCChat "...I'd like to know how Galaxy keeps that guild running..."
                            - narrate format:NPCChat "...Bones, I wonder what if feels like to be one..."
                            - narrate format:NPCChat "Ok, I'll just throw these in there, Oh! hello <player.name>, Help me with these bones."
                        }
                    }
################
# Monk scripts #
################
HillMonk:
    type: assignment
    interact scripts:
        - 10 Monk Quest interact
    actions:
        on assignment:
            - narrate "Monk ready!"

Monk Quest interact:
    type: interact
    steps:
        1:
            click trigger:
                script:
                    # Accept
                    - if <player.has_flag[TalkToMonk]> {
                        - narrate format:NPCChat "Hello."
                        - wait 1
                        - narrate format:NPCChat "The Guardian's Guild sent a wonderful member."
                        - wait 0.8
                        - narrate format:NPCChat "Oh! You're new?......"
                        - wait 1
                        - narrate format:NPCChat "Anyway..... Your assignment is to kill 25 Creepers."
                        - wait 1
                        - narrate "<yellow> You stopped talking to the Monk."
                        - flag player CreeperKills
                        - flag player TalkToMonk:!
                    }
                    # Checking count / Reward
                    else if <player.has_flag[CreeperKills]> {
                    # Tell the player how many they have killed and to come back later
                        - if <player.flag[CreeperKills].as_int> < 25 {
                            - narrate format:NPCChat "You have only killed <player.flag[CreeperKills].as_int> Creepers."
                            - wait 1
                            - narrate format:NPCChat "Come back when you have killed enough."
                            - narrate "<yellow>You stop talking to the Monk."
                        }
                        # Reward
                        else {
                            - narrate format:NPCChat "Welcome Back!"
                            - wait 1
                            - narrate format:NPCChat "It's good to see you made it back alive."
                            - wait 1
                            - narrate format:NPCChat "For your commitment I shall reward you."
                            - random {
                                - give i@iron_ingot qty:10
                                - give i@gunpowder qty:8
                                - give i@gold_ingot qty:5
                                - give i@dirt qty:64
                                - give i@chainmail_chestplate qty:1
                                - give i@chainmail_leggings qty:1
                                - give i@chainmail_boots qty:1
                                - give i@chainmail_helmet qty:1
                                - give i@diamond qty:1
                                - give i@creeper_skull qty:1
                                - give i@creeper_skull qty:1
                                - give money qty:1000
                                - give money qty:1000
                                - give money qty:1500
                                - give money qty:1750
                                - give money qty:2000
                                - adjust <player> 'level:<player.xp.level.add[5]>'
                                - adjust <player> 'level:<player.xp.level.add[5]>'
                            }
                            - adjust <player> 'level:<player.xp.level.add[5]>'
                            - give money qty:1000
                            - narrate "<blue>You have recieved <gold>$1000<blue>, <yellow>5 Levels <blue>and a random reward."
                            - wait 1
                            - narrate format:NPCChat "Return to the Guild Knight for another assignment."
                            - wait 1
                            - narrate "<yellow>You stopped talking to the Monk."
                            - flag player CreeperKills:!
                            - flag player CreeperQuest_Cooldown d:1d
                            - flag player TalkToKnight
                        }
                    }
                    # Deny
                    else {
                        - random {
                            - narrate format:NPCChat "Please leave me alone."
                            - narrate format:NPCChat "You must talk to the Knight in the Guardian's Guild first."
                            - narrate format:NPCChat "...Hummmmmmmmmmmmmmmmmmmmmmmmmmm..."
                            - narrate format:NPCChat "...The sleeping state, Can I put my body in that state?..."
                            - narrate format:NPCChat "Hello <player.name> do you believe in someone?"
                        }
                    }

####################
# The world checks #
####################
WorldWideKillQuestCheck:
    type: world
    events:
        on player kills zombie:
        - if <player.has_flag[ZombieKills]> {
            - if <player.flag[ZombieKills].as_int> < 25 {
                - flag player ZombieKills:++
                - narrate "<yellow>You've killed <player.flag[ZombieKills].as_int>/25 Zombies."
                - if <player.flag[ZombieKills]> >= 25 {
                    - narrate "<yellow>Return to the Zombie Hunter for your reward!"
                    - flag player TalkToZHunter:!
                }
            }
        }
        on player kills skeleton:
        - if <player.has_flag[SkeletonKills]> {
            - if <player.flag[SkeletonKills].as_int> < 25 {
                - flag player SkeletonKills:++
                - narrate "<yellow>You've killed <player.flag[SkeletonKills].as_int>/25 Skeletons."
                - if <player.flag[SkeletonKills]> >= 25 {
                    - narrate "<yellow>Return to the Grave Digger for your reward!"
                    - flag player TalkToGDigger:!
                }
            }
        }
        on player kills creeper:
        - if <player.has_flag[CreeperKills]> {
            - if <player.flag[CreeperKills]> < 25 {
                - flag player CreeperKills:++
                - narrate "<yellow>You've killed <player.flag[CreeperKills].as_int>/25 Creepers."
                - if <player.flag[CreeperKills]> >= 25 {
                    - narrate "<yellow>Return to the Monk for your reward!"
                    - flag player TalkToMonk:!
                }
            }
        }