//===================================
// [ڤ] The PlutoEA Project []
// http://opensvn.csie.org/PlutoEA
// -----------------------------------------
// - 4 ű -
//===================================
//= 汾: 1.4
//= : 5511
//===================================
//= 2009/02/03
//= *A
//= -ħ , ֮
//= -Ƽ׶̽, ж̽˹ظ
//= -ʥ , ش ºħ 
//===================================

//---------------------------------------------------------------
// û, Ķ/޸
//---------------------------------------------------------------

-	script	lv4_weapon_init	-1,{
OnInit:
	set $@LV4_Citrine, 7295; // 7295,ˮ
	set $@LV4_Turquoise, 7294; // 7294,ʯ
	set $@LV4_Agate, 7291; // 7291,
	
	set $@LV4_Muscovite, 7292; // 7292,ĸ
	set $@LV4_Biotite, 7297; // 7297,ĸ
	set $@LV4_Pyroxene, 7296; // 7296,ʯ
	
	set $@LV4_Phlogopite, 7290; // 7290,ĸ
	set $@LV4_Olivine, 7289; // 7289,ʯ
	set $@LV4_Rose_Quartz, 7293; // 7293,õʯӢ
	
	set $@LV4_Gold, 969; // 969,ƽ
	set $@LV4_Steel, 999; // 999,
	set $@LV4_Emperium, 714; // 714,
	set $@LV4_Hammer_Of_Blacksmith, 1005; // 1005,߼
	set $@LV4_Emperium_Anvil, 989; // 989,
	set $@LV4_Illusion_Flower, 710; // 710,뻨
	end;
}

//---------------------------------------------------------------
// , ʥ , ش ºħ 
//---------------------------------------------------------------

umbala,117,285,3	script		85,{
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight < 3000) {
		mes "- Ե! -";
		mes "- ǰѾ. -";
		mes "- ĸ. -";
		close;
	}
	switch (lv4_weapon) {
	case 0:
		mes "[]";
		mes ", , ?";
		mes "Ǵò.";
		mes "ܸ˼. ҵ";
		mes " .";
		mes "Ҳ.";
		next;
		mes "[]";
		mes "һ.";
		mes "㲻, ˵˵";
		mes "ط.";
		mes "߹, ܽķ.";
		mes "ʵϵһ, Ҿ֪";
		mes "˹һЩ.";
		next;
		mes "[]";
		mes "ڵϵ,";
		mes "ȫܵ߹";
		mes "ҵĳаӰ.";
		next;
		mes "[]";
		mes "ıؾѾѧ";
		mes "ӵаƷ.";
		next;
		mes "[]";
		mes "ͣʱ, Ҳѧ";
		mes "һЩ. ʵ";
		mes ", һ㿴ҵ.";
		mes "ô?";
		next;
		switch( select( ":, лл" ) ) {
		case 1:
			if(BaseLevel >= 70) {
				mes "[]";
				mes "ǳ! ҸҪĲ.";
				mes "ϣܰǼ.";
				mes "ȻǺܶ.";
				next;
				mes "[]";
				mes "Ҫ10 ƽ, 50 Ƭ";
				mes "10 黪Ϊ...";
				mes "ҪضƷʩħ.";
				mes ", һҪһЩϡпʯ...";
				next;
				mes "[]";
				mes "30 ˮ, ";
				mes "ʯ.";
				mes "ÿһֿʯʩ費";
				mes "ͬ, ҵͻв";
				mes "ͬɫ.";
				next;
				mes "[]";
				mes "ף...";
				mes "һ!";
				set lv4_weapon, 1;
				close;
			}
			mes "[]";
			mes "... 㻹ûƿ";
			mes "Ĵ.";
			mes "̲а.";
			next;
			mes "˵ǵ˲ǿ";
			mes "׳, û㹻Ļ, ";
			mes "Ǿͻᱻа.";
			mes "ҿԲԴҵ.";
			next;
			mes "[]";
			mes ", ϣ";
			mes "ȼȻٻ.";
			mes "׼ú, ڴ.";
			close;
		case 2:
			mes "[]";
			mes ", ð. ν.";
			mes "˳˵һ, 㲻֪߹";
			mes "ҵаε?";
			mes "Ҫ֪, Դǳƾ";
			mes "Ӱ˺ܶ, Ҳſʼ";
			mes "ԼƷ.";
			close;
		}
	case 1:
		if( countitem($@LV4_Gold) < 10 || countitem($@LV4_Steel) < 50 || countitem($@LV4_Emperium ) < 10) {
			mes "[]";
			mes "Ҫ10 ƽ, 50 Ƭ";
			mes "10 黪Ϊ...";
			mes "ҪضƷʩħ.";
			mes ", һҪһЩϡпʯ...";
			next;
			mes "[]";
			mes "30 ˮ, ";
			mes "ʯ.";
			mes "ÿһֿʯʩ費";
			mes "ͬ, ҵͻв";
			mes "ͬɫ.";
			next;
			mes "[]";
			mes "ף...";
			mes "һ!";
			close;
		}
		mes "[]";
		mes "... ѾеĻ";
		mes ".";
		mes "ô鿴Щϡ";
		mes "пʯ...";
		next;
		if (countitem($@LV4_Citrine) >= 30 && countitem($@LV4_Turquoise) >= 30 && countitem($@LV4_Agate) >= 30) {
			mes "[]";
			mes ", ҽһ, ";
			mes "㶼.";
			mes "ֻʹһ.";
			mes "ʹ?";
			next;
			switch( select( "ˮ:ʯ:" ) ) {
			case 1:
				mes "[]";
				mes "ˮ... ð. ǿʼǰ,";
				set @gem, $@LV4_Citrine;
				set @gemstring$,"ˮ";
				break;
			case 2:
				mes "[]";
				mes "ʯ... ð. ǿʼǰ,";
				set @gem, $@LV4_Turquoise;
				set @gemstring$,"ʯ";
				break;
			case 3:
				mes "[]";
				mes ".... ð. ǿʼǰ,";
				set @gem, $@LV4_Agate;
				set @gemstring$,"";
			}
			break;
		}
		else if (countitem($@LV4_Citrine) >= 30 && countitem($@LV4_Turquoise) >= 30) {
			mes "[]";
			mes ", ҽһ, ";
			mes ".";
			mes "ֻʹһ.";
			mes "ʹ?";
			next;
			switch( select( "ˮ:ʯ" ) ) {
			case 1:
				mes "[]";
				mes "ˮ... ð. ǿʼǰ,";
				set @gem, $@LV4_Citrine;
				set @gemstring$,"ˮ";
				break;
			case 2:
				mes "[]";
				mes "ʯ... ð. ǿʼǰ,";
				set @gem, $@LV4_Turquoise;
				set @gemstring$,"ʯ";
				break;
			}
			break;
		}
		else if (countitem($@LV4_Citrine) >= 30 && countitem($@LV4_Agate) >= 30) {
			mes "[]";
			mes ", ҽһ, ";
			mes ".";
			mes "ֻʹһ.";
			mes "ʹ?";
			next;
			switch( select( "ˮ:" ) ) {
			case 1:
				mes "[]";
				mes "ˮ... ð. ǿʼǰ,";
				set @gem, $@LV4_Citrine;
				set @gemstring$,"ˮ";
				break;
			case 2:
				mes "[]";
				mes ".... ð. ǿʼǰ,";
				set @gem, $@LV4_Agate;
				set @gemstring$,"";
				break;
			}
			break;
		}
		else if (countitem($@LV4_Turquoise) >= 30 && countitem($@LV4_Agate) >= 30) {
			mes "[]";
			mes ", ҽһ, ";
			mes ".";
			mes "ֻʹһ.";
			mes "ʹ?";
			next;
			switch( select( "ʯ:" ) ) {
			case 1:
				mes "[]";
				mes "ʯ... ð. ǿʼǰ,";
				set @gem, $@LV4_Turquoise;
				set @gemstring$,"ʯ";
				break;
			case 2:
				mes "[]";
				mes ".... ð. ǿʼǰ,";
				set @gem, $@LV4_Agate;
				set @gemstring$,"";
				break;
			}
			break;
		}
		else if (countitem($@LV4_Citrine) >= 30) {
			mes "[]";
			mes "ˮ... ð. ǿʼǰ,";
			set @gem, $@LV4_Citrine;
			set @gemstring$,"ˮ";
			break;
		}
		else if (countitem($@LV4_Turquoise) >= 30) {
			mes "[]";
			mes "ʯ... ð. ǿʼǰ,";
			set @gem, $@LV4_Turquoise;
			set @gemstring$,"ʯ";
			break;
		}
		else if (countitem($@LV4_Agate) >= 30) {
			mes "[]";
			mes ".... ð. ǿʼǰ,";
			set @gem, $@LV4_Agate;
			set @gemstring$,"";
			break;
		}
		else {
			mes "[]";
			mes "Ҽǵ˵Ҫ30";
			mes "رĿʯ, ˮ, ";
			mes "ʯ...";
			mes "û.";
			mes "һ. ȥǰ.";
			close;
		}
		mes "Ҫһ.";
		mes "Ǿ, .";
		mes "֪, ҿɲܱ֤";
		mes "Ϊ.";
		next;
		mes "[]";
		mes "ڿʼǰ, ܹ";
		mes ", ǽɹ.";
		next;
		mes "[]";
		mes "һҪʲô";
		mes ".";
		mes "ܼ, ҪϷ.";
		mes "ϲ4 ħ";
		mes "һ, ħʲô.";
		next;
		mes "[]";
		mes "Ҫ5 д1 . ";
		mes "ôѰ.";
		mes "شʧ, ǵ";
		mes "ʲôϵĻ.";
		next;
		mes "[]";
		mes "һ10 ѡرʯ.";
		mes "ð, ô";
		mes ", Ψһķ.";
		mes "Ҫ30 ſʯȴȻ";
		mes "ʧҪõĶ, ǲ?";
		next;
		mes "[]";
		mes ", ҪЩʱ׼...";
		mes "Ե!";
		if(countitem($@LV4_Gold) < 10 || countitem($@LV4_Steel) < 50 || countitem($@LV4_Emperium) < 10) goto LV4_HACK;
		delitem $@LV4_Gold, 10;
		delitem $@LV4_Steel, 50;
		delitem $@LV4_Emperium, 10;
		if(@gem == $@LV4_Citrine) set lv4_weapon, 2;
		if(@gem == $@LV4_Turquoise) set lv4_weapon, 3;
		if(@gem == $@LV4_Agate) set lv4_weapon, 4;
		close;
	case 2:
	case 3:
	case 4:
		if(lv4_weapon == 2) set @gem, $@LV4_Citrine;
		if(lv4_weapon == 3) set @gem, $@LV4_Turquoise;
		if(lv4_weapon == 4) set @gem, $@LV4_Agate;
		if(countitem(@gem) < 30) {
			mes "[]";
			mes "... ʲôо. ȱ";
			mes "ʲô...";
			mes "ҪҪĶ?";
			close;
		}
		mes "[]";
		mes "ܺ, ׼.";
		mes "ǿʼ.";
		mes "ϲħǲ, ,";
		mes ", ˹.";
		next;
		set @dap, 0;
		set @correct[0],1;
		for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
			mes "[]";
			if(@i == 1) mes "ǵһ. ô²";
			if(@i != 1) mes "ôð. ڽŲ²";
			mes "ħʲô.";
			next;
			set @mons,rand(1,4);
			switch( select( ":::˹" ) ) {
			case 1:
				set @correct[@i], 1;
				if(@mons == 1) set @dap, @dap + 1;
				break;
			case 2:
				set @correct[@i], 2;
				if(@mons == 2) set @dap, @dap + 1;
				break;
			case 3:
				set @correct[@i], 3;
				if(@mons == 3) set @dap, @dap + 1;
				break;
			case 4:
				set @correct[@i], 4;
				if(@mons == 4) set @dap, @dap + 1;
				break;
			}
		}
		mes "[]";
		mes "ð, ҸĴ.";
		mes "µħб.";
		next;
		mes "[]";
		for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
			if(@correct[@i] == 1) mes "";
			if(@correct[@i] == 2) mes "";
			if(@correct[@i] == 3) mes "";
			if(@correct[@i] == 4) mes "˹";
		}
		if(@dap < 1) {
			if(countitem(@gem) < 10) goto LV4_HACK;
			delitem @gem, 10;
			next;
			mes "[]";
			mes "... 㲻ó˵˼";
			mes ". ҲҲ.";
			mes "ǲܼ, ";
			mes "Ļ.";
			mes "10 " + @gemstring$ + ", Ȼ.";
			next;
			mes "[]";
			mes "ô... Ҫٽһ";
			mes "Ϸ, Ų.";
			mes "һ.";
			close;
		}
		next;
		mes "[]";
		mes "" + @dap + " !";
		mes "˲!";
		mes "˵, һΪ";
		mes "ر.";
		mes "ٸҵʱ׼.";
		mes "һ";
		if(countitem(@gem) < 30) goto LV4_HACK;
		delitem @gem, 30;
		set lv4_weapon, lv4_weapon + 3;
		close;
	case 5:
	case 6:
	case 7:
		mes "[]";
		mes "ܺ... , !";
		mes "ףҺ... , ˸";
		mes ".";
		mes "Ҳܸʲô. ";
		mes "Ϊ.";
		mes "һڴöĵ,";
		mes "ô?";
		next;
		mes "- оδ֪ʼ -";
		mes "- ڲ. ƺ -";
		mes "- տеа -";
		next;
		mes "- , Ͽʼںϵһ -";
		mes "- ȴû -";
		next;
		mes "[]";
		mes "ܸо? ڸ";
		mes "ǵռ.";
		mes "ڲҿ. ȴ";
		mes ".";
		next;
		mes "- һ,  -";
		mes "- ȻǿĽ -";
		next;
		mes "[]";
		mes "! !";
		mes "ǳɹ! , ̫!";
		mes "Ҹ߹Ǻϡе?";
		mes ", ϵһǵ.";
		mes ", ! һǳ";
		mes ".";
		mes "ǿ...";
		next;
		mes "[]";
		switch( lv4_weapon ) {
		case 5:
			mes "ʥ !";
			getitem 1141, 1; //1141,ʥ 
			break;
		case 6:
			mes "ħ !";
			getitem 1526, 1; //1526,ħ 
			break;
		case 7:
			mes "ش !";
			getitem 1527, 1; //1527,ش 
			break;
		}
		set lv4_weapon, 0;
		mes "!";
		mes "ϲ, ϣܺú.";
		next;
		mes "[]";
		mes "Ҹо. ";
		mes "Ķ, п.";
		mes "!";
		close;
	default:
		mes "[]";
		mes "... ҸоһЩ.";
		mes "ҺźĸҲܰ";
		mes "ʲô.";
		mes "ϣ;ȫ.";
		close;
	}

