-----------------------------------------------
function ߼ܳ縱()
--
	if ͼID() == 11102 then 							--
		("============߼ܳ縱==============================");
		----------------------------------------------------------------------------
		ýű("\\ܼӵ滻.txt");
		----------------------------------------------------------------------------
		ֽƷ(3);
		if Ʒ("ʷʫҩˮ") < 60 and װ() < 600  then
			ʼܴ();
			(14215.00,8324.00,4262.41,600,60,1);
			(20142.16,13417.78,4910.00,600,60,1);
			ܴ();
			if 귶Χ(20142.16,13417.78) < 100 then
				Ʒ("Magick Scholar Ethan",3, 200 - Ʒ("ʷʫҩˮ"));  	
			end;
		elseif װ() < 1302 and װ() >= 600 and (Ʒ("ʥҩˮ") +Ʒ("ʷʫҩˮ")+Ʒ("ףҩˮ")) < 60 then
			ʼܴ();
			(14215.00,8324.00,4262.41,600,60,1);
			(20142.16,13417.78,4910.00,600,60,1);
			ܴ();
			if 귶Χ(20142.16,13417.78) < 100 then
				Ʒ("Magick Scholar Ethan",6, 200 - Ʒ("ʥҩˮ"));  	
			end;
		elseif (Ʒ("ǹҩˮ") +Ʒ("ףҩˮ")+Ʒ("ʥҩˮ") +Ʒ("ʷʫҩˮ")) < 30 and װ() >= 1302  then	
			ʼܴ();
			(14215.00,8324.00,4262.41,600,60,1);
			(20142.16,13417.78,4910.00,600,60,1);
			ܴ();
			if 귶Χ(20142.16,13417.78) < 100 then
				Ʒ("Magick Scholar Ethan",9, 100 - Ʒ("ףҩˮ"));  	
			end;	
		elseif Ʒ(" : Ƭ") < 30 then				--Awakening: Chaos Shard
			ʼܴ();
			(14215.00,8324.00,4262.41,600,60,1);
			(19519.00,11881.00,4764.15,600,60,1);
			ܴ();
			if 귶Χ(19519.00,11881.00) < 100 then
				Ʒ("Marrain",1, 100 - Ʒ(" : Ƭ"));  	--
			end;		
		elseif װ־(0) < 8000 or װ־(1) < 1000 or װ־(2) < 1000 or װ־(3) < 1000 or װ־(4) < 1000 then
			ʼܴ();
			(19484.00,14576.00,4911.00,600,60,1);
			ܴ();
			if 귶Χ(19484.00,14576.00)<100 then
				ȫ("Winry");
			end;		
		else			
			--ʼܴ();
			--(14215.00,8324.00,4262.41,600,60,1);
			--(19247.00,13818.00,4924.87,600,60,1);
			--ܴ();
			--if 귶Χ(19247.00,13818.00)<100 then
				if Զƥ丱 == 1 then
					("볡 װ:"  ..װ());
					if װ() < 1302 then
						볡();					--
					--elseif װ() < 1100 then
					--	볡(9);				--Լ
					elseif װ() >= 1302  then		--1100
						볡(17)				--Ῠ
					end;				
				elseif Զƥ丱 ==  0 then
					볡();
				else
					볡(Զƥ丱);
					ʱ(3000);
				end;
			--end;		
		end;	
	else
		ýű("\\θܳ.txt");
	end;
	--
end;
---------------------------------------------------------------------
if ͼID()== 10691 or ͼID()== 10895 or ͼID()== 10893 or ͼID() == 10228 or  ----19
	ͼID()== 10463  or --49 (7860.00,5306.00,515.59,600,60);
	ͼID()== 10896 then --33   
	if ë() > 10 then
		(0)
	else
		(1)
	end;
elseif 	ͼID()== 10491 then --46˱	
	if (귶Χ(51260.46,-36927.46)<1000 or 귶Χ(33617.59,-16187.58)<1000) and ë() > 5 then
		(0);
	else
		(1);
	end;	
else
	(1);
