summaryrefslogtreecommitdiff
path: root/npc/custom/battleground/bg_common.txt
blob: f24e1e5a8c6b15b26b72ed1d7331b685da46686d (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
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
// ==============================================================================
// BattleGround System - Common NPCs
// ==============================================================================

// BattleGround Warper - Entrance
// *********************************************************************

-	script	Maroll Battle Recruiter::BatRecruit	4_F_JOB_KNIGHT,{
	mes "[Maroll Battle Recruiter]";
	mes "Good day, adventurer.";
	mes "I'm a knight from a far country called Maroll Kingdom.";
	next;
	mes "[Maroll Battle Recruiter]";
	mes "The two princes of the kingdom are now battling for the throne of Maroll, and are in need of experienced soldiers like you. How would you like to lend your power to one of the princes in the Maroll Kingdom?";
	next;
	if( select("Join:Don't Join") == 2 )
	{
		mes "[Maroll Battle Recruiter]";
		mes "I'll always be stationed here for more soldiers. Feel free to come back whenever you're interested.";
		close;
	}
	mes "[Maroll Battle Recruiter]";
	mes "May the war god bless you.";
	close2;
	warp "bat_room",155,150;
	end;
}

payon,189,104,3	duplicate(BatRecruit)	Maroll Battle Recruiter::BatRecruit1	4_F_JOB_KNIGHT
prontera,123,83,5	duplicate(BatRecruit)	Maroll Battle Recruiter::BatRecruit2	4_F_JOB_KNIGHT
rachel,149,138,5	duplicate(BatRecruit)	Maroll Battle Recruiter::BatRecruit3	4_F_JOB_KNIGHT
moc_ruins,75,162,5	duplicate(BatRecruit)	Maroll Battle Recruiter::BatRecruit4	4_F_JOB_KNIGHT
aldebaran,146,109,5	duplicate(BatRecruit)	Maroll Battle Recruiter::BatRecruit5	4_F_JOB_KNIGHT
lighthalzen,153,86,5	duplicate(BatRecruit)	Maroll Battle Recruiter::BatRecruit6	4_F_JOB_KNIGHT

// BattleGround Warper - Exit
// *********************************************************************

bat_room,148,150,4	script	Teleporter#bat	4_F_TELEPORTER,{
	mes "[Teleporter]";
	mes "Do you wish to leave the battlefield? Use my service to return to town.";
	next;
	if( select("Leave:Don't Leave") == 2 )
	{
		mes "[Teleporter]";
		mes "I'll be here whenever you're in need of my service.";
		close;
	}

	set .@spoint$, getsavepoint(0);
	set .@x, getsavepoint(1);
	set .@y, getsavepoint(2);
	mes "[Teleporter]";
	mes "You will be sent back to " + .@spoint$ + ".";
	close2;
	warp .@spoint$, .@x, .@y;
	end;
}

// Kafra
// *********************************************************************
bat_room,148,147,4	script	Kafra Staff::kaf_bat	4_F_KAFRA9,{
	cutin "kafra_09",2;
	callfunc "F_Kafra",0,2,1,150,0;
}

// General Guillaume
// *********************************************************************
bat_room,160,159,3	script	General Guillaume	4_M_KY_KIYOM,{
	cutin "bat_kiyom2",2;
	mes "[General Guillaume]";
	mes "Hot-blooded adventurer, we need your ability to win this battle.";
	next;
	cutin "bat_kiyom1",2;
	mes "[General Guillaume]";
	mes "Our great king, Marcel Marollo VII, is very sick lately. His Majesty has declared that he chosen either me or Prince Croix as the next king amongst his 9 sons.";
	next;
	mes "[General Guillaume]";
	mes "Two kings can't share a nation!";
	mes "Only the one victorious from His Majesty's appointed battle will be enthroned.";
	next;
	mes "[General Guillaume]";
	mes "This is however, not just a battle between us. This battle will determine the future of this country. I pledge on my honor to prove that I'm the one who can protect this Maroll from outside threats.";
	next;
	if( select("Yes, I want to join you.:End Conversation") == 2 )
	{
		mes "[General Guillaume]";
		mes "I'll be the one who will capture the flag!";
		close2;
		cutin "",255;
		end;
	}
	cutin "bat_kiyom2",2;
	mes "[General Guillaume]";
	mes "Welcome to my army, comrade.";
	mes "Your eyes tell me that you're a soldier that I can trust.";
	set Bat_Team,1;
	next;
	mes "[General Guillaume]";
	mes "Now, go upstairs and apply for battle with your comrades. I'm sure they'll welcome you whole-heartedly!";
	close2;
	cutin "",255;
	end;
}

