//===========================================
// [ڤ] The PlutoEA Project []
// http://opensvn.csie.org/PlutoEA
// ------------------------------------------
// - ɿͧ ű -
// ------------------------------------------
// 汾 0.9
//================================================================
// 㷢ȷ¹ (ŵ -> ٸ -> ŵ -> ޿ -> ϣ -> ޿ -> ظ)
//================================================================

airplane,243,74,4	script	#AirshipWarp-1	45,2,2,{
OnTouch:
	if($@airplanelocation == 1)warp "einbroch",90,275;
	if($@airplanelocation == 2)warp "yuno",85,265;
	if($@airplanelocation == 3)warp "lighthalzen",302,75;
	if($@airplanelocation == 4)warp "hugel",182,150;
	end;

OnHide:
	misceffect 16;
	end;
OnUnhide:
	misceffect 215;
	end;
}

airplane,243,29,4	script	#AirshipWarp-2	45,2,2,{
OnTouch:
	if($@airplanelocation == 1)warp "einbroch",90,275;
	if($@airplanelocation == 2)warp "yuno",85,265;
	if($@airplanelocation == 3)warp "lighthalzen",302,75;
	if($@airplanelocation == 4)warp "hugel",182,150;
	end;

OnHide:
	misceffect 16;
	end;
OnUnhide:
	misceffect 215;
	end;
}

airplane,1,1,0	script	EinYuno_Airship	-1,{
OnInit:
while(1)
{
	initnpctimer;
	setnpctimer 0;
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","ɿͧҪˣһĿǻٸ",1,0xBA55D3;
	end;
OnTimer15000:
	mapannounce "airplane","Ŀǰɿͧٸ;",1,0xBA55D3;
	end;
OnTimer30000:
	mapannounce "airplane","һ·ɿͧҪڻٸ",1,0xBA55D3;
	end;
OnTimer40000:
	set $@airplanelocation,4;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";	
	mapannounce "airplane","Ѿٸˣ»ÿٻ",1,0xBA55D3;
	end;
OnTimer50000:
	mapannounce "airplane","ĿǰͣڻٸУһ¼Ҫ",1,0xBA55D3;
	end;
OnTimer60000:
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","ɿͧҪˣһĿŵ",1,0x00FF00;
	end;
OnTimer75000:
	mapannounce "airplane","Ŀǰɿͧŵ;",1,0x00FF00;
	end;
OnTimer90000:
	mapannounce "airplane","һ·ɿͧҪŵ",1,0x00FF00;
	end;
OnTimer100000:
	set $@airplanelocation,2;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";
	mapannounce "airplane","Ѿŵˣ»ÿٻ",1,0x00FF00;
	end;
OnTimer110000:
	mapannounce "airplane","ĿǰͣŵУһ¼Ҫ",1,0x00FF00;
	end;
OnTimer120000:
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","ɿͧҪˣһĿǰ޿",1,0xFF8600;
	end;
OnTimer135000:
	mapannounce "airplane","Ŀǰɿͧ޿;",1,0xFF8600;
	end;
OnTimer150000:
	mapannounce "airplane","һ·ɿͧҪڰ޿",1,0xFF8600;
	end;
OnTimer160000:
	set $@airplanelocation,1;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";
	mapannounce "airplane","Ѿﰬ޿ˣ»ÿٻ",1,0xFF8600;
	end;
OnTimer170000:
	mapannounce "airplane","Ŀǰͣڰ޿Уһ¼Ҫ",1,0xFF8600;
	end;
OnTimer180000:
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","ɿͧҪˣһĿϣ",1,0x70DBDB;
	end;
OnTimer195000:
	mapannounce "airplane","Ŀǰɿͧϣ;",1,0x70DBDB;
	end;
OnTimer210000:
	mapannounce "airplane","һ·ɿͧҪϣ",1,0x70DBDB;
	end;
OnTimer220000:
	set $@airplanelocation,3;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";
	mapannounce "airplane","Ѿϣˣ»ÿٻ",1,0x70DBDB;
	end;
OnTimer230000:
	mapannounce "airplane","ĿǰͣϣУһ¼Ҫ",1,0x70DBDB;
	end;

OnTimer240000:
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","ɿͧҪˣһĿǰ޿",1,0x00FF00;
	end;
OnTimer255000:
	mapannounce "airplane","Ŀǰɿͧ޿;",1,0x00FF00;
	end;
OnTimer270000:
	mapannounce "airplane","һ·ɿͧҪڰ޿",1,0x00FF00;
	end;
OnTimer280000:
	set $@airplanelocation,1;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";
	mapannounce "airplane","Ѿﰬ޿ˣ»ÿٻ",1,0x00FF00;
	end;
OnTimer290000:
	mapannounce "airplane","Ŀǰͣڰ޿Уһ¼Ҫ",1,0x00FF00;
	end;
OnTimer300000:
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","ɿͧҪˣһĿŵ",1,0xFF8600;
	end;
OnTimer315000:
	mapannounce "airplane","Ŀǰɿͧŵ;",1,0xFF8600;
	end;
OnTimer330000:
	mapannounce "airplane","һ·ɿͧҪŵ",1,0xFF8600;
	end;
OnTimer340000:
	set $@airplanelocation,2;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";
	mapannounce "airplane","Ѿŵˣ»ÿٻ",1,0xFF8600;
	end;
OnTimer350000:
	mapannounce "airplane","ĿǰͣŵУһ¼Ҫ",1,0xFF8600;
	end;
OnTimer360000:
	stopnpctimer;
}
}

