summaryrefslogtreecommitdiff
path: root/npc/re/merchants/coin_exchange.txt
blob: 2796a4a7083646f34c541520bd6ab3423c2d7fa3 (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
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
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
//===== Hercules Script ======================================
//= Coin Merchants
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
//= 1.2
//===== Description: =========================================
//= [Official Conversion]
//= Renewal coin redemption NPCs.
//===== Additional Comments: =================================
//= 1.0 First version. [Euphy/Lemongrass]
//= 1.1 Added remaining Malangdo traders. [Euphy/Lemongrass]
//= 1.2 Added Eclage traders (not fully complete). [Euphy]
//============================================================

// Malangdo
//============================================================
malangdo,220,167,5	script	Coin Exchanger CX-1	564,{
	if (checkweight(1201,1) == 0) {
		mes "You have too many kinds of objects. Let's try to continue after reducing those objects.";
		close;
	}
	if (MaxWeight - Weight < 10000) {
		mes "Can't continue because you have too many heavy objects. Let's try to continue after reducing the weight.";
		close;
	}
	mes "[Coin Exchanger CX-1]";
	mes "Welcome to CX-1. If you have coins, you can exchange them to high or low grade coins.";
	next;
	setarray .@coins[1],
		6417, //Silvervine
		6418, //Agrade_Coin
		6419, //Bgrade_Coin
		6420, //Cgrade_Coin
		6421, //Dgrade_Coin
		6422; //Egrade_Coin
	set .@menu$,"Stop:";
	for(set .@i,1; .@i<=6; set .@i,.@i+1) {
		if (countitem(.@coins[.@i]))
			set .@menu$, .@menu$+getitemname(.@coins[.@i])+":";
		else
			set .@menu$, .@menu$+"^aaaaaa"+getitemname(.@coins[.@i])+" (None)^000000:";
	}
	set .@i, select(.@menu$);
	switch(.@i) {
	case 1:
		mes "[Coin Exchanger CX-1]";
		mes "Thank you for coming.";
		close;
	default:
		set .@coin, .@coins[.@i-1];
		set .@coin_select, .@i-1;
		break;
	}
	if (countitem(.@coin) == 0) {
		mes "[Coin Exchanger CX-1]";
		mes "You chose a coin that you don't have.";
		mes "Thank you for coming.";
		close;
	}
	mes "[Coin Exchanger CX-1]";
	mes "----Rate of exchange----";
	mes "Higher exchange - 30 to 10";
	mes "Lower exchange - 10 to 30";
	mes "------------------------";
	mes "^ff3333When you exchange, we charge a fee according to the current market price.^000000";
	next;
	setarray .@exchange_name$[0],"higher","lower";
	setarray .@exchange_rate[0],30,10;
	setarray .@exchange_loss[0],rand(1,4),rand(1,2); // Amount deducted per exchange.
	setarray .@exchange_id[0],.@coins[.@coin_select-1],.@coins[.@coin_select+1];
	if (.@exchange_id[0] == .@coins[1]) set .@exchange_id[0],0; // Cannot exchange for Silvervine.
	set .@menu$,"Stop:";
	for(set .@i,0; .@i<2; set .@i,.@i+1) {
		if (.@exchange_id[.@i] == 0)
			set .@menu$, .@menu$+"^ff3333Unavailable exchange to "+.@exchange_name$[.@i]+" coin^000000:";
		else if (countitem(.@coin) < .@exchange_rate[.@i])
			set .@menu$, .@menu$+"^aaaaaaExchange to "+.@exchange_name$[.@i]+" coin (null)^000000:";
		else
			set .@menu$, .@menu$+"Exchange to "+.@exchange_name$[.@i]+" coin - "+getitemname(.@coin)+" ("+.@exchange_rate[.@i]+" needed):";
	}
	set .@i, select(.@menu$)-2;
	if (.@i == -1) {
		mes "[Coin Exchanger CX-1]";
		mes "Thank you for coming.";
		close;
	}
	if (.@exchange_id[.@i] == 0) {
		mes "[Coin Exchanger CX-1]";
		mes "This coin is not available to exchange to "+.@exchange_name$[.@i]+" coin.";
		mes "Thank you for coming.";
		close;
	}
	if (countitem(.@coin) < .@exchange_rate[.@i]) {
		mes "[Coin Exchanger CX-1]";
		mes "You don't have enough coins to exchange to "+.@exchange_name$[.@i]+" coin.";
		mes "Thank you for coming.";
		close;
	}
	set .@exchange_total, .@exchange_rate[(!.@i)] - .@exchange_loss[(!.@i)];
	delitem .@coin, .@exchange_rate[.@i];
	getitem .@exchange_id[.@i], .@exchange_total;
	mes "[Coin Exchanger CX-1]";
	mes "^003399"+.@exchange_rate[.@i]+"^000000 unit(s) of ^003399 "+getitemname(.@coin)+"^000000 taken.";
	mes "I exchanged them for ^003399"+.@exchange_name$[.@i]+" coins^000000, after deducting ^003399"+.@exchange_loss[(!.@i)]+"^000000 unit(s), ^003399"+.@exchange_total+"^000000 unit(s) remaining.";
	close;
}

malangdo,218,165,5	script	Special Vending Machine	562,{
	if (checkweight(1201,1) == 0) {
		mes "You have too many kinds of objects. Let's try to continue after reducing those objects.";
		close;
	}
	if (MaxWeight - Weight < 10000) {
		mes "Can't continue because you have too many heavy objects. Let's try to continue after reducing the weight.";
		close;
	}
	mes "[Special Vending Machine]";
	mes "Welcome to CX-82. You have a Silvervine Fruit, so you can purchase the Malangdo Specialty that has special ability.";
	next;
	callsub L_AddItem, //DisplayName,ItemID,Cost
		"Seagod's Protection [23 hours]",16740,4,
		"Seagod's Protection [7 days]",16763,12,
		"Seagod's Protection [15 days]",16764,24,
		"Octopus Hunting Stick [23 hours]",16765,2,
		"Octopus Hunting Stick [3 days]",16766,5,
		"Octopus Hunting Stick [7 days]",16767,10,
		"Premium Lubricant",6441,56,
		"Ordinary Lubricant",6440,36,
		"Sillit Pong",6443,192;
L_AddItem:
	set .@menu$,"Explanation:";
	for(set .@i,0; .@i<getargcount(); set .@i,.@i+3)
		set .@menu$, .@menu$+getarg(.@i)+":";
	set .@i, select(.@menu$)-2;
	if (.@i == -1) {
		mes "[Special Vending Machine]";
		mes "Seagod's Protection is an item used for entering the Culvert memorial dungeon during a certain period.";
		next;
		mes "[Special Vending Machine]";
		mes "Octopus Hunting Stick is an item used for entering the Culvert memorial dungeon during a certain period.";
		next;
		mes "[Special Vending Machine]";
		mes "Premium and Ordinary Lubricant are items used for separation of equipment and cards. If you visit the specialist Jeremy with either item, he will explain more details of the effects.";
		next;
		mes "[Special Vending Machine]";
		mes "Sillit Pong is special item that separates sockets with MVP cards. Unable to separate MVP card by Premium and Ordinary Lubricant.";
		close;
	}
	set .@cost, getarg(.@i*3+2);
	mes "[Special Vending Machine]";
	mes "You choose ^005500"+getarg(.@i*3)+"^000000. For purchasing, you need ^005500"+.@cost+"^000000 unit(s) of Silvervine Fruit.";
	next;
	if (countitem(6417) < .@cost)
		set .@ven_menu$, "^999999Silvervine Fruit (missing "+(.@cost - countitem(6417))+")^000000";
	else
		set .@ven_menu$, "Purchase - Silvervine Fruit (have "+countitem(6417)+")";
	switch(select("Stop:"+.@ven_menu$)) {
	case 1:
		mes "[Special Vending Machine]";
		mes "Thank you for coming.";
		close;
	case 2:
		if (countitem(6417) < .@cost) {
			mes "[Special Vending Machine]";
			mes "Not enough Silvervine Fruit.";
			mes "Closing the transaction.";
			mes "Thank you for coming.";
			close;
		}
		mes "[Special Vending Machine]";
		mes "The transaction is completed. Thank you for coming.";
		delitem 6417,.@cost; //Silvervine
		getitem getarg(.@i*3+1),1;
		close;
	}
}

malangdo,236,179,5	script	Dark Merchant K	554,{
	if (checkweight(1201,1) == 0) {
		mes "It seems you have too much in your inventory. Let's try again after getting rid of some of your belongings.";
		close;
	}
	if (MaxWeight - Weight < 1000) {
		mes "Your inventory is too heavy now. Please come back after getting rid of some of your belongings.";
		close;
	}
	mes "[Merchant K]";
	mes "Thank you for the trade.";
	mes "We exchange ^ff000010 C Grade Coin^000000 to ^3333ff1 Mora Coin^000000. Shall we begin then?";
	next;
	setarray .@coin_amount[0],10,100,500,1000;
	while(1) {
		set .@menu$,"";
		for(set .@i,0; .@i<getarraysize(.@coin_amount); set .@i,.@i+1) {
			if (countitem(6420) >= .@coin_amount[.@i])
				set .@menu$, .@menu$+"Exchange "+(.@coin_amount[.@i]/10)+" Mora Coin:";
			else
				set .@menu$, .@menu$+"^aaaaaaExchange "+(.@coin_amount[.@i]/10)+" Mora Coin (Not Enough)^000000:";
		}
		set .@i, select(.@menu$+"Quit")-1;
		if (.@i == getarraysize(.@coin_amount)) {
			mes "[Merchant K]";
			mes "Let's exchange some other time.";
			close;
		}
		if (countitem(6420) < .@coin_amount[.@i]) {
			mes "[Merchant K]";
			mes "You need ^ff0000"+.@coin_amount[.@i]+"^000000 C Grade Coin to perform the exchange. But you don't seem to have enough now.";
			close;
		}
		delitem 6420,.@coin_amount[.@i]; //Cgrade_Coin
		getitem 6380,.@coin_amount[.@i]/10; //Mora_Coin
		mes "[Merchant K]";
		mes "C Grade Coin ^003399"+.@coin_amount[.@i]+"^000000 well received."; //FIXME: Dialogue.
		mes "Exchanged to ^003399"+(.@coin_amount[.@i]/10)+"^000000 Mora Coin.";
		next;
		mes "[Merchant K]";
		mes "Would you like to continue?";
		next;
	}
}

malangdo,233,180,3	script	Dark MachineTX100	564,{
	if (checkweight(1201,1) == 0) {
		mes "It seems you have too much in your inventory. Let's try again after getting rid of some of your belongings.";
		close;
	}
	if (MaxWeight - Weight < 1000) {
		mes "Your inventory is too heavy now. Please come back after getting rid of some of your belongings.";
		close;
	}
	mes "[Dark Machine TX100]";
	mes "Thank you for visiting TX100. You can exchange coins into higher or lower level coins.";
	next;
	mes "[Dark Machine TX100]";
	mes "For a lower level coin exchange you can do 500 as a 1 time maximum, and for higher level coin exchange you can do 99 as a 1 time maximum.";
	next;
	setarray .@coins[1],
		6417, //Silvervine
		6418, //Agrade_Coin
		6419, //Bgrade_Coin
		6420, //Cgrade_Coin
		6421, //Dgrade_Coin
		6422; //Egrade_Coin
	set .@menu$,"Quit:";
	for(set .@i,1; .@i<=6; set .@i,.@i+1) {
		if (countitem(.@coins[.@i]))
			set .@menu$, .@menu$+getitemname(.@coins[.@i])+" (have "+countitem(.@coins[.@i])+"):";
		else
			set .@menu$, .@menu$+"^aaaaaa"+getitemname(.@coins[.@i])+" (None)^000000:";
	}
	set .@i, select(.@menu$)-1;
	if (.@i == 0) {
		mes "[Dark Machine TX100]";
		mes "Thank you for coming.";
		close;
	}
	set .@coin, .@coins[.@i];
	setarray .@exchange_name$[0],"higher","lower";
	setarray .@exchange_id[0],.@coins[.@i-1],.@coins[.@i+1];
	if (.@exchange_id[0] == .@coins[1]) set .@exchange_id[0],0; // Cannot exchange for Silvervine.
	if (.@i > getarraysize(.@coins)) {
		mes "[Dark Machine TX100]";
		mes "You've chosen abnormal menu.";
		mes "Aborting process. Thank you for coming.";
		close;
	}
	if (countitem(.@coin) == 0) {
		mes "[Dark Machine TX100]";
		mes "You chose a coin that you don't have.";
		mes "Aborting process. Thank you for coming.";
		close;
	}
	mes "[Dark Machine TX100]";
	mes "----Exchange Rate----";
	mes "Higher Coin - 3 to 1";
	mes "Lower Coin - 1 to 3";
	mes "---------------------";
	mes "^ff3333We take a small vendor fee from your exchanged coins.^000000";
	next;
	set .@menu$, "Quit:";
	if (.@exchange_id[0] == 0)
		set .@menu$, .@menu$+"^ff3333Cannot exchange to higher level coin^000000:";
	else {
		if (countitem(.@coin) >= 99)
			set .@menu$, .@menu$+"Exchange 99 "+getitemname(.@coin)+" into higher level coin:";
		else
			set .@menu$, .@menu$+"^aaaaaaExchange to higher level coin (Not enough)^000000:";
	}
	if (.@exchange_id[1] == 0)
		set .@menu$, .@menu$+"^ff3333Cannot exchange to lower level coin^000000:";
	else {
		if (countitem(.@coin) > 500)
			set .@menu$, .@menu$+"Exchange 500 "+getitemname(.@coin)+" into lower level coin:";
		else if (countitem(.@coin))
			set .@menu$, .@menu$+"Exchange "+countitem(.@coin)+" "+getitemname(.@coin)+" into lower level coin:";
		else
			set .@menu$, .@menu$+"^aaaaaaExchange to lower level coin (Not enough)^000000:";
	}
	set .@i, select(.@menu$)-2;
	if (.@i == -1) {
		mes "[Dark Machine TX100]";
		mes "Thank you for coming.";
		close;
	}
	if (.@exchange_id[.@i] == 0) {
		mes "[Dark Machine TX100]";
		mes "This coin cannot be exchanged to a "+.@exchange_name$[.@i]+" level coin.";
		mes "Aborting process. Thank you for coming.";
		close;
	}
	if ((.@i == 0 && countitem(.@coin) < 100) || (.@i == 1 && countitem(.@coin) == 0)) {
		mes "[Dark Machine TX100]";
		mes "You have not enough coins for a "+.@exchange_name$[.@i]+" level coin exchange.";
		mes "Aborting process. Thank you for coming.";
		close;
	}
	if (countitem(.@exchange_id[.@i]) > 28000) {
		mes "[Dark Machine TX100]";
		mes "You have too many "+.@exchange_name$[.@i]+" level coins already. Please come back with less coins.";
		close;
	}
	switch(.@i) {
	case 0:
		set .@payment_amount,99;
		set .@reward_amount, .@payment_amount/3;
		set .@coin_text$,"High";
		break;
	case 1:
		set .@payment_amount,(((countitem(.@coin) > 500))?500:countitem(.@coin));
		set .@reward_amount, .@payment_amount*3;
		set .@coin_text$,"Low";
		break;
	}
	set .@fee, rand(1,3);
	delitem .@coin, .@payment_amount;
	getitem .@exchange_id[.@i], .@reward_amount - .@fee;
	mes "[Dark Machine TX100]";
	mes "Received ^003399"+getitemname(.@coin)+"^000000 for ^003399"+.@payment_amount+"^000000 unit(s).";
	mes "We have excanged your coin to ^003399"+(.@reward_amount-.@fee)+"^000000 unit(s) of ^003399"+.@coin_text$+" Level Coin^000000, deducted ^003399"+.@fee+"^000000 unit(s) as exchanging fee.";
	close;
}

malangdo,175,145,4	script	Can Agency Guard	549,{
	if (checkweight(1201,1) == 0) {
		mes "You seem to have too many items. Give it a try after sorting out the item kinds.";
		close;
	}
	if (MaxWeight - Weight < 1000) {
		mes "You're not likely to be able to go on due to the heavy items you've got. Give it a try after lightening the weight.";
		close;
	}
	mes "[Can Agency Guard]";
	mes "Hey, you there... Have you seen any ^0000ffMalangdo Cat Can^000000s around here?";
	next;
	switch(select("Why are you asking?:Oh, you mean these?")) {
	case 1:
		mes "[Can Agency Guard]";
		mes "Umm.";
		mes "We at the Can Agency recently got some suspicious intelligence about them...";
		next;
		mes "[Can Agency Guard]";
		mes "There were faulty products in bulk on the can production line for Malangdo specialty. These products, to be discarded, seem to have fallen into a retail dealer's hands.";
		next;
		mes "[Can Agency Guard]";
		mes "Actually they were hard to distinguish from normal products. But it obviously says ^0000ffMalangdo Cat Can^000000 outside.";
		next;
		mes "[Can Agency Guard]";
		mes "As faulty products are moving around on the market, we've been collecting them as is our duty. Have you ever seen anyone who has things like what I'm describing?";
		next;
		mes "[Can Agency Guard]";
		mes "If you find anyone selling these products, please come and tell me.";
		close;
	case 2:
		if (countitem(12633) == 0) {
			mes "[Can Agency Guard]";
			mes "Umm? I cannot see the ^0000ffMalangdo Cat Can^000000 from you. Don't forget to bring it to me if you've found out...";
			close;
		}
		break;
	}
	mes "[Can Agency Guard]";
	mes "The Malangdo Cat Can is a faulty product. Let me exchange it to 3 E Grade Coins. How about that?";
	next;
	switch(select("I won't exchange:^0000ff1^000000 Can -> ^0000ff3^000000 E Grade Coin:^0000ff10^000000 Can -> ^0000ff30^000000 E Grade Coin:^0000ff100^000000 Can -> ^0000ff300^000000 E Grade Coin:Exchange all I've got")) {
	case 1:
		mes "[Can Agency Guard]";
		mes "Umm, I'm not here forever, so come to me if you'd like to exchange while I still am.";
		close;
	case 2:
		set .@check,1;
		set .@count,1;
		break;
	case 3:
		set .@check,10;
		set .@count,10;
		break;
	case 4:
		set .@check,100;
		set .@count,100;
		break;
	case 5:
		set .@check,1;
		set .@count,countitem(12633);
		break;
	}
	if (countitem(12633) < .@check) {
		if (.@check == 1) {
			mes "[Can Agency Guard]";
			mes "Umm? I cannot see the ^0000ffMalangdo Cat Can^000000 from you. Don't forget to bring it to me if you've found out...";
			close;
		} else {
			mes "[Can Agency Guard]";
			mes "Umm? I don't think you have enough to exchange... Come to me again when the amount is exactly decided.";
			close;
		}
	}
	delitem 12633,.@count; //Malang_Cat_Can
	getitem 6422,.@count*3; //Egrade_Coin
	mes "[Can Agency Guard]";
	mes "Exchanged "+.@count+" Malangdo Cat Can to "+(.@count*3)+" E Class Coin. Check it out.";
	close;
}

function	script	F_mal_coin	{

// Initial dialogue and checks:
// -- callfunc "F_mal_coin",0,"[<NPC Name>]",<NPC ID>;
	if (getarg(0) == 0) {
		if (getarg(2) != 2 && BaseLevel < 50) {
			mes getarg(1);
			mes "Ahaaa~";
			mes "If you want to buy this stuff,";
			mes "you can talk to me";
			mes "when you grow up a little more.";
			mes "This stuff is too expensive";
			mes "for a child~";
			close;
		}
		mes getarg(1);
		mes "Nice to meet you~~";
		mes "I am! YES~~ That's right!";
		mes "I'm selling special stuff";
		mes "which you can see only here on Meow Meow Island!";
		next;
		mes getarg(1);
		mes "How about it? What are you waiting for?";
		mes "Why don't you take a look at";
		mes "what kinds of stuff I have?";
		next;
		switch(getarg(2)) {
		case 1:
			mes "[Wandering Merchant]";
			mes "Oh~";
			mes "These are rental items, so make sure you know if you have the ^0000FF1 hour^000000 or ^0000FF7 day^000000 version.";
			next;
			break;
		case 2:
			break;
		case 3:
			mes "[Roving Merchant]";
			mes "Just for your information,";
			mes "Sow Bug, Starfish, Dried Squid, and Flying Fish are the items which you can use for 1 hour.";
			next;
			break;
		}
		mes getarg(1);
		mes "Well then, do you want to take a look at what I have now?";
		next;
		switch(select("Yes:No")) {
		case 1:
			if (checkweight(1201,1) == 0) {
				mes getarg(1);
				mes "It seems that there are too many items in your inventory.";
				mes "Please make space and come back again~";
				close;
			}
			if (MaxWeight - Weight < 2500) {
				mes getarg(1);
				mes "It seems that you're overweight.";
				mes "Please reduce your weight and come back again~";
				close;
			}
			mes getarg(1);
			mes "Well, take a good look at them~~~";
			next;
			return;
		case 2:
			mes getarg(1);
			mes "Well, then. I'll see you next time.";
			mes "Goodbye.";
			close;
		}
	}

// Exchange function:
// -- callfunc "F_mal_coin",1,"[<NPC Name>]","<Display Name>",<Item ID>,<Egrade_Coin>,<Malang_Sp_Can>,<Silvervine>
	if (getarg(0) == 1) {
		mes getarg(1);
		mes "The price of ^0000FF["+getarg(2)+"]^000000 is";
		if (getarg(4) && getarg(5)) { // Type 1: Egrade_Coin or Malang_Sp_Can
			mes getarg(4)+" E Grade Coin or "+getarg(5)+" Malangdo Canned Specialties.";
			set .@type,1;
			set .@menu$,"Yes.:No, I'll purchase with cans.:I don't want to purchase any.";
		} else if (getarg(5)) { // Type 2: Malang_Sp_Can only
			mes getarg(5)+" Malangdo Canned Specialties.";
			set .@type,2;
			set .@menu$,"Yes.::No.";
		} else { // Type 3: Silvervine only
			mes getarg(6)+" Silvervine Fruit.";
			set .@type,3;
			set .@menu$,"Yes.::I don't want to purchase any.";
		}
		next;
		mes getarg(1);
		if (.@type == 1) {
			mes "Would you like to purchase";
			mes "^0000FF["+getarg(2)+"]^000000 with E Grade Coins?";
		} else {
			mes "Would you like to";
			mes "purchase ^0000FF["+getarg(2)+"]^000000?";
		}
		next;
		switch(select(.@menu$)) {
		case 2:
			set .@type,2;
		case 1:
			switch(.@type) {
			case 1:
				set .@item,6422; //Egrade_Coin
				set .@amount,getarg(4);
				set .@str$,"coins";
				break;
			case 2:
				set .@item,12636; //Malang_Sp_Can
				set .@amount,getarg(5);
				set .@str$,"cans";
				break;
			case 3:
				set .@item,6417; //Silvervine
				set .@amount,getarg(6);
				set .@str$,"Silvervine Fruit";
				break;
			}
			if (countitem(.@item) < .@amount) {
				mes getarg(1);
				mes "I'm sorry, you need more "+.@str$+".";
				close;
			}
			if (MaxWeight - Weight < getiteminfo(getarg(3),6)) {
				mes getarg(1);
				mes "Sorry, you've purchased too many.";
				mes "You need to make more space in your inventory. Please come back later.";
				close;
			}
			mes getarg(1);
			mes "Thank you.";
			delitem .@item,.@amount;
			getitem getarg(3),1;
			return;
		case 3:
			mes getarg(1);
			mes "Always be careful";
			mes "when you purchase items.";
			close;
		}
	}
}
malangdo,162,146,5	script	Wandering Merchant#mal	495,{
	callfunc "F_mal_coin",0,"[Wandering Merchant]",1;
	setarray .@items[1],
		16743,16747,16741,16745,16749,16751, // 1 hour items.
		16742,16744,16746,16748,16752,16750; // 7 day items.
	setarray .@names$[1],
		"Spearfish","Tuna","Hairtail","Saurel","Malang Snow Crab","Brindle Eel",
		"Hairtail (7Days)","Spearfish (7Days)","Saurel (7Days)","Tuna (7Days)","Brindle Eel (7Days)","Malang Snow Crab (7Days)";
	while(1) {
		set .@i, select(
			"[Spearfish(1hr)] 8 E-Coins/50 Cans",
			"[Tuna(1hr)] 8 E-Coins/50 Cans",
			"[Hairtail(1hr)] 8 E-Coins/50 Cans",
			"[Saurel(1hr)] 8 E-Coins/50 Can",
			"[Malang Snow Crab(1hr)] 8 E-Coins/50 Can",
			"[Brindle Eel(1hr)] 8 E-Coins/50 Can",
			"[Hairtail(7Days)] 10 Silvervine Fruit",
			"[Spearfish(7Days)] 10 Silvervine Fruit",
			"[Saurel(7Days)] 10 Silvervine Fruit",
			"[Tuna(7Days)] 10 Silvervine Fruit",
			"[Brindle Eel(7Days)] 10 Silvervine Fruit",
			"[Malang Snow Crab(7Days)] 10 Silvervine Fruit",
			"End purchasing."
		);
		if (.@i == 13) {
			mes "[Wandering Merchant]";
			mes "Well, then. I'll see you next time.";
			mes "Goodbye.";
			close;
		}
		mes "[Wandering Merchant]";
		mes "Are you interested in ^0000FF["+.@names$[.@i]+"]^000000?";
		switch(.@i) {
		case 1: //Spearfish_Box1
		case 8: //Spearfish_Box2
			mes "This is... a fish that moves according to the season, very tasty!";
			mes "But this is only a food that I'm talking about, yummy~";
			next;
			mes "[Wandering Merchant]";
			mes "Of course, this is ^DC143CTwo-Handed Spear^000000.";
			mes "It gives a high chance of";
			mes "causing the Bleeding status";
			mes "when you're using Pierce or Clashing Spiral~";
			next;
			mes "[Wandering Merchant]";
			mes "More details are...";
			mes "Increase 100% of Clashing Spiral ATK and 50% of Inspiration ATK,";
			mes "additional ATK + 30 when Base Lv. is over 100.";
			mes "Base ATK is 220.";
			next;
			break;
		case 2: //Tuna_Box1
		case 10: //Tuna_Box2
			mes "This is a very popular fish";
			mes "which is used in various dishes.";
			mes "Swordman, Merchant, and Acolyte classes can use it";
			mes "as a ^DC143CMace^000000.";
			next;
			mes "[Wandering Merchant]";
			mes "It gives a high chance of executing the Stun or Auto-Spell Bash";
			mes "when using close-range physical attacks.";
			mes "Base ATK is 180.";
			next;
			mes "[Wandering Merchant]";
			mes "More details are...";
			mes "additional ATK + 20 when Base Lv. is over 100,";
			mes "freeze self with low rate.";
			next;
			break;
		case 3: //Hairtail_Box1
		case 7: //Hairtail_Box2
			mes "This fish looks like a long belt.";
			next;
			mes "[Wandering Merchant]";
			mes "This is a ^DC143CTwo-Handed Sword^000000";
			mes "which most swordmen can use.";
			mes "It increases 50% of critical damage when attacking and CRI + 20.";
			mes "Base ATK is 220.";
			next;
			mes "[Wandering Merchant]";
			mes "More details are...";
			mes "additional ATK + 50 when Base Lv. is over 100.";
			next;
			break;
		case 4: //Saurel_Box1
		case 9: //Saurel_Box2
			mes "This is a ^DC143CDagger^000000 which gives MATK + 100";
			mes "and ATK + 30 for 7sec at a certain rate with physical attacks.";
			next;
			mes "[Wandering Merchant]";
			mes "More details are...";
			mes "gives MATK + 20 for 7sec at a certain rate with magical attacks";
			mes "and additional MATK + 10, ATK + 10 when Base Lv. is over 100.";
			mes "Base ATK is 160.";
			next;
			break;
		case 5: //Malang_Crab_Box1
		case 12: //Malang_Crab_Box2
			mes "This is a ^DC143CBow^000000 which increases LUK + 3 and 50% of critical damage,";
			mes "and increases 20% of long rage phyical ATK when Base Lv. is over 100.";
			mes "Base ATK is 120.";
			next;
			mes "[Wandering Merchant]";
			mes "More details are...";
			mes "can be used by Archer, Thief, and Rogue classes.";
			next;
			break;
		case 6: //Brindle_Eel_Box1
		case 11: //Brindle_Eel_Box2
			mes "This is a ^DC143CBow^000000.";
			mes "Because it has elastic force,";
			mes "we started to use it as a Bow.";
			mes "Base ATK is 180.";
			next;
			mes "[Wandering Merchant]";
			mes "More details are...";
			mes "AGI + 3, and ASPD + 2 for 5sec at a certain rate with long range physical attacks.";
			mes "Also gives additional 20% of long range physical ATK when Base Lv. is over 100.";
			mes "Hunter, Bard, and Dancer classes can use it.";
			next;
			break;
		}
		if (.@i < 7)
			setarray .@price[0],8,50,0; // 1 hour items cost 8 Egrade_Coin or 50 Malang_Sp_Can.
		else
			setarray .@price[0],0,0,10; // 7 day items cost 10 Silvervine.
		callfunc "F_mal_coin",1,"[Wandering Merchant]",.@names$[.@i],.@items[.@i],.@price[0],.@price[1],.@price[2];
		next;
	}
}