// General Croix
// *********************************************************************
bat_room,160,140,3	script	Prince Croix	4_M_CRU_CRUA,{
	cutin "bat_crua1",2;
	mes "[Prince Croix]";
	mes "Wise adventurer, why don't you lend us your power for victory?";
	next;
	cutin "bat_crua2",2;
	mes "[Prince Croix]";
	mes "I do not wish to shed blood, but I have no choice but to fight for the possibility of peace and for the sake of my people.";
	next;
	mes "[Prince Croix]";
	mes "General Guillaume may have an advantage in this battle as he is the great general of Maroll, but that doesn't automatically mean he'll win. I want to win this battle so that I can grant a better future for my people.";
	next;
	if( select("Yes, I want to join you!:End Conversation") == 2 )
	{
		mes "[Prince Croix]";
		mes "For Maroll!";
		close2;
		cutin "",255;
		end;
	}
	mes "[Prince Croix]";
	mes "Thank you so much. I feel like I can win with the help of adventurers like you. Now, please go downstairs and join your comrades in sharpening their skills to fight the enemy!";
	set Bat_Team,2;
	close2;
	cutin "",255;
	end;
}

// Time calculation Function
// *********************************************************************
function	script	Time2Str	{
	set .@Time_Left, getarg(0) - gettimetick(2);
	
	set .@Days, .@Time_Left / 86400;
	set .@Time_Left, .@Time_Left - (.@Days * 86400);
	set .@Hours, .@Time_Left / 3600;
	set .@Time_Left, .@Time_Left - (.@Hours * 3600);
	set .@Minutes, .@Time_Left / 60;
	set .@Time_Left, .@Time_Left - (.@Minutes * 60);
	
	set .@Time$, "";
	if( .@Days > 1 )
		set .@Time$, .@Time$ + .@Days + " days, ";
	else if( .@Days > 0 )
		set .@Time$, .@Time$ + .@Days + " day, ";

	if( .@Hours > 1 )
		set .@Time$, .@Time$ + .@Hours + " hours, ";
	else if( .@Hours > 0 )
		set .@Time$, .@Time$ + .@Hours + " hour, ";

	if( .@Minutes > 1 )
		set .@Time$, .@Time$ + .@Minutes + " minutes, ";
	else if( .@Minutes > 0 )
		set .@Time$, .@Time$ + .@Minutes + " minute, ";

	if( .@Time_Left > 1 || .@Time_Left == 0 )
		set .@Time$, .@Time$ + .@Time_Left + " seconds.";
	else if( .@Time_Left == 1 )
		set .@Time$, .@Time$ + .@Time_Left + " second.";
	
	return .@Time$;
}

// Guillaume Knight - Tierra Valley
// *********************************************************************
bat_room,159,178,5	script	Guillaume Knight#1	4_M_KY_SOLD,{
	mes "[Guillaume Knight]";
	mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map.";
	next;
	mes "[Guillaume Knight]";
	mes "There is a ration depot for the Guillaume and Croix armies at the 11 and 8 o'clock directions.";
	next;
	mes "[Guillaume Knight]";
	mes "The battle starts at your army's ship, and the goal is to advance and destroy your enemy's rations depot faster than they can destroy yours.";
	mes "";
	mes "The army that captures the neutral flag in the center of the battlefield will be rewarded with extra regeneration points, meaning their soldiers will resurrect more than the other side, giving them an advantage.";
	next;
	mes "[Guillaume Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// Tierra Officer - Guillaume