//============================================================ 
//= Some normal NPCS (airplane)
//============================================================ 

airplane,240,64,5	script	#01::Exit2	857,{

end;

}

airplane,247,64,5	duplicate(Exit2)	#02	857

airplane,240,39,1	duplicate(Exit2)	#03	857

airplane,247,39,1	duplicate(Exit2)	#04	857

airplane,100,69,2	script	Ա#01::Airship Crew	852,{

	mes "[Ա]";
	mes "ҪڷɿͧĻ,õϲ¥,л˷ɿͧ,";
	mes "ףиһ!";
	close;

}

airplane,250,58,3	script	ɿͧ Ա::AirshipInfo	67,{

	mes "[ɿͧ Ա]";
	mes ", Ƿɿͧʱᾡܵṩ˿ͱʵз, Ҫæ?";
	next;
	switch (select("÷ɿͧķ:ҵλ:ڲʩ:ȡ")) {
	case 1:
		mes "[ɿͧ Ա]";
		mes "˷ɿͧĿĵصĻ, ڹ㲥֪ͨĿĵغ, ĳ»";
		next;
		mes "[ɿͧ Ա]";
		mes "һ»ʱĻ, ڷɿͧһֱѭе, ȵһʱ»";
		close;
	case 2:
		mes "[ɿͧ Ա]";
		mes "λڷɿͧǰ, ָӷɿͧĴͼʻĶƶ, Ϊ˺ܺ, һҪ";
		close;
	case 3:
		mes "[ɿͧ Ա]";
		mes "Ϊ˱ÿ;ие, ڷɿͧڲ׼СϷ, ;ͶʱԵϢĿռ, ";
		close;

	case 4:
		mes "[ɿͧ Ա]";
		mes "ף;ƽ";
		close;
	}
}

airplane,50,66,5	script	::AirshipApples	86,{
	mes "[]";
	mes "ӭ٣зʵƻեƻ֭ķ~";
	next;
	switch (select("Ҫƻ:Ҫƻեƻ֭:ȡ")) {
	case 1:
		mes "[]";
		mes "Ҫƻƻÿ15ңһ500";
		mes "Ҫȡʱ0";
		next;
		input @tempapple;
		if(!@tempapple) break;
		if(@tempapple > 0 && @tempapple < 501) {
			mes "[]";
			mes "Ҫƻ ^FF0000" + @tempapple + "^000000";
			mes "Ҫ֧Ľ ^FF0000" + @tempapple * 15 + "Zeny^000000";
			mes "ȷҪ?";
			next;
			if (select("ǵ:")==2) break;
			if(zeny < (@tempapple * 15)) {
				mes "[]";
				mes "Ǻ~ ˣǮ!";
				close;
			}
			mes "[]";
			mes "ллҪƻĻӭ";
			getitem 512,@tempapple;
			set zeny,zeny - (@tempapple * 15);
			close;
		}
		if(@tempapple < 0)close;
		mes "[]";
		mes "ˣ";
		close;
	case 2:
		mes "[]";
		mes "ƻ֭Ҫ ^FF0000ƻ3źͿƿ1^000000ЩϽ";
		mes "ҾˣҪեƻ֭?";
		next;
		if (select("ǵ:Ҫ")==2) break;
		if(countitem(512) < 3 || !countitem(713)) {
			mes "[]";
			mes "ӵеĲϺ񲻹أٸһɣҪƻ3źͿƿ 1ЩϽҾˣѼϺҰ";
			close;
		}
		mes "[]";
		mes "Thank you,";
		mes "please wait";
		mes "just a moment.";
		next;
		mes "*Grind grind*";
		mes "*Grind grind*";
		mes "*Clang...!*";
		next;
		mes "[]";
		mes "There you go~";
		mes "I hope you enjoy!";
		mes "Please feel free to";
		mes "stop by for your Apple";
		mes "and Apple Juice needs";
		mes "at anytime, adventurer~";
		delitem 512,3;
		delitem 713,1;
		getitem 531,1;
		close;
	case 3:
	}
	mes "[]";
	mes "ӭ´ࡣݰ݆~";
	close;
}