malangdo,173,145,4	script	Stinky Merchant	496,{
	callfunc "F_mal_coin",0,"[Stinky Merchant]",2;
	setarray .@items[1],2873,16015;
	setarray .@names$[1],"Cat Hand Glove","Cat Club";
	while(1) {
		set .@i, select(
			"[Cat Hand Glove] 32 E-Coins/200 Cans",
			"[Cat Club] 32 E-Coins/200 Cans",
			"End purchasing."
		);
		if (.@i == 3) {
			mes "[Stinky Merchant]";
			mes "Well, then. I'll see you next time.";
			mes "Goodbye.";
			close;
		}
		mes "[Stinky Merchant]";
		mes "Are you interested in ^0000FF["+.@names$[.@i]+"]^000000?";
		switch(.@i) {
		case 1: //Cat_Hand_Glove
			mes "This is a glove which can give happiness";
			mes "just by wearing it.";
			next;
			mes "[Stinky Merchant]";
			mes "This is an ^DC143CAccessory^000000";
			mes "and its defense is 5.";
			mes "It also gives";
			mes "VIT + 1, AGI + 1, DEX + 1, LUK + 1.";
			next;
			mes "[Stinky Merchant]";
			mes "More details are...";
			mes "SLOT : 1 / Refine : Unable / Destruction : Unable";
			next;
			break;
		case 2: //Cat_Club
			mes "It looks like it wouldn't hurt, don't you think so?";
			mes "But I'm telling you, it can hurt someone.";
			next;
			mes "[Stinky Merchant]";
			mes "This is a ^DC143CMace^000000 that increases 15% of damage to the animal type of monster.";
			mes "Base ATK is 88.";
			mes "The other details are";
			mes "Weapon Lv : 1 / SLOT : 3 / Refine : Able / Destruction : Unable";
			next;
			break;
		}
		callfunc "F_mal_coin",1,"[Stinky Merchant]",.@names$[.@i],.@items[.@i],32,200,0;
		next;
	}
}