// ۸ͼ
LV4_HACK:
	mes "[]";
	mes ". ƺеʲôС.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "]ͼ۸4 .";
	close;
}

//---------------------------------------------------------------
// ϣ̹, Ƽ׶̽, ж̽˹ظ
//---------------------------------------------------------------
umbala,163,257,3	script	ϣ̹	785,{
	if(event_umbala < 3) {
		mes "[ϣ̹]";
		mes "! Ͱ...! !";
		mes "ͰͰͰ!";
		mes "!";
		mes "ͰͰͰͰͰ!";
		close;
	}
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight < 3000) {
		mes "- Ե! -";
		mes "- ǰѾ. -";
		mes "- ĸ. -";
		close;
	}
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon == 8) goto LV4_8;
	if(lv4_weapon == 9) goto LV4_9;
	if(lv4_weapon == 10) goto LV4_9;
	if(lv4_weapon == 11) goto LV4_9;
	if(lv4_weapon == 12) goto LV4_12;
	if(lv4_weapon == 13) goto LV4_12;
	if(lv4_weapon == 14) goto LV4_12;
	if(lv4_weapon < 8) goto LV4_7;
	if(lv4_weapon > 14) goto LV4_7;
	end;
LV4_0:
	mes "[ϣ̹]";
	mes ", ǰ, Ҿ֪һһ";
	mes ".";
	mes "ǻʶΪ";
	mes "Ĺļֵ!";
	next;
	mes "[ϣ̹]";
	mes "ô, .";
	mes "ܴҲϵĻ, ,";
	mes "ϣ̹չҵ!";
	mes "!";
	next;
	mes "[ϣ̹]";
	mes "? ʲô? û?";
	mes "Ц... ҵɵ!";
	mes "ʱ˵ʵ, ̫!";
	mes "ʵ뻹ǲ.";
	next;
	switch( select( "... Ȼ.:... Ǹ, 治Ҫ!" ) ) {
	case 1:
		if(BaseLevel >= 70) goto L4_0_1;
		mes "[ϣ̹]";
		mes "... ϧ! źĸ,";
		mes "̫ƿ";
		mes "ҵĴ!";
		mes ", һ㶼!";
		mes "ȥԼ.";
		mes "ǿ׳ʱ, ٻ!";
		break;
L4_0_1:
			mes "[ϣ̹]";
			mes "ܺ! ϲ̬! ,";
			mes "!";
			mes "һҪʲô.";
			mes "Ǻܶ, Կɱǲס.";
			next;
			mes "[ϣ̹]";
			mes "10 ƽ, 50 Ƭ";
			mes "10 黪... Ϊ.";
			mes "һҪһЩϡпʯ";
			mes "ħ...";
			next;
			mes "[ϣ̹]";
			mes "ڰĸ, ĸǻʯ֮";
			mes "ѡһִ30 .";
			mes "סһҪ30 ֿͬʯ.";
			mes "Ҳȷʲô, ";
			mes "Ҳȷһֿʯ. Ǻ.";
			next;
			mes "[ϣ̹]";
			mes "ð, ף!";
			mes "һ.";
			set lv4_weapon, 8;
			break;
		case 2:
			mes "[ϣ̹]";
			mes "~ ʲô?";
			mes "ֻһæ, ?";
			mes "ð, ˵.";
			mes "ı, ʱ";
			mes ".";
			break;
	}
	close;

//--------------------------------------------------
// ƽ, ,  + ѡħʯ
//--------------------------------------------------
LV4_8:
	if(countitem($@LV4_Gold) < 10) goto LV4_8_FAIL;
	if(countitem($@LV4_Steel) < 50) goto LV4_8_FAIL;
	if(countitem($@LV4_Emperium) < 10) goto LV4_8_FAIL;

	mes "[ϣ̹]";
	mes "... ѾеĻ";
	mes ".";
	mes "ô鿴Щϡ";
	mes "пʯ...";
	next;
	
	if (countitem($@LV4_Muscovite) >= 30 && countitem($@LV4_Biotite) >= 30 && countitem($@LV4_Pyroxene) >= 30) goto LV4_8_MBP;
	if (countitem($@LV4_Muscovite) >= 30 && countitem($@LV4_Biotite) >= 30) goto LV4_8_MB;
	if (countitem($@LV4_Muscovite) >= 30 && countitem($@LV4_Pyroxene) >= 30) goto LV4_8_MP;
	if (countitem($@LV4_Biotite) >= 30 && countitem($@LV4_Pyroxene) >= 30) goto LV4_8_BP;
	if (countitem($@LV4_Muscovite) >= 30) goto LV4_8_M;
	if (countitem($@LV4_Biotite) >= 30) goto LV4_8_B;
	if (countitem($@LV4_Pyroxene) >= 30) goto LV4_8_P;
	goto LV4_8_NOGEM;
	end;


LV4_8_MBP:	
	mes "[ϣ̹]";
	mes ", ֿʯ?";
	mes ", .";
	mes "ǲһȫõ.";
	mes "ѡһʹõİ.";
	next;
			
	switch( select( "ĸ:ĸ:ʯ" ) ) {
		case 1:
			mes "[ϣ̹]";
			mes "ĸ... ð. ǿʼǰ,";
			set @gem, $@LV4_Muscovite;
			set @gemstring$,"ĸ";
			break;
		case 2:
			mes "[ϣ̹]";
			mes "ĸ... ð. ǿʼǰ,";
			set @gem, $@LV4_Biotite;
			set @gemstring$,"ĸ";
			break;
		case 3:
			mes "[ϣ̹]";
			mes "ʯ.... ð. ǿʼǰ,";
			set @gem, $@LV4_Pyroxene;
			set @gemstring$,"ʯ";
			break;
	}
	
	goto LV4_8_PICK;
	end;
	
	
LV4_8_MB:
	mes "[ϣ̹]";
	mes ", ҽһ, ";
	mes ".";
	mes "ֻʹһ.";
	mes "ʹ?";
	next;
	
	switch( select( "ĸ:ĸ" ) ) {
		case 1:
			mes "[ϣ̹]";
			mes "ĸ... ð. ǿʼǰ,";
			set @gem, $@LV4_Muscovite;
			set @gemstring$,"ĸ";
			break;
		case 2:
			mes "[ϣ̹]";
			mes "ĸ... ð. ǿʼǰ,";
			set @gem, $@LV4_Biotite;
			set @gemstring$,"ĸ";
			break;
	}
	
	goto LV4_8_PICK;
	end;
	

LV4_8_MP:	
	mes "[ϣ̹]";
	mes ", ҽһ, ";
	mes ".";
	mes "ֻʹһ.";
	mes "ʹ?";
	next;
	
	switch( select( "ĸ:ʯ" ) ) {
		case 1:
			mes "[ϣ̹]";
			mes "ĸ... ð. ǿʼǰ,";
			set @gem, $@LV4_Muscovite;
			set @gemstring$,"ĸ";
			break;
		case 2:
			mes "[ϣ̹]";
			mes "ʯ.... ð. ǿʼǰ,";
			set @gem, $@LV4_Pyroxene;
			set @gemstring$,"ʯ";
			break;
	}
	
	goto LV4_8_PICK;
	end;
	
	
LV4_8_BP:	
	mes "[ϣ̹]";
	mes ", ҽһ, ";
	mes ".";
	mes "ֻʹһ.";
	mes "ʹ?";
	next;
	
	switch( select( "ĸ:ʯ" ) ) {
			case 1:
				mes "[ϣ̹]";
				mes "ĸ... ð. ǿʼǰ,";
				set @gem, $@LV4_Biotite;
				set @gemstring$,"ĸ";
				break;
			case 2:
				mes "[ϣ̹]";
				mes "ʯ.... ð. ǿʼǰ,";
				set @gem, $@LV4_Pyroxene;
				set @gemstring$,"ʯ";
				break;
	}
	
	goto LV4_8_PICK;
	end;
	
	
LV4_8_M:
	mes "[ϣ̹]";
	mes "ĸ... ð. ǿʼǰ,";
	set @gem, $@LV4_Muscovite;
	set @gemstring$,"ĸ";
	goto LV4_8_PICK;
	end;
		
		
LV4_8_B:
	mes "[ϣ̹]";
	mes "ĸ... ð. ǿʼǰ,";
	set @gem, $@LV4_Biotite;
	set @gemstring$,"ĸ";
	goto LV4_8_PICK;
	end;
	
	
LV4_8_P:
	mes "[ϣ̹]";
	mes "ʯ.... ð. ǿʼǰ,";
	set @gem, $@LV4_Pyroxene;
	set @gemstring$,"ʯ";
	goto LV4_8_PICK;
	end;
	
	
LV4_8_PICK:
	mes "Ҫһ.";
	mes "Ǿ, .";
	mes "֪, ҿɲܱ֤";
	mes "Ϊ.";
	next;
	mes "[ϣ̹]";
	mes "ڿʼǰ, ܹ";
	mes ", ǽɹ.";
	next;
	mes "[ϣ̹]";
	mes "һҪʲô";
	mes ".";
	mes "ܼ, ҪϷ.";
	mes "ϲ4 ħ";
	mes "һ, ħʲô.";
	next;
	mes "[ϣ̹]";
	mes "Ҫ5 д1 . ";
	mes "ôѰ.";
	mes "شʧ, ǵ";
	mes "ʲôϵĻ.";
	next;
	mes "[ϣ̹]";
	mes "һ10 ѡرʯ.";
	mes "ð, ô";
	mes ", Ψһķ.";
	mes "Ҫ30 ʯȴȻ";
	mes "ʧҪõĶ, ǲ?";
	next;
	mes "[ϣ̹]";
	mes ", ҪЩʱ׼...";
	mes "Ե!";
	
	if(countitem($@LV4_Gold) < 10) goto LV4_HACK;
	if(countitem($@LV4_Steel) < 50) goto LV4_HACK;
	if(countitem($@LV4_Emperium) < 10) goto LV4_HACK;
	delitem $@LV4_Gold, 10;
	delitem $@LV4_Steel, 50;
	delitem $@LV4_Emperium, 10;
	if(@gem == $@LV4_Muscovite) set lv4_weapon, 9;
	if(@gem == $@LV4_Biotite) set lv4_weapon, 10;
	if(@gem == $@LV4_Pyroxene) set lv4_weapon, 11;	
	close;


LV4_8_NOGEM:
	mes "[ϣ̹]";
	mes "Ҽǵ˵Ҫ30";
	mes "رĿʯ, ĸ, ";
	mes "ĸǻʯ...";
	mes "û.";
	mes "һ. ȥǰ.";
	close;


LV4_8_FAIL:
	mes "[ϣ̹]";
	mes "Ҫ10 ƽ, 50 Ƭ";
	mes "10 黪Ϊ...";
	mes "ҪضƷʩħ.";
	mes ", һҪһЩϡпʯ...";
	next;
	mes "[ϣ̹]";
	mes "30 ĸ, ";
	mes "ĸǻʯ.";
	mes "ÿһֿʯʩ費";
	mes "ͬ, ҵͻв";
	mes "ͬɫ.";
	next;
	mes "[ϣ̹]";
	mes "ף...";
	mes "һ!";
	close;



//--------------------------------------------------
// ²¿Ϸ
//--------------------------------------------------
LV4_9:
	if(lv4_weapon == 9) set @gem, $@LV4_Muscovite;
	if(lv4_weapon == 10) set @gem, $@LV4_Biotite;
	if(lv4_weapon == 11) set @gem, $@LV4_Pyroxene;
	if(countitem(@gem) < 30) goto LV4_9_NOGEM; 
	
	mes "[ϣ̹]";
	mes "ܺ, ǿʼ!";
	mes "ܼ. 4 ϲħ.";
	mes "ҽ4 ֮һħ, ";
	mes "ʲô.";
	mes "һ5 Ϸ, ";
	mes "Ҫ5 дһ. 򵥰?";
	next;
	mes "[ϣ̹]";
	mes "ǷǳʵϷ!";
	mes "ô, ׼.";
	next;
	
	set @dap, 0;
	set @correct[0],1;
	for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
		mes "[ϣ̹]";
		
		if(@i == 1) mes "ϲ˹ħŮ, ɪ,";
		if(@i == 1) mes "ʬ, Ů˿Щħ.";
		
		mes ", ²һ.";	
		next;

		set @mons, rand(1, 4);		

		switch( select( "˹ħŮ:ɪ:ʬ:Ů˿" ) ) {
				case 1:
					set @correct[@i], 1;
					if(@mons == 1) set @dap, @dap + 1;
					break;

				case 2:
					set @correct[@i], 2;
					if(@mons == 2) set @dap, @dap + 1;
					break;

				case 3:
					set @correct[@i], 3;
					if(@mons == 3) set @dap, @dap + 1;
					break;

				case 4:
					set @correct[@i], 4;
					if(@mons == 4) set @dap, @dap + 1;
					break;
		}
	}

	mes "[ϣ̹]";
	mes "ܺ, ! Ҽ";
	mes ". µħ...";
	next;
	mes "[ϣ̹]";

	for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
		if(@correct[@i] == 1) mes "˹ħŮ";
		if(@correct[@i] == 2) mes "ɪ";
		if(@correct[@i] == 3) mes "ʬ";
		if(@correct[@i] == 4) mes "Ů˿";
	}

	if(@dap < 1) goto LV4_9_FAIL;
	
	next;
	mes "[ϣ̹]";
	mes " , Ǹ?";
	mes "" + @dap + " ! ...";
	mes "Ѿ˵, ";
	mes "ôûκɲ";
	mes "ǵ!";
	mes "Ҫʱ׼, Ե!";
	
	if(countitem(@gem) < 30) goto LV4_HACK;
	delitem @gem, 30;
	set lv4_weapon, lv4_weapon + 3;
	close;
	
	