airplane,80,71,4	script		834,{
	mes "[]";
	mes "Ϊ˴̻̤;, ͸̻ʹ¬--׵¼ȫŽĻ, ";
	close;
}

airplane,65,63,4	script	Ů#air	714,{
	mes "[Ů]";
	mes "ҷɿͧеǰ? ҵϰ춼ûｪǵĹ㲥...";
	close;
}

airplane,72,34,6	script	Ŭ˾	702,{
	mes "[Ŭ˾]";
	mes "ڿпľɫǳƯ, 㰿ոö";
	close;
}

airplane,32,61,4	script	Լ ::TypingContest	49,{
	callfunc "F_ClearGarbage"; //Clear outdated, unused variables
loopback:
	mes "[Լ ]";
	mes "ս^FF0000Ϸ^000000֮Լ ϣҪæ?";
	next;
	menu "ս^FF0000Ϸ^000000",s_Play,"Ҫ^FF0000Ϸ^000000˵",s_Info,"Ҫаļ¼",s_Record,"ȡ",-;

	mes "[Լ ]";
	mes "᲻ֻһζѣս^0000FFϷ^000000Ļӭʱ!";
	close;

s_Play:
	mes "[Լ ]";
	mes "Ҫѡս^FF0000Ϸ^000000ʾʱڣȷɣôҪʼ";
	next;
	//below arrays are for simplified entering of new lines ;P

	//first lines array
	setarray $@textstringsa$[0],
	"^00FFFFthkelfkskeldmsiejdlsle^0000FFhfndkelsheidl",
	"^993366hfjdkeldjsieldjs^663366hfjdjeiskdlefvbd",
	"^00FFFFCoboman no chikara-yumei na",
	"^993366belief love luck grimace sweat rush",
	"^00FFFFcallipygian salacious lascivious",
	"^663366uNflAPPaBLe LoVaBLe SeCreTs AnD",
	"^00CCFFburrdingdingdilidingdingphoohudaamb",
	"^FF33CCbarapaphurarlandreamduranbatuhi^990066wooi",
	"^FF33CCLiGhTsPeEd RiGhT SPEed leFT TURn",
	"^00CCFFI'm the King of all Weirdos! Now",
	"^00CCFFBy the power of^000000",
	"^00CCFF...silence. quiet benevolence...";

	//second lines array
	setarray $@textstringsb$[0],"skemd",
	"",
	"chikara-dalookii na chikara da ze!",
	"folktale rodimus optimus bumblebee",
	"licentious prurient concupiscent",
	"BoWLiNg aGaINST tHe KarMA of YoUtH",
	"andoora^0000FFbambarambambamburanbamding",
	"kabamturubamdingding",
	"RiGhT BuRn OrIGInAL GaNgSteR SmACk",
	"you know of my true power. Obey~!",
	"p-po-poi-po-poi-poin-poing",
	"soul mate... wonder. enigma...";
	//for the few 3-liners... =X

	setarray $@textstringsc$[0],"",
	"",
	"COBO ON!",
	"",
	"",
	"",
	"",
	"",
	"",
	"",
	"GOD-POING. I NEVER LOSE!",
	"cloud.";

	//comparisation strings
	setarray $@compstring$[0],
	"thkelfkskeldmsiejdlslehfndkelsheidlskemd",
	"hfjdkeldjsieldjshfjdjeiskdlefvbd",
	"Coboman no chikara-yumei na chikara-dalookii na chikara da ze! COBO ON!",
	"belief love luck grimace sweat rush folktale rodimus optimus bumblebee",
	"callipygian salacious lascivious licentious prurient concupiscent",
	"uNflAPPaBLe LoVaBLe SeCreTs AnD BoWLiNg aGaINST tHe KarMA of YoUtH",
	"burrdindingdilidingdingphoohudaambandoorabambarambambamburanbamding",
	"barapaphurarlandreamduranbatuhiwooikabamturubamdingding",
	"LiGhTsPeEd RiGhT SPEed leFT TURn RiGhT BuRn OrIGInAL GaNgSteR SmACk",
	"I'm the King of all Weirdos! Now you know of my true power. Obey~!",
	"By the power of p-po-poi-po-poi-poin-poing GOD-POING. I NEVER LOSE!",
	"...silence. quiet benevolence... soul mate... wonder. enigma... cloud";

	//lengths
	setarray $@lengths[0],20,32,73,73,65,66,67,55,67,66,67,69;

	//	initnpctimer;
	// pick 2 distinct phrases and initialize related variables
	set @index,rand(1,getarraysize($@textstringsa$))-1;
	set @string1a$,$@textstringsa$[@index];
	set @string1b$,$@textstringsb$[@index];
	set @string1c$,$@textstringsc$[@index];
	set @typingstring1$,$@compstring$[@index];

	set @index2,rand(1,getarraysize($@textstringsa$))-1;
	while (@index2 == @index) {
		set @index2,rand(1,getarraysize($@textstringsa$))-1;
	}
	set @string2a$,$@textstringsa$[@index2];
	set @string2b$,$@textstringsb$[@index2];
	set @string2c$,$@textstringsc$[@index2];
	set @typingstring2$,$@compstring$[@index2];

	set @typingkeys,$@lengths[@index]+$@lengths[@index2];
	set @start,gettime(3)*60*60+gettime(2)*60+gettime(1);

	mes "[Nils]";
	mes @string1a$;
	if(@string1b$ != "")mes @string1b$;
	if(@string1c$ != "")mes @string1c$;
	input @comparisonvar$[1];
	next;
	mes "^000000[Nils]";
	mes @string2a$;
	if(@string2b$ != "")mes @string2b$;
	if(@string2c$ != "")mes @string2c$;
	input @comparisonvar$[2];
	if(@comparisonvar$[1] == @typingstring1$ && @comparisonvar$[2] == @typingstring2$)set @typingcorrect,1;
	next;
	if(!@typingcorrect)goto s_Fail;
	set @time,(gettime(3)*60*60+gettime(2)*60+gettime(1))-@start; //seconds taken
	set @mypoints,(@typingkeys * 100) / @time;
	mes "[Nils]";
	mes "Your typing time";
	mes "was ^FF0000" + @time + " seconds^000000";
	mes "and your score is";
	mes "^0000FF" + @mypoints + "^000000 points";
	next;
	if(@mypoints <= $TypingRecord)goto loopback;
	mes "[Nils]";
	mes "Congratulations!";
	mes "It's a new record.";
	mes "I'll put you on the high-";
	mes "score list immediately.";
	set $TypingRecord,@mypoints;
	set $TypingRecord$,strcharinfo(0);
	close;

s_Fail:
	mes "^000000[Nils]";
	mes "I'm sorry you didn't type";
	mes "all characters correctly.";
	mes "But remember, practice makes";
	mes "perfect!";
	close;

s_Info:
	mes "[Լ ]";
	mes "^0000FFϷ^000000ǰʾ£ȷѸٵĴϷǻɵ֮ʱ¼Լٶĵˣӭս!";
	close;

s_Record:
	mes "[Լ ]";
	mes "Ŀǰ߼¼";
	mes "^0000FF" + $TypingRecord$ + "^000000/Сµ";
	mes "^0000FF" + $TypingRecord + "^000000ļ¼";
	close;

}

