- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleUntitled Paste
TypeDenizen Script
Date2014/03/16 03:40:47 UTC-07:00
ByGuest
Other
Paste
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
43000
TutorialQuestsAssignment:
    type: assignment
    interact scripts:
    - 10 TutorialQuests
    
TutorialQuests:
    type: interact
    steps:
        1:
            click trigger:
                script:
                - if <npc.name> = "Trainer Fabian" {
                    - narrate format:NpcChatFormat '<yellow>Welcome <aqua><player.name><white>,'
                    - wait 1
                    - narrate format:NpcChatFormat 'This Universe Is Known As <gold>Yuri Isles<white>,'
                    - wait 1
                    - narrate format:NpcChatFormat 'And Consists Of 3 Dimensions.'
                    - wait 1
                    - narrate format:NpcChatFormat 'We Are Currently Standing In The First'
                    - wait 1
                    - narrate format:NpcChatFormat 'Dimension <light_purple>Valhalla<white>.'
                    - wait 1
                    - narrate format:NpcChatFormat 'But You Must Be Tired From Your Journey,'
                    - wait 1
                    - narrate format:NpcChatFormat 'So Rest And Talk To Me Once You<&sq>re Ready To'
                    - wait 1
                    - narrate format:NpcChatFormat 'Move On.'
                    - wait 1
                    - narrate '<gold>Help<&co> <gray>You Can Say "Ready" Or "Not Ready"'
                    } else if <npc.name> = "Staff Leon" {
                    - narrate format:NpcChatFormat 'I<&sq>m Sorry, I<&sq>m Busy Please Talk To <light_purple>Trainer Fabian<white>.'
                    }
            chat trigger:
                1:
                    trigger: I Am /Ready/!
                    script:
                    - if <npc.name> = "Trainer Fabian" {
                        - wait 2
                        - narrate format:NpcChatFormat 'okay,'
                        - wait 2
                        - narrate format:NpcChatFormat 'Well As You Are New To This <dark_purple>Universe<white>,'
                        - wait 1
                        - narrate format:NpcChatFormat 'You must First <green>Register <white>To Become A <aqua>Citizen<white>.'
                        - wait 1
                        - narrate format:NpcChatFormat 'Take This To <light_purple>Staff Leon<white> To Begin The'
                        - wait 1
                        - narrate format:NpcChatFormat 'Process.'
                        - give i@RegistrationPapers qty:1
                        - narrate '<yellow>You Recieved "Registration Papers."'
                        - narrate '<gold>Quest Accepted<&co> Become A Citizen!'
                        - flag player BecomeACitizen:2
                        - zap step:2
                        } else if <npc.name> = "Staff Leon" {
                        - narrate format:NpcChatFormat 'Ready For What, Go Talk To <light_purple>Trainer Fabian<white>.'
                        }
                
                2:
                    trigger: I Am /Not Ready/!
                    script:
                    - if <npc.name> = "Trainer Fabian" {
                        - wait 1
                        - narrate format:NpcChatFormat 'Well Rest As Long As You Want'
                        } else if <npc.name> = "Staff Leon" {
                        - narrate format:NpcChatFormat 'Not Ready For What, Go Talk To <light_purple>Trainer Fabian<white>.'
                        }
                        
        2:
            click trigger:
                script:
                - if <npc.name> = "Staff Leon" {
                    - narrate format:NpcChatFormat 'Do You Have Somthing For Me?'
                    - wait 1
                    - if <player.inventory.contains[item:RegistrationPapers]> {
                        - ^take i@RegistrationPapers qty:10000
                        - narrate '<yellow> You hand Over "Registration Papers."'
                        - wait 1
                        - narrate format:NpcChatFormat 'Oh More PaperWork...'
                        - wait 1
                        - narrate format:NpcChatFormat 'Well Everything looks Fine,'
                        - wait 1
                        - narrate format:NpcChatFormat 'But Before We Move On You'  
                        - narrate format:NpcChatFormat 'Must Agree To The Terms Of Service.'
                        - wait 1
                        - narrate format:NpcChatFormat 'Read This, Then come Back To Me.'
                        - give i@TheTermsOfService qty:1  
                        - zap step:3
                        } else if !<player.inventory.contains[item:RegistrationPapers]> {
                        - narrate format:NpcChatFormat 'Oh, You Lost It,'
                        - narrate format:NpcChatFormat 'Well Maybe <light_purple>Trainer Fabian<white> Has A Spare.'
                        }
                    } else if <npc.name> = "Trainer Fabian" {
                    - if <player.inventory.contains[item:RegistrationPapers]> {
                        - narrate format:NpcChatFormat 'You Don<&sq>t need To Talk To Me Anymore.' 
                        } else if !<player.inventory.contains[item:RegistrationPapers]> {
                        - narrate format:NpcChatFormat 'Huh... How Could You Lose Your Papers?'
                        - give i@RegistrationPapers qty:1
                        - narrate format:NpcChatFormat 'Well Acidents Happen. Don<&sq>t Lose Them Again.'
                        }
                    }
                    
        3:
            click trigger:
                script:
                - if <npc.name> = "Staff Leon" {
                    - if <player.flag[ReadTerms]> = 1 {
                        - narrate format:NpcChatFormat 'I See You Have Read The Terms,'
                        - wait 1
                        - narrate format:NpcChatFormat 'So Do You Accept Our Terms Of Service?'
                        - narrate '<gold>Help<&co> <gray>You Can Say "Agree" Or "Disagree"'
                        } else if !<player.flag[ReadTerms]> = 1 {
                        - narrate format:NpcChatFormat 'Make sure You Read Those Terms Of Service.'
                        - wait 1
                        - narrate format:NpcChatFormat 'Come Back to Me Once You Have.'
                        }
                    - if !<player.flag[ReadTerms]> = 1 {
                        - if !<player.inventory.contains[item:TheTermsOfService]> {
                            - narrate format:NpcChatFormat 'Oh You Need Another Copy?'
                            - give i@TheTermsOfService qty:1
                            - narrate format:NpcChatFormat 'Try to Take Better Care Of This One.'
                            }
                        }    
                    } else if <npc.name> = "Trainer Fabian" {
                    - if <player.inventory.contains[item:TheTermsOfService]> { 
                        - narrate format:NpcChatFormat 'Oh, <light_purple>Staff Leon<white> Asked You To Read That?'
                        - wait 1
                        - narrate format:NpcChatFormat 'Well Get On With It.' 
                        } else if !<player.inventory.contains[item:TheTermsOfService]> {
                        - narrate format:NpcChatFormat 'You Don<&sq>t Need Me Anymore,'
                        - narrate format:NpcChatFormat 'Talk To <light_purple>Staff Fabian<white>.'
                        }
                    }
            
            chat trigger:
                1:
                    trigger: I /REGEX:^Agree/ To The Terms Of Service
                    script:
                    - if <player.flag[ReadTerms]> = 1 {
                        - if <npc.name> = "Trainer Fabian" {
                            - wait 1
                            - narrate format:NpcChatFormat 'Sorry but That Sound Like somthing'
                            - wait 1
                            - narrate format:NpcChatFormat 'You Should Be Telling <light_purple>Staff Leon<white>.'
                            } else if <npc.name> = "Staff Leon" {
                            - narrate format:NpcChatFormat 'Oh, Thats Great.'
                            - wait 1
                            - narrate format:NpcChatFormat 'Well Now That<&sq>s Taken Care Of,'
                            - wait 1
                            - narrate format:NpcChatFormat 'Lets Get You Registered.'
                            - wait 1
                            - narrate format:NpcChatFormat 'So Are You A Boy Or A Girl?'
                            - narrate '<gold>Help<&co> <gray>You Can Say "Boy" Or "Girl" Or "Hideyoshi"'
                            - zap step:4
                            }
                        }
                        
                2:
                    trigger: I /Disagree/ With The Terms Of Service!
                    script:
                    - if <player.flag[ReadTerms]> = 1 {
                        - if <npc.name> = "Trainer Fabian" {
                            - wait 1
                            - narrate format:NpcChatFormat 'Sorry but That Sound Like somthing'
                            - wait 1
                            - narrate format:NpcChatFormat 'You Should Be Telling <light_purple>Staff Leon<white>.'
                            } else if <npc.name> = "Staff Leon" {
                            - narrate format:NpcChatFormat 'Oh, Well I Am Sorry To Hear That.'
                            - wait 1 
                            - narrate format:NpcChatFormat 'Sorry, But We Don<&sq>t Allow People Who'
                            - wait 1
                            - narrate format:NpcChatFormat 'Don<&sq>t Agree To The Terms Of Service'
                            - wait 1
                            - narrate format:NpcChatFormat 'Play Here, Please Come Back If'
                            - wait 1
                            - narrate format:NpcChatFormat 'You Change Your Mind.'
                            - wait 5
                            - execute as_op "kick <player.name> You Must Agree To Play"
                            }
                        }
                    
        4:
            click trigger:
                script:
                - if <npc.name> = "Staff Leon" {
                    - narrate format:NpcChatFormat 'So, Are You A Boy Or A Girl?'
                    - narrate '<gold>Help<&co> <gray>You Can Say "Boy" Or "Girl" Or "Hideyoshi"'
                    } else if <npc.name> = "Trainer Fabian" {
                    - narrate format:NpcChatFormat 'You Don<&sq>t Need Me Anymore,'
                    }
            chat trigger:
                1:
                    trigger: I Am A /Boy/!
                    script:
                    - if <npc.name> = "Staff Leon" {
                        - flag player Gender:1
                        - wait 1
                        - narrate format:NpcChatFormat 'Another Boy Ay,'
                        - wait 1
                        - narrate format:NpcChatFormat 'I<&sq>m Sure You Will Make A Fine King Someday.'
                        - wait 1
                        - narrate format:NpcChatFormat 'Anyway, Next Question.'
                        - wait 1
                        - narrate format:NpcChatFormat 'How Old Are You?'
                        - narrate '<gold>Help<&co> <gray>You Can Say "Under 8" Or "Under 15" Or "under 18" or "Over 18"'
                        - zap step:5
                        } else if <npc.name> = "Trainer Fabian" {
                        - narrate format:NpcChatFormat 'You Don<&sq>t Need Me Anymore,'
                        }
                
                2:
                    trigger: I Am A /Girl/!
                    script:
                    - if <npc.name> = "Staff Leon" {
                        - flag player Gender:2
                        - wait 1
                        - narrate format:NpcChatFormat 'Ohhhh, I Don<&sq>t Get To Meet Many Girls.'
                        - wait 1
                        - narrate format:NpcChatFormat 'In Time I Am Sure You Will Make A Lovely Queen.'
                        - wait 1
                        - narrate format:NpcChatFormat 'Anyway, Next Question.'
                        - wait 1
                        - narrate format:NpcChatFormat 'How Old Are You?'
                        - narrate '<gold>Help<&co> <gray>You Can Say "Under 8" Or "Under 15" Or "under 18" or "Over 18"'
                        - zap step:5
                        } else if <npc.name> = "Trainer Fabian" {
                        - narrate format:NpcChatFormat 'You Don<&sq>t Need Me Anymore,'
                        }
    
                3:
                    trigger: I Am A /Hideyoshi/!
                    script:
                    - if <npc.name> = "Staff Leon" {
                        - flag player Gender:3
                        - wait 1
                        - narrate format:NpcChatFormat 'I Thought So,'
                        - wait 1
                        - narrate format:NpcChatFormat 'We Actually Get That Response A Lot Around Here.'
                        - wait 1
                        - narrate format:NpcChatFormat 'Anyway, Next Question.'
                        - wait 1
                        - narrate format:NpcChatFormat 'How Old Are You?'
                        - narrate '<gold>Help<&co> <gray>You Can Say "Under 8" Or "Under 15" Or "under 18" or "Over 18"'
                        - zap step:5
                        } else if <npc.name> = "Trainer Fabian" {
                        - narrate format:NpcChatFormat 'You Don<&sq>t Need Me Anymore,'
                        }
                        
        5:
            click trigger:
                script:
                - if <npc.name> = "Staff Leon" {
                    - narrate format:NpcChatFormat 'So, How Old Are You?'
                    - narrate '<gold>Help<&co> <gray>You Can Say "Under 8" Or "Under 15" Or "under 18" or "18 And Over"'
                    } else if <npc.name> = "Trainer Fabian" {
                    - narrate format:NpcChatFormat 'You Don<&sq>t Need Me Anymore,'
                    }
            chat trigger:
                1:
                    trigger: I Am /Under 8/!
                    script:
                    - if <npc.name> = "Staff Leon" {
                        - flag player Age:1
                        - wait 1
                        - narrate format:NpcChatFormat 'Oh, Your Still Quite Young!'
                        - wait 1
                        - narrate format:NpcChatFormat 'But Don<&sq>t Worry, This Server'
                        - wait 1
                        - narrate format:NpcChatFormat 'Is For All Ages'
                        - wait 1
                        - narrate format:NpcChatFormat 'Well That<&sq>s Everything, Now Away With You.'
                        - narrate format:NpcChatFormat 'I Have Some Other Appointments.' 
                        - zap step:6
                        } else if <npc.name> = "Trainer Fabian" {
                        - narrate format:NpcChatFormat 'You Don<&sq>t Need Me Anymore,'
                        }
                
                2:
                    trigger: I Am /Under 15/!
                    script:
                    - if <npc.name> = "Staff Leon" {
                        - flag player Age:2
                        - wait 1
                        - narrate format:NpcChatFormat 'Oh, Those Rebelion Years.'
                        - wait 1
                        - narrate format:NpcChatFormat 'But Don<&sq>t Worry, This Server'
                        - wait 1
                        - narrate format:NpcChatFormat 'Is For All Ages'
                        - wait 1
                        - narrate format:NpcChatFormat 'Well That<&sq>s Everything, Now Away With You.'
                        - narrate format:NpcChatFormat 'I Have Some Other Appointments.' 
                        - zap step:6
                        } else if <npc.name> = "Trainer Fabian" {
                        - narrate format:NpcChatFormat 'You Don<&sq>t Need Me Anymore,'
                        }
    
                3:
                    trigger: I Am /Under 18/!
                    script:
                    - if <npc.name> = "Staff Leon" {
                        - flag player Age:3
                        - wait 1
                        - narrate format:NpcChatFormat 'Oh, How Time Flys'
                        - wait 1
                        - narrate format:NpcChatFormat 'But Don<&sq>t Worry, This Server'
                        - wait 1
                        - narrate format:NpcChatFormat 'Is For All Ages'
                        - wait 1
                        - narrate format:NpcChatFormat 'Well That<&sq>s Everything, Now Away With You.'
                        - narrate format:NpcChatFormat 'I Have Some Other Appointments.' 
                        - zap step:6
                        } else if <npc.name> = "Trainer Fabian" {
                        - narrate format:NpcChatFormat 'You Don<&sq>t Need Me Anymore,'
                        }
                        
                4:
                    trigger: I Am /18 And Over/!
                    script:
                    - if <npc.name> = "Staff Leon" {
                        - flag player Age:4
                        - wait 1
                        - narrate format:NpcChatFormat 'Oh, Your Quite Mature'
                        - wait 1
                        - narrate format:NpcChatFormat 'But Don<&sq>t Worry, This Server'
                        - wait 1
                        - narrate format:NpcChatFormat 'Is For All Ages'
                        - wait 1
                        - narrate format:NpcChatFormat 'Well That<&sq>s Everything, Now Away With You.'
                        - narrate format:NpcChatFormat 'I Have Some Other Appointments.' 
                        - zap step:6
                        } else if <npc.name> = "Trainer Fabian" {
                        - narrate format:NpcChatFormat 'You Don<&sq>t Need Me Anymore,'
                        }
                  
                     
