summaryrefslogtreecommitdiff
path: root/npc/battleground/flavius/flavius02.txt
blob: 182a067c19e163ecc100023b9296be0999b84b83 (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
//================= Hercules Script =======================================
//=       _   _                     _
//=      | | | |                   | |
//=      | |_| | ___ _ __ ___ _   _| | ___  ___
//=      |  _  |/ _ \ '__/ __| | | | |/ _ \/ __|
//=      | | | |  __/ | | (__| |_| | |  __/\__ \
//=      \_| |_/\___|_|  \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2012-2015  Hercules Dev Team
//= Copyright (C)  Euphy
//= Copyright (C)  Kisuka
//= Copyright (C)  L0ne_W0lf
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
//= the Free Software Foundation, either version 3 of the License, or
//= (at your option) any later version.
//=
//= This program is distributed in the hope that it will be useful,
//= but WITHOUT ANY WARRANTY; without even the implied warranty of
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//= GNU General Public License for more details.
//=
//= You should have received a copy of the GNU General Public License
//= along with this program.  If not, see <http://www.gnu.org/licenses/>.
//=========================================================================
// BattleGround System - Flavius Second
//================= Description ===========================================
//= Flavius Battleground.
//= - Winning Team: 9 badges
//= - Losing Team: 3 badge
//================= Current Version =======================================
//= 1.6
//=========================================================================

//== Waiting Room NPCs =====================================
bat_room,142,227,4	script	Lieutenant Huvas	4_M_KY_KNT,{
	end;
OnInit:
	waitingroom "Battle Station",11,"start#bat_b02::OnReadyCheck",1,0,80;
	end;
OnEnterBG:
	$@FlaviusBG2_id1 = waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit","");
	end;
}

bat_room,142,204,0	script	Lieutenant Yukon	4_M_CRU_KNT,{
	end;
OnInit:
	waitingroom "Battle Station",11,"start#bat_b02::OnReadyCheck",1,0,80;
	end;
OnEnterBG:
	$@FlaviusBG2_id2 = waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit","");
	end;
}

bat_room,141,220,0	warp	back_bgroomb02a	1,1,bat_room,154,150
bat_room,141,211,0	warp	back_bgroomb02b	1,1,bat_room,154,150

bat_room,2,151,3	script	#bat_b02_timer	CLEAR_NPC,{
	end;

OnInit:
OnEnable:
	initnpctimer;
	end;

OnStop:
	stopnpctimer;
	end;

OnTimer1000:
	stopnpctimer;
	initnpctimer;
	.@chk_bat_a01 = getmapusers("bat_b02");
	if (.@chk_bat_a01 < 1) {
		$@FlaviusBG2 = 0;
		if( $@FlaviusBG2_id1 ) { bg_destroy $@FlaviusBG2_id1; $@FlaviusBG2_id1 = 0; }
		if( $@FlaviusBG2_id2 ) { bg_destroy $@FlaviusBG2_id2; $@FlaviusBG2_id2 = 0; }
		donpcevent "start#bat_b02::OnReadyCheck";
	}
	end;
}

//== Flavius Battleground Engine ===========================
bat_b02,15,15,3	script	start#bat_b02	CLEAR_NPC,{
OnInit:
	mapwarp "bat_b02","bat_room",154,150;
	end;