airplane_01,221,158,6	script	Pilot#air-0::Pilot	852,{
	set .@pilot, rand(1,4);
	if (.@pilot == 1) {
		mes "[]";
		mes "Ŀǰ·Ƕ131ȣγ37ȣ";
		mes "һ!";
	} else if(.@pilot == 2) {
		mes "[]";
		mes "ǶƵ";
		mes "Ҫ·..";
	} else if(.@pilot == 3) {
		mes "[]";
		mes "Ըܹɣ";
		mes "ÿζǴԱƨɣ";
		mes "첻֪Ҫʲô ..";
		mes "..";
		next;
		mes "[^FF0000½^000000]";
		mes "^FF0000ι!! ֻģȥ!";
		mes "!^000000";
		next;
		mes "[]";
		mes "~ ~ ֪";
	}
	else
	{
		mes "[]";
		mes "...ƷǺ˧ֻ̫...";
		mes "Ҳ˽";
		mes "ֻڿ㹤?";
		next;
		mes "[]";
		mes ".......";
		next;
		//emotion 23;
		mes "[]";
		mes "!? ˭?!";
	}
	close;
}

//============================================================ 
//=  (ŵ -> ˹³õ ->  -> ظ)
//============================================================ 

airplane_01,243,74,4	script	#AirshipWarp-3	45,2,2,{
OnTouch:
	if($@airplanelocation2 == 1)warp "izlude",202,56;
	if($@airplanelocation2 == 2)warp "yuno",20,265;
	if($@airplanelocation2 == 3)warp "ra_fild12",292,204;
	end;

OnHide:
	misceffect 16;
	end;
OnUnhide:
	misceffect 215;
	end;
}