// *********************************************************************
bat_room,156,178,5	script	Tierra Valley Officer#1	4_M_KY_KNT,{
	mes "[Tierra Officer]";
	if( Bat_Team == 2 )
	{
		mes "Get out of here you stinky Croix!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}
	
	mes "Hello " + strcharinfo(0) + ", let's show the power of the Guillaume Army to those stinky Croixs!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[Tierra Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(2069,PLAYTIME) == 2 ) erasequest 2069;
	if( checkquest(2069,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at Tierra Gorge. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[Tierra Officer]";
		mes "Stand-by for Tierra Gorge Battle until the time limit passes.";
		close;
	}
	
	if( BaseLevel < 80 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",85,224;
	end;
}

// Croix Knight - Tierra Valley
// *********************************************************************
bat_room,159,121,1	script	Croix Knight#1	4_M_CRU_SOLD,{
	mes "[Croix Knight]";
	mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map.";
	next;
	mes "[Croix Knight]";
	mes "There is a ration depot for the Guillaume and Croix armies at the 11 and 8 o'clock directions.";
	next;
	mes "[Croix Knight]";
	mes "The battle starts at your army's ship, and the goal is to advance and destroy your enemy's rations depot faster than they can destroy yours.";
	mes "";
	mes "The army that captures the neutral flag in the center of the battlefield will be rewarded with extra regeneration points, meaning their soldiers will resurrect more than the other side, giving them an advantage.";
	next;
	mes "[Croix Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// Tierra Officer - Croix
// *********************************************************************
bat_room,156,121,1	script	Tierra Valley Officer#2	4_M_CRU_KNT,{
	mes "[Tierra Officer]";
	if( Bat_Team == 1 )
	{
		mes "Get out of here you stupid Guillaume!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Croix Army to those stinky Guillaumes!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[Tierra Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(2069,PLAYTIME) == 2 ) erasequest 2069;
	if( checkquest(2069,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at Tierra Gorge. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[Tierra Officer]";
		mes "Stand-by for Tierra Gorge Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 80 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",85,208;
	end;
}

// Guillaume Knight - Tierra
// *********************************************************************
bat_room,167,178,5	script	Guillaume Knight#2	4_M_KY_SOLD,{
	mes "[Guillaume Knight]";
	mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map.";
	next;
	mes "[Guillaume Knight]";
	mes "There is a ration depot for the Guillaume and Croix armies at the 11 and 8 o'clock directions.";
	next;
	mes "[Guillaume Knight]";
	mes "The battle starts at your army's ship, and the goal is to advance and destroy your enemy's rations depot faster than they can destroy yours.";
	mes "";
	mes "The army that captures the neutral flag in the center of the battlefield will be rewarded with extra regeneration points, meaning their soldiers will resurrect more than the other side, giving them an advantage.";
	next;
	mes "[Guillaume Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// Tierra Officer - Guillaume
// *********************************************************************
bat_room,164,178,5	script	Tierra Valley Officer#3	4_M_KY_KNT,{
	mes "[Tierra Officer]";
	if( Bat_Team == 2 )
	{
		mes "Get out of here you stinky Croix!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}
	
	mes "Hello " + strcharinfo(0) + ", let's show the power of the Guillaume Army to those stinky Croixs!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[Tierra Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(2069,PLAYTIME) == 2 ) erasequest 2069;
	if( checkquest(2069,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at Tierra Gorge. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[Tierra Officer]";
		mes "Stand-by for Tierra Gorge Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 80 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",57,94;
	end;
}

// Croix Knight - Tierra
// *********************************************************************
bat_room,167,121,1	script	Croix Knight#2	4_M_CRU_SOLD,{
	mes "[Croix Knight]";
	mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map.";
	next;
	mes "[Croix Knight]";
	mes "There is a ration depot for the Guillaume and Croix armies at the 11 and 8 o'clock directions.";
	next;
	mes "[Croix Knight]";
	mes "The battle starts at your army's ship, and the goal is to advance and destroy your enemy's rations depot faster than they can destroy yours.";
	mes "";
	mes "The army that captures the neutral flag in the center of the battlefield will be rewarded with extra regeneration points, meaning their soldiers will resurrect more than the other side, giving them an advantage.";
	next;
	mes "[Croix Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// Tierra Officer - Croix
// *********************************************************************
bat_room,164,121,1	script	Tierra Valley Officer#4	4_M_CRU_KNT,{
	mes "[Tierra Officer]";
	if( Bat_Team == 1 )
	{
		mes "Get out of here you stupid Guillaume!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Croix Army to those stinky Guillaumes!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[Tierra Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(2069,PLAYTIME) == 2 ) erasequest 2069;
	if( checkquest(2069,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at Tierra Gorge. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[Tierra Officer]";
		mes "Stand-by for Tierra Gorge Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 80 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",57,77;
	end;
}

// Guillaune Knight - Flavius
// *********************************************************************
bat_room,175,178,5	script	Guillaume Knight#3	4_M_KY_SOLD,{
	mes "[Guillaume Knight]";
	mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal.";
	next;
	mes "[Guillaume Knight]";
	mes "The crystals for both armies are protected by special barricades that cannot be destroyed by direct attacks.";
	next;
	mes "[Guillaume Knight]";
	mes "But they can be removed by destroying the Guardians that protect the enemy army base.";
	next;
	mes "[Guillaume Knight]";
	mes "The crystals are immune to every type of skill; your physical attacks are the only choice for destroying your enemy's crystal.";
	next;
	mes "[Guillaume Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// Flavius Officer - Guillaume
// *********************************************************************
bat_room,172,178,5	script	Flavius Officer#1	4_M_KY_KNT,{
	mes "[Flavius Officer]";
	if( Bat_Team == 2 )
	{
		mes "Get out of here you stupid Croix!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Guillaume Army to those stinky Croixs!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[Flavius Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(2070,PLAYTIME) == 2 ) erasequest 2070;
	if( checkquest(2070,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at Flavius. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[Flavius Officer]";
		mes "Stand-by for Flavius Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 80 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",85,94;
	end;
}

// Croix Knight - Flavius
// *********************************************************************
bat_room,175,121,1	script	Croix Knight#3	4_M_CRU_SOLD,{
	mes "[Croix Knight]";
	mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal.";
	next;
	mes "[Croix Knight]";
	mes "The crystals for both armies are protected by special barricades that cannot be destroyed by direct attacks.";
	next;
	mes "[Croix Knight]";
	mes "But they can be removed by destroying the Guardians that protect the enemy army base.";
	next;
	mes "[Croix Knight]";
	mes "The crystals are immune to every type of skill; your physical attacks are the only choice for destroying your enemy's crystal.";
	next;
	mes "[Croix Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// Flavius Officerer - Croix
// *********************************************************************
bat_room,172,121,1	script	Flavius Officer#2	4_M_CRU_KNT,{
	mes "[Flavius Officer]";
	if( Bat_Team == 1 )
	{
		mes "Get out of here you stupid Guillaume!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Croix Army to those stinky Guillaumes!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[Flavius Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(2070,PLAYTIME) == 2 ) erasequest 2070;
	if( checkquest(2070,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at Flavius. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[Flavius Officer]";
		mes "Stand-by for Flavius Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 80 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",85,77;
	end;
}

// Guillaune Knight - Flavius
// *********************************************************************
bat_room,151,178,5	script	Guillaume Knight#4	4_M_KY_SOLD,{
	mes "[Guillaume Knight]";
	mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal.";
	next;
	mes "[Guillaume Knight]";
	mes "The crystals for both armies are protected by special barricades that cannot be destroyed by direct attacks.";
	next;
	mes "[Guillaume Knight]";
	mes "But they can be removed by destroying the Guardians that protect the enemy army base.";
	next;
	mes "[Guillaume Knight]";
	mes "The crystals are immune to every type of skill; your physical attacks are the only choice for destroying your enemy's crystal.";
	next;
	mes "[Guillaume Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// Flavius Officerer - Guillaume
// *********************************************************************
bat_room,148,178,5	script	Flavius Officer#3	4_M_KY_KNT,{
	mes "[Flavius Officer]";
	if( Bat_Team == 2 )
	{
		mes "Get out of here you stupid Croix!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Guillaume Army to those stinky Croixs!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[Flavius Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(2070,PLAYTIME) == 2 ) erasequest 2070;
	if( checkquest(2070,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at Flavius. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[Flavius Officer]";
		mes "Stand-by for Flavius Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 80 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",253,94;
	end;
}

// Croix Knight - Flavius
// *********************************************************************
bat_room,151,121,1	script	Croix Knight#4	4_M_CRU_SOLD,{
	mes "[Croix Knight]";
	mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal.";
	next;
	mes "[Croix Knight]";
	mes "The crystals for both armies are protected by special barricades that cannot be destroyed by direct attacks.";
	next;
	mes "[Croix Knight]";
	mes "But they can be removed by destroying the Guardians that protect the enemy army base.";
	next;
	mes "[Croix Knight]";
	mes "The crystals are immune to every type of skill; your physical attacks are the only choice for destroying your enemy's crystal.";
	next;
	mes "[Croix Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// Flavius Officerer - Croix
// *********************************************************************
bat_room,148,121,1	script	Flavius Officer#4	4_M_CRU_KNT,{
	mes "[Flavius Officer]";
	if( Bat_Team == 1 )
	{
		mes "Get out of here you stupid Guillaume!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Croix Army to those stinky Guillaumes!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[Flavius Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(2070,PLAYTIME) == 2 ) erasequest 2070;
	if( checkquest(2070,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at Flavius. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[Flavius Officer]";
		mes "Stand-by for Flavius Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 80 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",253,77;
	end;
}

// Guillaume Knight - KvM
// *********************************************************************
bat_room,143,178,5	script	Guillaume Knight#5	4_M_KY_SOLD,{
	mes "[Guillaume Knight]";
	mes "To win the Battle of Kriger Von Midgard you and your team must kill all the other opponents before all of you die.";
	next;
	mes "[Guillaume Knight]";
	mes "The first team to lose all their soldiers loses.";
	next;
	mes "[Guillaume Knight]";
	mes "Since you cannot come back to battle after you die, taking care on the battlefield is essential.";
	next;
	mes "[Guillaume Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// KvM Officerer - Guillaume
// *********************************************************************
bat_room,140,178,5	script	KVM [80-99] Officer#1	4_M_KY_KNT,{
	mes "[KVM Officer]";
	if( Bat_Team == 2 )
	{
		mes "Get out of here you stinky Croix!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Guillaume Army to those stinky Croixs!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[KVM Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
	if( checkquest(6025,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[KVM Officer]";
		mes "Stand-by for KvM Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 80 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: This arena is for players with baselevel from 80 to 99.";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",253,224;
	end;
}

// Croix Knight - KvM
// *********************************************************************
bat_room,143,121,1	script	Croix Knight#5	4_M_CRU_SOLD,{
	mes "[Croix Knight]";
	mes "To win the Battle of Kriger Von Midgard you and your team must kill all the other opponents before all of you die.";
	next;
	mes "[Croix Knight]";
	mes "The first team to lose all their soldiers loses.";
	next;
	mes "[Croix Knight]";
	mes "Since you cannot come back to battle after you die, taking care on the battlefield is essential.";
	next;
	mes "[Croix Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// KvM Officer - Croix
// *********************************************************************
bat_room,140,121,1	script	KVM [80-99] Officer#2	4_M_CRU_KNT,{
	mes "[KVM Officer]";
	if( Bat_Team == 1 )
	{
		mes "Get out of here you stupid Guillaume!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Croix Army to those stinky Guillaumes!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[KVM Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
	if( checkquest(6025,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[KVM Officer]";
		mes "Stand-by for KvM Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 80 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: This arena is for players with baselevel from 80 to 99.";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",253,208;
	end;
}

// Guillaume Knight - KvM
// *********************************************************************
bat_room,135,178,5	script	Guillaume Knight#6	4_M_KY_SOLD,{
	mes "[Guillaume Knight]";
	mes "To win the Battle of Kriger Von Midgard you and your team must kill all the other opponents before all of you die.";
	next;
	mes "[Guillaume Knight]";
	mes "The first team to lose all their soldiers loses.";
	next;
	mes "[Guillaume Knight]";
	mes "Since you cannot come back to battle after you die, taking care on the battlefield is essential.";
	next;
	mes "[Guillaume Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// KvM Officerer - Guillaume
// *********************************************************************
bat_room,132,178,5	script	KVM [60-79] Officer#1	4_M_KY_KNT,{
	mes "[KVM Officer]";
	if( Bat_Team == 2 )
	{
		mes "Get out of here you stinky Croix!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Guillaume Army to those stinky Croixs!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[KVM Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
	if( checkquest(6025,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[KVM Officer]";
		mes "Stand-by for KvM Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 60 || BaseLevel > 79 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: This arena is for players with baselevel from 60 to 79.";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",225,224;
	end;
}

// Croix Knight - KvM
// *********************************************************************
bat_room,135,121,1	script	Croix Knight#6	4_M_CRU_SOLD,{
	mes "[Croix Knight]";
	mes "To win the Battle of Kriger Von Midgard you and your team must kill all the other opponents before all of you die.";
	next;
	mes "[Croix Knight]";
	mes "The first team to lose all their soldiers loses.";
	next;
	mes "[Croix Knight]";
	mes "Since you cannot come back to battle after you die, taking care on the battlefield is essential.";
	next;
	mes "[Croix Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// KvM Officer - Croix
// *********************************************************************
bat_room,132,121,1	script	KVM [60-79] Officer#2	4_M_CRU_KNT,{
	mes "[KVM Officer]";
	if( Bat_Team == 1 )
	{
		mes "Get out of here you stupid Guillaume!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Croix Army to those stinky Guillaumes!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[KVM Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
	if( checkquest(6025,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[KVM Officer]";
		mes "Stand-by for KvM Battle until the time limit passes.";
		close;
	}

	if( BaseLevel < 60 || BaseLevel > 79 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: This arena is for players with baselevel from 60 to 79.";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",225,208;
	end;
}

// Guillaume Knight - KvM
// *********************************************************************
bat_room,127,178,5	script	Guillaume Knight#7	4_M_KY_SOLD,{
	mes "[Guillaume Knight]";
	mes "To win the Battle of Kriger Von Midgard you and your team must kill all the other opponents before all of you die.";
	next;
	mes "[Guillaume Knight]";
	mes "The first team to lose all their soldiers loses.";
	next;
	mes "[Guillaume Knight]";
	mes "Since you cannot come back to battle after you die, taking care on the battlefield is essential.";
	next;
	mes "[Guillaume Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// KvM Officerer - Guillaume
// *********************************************************************
bat_room,124,178,5	script	KVM [1-59] Officer#1	4_M_KY_KNT,{
	mes "[KVM Officer]";
	if( Bat_Team == 2 )
	{
		mes "Get out of here you stinky Croix!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Guillaume Army to those stinky Croixs!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[KVM Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
	if( checkquest(6025,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[KVM Officer]";
		mes "Stand-by for KvM Battle until the time limit passes.";
		close;
	}

	if( BaseLevel > 59 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: This arena is for players with baselevel from 1 to 59.";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",197,224;
	end;
}

// Croix Knight - KvM
// *********************************************************************
bat_room,127,121,1	script	Croix Knight#7	4_M_CRU_SOLD,{
	mes "[Croix Knight]";
	mes "To win the Battle of Kriger Von Midgard you and your team must kill all the other opponents before all of you die.";
	next;
	mes "[Croix Knight]";
	mes "The first team to lose all their soldiers loses.";
	next;
	mes "[Croix Knight]";
	mes "Since you cannot come back to battle after you die, taking care on the battlefield is essential.";
	next;
	mes "[Croix Knight]";
	mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

// KvM Officer - Croix
// *********************************************************************
bat_room,124,121,1	script	KVM [1-59] Officer#2	4_M_CRU_KNT,{
	mes "[KVM Officer]";
	if( Bat_Team == 1 )
	{
		mes "Get out of here you stupid Guillaume!";
		close;
	}

	if( Bat_Team == 0 )
	{
		mes "Please sign up for an army with Prince Croix or General Guillaume!";
		close;
	}

	mes "Hello " + strcharinfo(0) + ", let's show the power of the Croix Army to those stinky Guillaumes!";
	next;
	if( select("I want to join your army!:End Conversation") == 2 )
		close;

	mes "[KVM Officer]";
	if( BG_Delay_Tick >= gettimetick(2) )
	{
		mes "You are a Deserter!!";
		mes "Because of running away, you need to wait ^0000FF" + callfunc("Time2Str",BG_Delay_Tick) + "^000000 to join again a BattleGround.";
		close;
	}

	if( checkquest(6025,PLAYTIME) == 2 ) erasequest 6025;
	if( checkquest(6025,PLAYTIME) != -1 )
	{
		mes "You have received an indicator showing that you've participated in the Battle at KvM. I can't let you participate in any other battles until the indicator goes off.";
		next;
		mes "[KVM Officer]";
		mes "Stand-by for KvM Battle until the time limit passes.";
		close;
	}

	if( BaseLevel > 59 )
	{
		mes "I'm very please you want to join our army, but I'm sorry: This arena is for players with baselevel from 1 to 59.";
		close;
	}

	mes "Good luck!";
	close2;
	warp "bat_room",197,208;
	end;
}

// Guard Dummy
// *********************************************************************

bat_room,161,141,3	script	Prince Croix's Aid::bat_aid	4_M_CRU_HEAD,{ end; }
bat_room,161,139,3	duplicate(bat_aid)	Prince Croix's Aid::bat_aid2	4_M_CRU_HEAD
bat_room,161,160,3	duplicate(bat_aid)	General Guillaume's Aid::bat_aid3	4_M_KY_HEAD
bat_room,161,158,3	duplicate(bat_aid)	General Guillaume's Aid::bat_aid4	4_M_KY_HEAD

// Flags
// *********************************************************************

-	script	Guillaume camp#bat	1_FLAG_LION,{ end; }
-	script	Croix camp#bat	1_FLAG_EAGLE,{ end; }

// Exit from Registration
// *********************************************************************
-	script	warp2bat_room	-1,{
	end;

OnTouch:
	set BG_Delay_Tick, gettimetick(2) + 30;
	warp "bat_room",154,149;
	end;
}

// Flavius bat_b02
bat_room,57,81,0	duplicate(warp2bat_room)	bat1	WARPNPC,1,1
bat_room,57,90,0	duplicate(warp2bat_room)	bat2	WARPNPC,1,1
// Free BG
bat_room,57,220,0	duplicate(warp2bat_room)	bat3	WARPNPC,1,1
bat_room,57,211,0	duplicate(warp2bat_room)	bat4	WARPNPC,1,1
// Tierra Valley bat_a02
bat_room,85,81,0	duplicate(warp2bat_room)	bat5	WARPNPC,1,1
bat_room,85,90,0	duplicate(warp2bat_room)	bat6	WARPNPC,1,1
// Tierra Valley bat_a01
bat_room,85,220,0	duplicate(warp2bat_room)	bat7	WARPNPC,1,1
bat_room,85,211,0	duplicate(warp2bat_room)	bat8	WARPNPC,1,1
// Free BG
bat_room,113,81,0	duplicate(warp2bat_room)	bat9	WARPNPC,1,1
bat_room,113,90,0	duplicate(warp2bat_room)	bat10	WARPNPC,1,1
// Free BG
bat_room,113,220,0	duplicate(warp2bat_room)	bat11	WARPNPC,1,1
bat_room,113,211,0	duplicate(warp2bat_room)	bat12	WARPNPC,1,1
// Free BG
bat_room,141,81,0	duplicate(warp2bat_room)	bat13	WARPNPC,1,1
bat_room,141,90,0	duplicate(warp2bat_room)	bat14	WARPNPC,1,1
// Free BG
bat_room,141,220,0	duplicate(warp2bat_room)	bat15	WARPNPC,1,1
bat_room,141,211,0	duplicate(warp2bat_room)	bat16	WARPNPC,1,1
// Free BG
bat_room,169,81,0	duplicate(warp2bat_room)	bat17	WARPNPC,1,1
bat_room,169,90,0	duplicate(warp2bat_room)	bat18	WARPNPC,1,1
// Free BG
bat_room,169,220,0	duplicate(warp2bat_room)	bat19	WARPNPC,1,1
bat_room,169,211,0	duplicate(warp2bat_room)	bat20	WARPNPC,1,1
// Free BG
bat_room,197,81,0	duplicate(warp2bat_room)	bat21	WARPNPC,1,1
bat_room,197,90,0	duplicate(warp2bat_room)	bat22	WARPNPC,1,1
// KvM bat_c03
bat_room,197,220,0	duplicate(warp2bat_room)	bat23	WARPNPC,1,1
bat_room,197,211,0	duplicate(warp2bat_room)	bat24	WARPNPC,1,1
// Free BG
bat_room,225,81,0	duplicate(warp2bat_room)	bat25	WARPNPC,1,1
bat_room,225,90,0	duplicate(warp2bat_room)	bat26	WARPNPC,1,1
// KvM bat_c02
bat_room,225,220,0	duplicate(warp2bat_room)	bat27	WARPNPC,1,1
bat_room,225,211,0	duplicate(warp2bat_room)	bat28	WARPNPC,1,1
// Flavius bat_b01
bat_room,253,81,0	duplicate(warp2bat_room)	bat29	WARPNPC,1,1
bat_room,253,90,0	duplicate(warp2bat_room)	bat30	WARPNPC,1,1
// KvM bat_c01
bat_room,253,220,0	duplicate(warp2bat_room)	bat31	WARPNPC,1,1
bat_room,253,211,0	duplicate(warp2bat_room)	bat32	WARPNPC,1,1

// Badges Repairman
// *********************************************************************

bat_room,138,144,5	script	Repairman#bg	4W_M_03,{
	callfunc "repairmain","Repairman";
	end;
}

// Badges Exchange
// *********************************************************************

bat_room,160,150,3	script	Erundek	4_M_MANAGER,{
	mes "[Erundek]";
	mes "Welcome, mighty warrior.";
	mes "What can I do for you today ?";
	next;
	switch( select("Check the Catalog","Exchange Bravery Badges","Exchange Valor Badges","Exchange Heroism Badges","Hmm, nothing I guess.") )
	{
		case 1:
			mes "[Erundek]";
			mes "We have many items, so please take a look and purchase deliberately.";
			close2;
			readbook 11010,1;
			end;
		case 5:
			mes "[Erundek]";
			mes "As you wish.";
			mes "See you later.";
			close;
		case 2: // Bravery Badges
			mes "[Erundek]";
			mes "So you want to exchange ^0000FFBravery Badges^000000 from the Battle of Tierra Valley.";
			mes "What kind of item do you want to exchange?";
			next;
			deletearray .@Item_DB[0],127;
			set .@Badge, 7828;

			switch( select("Weapons:Garment:Footgear:Armor:Accessory") )
			{
				case 1: setarray .@Item_DB[0],13036,13411,1425,1632,1634,1543,1924,1978,1574,1824,1183,1380,13305,1279,1739,13108,13172; set .@Value, 100; break;
				case 2: setarray .@Item_DB[0],2538,2539,2540; set .@Value, 50; break;
				case 3: setarray .@Item_DB[0],2435,2436,2437; set .@Value, 50; break;
				case 4: setarray .@Item_DB[0],2376,2377,2378,2379,2380,2381,2382; set .@Value, 80; break;
				case 5: setarray .@Item_DB[0],2720,2721,2722,2723,2724,2725,2733; set .@Value, 500; break;
			}
			
			break;
		case 3: // Valor Badges
			mes "[Erundek]";
			mes "So you want to exchange ^FF0000Valor Badges^000000 from the Battle of Flavius.";
			mes "What kind of item do you want to exchange?";
			next;
			deletearray .@Item_DB[0],127;
			set .@Badge, 7829;

			switch( select("Weapons:Garment:Footgear:Armor:Accessory") )
			{
				case 1: setarray .@Item_DB[0],13037,13410,1633,1635,1542,1923,1977,1575,1823,1184,1482,1379,13306,1280,1738,13171,13173,13174; set .@Value, 100; break;
				case 2: setarray .@Item_DB[0],2538,2539,2540; set .@Value, 50; break;
				case 3: setarray .@Item_DB[0],2435,2436,2437; set .@Value, 50; break;
				case 4: setarray .@Item_DB[0],2376,2377,2378,2379,2380,2381,2382; set .@Value, 80; break;
				case 5: setarray .@Item_DB[0],2720,2721,2722,2723,2724,2725,2733; set .@Value, 500; break;
			}
			
			break;
		case 4: // Heroism Badge
			mes "[Erundek]";
			mes "So you want to exchange ^FFA500Heroism Badges^000000 from the Battle of Kriger Von Midgard.";
			mes "This shop is not available at the moment.";
			close;
	}
	
	mes "[Erundek]";
	mes "What item do you want to exchange?";
	mes "If you are not sure, check the catalog.";
	next;

	set .@Menu$, "";
	set .@count, getarraysize(.@Item_DB);
	for( set .@i, 0; .@i < .@count; set .@i, .@i + 1 )
		set .@Menu$, .@Menu$ + getitemname(.@Item_DB[.@i]) + ":";

	set .@Item_ID, .@Item_DB[select(.@Menu$) - 1];

	mes "[Erundek]";
	mes "Would you like to exchange ^FF0000" + .@Value + " " + getitemname(.@Badge) + "^000000 for a ^0000FF" + getitemname(.@Item_ID) + "^000000?";
	next;
	mes "Remember, Battleground Reward Items are ^FF0000Character Bound^000000.";
	mes "Are you sure you want this item?";
	next;
	
	if( select("Yes:No") == 2 )
	{
		mes "[Erundek]";
		mes "Do you need more time to check the items?";
		close;
	}
	
	if( countitem(.@Badge) < .@Value )
	{
		mes "[Erundek]";
		mes "I'm sorry, but you don't have enough badges to exchange.";
		close;
	}
	
	delitem .@Badge,.@Value;
	getitem .@Item_ID,1;
	mes "[Erundek]";
	mes "Thank you for exchanging.";
	close;
}