malangdo,150,135,5	script	Roving Merchant	495,{
	callfunc "F_mal_coin",0,"[Roving Merchant]",3;
	setarray .@items[1],12639,12637,12638,12640;
	setarray .@names$[1],"Flying Fish","Sow Bug","Dried Squid","Starfish";
	while(1) {
		set .@i, select(
			"[Flying Fish] 200 Cans",
			"[Sow Bug] 200 Cans",
			"[Dried Squid] 200 Cans",
			"[Starfish] 200 Cans",
			"End purchasing."
		);
		if (.@i == 5) {
			mes "[Roving Merchant]";
			mes "Well, then. I'll see you next time.";
			mes "Goodbye.";
			close;
		}
		mes "[Roving Merchant]";
		mes "Are you interested in ^0000FF["+.@names$[.@i]+"]^000000?";
		switch(.@i) {
		case 1: //Flying_Fish_Box
			mes "This is the one that flies";
			mes "with a big pectoral.";
			next;
			mes "[Roving Merchant]";
			mes "This is a ^DC143CThrowing Weapon^000000.";
			mes "Of course, it can give fatal wounds to the enemy";
			mes "at a certain rate when attacking.";
			next;
			mes "[Roving Merchant]";
			mes "Its property is neutral and ATK is 50.";
			next;
			break;
		case 2: //Gong_Bug_Pocket
			mes "In that case, I'll explain for you.";
			mes "This is a ^DC143CBullet^000000 which stuns the enemy at a certain rate when attacking.";
			next;
			mes "[Roving Merchant]";
			mes "I feel somthing bad";
			mes "is moving in my pocket but...";
			mes "it is neutral property and its ATK is 50.";
			next;
			break;
		case 3: //Dried_Squid_Box
			mes "I'll explain about this item.";
			mes "This is a ^DC143CThrowing Weapon^000000 which causes darkness at a certain rate.";
			mes "It's neutral property and its ATK is 50.";
			next;
			mes "[Roving Merchant]";
			mes "It is compressed";
			mes "and put into a very small box,";
			mes "so be careful when you open it.";
			next;
			break;
		case 4: //Starfish_Box
			mes "I'll explain about this item.";
			mes "This is a ^DC143CThrowing Weapon^000000 which stuns the enemy at a certain rate.";
			next;
			mes "[Roving Merchant]";
			mes "It is perfectly organized and packed";
			mes "so you can't even see inside.";
			mes "It is neutral property and its ATK is 110.";
			next;
			break;
		}
		mes "[Roving Merchant]";
		mes "For your information,";
		mes "one box contains";
		mes "200 units.";
		next;
		callfunc "F_mal_coin",1,"[Roving Merchant]",.@names$[.@i],.@items[.@i],0,200,0;
		next;
	}
}