end;
---------------------------------------------------------------------
(1,0,"");
---------------------------------------------------------------------
(0);		--0,رƶ ô600ֵƶ
(1,1000);    --0,رչ 1-
---------------------------------------------------------------------
--жǷ
ˢܳ	= 1;
Ƿ	= 0;
---------------------------------------------------------------------
if ȼ() >= 50 or ȼ()< 11  then
	if ȡɱ("Ƿ",1) == 1 then
		Ƿ = 1;
	elseif ɫ() > 1 or ǰɫ() > 1 then		
		дɱ("Ƿ",1,1);				--ʼʺ+ɱ־
		Ƿ = 1;
	end;
end;

if Ƿ == 0 then
	("============߿ʼ==============================");
	---------------------------------------------------------------------
	if ǰְҵ() == 0x65 then
		(3,"ն|Q,ͻϮ֮|W,ն|E,һ|R,չ|C");
	elseif ǰְҵ() == 0x66 then
		(3,"|A,ն|Q,ն|F,һ|R,ͻϮ֮|W,ն|E,ն|D,|S,չ|C");
	elseif ǰְҵ() == 0x67 then 
		(3,"ȫӻ|F,|W,|R,Ծ|D,ǿػ|A,ηս|E,|S,ػ|Q");	--,չ|C
	elseif ǰְҵ() == 0x12D then
		(3,"ǧ|R,׶|W,׹|E,׷|Q,չ|C");	
	elseif ǰְҵ() == 0x131 then 	 
		(3,"|Q,Ҳ|F,ն|R,|W,|S,ȿն|E,|D,һ|A");
	elseif ǰְҵ() == 0xCD	then		--Ů
		if ȼ() >= 28 and Ƿ(0x9182,3) == 1 then
			(3,"˪|A,ܻ|Q,|F,|R,׵|W,|E,ߵĺХ|D,|S,չ|C");	
		else
			(3,"ܻ|Q,Ǵ׷|F,ٻ|R,ͷ|W,ߵĺХ|S,׵|E,|D,|A,չ|C");			
		end;	
	end;
	ýű("\\ܼӵ.txt");
	---------------------------------------------------------------------
	ýű("\\Ѫ.txt");
	---------------------------------------------------------------------	
	if ȼ()<11 then
		ýű("\\ִս.txt");
	end;
	if  ȼ()>=10 and ȼ()<23 then
		ýű("\\10-20.txt");	
	end;
	if  ȼ()>=18 and ȼ() <33 then
		ýű("\\21-30.txt");	
	end;
	if  ȼ()>=28 and ȼ() <43 then	
		ýű("\\31-40.txt");	
	end;
	if  ȼ()>=38 and ȼ() <47 then
		ýű("\\41-45.txt");		
	end;
	if  ȼ()>=43 and ȼ() <55 and Ƿ("",0x10D0B3) == 0 and ȡɱ("Ƿ",1) == 0 then
		ýű("\\46-50.txt");
	elseif Ƿ("",0x10D0B3) == 1 then
		--The Sturmbrecher Launch һڱ 
		дɱ("Ƿ",1,1);
	end;	