OnReadyCheck:
	if( $@FlaviusBG2 )
		end;
	.@Guillaume = getwaitingroomstate(0,"Lieutenant Huvas");
	.@Croix = getwaitingroomstate(0,"Lieutenant Yukon");
	if( !.@Guillaume && !.@Croix ) {
		donpcevent "#bat_b02_timer::OnStop";
		end;
	}
	if( .@Guillaume < 10 || .@Croix < 10 )
		end;
	$@FlaviusBG2 = 1;
	$@FlaviusBG2_Victory = 0;
	$@Croix_ScoreBG2 = 0;
	$@Guill_ScoreBG2 = 0;

	bg_updatescore "bat_b02",$@Guill_ScoreBG2,$@Croix_ScoreBG2;
	donpcevent "Lieutenant Huvas::OnEnterBG";
	donpcevent "Lieutenant Yukon::OnEnterBG";
	donpcevent "OBJ#bat_b02_a::OnKill";
	donpcevent "OBJ#bat_b02_a::OnEnable";
	donpcevent "OBJ#bat_b02_b::OnKill";
	donpcevent "OBJ#bat_b02_b::OnEnable";
	donpcevent "guardian#bat_b02_a::OnKill";
	donpcevent "guardian#bat_b02_b::OnKill";
	donpcevent "guardian#bat_b02_a::OnEnable";
	donpcevent "guardian#bat_b02_b::OnEnable";
	donpcevent "cell#bat_b02_a::OnRed";
	donpcevent "cell#bat_b02_b::OnRed";
	donpcevent "time#bat_b02::OnEnable";
	disablenpc "Guillaume Vintenar#b02_a";
	disablenpc "Croix Vintenar#b02_b";
	disablenpc "Vintenar#bat_b02_aover";
	disablenpc "Vintenar#bat_b02_bover";
	bg_warp $@FlaviusBG2_id1,"bat_b02",87,75;
	bg_warp $@FlaviusBG2_id2,"bat_b02",311,224;
	donpcevent "countdown#bat_b02::OnEnable";
	initnpctimer;
	end;

OnReset:
	donpcevent "OBJ#bat_b02_a::OnKill";
	donpcevent "OBJ#bat_b02_a::OnEnable";
	donpcevent "OBJ#bat_b02_b::OnKill";
	donpcevent "OBJ#bat_b02_b::OnEnable";
	donpcevent "guardian#bat_b02_a::OnKill";
	donpcevent "guardian#bat_b02_b::OnKill";
	donpcevent "guardian#bat_b02_a::OnEnable";
	donpcevent "guardian#bat_b02_b::OnEnable";
	donpcevent "cell#bat_b02_a::OnRed";
	donpcevent "cell#bat_b02_b::OnRed";
	donpcevent "time#bat_b02::OnEnable";
	disablenpc "Guillaume Vintenar#b02_a";
	disablenpc "Croix Vintenar#b02_b";
	disablenpc "Vintenar#bat_b02_aover";
	disablenpc "Vintenar#bat_b02_bover";
	bg_warp $@FlaviusBG2_id1,"bat_b02",87,75;
	bg_warp $@FlaviusBG2_id2,"bat_b02",311,224;
	end;

OnGuillaumeQuit:
OnCroixQuit:
	bg_leave;
	end;

OnTimer10000:
	stopnpctimer;
	donpcevent "#bat_b02_timer::OnEnable";
	end;
}

bat_b02,1,1,3	script	OBJ#bat_b02_a	CLEAR_NPC,{
OnEnable:
	bg_monster $@FlaviusBG2_id1,"bat_b02",61,150,"Pink Crystal",1915,"OBJ#bat_b02_a::OnMyMobDead";
	end;

OnKill:
	killmonster "bat_b02","OBJ#bat_b02_a::OnMyMobDead";
	end;

OnMyMobDead:
	if (mobcount("bat_b02","OBJ#bat_b02_a::OnMyMobDead") < 1) {
		mapannounce "bat_b02", "Guillaume's Crystal has been destroyed.",bc_map,"0xFFCE00";
		if ($@Croix_ScoreBG2 > 0) {
			$@FlaviusBG2_Victory = 2;
			$@Croix_ScoreBG2 = $@Croix_ScoreBG2+1;
			enablenpc "Guillaume Vintenar#b02_a";
			enablenpc "Croix Vintenar#b02_b";
			donpcevent "time#bat_b02::OnStop";
		}
		else {
			$@Croix_ScoreBG2 = 1;
			donpcevent "time#bat_b02::OnEnable";
			donpcevent "start#bat_b02::OnReset";
		}
		donpcevent "#bat_b02_timer::OnStop";
		bg_updatescore "bat_b02",$@Guill_ScoreBG2,$@Croix_ScoreBG2;
		bg_warp $@FlaviusBG2_id1,"bat_b02",10,290;
		bg_warp $@FlaviusBG2_id2,"bat_b02",390,10;
		donpcevent "#bat_b02_timer::OnEnable";
	}
	end;
}

bat_b02,1,2,3	script	OBJ#bat_b02_b	CLEAR_NPC,{
OnEnable:
	bg_monster $@FlaviusBG2_id2,"bat_b02",328,150,"Blue Crystal",1914,"OBJ#bat_b02_b::OnMyMobDead";
	end;