LV4_9_FAIL:
	if(countitem(@gem) < 10) goto LV4_HACK;
	delitem @gem, 10;
	
	next;
	mes "[ϣ̹]";
	mes "Ⱑ, Ⱑ!";
	mes "һȷ𰸶û.";
	mes "ǲĽṹʼ.";
	mes "ô... һҪȸ";
	mes ".";
	mes "10 " + @gemstring$ + ", ǽ!";
	next;
	mes "[ϣ̹]";
	mes "ô, ǻҪһ.";
	mes "ûпʯ, ǾȥѼһЩ.";
	mes "Ҳȥط, 㲻";
	mes "̫ż.";
	mes "!";
	close;


LV4_9_NOGEM:
	mes "[ϣ̹]";
	mes ". ȱٲ?";
	mes "һ°.";
	mes "ǰ. Һ˽.";
	close;
	
	
	
//--------------------------------------------------
//Weapon Creation
//--------------------------------------------------
LV4_12:
	mes "[ϣ̹]";
	mes ", ׼. õ...";
	mes "ҽΪһǳƷ.";
	mes "... 㲻һֱ!";
	mes "Ҳκ˷ҵ!";
	next;
	mes "- ϣ̹еĲ -";
	mes "- תȥ, 㿴.  -";
	mes "- 㿴Ҵææ.      -";
	mes "- ʹõķǶô -";
	mes "- ԭʼ, 㻹ܸо -";
	mes "- ֵۼ.  -";
	next;
	mes "[ϣ̹]";
	mes "~ ~ ~";
	mes "~ ~ ~";
	mes "~ ~ ~";
	mes "~ ~ ~";
	mes "Ŷ~ Ŷ~ Ŷ~";
	next;
	mes "[ϣ̹]";
	mes " ";
	mes " ";
	mes ", ǵ! , е...";
	mes "ǲǺܵѽ? , ...";
	next;
	
	mes "[ϣ̹]";
	mes "һɹ! , ǵ, ";
	mes "...";
	mes "Ǹɹ.";
	mes ", ... ,";
	
	switch( lv4_weapon ) {
		case 12:
			mes "Ƽ׶̽!";
			getitem 1225, 1; // 1225,Ƽ׶̽
			break;
		case 13:
			mes "ж̽!";
			getitem 1224, 1; // 1224,ж̽
			break;
		case 14:
			mes "˹ظ!";
			getitem 1367, 1; // 1367,˹ظ
			break;
	}

	set lv4_weapon, 0;
	mes "˵ĳɹù鹦ҵ";
	mes ", ӦøлҰ!";
	next;
	
	mes "[ϣ̹]";
	mes "ӵбȽϲĶʱ,";
	mes "ʱ!";
	mes "Ǹܴ󷽵, ֪?";
	mes "ҪлΪŶ!";
	mes "ټ!";
	close;



//--------------------------------------------------
// 
//--------------------------------------------------
LV4_7:
	mes "[ϣ̹]";
	mes "... ҸоһЩ.";
	mes "ҺźĸҲܰ";
	mes "ʲô.";
	mes "ϣ;ȫ.";
	close;
	
	
	
//--------------------------------------------------
// ۸ͼ
//--------------------------------------------------
LV4_HACK:
	mes "[ϣ̹]";
	mes ". ƺеʲôС.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "]ͼ۸4 .";
	close;
}

//--------------------------------------------------
// ̹, ħ , ֮
//--------------------------------------------------

um_in,156,77,5	script	̹	788,{
	if(event_umbala < 3) goto LumWord;
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Ե! -";
	mes "- ǰѾ. -";
	mes "- ĸ. -";
	close;

	
LV4_NOT_OW:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon == 15) goto LV4_15;
	if(lv4_weapon == 16) goto LV4_16;
	if(lv4_weapon == 17) goto LV4_16;
	if(lv4_weapon == 18) goto LV4_16;
	if(lv4_weapon == 19) goto LV4_19;
	if(lv4_weapon == 20) goto LV4_19;
	if(lv4_weapon == 21) goto LV4_19;
	if(lv4_weapon < 15) goto LV4_14;
	if(lv4_weapon > 21) goto LV4_14;	
	end;
	

LumWord:
		mes "[̹]";
		mes "! Ͱ...! !";
		mes "ͰͰͰ!";
		mes "!";
		mes "ͰͰͰͰͰ!";
	close;

	
LV4_0:
	mes "[̹]";
	mes "... Ҿе㲻Ծ...";
	mes "һİ... ǲ?";
	next;
	mes "[̹]";
	mes "ҽһԼ.";
	mes "ҽ̹, ǻ۵ıҲ";
	mes "...";
	mes ".";
	next;
	mes "[̹]";
	mes ". һλе޴";
	mes "ϣ̹, һλǺһ";
	mes "ҲĴİ.";
	next;
	mes "[̹]";
	mes "ȻǶвŻ, Ҳ";
	mes ", һǵϣ̹,";
	mes "ܶ޴Ĵ, ɴ";
	mes "е.";
	next;
	mes "[̹]";
	mes "ҽ̹";
	mes "һ, ʹһ";
	mes "ЩƷ...";
	mes "˵һֽ";
	mes "Ƽ. .";
	next;
	mes "[̹]";
	mes "ô, 뿴ҵļ?";
	mes "ԸĻ, Ҫ";
	mes ", ҷǳչʾҶ.";
	next;
	
	switch( select( "ð.:, лл." ) ) {
		case 1:
			if(BaseLevel >= 70) goto L4_0_1;
			
			mes "[̹]";
			mes "Sebelumnya saya harus menekankan ini";
			mes "Barang spesial ini akan menjadi berbahaya jika kamu sendiri masih lemah";
			mes "Kamu harus lebih berpengalaman lagi anak muda";
			mes "Naikan level kamu terlebih dahulu";
			mes "jika kamu sudah merasa kuat kembalilah kesini kembali";
			mes "Sampai jumpa ~~";
			break;
L4_0_1:
			mes "[̹]";
			mes "ѽ... ðռ...";
			mes ". ҸҪĲ.";
			mes "ϣܰǼ.";
			mes "ȻǺܶ.";
			next;
			mes "[̹]";
			mes "Ҫ10 ƽ, 50 Ƭ";
			mes "10 黪Ϊ...";
			mes "ҪضƷʩħ.";
			mes ", һҪһЩϡпʯ...";
			next;
			mes "[̹]";
			mes "30 ĸ, ";
			mes "ʯõʯӢ.";
			mes "ÿһֿʯʩ費";
			mes "ͬ, ҵͻв";
			mes "ͬɫ.";
			next;
			mes "[̹]";
			mes ", Ҫ֪Ҳȷ";
			mes "ʲôƷ.";
			mes "ҵ֪ʶܵĺܶ";
			mes "ص.";
			mes "Ҳڴ, 㻹ǵ";
			mes "ܽ.";
			next;
			mes "[̹]";
			mes "˼˵, һȫ.";
			mes "ǳЩ̸... ȥ׼";
			mes ".";
			mes "׼õʱٻ.";
			mes "һ.";
			
			set lv4_weapon, 15;
			break;
		case 2:
			mes "[̹]";
			mes "... . .";
			mes ", ˵еʧ.";
			mes "һȫչʾҵ.";
			mes "ı, ͻ.";
			break;			
	}	
	close;
	