TestScript:
    type: world
    events:
        on player right clicks: 
        - if <context.item> == "<i@TheTermsOfService>" { 
            - narrate 'you have read the terms of service.'
            - flag player ReadTerms:1
            }
            
NpcChatFormat:
    type: format
    format"<blue><npc.name><&co> <white><text>"

                     
                     
                     
                     
                     
RegistrationPapers:
    type: item
    material: i@339
    display name: Registration Papers
    lore:
    - Show This To Staff Leon
    - To Start The Registration Process.
   # enchantments:
   # recipe:
   # furnace_recipe:
   # no_id:
    bound: true
   # color:
   # book:
    
TheTermsOfService:
    type: book
    title: Terms Of Service
    author: Yuri Isles
    text:
    - This is my book. There are many like it, but this one is mine!
    - Many <n>new <n> lines!
    - <p>Paragraphs, <p>too!
    
QuestCommand:
    type: world
    events:
        on questlog command:
        - narrate '<gold>---------------------------------------------'
        - narrate 'This Is The QuestLog,'
        - narrate 'Quests Are Colour Coded Acording To Your Progress.'
        - narrate '<dark_gray>Can<&sq>t Accept <gray>Can Accept <yellow>Active Quest <green>Completed Quest'
        - narrate '<dark_purple>Repeatable Quest.'
        - narrate '<gold>---------------------------------------------'
