summaryrefslogtreecommitdiff
path: root/doc/sample/npc_pcre.txt
blob: adc96f5851f3ec836be5210b282b285888f00d20 (plain) (blame)
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
//===== rAthena Script =======================================
//= Sample: PCRE
//===== By: ==================================================
//= rAthena Dev Team
//===== Current Version: =====================================
//= 20100108
//===== Description: ========================================= 
//= Demonstrates PCRE commands.
//============================================================

prontera,152,181,5	script	MouseJstr	763,{

// hello
Lquote0:
        npctalk "How do you do.  Please state your problem.";
        end;

// computer
Lquote1:
        switch(rand(4)) {
		case 0: npctalk "Do computers worry you?"; break;
		case 1: npctalk "What do you think about machines?"; break;
		case 2: npctalk "Why do you mention computers?"; break;
		case 3: npctalk "What do you think machines have to do with your problem?"; break;
	}
        end;

// name
Lquote2:
        npctalk "I am not interested in names";
        end;

// sorry
Lquote3:
	switch(rand(3)) {
		case 0: npctalk "Please don't apologize"; break;
		case 1: npctalk "Apologies are not necessary"; break;
		case 2: npctalk "What feelings do you have when you apologize"; break;
	}
        end;

// I remember $@p2$
Lquote4:
	switch(rand(6)) {
		case 0: npctalk "Do you often think of "+$@p2$+"?"; break;
		case 1: npctalk "Does thinking of "+$@p2$+" bring anything else to mind?"; break;
		case 2: npctalk "What else do you remember?"; break;
		case 3: npctalk "Why do you recall "+$@p2$+" right now?"; break;
		case 4: npctalk "What in the present situation reminds you of "+$@p2$+"?"; break;
		case 5: npctalk "What is the connection between me and "+$@p2$+"?"; break;
	}
        end;

//    do you remember
Lquote5:
	switch (rand(4)) {
		case 0: npctalk "Did you think I would forget "+$@p2$+" ?"; break;
		case 1: npctalk "Why do you think I should recall "+$@p2$+" now"; break;
		case 2: npctalk "What about "+$@p2$+""; break;
		case 3: npctalk "You mentioned "+$@p2$+""; break;
	}
        end;

// if
Lquote6:
	switch(rand(4)) {
		case 0: npctalk "Do you really think its likely that "+$@p2$+""; break;
		case 1: npctalk "Do you wish that "+$@p2$+"?"; break;
		case 2: npctalk "What do you think about "+$@p2$+"?"; break;
		case 3: npctalk "Really-- if "+$@p2$+"?"; break;
	}
        end;

//  i dreamt
Lquote7:
	switch(rand(3)) {
		case 0: npctalk "Really-- "+$@p2$+""; break;
		case 1: npctalk "Have you ever fantasized "+$@p2$+" while you were awake?"; break;
		case 2: npctalk "Have you dreamt "+$@p2$+" before?"; break;
	}
        end;

//   dream about
Lquote8:
        npctalk "How do you feel about "+$@p2$+" in reality?";
        end;

//  dream
Lquote9:
	switch(rand(4)) {
		case 0: npctalk "What does this dream suggest to you?"; break;
		case 1: npctalk "Do you dream often?"; break;
		case 2: npctalk "What persons appear in your dreams?"; break;
		case 3: npctalk "Don't you believe that dream has to do with your problem?"; break;
	}
        end;

//   my mother
Lquote10:
	switch(rand(2)) {
		case 0: npctalk "Who else in your family "+$@p2$+""; break;
		case 1: npctalk "Tell me more about your family"; break;
	}
        end;

//   my father
Lquote11:
	switch(rand(3)) {
		case 0: npctalk "Your father"; break;
		case 1: npctalk "Does he influence you strongly?"; break;
		case 2: npctalk "What else comes to mind when you think of your father?"; break;
	}
        end;

//   I want
Lquote12:
	switch(rand(3)) {
		case 0: npctalk "What would it mean if you got "+$@p2$+""; break;
		case 1: npctalk "Why do you want "+$@p2$+""; break;
		case 2: npctalk "Suppose you got "+$@p2$+" soon"; break;
	}
        end;

//    I am glad 
Lquote13:
	switch(rand(3)) {
		case 0: npctalk "How have I helped you to be "+$@p2$+""; break;
		case 1: npctalk "What makes you happy just now"; break;
		case 2: npctalk "Can you explain why you are suddenly "+$@p2$+""; break;
	}
        end;

//    I am sad 
Lquote14:
	switch(rand(2)) {
		case 0: npctalk "I am sorry to hear you are depressed"; break;
		case 1: npctalk "I'm sure its not pleasant to be sad"; break;
	}
        end;

//   $@p2 are like "+$@p3$+"
Lquote15:
        npctalk "What resemblance do you see between "+$@p2$+" and "+$@p3$+"";
        end;

//   "+$@p2$+" is like "+$@p3$+"
Lquote16:
	switch(rand(4)) {
		case 0: npctalk "In what way is it that "+$@p2$+" is like "+$@p3$+""; break;
		case 1: npctalk "What resemblance do you see?"; break;
		case 2: npctalk "Could there really be some connection?"; break;
		case 3: npctalk "How?"; break;
	}
        end;

//   alike
Lquote17:
	switch(rand(2)) {
		case 0: npctalk "In what way?"; break;
		case 1: npctalk "What similarities are there?"; break;
	}
        end;

//    same 
Lquote18:
        npctalk "What other connections do you see?";
        end;

//   I was "+$@p2$+"
Lquote19:
	switch(rand(3)) {
		case 0: npctalk "Were you really?"; break;
		case 1: npctalk "Perhaps I already knew you were "+$@p2$+""; break;
		case 2: npctalk "Why do you tell me you were "+$@p2$+" now?"; break;
	}
        end;

//    was I
Lquote20:
	switch(rand(3)) {
		case 0: npctalk "What if you were "+$@p2$+" ?"; break;
		case 1: npctalk "Do you thin you were "+$@p2$+""; break;
		case 2: npctalk "What would it mean if you were "+$@p2$+""; break;
	}
        end;

//    I am
Lquote21:
	switch(rand(2)) {
		case 0: npctalk "In what way are you "+$@p2$+""; break;
		case 1: npctalk "Do you want to be "+$@p2$+" ?"; break;
	}
        end;

//   am I
Lquote22:
	switch(rand(4)) {
		case 0: npctalk "Do you believe you are "+$@p2$+""; break;
		case 1: npctalk "Would you want to be "+$@p2$+""; break;
		case 2: npctalk "You wish I would tell you you are "+$@p2$+""; break;
		case 3: npctalk "What would it mean if you were "+$@p2$+""; break;
	}
        end;

//   am
Lquote23:
	switch(rand(2)) {
		case 0: npctalk "Why do you say AM?"; break;
		case 1: npctalk "I don't understand that"; break;
	}
        end;

//    are you
Lquote24:
	switch(rand(3)) {
		case 0: npctalk "Why are you interested in whether I am "+$@p2$+" or not?"; break;
		case 1: npctalk "Would you prefer if I weren't "+$@p2$+""; break;
		case 2: npctalk "Perhaps I am "+$@p2$+" in your fantasies"; break;
	}
        end;

//   you are 
Lquote25:
        npctalk "What makes you think I am "+$@p2$+" ?";
        end;

//   because
Lquote26:
	switch(rand(3)) {
		case 0: npctalk "Is that the real reason?"; break;
		case 1: npctalk "What other reasons might there be?"; break;
		case 2: npctalk "Does that reason seem to explain anything else?"; break;
	}
        end;

//    were you 
Lquote27:
	switch(rand(3)) {
		case 0: npctalk "Perhaps I was "+$@p2$+""; break;
		case 1: npctalk "What do you think?"; break;
		case 2: npctalk "What if I had been "+$@p2$+""; break;
	}
        end;

//   I can't 
Lquote28:
	switch(rand(2)) {
		case 0: npctalk "Maybe you could "+$@p3$+" now"; break;
		case 1: npctalk "What if you could "+$@p3$+" ?"; break;
	}
        end;

//    I feel 
Lquote29:
        npctalk "Do you often feel "+$@p2$+" ?";
        end;

//    I felt
Lquote30:
        npctalk "What other feelings do you have?";
        end;

//   $@p1$ I $@p2$ you $@p3$
Lquote31:
        npctalk "Perhaps in your fantasy we "+$@p3$+" each other?";
        end;

//   why don't you 
Lquote32:
	switch(rand(3)) {
		case 0: npctalk "Should you "+$@p3$+" yourself?"; break;
		case 1: npctalk "Do you believe I don't "+$@p3$+""; break;
		case 2: npctalk "Perhaps I will "+$@p3$+" in good time"; break;
	}
        end;

//   yes 
Lquote33:
	switch(rand(3)) {
		case 0: npctalk "You seem quite positive"; break;
		case 1: npctalk "You are sure?"; break;
		case 2: npctalk "I understand"; break;
	}
        end;

//    no
Lquote34:
	switch(rand(3)) {
		case 0: npctalk "Why not?"; break;
		case 1: npctalk "You are being a bit negative"; break;
		case 2: npctalk "Are you saying NO just to be negative?"; break;
	}
        end;

//    someone
Lquote35:
        npctalk "Can you be more specific?";
        end;

//    everyone 
Lquote36:
	switch(rand(4)) {
		case 0: npctalk "surely not everyone"; break;
		case 1: npctalk "Can you think of anyone in particular?"; break;
		case 2: npctalk "Who for example?"; break;
		case 3: npctalk "You are thinking of a special person?"; break;
	}
        end;

//  always 
Lquote37:
	switch(rand(4)) {
		case 0: npctalk "Can you think of a specific example?"; break;
		case 1: npctalk "When?"; break;
		case 2: npctalk "What incident are you thinking of?"; break;
		case 3: npctalk "Really-- always?"; break;
	}
        end;

//   what
Lquote38:
	switch(rand(5)) {
		case 0: npctalk "Why do you ask?"; break;
		case 1: npctalk "Does that question interest you?"; break;
		case 2: npctalk "What is it you really want to know?"; break;
		case 3: npctalk "What do you think?"; break;
		case 4: npctalk "What comes to your mind when you ask that?"; break;
	}
        end;

//   perhaps 
Lquote39:
        npctalk "You do not seem quite certain";
        end;

//   are
Lquote40:
	switch(rand(2)) {
		case 0: npctalk "Did you think they might not be "+$@p2$+""; break;
		case 1: npctalk "Possibly they are "+$@p2$; break;
	}
        end;

//   default
Lquote41:
	switch(rand(6)) {
		case 0: npctalk "Very interesting"; break;
		case 1: npctalk "I am not sure I understand you fully"; break;
		case 2: npctalk "What does that suggest to you?"; break;
		case 3: npctalk "Please continue"; break;
		case 4: npctalk "Go on"; break;
		case 5: npctalk "Do you feel strongly about discussing such things?"; break;
	}
        end;

OnInit:
        defpattern 1, "([^:]+):.*\\shello.*", "Lquote0";
        defpattern 1, "([^:]+):.*\\scomputer.*", "Lquote1";
        defpattern 1, "([^:]+):.*\\sname.*", "Lquote2";
        defpattern 1, "([^:]+):.*\\ssorry.*", "Lquote3";
        defpattern 1, "([^:]+):.*\\si\\s+remember\\s+(.*)", "Lquote4";
        defpattern 1, "([^:]+):.*\\sdo\\s+you\\s+remember\\s+(.*)", "Lquote5";
        defpattern 1, "([^:]+):.*\\sif\\s+(.*)", "Lquote6";
        defpattern 1, "([^:]+):.*\\si\\s+dreamt\\s+(.*)", "Lquote7";
        defpattern 1, "([^:]+):.*\\sdream\\s+about\\s+(.*)", "Lquote8";
        defpattern 1, "([^:]+):.*\\sdream\\s+(.*)", "Lquote9";
        defpattern 1, "([^:]+):.*\\smy\\s+mother\\s+(.*)", "Lquote10";
        defpattern 1, "([^:]+):.*\\smy\\s+father\\s+(.*)", "Lquote11";
        defpattern 1, "([^:]+):.*\\si\\s+want\\s+(.*)", "Lquote12";
        defpattern 1, "([^:]+):.*\\si\\s+am\\s+glad\\s+(.*)", "Lquote13";
        defpattern 1, "([^:]+):\\s+(.*)\\s+i\\s+am\\s+sad\\s+(.*)", "Lquote14";
        defpattern 1, "([^:]+):\\s+(.*)\\s+are\\s+like\\s+(.*)", "Lquote15";
        defpattern 1, "([^:]+):\\s+(.*)\\s+is\\s+like\\s+(.*)", "Lquote16";
        defpattern 1, "([^:]+):.*\\salike\\s+(.*)", "Lquote17";
        defpattern 1, "([^:]+):.*\\ssame\\s+(.*)", "Lquote18";
        defpattern 1, "([^:]+):.*\\si\\s+was\\s+(.*)", "Lquote19";
        defpattern 1, "([^:]+):.*\\swas\\s+i\\s+(.*)", "Lquote20";
        defpattern 1, "([^:]+):.*\\si\\s+am\\s+(.*)", "Lquote21";
        defpattern 1, "([^:]+):.*\\sam\\s+i\\s+(.*)", "Lquote22";
        defpattern 1, "([^:]+):.*\\sam\\s+(.*)", "Lquote23";
        defpattern 1, "([^:]+):.*\\sare\\s+you\\s+(.*)", "Lquote24";
        defpattern 1, "([^:]+):.*\\syou\\s+are\\s+(.*)", "Lquote25";
        defpattern 1, "([^:]+):.*\\sbecause\\s+(.*)", "Lquote26";
        defpattern 1, "([^:]+):.*\\swere\\s+you\\s+(.*)", "Lquote27";
        defpattern 1, "([^:]+):.*\\si\\s+(cant|can't|cannot)\\s+(.*)", "Lquote28";
        defpattern 1, "([^:]+):.*\\si\\s+feel\\s+(.*)", "Lquote29";
        defpattern 1, "([^:]+):.*\\si\\s+felt\\s+(.*)", "Lquote30";
        defpattern 1, "([^:]+):.*\\si\\s+(.*)\\s+you\\s+(.*)", "Lquote31";
        defpattern 1, "([^:]+):.*\\swhy\\s+(don't|dont)\\s+you\\s+(.*)", "Lquote32";
        defpattern 1, "([^:]+):.*\\syes\\s+(.*)", "Lquote33";
        defpattern 1, "([^:]+):.*\\sno\\s+(.*)", "Lquote34";
        defpattern 1, "([^:]+):.*\\ssomeone\\s+(.*)", "Lquote35";
        defpattern 1, "([^:]+):.*\\severyone\\s+(.*)", "Lquote36";
        defpattern 1, "([^:]+):.*\\salways\\s+(.*)", "Lquote37";
        defpattern 1, "([^:]+):.*\\swhat\\s+(.*)", "Lquote38";
        defpattern 1, "([^:]+):.*\\sperhaps\\s+(.*)", "Lquote39";
        defpattern 1, "([^:]+):.*\\sare\\s+(.*)", "Lquote40";
        defpattern 1, "([^:]+):(.*)", "Lquote41";

        activatepset 1;
        end;
}