//--------------------------------------------------
// ƽ, ,  + ѡħʯ
//--------------------------------------------------
LV4_15:
	if(countitem($@LV4_Gold) < 10) goto LV4_15_FAIL;
	if(countitem($@LV4_Steel) < 50) goto LV4_15_FAIL;
	if(countitem($@LV4_Emperium) < 10) goto LV4_15_FAIL;

	mes "[̹]";
	mes "~ .";
	mes "ҿ... ׼л";
	mes "... Ҫ,";
	mes "԰?";
	mes "㶼?";
	next;
	
	if (countitem($@LV4_Phlogopite) >= 30 && countitem($@LV4_Olivine) >= 30 && countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_POR;
	if (countitem($@LV4_Phlogopite) >= 30 && countitem($@LV4_Olivine) >= 30) goto LV4_15_PO;
	if (countitem($@LV4_Phlogopite) >= 30 && countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_PR;
	if (countitem($@LV4_Olivine) >= 30 && countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_OR;
	if (countitem($@LV4_Phlogopite) >= 30) goto LV4_15_P;
	if (countitem($@LV4_Olivine) >= 30) goto LV4_15_O;
	if (countitem($@LV4_Rose_Quartz) >= 30) goto LV4_15_R;
	goto LV4_15_NOGEM;
	end;


LV4_15_POR:	
	mes "[̹]";
	mes "Ƕ.";
	mes ", ֻһʹһ.";
	mes "ѡһʹõ.";
	next;
			
	switch( select( "ĸ:ʯ:õʯӢ" ) ) {
		case 1:
			mes "[̹]";
			mes "ĸ... ð. ǿʼǰ,";
			set @gem, $@LV4_Phlogopite;
			set @gemstring$,"ĸ";
			break;
		case 2:
			mes "[̹]";
			mes "ʯ... ð. ǿʼǰ,";
			set @gem, $@LV4_Olivine;
			set @gemstring$,"ʯ";
			break;
		case 3:
			mes "[̹]";
			mes "õʯӢ.... ð. ǿʼǰ,";
			set @gem, $@LV4_Rose_Quartz;
			set @gemstring$,"õʯӢ";
			break;
	}
	
	goto LV4_15_PICK;
	end;
	
	
LV4_15_PO:
	mes "[̹]";
	mes ", ҽһ, ";
	mes ".";
	mes "ֻʹһֿʯ.";
	mes "ʹ?";
	next;
	
	switch( select( "ĸ:ʯ" ) ) {
		case 1:
			mes "[̹]";
			mes "ĸ... ð. ǿʼǰ,";
			set @gem, $@LV4_Phlogopite;
			set @gemstring$,"ĸ";
			break;
		case 2:
			mes "[̹]";
			mes "ʯ... ð. ǿʼǰ,";
			set @gem, $@LV4_Olivine;
			set @gemstring$,"ʯ";
			break;
	}
	
	goto LV4_15_PICK;
	end;
	

LV4_15_PR:	
	mes "[̹]";
	mes ", ҽһ, ";
	mes ".";
	mes "ֻʹһֿʯ.";
	mes "ʹ?";
	next;
	
	switch( select( "ĸ:õʯӢ" ) ) {
		case 1:
			mes "[̹]";
			mes "ĸ... ð. ǿʼǰ,";
			set @gem, $@LV4_Phlogopite;
			set @gemstring$,"ĸ";
			break;
		case 2:
			mes "[̹]";
			mes "õʯӢ.... ð. ǿʼǰ,";
			set @gem, $@LV4_Rose_Quartz;
			set @gemstring$,"õʯӢ";
			break;
	}
	
	goto LV4_15_PICK;
	end;
	
	
LV4_15_OR:	
	mes "[̹]";
	mes ", ҽһ, ";
	mes ".";
	mes "ֻʹһֿʯ.";
	mes "ʹ?";
	next;
	
	switch( select( "ʯ:õʯӢ" ) ) {
			case 1:
				mes "[̹]";
				mes "ʯ... ð. ǿʼǰ,";
				set @gem, $@LV4_Olivine;
				set @gemstring$,"ʯ";
				break;
			case 2:
				mes "[̹]";
				mes "õʯӢ.... ð. ǿʼǰ,";
				set @gem, $@LV4_Rose_Quartz;
				set @gemstring$,"õʯӢ";
				break;
	}
	
	goto LV4_15_PICK;
	end;
	
	
LV4_15_P:
	mes "[̹]";
	mes "ĸ... ð. ǿʼǰ,";
	set @gem, $@LV4_Phlogopite;
	set @gemstring$,"ĸ";
	goto LV4_15_PICK;
	end;
		
		
LV4_15_O:
	mes "[̹]";
	mes "ʯ... ð. ǿʼǰ,";
	set @gem, $@LV4_Olivine;
	set @gemstring$,"ʯ";
	goto LV4_15_PICK;
	end;
	
	
LV4_15_R:
	mes "[̹]";
	mes "õʯӢ.... ð. ǿʼǰ,";
	set @gem, $@LV4_Rose_Quartz;
	set @gemstring$,"õʯӢ";
	goto LV4_15_PICK;
	end;
	
	
LV4_15_PICK:
	mes "Ҫһ.";
	mes "Ǿ, .";
	mes "֪, ҿɲܱ֤";
	mes "Ϊ.";
	next;
	mes "[̹]";
	mes "ڿʼǰ, ܹ";
	mes ", ǽɹ.";
	next;
	mes "[̹]";
	mes "һҪʲô";
	mes ".";
	mes "ܼ, ҪϷ.";
	mes "ϲ4 ħ";
	mes "һ, ħʲô.";
	next;
	mes "[̹]";
	mes "Ҫ5 д1 . ";
	mes "ôѰ.";
	mes "شʧ, ǵ";
	mes "ʲôϵĻ.";
	next;
	mes "[̹]";
	mes "һ10 ѡرʯ.";
	mes "ð, ô";
	mes ", Ψһķ.";
	mes "Ҫ30 ʯȴȻ";
	mes "ʧҪõĶ, ǲ?";
	next;
	mes "[̹]";
	mes ", ҪЩʱ׼...";
	mes "Ե!";
	
	if(countitem($@LV4_Gold) < 10) goto LV4_HACK;
	if(countitem($@LV4_Steel) < 50) goto LV4_HACK;
	if(countitem($@LV4_Emperium) < 10) goto LV4_HACK;
	delitem $@LV4_Gold, 10;
	delitem $@LV4_Steel, 50;
	delitem $@LV4_Emperium, 10;
	if(@gem == $@LV4_Phlogopite) set lv4_weapon, 16;
	if(@gem == $@LV4_Olivine) set lv4_weapon, 17;
	if(@gem == $@LV4_Rose_Quartz) set lv4_weapon, 18; 
	close;


LV4_15_NOGEM:
	mes "[̹]";
	mes "... Ĳ, û";
	mes "ҵκοʯ...";
	mes "30 ĸ, ";
	mes "ʯõʯӢ.";
	close;


LV4_15_FAIL:
	mes "[̹]";
	mes "Ҫ10 ƽ, 50 Ƭ";
	mes "10 黪Ϊ...";
	mes "ҪضƷʩħ.";
	mes ", һҪһЩϡпʯ...";
	next;
	mes "[̹]";
	mes "30 ĸ, ";
	mes "ʯõʯӢ.";
	mes "ÿһֿʯʩ費";
	mes "ͬ, ҵͻв";
	mes "ͬɫ.";
	close;



//--------------------------------------------------
// ²¿Ϸ
//--------------------------------------------------
LV4_16:
	if(lv4_weapon == 16) set @gem, $@LV4_Phlogopite;
	if(lv4_weapon == 17) set @gem, $@LV4_Olivine;
	if(lv4_weapon == 18) set @gem, $@LV4_Rose_Quartz;
	if(countitem(@gem) < 30) goto LV4_16_NOGEM; 
	
	mes "[̹]";
	mes "ܺ, ǿʼ!";
	mes "ܼ. 4 ϲħ.";
	mes "ҽ4 ֮һħ, ";
	mes "ʲô.";
	mes "һ5 Ϸ, ";
	mes "Ҫ5 дһ. 򵥰?";
	next;
	mes "[̹]";
	mes "ǷǳʵϷ!";
	mes "ô, ׼.";
	next;
	
	set @dap, 0;
	set @correct[0],1;
	for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
		mes "[̹]";
		
		if(@i == 1) mes "ϲͷ, ڰ, ";
		if(@i == 1) mes "Ѫʿ, ͱʿЩħ.";
		
		mes ", ²һ.";
		next;
		set @mons, rand(1, 4);
		switch( select( "ͷ:ڰ:Ѫʿ:ʿ" ) ) {
				case 1:
					set @correct[@i], 1;
					if(@mons == 1) set @dap, @dap + 1;
					break;

				case 2:
					set @correct[@i], 2;
					if(@mons == 2) set @dap, @dap + 1;
					break;

				case 3:
					set @correct[@i], 3;
					if(@mons == 3) set @dap, @dap + 1;
					break;

				case 4:
					set @correct[@i], 4;
					if(@mons == 4) set @dap, @dap + 1;
					break;
		}
	}

	mes "[̹]";
	mes "ܺ, ! Ҽ";
	mes ". µħ...";
	next;
	mes "[̹]";

	for( set @i, 1; @i <= 5; set @i, @i + 1 ) {
		if(@correct[@i] == 1) mes "ͷ";
		if(@correct[@i] == 2) mes "ڰ";
		if(@correct[@i] == 3) mes "Ѫʿ";
		if(@correct[@i] == 4) mes "ʿ";
	}

	if(@dap < 1) goto LV4_16_FAIL;
	
	next;
	mes "[̹]";
	mes "" + @dap + " .";
	mes "ܺ.";
	mes "Ҫʱ׼, Ե.";
	
	if(countitem(@gem) < 30) goto LV4_HACK;
	delitem @gem, 30;
	set lv4_weapon, lv4_weapon + 3;
	close;
	
	
LV4_16_FAIL:
	if(countitem(@gem) < 10) goto LV4_HACK;
	delitem @gem, 10;
	
	next;
	mes "[̹]";
	mes "治, ʧ...";
	mes "ʱ, ǲҪ̫";
	mes "ϣ.";
	mes "ô, һҪĻ";
	mes ".";
	mes "10 " + @gemstring$ + ", ǽ.";
	next;
	mes "[̹]";
	mes ".";
	mes "Ҫ֪, Ҫ30 ʯ";
	mes "ȴȻʧҪõĶ.";
	next;
	mes "[̹]";
	mes "Ҫ׼ʲô, ȥ.";
	mes "һ.";
	close;


LV4_16_NOGEM:
	mes "[̹]";
	mes "... ȱ" + @gemstring$ + ".";
	mes "鿴, ȥռ.";
	close;
	
	
	
//--------------------------------------------------
// 
//--------------------------------------------------
LV4_19:
	mes "[̹]";
	mes ", Ҳ׼.";
	mes "Ҫʼ? Ե.";
	mes "ҪЩΧһħȦ.";
	next;
	mes "- ϣ̹еĲ -";
	mes "- ЩΧһȦ -";
	mes "- Һ߳һֵ -";
	mes "- ͬʱ, ΧĿı -";
	mes "- оͲΧ -";
	mes "- ĳǿ.      -";
	next;
	mes "[̹]";
	mes "Ҫ֪Ǵ.";
	mes "ֻҵ";
	mes "ڲ.";
	mes "߹.";
	next;
	mes "[̹]";
	mes ".";
	mes "һõĽ.";
	mes "!";
	next;
	mes "- һ... 㷢Щ -";
	mes "- һ𲢽ϳһ -";
	mes "- µƷ.                -";
	mes "- ζʧܻǳɹ?! -";
	next;
	mes "[̹]";
	mes "?!... ϵһᱣ!";
	mes "治ôϡ";
	mes "!";
	mes "ǵ, ѹʵĸ";
	mes ".";
	
	switch( lv4_weapon ) {
		case 19:
			mes ".";
			getitem 1134, 1; // 1134,
			break;
		case 20:
			mes "ħ .";
			getitem 1139, 1; // 1139,ħ 
			break;
		case 21:
			mes "ǰ֮.";
			getitem 1365, 1; // 1365,֮
			break;
	}

	set lv4_weapon, 0;
	mes "[̹]";
	mes "ô, Ĳ";
	mes ", .";
	mes "ֻܰƷ, Һ";
	mes "˰.";
	next;
	mes "[̹]";
	mes "õ, 㻹֪Ʒ,";
	mes "... .";
	mes ".";
	close;



//--------------------------------------------------
// 
//--------------------------------------------------
LV4_14:
	mes "[̹]";
	mes "... û,";
	mes "ǲ?";
	mes "ΪǸϱ.";
	mes "˱ϵʱ, ͿԿ";
	mes "˵˼.";
	mes "Ҫ°.";
	mes "Ҳ.";
	close;
	
	
	
//--------------------------------------------------
// ޸ͼ
//--------------------------------------------------
LV4_HACK:
	mes "[̹]";
	mes ". ƺеʲôС.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "]ͼ۸4 .";
	close;
}

//--------------------------------------------------
// Bill Thayer, Gives hints for S grade weapons quests
//--------------------------------------------------

aldebaran,178,239,3	script	Bill Thayer	712,{
	// Explain Materials
	if(lv4_weapon == 26) goto LV4_26;
	if(lv4_weapon == 27) goto LV4_27;
	if(lv4_weapon == 28) goto LV4_28;
	
	if(lv4_weapon == 35) goto LV4_35;
	if(lv4_weapon == 36) goto LV4_36;
	if(lv4_weapon == 37) goto LV4_37;

	if(lv4_weapon == 44) goto LV4_44;
	if(lv4_weapon == 45) goto LV4_45;
	if(lv4_weapon == 46) goto LV4_46;
	
	if(lv4_weapon == 53) goto LV4_53;
	if(lv4_weapon == 54) goto LV4_54;
	if(lv4_weapon == 55) goto LV4_55;
	
	// Guide
	if(lv4_weapon == 22) goto LV4_22;
	if(lv4_weapon == 23) goto LV4_23;
		
	if(lv4_weapon == 31) goto LV4_31;
	if(lv4_weapon == 32) goto LV4_32;
	
	if(lv4_weapon == 40) goto LV4_40;
	if(lv4_weapon == 41) goto LV4_41;
	
	if(lv4_weapon == 49) goto LV4_49;
	if(lv4_weapon == 50) goto LV4_50;
	
	mes "[Bill Thayer]";
	mes "...I cannot do anything now.";
	mes "In the past, I used to be a well-known weaponsmith";
	mes "but now I am just a lonely old man who lost all of his sons.";
	mes "Please leave me alone.";
	close;

LV4_27:
LV4_28:
LV4_36:
LV4_37:
LV4_45:
LV4_46:
LV4_54:
LV4_55:
	if(lv4_weapon == 27)
{
			set @LV4_Gem1Name$, "Peridot";
			set @LV4_Gem2Name$, "ʯ";
			set @LV4_Gem3Name$, "";
}
	if(lv4_weapon == 28)
{
			set @LV4_Gem1Name$, "ĸ";
			set @LV4_Gem2Name$, "ʯ";
			set @LV4_Gem3Name$, "õʯӢ";
}
	if(lv4_weapon == 36)
{
			set @LV4_Gem1Name$, "ĸ";
			set @LV4_Gem2Name$, "õʯӢ";
			set @LV4_Gem3Name$, "Peridot";
}
	if(lv4_weapon == 37)
{
			set @LV4_Gem1Name$, "ĸ";
			set @LV4_Gem2Name$, "";
			set @LV4_Gem3Name$, "ˮ";
}
	if(lv4_weapon == 45)
{
			set @LV4_Gem1Name$, "ʯ";
			set @LV4_Gem2Name$, "ĸ";
			set @LV4_Gem3Name$, "õʯӢ";
}
	if(lv4_weapon == 46)
{
			set @LV4_Gem1Name$, "ˮ";
			set @LV4_Gem2Name$, "ʯ";
			set @LV4_Gem3Name$, "ĸ";
}
	if(lv4_weapon == 54)
{
			set @LV4_Gem1Name$, "ĸ";
			set @LV4_Gem2Name$, "";
			set @LV4_Gem3Name$, "ˮ";
}
	if(lv4_weapon == 55)
{
			set @LV4_Gem1Name$, "ʯ";
			set @LV4_Gem2Name$, "ʯ";
			set @LV4_Gem3Name$, "ĸ";
}

	mes "[Bill Thayer]";
	mes "Hmm...it seems that you need 30 of";
	mes @LV4_Gem1Name$ + ", " + @LV4_Gem2Name$ + ", and " + @LV4_Gem3Name$;
	mes "I am sure that those are the materials...";
	mes "but I cannot guarantee anything about the result...";
	next;
	mes "[Bill Thayer]";
	mes "My sons passed away before we finished this research...";
	mes "Hahaha...let's not talk about it.";
	mes "I told you what you need anyway.";
	close;


LV4_26:
LV4_35:
LV4_44:
LV4_53:
	mes "[Bill Thayer]";
	if(lv4_weapon == 26) mes "What, Kayron's research?";
	if(lv4_weapon == 35) mes "What, Reyghema's research?";
	if(lv4_weapon == 44) mes "What? Hein's research?";
	if(lv4_weapon == 53) mes "What? Waltboughst's research?";	
	mes "How do you know him?";
	mes "Were you a friend of him when he was still alive?";
	mes "Ah....there must an act of providence.";
	next;
	
	set lv4_weapon, lv4_weapon + rand(1, 2);
	
	switch( lv4_weapon ) {
		case 27:
			set @LV4_Gem1Name$, "Peridot";
			set LV4_Gem1, $@LV4_Olivine;
			set @LV4_Gem2Name$, "ʯ";
			set LV4_Gem2, $@LV4_Turquoise;
			set @LV4_Gem3Name$, "";
			set LV4_Gem3, $@LV4_Agate;
			break;
		case 28:
			set @LV4_Gem1Name$, "ĸ";
			set LV4_Gem1, $@LV4_Phlogopite;
			set @LV4_Gem2Name$, "ʯ";
			set LV4_Gem2, $@LV4_Pyroxene;
			set @LV4_Gem3Name$, "õʯӢ";
			set LV4_Gem3, $@LV4_Rose_Quartz;
			break;
		case 36:
			set @LV4_Gem1Name$, "ĸ";
			set LV4_Gem1, $@LV4_Muscovite;
			set @LV4_Gem2Name$, "õʯӢ";
			set LV4_Gem2, $@LV4_Rose_Quartz ;
			set @LV4_Gem3Name$, "Peridot";
			set LV4_Gem3, $@LV4_Olivine;
			break;
		case 37:
			set @LV4_Gem1Name$, "ĸ";
			set LV4_Gem1, $@LV4_Biotite;
			set @LV4_Gem2Name$, "";
			set LV4_Gem2, $@LV4_Agate;
			set @LV4_Gem3Name$, "ˮ";
			set LV4_Gem3, $@LV4_Citrine;
			break;
		case 45:
			set @LV4_Gem1Name$, "ʯ";
			set LV4_Gem1, $@LV4_Turquoise;
			set @LV4_Gem2Name$, "ĸ";
			set LV4_Gem2, $@LV4_Biotite;
			set @LV4_Gem3Name$, "õʯӢ";
			set LV4_Gem3, $@LV4_Rose_Quartz;
			break;
		case 46:
			set @LV4_Gem1Name$, "ˮ";
			set LV4_Gem1, $@LV4_Citrine;
			set @LV4_Gem2Name$, "ʯ";
			set LV4_Gem2, $@LV4_Pyroxene;
			set @LV4_Gem3Name$, "ĸ";
			set LV4_Gem3, $@LV4_Phlogopite;
			break;
		case 54:
			set @LV4_Gem1Name$, "ĸ";
			set LV4_Gem1, $@LV4_Muscovite;
			set @LV4_Gem2Name$, "";
			set LV4_Gem2, $@LV4_Agate;
			set @LV4_Gem3Name$, "ˮ";
			set LV4_Gem3, $@LV4_Citrine;
			break;
		case 55:
			set @LV4_Gem1Name$, "ʯ";
			set LV4_Gem1, $@LV4_Pyroxene;
			set @LV4_Gem2Name$, "ʯ";
			set LV4_Gem2, $@LV4_Turquoise;
			set @LV4_Gem3Name$, "ĸ";
			set LV4_Gem3, $@LV4_Phlogopite;
			break;
	}
	
	mes "[Bill Thayer]";
	mes "Hmm...it seems that you need 30 of";
	mes @LV4_Gem1Name$ + ", " + @LV4_Gem2Name$ + ", and " + @LV4_Gem3Name$;
	mes "I am sure that those are the materials...";
	mes "but I cannot guarantee anything about the result...";
	next;
	mes "[Bill Thayer]";
	mes "My sons passed away before we finished this research...";
	mes "Hahaha...let's not talk about it.";
	mes "I told you what you need anyway.";
	close;	


LV4_22:
LV4_23:
	mes "[Bill Thayer]";
	mes "Oh well, I told you already";
	mes "that there is nothing I can do for you...";
	mes "since my sons are all gone...why are";
	mes "you wasting my breath? ^4D4DFFYou are helpless.^000000";
	set lv4_weapon, 23;
	next;
	mes "[Bill Thayer]";
	mes "...you just made me";
	mes "miss my sons again...";
	mes "Please leave me alone.";
	close;
	

LV4_31:
LV4_32:
	mes "[Bill Thayer]";
	mes "All of my sons broke my heart by dying young...";
	mes "...youth...what is youth?";
	mes "^4D4DFFThat means that you never regret anything!^000000";
	set lv4_weapon, 32;
	next;
	mes "[Bill Thayer]";
	mes "That was what I used to tell to my sons.";
	mes "Please remember that,";
	mes "never regret anything that you have done.";
	mes "However, in order to do that, you must";
	mes "do everything right...that's all I can tell you for now.";
	close;
	
		
LV4_40:
LV4_41:
	mes "[Bill Thayer]";
	mes "...no matter how much you are willing to pay me,";
	mes "I am not going to forge any weapons.";
	mes "Even when I was actively forging weapons,";
	mes "I didn't accept money from my clients.";
	mes "You know why?";
	next;
	mes "[Bill Thayer]";
	mes "It brings me bad luck ^4D4DFFto^000000";
	mes "^4D4DFFforge a good weapon.^000000";
	mes "Therefore I didn't receive money from them.";
	set lv4_weapon, 41;
	next;
	mes "[Bill Thayer]";
	mes "Well, I am not going to do so";
	mes "even if you offer me something else other than money";
	mes "...unless all of my sons come back";
	mes "alive....";
	close;


LV4_49:
LV4_50:
		mes "[Bill Thayer]";
		mes "...do you not have anything to do?";
		mes "I hope you stop bothering me";
		mes "and trying your best for your work.";
		mes "Ah...trying best does not always";
		mes "result in a success though.";
		next;
		mes "[Bill Thayer]";
		mes "However, ^4D4DFFall the successful men^000000";
		mes "^4D4DFFin the history tried their best!^000000";
		mes "I hope you will remember that.";
		mes "I used to tell this to my sons when they were alive.";
		mes "Hahaha...";
		set lv4_weapon, 50;
		close;
}