airplane_01,243,29,4	script	#AirshipWarp-4	45,2,2,{
OnTouch:
	if($@airplanelocation2 == 1)warp "izlude",202,56;
	if($@airplanelocation2 == 2)warp "yuno",20,265;
	if($@airplanelocation2 == 3)warp "ra_fild12",292,204;
	end;

OnHide:
	misceffect 16;
	end;
OnUnhide:
	misceffect 215;
	end;
}

airplane_01,1,1,0	script	YunoIzl_Airship	-1,{
OnInit:
while(1)
{
	initnpctimer;
	setnpctimer 0;
	set $@airplanelocation2,0;
	donpcevent "#AirshipWarp-3::OnHide";
	donpcevent "#AirshipWarp-4::OnHide";
	disablenpc "#AirshipWarp-3";
	disablenpc "#AirshipWarp-4";
	mapannounce "airplane_01","ɿͧҪˣһĿĵ˹³õ",1,0x00FF00;
	end;
OnTimer15000:
	mapannounce "airplane_01","Ŀǰɿͧ˹³õ;",1,0x00FF00;
	end;
OnTimer30000:
	mapannounce "airplane_01","һ·ɿͧҪ˹³õ",1,0x00FF00;
	end;
OnTimer45000:
	set $@airplanelocation2,1;
	enablenpc "#AirshipWarp-3";
	enablenpc "#AirshipWarp-4";
	donpcevent "#AirshipWarp-3::OnUnhide";
	donpcevent "#AirshipWarp-4::OnUnhide";	
	mapannounce "airplane_01","Ѿ˹³õ»ÿٻ",1,0x00FF00;
	end;
OnTimer55000:
	mapannounce "airplane_01","Ŀǰͣ˹³õУһ¼Ҫ",1,0x00FF00;
	end;
OnTimer65000:
	set $@airplanelocation2,0;
	donpcevent "#AirshipWarp-3::OnHide";
	donpcevent "#AirshipWarp-4::OnHide";
	disablenpc "#AirshipWarp-3";
	disablenpc "#AirshipWarp-4";
	mapannounce "airplane_01","ͧҪˣһĿĵŵ",1,0x70DBDB;
	end;
OnTimer80000:
	mapannounce "airplane_01","Ŀǰɿͧŵ;",1,0x70DBDB;
	end;
OnTimer95000:
	mapannounce "airplane_01","һ·ɿͧҪŵ",1,0x70DBDB;
	end;
OnTimer110000:
	set $@airplanelocation2,2;
	enablenpc "#AirshipWarp-3";
	enablenpc "#AirshipWarp-4";
	donpcevent "#AirshipWarp-3::OnUnhide";
	donpcevent "#AirshipWarp-4::OnUnhide";
	mapannounce "airplane_01","Ѿŵ»ÿٻ",1,0x70DBDB;
	end;
OnTimer120000:
	mapannounce "airplane_01","ĿǰͣŵУһ¼Ҫ",1,0x70DBDB;
	end;
OnTimer130000:
	set $@airplanelocation2,0;
	donpcevent "#AirshipWarp-3::OnHide";
	donpcevent "#AirshipWarp-4::OnHide";
	disablenpc "#AirshipWarp-3";
	disablenpc "#AirshipWarp-4";
	mapannounce "airplane_01","ɿͧҪˣһĿ",1,0xFF8600;
	end;
OnTimer145000:
	mapannounce "airplane_01","Ŀǰɿͧ",1,0xFF8600;
	end;
OnTimer160000:
	mapannounce "airplane_01","һ·ɿͧҪ",1,0xFF8600;
	end;
OnTimer175000:
	set $@airplanelocation2,3;
	enablenpc "#AirshipWarp-3";
	enablenpc "#AirshipWarp-4";
	donpcevent "#AirshipWarp-3::OnUnhide";
	donpcevent "#AirshipWarp-4::OnUnhide";
	mapannounce "airplane_01","Ѿˣ»ÿٻ",1,0xFF8600;
	end;
OnTimer185000:
	mapannounce "airplane_01","ĿǰͣУһ¼",1,0xFF8600;
	end;
OnTimer195000:
 	stopnpctimer;
}
OnReturn:
	killmonsterall "airplane_01";
	set $@mobinv, 0;
	mapannounce "airplane_01","ڹ㲥 : ħǺѾȥ, ظ",1,0x00FF00;
	startnpctimer;
	end;
}

//============================================================ 
//= Some normal NPCS (airplane_01)
//============================================================ 

airplane_01,240,64,5	duplicate(Exit2)	#05	857

airplane_01,247,64,5	duplicate(Exit2)	#06	857

airplane_01,240,39,1	duplicate(Exit2)	#07	857

airplane_01,247,39,1	duplicate(Exit2)	#08	857

