//==============================================================================
//Ragnarok Online EP4.0 Niflheim NPC Script
//==============================================================================
nif_in.gat,37,93,1,	shop	l	801,1301:500,1351:5400,1354:15500,1357:34000,1360:55000
nif_in.gat,37,84,1,	shop	hl	801,2501:1000,2501:1000,2503:5000,2503:5000,2505:32000,2505:32000
nif_in.gat,145,23,1,	shop	l	801,535:15,1062:374,902:12,7106:672,537:1000,7154:160,1052:46,934:600
//
//event_key&1	AO
//event_key&2	l
//event_key&4	KN^
//event_key&8	΂P
//event_key&16	΂P
//event_key&32	΂Q
//event_key&64	sAmɂ͂߂
//

niflheim.gat,52,147,3	script	LY	796,{
	mes "[LY]";
	mes "Ă҂͂֗Ă";
	mes "Ȃ!!Ă҂̒ʍs";
	mes "΂ɔF߂Ȃ!!";
	close;
}

niflheim.gat,153,215,4	script	yC	794,{
	mes "[yC]";
	mes "ȂɊȂXɂǂ";
	mes "̂łH";
	mes "AȂB";
	close;
}

nif_in.gat,16,27,1	script	񂾃jg	800,{
	percentheal -5,0;
	mes "[`L]";
	mes "ĂA͐lԂ";
	mes "HꂽB獡x͂炪";
	mes "HԁBRPRbR[!!";
	mes "ł񂾂炱AȐE";
	mes "񂾂ȁccRPARPA";
	mes "RPRbR[!!";
	close;
}

nif_in.gat,16,30,4	script	񂾃RE	799,{
	percentheal -5,0;
	mes "[obg~A]";
	mes "ĂĂłĂ";
	mes "lԂ̌̓grA`łB";
	mes "łHNɌ";
	mes "zꂽ̂łH";
	close;
}

niflheim.gat,195,211,6	script	MKeBA	796,3,3,{
//otHXApȂǂ𑕔LStart2;
	mes "[MKeBA]";
	mes "l͂łASẴm";
	mes "Ăcc";
	close;
LStart2:
	mes "["+strcharinfo(0)+"]";
	mes "ɉpłH";
	next;
	mes "[MKeBA]";
	mes "͉̂B";
	mes "̑͌NIԈႢȂB";
	mes "ƂɗĂB";
	next;
	mes "[MKeBA]";
	mes "p𒅂Ă񂾂ȁBp͂ł";
	mes "玀҂̉lƌ";
	mes "B";
	close;
OnTouch:
//otHXApȂǂ𑕔
	mes "[MKeBA]";
	mes "Ƒ҂āI";
	close;
}