//--------------------------------------------------
// Kayron, creates Longinus' Spear, Guillotine, Great Axe and Brionac
//--------------------------------------------------

niflheim,240,193,3	script	Kayron	794,{
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- You are currently overweight. -";
	mes "- Please lose some weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
	mes "[Kayron]";
	mes "Bah, I cannot believe";
	mes "that such a weak man like you even came here.";
	mes "You have an invisible sign on your forehead";
	mes "that indicates you are a weakling. Be strong first.";
	close;
	

LV4_LEVEL_PASS:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon < 22) goto LV4_21;
	if(lv4_weapon == 22) goto LV4_22;
	if(lv4_weapon == 23) goto LV4_23;
	if(lv4_weapon == 24) goto LV4_24;
	if(lv4_weapon == 25) goto LV4_25;
	if(lv4_weapon == 26) goto LV4_26;
	if(lv4_weapon == 27) goto LV4_27;
	if(lv4_weapon == 28) goto LV4_28;
	if(lv4_weapon == 29) goto LV4_29;
	if(lv4_weapon == 30) goto LV4_30;
	if(lv4_weapon > 30) goto LV4_31;
	end;


LV4_0:
LV4_22:
	mes "[Kayron]";
	mes "I used to be called Kayron when I was alive.";
	mes "But now I am nothing but";
	mes "a ghost wandering this place.";
	mes "I am worthless...I cannot do anything";
	mes "without a body...";
	next;
	
	if(lv4_weapon == 0) goto LV4_0_ASK;
	
	mes "[Kayron]";
	mes "Ah...I cannot remember what I was going to say...";
	mes "Waaahhh.....I cannot remember....";
	mes "My memory is gone...!";
	close;
	
LV4_0_ASK:
	switch( select( "Show interest.:Ignore him." ) ) {
		case 1:
			mes "[Kayron]";
			mes "Ah...I cannot remember what I was going to say...";
			mes "Waaahhh.....I cannot remember....";
			mes "My memory is gone...!";
			set lv4_weapon, 22;
			close;
			break;
		case 2:
			mes "- Because you decided to ignore him, -";
			mes "- you are no longer able to hear him. -";
			close;
			break;
	}
	end;
	

LV4_21:
LV4_31:
	mes "[Kayron]";
	mes "I feel something different about you.";
	mes "Did you come here with a purpose?";
	mes "I am envious of you...";
	close;


LV4_23:
	mes "[Kayron]";
	mes "I used to be called Kayron when I was alive.";
	mes "But now I am nothing but";
	mes "a ghost wandering this place.";
	mes "I am worthless...I cannot do anything";
	mes "without a body...";
	next;
	set @dap1$, "You are helpless.";
	input @answer1$;
	if(@answer1$ == @dap1$) goto LV4_23_CORRECT;
	mes "[Kayron]";
	mes "...? What did you just say?";
	mes "I am sorry but I don't think I understood you.";
	close;

LV4_23_CORRECT:
	mes "[Kayron]";
	mes "Yes, You are helpless...?! Eh?";
	mes "That was my father's favorite saying!";
	mes "Whoa?! Ah...";
	mes "Yes...I forgot that I am dead already.";
	mes "Why did you make me recall something from my past?";
	mes "It is no use now...";
	next;
	mes "[Kayron]";
	mes "But I want to do something in return...";
	mes "since you made me find a piece of my mind.";
	mes "I used to be a weaponsmith in the past,";
	mes "therefore I am going to forge a nice weapon for you.";
	next;
	mes "[Kayron]";
	mes "But you have to gather the materials for me.";
	mes "As you see, I do not have a body";
	mes "that would allow me to touch other objects...";
	mes "So you got to help me with that.";
	next;
	mes "[Kayron]";
	mes "Luckily this place is filled with mysterious energy,";
	mes "that makes my work easier!";
	mes "Heh, even if I fail to forge one,";
	mes "I don't have to worry about dying.";
	mes "Because I am dead already! Muhahahaha!";
	next;
	mes "[Kayron]";
	mes "I will talk to you in a while.";
	mes "I am trying to think of the receipe...";
	set lv4_weapon, 24;
	close;
	
	
LV4_25:
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_25_BASE_MAT;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_25_BASE_MAT;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_25_BASE_MAT;
	if(countitem($@LV4_Gold) < 20) goto LV4_25_BASE_MAT;
	
	mes "[Kayron]";
	mes "Oh...you brought everything I need!";
	mes "You are a reliable person unlike your appearance.";
	mes "But here is the thing...";
	mes "There are some more materials I need...";
	mes "But I cannot think of any of them...my memory";
	mes "is unclear...arrrrph...";
	next;
	mes "[Kayron]";
	mes "I need to think about that a little longer.";
	mes "I know that I really need those materials...awwww....";
	mes "Do you have any idea to bring my memory back?";
	mes "At the same time, rest assured that the materials";
	mes "you brought will be used for my creation. So let me keep them for you.";
	
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
	if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
	delitem $@LV4_Hammer_Of_Blacksmith, 2;
	delitem $@LV4_Emperium_Anvil, 1;
	delitem $@LV4_Illusion_Flower, 1;
	delitem $@LV4_Gold, 20;
	set lv4_weapon, 26;
	close;

LV4_24:
LV4_25_BASE_MAT:
	switch( lv4_weapon ) {
		case 24:
			mes "[Kayron]";
			mes "Oh, you came back at a right time.";
			mes "I just finished my thoughts. Let me tell you one thing.";
			mes "I cannot guarantee you which weapon will come out of this.";
			mes "Also you must be willing to take a risk as well...";
			mes "I guess that the result will be affected by the power";
			mes "of Nifflheim at the time I make.";
			next;
			mes "[Kayron]";
			mes "Let me give you the list of materials";
			mes "I need. They are quite a lot,";
			mes "so write them down if you need.";
			break;
		case 25:
			mes "[Kayron]";
			mes "I will tell you the list of materials I need again.";
			mes "I think I need a lot of materials...so";
			mes "write them down if you need.";
			break;
		}
		next;
		mes "[Kayron]";
		mes "I need 2 ߼,";
		mes "1 , 1 뻨 and 20 ƽ...";
		next;
		mes "[Kayron]";
		mes "Bring these to me first. I am kind of worried";
		mes "that I forgot something...but I will try to remember";
		mes "while waiting for you to bring these items.";
		next;
		mes "[Kayron]";
		mes "Have a safe travel.";
		set lv4_weapon, 25;
		close;
		

LV4_27:
LV4_28:
	if(countitem(LV4_Gem1) < 30) goto LV4_27_NOGEM;
	if(countitem(LV4_Gem2) < 30) goto LV4_27_NOGEM;
	if(countitem(LV4_Gem3) < 30) goto LV4_27_NOGEM;
	mes "[Kayron]";
	mes "...Um? The items that you brought to me seem";
	mes "to be good materials for my creation...";
	mes "Give them to me, I shall try first!";
	next;
	mes "[Kayron]";
	mes "Oh...I was right! How did you";
	mes "know these are materials I need?";
	mes "Great, give me a moment!";
	next;
	mes "[Kayron]";
	mes "...wait, I must test your luck first.";
	mes "Since I am not sure about the result,";
	mes "we should place trust in luck for the result of my creation.";
	mes "You must have good luck...";
	next;
	mes "[Kayron]";
	mes "We are going to play 'Rock, Paper, Scissors'.";
	mes "You must win at least 2 out of 3 times.";
	mes "If you fail, you must throw away a large amount";
	mes "of one of the 3 kinds of ore that you have brought.";
	mes "It is for driving away your bad luck.";
	next;
	mes "[Kayron]";
	mes "I will give you a piece of paper.";
	mes "You will write down one among 'Rock, Paper, or Scissors'.";
	mes "I will do the same at the same time.";
	mes "We will compare each other's paper after.";
	next;
	
	set @shobu, 0;
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@i == 2) mes "[Kayron]";
		if(@i == 2) mes "Let's play the second one!";
		if(@i == 3) mes "[Kayron]";
		if(@i == 3) mes "This will be the last one!";
		if(@i == 3) mes "Let's compare after this.";
		set @npchand[@i], rand(1, 3);
		switch( select( "Scissors:Rock:Paper" ) ) {
			case 1:
				set @myhand[@i], 1;
				if(@npchand[@i] == 3) set @shobu, @shobu + 1;
				break;
			case 2:
				set @myhand[@i], 2;
				if(@npchand[@i] == 1) set @shobu, @shobu + 1;
				break;
			case 3:
				set @myhand[@i], 3;
				if(@npchand[@i] == 2) set @shobu, @shobu + 1;
				break;
		}
	}
		
	if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem3) < 30) goto LV4_HACK;

	if(@shobu > 1) goto LV4_27_WIN;

	switch ( rand(1 ,3) ) {
		case 1:
			delitem LV4_Gem1, 30;
			break;
		case 2:
			delitem LV4_Gem2, 30;
			break;
		case 3:
			delitem LV4_Gem3, 30;
			break;
	}
	goto LV4_27_RESULT;
		
