//===== rAthena Script =======================================
//= BattleGround System - Flavius Entrance NPCs
//===== Description: =========================================
//= [Official Conversion]
//= Flavius Battleground Entrance NPCs
//===== Changelogs: ==========================================
//= 1.0 First Version. [L0ne_W0lf]
//= 1.1 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
//============================================================

// Flavius Officer - Guillaume
//============================================================
bat_room,133,178,5	script	Flavius Officer#01a	418,{
	if (getbattleflag("feature.bgqueue"))
		end;
	if (checkweight(1201,1) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you lose some weight. -";
		close;
	}
	mes "[Guillaume Army Officer]";
	mes "Let's show the power of the Guillaume Army to those stinky Croixs!";
	next;
	switch(select("I want to join your army!:End Conversation")) {
	case 1:
		if ((BaseJob == Job_Novice) || (BaseJob == Job_Super_Novice)) {
			mes "[Guillaume Army Officer]";
			mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
		}
		else {
			if (BaseLevel < 80) {
				mes "[Guillaume Army Officer]";
				mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
			}
			else {
				set .@chk_urtime,checkquest(2070,PLAYTIME);
				if ((.@chk_urtime == 0)|| (.@chk_urtime == 1)) {
					mes "[Guillaume Army Officer]";
					mes "You seem to have just returned from the battlefield.";
					mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
				}
				else {
					if (.@chk_urtime == 2)
						erasequest 2070;
					set .@mapcount2,getmapusers("bat_b01");
					if (.@mapcount2 > 0) {
						mes "[Guillaume Army Officer]";
						mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Croixs already.";
						mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
					}
					else {
						if ($@FlaviusBG1 > 0) {
							mes "[Guillaume Army Officer]";
							mes "An elite corps is already standing by to be dispatched to the battlefield.";
							mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
						}
						else {
							mes "[Guillaume Army Officer]";
							mes "You definitely seem to be ready for battle!";
							mes "Go show the Croixs what fear truly means!";
							mes "Today, our cry of victory shall echo all over the battlefield!";
							close2;
							warp "bat_room",85,223;
							end;
						}
					}
				}
			}
		}
		break;
	case 2:
		mes "[Guillaume Army Officer]";
		mes "Today, we shall be victorious!";
		break;
	}
	close;
}

bat_room,133,121,1	script	Flavius Officer#01b	414,{
	if (getbattleflag("feature.bgqueue"))
		end;
	if (checkweight(1201,1) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you lose some weight. -";
		close;
	}
	mes "[Croix Army Officer]";
	mes "Let's show the Guillaumes the power of the Croix Army!";
	next;
	switch(select("I want to join your army!:End Conversation")) {
	case 1:
		if ((BaseJob == Job_Novice) || (BaseJob == Job_Super_Novice)) {
			mes "[Croix Army Officer]";
			mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
		}
		else {
			if (BaseLevel < 80) {
				mes "[Croix Army Officer]";
				mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
			}
			else {
				set .@chk_urtime,checkquest(2070,PLAYTIME);
				if ((.@chk_urtime == 0)|| (.@chk_urtime == 1)) {
					mes "[Croix Army Officer]";
					mes "You seem to have just returned from the battlefield.";
					mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
				}
				else {
					if (.@chk_urtime == 2)
						erasequest 2070;
					set .@mapcount2,getmapusers("bat_b01");
					if (.@mapcount2 > 0) {
						mes "[Croix Army Officer]";
						mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Guillaume already.";
						mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
					}
					else {
						if ($@FlaviusBG1 > 0) {
							mes "[Croix Army Officer]";
							mes "An elite corps is already standing by to be dispatched to the battlefield.";
							mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
						}
						else {
							mes "[Croix Army Officer]";
							mes "You definitely seem to be ready for battle!";
							mes "Go show the Guillaumes what fear truly means!";
							mes "Today, our cry of victory shall echo all over the battlefield!";
							close2;
							warp "bat_room",85,207;
							end;
						}
					}
				}
			}
		}
		break;
	case 2:
		mes "[Croix Army Officer]";
		mes "Today, we shall be victorious!";
		break;
	}
	close;
}

bat_room,135,178,5	script	Guillaume Knight#3	417,{
	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]";
	if (getbattleflag("feature.bgqueue"))
		mes "If you are ready, start by clicking the ^0000FFbattle button from the interface^000000.";
	else {
		mes "Please remember: when you join a battle, you will be receiving a token which indicates the set duration for which you cannot participate in the same type of battle.";
		mes "You may check the duration by pressing the Alt+U keys.";
	}
	next;
	mes "[Guillaume Knight]";
	if (getbattleflag("feature.bgqueue"))
		mes "Please bear in mind once you cancel, ^0000FFyou may not reapply for 1 minute^000000!";
	else
		mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

