summaryrefslogblamecommitdiff
path: root/npc/battleground/bg_common.txt
blob: df3dbaf417adc627bfa7182565af8a0675a890f1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                 
 



                                                                            
 



                                                                             
             



















































                                                                                                                                                                  
         
               

                              


            

                                                                    
 




                                                                               


                                                                                        
                                          





























































                                                                                                                                                                                                                                           
         
               

                               


            











                                                                                       
             

















































                                                                            
             


                                                                                                                                          
             



                                                 
                       






















                                                                                                                          
         


            







                                                                                           



































                                                                        

                                                                        








                                               
                  

                                                                      
        

                                                                      
        

                                                                      
          

                                                                      
          

                                                                      
          

                                                                      
          

                                                                      
          

                                                                      
          

                                                                      
                  

                                                                      
        

                                                                      
 






                                                                        


                                                                        
                                                    











                                                                        
                                                                                                                       






                                                                                                   
                       





                                             
                                                                                                                    
































                                                                                                                                                                                       
         
 






































                                                                                                                                                        
// ==============================================================================
// BattleGround System - Common NPCs
// ==============================================================================

// MapFlags
// *********************************************************************

bat_room	mapflag	nomemo
bat_room	mapflag	nowarpto
bat_room	mapflag	nobranch
bat_room	mapflag	nopenalty
bat_room	mapflag	noteleport

// Generals
//============================================================
bat_room,161,158,3	script	Gen. Guillaume's Aide#01	419,{ end; }
bat_room,161,160,3	script	Gen. Guillaume's Aide#03	419,{ end; }

bat_room,160,141,3	script	Prince Croix	416,{
	cutin "bat_crua1",2;
	mes "[Prince Croix]";
	mes "Wise adventurer, why don't you lend us your power for victory?";
	next;
	switch(select("What's the reason for the Battle?:Tell me about General Guillaume")) {
	case 1:
		cutin "bat_crua2",2;
		mes "[Prince Croix]";
		mes "Maroll's great king, Marcel Marollo VII, is very sick lately.";
		mes "His Majesty has declared that he will be leaving the future of Maroll to me or the 3rd prince, General Guillaume.";
		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.";
		mes "I want to win this battle so that I can bring prosperity to the people of Maroll. They've suffered enough from war...";
		next;
		switch(select("Yes, I want to join you.:End Conversation")) {
		case 1:
			cutin "bat_crua1",2;
			mes "[Prince Croix]";
			mes "Thank you so much. I feel like I can win with the help of adventurers like you.";
			mes "Now, please go downstairs and join your comrades in sharpening their skills to fight the enemy!";
			break;
		case 2:
			mes "[Prince Croix]";
			mes "For Maroll!";
			break;
		}
		break;
	case 2:
		cutin "bat_crua2",2;
		mes "[Prince Croix]";
		mes "The 3rd Prince Guillaume is the great general of Maroll.";
		mes "It's a waste of time to explain to you how great a leader or warlord he is, since he commands the great military power of Maroll.";
		next;
		mes "[Prince Croix]";
		mes "Unfortunately, there's something he and his followers are unaware of:";
		mes "Do the people of Maroll really want them to spend so much money on military power?";
		mes "We have suffered enough from wars.";
		mes "I believe weapons aren't the best way to bring prosperity to a nation.";
		next;
		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;
		switch(select("Yes, I want to join you.:End Conversation")) {
		case 1:
			cutin "bat_crua1",2;
			mes "[Prince Croix]";
			mes "Thank you so much. I feel like I can win with the help of adventurers like you.";
			mes "Now, please go downstairs and join your comrades in sharpening their skills to fight the enemy!";
			break;
		case 2:
			mes "[Prince Croix]";
			mes "For Maroll!";
			break;
		}
		break;
	}
	close2;
	cutin "bat_crua1",255;
	cutin "bat_crua2",255;
	end;
}