# Quest Become A Citizen       
        - if <player.flag[BecomeACitizen].asint> = 0 {
            - narrate '<dark_gray>Become A Citizen.'
            }
        - if <player.flag[BecomeACitizen].asint> = 1 {
            - narrate '<gray>Become A Citizen.'
            }
        - if <player.flag[BecomeACitizen].asint> = 2 {
            - narrate '<yellow>Become A Citizen.'
            }
        - if <player.flag[BecomeACitizen].asint> = 3 {
            - narrate '<green>Become A Citizen.'
            }
        - if <player.flag[BecomeACitizen].asint> = 4 {
            - narrate '<dark_purple>Become A Citizen.'
            }
# Quest Get Gear
        - if <player.flag[GetGear].asint> = 0 {
            - narrate '<dark_gray>Get Gear.'
            }
        - narrate '<gold>---------------------------------------------'    
        - determine fulfilled
        
        on quest command:
        - narrate '<gold>Commands<&co> /questlog'
        - determine fulfilled
        
        on cleartutorial command:
        - zap <TutorialQuests> <1>
        
        
JoinEvent:
    type: world
    events:
        on player joins:
            - flag player Joined:1
            - if <player.flag[Joined].asint> = 1 {
                - teleport <player> -151,214,134,Valhalla
                - execute as_op "ci"
                - flag player BecomeACitizen:0
                - flag player GetGear:0
                }
                
# NOTE. Use !script (websitetoscript) to check script for errors.



RawRaw



Pastes made: 67071