OnKill:
	killmonster "bat_b02","OBJ#bat_b02_b::OnMyMobDead";
	end;

OnMyMobDead:
	if (mobcount("bat_b02","OBJ#bat_b02_b::OnMyMobDead") < 1) {
		mapannounce "bat_b02", "Croix's Crystal has been destroyed.",bc_map,"0xFFCE00";
		if ($@Guill_ScoreBG2 > 0) {
			$@FlaviusBG2_Victory = 1;
			++$@Guill_ScoreBG2;
			enablenpc "Guillaume Vintenar#b02_a";
			enablenpc "Croix Vintenar#b02_b";
			donpcevent "time#bat_b02::OnStop";
		}
		else {
			$@Guill_ScoreBG2 = 1;
			donpcevent "time#bat_b02::OnEnable";
			donpcevent "start#bat_b02::OnReset";
		}
		donpcevent "#bat_b02_timer::OnStop";
		bg_updatescore "bat_b02",$@Guill_ScoreBG2,$@Croix_ScoreBG2;
		bg_warp $@FlaviusBG2_id1,"bat_b02",10,290;
		bg_warp $@FlaviusBG2_id2,"bat_b02",390,10;
		donpcevent "#bat_b02_timer::OnEnable";
	}
	end;
}

bat_b02,1,3,3	script	guardian#bat_b02_a	CLEAR_NPC,{
OnEnable:
	bg_monster $@FlaviusBG2_id1,"bat_b02",108,159,"Guillaume Camp Guardian",1949,"guardian#bat_b02_a::OnMyMobDead";
	bg_monster $@FlaviusBG2_id1,"bat_b02",108,141,"Guillaume Camp Guardian",1949,"guardian#bat_b02_a::OnMyMobDead";
	end;

OnKill:
	killmonster "bat_b02","guardian#bat_b02_a::OnMyMobDead";
	end;

OnMyMobDead:
	if (mobcount("bat_b02","guardian#bat_b02_a::OnMyMobDead") < 1) {
		donpcevent "cell#bat_b02_a::OnGreen";
		mapannounce "bat_b02", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00";
	}
	end;
}

bat_b02,1,3,3	script	guardian#bat_b02_b	CLEAR_NPC,{
OnEnable:
	bg_monster $@FlaviusBG2_id2,"bat_b02",307,160,"Croix Camp Guardian",1949,"guardian#bat_b02_b::OnMyMobDead";
	bg_monster $@FlaviusBG2_id2,"bat_b02",307,138,"Croix Camp Guardian",1949,"guardian#bat_b02_b::OnMyMobDead";
	end;

OnKill:
	killmonster "bat_b02","guardian#bat_b02_b::OnMyMobDead";
	end;

OnMyMobDead:
	if (mobcount("bat_b02","guardian#bat_b02_b::OnMyMobDead") < 1) {
		donpcevent "cell#bat_b02_b::OnGreen";
		mapannounce "bat_b02", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00";
	}
	end;
}

bat_b02,1,4,3	script	cell#bat_b02_a	CLEAR_NPC,{
OnRed:
	setcell "bat_b02",62,149,60,151,cell_basilica,1;
	setcell "bat_b02",62,149,60,151,cell_walkable,0;
	end;

OnGreen:
	setcell "bat_b02",62,149,60,151,cell_basilica,0;
	setcell "bat_b02",62,149,60,151,cell_walkable,1;
	end;
}

bat_b02,1,5,3	script	cell#bat_b02_b	CLEAR_NPC,{
OnRed:
	setcell "bat_b02",327,151,329,149,cell_basilica,1;
	setcell "bat_b02",327,151,329,149,cell_walkable,0;
	end;

OnGreen:
	setcell "bat_b02",327,151,329,149,cell_basilica,0;
	setcell "bat_b02",327,151,329,149,cell_walkable,1;
	end;
}

bat_b02,1,6,1	script	time#bat_b02	CLEAR_NPC,{
OnEnable:
	donpcevent "Battle Therapist#b02_a::OnEnable";
	donpcevent "Battle Therapist#b02_b::OnEnable";
	end;

OnStop:
	donpcevent "Battle Therapist#b02_a::OnStop";
	donpcevent "Battle Therapist#b02_b::OnStop";
	end;
}