elseif Ƿ == 1 and ȼ() >= 50 then
	("=====================Ƿ======================" ..Ƿ);
	if ǰְҵ() == 0xCD then
		(3,"˪|A,ܻ|Q,|F,|R,׵|W,|E,ߵĺХ|D,|S,չ|C");	

	else
		(3,"|W,ն|Q,ն|F,һ|R,ѵն|A,ն|E,ն|D,޽籩|S,չ|C");
	end;
	--ˢֱܳС
	-----------------------------------------------
	Զƥ丱 	= 1;						--0 ֻˢ1 1-Զƥ ֵ-ָ帱 (1-4) Ӱ(5-8)...
	-----------------------------------------------
	жϾֵ 		 = 0;	
	-----------------------------------------------
	ڲ 		 = 2;						--0 ˢܳԶӸڲ 1-ˢܳҲڲ 2-ڲܳɣ˳
	ܳ = 1;						--
	----------------------------------------------------------------------------
	жϵͼ(0);
	----------------------------------------------------------------------------
	(1);
	if װ() < 600 then
		(1,"ʷʫҩˮ",80);
		if Ʒ("ؼҩˮ") > 0 then
			(2,"ؼҩˮ",80);
		elseif Ʒ("ǿҩˮ")>0 then
			(2,"ǿҩˮ",70);
		else	
			(2,"",0);
		end;
	elseif װ() < 1302 and װ() >= 600 then
		(1,"ʥҩˮ",75);
		if Ʒ("ʷʫҩˮ") > 0 then
			(2,"ʷʫҩˮ",80);
		elseif Ʒ("ǿҩˮ")>0 then
			(2,"ǿҩˮ",70);
	elseif Ʒ("ףҩˮ")>0 then
		(2,"ףҩˮ",70);				
		else	
			(2,"",0);
		end;	
	elseif װ() >= 1302 then
		(1,"ǹҩˮ",70);
		if Ʒ("ʷʫҩˮ")>0 then
			(2,"ʷʫҩˮ",80);		
		elseif Ʒ("ǿҩˮ") > 0 then
			(2,"ǿҩˮ",80);
		elseif Ʒ("ʥҩˮ")>0 then
			(2,"ʥҩˮ",70);	
	elseif Ʒ("ףҩˮ")>0 then
		(2,"ףҩˮ",75);				
		else	
			(2,"",0);
		end;	
	end;
	(3,"",0);
	(4,"",0);	
	----------------------------------------------------------------------------
	if ͼID() == 10801 or ͼID() == 10813 then			--¬
		ݵ("ײ",0xDBD95);
		ʱ(1000);
	elseif ͼID() == 10804 then			--ײ
		ʼܴ();
		(5604.00,10202.00,256.00,600,60,1,0,1);
		(3564.00,12745.00,130.49,600,60,1,0,1);
		(2965.00,12838.00,-143.65,600,60,1);	
		ܴ();
		if 귶Χ(2965.00,12838.00) < 100 then
			ͼϴ("");  
		end;
	elseif ͼID() == 10805 then			--ȥᴬ	
		
	elseif ͼID() == 11111 or ͼID() == 11113 then
		ݵ("Ǻг㳡",0xDBFCE);
		ʱ(1000);
	elseif ǰɫ() == 1 and 	Ƿ("",0x10D0B3) == 1 and 
		ɫ() == 0 and 귶Χ(14535.00,14907.00)< 500 then
		½();		
	elseif ɫ() > 1 then
		("============ɫж ˢܳ==============================");	
		if ȡɱ("ǷһֱС",1) == 1 and ǰɫ() == 1 then
			дɱ("ǷһֱС",0,1);
		end;
		if ((ܵȼ(0x413C) == 0 and ǰְҵ() == 0x66) or (ܵȼ(0x91F0) == 0 and ǰְҵ() == 0xCD) or ͼID() == 10002) and ɫ() > 1  then	
			ýű("\\ѧѼ.txt");					
		elseif ǰɫ() == 2  and (귶Χ(23560.00,-33010.00) < 800) and ͼID() == 11102 then
			("========ֱŻװ==============================");
			ýű("\\ֱŻװ.txt");				
		elseif ˢܳ == 1 and Ʒ("North Vern Pass Equipment Chest") == 0  then
			if 	Ҫѡɫ() == 1 and ǰɫ() != 1 then				
				½(1);
			elseif 	Ҫѡɫ() == 2 and ǰɫ() != 2 then	
				½(2);
			elseif Ƿ("",0x47B761) == 1 then
				߼ܳ縱();
			elseif Ƿ("",0x47B762) == 1 then
				߼ܳ縱();
			elseif Ƿ("",0x47B763) == 1 then
				߼ܳ縱();
			elseif ״̬() == 1 and ͼID() == 11102 then
				if Ƿɽ(0x47B761) == 1 then
					(0x47B761);
					ʱ(1000);
				elseif Ƿɽ(0x47B762) == 1 then
					(0x47B762);
					ʱ(1000);		
				elseif Ƿɽ(0x47B763) == 1 then
					(0x47B763);
					ʱ(1000);
				elseif ͼID() == 11102 then
					("==========ǰɫ=============" ..ǰɫ());
					if ǰɫ() == 1 and Ҫѡɫ() == 1 then
						--һɫ
						뿪Ϸ(1);			--дɱ־¼ļ
						ʱ(2000);
					elseif ǰɫ() == 2 and Ҫѡɫ() == 2 then
						---
						ȡܳ();
						ȡܳ(1);
						ȡܳ(2);
						ȡܳ(3);
						ȡܳ(4);					
						if ȡɱ("ȡܳ",1) == 0 then
							ȡܳ();
							ȡܳ(1);
							ȡܳ(2);
							ȡܳ(3);
							ȡܳ(4);
							ʱ(2000);
							if Ʒ("Una's Token") >= 180 then
								дɱ("ȡܳ",1,1);
							else
								ȡܳ();
								ȡܳ(1);
								ȡܳ(2);
								ȡܳ(3);
								ȡܳ(4);
								ʱ(2000);
								дɱ("ȡܳ",1,1);								
							end;
						elseif Ʒ("Una's Token") >= 80 then
							ʼܴ();
							(4774.00,9393.00,4228.15,600,60,1);
							ܴ();
							if 귶Χ(4774.00,9393.00)< 100 then
								if Ʒ("Una's Token") >= 500 then
									Сݻ("Halmond",3);
								elseif Ʒ("Una's Token") >= 200 then
									Сݻ("Halmond",2);
								else
									Сݻ("Halmond");
								end;
								ʱ(1000);	
							end;
						elseif Ʒ("Hefty Gold Sack") > 0 or Ʒ("Small Safe") > 0 or 
							Ʒ("Large Gold Chest") > 0 or Ʒ("Thin Gold Bar") > 0 or 
							Ʒ("Thick Gold Chest") > 0 or Ʒ("Launch Commemoration Gold Coin") > 0 then	
							ʼܴ();
							(5212.00,9483.00,4226.00,600,60,1);
							ܴ();		--
							if 귶Χ(5212.00,9483.00)<100 then
								ʱ(1000);
								();						
								if Ʒ("Hefty Gold Sack") > 0 then
									ʹƷ("Hefty Gold Sack");
								elseif Ʒ("Small Safe") > 0 then
									ʹƷ("Small Safe");
								elseif Ʒ("Large Gold Chest") > 0 then
									ʹƷ("Large Gold Chest");
								elseif Ʒ("Thin Gold Bar") > 0 then	
									ʹƷ("Thin Gold Bar");	
								elseif Ʒ("Thick Gold Bar") > 0 then	
									ʹƷ("Thick Gold Bar");										
								elseif Ʒ("Launch Commemoration Gold Coin") > 0 then	
									ʹƷ("Launch Commemoration Gold Coin");								
								end;
								ʱ(1000);
								();
								ʱ(1000);
								();		
								ʱ(1000);
								();	
								ʱ(1000);
								();								
							end;
						else
							ǩ();
							ʼ("",1);
							ʱ(1000);
							();		
							ʱ(1000);
							();			
							뿪Ϸ(1);			--дɱ־¼ļ
						end;						
					end;
				end;
			elseif Ʒ("North Vern Pass Equipment Chest") == 0 then
				ýű("\\θܳ.txt");				
			end;
		end;	
	elseif 	ɫ() == 1 then		
		дɱ("ǷһֱС",1,1);
		("=============Сſʼֱ =========================");		
		if ͼID() == 10002 then
			ʼܴ();
			(12983.00,95.00,232.82,600,60,1);
			ܴ();		
			if 귶Χ(12983.00,95.00)<100 then
				ʹð("G")
				ʱ(2000);
			end;			
		elseif ǰɫ() == 1 and ɫ() == 1 then
			("=============ȡֱ=========================");
			--ǰɫΪ150ɫֻһ,ȥֱֱС
			if Ʒ("Vern Powerpass") > 0 then
				дɱ("Ƿֱ");
				ʹƷ("Vern Powerpass",2);
				ʱ(1000);					
			elseif ȼ() > 49 and ȡɱ("Ƿֱ") == 0 then			
				("=============ȡֱ=========================");
				ʼ();
			elseif ȡɱ("Ƿֱ") == 1  then	--and ɫ(2)>1
				("=============ɫֱ=========================");
				ɫֱ();
				ʱ(2000);				
			end;
		end;
		--
	elseif 	ɫ(1) > 1 and ǰɫ() == 1 then
		("=============ѽС ʼֱ=========================");
		if Ʒ("Vern Powerpass") > 0 then
			дɱ("Ƿֱ");
			ʹƷ("Vern Powerpass",2);
			ʱ(1000);
		elseif ȼ() > 49 and ȡɱ("Ƿֱ") == 0 then
			ʼ();
		elseif ȡɱ("Ƿֱ") == 1 then
			ɫֱ();
		end;
	end;