airplane_01,100,69,2	duplicate(Airship Crew)	Ա#02	852

airplane_01,250,59,3	duplicate(AirshipInfo)	ɿͧ Ա#info	67

airplane_01,50,66,4	duplicate(AirshipApples)		86

airplane_01,32,61,4	duplicate(TypingContest)	Լ 	49

airplane_01,221,158,6	duplicate(Pilot)	Pilot#air-1	852


airplane_01,83,61,2	script	 Ů#10	72,{

	mes "[ Ů]";
	mes ".......";
	mes "Ҵʱ, ֻ¹ͻȻװͰ͵, .. ";
	close;
OnTouch:
	Emotion 28, "Dianne";
	end;
}

airplane_01,69,63,2	script	ʿ#06	55,{

	mes "[ʿ]";
	mes "ɿͧṩĲǲҵĿζ, ɫζ, ӦôҵרóʦŶ...";
	close;

}

airplane_01,33,68,4	script	˿	74,{
	mes "[˿]";
	mes "ҵֽп˿һֱڷ";
	mes "ͧеİɣҪҪɵ";
	mes "һϷ?";
	next;
	callfunc "applegamble","˿";
	end;
}

airplane_01,71,31,6	script	ʿ	106,{
	mes "[ʿ]";
	mes "Finally, after five";
	mes "years of waiting...";
	mes "I can have my revenge!";
	next;
	mes "[ʿ]";
	mes "I just...";
	mes "Have to make sure that";
	mes "I don't keep missing my";
	mes "stop. But soon, very soon,";
	mes "vengeance will be mine!";
	close;
}

//============================================================ 
//= ˹³õ  ְԱ
//============================================================

izlude.gat,206,55,3	script	 ְԱ#izl	90,{
	mes "[ ְԱ]";
	mes "ãǺʱṩ˿ͱ";
	mes "ʵз񣬻ᾡܵģ";
	mes "Ҫæ?";
	next;
	switch(select("Ҫ˷ŵ/յķɿͧ","ȡ")) {
		case 1:
			mes "[ ְԱ]";
			mes "÷ɿͧķΪ1200ң";
			mes "зɿͧѴȯĻѽ";
			mes "Ҫڲ?";
			next;
			switch(select("ǵ","Ҫ")) {
				case 1:
					if(countitem(7311) > 0) {
						delitem 7311,1;
						warp "airplane_01.gat",244,58;
						close;
					}
					if(Zeny < 1200) {
						mes "[ ְԱ]";
						mes "Ҫ1200Ҳܽ룬еĽҺ񲻹Ү";
						close;
					}
						set Zeny, Zeny - 1200;
						warp "airplane_01.gat",244,58;
						close;
				case 2:
					mes "[ ְԱ]";
					mes "´ðɣлл";
					close;
			}
		case 2:
			mes "[ ְԱ]";
			mes "´ðɣлл";
			close;
	}
}

//============================================================ 
//= ٸ ǻ
//============================================================

hugel.gat,178,142,0	script	hugelwarp	45,1,1,{
	mes "÷ɿͧķ1200ң";
	mes "зɿͧѴȯĻѽ";
	mes "Ҫ?";
	next;
	if(select("ǵ","Ҫ")==2) {
	mes "ӭ´лл";
	close;
	}
	if(countitem(7311))
	delitem 7311,1;
	else if(Zeny<1200) {
	mes "Ҫ1200Ҳܽ룬";
	mes "еĽҲ";
	close;
	}
	else
	set Zeny,Zeny-1200;
	warp "airplane.gat",244,58;
	end;
}

//============================================================ 
//=  ǻ
//============================================================

ra_fild12.gat,295,208,0	script	rachelwarp	45,1,1,{
	mes "÷ɿͧķ1200ң";
	mes "зɿͧѴȯĻѽ";
	mes "Ҫ?";
	next;
	if(select("ǵ","Ҫ")==2) {
	mes "ӭ´лл";
	close;
	}
	if(countitem(7311))
	delitem 7311,1;
	else if(Zeny<1200) {
	mes "Ҫ1200Ҳܽ룬";
	mes "еĽҲ";
	close;
	}
	else
	set Zeny,Zeny-1200;
	warp "airplane_01.gat",245,60;
	end;
}

//============================================================ 
//= ŵǻͨNPC
//============================================================

y_airport.gat,145,63,5	script	 ְԱ#Ein	91,{
	mes "[ ְԱ]";
	mes "Ҫʹ÷㷢ȷڵķɿͧ";
	mes "?";
	next;
	switch(select("ǵ","Ҫ")) {
		case 1:
			warp "yuno.gat",59,244;
			end;
		case 2:
			mes "[ ְԱ]";
			mes "ףһ";
			close;
	}
}