LV4_27_WIN:
	delitem LV4_Gem1, 30;
	delitem LV4_Gem2, 30;
	delitem LV4_Gem3, 30;
	set lv4_weapon, lv4_weapon + 2;
	goto LV4_27_RESULT;
	
LV4_27_RESULT:
	mes "[Kayron]";
	mes "Okay...I played in the order of...";
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@npchand[@i] == 1) mes "Scissors";
		if(@npchand[@i] == 2) mes "Rock";
		if(@npchand[@i] == 3) mes "Paper";
	}

	next;
	mes "[Kayron]";
	mes "You did in the order of...";

	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@myhand[@i] == 1) mes "Scissors";
		if(@myhand[@i] == 2) mes "Rock";
		if(@myhand[@i] == 3) mes "Paper";
	}

	next;

	if(@shobu > 1) goto LV4_27_SAY_WIN;
	
	mes "[Kayron]";
	mes "Well well well...you lost the game.";
	mes "Ah~ you were close though...";
	mes "We must drive away bad luck.";
	next;
	mes "[Kayron]";
	mes "Okay, I will wait here,";
	mes "go bring me the materials again...";
	close;
			
LV4_27_SAY_WIN:
	mes "[Kayron]";
	mes "Let's see...";
	mes "You won total " + @shobu + " times.";
	mes "Ah~ you must be really good at game!";
	mes "Yes, your luck is at its highest!";
	next;
	mes "[Kayron]";
	mes "I am going to keep my promise.";
	mes "But I need some time to prepare.";
	mes "Give me the materials now and I will talk to you later.";
	close;

LV4_26:
LV4_27_NOGEM:
	mes "[Kayron]";
	mes "Arph...it has not gotten into my memory yet.";
	mes "Awww....this is a problem.";
	mes "I used to often discuss the materials";
	mes "with my family...now I cannot remember what they are...";
	close;


LV4_29:
LV4_30:
	mes "[Kayron]";
	mes "Hahaha...you came back at the right time.";
	mes "The result? Do you want to know about the result?...";
	mes "Haha...okay...let's see...";
	next;
	mes "[Kayron]";
	mes "...YES! It's a success!";
	mes "I created the weapon that got me killed last time!";
	mes "Look at this...haha! I died while making this!";
	mes "... The name of the weapon is...";
	
	
	switch( rand(1, 2) ) {
		case 1:
			if(lv4_weapon == 29) mes "Great Axe! Weee~ I made it!";
			if(lv4_weapon == 29) getitem 1364 ,1; // 1364,Great_Axe
			if(lv4_weapon == 30) mes "Longinus's Spear! Weee~ I made it!";
			if(lv4_weapon == 30) getitem 1469, 1; // 1469,Longinus's_Spear
			break;
		case 2:
			if(lv4_weapon == 29) mes "Guillotine! Weee~ I made it!";
			if(lv4_weapon == 29) getitem 1369, 1; // 1369,Guillotine
			if(lv4_weapon == 30) mes "Brionac! Weee~ I made it!";
			if(lv4_weapon == 30) getitem 1470, 1; // 1470,Brionac
	}
	
	set lv4_weapon, 0;
	next;
	mes "[Kayron]";
	mes "I finally succeeded in the research...";
	mes "I want to show this result to my father...";
	mes "He will be really happy for this.";
	next;
	mes "[Kayron]";
	mes "Ah~ I feel my memories are fading again...";
	mes "If you see me next time...";
	mes "please let me remember the memories again...";
	mes "Thank you...";
	close;
	


//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Kayron]";
	mes ". ƺеʲôС.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "]ͼ۸4 .";
	close;
}

//--------------------------------------------------
// Reyghema, creates Berserk, Tjungkulleti, Rudra's Bow and Brocca(Skewer)
//--------------------------------------------------

niflheim,99,268,5	script	Reyghema	794,{
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- You are currently overweight. -";
	mes "- Please lose some weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
	mes "[Reyghema]";
	mes "Um? Do you have any business with me?";
	mes "Sorry but I don't. I'm also not";
	mes "speaking to a weak person like you.";
	mes "Have a safe travel~";
	close;
	

LV4_LEVEL_PASS:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon < 31) goto LV4_30;
	if(lv4_weapon == 31) goto LV4_31;
	if(lv4_weapon == 32) goto LV4_32;
	if(lv4_weapon == 33) goto LV4_33;
	if(lv4_weapon == 34) goto LV4_34;
	if(lv4_weapon == 35) goto LV4_35;
	if(lv4_weapon == 36) goto LV4_36;
	if(lv4_weapon == 37) goto LV4_37;
	if(lv4_weapon == 38) goto LV4_38;
	if(lv4_weapon == 39) goto LV4_39;
	if(lv4_weapon > 39) goto LV4_40;
	end;


LV4_0:
LV4_31:
	mes "[Reyghema]";
	mes "Darn it...I didn't want to die!";
	mes "Well...there is no living thing that wants to die but...";
	mes "Especially me, I was too young to die!";
	mes "Youth! ...Ah...I just remember the word.";
	mes "Speaking of which...I think I usually said something related to that...";
	next;
	
	if(lv4_weapon == 0) goto LV4_0_ASK;
	
	mes "[Reyghema]";
	mes "Ah...I cannot remember what I was going to say...";
	mes "Waaahhh.....I cannot remember....";
	mes "My memory is gone...!";
	close;
	
LV4_0_ASK:
	switch( select( "Show interest.:Igonore him." ) ) {
		case 1:
			mes "[Reyghema]";
			mes "Ah...I cannot remember what I was going to say...";
			mes "Waaahhh.....I cannot remember....";
			mes "My memory is gone...!";
			set lv4_weapon, 31;
			close;
			break;
		case 2:
			mes "- Because you decided to ignore him, -";
			mes "- you are no longer able to hear him. -";
			close;
			break;
	}
	end;
	

LV4_30:
LV4_40:
	mes "[Reyghema]";
	mes "I feel something different about you.";
	mes "Did you come here with a purpose?";
	mes "I am envious of you...";
	close;


LV4_32:
	mes "[Reyghema]";
	mes "I used to be called Reyghema when I was alive.";
	mes "But now I am nothing but";
	mes "a ghost wandering this place.";
	mes "I am worthless...I cannot do anything";
	mes "without a body...";
	next;
	set @dap2$, "That means that you never regret anything!";
	input @answer2$;
	if(@answer2$ == @dap2$) goto LV4_32_CORRECT;
	mes "[Reyghema]";
	mes "What? Do you want to play a game with me or what?";
	mes "Unfortunately I have something to do...";
	mes "wait...what was I going to do?";
	close;

LV4_32_CORRECT:
	mes "[Reyghema]";
	mes "...";
	next;
	mes "[Reyghema]";
	mes "...";
	mes "......";
	next;
	mes "[Reyghema]";
	mes "...";
	mes "......";
	mes ".........";
	next;
	mes "[Reyghema]";
	mes "That's right! I am Bill Thayer the Weaponsmith's";
	mes "second son! And I must forge a weapon";
	mes "in order to not regret my youth!";
	mes "Even if I am dead, I cannot give it up!";
	next;
	mes "[Reyghema]";
	mes "Hey you, thank you for letting me have my memory back!";
	mes "You need to do me another favor!";
	mes "Bring me some items, I need to forge a weapon.";
	mes "Once I make one, I will give it to you in return for your favor.";
	next;
	mes "[Reyghema]";
	mes "Reyghema, breathe deeply first...phew~.";
	mes "Give me a second!";
	set lv4_weapon, 33;
	close;
	
	
LV4_34:
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_34_BASE_MAT;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_34_BASE_MAT;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_34_BASE_MAT;
	if(countitem($@LV4_Gold) < 20) goto LV4_34_BASE_MAT;
	
	mes "[Reyghema]";
	mes "Oh...you brought everything I need!";
	mes "You are a reliable person unlike you appear.";
	mes "But here is the thing...";
	mes "There are some more materials I need...";
	mes "But I cannot think of any of them...my memory";
	mes "is unclear...arrrrph...";
	next;
	mes "[Reyghema]";
	mes "I need to think about that a little longer.";
	mes "I know that I really need those materials...awwww....";
	mes "Do you have any idea to bring my memory back?";
	mes "At the same time, rest assured that the materials";
	mes "you brought will be used for my creation. So let me keep them for you.";
	
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
	if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
	delitem $@LV4_Hammer_Of_Blacksmith, 2;
	delitem $@LV4_Emperium_Anvil, 1;
	delitem $@LV4_Illusion_Flower, 1;
	delitem $@LV4_Gold, 20;
	set lv4_weapon, 35;
	close;

LV4_33:
LV4_34_BASE_MAT:
	switch( lv4_weapon ) {
		case 33:
			mes "[Reyghema]";
			mes "Okay. You don't need any other explaination, do you?";
			mes "I will tell you what I need";
			mes "so please do not forget those materials.";
			break;
		case 34:
			mes "[Reyghema]";
			mes "I will tell you the list of materials I need again.";
			mes "I think I need a lot of materials...so";
			mes "write them down if you need.";
			break;
		}
		next;
		mes "[Reyghema]";
		mes "I need 2 ߼,";
		mes "1 , 1 뻨 and 20 ƽ...";
		mes "...wait...are they all...or do I need more?!";
		if(lv4_weapon == 33) next;
		if(lv4_weapon == 33) mes "[Reyghema]";
		if(lv4_weapon == 33) mes "Ah...I think need something more...it's very important...";
		if(lv4_weapon == 33) mes "But I cannot remember what more I need....!";
		if(lv4_weapon == 33) mes "Bah...this is so frustrating.";
		set lv4_weapon, 34;
		close;
		

LV4_36:
LV4_37:
	if(countitem(LV4_Gem1) < 30) goto LV4_36_NOGEM;
	if(countitem(LV4_Gem2) < 30) goto LV4_36_NOGEM;
	if(countitem(LV4_Gem3) < 30) goto LV4_36_NOGEM;
	mes "[Reyghema]";
	mes "...Um? The items that you brought to me seem";
	mes "to be good materials for my creation...";
	mes "Give them to me, I shall try first!";
	next;
	mes "[Reyghema]";
	mes "Oh...I was right! How did you";
	mes "know these are materials I need?";
	mes "Great, give me a moment!";
	next;
	mes "[Reyghema]";
	mes "...wait, I must test your luck first.";
	mes "Since I am not sure about the result,";
	mes "we should place trust in luck for the result of my creation.";
	mes "You must have good luck...";
	next;
	mes "[Reyghema]";
	mes "We are going to play 'Rock, Paper, Scissors'.";
	mes "You must win at least 2 out of 3 times.";
	mes "If you fail, you must leave a large amount";
	mes "of one material you have brought.";
	mes "It is for driving away your bad luck.";
	next;
	mes "[Reyghema]";
	mes "I will give you a piece of paper.";
	mes "You will write down one among 'Rock, Paper, or Scissors'.";
	mes "I will do the same at the same time.";
	mes "We will then compare each other's paper.";
	next;
	
	set @shobu, 0;
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@i == 2) mes "[Reyghema]";
		if(@i == 2) mes "Let's play the second one!";
		if(@i == 3) mes "[Reyghema]";
		if(@i == 3) mes "This will be the last one!";
		if(@i == 3) mes "Let's compare after this.";
		set @npchand[@i], rand(1, 3);
		switch( select( "Scissors:Rock:Paper" ) ) {
			case 1:
				set @myhand[@i], 1;
				if(@npchand[@i] == 3) set @shobu, @shobu + 1;
				break;
			case 2:
				set @myhand[@i], 2;
				if(@npchand[@i] == 1) set @shobu, @shobu + 1;
				break;
			case 3:
				set @myhand[@i], 3;
				if(@npchand[@i] == 2) set @shobu, @shobu + 1;
				break;
		}
	}
		
	if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem3) < 30) goto LV4_HACK;

	if(@shobu > 1) goto LV4_36_WIN;

	switch ( rand(1 ,3) ) {
		case 1:
			delitem LV4_Gem1, 30;
			break;
		case 2:
			delitem LV4_Gem2, 30;
			break;
		case 3:
			delitem LV4_Gem3, 30;
			break;
	}
	goto LV4_36_RESULT;
		
LV4_36_WIN:
	delitem LV4_Gem1, 30;
	delitem LV4_Gem2, 30;
	delitem LV4_Gem3, 30;
	set lv4_weapon, lv4_weapon + 2;
	goto LV4_36_RESULT;
	
LV4_36_RESULT:
	mes "[Reyghema]";
	mes "Okay...I played in the order of...";
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@npchand[@i] == 1) mes "Scissors";
		if(@npchand[@i] == 2) mes "Rock";
		if(@npchand[@i] == 3) mes "Paper";
	}

	next;
	mes "[Reyghema]";
	mes "You did in the order of...";

	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@myhand[@i] == 1) mes "Scissors";
		if(@myhand[@i] == 2) mes "Rock";
		if(@myhand[@i] == 3) mes "Paper";
	}

	next;

	if(@shobu > 1) goto LV4_36_SAY_WIN;
	
	mes "[Reyghema]";
	mes "Well well well...you lost the game.";
	mes "Ah~ you were close though...";
	mes "We must drive away bad luck.";
	next;
	mes "[Reyghema]";
	mes "Okay, I will wait here,";
	mes "go bring me the materials again...";
	close;
			
LV4_36_SAY_WIN:
	mes "[Reyghema]";
	mes "Let's see...";
	mes "You won total " + @shobu + " times.";
	mes "Ah~ you must be really good at game!";
	mes "Yes, your luck is at its highest!";
	next;
	mes "[Reyghema]";
	mes "I am going to keep my promise.";
	mes "But I need some time to prepare.";
	mes "Give me the materials now and I will talk to you later.";
	close;