// Eclage
//============================================================
ecl_in01,66,95,2	script	Armor Merchant Naphara	436,{
	mes "[Armor Merchant]";
	mes "Hello, this is Naphara's store, a place of high class goods.";
	mes "What would you need?";
	next;
	set .@i, select("Str Glove:Int Glove:Agi Glove:Vit Glove:Dex Glove:Luk Glove");
	mes "[Armor Merchant]";
	switch(.@i) {
	case 1: // Str Glove
		mes "^3131FFStr Glove^000000";
		mes "^3131FFMHP + 100, MSP + 20^000000";
		mes "^3131FFATK+1 increases for every STR+10^000000";
		mes "^3131FFATK +1% added above STR 110^000000";
		set .@item,2917; //Str_Glove
		break;
	case 2:
		mes "^3131FFInt Glove^000000";
		mes "^3131FFMHP + 100, MSP + 20^000000";
		mes "^3131FFMATK+1 increases for every INT+10^000000";
		mes "^3131FFMATK +1% added above INT 110^000000";
		set .@item,2918; //Int_Glove
		break;
	case 3:
		mes "^3131FFAgi Glove^000000";
		mes "^3131FFMHP + 100, MSP + 20^000000";
		mes "^3131FFFLEE+1 increases for every AGI+10^000000";
		mes "^3131FFComplete Flee +1 added above AGI 110^000000";
		set .@item,2919; //Agi_Glove
		break;
	case 4:
		mes "^3131FFVit Glove^000000";
		mes "^3131FFMHP + 100, MSP + 20^000000";
		mes "^3131FFMHP+50 for every VIT+10^000000";
		mes "^3131FFMHP+1% added above VIT 110^000000";
		set .@item,2920; //Vit_Glove
		break;
	case 5:
		mes "^3131FFDex Glove^000000";
		mes "^3131FFMHP + 100, MSP + 20^000000";
		mes "^3131FFHIT+1 increases for every DEX+10^000000";
		mes "^3131FFRanged attack power +1% added above DEX 110^000000";
		set .@item,2921; //Dex_Glove
		break;
	case 6:
		mes "^3131FFLuk Glove^000000";
		mes "^3131FFMHP + 100, MSP + 20^000000";
		mes "^3131FFCRI+1 increases for every LUK+10^000000";
		mes "^3131FFCritical damage +1% added above LUK 110^000000";
		set .@item,2922; //Luk_Glove
		break;
	}
	mes "^3131FFRequired Level: 100^000000";
	mes "^3131FFSlot: 0^000000";
	mes "^3131FFWeight: 10^000000";
	mes "are the characteristic options.";
	next;
	mes "[Armor Merchant]";
	mes "It costs 10 Splendide Coins.";
	mes "Would you like to buy it?";
	next;
	if(select("Buy it.:Don't buy it.") == 2)
		close;
	if (countitem(6081) < 10) {
		mes "[Armor Merchant]";
		mes "It seems like you don't have enough coins.";
		close;
	}
	mes "[Armor Merchant]";
	mes "Here you go!"; //custom
	delitem 6081,10; //Splendide_Coin
	getitem .@item,1;
	close;
}

