-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
728 lines (725 loc) · 21.8 KB
/
script.js
File metadata and controls
728 lines (725 loc) · 21.8 KB
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
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
function ryeonScript( type, textbox, npc ){
var temp = 1;
/* 대화 */
if( type == 1 ){
if( npc[1].favor < 10 ){
temp = Math.floor( Math.random()*4 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "...", false );
break;
case 2:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "혼자 있고 싶어.", false );
break;
case 3:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "저리 가!", false );
break;
case 4:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "내버려둬.", false );
break;
}
}
else if( npc[1].favor < 30 ){
temp = Math.floor( Math.random()*4 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "...", false );
break;
case 2:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "나한테 왜 이러는거야?", false );
break;
case 3:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "집?...^여기가 내 집이야.", false );
break;
case 4:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "그건 알아서 뭐하게!", false );
break;
}
}
else if( npc[1].favor < 50 ){
temp = Math.floor( Math.random()*5 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "...", false );
break;
case 2:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "엄마...^보고싶어...", false );
break;
case 3:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "집?...^여기가 내 집이야.", false );
break;
case 4:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "아니야...^신경 쓰지마...", false );
break;
case 5:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "정말?...^거짓말!", false );
break;
}
}
else if( npc[1].favor < 75 ){
temp = Math.floor( Math.random()*5 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "넌 정말...^못 말리는 애야.", false );
break;
case 2:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "엄마...^보고싶어...", false );
break;
case 3:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "엄마는 나를 버렸어.", false );
break;
case 4:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "아니야...^신경 쓰지마...", false );
break;
case 5:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "정말?...^거짓말!", false );
break;
}
}
else{
temp = Math.floor( Math.random()*5 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "나도 네가 좋아...♥", false );
break;
case 2:
initTextbox( textbox, npc[1].x, npc[1].y, 3, "약속해줘!^항상 내 곁에^있어줄거지?", false );
break;
case 3:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "우리 엄마처럼^날 버리지 않을거지?", false );
break;
case 4:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "넌 정말 다정한 것 같아.", false );
break;
case 5:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "믿을 수 있는^사람이 생겨서 기뻐♥", false );
break;
}
}
}
/* 좋은 선물 */
if( type == 2 ){
if( npc[1].favor < 10 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "...", false );
break;
case 2:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "흥ㆍㆍㆍ !", false );
break;
}
}
else if( npc[1].favor < 50 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "이런거 줘도^별로 고맙지 않아.", false );
break;
case 2:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "흥ㆍㆍㆍ !", false );
break;
}
}
else{
initTextbox( textbox, npc[1].x, npc[1].y, 1, "고마워...♥", false );
}
}
/* 나쁜 선물 */
if( type == 3 ){
if( npc[1].favor < 10 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "...", false );
break;
case 2:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "짜증나.", false );
break;
}
}
else if( npc[1].favor < 50 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "...", false );
break;
case 2:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "필요 없어.", false );
break;
}
}
else{
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[1].x, npc[1].y, 1, "...", false );
break;
case 2:
initTextbox( textbox, npc[1].x, npc[1].y, 2, "지금은 받을^기분이 아니야.", false );
break;
}
}
}
/* 선물 그만해 */
if( type == 4 ){
initTextbox( textbox, npc[1].x, npc[1].y, 1, "...", false );
}
};
function cheongScript( type, textbox, npc ){
var temp = 1;
/* 대화 */
if( type == 1 ){
if( npc[2].favor < 10 ){
temp = Math.floor( Math.random()*3 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "안녕~", false );
break;
case 2:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "어서와~", false );
break;
case 3:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "요즘 어때?", false );
break;
}
}
else if( npc[2].favor < 30 ){
temp = Math.floor( Math.random()*4 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "안녕~♥", false );
break;
case 2:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "어서와~♥", false );
break;
case 3:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "또 왔네~!", false );
break;
case 4:
initTextbox( textbox, npc[2].x, npc[2].y, 2, "참!^그 얘기 들었어?", false );
break;
}
}
else if( npc[2].favor < 50 ){
temp = Math.floor( Math.random()*5 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "어서와~♥", false );
break;
case 2:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "글쎄, 걔가 그랬대!", false );
break;
case 3:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "정말 웃기지 않아?", false );
break;
case 4:
initTextbox( textbox, npc[2].x, npc[2].y, 2, "참!^그 얘기 들었어?", false );
break;
case 5:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "웃겨 정말~", false );
break;
}
}
else if( npc[2].favor < 75 ){
temp = Math.floor( Math.random()*5 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[2].x, npc[2].y, 2, "어서와~♥^멋진 청년♥", false );
break;
case 2:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "너랑 있으면 즐거워♥", false );
break;
case 3:
initTextbox( textbox, npc[2].x, npc[2].y, 2, "하하, 정말?^너도 멋있어~♥", false );
break;
case 4:
initTextbox( textbox, npc[2].x, npc[2].y, 2, "참!^그 얘기 들었어?", false );
break;
case 5:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "웃겨 정말~♥", false );
break;
}
}
else{
temp = Math.floor( Math.random()*5 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[2].x, npc[2].y, 2, "어서와~♥^자기~♥", false );
break;
case 2:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "너랑 있으면 즐거워♥", false );
break;
case 3:
initTextbox( textbox, npc[2].x, npc[2].y, 2, "하하, 정말?^너도 멋있어~♥", false );
break;
case 4:
initTextbox( textbox, npc[2].x, npc[2].y, 4, "네가 없어지면?^글쎄~^무지무지 슬프겠지?^그런데 왜?", false );
break;
case 5:
initTextbox( textbox, npc[2].x, npc[2].y, 3, "이제 네가 없는^일상은 상상할^수가 없어!", false );
break;
}
}
}
/* 좋은 선물 */
if( type == 2 ){
if( npc[2].favor < 10 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "어머~ 고마워라~", false );
break;
case 2:
initTextbox( textbox, npc[2].x, npc[2].y, 2, "이렇게 비싼걸!^고마워~", false );
break;
}
}
else if( npc[2].favor < 50 ){
temp = Math.floor( Math.random()*3 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "어머~ 고마워라~♥", false );
break;
case 2:
initTextbox( textbox, npc[2].x, npc[2].y, 2, "이렇게 비싼걸!^고마워~♥", false );
break;
case 3:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "너, 보는 눈이 있구나?", false );
break;
}
}
else{
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "고마워~♥", false );
break;
case 2:
initTextbox( textbox, npc[2].x, npc[2].y, 2, "내 생각 해주는건^너 밖에 없다니까~♥", false );
break;
}
}
}
/* 나쁜 선물 */
if( type == 3 ){
if( npc[2].favor < 10 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "하하~ 너도 참~", false );
break;
case 2:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "좀 더 성의를 보여봐~", false );
break;
}
}
else{
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "하하~ 너도 참~♥", false );
break;
case 2:
initTextbox( textbox, npc[2].x, npc[2].y, 1, "왜 그래 정말~!", false );
break;
}
}
}
/* 선물 그만해 */
if( type == 4 ){
initTextbox( textbox, npc[2].x, npc[2].y, 1, "오늘은 그만 됐어~", false );
}
/* 상점 닫기 */
if( type == 5 ){
if( npc[2].favor < 10 ){
initTextbox( textbox, npc[2].x, npc[2].y, 1, "다음에 또 와~", false );
}
else{
initTextbox( textbox, npc[2].x, npc[2].y, 1, "다음에 또 와~♥", false );
}
}
};
function jinScript( type, textbox, npc ){
var temp = 1;
/* 대화 */
if( type == 1 ){
if( npc[3].favor < 10 ){
temp = Math.floor( Math.random()*3 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "안녕!", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "또 보네.", false );
break;
case 3:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "힘들다 힘들어.", false );
break;
}
}
else if( npc[3].favor < 30 ){
temp = Math.floor( Math.random()*4 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "안녕~!", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "오늘은 무슨 일이야?", false );
break;
case 3:
initTextbox( textbox, npc[3].x, npc[3].y, 3, "인생 참...^힘들다 힘들어.^그렇지 않아?", false );
break;
case 4:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "뭐 도와줄 거라도 있어?", false );
break;
}
}
else if( npc[3].favor < 50 ){
temp = Math.floor( Math.random()*5 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "안녕~♥", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "언제 오나 기다렸잖아!", false );
break;
case 3:
initTextbox( textbox, npc[3].x, npc[3].y, 2, "요즘은 그래도^네가 있어서 살만해.", false );
break;
case 4:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "뭐 도와줄 거라도 있어?", false );
break;
case 5:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "응응!", false );
break;
}
}
else if( npc[3].favor < 75 ){
temp = Math.floor( Math.random()*7 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "안녕~♥", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "언제 오나 기다렸잖아!", false );
break;
case 3:
initTextbox( textbox, npc[3].x, npc[3].y, 4, "요즘은 그래도^네가 있어서 살만해.^힘들어도 네 얼굴보면^힘이 나는 것 같아!", false );
break;
case 4:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "뭐 도와줄 거라도 있어?", false );
break;
case 5:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "응응!", false );
break;
case 6:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "정말로?^잉, 부끄럽게...", false );
break;
case 7:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "넌 정말 다정한^남자야~^널 만날 수 있어서^참 다행이야.", false );
break;
}
}
else{
temp = Math.floor( Math.random()*7 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "안녕~♥", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "언제 오나 기다렸잖아!", false );
break;
case 3:
initTextbox( textbox, npc[3].x, npc[3].y, 4, "요즘은 그래도^네가 있어서 살만해.^힘들어도 네 얼굴보면^힘이 나는 것 같아♥", false );
break;
case 4:
initTextbox( textbox, npc[3].x, npc[3].y, 4, "네가 없어지면?^안 돼!^...^아무튼 안 돼!", false );
break;
case 5:
initTextbox( textbox, npc[3].x, npc[3].y, 4, "불안하게 왜 그런^소리를 하는거야!^당연히 항상^네 곁에 있어야지!", false );
break;
case 6:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "정말로?^잉, 부끄럽게...♥", false );
break;
case 7:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "넌 정말 다정한^남자야~♥^널 만날 수 있어서^참 다행이야!", false );
break;
}
}
}
/* 좋은 선물 */
if( type == 2 ){
if( npc[3].favor < 10 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "땡큐!", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "감사~", false );
break;
}
}
else if( npc[3].favor < 50 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "뭘 이런걸 다...", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 2, "너 정말 내생각^많이 하는구나!", false );
break;
}
}
else{
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "고마워~♥", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 2, "너 정말 내생각^많이 하는구나♥", false );
break;
}
}
}
/* 나쁜 선물 */
if( type == 3 ){
if( npc[3].favor < 10 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "장난해?", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "뭐야 이게?", false );
break;
}
}
else if( npc[3].favor < 50 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "이건 언제든 먹을 수 있어.", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "별로다 정말.", false );
break;
}
}
else{
initTextbox( textbox, npc[3].x, npc[3].y, 1, "이건 언제든 먹을 수 있어~", false );
}
}
/* 선물 그만해 */
if( type == 4 ){
if( npc[3].favor < 10 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "부담스러워!", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "왜 자꾸 주는거야?", false );
break;
}
}
else if( npc[3].favor < 50 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "이제 그만해.", false );
break;
case 2:
initTextbox( textbox, npc[3].x, npc[3].y, 1, "왜 자꾸 주는거야?", false );
break;
}
}
else{
initTextbox( textbox, npc[3].x, npc[3].y, 1, "이제 괜찮아~", false );
}
}
/* 상점 닫기 */
if( type == 5 ){
if( npc[3].favor < 30 ){
initTextbox( textbox, npc[3].x, npc[3].y, 1, "잘 가~", false );
}
else if( npc[3].favor < 50 ){
initTextbox( textbox, npc[3].x, npc[3].y, 1, "다음에 또 놀러와~", false );
}
else{
initTextbox( textbox, npc[3].x, npc[3].y, 1, "다음에 또 놀러와~♥", false );
}
}
};
function looScript( type, textbox, npc ){
var temp = 1;
/* 대화 */
if( type == 1 ){
if( npc[4].favor < 10 ){
temp = Math.floor( Math.random()*4 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "안녕하세요!", false );
break;
case 2:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "오랜만이에요!", false );
break;
case 3:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "하핫!", false );
break;
case 4:
initTextbox( textbox, npc[4].x, npc[4].y, 2, "저는 5일마다 찾아오는^무역상이에요!", false );
break;
}
}
else if( npc[4].favor < 30 ){
temp = Math.floor( Math.random()*5 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "안녕하세요!", false );
break;
case 2:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "오랜만이에요!", false );
break;
case 3:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "하핫!", false );
break;
case 4:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "기다렸죠?", false );
break;
case 5:
initTextbox( textbox, npc[4].x, npc[4].y, 2, "오늘은 싸고 좋은^물건들이 많아요!", false );
break;
}
}
else if( npc[4].favor < 50 ){
temp = Math.floor( Math.random()*6 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[4].x, npc[4].y, 4, "섬에 올 날만을^기다렸답니다!^이유는...^비밀이에요!", false );
break;
case 2:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "오랜만이에요!", false );
break;
case 3:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "하핫♥", false );
break;
case 4:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "기다렸죠?", false );
break;
case 5:
initTextbox( textbox, npc[4].x, npc[4].y, 2, "오늘은 싸고 좋은^물건들이 많아요!", false );
break;
case 6:
initTextbox( textbox, npc[4].x, npc[4].y, 2, "또 헤어져야 한다니~^아쉬워라!", false );
break;
}
}
else if( npc[4].favor < 75 ){
temp = Math.floor( Math.random()*6 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[4].x, npc[4].y, 4, "섬에 올 날만을^기다렸답니다!^이유는...^비밀이에요!", false );
break;
case 2:
initTextbox( textbox, npc[4].x, npc[4].y, 2, "정말요?^기뻐요~♥", false );
break;
case 3:
initTextbox( textbox, npc[4].x, npc[4].y, 3, "5일이 아니라^3일마다 올까봐요!^하핫♥", false );
break;
case 4:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "기다렸죠?", false );
break;
case 5:
initTextbox( textbox, npc[4].x, npc[4].y, 2, "오늘은 싸고 좋은^물건들이 많아요!", false );
break;
case 6:
initTextbox( textbox, npc[4].x, npc[4].y, 2, "또 헤어져야 한다니~^아쉬워라!", false );
break;
}
}
else{
temp = Math.floor( Math.random()*6 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "보고싶었어요♥", false );
break;
case 2:
initTextbox( textbox, npc[4].x, npc[4].y, 5, "당신은 꼭 어디론가^훌쩍 떠나버릴 것 같아요...^아니죠?^항상 절 만나러^와주실거죠?", false );
break;
case 3:
initTextbox( textbox, npc[4].x, npc[4].y, 3, "마음 같아서는^매일 매일 오고싶네요~^하핫♥", false );
break;
case 4:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "기다렸죠?♥", false );
break;
case 5:
initTextbox( textbox, npc[4].x, npc[4].y, 2, "오늘은 싸고 좋은^물건들이 많아요!", false );
break;
case 6:
initTextbox( textbox, npc[4].x, npc[4].y, 3, "꼭!^다음에도 와주셔야해요!^기다릴게요♥", false );
break;
}
}
}
/* 좋은 선물 */
if( type == 2 ){
if( npc[4].favor < 10 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "와!고마워요!", false );
break;
case 2:
initTextbox( textbox, npc[4].x, npc[4].y, 2, "제가 이런걸^받아도 될까요?", false );
break;
}
}
else{
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "와!고마워요♥", false );
break;
case 2:
initTextbox( textbox, npc[4].x, npc[4].y, 2, "정말~^매번 받기만 하네요~", false );
break;
}
}
}
/* 나쁜 선물 */
if( type == 3 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "괜찮아요!", false );
break;
case 2:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "앗!...", false );
break;
}
}
/* 선물 그만해 */
if( type == 4 ){
temp = Math.floor( Math.random()*2 ) + 1;
switch( temp ){
case 1:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "이제 괜찮아요!", false );
break;
case 2:
initTextbox( textbox, npc[4].x, npc[4].y, 1, "정말 고마워요!", false );
break;
}
}
/* 상점 닫기 */
if( type == 5 ){
if( npc[4].favor < 30 ){
initTextbox( textbox, npc[4].x, npc[4].y, 2, "감사합니다~^또 오세요!", false );
}
else{
initTextbox( textbox, npc[4].x, npc[4].y, 2, "감사합니다♥^또 오실거죠?", false );
}
}
};