bat_b02,10,294,3	script	Battle Therapist#b02_a	4_F_SISTER,{
	specialeffect2 EF_HEAL;
	mes "[Battle Therapist]";
	mes "Just close your eyes,";
	mes "and take a deep breath.";
	mes "You can be free from pain.";
	close;

OnTimer25000:
	specialeffect EF_SANCTUARY;
	enablenpc "bat_b02_rp1_a_warp";
	end;

OnTimer26000:
	disablenpc "bat_b02_rp1_a_warp";
	end;

OnTimer26500:
	stopnpctimer;
	donpcevent "Battle Therapist#b02_a::OnEnable";
	end;

OnEnable:
	initnpctimer;
	enablenpc "Battle Therapist#b02_a";
	end;

OnStop:
	disablenpc "bat_b02_rp1_a_warp";
	disablenpc "Battle Therapist#b02_a";
	stopnpctimer;
	end;
}

bat_b02,10,290,0	script	bat_b02_rp1_a_warp	WARPNPC,10,10,{
OnInit:
	disablenpc "bat_b02_rp1_a_warp";
	end;

OnTouch:
	percentheal 100,100;
	warp "bat_b02",87,73;
	end;
}

bat_b02,389,14,3	script	Battle Therapist#b02_b	4_F_SISTER,{
	specialeffect2 EF_HEAL;
	mes "[Battle Therapist]";
	mes "Just close your eyes,";
	mes "and take a deep breath.";
	mes "You can be free from pain.";
	close;

OnTimer25000:
	specialeffect EF_SANCTUARY;
	enablenpc "bat_b02_rp1_b_warp";
	end;

OnTimer26000:
	disablenpc "bat_b02_rp1_b_warp";
	end;

OnTimer26500:
	stopnpctimer;
	donpcevent "Battle Therapist#b02_b::OnEnable";
	end;

OnEnable:
	initnpctimer;
	enablenpc "Battle Therapist#b02_b";
	end;

OnStop:
	disablenpc "bat_b02_rp1_b_warp";
	disablenpc "Battle Therapist#b02_b";
	stopnpctimer;
	end;
}

bat_b02,389,10,0	script	bat_b02_rp1_b_warp	WARPNPC,9,9,{
OnInit:
	disablenpc "bat_b02_rp1_a_warp";
	end;

OnTouch:
	percentheal 100,100;
	warp "bat_b02",312,225;
	end;
}

bat_b02,87,76,0	script	A_CODE#bat_b02	-1,5,5,{
OnTouch:
	//if (!questprogress(2070))
	//	setquest 2070;
	end;
}

bat_b02,312,224,0	script	B_CODE#bat_b02	-1,5,5,{
OnTouch:
	//if (!questprogress(2070))
	//	setquest 2070;
	end;
}

bat_b02,10,294,3	script	Guillaume Vintenar#b02_a	4_M_RASWORD,{
	if ($@FlaviusBG2_id1 == getcharid(4)) {
		if ($@FlaviusBG2_Victory == 1) {
			.@your_medal = countitem(7829);
			.@medal_gap = 500 - .@your_medal;
			if (.@medal_gap > 8) {
				mes "[Axl Rose]";
				mes "Blessed Guillaume!";
				mes "Let's enjoy our glorious victory!";
				mes ""+strcharinfo(0)+", it's a sign reflecting victory.";
				close2;
				getitem 7829,9; //BF_Badge2
			}
			else {
				mes "[Axl Rose]";
				mes "Blessed Guillaume!";
				mes "Let's enjoy our glorious victory!";
				mes ""+strcharinfo(0)+", it's a sign reflecting victory.";
				close2;
				getitem 7829,.@medal_gap; //BF_Badge2
			}
		}
		else {
			.@your_medal = countitem(7829);
			.@medal_gap = 500 - .@your_medal;
			if (.@medal_gap > 2) {
				mes "[Axl Rose]";
				mes "You lost, but you're dedicated to this battle.";
				mes "This is a reward for your great dedication by Guillaume Marollo!";
				mes "Just take this defeat as a lesson, next time you will definitely win.";
				close2;
				getitem 7829,3; //BF_Badge2
			}
			else {
				mes "[Axl Rose]";
				mes "You lost, but you're dedicated to this battle.";
				mes "This is a reward for your great dedication by Guillaume Marollo!";
				mes "Just take this defeat as a lesson, next time you will definitely win.";
				close2;
				getitem 7829,.@medal_gap; //BF_Badge2
			}
		}
	}
	bg_leave;
	warp "bat_room",154,150;
	end;