ecl_in01,64,97,4	script	Slot Expert Nattuer#ecl	436,{
	mes "[Slot Expert]";
	mes "I am Slot Expert Nattuer.";
	mes "If you bring me an item from my little brother Naphara along with 5 Splendide Coins, I will open up one Slot for you.";
	next;
	if(select("Activate a Slot.:Forget it.") == 2)
		close;
	mes "[Slot Expert]";
	mes "Slot activation is an extremely difficult procedure that can fail even with heightened care and the use of a magnifying lens.";
	next;
	mes "[Slot Expert]";
	mes "Of course, if your heart were as big as that flower-filled land, you wouldn't mind. Right? Should I go for it?";
	next;
	if(select("Continue.:Forget it.") == 2)
		close;
	mes "[Slot Expert]";
	mes "Which item would you like to activate with a Slot?";
	next;
	setarray .@noslots[0],2917,2918,2919,2920,2921,2922;
	setarray .@slotted[0],2923,2924,2925,2926,2927,2928;
	set .@i, select("Str Glove:Int Glove:Ag Glove:Vit Glove:Dex Glove:Luk Glove")-1;
	set .@item, .@noslots[.@i];
	set .@new_item, .@slotted[.@i];
	mes "[Slot Expert]";
	mes "Let's confirm for the last time. Is the one you want "+getitemname(.@item)+"?";
	next;
	if(select("Yes:No") == 2) {
		mes "[Slot Expert]";
		mes "Why don't you talk to me when you know for sure.";
		close;
	}
	if (countitem(.@item) == 0) {
		mes "[Slot Expert]";
		mes "You don't have that item. Why don't you talk to me when you know for sure.";
		close;
	}
	if (countitem(6081) < 5) {
		mes "[Slot Expert]";
		mes "You don't have enough coins. Why don't you talk to me when you know for sure."; //custom
		close;
	}
	delitem 6081,5; //Splendide_Coin
	delitem .@item,1;
	//custom to the end
	if (rand(100) < 5) {
		mes "[Slot Expert]";
		mes "Oh no, it failed! I'm sorry, but I warned you this could happen. Better luck next time.";
		close;
	}
	mes "[Slot Expert]";
	mes "Success! I've activated the slot.";
	getitem .@new_item,1;
	close;
}