bat_room,161,140,3	script	Prince Croix's Aide#01	415,{ end; }
bat_room,161,142,3	script	Prince Croix's Aide#02	415,{ end; }

bat_room,160,159,3	script	General Guillaume	420,{
	cutin "bat_kiyom2",2;
	mes "[General Guillaume]";
	mes "Hot-blooded adventurer, we need your ability to win this battle.";
	next;
	switch(select("What's the reason for the Battle?:Tell me about Prince Croix")) {
	case 1:
		cutin "bat_kiyom1",2;
		mes "[General Guillaume]";
		mes "Our great king, Marcel Marollo VII, is very sick lately.";
		mes "His Majesty has declared that he has 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! 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.";
		mes "I pledge on my honor to prove that I'm the one who can protect this Maroll from outside threats.";
		next;
		switch(select("Yes, I want to join you.:End Conversation")) {
		case 1:
			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.";
			next;
			mes "[General Guillaume]";
			mes "Now, go upstairs and apply for battle with your comrades.";
			mes "I'm sure they'll welcome you whole-heartedly!";
			break;
		case 2:
			mes "[General Guillaume]";
			mes "I'll be the one who will capture the flag!";
			break;
		}
		break;
	case 2:
		cutin "bat_kiyom1",2;
		mes "[General Guillaume]";
		mes "The 5th Prince Croix is currently titled as the Prime Minister of Maroll.";
		mes "He thinks all national matters of a nation can be discussed and determined on a desk,";
		mes "and believes in peaceful co-existence with other countries.";
		next;
		mes "[General Guillaume]";
		mes "He's too ignorant to admit that so-called peace is built on countless lives that are sacrificed in wars while normal citizens and upper classes can live, oblivious to the horrors that allow them to live that way.";
		next;
		mes "[General Guillaume]";
		mes "He's too naive to understand the reality....";
		mes "I can't leave Maroll to someone like him who lives in a dream!";
		next;
		mes "[General Guillaume]";
		mes "His unrealistic beliefs will drown this country in poverty and make the people weak. If he becomes the king, Maroll will never rest from the onslaughts of other countries.";
		mes "I want to teach him what makes this small country so powerful and prosperous. It's military power!";
		next;
		switch(select("I want to join your army!:End Conversation")) {
		case 1:
			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.";
			next;
			mes "[General Guillaume]";
			mes "Now, go upstairs and apply for battle from your comrades.";
			mes "I'm sure they'll welcome you whole-heartedly!";
			break;
		case 2:
			mes "[General Guillaume]";
			mes "I'll be the one who will capture the flag!";
			break;
		}
		break;
	}
	close2;
	cutin "bat_kiyom1",255;
	cutin "bat_kiyom2",255;
	end;
}

// Flags
//============================================================
//bat_room,140,160,3	script	Guillaume Base#roomflag1	973,{ end; }
//bat_room,167,160,3	script	Guillaume Base#roomflag2	973,{ end; }
//bat_room,140,139,3	script	Croix Base#roomflag1	974,{ end; }
//bat_room,167,139,3	script	Croix Base#roomflag2	974,{ end; }

// BattleGround Warper
//============================================================
bat_room,148,150,5	script	Teleporter#Battlefield	124,{
	mes "[Teleporter]";
	mes "Do you wish to leave the battlefield? Use my services to return to town.";
	next;
	switch(select("Leave:Don't Leave")) {
	case 1:
		mes "[Teleporter]";
		switch(bat_return) {
		default:
		case 1:
			setarray .@mapname$[0],"Prontera.","prontera";
			setarray .@xy[0],116,72;
			break;
		case 2:
			setarray .@mapname$[0],"Morroc","moc_ruins";
			setarray .@xy[0],152,48;
			break;
		case 3:
			setarray .@mapname$[0],"Al De Baran.","aldebaran";
			setarray .@xy[0],168,112;
			break;
		case 4:
			setarray .@mapname$[0],"Geffen.","geffen";
			setarray .@xy[0],120,39;
			break;
		case 5:
			setarray .@mapname$[0],"Payon.","payon";
			setarray .@xy[0],161,58;
			break;
		case 6:
			setarray .@mapname$[0],"Lighthalzen.","lighthalzen";
			setarray .@xy[0],159,93;
			break;
		case 7:
			setarray .@mapname$[0],"Rachel.","rachel";
			setarray .@xy[0],115,124;
			break;
		}
		mes "You will be sent back to "+.@mapname$[0]+".";
		close2;
		warp .@mapname$[1],.@xy[0],.@xy[1];
		break;
	case 2:
		mes "[Teleporter]";
		mes "I'll be here whenever you're in need of my services.";
		close;
	}
	end;
}