niflheim.gat,224,243,3	script	AO	795,{
	mes "[AO]";
	mes "ύ݂₷āccA";
	mes "Occ܂B";
	next;
	mes "[AO]";
	mes "cc";
	mes "OHׂĂ!!";
	next;
	mes "-KubKub-";
	if(event_key&1) goto L_2ND;
	percentheal -80,0;
	next;
	mes "[AO]";
	mes "vXɂ܂cc";
	mes "{B݂̒ɂ̗ǂAÓB";
	mes "ccǂa^ď㎿̃\[X";
	mes "΁AƂ܂Ȃ肻cc";
	next;
	mes "[AO]";
	mes "ɂB";
	mes "̊ԁAE񂾁BقI";
	getitem 7184,1;
	set event_key,event_key|1;
	close;
L_2ND:
	percentheal -30,0;
	close;
}
nif_in.gat,105,81,3	script	N	794,{
	mes "[N]";
	mes "҂cc炩A";
	mes "N炩ccꂷȂA";
	mes "Â`鎍𒮂܂傤cc";
	next;
	mes "[N]";
	mes "^FF0000zXĐ̎Rɂ肵";
	mes "^FF0000󂪎̗[ɐ܂鍠";
	mes "^FF0000ɐgς˂";
	mes "^FF0000Ȃ҂錮𓾂悤^000000";
	next;
	mes "[N]";
	mes "ǂȈӖ̂ł傤ccH";
	mes "͉[̂悤ȋC";
	mes "܂B̎͂A";
	mes "閧̂܂ˁB";
	if (!(event_key&1) || (event_key&2)) close;
//	if ((event_key&1) && !(event_key&2)) goto LStart2;
//	close;
//LStart2:
	next;
	set @rand,rand(4);
	if (@rand == 1) goto Lrand1;
	if (@rand == 2) goto Lrand2;
	if (@rand == 3) goto Lrand3;
		mes "[N]";
		mes "ł͂ŃeXg! ";
		mes "A̍ŏ̍s";
		mes "mɍČĂI";
		next;
		input @nfword$;
		if (@nfword$ == "zXĐ̎Rɂ肵") goto LSucsess;
			goto LWrong;
Lrand1:
		mes "[N]";
		mes "ł͂ŃeXg! ";
		mes "A̓sڂ";
		mes "mɍČĂI";
		next;
		input @nfword$;
		if (@nfword$ == "󂪎̗[ɐ܂鍠") goto LSucsess;
			goto LWrong;
Lrand2:
		mes "[N]";
		mes "ł͂ŃeXg! ";
		mes "A̎Osڂ";
		mes "mɍČĂI";
		next;
		input @nfword$;
		if (@nfword$ == "ɐgς˂") goto LSucsess;
			goto LWrong;
Lrand3:
		mes "[N]";
		mes "ł͂ŃeXg! ";
		mes "A̍Ō̍s";
		mes "mɍČĂI";
		next;
		input @nfword$;
		if (@nfword$ == "Ȃ҂錮𓾂悤") goto LSucsess;
			goto LWrong;
LWrong:
	mes "[N]";
	mes "ށccB蒮ĂA";
	mes "Ȃ̊ȒPɉ̂ł傤I";
	mes "ƊoĂēxA킵";
	mes "ȂI";
	close;
LSucsess:
	mes "[N]";
	mes "cc悭oĂ܂ˁI";
	mes "̓NƐ\܂B";
	mes "VlɂƂĂȂ";
	mes "ԁAD܂邨qłB";
	mes "Jɂ܂傤B";
	next;
	set event_key,event_key|2;
	getitem 7184,1;
	mes "[N]";
	mes "A̋VlB";
	mes "΂ĂB";
	close;

}

nif_in.gat,31,20,3	script	KN^	794,{
	mes "[KN^]";
	mes "ɂ琸oĂI";
	mes "OŏoXÂ";
	mes "܂Ȃ񂾂ȁcc";
	if (!(event_key&1) || (event_key&4)) close;
	next;
	mes "[KN^]";
	mes "A񂽁I";
	mes "ǂO֍sȂ";
	mes "̂ĂĂĂI";
	set event_key,event_key|4;
	getitem 7184,1;
	next;
	mes "[KN^]";
	mes "Sǁ[ď";
	mes "OɏȂ񂾂B";
	mes "̉Ă񂾂B";
	mes "ԂԂԂcc";
	close;
}

niflheim.gat,208,103,0	script	#1	111,1,1,{
	close;
OnTouch:
	if (!(event_key&1) || !(event_key&2) || !(event_key&4)) close;
	if ((event_key&8) && (event_key&16)) close;
	if (event_key&8) goto LStart2;
	mes "- ΂̎ɉ߂ -";
	mes "- ̂BגB -";
	mes "- ̕i낤H -";
	mes "- cccc -";
	next;
	mes "- E܂H -";
	next;
	menu "͂",L1,"",-;
		close;
	L1:
		getitem 7184,1;
		set event_key,event_key|8;
		close;