ecl_in01,67,39,4	script	Replication Expert Palt	445,{
	emotion e_lv;
	mes "[Paltu]";
	mes "Woohoo- Greetings. What are you looking for? Lots of goods here.";
	next;
	switch(select("No thanks.:Replication?:I know you got lots up your sleeve!")) {
	case 1:
		emotion e_an;
		mes "[Paltu]";
		mes "Really? Hmm?";
		close;
	case 2:
		mes "[Paltu]";
		mes "One can say that there's no one better in Eclage than I at utilizing magic resistance.";
		next;
		mes "[Paltu]";
		mes "I'll give you a good price whatever it is. Just trust me.";
		next;
		select("Could you do something for me?");
		emotion e_no1;
		mes "[Paltu]";
		mes "Hey, I like your attitude.";
		next;
		mes "[Paltu]";
		mes "Ah- you know the hat you're wearing?";
		next;
		emotion e_what;
		mes "[Paltu]";
		mes "Don't you have any of those hats lying around in storage that are solid but too ugly to wear? You do, right?";
		next;
		select(".........");
		emotion e_dots,1;
		emotion e_heh;
		mes "[Paltu]";
		mes "See! I knew it. I knew it from the first minute.";
		next;
		mes "[Paltu]";
		mes "If you bring me ^ff0000 50 Splendide Coins and the ingredients^000000, I'll make you a new hat in the same shape but worn as a ^ff0000Costume^000000.";
		next;
		mes "[Paltu]";
		mes "Hmm, what was it...?";
		mes "I think you adventurers call them ^0571B0Costumes^000000? right?";
		next;
		select("Yes~ What do you need?");
		mes "[Paltu]";
		mes "I need 1 ^0571B0hat to replicate^000000 and";
		mes "I need ^E1281E 4 Crystal Mirrors^000000 for magic resistance, ^E1281E 1 Fairy Magic Powder^000000 as the catalyst, and ^E1281E Emerald, Ruby, Sapphire, Topaz, and Zircon, 10 of each^000000, to be used for amplifying the magic power.";
		next;
		emotion e_no;
		mes "[Paltu]";
		mes "There's quite a lot of ingredients, right? Well, I can't do anything about that. Dealing with magic power is not a joke.";
		next;
		select("Which hats can be replicated?");
		mes "[Paltu]";
		mes "Oh! You're pretty sharp!";
		mes "Almost forgot the most important thing.";
		next;
		mes "[Paltu]";
		mes "Hats that I can replicate are:";
		mes "^0571B0Frog Hat, Romantic Flower, Magestic Goat, Blush, Valkyrie Helm, Deviruchi Hat, Assassin Mask, Elven Ears, Hahoe Mask, and Boys Cap^000000 a total of 10 types.";
		next;
		mes "[Paltu]";
		mes "What do you think? I'll make it happen as long as I have the ingredients and the compensation.";
		next;
		if(select("I'll do it later.:Show me what you got!") == 1) {
			emotion e_dots;
			mes "[Paltu]";
			mes "What? Are you kidding me? Please tell me you are!";
			close;
		}
		break;
	case 3:
		break;
	}
	mes "[Paltu]";
	mes "Oh wow.";
	mes "You made the right call. I thought I was going to starve to death because the Laphines have no interest in pretty hats.";
	next;
	mes "[Paltu]";
	mes "I'll make it a great deal for you. You really should know I'm giving you a good deal here.";
	next;
	mes "[Paltu]";
	mes "Is there something you had in mind? Why don't you take a look?";
	next;
	setarray .@items[0],
		5447, //Frog_Cap
		2269, //Centimental_Flower
		2256, //Magestic_Goat
		5040, //Blush
		5171, //Valkyrie_Helm
		5038, //Deviruchi_Cap
		5096, //Assassin_Mask_
		2286, //Elven_Ears
		5176, //Hahoe_Mask
		5016; //Boy's_Cap
	setarray .@costumes[0],
		19548, //C_Frog_Cap
		19552, //C_Centimental_Flower
		19549, //C_Magestic_Goat
		19550, //C_Blush
		19546, //C_Valkyrie_Helm
		19547, //C_Deviruchi_Cap
		19553, //C_Assassin_Mask_
		19551, //C_Elven_Ears
		0,     //-- not implemented? --
		19545; //C_Boys_Cap
	if (countitem(6081) >= 50 && countitem(747) >= 4 && countitem(6395) >= 1 && countitem(721) >= 10 && countitem(723) >= 10 && countitem(726) >= 10 && countitem(728) >= 10 && countitem(729) >= 10)
		set .@item_check,1;
	for(set .@i,0; .@i<getarraysize(.@items); set .@i,.@i+1) {
		if (.@item_check && countitem(.@items[.@i]))
			set .@menu$, .@menu$+getitemname(.@items[.@i])+":"; //custom
		else
			set .@menu$, .@menu$+getitemname(.@items[.@i])+" (^777777Insufficient ingredients^000000):";
	}
	set .@i, select(.@menu$)-1;
	set .@item, .@items[.@i];
	set .@new_item, .@costumes[.@i];
	mes "[Paltu]";
	mes "Is ^0571B0"+getitemname(.@item)+"^000000 what you wanted?";
	next;
	if (.@item_check == 0 || countitem(.@item) == 0) {
		emotion e_sob;
		mes "[Paltu]";
		mes "Ay... Credit purchases are difficult for me.";
		next;
		mes "[Paltu]";
		mes "^0571B0"+getitemname(.@item)+"^000000 and";
		mes "^E1281E50 Splendide Coins, 4 Crystal Mirrors, 1 Fairy Magic Powder, 10 of each Emerald, Ruby, Sapphire, Topaz, and Zircon^000000 are necessary.";
		next;
		mes "[Paltu]";
		mes "I'm in a tight spot myself. Please consider my situation also.";
		close;
	}
	//custom to the end
	if(select("Continue.:Forget it.") == 2)
		close;
	delitem .@item,1;
	delitem 6081,50; //Splendide_Coin
	delitem 747,4; //Crystal_Mirror
	delitem 6395,1; //Angel_Magic_Power
	delitem 721,10; //Azure_Jewel
	delitem 723,10; //Cardinal_Jewel
	delitem 726,10; //Blue_Jewel
	delitem 728,10; //Golden_Jewel
	delitem 729,10; //Bluish_Green_Jewel
	getitem .@new_item,1;
	mes "[Paltu]";
	mes "Thank you so much! As promised, here is your costume.";
	close;
}