-	script	Maroll Battle Recruiter::BatRecruit	728,{
	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.";
	mes "How would you like to lend your power to one of the princes in the Maroll Kingdom?";
	next;
	switch(select("Join:Don't Join")) {
	case 1:
		mes "[Maroll Battle Recruiter]";
		mes "May the war god bless you.";
		close2;
		getmapxy(.@mapname$,.@x,.@y,1);
		if (.@mapname$ == "prontera")
			set bat_return,1;
		else if (.@mapname$ == "moc_ruins")
			set bat_return,2;
		else if (.@mapname$ == "aldebaran")
			set bat_return,3;
		else if (.@mapname$ == "geffen")
			set bat_return,4;
		else if (.@mapname$ == "payon")
			set bat_return,5;
		else if (.@mapname$ == "lighthalzen")
			set bat_return,6;
		else if (.@mapname$ == "rachel")
			set bat_return,7;
		else
			set bat_return,1;
		warp "bat_room",154,150;
		break;
	case 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;
	}
	end;
}

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

// 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$;
}

// 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	45,1,1
bat_room,57,90,0	duplicate(warp2bat_room)	bat2	45,1,1
// Empty
bat_room,85,81,0	duplicate(warp2bat_room)	bat5	45,1,1
bat_room,85,90,0	duplicate(warp2bat_room)	bat6	45,1,1
// Empty
bat_room,85,220,0	duplicate(warp2bat_room)	bat7	45,1,1
bat_room,85,211,0	duplicate(warp2bat_room)	bat8	45,1,1
// Free BG
bat_room,113,81,0	duplicate(warp2bat_room)	bat9	45,1,1
bat_room,113,90,0	duplicate(warp2bat_room)	bat10	45,1,1
// Free BG
bat_room,141,81,0	duplicate(warp2bat_room)	bat13	45,1,1
bat_room,141,90,0	duplicate(warp2bat_room)	bat14	45,1,1
// Free BG
bat_room,141,220,0	duplicate(warp2bat_room)	bat15	45,1,1
bat_room,141,211,0	duplicate(warp2bat_room)	bat16	45,1,1
// Free BG
bat_room,169,81,0	duplicate(warp2bat_room)	bat17	45,1,1
bat_room,169,90,0	duplicate(warp2bat_room)	bat18	45,1,1
// Free BG
bat_room,197,81,0	duplicate(warp2bat_room)	bat21	45,1,1
bat_room,197,90,0	duplicate(warp2bat_room)	bat22	45,1,1
// Free BG
bat_room,225,81,0	duplicate(warp2bat_room)	bat25	45,1,1
bat_room,225,90,0	duplicate(warp2bat_room)	bat26	45,1,1
// Flavius bat_b01
bat_room,253,81,0	duplicate(warp2bat_room)	bat29	45,1,1
bat_room,253,90,0	duplicate(warp2bat_room)	bat30	45,1,1
// Empty
bat_room,253,220,0	duplicate(warp2bat_room)	bat31	45,1,1
bat_room,253,211,0	duplicate(warp2bat_room)	bat32	45,1,1

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

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

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

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

bat_room,160,150,3	script	Erundek	109,{
	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","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 4:
			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 Gorge.";
			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;
	}

	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;
}