LV4_35:
LV4_36_NOGEM:
		mes "[Reyghema]";
		mes "Not yet! I have not remembered it yet! Awwww...";
		mes "This is killing me...";
		mes "Oh, wait...I died already...";
		mes "God damn it!";
	close;


LV4_38:
LV4_39:
	mes "[Reyghema]";
	mes "..................";
	next;
	mes "[Reyghema]";
	mes "...YES! It's a success!";
	mes "I created the weapon that got me killed last time!";
	mes "Look at this...haha! I died while making this!";
	mes "... The name of the weapon is...";
	
	switch( rand(1, 2) ) {
		case 1:
			if(lv4_weapon == 38) mes "Berserk! Weee~ Weee~ I made it!";
			if(lv4_weapon == 38) getitem 1814 ,1; // 1814,Berserk
			if(lv4_weapon == 39) mes "Tjungkuletti! Weee~ I made it!";
			if(lv4_weapon == 39) getitem 1416, 1; // 1416,Tjungkuletti
			break;
		case 2:
			if(lv4_weapon == 38) mes "Rudra's Bow! Weee~ I made it!";
			if(lv4_weapon == 38) getitem 1720, 1; // 1720,Bow_of_Rudra
			if(lv4_weapon == 39) mes "Brocca!";
			if(lv4_weapon == 39) getitem 1415, 1; // 1415,Skewer
	}
	
	set lv4_weapon, 0;
	next;
	mes "[Reyghema]";
	mes "...*sigh*.";
	next;
	mes "[Reyghema]";
	mes "Happiness lasts too short...";
	mes "As I am a dead man, I think I am not allowed";
	mes "to keep the memory of past....";
	mes "My memory is fading again...";
	next;
	mes "[Reyghema]";
	mes "But thank you for letting me achieve";
	mes "my long-cherished desire.";
	mes "If we meet again, please let me";
	mes "retrieve my memory of past again.";
	mes "So I can try forging another weapon.";
	next;
	mes "[Reyghema]";
	mes "Farewell, adventurer.";
	close;
	
	

//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Reyghema]";
	mes ". ƺеʲôС.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "]ͼ۸4 .";
	close;
}

//--------------------------------------------------
// Hein, creates Excalibur, Schweisersabel, Dragon Slayer and Edge
//--------------------------------------------------

niflheim,187,280,3	script	Hein	795,{
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- You are currently overweight. -";
	mes "- Please lose some weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
	mes "[Hein]";
	mes "You should care about other people";
	mes "more than yourself...";
	mes "You are quite weak for an adventurer.";
	close;
	

LV4_LEVEL_PASS:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon < 40) goto LV4_39;
	if(lv4_weapon == 40) goto LV4_40;
	if(lv4_weapon == 41) goto LV4_41;
	if(lv4_weapon == 42) goto LV4_42;
	if(lv4_weapon == 43) goto LV4_43;
	if(lv4_weapon == 44) goto LV4_44;
	if(lv4_weapon == 45) goto LV4_45;
	if(lv4_weapon == 46) goto LV4_46;
	if(lv4_weapon == 47) goto LV4_47;
	if(lv4_weapon == 48) goto LV4_48;
	if(lv4_weapon > 48) goto LV4_49;
	end;


LV4_0:
LV4_40:
	mes "[Hein]";
	mes "Ah...are you going to ask me something?";
	mes "However, I am not accepting money";
	mes "from my client. Because.";
	mes "It brings me bad luck to...";
	mes "...whaat? What did I just say?";
	mes "Awww....I am confused.";
	next;
	
	if(lv4_weapon == 0) goto LV4_0_ASK;
	
	mes "[Hein]";
	mes "Why did I speak of money?";
	mes "I am a dead man and dead people";
	mes "do not need money...arf!";
	mes "My head is hurting...I guess that";
	mes "a dead man can have a headache!";
	close;
	
LV4_0_ASK:
	switch( select( "Show interest.:Igonore him." ) ) {
		case 1:
			mes "[Hein]";
			mes "Why did I speak of money?";
			mes "I am a dead man and dead people";
			mes "do not need money...arf!";
			mes "My head is hurting...I guess that";
			mes "a dead man can have a headache!";
			set lv4_weapon, 40;
			close;
			break;
		case 2:
			mes "- Because you decided to ignore him, -";
			mes "- you are no longer able to hear him. -";
			close;
			break;
	}
	end;
	

LV4_39:
LV4_49:
	mes "[Hein]";
	mes "I feel something different from you.";
	mes "Did you come here with a purpose?";
	mes "I am envious of you...";
	close;


LV4_41:
	mes "[Hein]";
	mes "Ah...are you going to ask me something?";
	mes "However, I am not accepting money";
	mes "from my client. Because.";
	mes "It brings me bad luck to...";
	next;
	set @dap3$, "to forge a good weapon.";
	input @answer3$;
	if(@answer3$ == @dap3$) goto LV4_41_CORRECT;
	mes "[Hein]";
	mes "...? What are you talking about?";
	mes "What was I going to say?";
	mes "Arf....my head is hurting...!";
	close;

LV4_41_CORRECT:
	mes "[Hein]";
	mes "That's right! It's bad luck!";
	mes "Creating weapons is betting! And I am...I am?";
	mes "Oh right...I forgot that. Yes, I am dead.";
	mes "Ahahahahaha.";
	set lv4_weapon, 42;
	next;
	mes "[Hein]";
	mes "Well, I must be a lucky dead man";
	mes "for remembering my past!";
	mes "Hahahahaha!";
	next;
	mes "[Hein]";
	mes "Perhaps God wants me to";
	mes "continue my research...?";
	mes "wait, let me ask you a favor.";
	next;
	mes "[Hein]";
	mes "Can you bring me some materials";
	mes "that I need for my research?";
	mes "If I succeed in the research,";
	mes "I will give you the result in return.";
	next;
	mes "[Hein]";
	mes "You can take your time to think of my offer.";
	mes "Please talk to me later.";	
	close;
	
	
LV4_43:
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_43_BASE_MAT;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_43_BASE_MAT;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_43_BASE_MAT;
	if(countitem($@LV4_Gold) < 20) goto LV4_43_BASE_MAT;
	
	mes "[Hein]";
	mes "Oh, you have brought the materials I asked.";
	mes "Here's the thing. I cannot remember what I need other than those...";
	mes "Aww....I need some more time to think of them...";
	next;
	mes "[Hein]";
	mes "Please try to search what I need...if you can.";
	mes "Of course, it will not be an easy job for you";
	mes "to do so...but I know you have a body to move with your will...";
	mes "It is still better than being a ghost like me...";
	next;
	mes "[Hein]";
	mes "Please give me all the materials you have brought.";
	mes "I will keep them for you.";
	
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
	if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
	delitem $@LV4_Hammer_Of_Blacksmith, 2;
	delitem $@LV4_Emperium_Anvil, 1;
	delitem $@LV4_Illusion_Flower, 1;
	delitem $@LV4_Gold, 20;
	set lv4_weapon, 44;
	close;

LV4_42:
LV4_43_BASE_MAT:
	switch( lv4_weapon ) {
		case 42:
			mes "[Hein]";
			mes "I will take you speaking to me again";
			mes "as the approval of my request.";
			mes "Thank you so much.";
			next;
			mes "[Hein]";
			mes "I need 2 ߼,";
			mes "1 , 1 뻨 and 20 ƽ...";
			mes "Most likely they are the ones I need.";
			next;
			mes "[Hein]";
			mes "And I do need 3 more things...";
			mes "but I have a hard time remembering what they are.";
			mes "That means that my memory of the past is not";
			mes "absolutely back.";
			next;
			mes "[Hein]";
			mes "*sigh*...I am so sorry to ask of you this...";
			mes "but please search for what those 3 things are.";
			mes "In the meantime, I will try to remember them.";
			mes "Thank you.";
			set lv4_weapon, 43;
			break;
		case 43:
			mes "[Hein]";
			mes "I need 2 ߼,";
			mes "1 , 1 뻨 and 20 ƽ...";
			mes "Most likely they are the ones I need.";
			break;
		}
		close;
		

LV4_45:
LV4_46:
	if(countitem(LV4_Gem1) < 30) goto LV4_45_NOGEM;
	if(countitem(LV4_Gem2) < 30) goto LV4_45_NOGEM;
	if(countitem(LV4_Gem3) < 30) goto LV4_45_NOGEM;
	mes "[Hein]";
	mes "...Um? The items that you brought to me seem";
	mes "to be good materials for my creation...";
	mes "Give them to me, I shall try first!";
	next;
	mes "[Hein]";
	mes "Oh...I was right! How did you";
	mes "know these are materials I need?";
	mes "Great, give me a moment!";
	next;
	mes "[Hein]";
	mes "...Wait, I must test your luck first.";
	mes "Since I am not sure about the result,";
	mes "we should trust to luck for the result of my creation.";
	mes "You must have good luck...";
	next;
	mes "[Hein]";
	mes "We are going to play 'Rock, Paper, Scissors'.";
	mes "You must win at least 2 out of 3 times.";
	mes "If you fail, you must leave a large amount";
	mes "of one material you have brought.";
	mes "It is for driving away your bad luck.";
	next;
	mes "[Hein]";
	mes "I will give you a piece of paper.";
	mes "You will write down one among 'Rock, Paper, or Scissors'.";
	mes "I will do the same at the same time.";
	mes "We will then compare each other's paper at the end.";
	next;
	
	set @shobu, 0;
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@i == 2) mes "[Hein]";
		if(@i == 2) mes "Let's play the second one!";
		if(@i == 3) mes "[Hein]";
		if(@i == 3) mes "This will be the last one!";
		if(@i == 3) mes "Let's compare after this.";
		set @npchand[@i], rand(1, 3);
		switch( select( "Scissors:Rock:Paper" ) ) {
			case 1:
				set @myhand[@i], 1;
				if(@npchand[@i] == 3) set @shobu, @shobu + 1;
				break;
			case 2:
				set @myhand[@i], 2;
				if(@npchand[@i] == 1) set @shobu, @shobu + 1;
				break;
			case 3:
				set @myhand[@i], 3;
				if(@npchand[@i] == 2) set @shobu, @shobu + 1;
				break;
		}
	}
		
	if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem3) < 30) goto LV4_HACK;

	if(@shobu > 1) goto LV4_45_WIN;

	switch ( rand(1 ,3) ) {
		case 1:
			delitem LV4_Gem1, 30;
			break;
		case 2:
			delitem LV4_Gem2, 30;
			break;
		case 3:
			delitem LV4_Gem3, 30;
			break;
	}
	goto LV4_45_RESULT;
		
LV4_45_WIN:
	delitem LV4_Gem1, 30;
	delitem LV4_Gem2, 30;
	delitem LV4_Gem3, 30;
	set lv4_weapon, lv4_weapon + 2;
	goto LV4_45_RESULT;
	
LV4_45_RESULT:
	mes "[Hein]";
	mes "Okay...I played in the order of...";
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@npchand[@i] == 1) mes "Scissors";
		if(@npchand[@i] == 2) mes "Rock";
		if(@npchand[@i] == 3) mes "Paper";
	}

	next;
	mes "[Hein]";
	mes "You did in the order of...";

	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@myhand[@i] == 1) mes "Scissors";
		if(@myhand[@i] == 2) mes "Rock";
		if(@myhand[@i] == 3) mes "Paper";
	}

	next;

	if(@shobu > 1) goto LV4_45_SAY_WIN;
	
	mes "[Hein]";
	mes "Well well well...you lost the game.";
	mes "Ah~ you were close though...";
	mes "We must drive away bad luck.";
	next;
	mes "[Hein]";
	mes "Okay, I will wait here,";
	mes "go bring me the materials again...";
	close;
			
LV4_45_SAY_WIN:
	mes "[Hein]";
	mes "Let's see...";
	mes "You won total " + @shobu + " times.";
	mes "Ah~ you must be really good at game!";
	mes "Yes, your luck is at its highest!";
	next;
	mes "[Hein]";
	mes "I am going to keep my promise.";
	mes "But I need some time to prepare.";
	mes "Give me the materials now and I will talk to you later.";
	close;

LV4_44:
LV4_45_NOGEM:
		mes "[Hein]";
		mes "I am sorry but please give me more time to remember the materials...";
		mes "I had really good memory when I was alive...";
		mes "So I could even recite them right after I woke up...";
	close;


LV4_47:
LV4_48:
	mes "[Hein]";
	mes "Oh, yes. I just finished the work.";
	mes "Do you want to know the result? Okay...";
	mes "Breathe deeply...before we check.";
	mes "The result is...";
	next;
	mes "[Hein]";
	mes "a Big Success! This is great!";
	mes "I have not labored in vain!";
	mes "Let's see the weapon...it is...";
	
	switch( rand(1, 2) ) {
		case 1:
			if(lv4_weapon == 47) mes "Edge.";
			if(lv4_weapon == 47) getitem 1132 ,1; // 1132,Edge
			if(lv4_weapon == 48) mes "Dragon Slayer.";
			if(lv4_weapon == 48) getitem 1166, 1; // 1166,Dragon_Slayer
			break;
		case 2:
			if(lv4_weapon == 47) mes "Excalibur.";
			if(lv4_weapon == 47) getitem 1137, 1; // 1137,Excalibur
			if(lv4_weapon == 48) mes "Schweizersabel.";
			if(lv4_weapon == 48) getitem 1167, 1; // 1167,Schweizersabel
	}

	set lv4_weapon, 0;	
	next;
	mes "[Hein]";
	mes "Well...this is it.";
	mes "I feel my memory is fading again...";
	mes "Hahaha...being dead is not good.";
	next;
	mes "[Hein]";
	mes "Thank you for your help. And if you have";
	mes "a chance to visit Nifflheim again,";
	mes "please come back and retrieve my memory once more...";
	next;
	mes "[Hein]";
	mes "Aaahhhh! I don't think I will";
	mes "remember you next time...";
	mes "Take care, adventurer...father, I made it...";
	close;
	
	