OnInit:
	disablenpc "Guillaume Vintenar#b02_a";
	end;
}

bat_b02,389,14,3	script	Croix Vintenar#b02_b	4_M_RASWORD,{
	if ($@FlaviusBG2_id2 == getcharid(4)) {
		if ($@FlaviusBG2_Victory == 2) {
			.@your_medal = countitem(7829);
			.@medal_gap = 500 - .@your_medal;
			if (.@medal_gap > 8) {
				mes "[Swandery]";
				mes "Blessed Croix!";
				mes "Let's enjoy our glorious victory!";
				mes ""+strcharinfo(0)+", it's a sign reflecting victory.";
				close2;
				getitem 7829,9; //BF_Badge2
			}
			else {
				mes "[Swandery]";
				mes "Blessed Croix!";
				mes "Let's enjoy our glorious victory!";
				mes ""+strcharinfo(0)+", it's a sign reflecting victory.";
				close2;
				getitem 7829,.@medal_gap; //BF_Badge2
			}
		}
		else {
			.@your_medal = countitem(7829);
			.@medal_gap = 500 - .@your_medal;
			if (.@medal_gap > 2) {
				mes "[Swandery]";
				mes "Oh, "+strcharinfo(0)+". Don't be sad.";
				mes "Even though we didn't win, we did our best.";
				mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one.";
				close2;
				getitem 7829,3; //BF_Badge2
			}
			else {
				mes "[Swandery]";
				mes "Oh, "+strcharinfo(0)+". Don't be sad.";
				mes "Even though we didn't win, we did our best.";
				mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one.";
				close2;
				getitem 7829,.@medal_gap; //BF_Badge2
			}
		}
	}
	bg_leave;
	warp "bat_room",154,150;
	end;

OnInit:
	disablenpc "Croix Vintenar#b02_b";
	end;
}

bat_b02,1,5,3	script	countdown#bat_b02	CLEAR_NPC,{
OnInit:
	stopnpctimer;
	end;

OnEnable:
	stopnpctimer;
	initnpctimer;
	end;

OnStop:
	stopnpctimer;
	end;

OnTimer7000:
	mapannounce "bat_b02", "Guillaume Vintenar Axl Rose : Let's attack to destroy that Crystal!",bc_map,"0xFF9900";
	end;

OnTimer8000:
	mapannounce "bat_b02", "Croix Vintenar Swandery : Even though Guillaume is struggling to win against us, the victory is ours. Let's show them our power.",bc_map,"0xFF99CC";
	end;

OnTimer1800000:
	mapannounce "bat_b02", "Marollo VII : Guillaume Marollo, Croix Marollo! And their followers!",bc_map,"0x99CC00";
	end;

OnTimer1803000:
	mapannounce "bat_b02", "Marollo VII : Both camps are competitive, so it's hard to judge which team is superior.",bc_map,"0x99CC00";
	end;

OnTimer1808000:
	mapannounce "bat_b02", "Marollo VII : This battle of Flavian is such a waste of time. I will decide victory and defeat by your progress.",bc_map,"0x99CC00";
	end;

OnTimer1822000:
	mapannounce "bat_b02", "Marollo VII : If you can't accept the results, try again in another valley battle!",bc_map,"0x99CC00";
	end;

OnTimer1825000:
	mapannounce "bat_b02", "Axl Rose, Swandery : Yes, sir.",bc_map,"0x99CC00";
	end;

OnTimer1830000:
	donpcevent "time#bat_b02::OnStop";
	bg_warp $@FlaviusBG2_id1,"bat_b02",10,290;
	bg_warp $@FlaviusBG2_id2,"bat_b02",390,10;
	enablenpc "Vintenar#bat_b02_aover";
	enablenpc "Vintenar#bat_b02_bover";
	end;

OnTimer1900000:
	mapwarp "bat_b02","bat_room",154,150;
	donpcevent "countdown#bat_b02::OnStop";
	end;
}