LStart2:
	mes "- قǌ@肾ɁAXɉ -";
	mes "- ܂Ă̂B܂ -";
	mes "- ̂悤B͂艽 -";
	mes "- iȂB -";
	next;
	mes "- E܂H -";
	next;
	menu "͂",L2,"",-;
		close;
	L2:
		getitem 7184,1;
		set event_key,event_key|16;
		close;
}

niflheim.gat,169,71,0	script	#2	111,1,1,{
		close;
OnTouch:
	if (event_key&32) close;
	if !((event_key&8) && (event_key&16)) close;
	mes "- ΂̎ɉ߂ -";
	mes "- ̂BגB -";
	mes "- ̕i낤H -";
	mes "- cccc -";
	next;
	mes "- E܂H -";
	next;
	menu "͂",L1,"",-;
		close;
	L1:
		getitem 7184,1;
		set event_key,event_key|32;
		close;
}

nif_in.gat,156,93,5	script	#juwC	793,{
	mes "[鏭]";
	mes "͂ǂccH";
	mes "Aڂo߂炱ɂ́cc";
	mes "}}cc˂A}}ȂH";
	mes "cc`BƂɋA肽`B";
	next;
	menu "ĉH",-,"􂢂ĉH",L2,"b߂",L3;
		mes "[鏭]";
		mes "ccHȂĒmȂcc";
		mes "AłG{ŌƂB";
		mes "cc{ɂƂĂ";
		mes "|ˁcc";
		next;
		mes "[鏭]";
		mes "˂AǂĂȂɊ́ccH";
		mes "o͊Ȃ́H";
		mes "ccςȂ́[Bӂ`B";
		mes "gƂɋA肽ȁB";
		mes "ꏏɘAĂĂȂccH";
		mes "˂ccH˂ccH";
		close;
	L2:
		mes "[鏭]";
		mes "􂢁cck̘bvoȁB";
		mes "jłȂ􂢂";
		mes "񂾂āB";
		next;
		mes "[鏭]";
		mes "Ngccx^cc";
		mes "ƁccHccH";
		mes "[ccƈvoȂB";
		next;
		mes "[鏭]";
		mes "ccƂɂA3̎";
		mes "Ԓʂɏ΁Aꂽ";
		mes "^瓦炵́B";
		mes "̂b̂Ƃ́cc[A";
		mes "voȂȁB";
		close;
	L3:
		mes "[鏭]";
		mes "cc`cc";
		mes "ƂɋA肽悧`cc";
		mes "˂AAĂācc";
		mes "͂ƂĂ|Ȃ́B";
		mes "肢ccācc";
		close;
}

niflheim.gat,153,215,3	script	yC	794,{
	mes "[yC]";
	mes "ȂɊȂXɂǂ";
	mes "̂łH";
	mes "AȂB";
	close;
}