ecl_in01,33,98,4	script	Herb Merchant Plafina#e	443,{
	mes "[Herb Merchant]";
	mes "Welcome, this is Plafina's Herb Store where only the freshest herbs are provided~!";
	next;
	switch(select("Snow Flip:Peony Mommy:Slapping Herb:Yggdrasil Dust:End conversation")) {
	case 1:
		mes "[Herb Merchant]";
		mes "Snow Flip has special effects on ^3131FFBurning, Bleeding, Deep Sleep, Sleep^000000.";
		set .@item,12812; //Snow_Flip
		set .@cost,5;
		break;
	case 2:
		mes "[Herb Merchant]";
		mes "Peony Mamy has special effects on ^3131FFFrost, Frozen, Freezing^000000.";
		set .@item,12813; //Peony_Mommy
		set .@cost,5;
		break;
	case 3:
		mes "[Herb Merchant]";
		mes "Slapping Herb has special effects on ^3131FFStun, Fear, Chaos, Hallucination^000000.";
		set .@item,12814; //Slapping_Herb
		set .@cost,1;
		break;
	case 4:
		mes "[Herb Merchant]";
		mes "Yggdrasil Dust has special effects on ^3131FFBlind, Curse, Decrease Agility, Reverse Orcish^000000.";
		set .@item,12815; //Yggdrasil_Dust
		set .@cost,1;
		break;
	case 5:
		mes "[Herb Merchant]";
		mes "Come back anytime.";
		close;
	}
	mes "Requires 5 seconds between uses.";
	mes "It costs "+.@cost+" Splendide Coin"+((.@cost == 1)?"":"s")+" for each.";
	next;
	switch(select("Buy 1.:Buy 10.:Don't buy.")) {
	case 1:
		set .@amount,1;
		break;
	case 2:
		set .@amount,10;
		break;
	case 3:
		close;
	}
	set .@price,.@amount*.@cost;
	mes "[Herb Merchant]";
	mes "Would you like to buy "+.@amount+" "+getitemname(.@item)+"?";
	next;
	if(select("Buy.:Don't buy.") == 2)
		close;
	if (countitem(6081) < .@price) {
		mes "[Herb Merchant]";
		mes "You don't have enough coins.";
		close;
	}
	mes "[Herb Merchant]";
	mes "Here are your herbs."; //custom
	delitem 6081,.@price; //Splendide_Coin
	getitem .@item,.@amount;
	end;
}