bat_b02,81,83,3	script	Guillaume Camp#flag32	1_FLAG_LION,{ end; }
bat_b02,94,83,3	script	Guillaume Camp#flag33	1_FLAG_LION,{ end; }
bat_b02,81,66,3	script	Guillaume Camp#flag34	1_FLAG_LION,{ end; }
bat_b02,94,66,3	script	Guillaume Camp#flag35	1_FLAG_LION,{ end; }
bat_b02,139,142,3	script	Guillaume Camp#flag36	1_FLAG_LION,{ end; }
bat_b02,139,158,3	script	Guillaume Camp#flag37	1_FLAG_LION,{ end; }
bat_b02,110,161,3	script	Guillaume Camp#flag38	1_FLAG_LION,{ end; }
bat_b02,110,137,3	script	Guillaume Camp#flag39	1_FLAG_LION,{ end; }
bat_b02,63,135,3	script	Guillaume Camp#flag40	1_FLAG_LION,{ end; }
bat_b02,63,165,3	script	Guillaume Camp#flag41	1_FLAG_LION,{ end; }
bat_b02,10,296,3	script	Guillaume Camp#flag42	1_FLAG_LION,{ end; }

bat_b02,306,233,3	script	Croix Camp#flag32	1_FLAG_EAGLE,{ end; }
bat_b02,317,233,3	script	Croix Camp#flag33	1_FLAG_EAGLE,{ end; }
bat_b02,306,216,3	script	Croix Camp#flag34	1_FLAG_EAGLE,{ end; }
bat_b02,317,216,3	script	Croix Camp#flag35	1_FLAG_EAGLE,{ end; }
bat_b02,257,158,3	script	Croix Camp#flag36	1_FLAG_EAGLE,{ end; }
bat_b02,257,141,3	script	Croix Camp#flag37	1_FLAG_EAGLE,{ end; }
bat_b02,297,164,3	script	Croix Camp#flag38	1_FLAG_EAGLE,{ end; }
bat_b02,297,136,3	script	Croix Camp#flag39	1_FLAG_EAGLE,{ end; }
bat_b02,336,161,3	script	Croix Camp#flag40	1_FLAG_EAGLE,{ end; }
bat_b02,336,139,3	script	Croix Camp#flag41	1_FLAG_EAGLE,{ end; }
bat_b02,389,16,3	script	Croix Camp#flag42	1_FLAG_EAGLE,{ end; }

bat_b02,10,294,3	script	Vintenar#bat_b02_aover	4_M_KY_HEAD,{
	.@A_B_gap = $@Guill_ScoreBG2 - $@Croix_ScoreBG2;
	if ($@FlaviusBG2_id1 == getcharid(4)) {
		if (.@A_B_gap > 0) {
			.@your_medal = countitem(7829);
			.@medal_gap = 500 - .@your_medal;
			if (.@medal_gap > 8) {
				mes "[Axl Rose]";
				mes "Blessed Guillaume!";
				mes "Let's enjoy our glorious victory!";
				mes ""+strcharinfo(0)+", it's a sign reflecting victory.";
				close2;
				getitem 7829,9; //BF_Badge2
			}
			else {
				mes "[Axl Rose]";
				mes "Blessed Guillaume!";
				mes "Let's enjoy our glorious victory!";
				mes ""+strcharinfo(0)+", it's a sign reflecting victory.";
				close2;
				getitem 7829,.@medal_gap; //BF_Badge2
			}
		}
		else if (.@A_B_gap == 0) {
			.@your_medal = countitem(7829);
			.@medal_gap = 500 - .@your_medal;
			if (.@medal_gap > 2) {
				mes "[Axl Rose]";
				mes "You lost, but you're dedicated to this battle.";
				mes "This is a reward for your great dedication by Guillaume Marollo!";
				mes "Just take this defeat as a lesson, next time you will definitely win.";
				close2;
				getitem 7829,3; //BF_Badge2
			}
			else {
				mes "[Axl Rose]";
				mes "You lost, but you're dedicated to this battle.";
				mes "This is a reward for your great dedication by Guillaume Marollo!";
				mes "Just take this defeat as a lesson, next time you will definitely win.";
				close2;
				getitem 7829,.@medal_gap; //BF_Badge2
			}
		}
		else {
			.@your_medal = countitem(7829);
			.@medal_gap = 500 - .@your_medal;
			if (.@medal_gap > 2) {
				mes "[Axl Rose]";
				mes "You lost, but you're dedicated to this battle.";
				mes "This is a reward for your great dedication by Guillaume Marollo!";
				mes "Just take this defeat as a lesson, next time you will definitely win.";
				close2;
				getitem 7829,3; //BF_Badge2
			}
			else {
				mes "[Axl Rose]";
				mes "You lost, but you're dedicated to this battle.";
				mes "This is a reward for your great dedication by Guillaume Marollo!";
				mes "Just take this defeat as a lesson, next time you will definitely win.";
				close2;
				getitem 7829,.@medal_gap; //BF_Badge2
			}
		}
	}
	else {
		mes "[Axl Rose]";
		mes "Why are you here, Croix mercenary? I am definitely sure of victory against foolish Croix such as you. Ha!";
		close;
	}
	bg_leave;
	warp "bat_room",154,150;
	end;