niflheim.gat,350,258,1	script	ꂽ	802,{
	killmonster "niflheim.gat","nif_soul";
	mes "[AbVu[X]";
	mes "ɂ͋􂢂!!!!";
	mes "킵݂͂̑ۂ!!!!";
	mes "ނʂ̂ȂA^悤!!";
	mes "킵̑厖Ȗ{";
	mes "G񂶂Ȃ!!!!";
	next;
	menu "1Ԗڂ̖{Ă݂",-,"2Ԗڂ̖{Ă݂",L_MENU_2,"3Ԗڂ̖{Ă݂",L_MENU_3,"ƂȂނ",L_MENU_4;
		mes "[AbVu[X]";
		mes "͂͂͂!!";
		mes "ނ݂ɂ킵̖{G邩炾!!";
		mes "ݐ؂A􂩂邪悢!!";
		mes "i̎􂢂Ɏ̂!!";
		monster "niflheim.gat",349,259,"--ja--",1478,1,"nif_soul";
		close;
	L_MENU_2:
		mes "[AbVu[X]";
		mes "킵̖{ɐGƂ́cc";
		mes "Xɏ!!킵̋x";
		mes "ז񂶂Ȃ!!";
		close2;
		warp "niflheim.gat",34,162;
		end;
	L_MENU_3:
		mes "[AbVu[X]";
		mes "ʂccB";
		mes "\Ax悤ȁB";
		mes "cccc!!!!";
		mes "Ȃ΁ccx";
		mes "Ă݂邪悢cc!!";
		set @nif_soul,0;
		next;
			menu "N[o",L_MENU_3_1,"Ng",-,"NCgX",L_MENU_3_1;
				set @nif_soul,@nif_soul+1;
		L_MENU_3_1:
			menu "xg",L_MENU_3_2,"x^X",L_MENU_3_2,"x^",-;
				set @nif_soul,@nif_soul+1;
		L_MENU_3_2:
			menu "lN^C",L_MENU_3_3,"lbNX",L_MENU_3_3,"l",L_MENU_3_3,"^FFFFFFjbNg^000000",-;
				set @nif_soul,@nif_soul+1;
		L_MENU_3_3:
			if (@nif_soul==3) goto L_MENU_3_OK;
			mes "[AbVu[X]";
			mes "͂͂͂!!!!";
			mes "AԈĂ邼!!";
			mes "ɕKvȂ͎̂̂悤ȁB";
			mes "ꐶAꑱ邪悢cc!!";
			monster "niflheim.gat",345,259,"--ja--",1462,1,"nif_soul";
			monster "niflheim.gat",347,261,"--ja--",1462,1,"nif_soul";
			monster "niflheim.gat",344,253,"--ja--",1462,1,"nif_soul";
			monster "niflheim.gat",346,251,"--ja--",1462,1,"nif_soul";
			monster "niflheim.gat",349,249,"--ja--",1462,1,"nif_soul";
			monster "niflheim.gat",350,260,"--ja--",1462,1,"nif_soul";
			monster "niflheim.gat",353,256,"--ja--",1462,1,"nif_soul";
			close;
		L_MENU_3_OK:
//ɏ
			mes "[AbVu[X]";
			mes "͊mɐccA";
			mes "̎􂢂͉Ȃ̂cc";
			mes "͂͂͂́cc!!!!";
			close;
	L_MENU_4:
		mes "[AbVu[X]";
		mes "Ԃ͂͂!!";
		mes "悭l悤ȁcc";
		mes "傪ɐċA邱Ƃ";
		mes "킵FĂ낤B";
		close;
}

nif_in.gat,115,181,0	script	#sAm	111,1,1,{
	close;
OnTouch:
	if ((event_key&64) || !(event_key&32)) close;
	mes "- sAm̌ɌՂ -";
	mes "- ͂߂Ă݂BA -";
	mes "- ԍ̌Ղ  -";
	mes "- ȂB-";
	set event_key,event_key|64;
	close;
}

nif_in.gat,118,151,1	script	#sAm3	111,1,1,{
	close;
OnTouch:
	if !(event_key&64) end;
	mes "- ̑̂LтeA -";
	mes "- Ղ̏ -";
	mes "- 傤ǏdȂuԁcc -";
	next;
	soundeffect "complete.wav",0;
	next;
	mes "- ̂yȂ悤Ȋācc -";
	mes "- ͂܂n߂cc -";
	close2;
	warp "nif_in.gat",179,163;
	end;
}

nif_in.gat,188,168,3	script		792,1,1,{
	close;
OnTouch:
	mes "[LP]";
	mes "[ccH";
	mes "ȂAĂ邶Ȃ!?";
	mes "܂ŗ̂";
	mes "ςł傤cc";
	mes "R͂ǂA";
	mes "Ă҂鏊ȂB";
	next;
	mes "[LP]";
	mes "̗͂ŊO֏oĂ邩A";
	mes "xƗʖڂB";
	close2;
	warp "umbala.gat",138,208;
	end;
}

//Event
prt_in.gat,161,20,4	script	AV	92,{close;}
umbala.gat,215,181,4	script	r[	733,{close;}