bat_room,151,178,5	duplicate(Guillaume Knight#3)	Guillaume Knight#4	417

bat_room,135,121,1	script	Croix Knight#3	413,{
	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]";
	if (getbattleflag("feature.bgqueue"))
		mes "If you are ready, start by clicking the ^0000FFbattle button from the interface^000000.";
	else {
		mes "Please remember: when you join a battle, you will be receiving a token which indicates the set duration for which you cannot participate in the same type of battle.";
		mes "You may check the duration by pressing the Alt+U keys.";
	}
	next;
	mes "[Croix Knight]";
	if (getbattleflag("feature.bgqueue"))
		mes "Please bear in mind once you cancel, ^0000FFyou may not reapply for 1 minute^000000!";
	else
		mes "Are you ready for battle? Then apply with the recruiter next to me!";
	close;
}

bat_room,151,121,1	duplicate(Croix Knight#3)	Croix Knight#4	413

// Flavius Officer - Croix
//============================================================
bat_room,148,178,5	script	Flavius Officer#02a	418,{
	if (getbattleflag("feature.bgqueue"))
		end;
	if (checkweight(1201,1) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you lose some weight. -";
		close;
	}
	mes "[Guillaume Army Officer]";
	mes "Let's show the power of the Guillaume Army to those stinky Croixs!";
	next;
	switch(select("I want to join your army!:End Conversation")) {
	case 1:
		if ((BaseJob == Job_Novice) || (BaseJob == Job_Super_Novice)) {
			mes "[Guillaume Army Officer]";
			mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
		}
		else {
			if (BaseLevel < 80) {
				mes "[Guillaume Army Officer]";
				mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
			}
			else {
				set .@chk_urtime,checkquest(2070,PLAYTIME);
				if ((.@chk_urtime == 0)|| (.@chk_urtime == 1)) {
					mes "[Guillaume Army Officer]";
					mes "You seem to have just returned from the battlefield.";
					mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
				}
				else {
					if (.@chk_urtime == 2)
						erasequest 2070;
					set .@mapcount2,getmapusers("bat_b02");
					if (.@mapcount2 > 0) {
						mes "[Guillaume Army Officer]";
						mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Croixs already.";
						mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
					}
					else {
						if ($@FlaviusBG2 > 0) {
							mes "[Guillaume Army Officer]";
							mes "An elite corps is already standing by to be dispatched to the battlefield.";
							mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
						}
						else {
							mes "[Guillaume Army Officer]";
							mes "You definitely seem to be ready for battle!";
							mes "Go show the Croixs what fear truly means!";
							mes "Today, our cry of victory shall echo all over the battlefield!";
							close2;
							warp "bat_room",141,224;
							end;
						}
					}
				}
			}
		}
		break;
	case 2:
		mes "[Guillaume Army Officer]";
		mes "Today, we shall be victorious!";
		break;
	}
	close;
}

bat_room,148,121,1	script	Flavius Officer#02b	414,{
	if (getbattleflag("feature.bgqueue"))
		end;
	if (checkweight(1201,1) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you lose some weight. -";
		close;
	}
	mes "[Croix Army Officer]";
	mes "Let's show the power of the Croix Army to those stinky Guillaumes!";
	next;
	switch(select("I want to join your army!:End Conversation")) {
	case 1:
		if ((BaseJob == Job_Novice) || (BaseJob == Job_Super_Novice)) {
			mes "[Croix Army Officer]";
			mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
		}
		else {
			if (BaseLevel < 80) {
				mes "[Croix Army Officer]";
				mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
			}
			else {
				set .@chk_urtime,checkquest(2070,PLAYTIME);
				if ((.@chk_urtime == 0)|| (.@chk_urtime == 1)) {
					mes "[Croix Army Officer]";
					mes "You seem to have just returned from the battlefield.";
					mes "It's too early for you to go back. Go rest, and leave the enemies to us!";
				}
				else {
					if (.@chk_urtime == 2)
						erasequest 2070;
					set .@mapcount2,getmapusers("bat_b02");
					if (.@mapcount2 > 0) {
						mes "[Croix Army Officer]";
						mes "I've received a report informing me that an elite corps has been dispatched to the battlefield fighting the Guillaume already.";
						mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
					}
					else {
						if ($@FlaviusBG2 > 0) {
							mes "[Croix Army Officer]";
							mes "An elite corps is already standing by to be dispatched to the battlefield.";
							mes "Why don't you go wait for a while? I suggest you sharpen your weapons and prepare your supplies until then.";
						}
						else {
							mes "[Croix Army Officer]";
							mes "You definitely seem to be ready for battle!";
							mes "Go show the Guillaumes what fear truly means!";
							mes "Today, our cry of victory shall echo all over the battlefield!";
							close2;
							warp "bat_room",141,207;
							end;
						}
					}
				}
			}
		}
		break;
	case 2:
		mes "[Croix Army Officer]";
		mes "Today, we shall be victorious!";
		break;
	}
	close;
}