y_airport.gat,140,63,5	script	 ְԱ#Izl	91,{

	mes "[ ְԱ]";
	mes "Ҫʹ÷ŵ/˹³õ/";
	mes "ķɿͧ?";
	next;
	switch(select("ǵ","Ҫ")) {
		case 1:
			warp "yuno.gat",47,244;
			end;
		case 2:
			mes "[ ְԱ]";
			mes "ףһ";
			close;
	}

}

yuno,14,262,5	script	ɿͧ ְԱ#yuno01::ɿͧ ְԱ	91,{
	mes "[ɿͧ ְԱ]";
	mes ",";
	mes "Ƿɿͧʱᾡܵṩ˿";
	mes "ʵз,";
	mes "Ҫ˷ɿͧŽ,";
	mes "Ҫ뿪ýȥͿ";
	close;
}

yuno,87,263,3	duplicate(ɿͧ ְԱ)	ɿͧ ְԱ#yuno02	91

//============================================================ 
//= Apple Gambling Function
//============================================================

function	script	applegamble	{
	switch(select("Ҫһ:˽ϷĹ:ȡ")){
	case 3:
		mes "["+getarg(0)+"]";
		mes "ϷĻʱҰɣ";
		mes "﷢Ҳĵģôټ";
		close;
	case 2:
		mes "["+getarg(0)+"]";
		mes "ӵϷʵ";
		mes "򵥣ȿʼϷʱע5";
		mes "0ƻȻûƻͲܲ";
		mes "Ϸ";
		next;
		mes "["+getarg(0)+"]";
		mes "ƻעθӣ";
		mes "ĺϼƵһʤȻ";
		mes "ϷһζɽͲ棬߸";
		mes "һΣΣӵĻ";
		next;
		mes "["+getarg(0)+"]";
		mes "ҪҪһǸ˵ɰ";
		mes "һһӺ󣬵12ʱ";
		mes "ɳһΪ";
		next;
		mes "["+getarg(0)+"]";
		mes "ѡʱ";
		mes "ĵ12㣬ʹҲ";
		mes "Ҳʤ";
		next;
		mes "["+getarg(0)+"]";
		mes "Ϸʤһȫӵ˫";
		mes "һעƻ˵Ѿ";
		mes "˰";
		close;
	case 1:
		break;
	}
	mes "["+getarg(0)+"]";
	mes "ҪϷҪƻ";
	mes "Ҫ¶ٸƻĶע?";
	mes "һµ50ţҪȡϷ0";
	next;
L_Input:
	input @amount;
	if(@amount == 0) {
		mes "["+getarg(0)+"]";
		mes "ı↪´ʱɣټ";
		close;
	}
	if(@amount > 50) {
		mes "["+getarg(0)+"]";
		mes "50";
		mes "ûŪ";
		next;
		goto L_Input;
	}
	mes "["+getarg(0)+"]";
	mes "Ķע ^FF0000" +@amount+ "^000000";
	mes "??";
	next;
	if(select("ǵ:")==2){
		mes "["+getarg(0)+"]";
		mes "";
		next;
		goto L_Input;
	}
	if(countitem(512)<@amount){
		//more apples then in inventory
		//-Improvised-
		mes "["+getarg(0)+"]";
		mes "ƻ !";
		mes "ļ?";
		close;
	}
	delitem 512,@amount;
	mes "["+getarg(0)+"]";
	mes "ð,ǾͿʼϷ,";
	mes "";
	next;
	mes "- ˹¶¶...˹...ͣ -";
	set @table1,rand(1,6);
	set @table2,rand(1,6);
	set @tablesub,@table1+@table2;
	next;
	mes "ӵ ^0000FF"+@table1+"^000000  ^0000FF"+@table2+"^000000?";
	mes "ϼ ^0000FF"+@tablesub+"^000000 ";
	mes "^FF0000" +strcharinfo(0)+ "^000000/Сӆ";
	next;
	menu "Lucky Ball Go!",-;

	mes "˹¶¶...˹...ͣ";
	set @player1,rand(1,6);
	set @player2,rand(1,6);
	set @playersub,@player1+@player2;
	next;
	mes "["+getarg(0)+"]";
	mes "^FF0000"+strcharinfo(0)+"^000000/Сӵ";
	mes "^FF0000"+@player1+"^000000^FF0000"+@player2+"^000000";
	mes "ϼ^FF0000"+@playersub+"^000000!";
	next;
	mes "["+getarg(0)+"]";
	mes "ҵ^0000FF"+@tablesub+"^000000";
	mes "^FF0000" +strcharinfo(0)+ "^000000^FF0000"+@playersub+"^000000";
	if(@playersub == @tablesub) {
		mes "ͬ?";
		mes "һ?";
	} else if(@playersub > @tablesub) {
		mes "^FF0000"+getarg(0)+"^000000???";
		mes "!";
		mes "һ?";
	} else if(@tablesub > @playersub) {
		mes "!";
		mes "һ?";
	}
	next;
	if(select("õ:")==2){
		mes "["+getarg(0)+"]";
		mes "Not gonna roll, huh?";
		if(@tablesub == @playersub) {
			mes "Ҳðŷ";
			mes "ڵ״Ҳһ";
			mes "Ǿ͵ƽְ´һѰ";
			next;
			goto L_Table3;
		} else if(@tablesub < @playersub) {
			next;
			mes "["+getarg(0)+"]";
			mes "Alright, I see that you";
			mes "don't want to risk rolling";
			mes "higher than 12 and busting.";
			mes "I'll go ahead and roll then.";
			next;
			goto L_Table3;
		} else if(@tablesub > @playersub) {
		//you have a lower sub total then table, and do not roll 3th -Improvised-
			mes "["+getarg(0)+"]";
			mes "Not gonna roll, huh?";
			mes "Well, then I'm not";
			mes "gonna roll either.";
			next;
			mes "["+getarg(0)+"]";
			mes "That means that I";
			mes "have a total of ^0000FF"+@tablesub+"^000000";
			mes "wich beats your ^FF0000"+@playersub+"^000000.";
			mes "I'm sorry, but you lose";
			mes "this game, "+strcharinfo(0)+". Better";
			mes "luck next time.";
		}
		close;
	}
	mes "˹.....˹..˹..ͣ!";
	set @player3,rand(1,6);
	set @playersub,@playersub+@player3;
	if(@playersub > 12) {
	//player bust --Improvised--
		next;
		mes "["+getarg(0)+"]";
		mes "^FF0000"+strcharinfo(0)+"^000000/Сӵ";
		mes "^FF0000"+@player3+"^000000";
		mes "ϼ^FF0000"+@playersub+"^000000";
		mes "ܼƳԽ 12 ";
		mes "ʧ!";
		mes "ڰ!";
		close;
	}
	next;
	mes "["+getarg(0)+"]";
	mes "Oh hey! You rolled";
	if(@playersub >= @tablesub) {
		mes "a ^FF0000"+@player3+"^000000, giving you a total";
		mes "of ^FF0000"+@playersub+"^000000. Now, if I don't";
		mes "roll, I'll lose for sure!";
		mes "I'm gonna go for it...";
		next;
		goto L_Table3;
	} else if(@playersub < @tablesub) {
		//player's sub together with 3th die is still too low
		//--Improvised--
		mes "ҵ!";
		mes "ʧ!";
		close;
	}
L_Table3:
	mes "^0000FF*Rolling and rumbling*";
	set @table3,rand(1,6);
	set @tablesub,@tablesub+@table3;
	next;
	if(@tablesub > 12) {
		mes "["+getarg(0)+"]";
		mes "Eh? I rolled a ^0000FF"+@table3+"^000000, making";
		mes "my total ^0000FF"+@tablesub+"^000000. I hate to say";
		mes "it, but I gambled and lost.";
		mes "Take your winnings before";
		mes "I cry, "+strcharinfo(0)+"~!";
		close2;
		getitem 512,@amount*2;
		end;
	}
	mes "["+getarg(0)+"]";
	if(@tablesub < @playersub) {
		mes "I rolled a "+@table3+", which";
		mes "gives me a total of ^0000FF"+@tablesub+"^000000.";
		mes "But... It's still not enough";
		mes "to beat your ^FF0000"+@playersub+"^000000. It looks";
		mes "like I can't compete with";
		mes "you, "+strcharinfo(0)+"...";
		close2;
		getitem 512,@amount*2;
		end;
	} else if(@tablesub > @playersub) {
	mes "I rolled a ^0000FF"+@table3+"^000000, giving";
	mes "me a total of ^0000FF"+@tablesub+"^000000 which";
	mes "beats your total of ^FF0000"+@playersub+"^000000.";
	mes "Sorry, but you lose this";
	mes "game, "+strcharinfo(0)+". Them's";
	mes "the breaks, I suppose...";
	close;
	} else if(@tablesub == @playersub) {
		//Result = tie, --Improvised--
		mes "I rolled a ^0000FF"+@table3+"^000000, giving";
		mes "me a total of ^0000FF"+@tablesub+"^000000, which";
		mes "is the same as your total.";
		mes "Well, this game didn't have a";
		mes "winner or loser, "+strcharinfo(0)+".";
		close2;
		getitem 512,@amount;
		end;
	}
}