//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Hein]";
	mes ". ƺеʲôС.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "]ͼ۸4 .";
	close;
}

//--------------------------------------------------
// Waltboughst, creates Byeollungum, Exorciser(excercise), Combat Knife and Grand Cross
//--------------------------------------------------

niflheim,331,72,3	script	Waltboughst	795,{
	set @NowWeight, MaxWeight - Weight;
	if (@NowWeight >= 3000) goto LV4_NOT_OW;
	mes "- Wait a minute! -";
	mes "- You are currently overweight. -";
	mes "- Please lose some weight -";
	mes "- and try again. -";
	close;

	
LV4_NOT_OW:
	if(BaseLevel >= 80) goto LV4_LEVEL_PASS;
	mes "[Waltboughst]";
	mes "...Hah!";
	close;
	

LV4_LEVEL_PASS:
	if(lv4_weapon == 0) goto LV4_0;
	if(lv4_weapon < 49) goto LV4_48;
	if(lv4_weapon == 49) goto LV4_49;
	if(lv4_weapon == 50) goto LV4_50;
	if(lv4_weapon == 51) goto LV4_51;
	if(lv4_weapon == 52) goto LV4_52;
	if(lv4_weapon == 53) goto LV4_53;
	if(lv4_weapon == 54) goto LV4_54;
	if(lv4_weapon == 55) goto LV4_55;
	if(lv4_weapon == 56) goto LV4_56;
	if(lv4_weapon == 57) goto LV4_57;
	if(lv4_weapon > 57) goto LV4_58;
	end;


LV4_0:
LV4_49:
	mes "[Waltboughst]";
	mes "Ah~ it is so frustrating to be a dead man.";
	mes "Because I cannot do anything without a body.";
	mes "You know what my father used to say?";
	mes "Trying best does not always";
	mes "result in a success.";
	mes "However...errr?";
	next;
	
	if(lv4_weapon == 0) goto LV4_0_ASK;
	
	mes "[Waltboughst]";
	mes "...What was my father's";
	mes "quote? Why am I stuck in";
	mes "here after death? Hey, you";
	mes "Do you know anything about";
	mes "Waltboughst when he was";
	mes "alive?";
	close;
	
LV4_0_ASK:
	switch( select( "Show interest.:Igonore him." ) ) {
		case 1:
			mes "[Waltboughst]";
			mes "...what did he say afterwards?";
			mes "Speaking of which, why am I";
			mes "so anxious to do something?";
			mes "I am a dead man, and a dead man is not supposed to do anything!";
			mes "Hey, do you know anything about me when I was alive?";
			set lv4_weapon, 49;
			close;
			break;
		case 2:
			mes "- Because you decided to ignore him, -";
			mes "- you are no longer able to hear him. -";
			close;
			break;
	}
	end;
	

LV4_48:
LV4_58:
	mes "[Waltboughst]";
	mes "I feel something different about you.";
	mes "Did you come here with a purpose?";
	mes "I am envious of you...";
	close;


LV4_50:
	mes "[Waltboughst]";
	mes "Ah~ it is so frustrating to be a dead man.";
	mes "Because I cannot do anything without a body.";
	mes "You know what my father used to say?";
	mes "Trying best does not always";
	mes "result in a success.";
	mes "However...";
	next;
	set @dap4$, "All the successful men in the history tried their best!";
	input @answer4$;
	if(@answer4$ == @dap4$) goto LV4_50_CORRECT;
	mes "[Waltboughst]";
	mes "...What? What did you just say?";
	mes "Hmmm.";
	close;

LV4_50_CORRECT:
	mes "[Waltboughst]";
	mes "Yes! That was it!";
	mes "Since I am dead, I cannot even try!";
	mes "Eh...?! Ah!";
	mes "I see, I see now.";
	mes "I must have been killed by some kind of accident!";
	set lv4_weapon, 51;
	next;
	mes "[Waltboughst]";
	mes "Okay, I am not going to end this way.";
	mes "Hey, you were meant to meet me!";
	mes "You got to do me a favor, now!";
	next;
	mes "[Waltboughst]";
	mes "I will give you the result of my research";
	mes "in return! All I want is to compete my research,";
	mes "not the result.";
	next;
	mes "[Waltboughst]";
	mes "Well, give me some time to remember";
	mes "what I need for my research.";
	mes "I will talk to you later.";
	close;
	
	
LV4_52:
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_52_BASE_MAT;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_52_BASE_MAT;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_52_BASE_MAT;
	if(countitem($@LV4_Gold) < 20) goto LV4_52_BASE_MAT;
	
	mes "[Waltboughst]";
	mes "Oh...you brought everything I need!";
	mes "You were quick this time...I am still having";
	mes "a hard time remembering what I need other than those.";
	mes "This is not good, this is not good at all.";
	next;
	mes "[Waltboughst]";
	mes "Anyways, I will keep those materials for you.";
	mes "And give me some more times to";
	mes "remember what I need...arph!";
	
	if(countitem($@LV4_Hammer_Of_Blacksmith) < 2) goto LV4_HACK;
	if(countitem($@LV4_Emperium_Anvil) < 1) goto LV4_HACK;
	if(countitem($@LV4_Illusion_Flower) < 1) goto LV4_HACK;
	if(countitem($@LV4_Gold) < 20) goto LV4_HACK;
	delitem $@LV4_Hammer_Of_Blacksmith, 2;
	delitem $@LV4_Emperium_Anvil, 1;
	delitem $@LV4_Illusion_Flower, 1;
	delitem $@LV4_Gold, 20;
	set lv4_weapon, 53;
	close;

LV4_51:
LV4_52_BASE_MAT:
	switch( lv4_weapon ) {
		case 51:
			mes "[Waltboughst]";
			mes "Umm, you came back so early.";
			mes "I just remembered the materials.";
			next;
			mes "[Waltboughst]";
			mes "I need 2 ߼,";
			mes "1 , 1 뻨 and 20 ƽ...";
			next;
			mes "[Waltboughst]";
			mes "I do need some other items...but I need some time";
			mes "to remember those. Oh well,";
			mes "we have enough time, so let me think of them.";
			set lv4_weapon, 52;
			break;
		case 52:
			mes "[Waltboughst]";
			mes "I need 2 ߼,";
			mes "1 , 1 뻨 and 20 ƽ...";
			mes "Most likey they will be the ones I need...";
			break;
		}
		close;
		

LV4_54:
LV4_55:
	if(countitem(LV4_Gem1) < 30) goto LV4_54_NOGEM;
	if(countitem(LV4_Gem2) < 30) goto LV4_54_NOGEM;
	if(countitem(LV4_Gem3) < 30) goto LV4_54_NOGEM;
	mes "[Waltboughst]";
	mes "...Um? The items that you brought to me seem";
	mes "to be good materials for my creation...";
	mes "Give them to me, I shall try first!";
	next;
	mes "[Waltboughst]";
	mes "Oh...I was right! How did you";
	mes "know these are materials I need?";
	mes "Great, give me a moment!";
	next;
	mes "[Waltboughst]";
	mes "...wait, I must test your luck first.";
	mes "Since I am not sure about the result,";
	mes "we should trust to luck for the result of my creation.";
	mes "You must have good luck...";
	next;
	mes "[Waltboughst]";
	mes "We are going to play 'Rock, Paper, Scissors'.";
	mes "You must win at least 2 out of 3 times.";
	mes "If you fail, you must leave a large amount";
	mes "of one material you have brought.";
	mes "It is for driving away your bad luck.";
	next;
	mes "[Waltboughst]";
	mes "I will give you a piece of paper.";
	mes "You will write down one among 'Rock, Paper, or Scissors'.";
	mes "I will do the same at the same time.";
	mes "We will then compare each other's paper at the end.";
	next;
	
	set @shobu, 0;
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@i == 2) mes "[Waltboughst]";
		if(@i == 2) mes "Let's play the second one!";
		if(@i == 3) mes "[Waltboughst]";
		if(@i == 3) mes "This will be the last one!";
		if(@i == 3) mes "Let's compare after this.";
		set @npchand[@i], rand(1, 3);
		switch( select( "Scissors:Rock:Paper" ) ) {
			case 1:
				set @myhand[@i], 1;
				if(@npchand[@i] == 3) set @shobu, @shobu + 1;
				break;
			case 2:
				set @myhand[@i], 2;
				if(@npchand[@i] == 1) set @shobu, @shobu + 1;
				break;
			case 3:
				set @myhand[@i], 3;
				if(@npchand[@i] == 2) set @shobu, @shobu + 1;
				break;
		}
	}
		
	if(countitem(LV4_Gem1) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem2) < 30) goto LV4_HACK;
	if(countitem(LV4_Gem3) < 30) goto LV4_HACK;

	if(@shobu > 1) goto LV4_54_WIN;

	switch ( rand(1 ,3) ) {
		case 1:
			delitem LV4_Gem1, 30;
			break;
		case 2:
			delitem LV4_Gem2, 30;
			break;
		case 3:
			delitem LV4_Gem3, 30;
			break;
	}
	goto LV4_54_RESULT;
		
LV4_54_WIN:
	delitem LV4_Gem1, 30;
	delitem LV4_Gem2, 30;
	delitem LV4_Gem3, 30;
	set lv4_weapon, lv4_weapon + 2;
	goto LV4_54_RESULT;
	
LV4_54_RESULT:
	mes "[Waltboughst]";
	mes "Okay...I played in the order of...";
	
	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@npchand[@i] == 1) mes "Scissors";
		if(@npchand[@i] == 2) mes "Rock";
		if(@npchand[@i] == 3) mes "Paper";
	}

	next;
	mes "[Waltboughst]";
	mes "You did in the order of...";

	for( set @i, 1; @i <= 3; set @i, @i + 1 ) {
		if(@myhand[@i] == 1) mes "Scissors";
		if(@myhand[@i] == 2) mes "Rock";
		if(@myhand[@i] == 3) mes "Paper";
	}

	next;

	if(@shobu > 1) goto LV4_54_SAY_WIN;
	
	mes "[Waltboughst]";
	mes "Well well well...you lost the game.";
	mes "Ah~ you were close though...";
	mes "We must drive away bad luck.";
	next;
	mes "[Waltboughst]";
	mes "Okay, I will wait here,";
	mes "go bring me the materials again...";
	close;
			
LV4_54_SAY_WIN:
	mes "[Waltboughst]";
	mes "Let's see...";
	mes "You won total " + @shobu + " times.";
	mes "Ah~ you must be really good at game!";
	mes "Yes, your luck is at its highest!";
	next;
	mes "[Waltboughst]";
	mes "I am going to keep my promise.";
	mes "But I need some time to prepare.";
	mes "Give me the materials now and I will talk to you later.";
	close;

LV4_53:
LV4_54_NOGEM:
	mes "[Waltboughst]";
	mes "Arph...I haven't remembered them yet.";
	mes "Awww....this is a problem.";
	mes "I must think of them as soon as possible...";
	close;


LV4_56:
LV4_57:
	mes "[Waltboughst]";
	mes "Hehe, I made something with the materials";
	mes "in this short time! Wanna see?";
	mes "Aren't you wondering about the result?";
	mes "Hmmm....let's see...";
	next;
	mes "[Waltboughst]";
	mes "Waltboughst never fails!";
	mes "Besides you had good luck,";
	mes "so it resulted in a perfect success!";
	mes "You got a nice weapon here, it is...";
	
	switch( rand(1, 2) ) {
		case 1:
			if(lv4_weapon == 56) mes "Byeollungum!";
			if(lv4_weapon == 56) getitem 1140 ,1; // 1140,Byeollungum
			if(lv4_weapon == 57) mes "Exorciser!";
			if(lv4_weapon == 57) getitem 1233, 1; // 1233,Exercise
			break;
		case 2:
			if(lv4_weapon == 56) mes "Combat Knife!";
			if(lv4_weapon == 56) getitem 1228, 1; // 1228,Combat_Knife
			if(lv4_weapon == 57) mes "Grand Cross!!";
			if(lv4_weapon == 57) getitem 1528, 1; // 1528,Grand_Cross
	}
	
	set lv4_weapon, 0;
	next;
	mes "[Waltboughst]";
	mes "I am genius! Hahahaha!";
	mes "I made it when my brothers could not!";
	mes "Muhahahahahaha!";
	mes "Eh...err? Arrr...phhh?";
	next;
	mes "[Waltboughst]";
	mes "Damn...I must try too hard.";
	mes "My memory is fading again...";
	mes "Oh well, somehow I proved";
	mes "that I am a genius even after I died.";
	next;
	mes "[Waltboughst]";
	mes "If you want me to display my genius again,";
	mes "come retrieve my memory again.";
	mes "And thank you!";
	next;
	mes "[Waltboughst]";
	mes "Ah...my memory's dying again...";
	mes "Farewell~ I don't think I will remember you";
	mes "but I hope you will remember me as Waltboughst";
	mes "the genius in the age!";
	close;
	
	

//--------------------------------------------------
//Hack Attempt
//--------------------------------------------------
LV4_HACK:
	mes "[Waltboughst]";
	mes ". ƺеʲôС.";
	set lv4_weapon, 0;
	logmes "[" +strcharinfo(0) + "]ͼ۸4 .";
	close;
}