elseif Ƿ == 1 and ȼ() < 11 and ǰɫ() == 2  then
	("=============Сſʼֱ Ļ=========================");
	дɱ("ǷһֱС",1,1);
	-----------------------------------------------------------------
	if ͼID() ==10023 or ͼID() ==10021 then
		ðտʼ(1);
		ðտʼ(2);
		ðտʼ(3);
		ðտʼ(4);
		ðտʼ();			
	elseif Ƿ("",0x18E0D) == 1 then	
		if () == 1 then
			Ѱ·(10864.00,132.00,25.71);
		elseif () == 2 then
			Ѱ·(10864.00,132.00,25.71);
			ɼƷ();
			ʱ(3000);
			Ƿתְ = 0;
		elseif () == 3 then
			if 귶Χ(10864.00,132.00) < 30 and 귶Χ(11865.10,139.00) > 50 and Ƿתְ == 0 then
				if ǰְҵ() == 0xC9 then
					תְ(0xCD);
					ʱ(3000);
					Ƿתְ = 1;			
				else
					תְ();
					ʱ(3000);
					Ƿתְ = 1;
				end;	
			else
				if 귶Χ(11865.10,139.00) > 50 and 귶Χ(10864.00,132.00) < 30 and Ƿתְ == 1 then
					();
					ʱ(2000);	
					Ƿתְ = 2;				
				else
					Ѱ·(11865.10,139.00,14.89);
					if 귶Χ(11865.10,139.00)<50 then
						if ǰְҵ() == 0xC9 then
							תְ(0xCD);
						else
							תְ();
						end;
					end;							
					ʱ(1000);
				end;
			end;
		elseif () == 4 then
			Ѱ·(12689.00,157.00,232.82);		
			if 귶Χ(12689.00,157.00)<50 then
				("Beatrice");
				Ѱ·(13006.54,135.00,244.84);
				ɼƷ(300);			
			end;
		end;
	--To Forgotten Land ȥ	
	elseif Ƿ("",0x19F0A1) == 1 and ͼID() != 10200 then
		if ͼID() == 10008 then
			ðտʼ(1);
			ðտʼ(2);
			ðտʼ(3);
			ðտʼ(4);
			ðտʼ();		
		elseif () == 1 then
			Ѱ·(13006.54,135.00,244.84);
			if 귶Χ(13006.54,135.00)<50 and ͼID() != 10200  then
				ɼƷ(300);
			end;
		end;		
	elseif Ƿ("",0x19F231) == 1 then
		if () == 1 then
			if ͼID() == 10200 then
				("=================ðտʼ=====================");
				ʼѰ·();	
				Ѱ·(1411.00,2706.00,528.25);
				Ѱ·(1937.00,2452.00,532.00);
				Ѱ·(1937.00,2452.00,532.00);
				if 귶Χ(1937.00,2452.00)<100 then				
					ðտʼ(1);
					ðտʼ(2);
					ðտʼ(3);
					ðտʼ(4);
					ðտʼ();			
					ʱ(5000);
				end;
			end;
		end;
	end;
end;

---------------------------------------------------------------------