OnInit:
	disablenpc "Vintenar#bat_b02_aover";
	end;
}

bat_b02,389,14,3	script	Vintenar#bat_b02_bover	4_M_CRU_HEAD,{
	.@A_B_gap = $@Guill_ScoreBG2 - $@Croix_ScoreBG2;
	if ($@FlaviusBG2_id2 == getcharid(4)) {
		if (.@A_B_gap > 0) {
			.@your_medal = countitem(7829);
			.@medal_gap = 500 - .@your_medal;
			if (.@medal_gap > 2) {
				mes "[Swandery]";
				mes "Oh, "+strcharinfo(0)+". Don't be sad.";
				mes "Even though we didn't win, we did our best.";
				mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one.";
				close2;
				getitem 7829,3; //BF_Badge2
			}
			else {
				mes "[Swandery]";
				mes "Oh, "+strcharinfo(0)+". Don't be sad.";
				mes "Even though we didn't win, we did our best.";
				mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one.";
				close2;
				getitem 7829,.@medal_gap; //BF_Badge2
			}
		}
		else if (.@A_B_gap == 0) {
			.@your_medal = countitem(7829);
			.@medal_gap = 500 - .@your_medal;
			if (.@medal_gap > 2) {
				mes "[Swandery]";
				mes "Oh, "+strcharinfo(0)+". Don't be sad.";
				mes "Even though we didn't win, we did our best.";
				mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one.";
				close2;
				getitem 7829,3; //BF_Badge2
			}
			else {
				mes "[Swandery]";
				mes "Oh, "+strcharinfo(0)+". Don't be sad.";
				mes "Even though we didn't win, we did our best.";
				mes "This is a Royal gift from Croix, and please don't forget this battle. We will win the next one.";
				close2;
				getitem 7829,.@medal_gap; //BF_Badge2
			}
		}
		else {
			.@your_medal = countitem(7829);
			.@medal_gap = 500 - .@your_medal;
			if (.@medal_gap > 8) {
				mes "[Swandery]";
				mes "Blessed Croix!";
				mes "Let's enjoy our glorious victory!";
				mes ""+strcharinfo(0)+", it's a sign reflecting victory.";
				close2;
				getitem 7829,9; //BF_Badge2
			}
			else {
				mes "[Swandery]";
				mes "Blessed Croix!";
				mes "Let's enjoy our glorious victory!";
				mes ""+strcharinfo(0)+", it's a sign reflecting victory.";
				close2;
				getitem 7829,.@medal_gap; //BF_Badge2
			}
		}
	}
	else {
		mes "[Swandery]";
		mes "Why do you come here as a Guillaume? You will be sent to where you should be!";
		close;
	}
	bg_leave;
	warp "bat_room",154,150;
	end;

OnInit:
	disablenpc "Vintenar#bat_b02_bover";
	end;
}

bat_b02,1,10,3	script	Release all#b02	4_DOG01,{
	.@i = callfunc("F_GM_NPC",1854,0);
	if (.@i == -1) {
		mes "Cancelled.";
		close;
	} else if (.@i == 0) {
		end;
	} else {
		mes "May I help you?";
		next;
		switch(select("Release all.:Cancel.")) {
		case 1:
			mes "Bye.";
			close2;
			mapwarp "bat_b02","bat_room",154,150;
			end;
		case 2:
			mes "Cancelled.";
			close;
		}
	}
}