//===== rAthena Script =======================================
//= Direction of Prayer
//===== Description: =========================================
//= [Walkthrough Conversion]
//--- Main quest NPCs for Episode 18.1
//
// Notes:
// - The last value of ep18_1_main is 57
//===== Changelogs: ==========================================
//= 1.0 First version. [Capuche]
//============================================================

// Main Quest: Step 1.
// ba_in01,26,266,3	script	Smart Ellie#ep18ely01	4_EP17_TABLET,{

ba_in01,22,262,6	script(CLOAKED)	EST#ep181_est01	4_F_ESTLOVELOY,{
	if (ep18_1_main == 1) {
		mes "[EST]";
		mes "Take care of yourself.";
		close;
	}
	end;
}


// ba_in01,24,262,7	script(CLOAKED)	Rookie#ep181_rk01	4_M_ROOKIE,3,0,{
ba_in01,24,262,7	script(CLOAKED)	Rookie#ep181_rk01	4_M_ROOKIE,{
	if (ep18_1_main == 1) {
		cutin "16loo_03.bmp",0;
		mes "[Rookie]";
		mes "I'm sorry, but I can't help it.";
		mes "We also have to take care of corporate work, so we can't just play around.";
		mes "See you again after everything is resolved.";
		close3;
	}
	end;
// OnTouch:	// unknown effect
	// end;
}


// Main Quest: Step 2.
rachel,182,176,3	script	Masked Girl	4_F_MASK,5,5,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		mes "Someone is speaking loudly";
		next;
		mes "[Mini Elly]";
		mes "Take me out of the bag. Put me on your head.";
		npctalk "Mini Elly: Take me out of the bag. Put me on your head.", "", bc_self;
		close;
	}
	.@char_id = getcharid(0);
	if (ep18_1_main == 1) {
		mes "Someone is speaking loudly";
		next;
		mes "[Mini Elly]";
		mes "I have received a signal that I have arrived at roughly local coordinates.";
		mes "Is this the place I called you?";
		next;
		if (select( "yes", "no" ) == 2)
			end;
		mes "[" + strcharinfo(0) + "]";
		mes "That's right. Somewhere around here.";
		next;
		mes "[Mini Elly]";
		mes "Is there anything suspicious in your eyes?";
		mes "I've never seen anyone who is neither an intruder nor a guest, and I know that those wearing those masks are suspicious.";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "They are the residents here...";
		next;
		mes "[Mini Elly]";
		mes "Is that so? It's a strange outfit.";
		mes "I will remember.";
		next;
		mes "[Speaker]";
		mes "...not";
		mes "It's not about being at peace with your neighbors or anything like that.";
		mes "What we need is a slightly better future.";
		npctalk "Speaker: If we don't act now, the future of our Arunafeltz will be ruined!", "", bc_self;
		cloakoffnpcself( "Spectator#ep18c01" );
		cloakoffnpcself( "Spectator#ep18c04" );
		npctalk "What is it?", "Spectator#ep18c01", bc_self;
		next;
		mes "[Speaker]";
		mes "What can you say if this isn't an antagonism?";
		mes "Anyone can see that this is a sign that the country is going to be divided, can you ignore it like this?";
		cloakoffnpcself( "Spectator#ep18c05" );
		next;
		mes "[Speaker]";
		mes "Why the hell did this happen?";
		mes "Why don't you respect the other person?";
		mes "Each one may have their own opinion, but I would like to say this.";
		cloakoffnpcself( "Spectator#ep18c02" );
		npctalk "Who are you?", "Spectator#ep18c02", bc_self;
		next;
		mes "[Speaker]";
		mes "What does it mean to you as a citizen of this country to commit all your values ??to your birth line and to engage in violence?";
		mes "What does it mean to you?";
		cloakoffnpcself( "Female Priest#e18a" );
		cloakoffnpcself( "Spectator#ep18c03" );
		npctalk "Who are you?", "Spectator#ep18c01", bc_self;
		npctalk "Take it out!", "Spectator#ep18c02", bc_self;
		npctalk "I've never seen it before, who the hell is that?", "Spectator#ep18c03", bc_self;
		next;
		mes "[Speaker]";
		mes "Don't you think it's weird to be angry about something like this?";
		npctalk "Right!", "Spectator#ep18c04", bc_self;
		npctalk "Hey what are you, native!", "Spectator#ep18c02", bc_self;
		npctalk "Isn't it strange that we need to distinguish that?", "Spectator#ep18c03", bc_self;
		next;
		mes "[Speaker]";
		mes "I don't want you to fight";
		mes "Unless everyone is together, we have no future.";
		npctalk "Who are you again!", "Spectator#ep18c02", bc_self;
		npctalk "This person has no answer", "Spectator#ep18c04", bc_self;
		next;
		mes "The speaker didn't mind the murmuring of the audience and went on with it.";
		next;
		mes "[Mini Elly]";
		mes "It's amazing. There are quite a few people wearing masks. Even if we all have the same face, we can tell each other apart.";
		npctalk "Hey, that's fine, people keep getting hurt and being taken to the hospital, so what's the point?", "Spectator#ep18c02", bc_self;
		npctalk "Who's to blame for that?", "Spectator#ep18c05", bc_self;
		next;
		mes "[Mini Elly]";
		mes "why does that person interfere with the right person?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Because I don't believe that's right.";
		npctalk "I saw it a while ago, I said that the fight was just a fight, didn't it only target migrants?", "Spectator#ep18c02", bc_self;
		npctalk "I heard that the native kids came back after being beaten?", "Spectator#ep18c05", bc_self;
		next;
		mes "[Mini Elly]";
		mes "The commotion is growing.";
		mes "Everyone argues that only they are right, and they don't seem to want to listen to what others are saying.";
		npctalk "It's wrong to use violence against people in the first place!", "Spectator#ep18c05", bc_self;
		npctalk "You must have done the right thing.", "Spectator#ep18c02", bc_self;
		npctalk "I hate to hear the word right. What the hell is right?", "Spectator#ep18c04", bc_self;
		next;
		mes "[Mini Elly]";
		mes "The sound is getting louder than before.";
		npctalk "It's wrong to say that you have a cause for harming the victim!", "Spectator#ep18c05", bc_self;
		next;
		mes "[Priest looking nervous]";
		mes "What should I do... Should I dry it?";
		npctalk "It's a big deal...", "Female Priest#e18a", bc_self;
		completequest 8681;
		setquest 8682;
		ep18_1_main = 2;
		close;
	}

	if (ep18_1_main >= 2 && ep18_1_main <= 4) {
		mes "Speech never stops";
		mes "The atmosphere is harsh.";
		npctalk "Mini Elly: There's someone out there that doesn't fit this place.", "", bc_self;
		
		if (ep18_1_main == 2 || ep18_1_main == 3) {
			cloakoffnpcself( "Spectator#ep18c01" );
			cloakoffnpcself( "Spectator#ep18c04" );
			cloakoffnpcself( "Spectator#ep18c05" );
			cloakoffnpcself( "Spectator#ep18c02" );
			cloakoffnpcself( "Female Priest#e18a" );
			cloakoffnpcself( "Spectator#ep18c03" );
			if (ep18_1_main == 3)
				cloakoffnpcself( "Spectator#ep18c06" );
		}
		else {
			cloakoffnpcself( "Girl#ep18c07" );
			cloakoffnpcself( "Policeman Gala#ep18c08" );
			cloakoffnpcself( "Policeman Iz#ep18c09" );
		}
		close;
	}
	end;

OnTouch:
	.@char_id = getcharid(0);
	if (ep18_1_main == 2 || ep18_1_main == 3) {
		cloakoffnpcself( "Spectator#ep18c01" );
		cloakoffnpcself( "Spectator#ep18c04" );
		cloakoffnpcself( "Spectator#ep18c05" );
		cloakoffnpcself( "Spectator#ep18c02" );
		cloakoffnpcself( "Female Priest#e18a" );
		cloakoffnpcself( "Spectator#ep18c03" );
		if (ep18_1_main == 3)
			cloakoffnpcself( "Spectator#ep18c06" );
		end;
	}
	if (ep18_1_main == 4) {
		cloakoffnpcself( "Girl#ep18c07" );
		cloakoffnpcself( "Policeman Gala#ep18c08" );
		cloakoffnpcself( "Policeman Iz#ep18c09" );
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8681) == 1" );
	end;
}

rachel,179,175,7	duplicate(dummy_cloaked_npc)	Spectator#ep18c01	4_F_MASK
rachel,177,178,5	duplicate(dummy_cloaked_npc)	Spectator#ep18c02	4_M_RACHMAN1
rachel,179,171,7	duplicate(dummy_cloaked_npc)	Spectator#ep18c03	4_M_RACHMAN2
rachel,181,170,0	duplicate(dummy_cloaked_npc)	Spectator#ep18c04	4_M_MIDDLE
rachel,186,173,1	duplicate(dummy_cloaked_npc)	Spectator#ep18c05	4_F_MASK
rachel,184,171,1	duplicate(dummy_cloaked_npc)	Spectator#ep18c06	4_F_MASK
rachel,187,170,3	duplicate(dummy_cloaked_npc)	Girl#ep18c07	4_F_DST_CHILD
rachel,187,173,3	duplicate(dummy_cloaked_npc)	Policeman Gala#ep18c08	4_M_RASWORD
rachel,187,174,3	duplicate(dummy_cloaked_npc)	Policeman Iz#ep18c09	4_M_RASWORD

// Main Quest: Step 3.
rachel,183,170,3	script(CLOAKED)	Female Priest#e18a	4_M_TRAINEE,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	.@char_id = getcharid(0);
	if (ep18_1_main == 2) {
		cloakoffnpcself( "Spectator#ep18c06" );
		mes "[The Impatient Priest]";
		mes "...?";
		mes "Oh, did you hear me? I'm sorry.";
		next;
		mes "[The Impatient Priest]";
		mes "That... there. Apparently there are a lot of unrest like this these days.";
		next;
		mes "[The Impatient Priest]";
		mes "So... Did you come to Rachel for the first time?";
		npctalk "How do I know that? I'll see all the funny ones.", "Spectator#ep18c02", bc_self;
		npctalk "What? Is there anything that this bastard can't say because he wants to hear it?", "Spectator#ep18c04", bc_self;
		next;
		select("No" );
		mes "[The Impatient Priest]";
		mes "Ummm...";
		mes "I don't know how much you know about Arunafelz...";
		mes "Are you aware of the conflict between...";
		next;
		select( "heard" );
		mes "[The Impatient Priest]";
		mes "That's right. It's a shame... This is a chronic situation.";
		mes "Recently, it seems that some people are giving street speeches like this...";
		next;
		mes "[The Impatient Priest]";
		mes "People who interrupt me like that often appear.";
		mes "But even if I want to dry it, as you can see...";
		npctalk "Why are you fighting like that?", "Spectator#ep18c01", bc_self;
		npctalk "Fighting is only for ignorant things.", "Spectator#ep18c03", bc_self;
		next;
		mes "[The Impatient Priest]";
		mes "...I can't get out easily because it seems like I'm on the side of the ruling class, immigrants.";
		mes "But you can't pretend you didn't see it...";
		next;
		mes "[The Impatient Priest]";
		mes "This time, I was worried about a speech by a person I had never seen before, so I didn't realize it...";
		npctalk "What and how?", "Spectator#ep18c02", bc_self;
		npctalk "Looks right?", "Spectator#ep18c03", bc_self;
		next;
		mes "[The Impatient Priest]";
		mes "...";
		npctalk "Is this kid?", "Spectator#ep18c02", bc_self;
		npctalk "Uh huh, fists come out, fists come out. Just hit me.", "Spectator#ep18c03", bc_self;
		next;
		mes "[The Impatient Priest]";
		mes "It's a big deal...";
		mes "Adventurer, maybe...";
		next;
		select( "Do you want it to dry?" );
		mes "[The Impatient Priest]";
		mes "...Blessed be Freya.";
		changequest 8682,8683;
		ep18_1_main = 3;
		close;
	}
	if (ep18_1_main == 3) {
		mes "How do I do it?";
		next;
		select( "Man, be quiet there", "What the hell is that man over there?", "The man who came out of the boat!" );
		mes "[Spectators out of the boat]";
		mes "Who said you are uncle?";
		npctalk "What else is this?", "Spectator#ep18c02", bc_self;
		npctalk "Aigoo...", "", bc_self;
		next;
		select( "What is it, adventurer" );
		mes "[Spectators out of the boat]";
		mes "Huh? Who hasn't been an adventurer in their youth?";
		mes "Where have you been? I'm the one who climbed to the top of the Thor volcano over there.";
		mes "Unlike the fragile natives.";
		npctalk "It's a no-brainer, that must be a tourist product.", "Spectator#ep18c03", bc_self;
		npctalk "There must be kids who brag about that.", "Spectator#ep18c05", bc_self;
		next;
		select( "I am in the Temple of Sethrumnir" );
		mes "[" + strcharinfo(0) + "]";
		mes "Further in the Temple of Sethrumnir...";
		next;
		cloakoffnpcself( "Girl#ep18c07" );
		cloakoffnpcself( "Policeman Gala#ep18c08" );
		cloakoffnpcself( "Policeman Iz#ep18c09" );
		mes "[Girl]";
		mes "Senior security guard! There you go!";
		next;
		mes "[Spectators out of the boat]";
		mes "Dude, who else sang that?";
		npctalk "Aww, let's play before it gets annoying.", "Spectator#ep18c04", bc_self;
		npctalk "I hope we never see each other again", "Spectator#ep18c05", bc_self;
		npctalk "I need to go home...", "Spectator#ep18c06", bc_self;
		cloakonnpcself( "Spectator#ep18c01" );
		cloakonnpcself( "Spectator#ep18c02" );
		cloakonnpcself( "Spectator#ep18c03" );
		cloakonnpcself( "Spectator#ep18c04" );
		cloakonnpcself( "Spectator#ep18c05" );
		cloakonnpcself( "Spectator#ep18c06" );
		npctalk "Mini Elly: Are you saying things like this are going to be washed away like the ebb?", "", bc_self;
		next;
		mes "[Policeman Gala]";
		mes "There was a fight, so I came to see it...";
		mes "adventurer?";
		next;
		mes "[The Impatient Priest]";
		mes "Oh no! The adventurer teacher here is here to help me...";
		mes "Ah, I am Priest Junok. I have returned to Sethrumnir this time.";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "" + strcharinfo(0) + ".";
		mes "adventurer";
		next;
		mes "[Policeman Gala]";
		mes "Good job";
		mes "The atmosphere is ugly these days...";
		next;
		select( "What the hell is going on?" );
		mes "[" + strcharinfo(0) + "]";
		mes "What the hell is going on?";
		mes "It's such a mess...";
		next;
		mes "The security guard and the priest thought for a moment, then looked around, exchanged glances and nodded.";
		next;
		mes "[Junok]";
		mes "Adventurer, in the Temple of Sethrumnir, what did you say?";
		mes "In the meantime, I also have a job to see at the temple, so I think you can talk there for a while.";
		mes "Keep talking in front of the temple.";
		changequest 8683,8684;
		ep18_1_main = 4;
		getitem 1000405,20;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		navigateto("ra_temple",72,54);
		close;
	}
	if (ep18_1_main == 4) {
		mes "[Junok]";
		mes "I'll follow you soon.";
		mes "<NAVI>See you at [in front of the temple]<INFO>ra_temple,72,54,0,101,0</INFO></NAVI>";
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8682) == 1 || isbegin_quest(8683) == 1" );
	end;
}


ra_temple,118,30,0	script	#ep18w01	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch:
	if (ep18_1_main == 4) {
		.@char_id = getcharid(0);
		cloakoffnpcself( "Female Priest#e18b" );
		cloakoffnpcself( "Policeman Gala#ep18c10" );
		end;
	}
	if (ep18_1_main == 5 || ep18_1_main == 6) {
		.@char_id = getcharid(0);
		cloakoffnpcself( "Female Priest#e18c" );
		cloakoffnpcself( "Policeman Gala#ep18c12" );
		cloakoffnpcself( "Policeman Iz#ep18c13" );
		cloakoffnpcself( "Policeman Calsort#c14" );
		cloakoffnpcself( "Heart Hunter#ep18c15" );
		cloakoffnpcself( "Heart Hunter#ep18c16" );
		end;
	}
	end;
}

ra_temple,72,54,0	duplicate(#ep18w01)	#ep18wj1	HIDDEN_WARP_NPC,4,4
ra_temple,39,143,0	duplicate(#ep18w01)	#ep18w02_A	HIDDEN_WARP_NPC,3,3
ra_temple,20,134,0	duplicate(#ep18w01)	#ep18w02_B	HIDDEN_WARP_NPC,3,3
ra_temple,30,142,0	duplicate(#ep18w01)	#ep18w02_C	HIDDEN_WARP_NPC,3,3

// Main Quest: Step 4.
ra_temple,72,54,5	script(CLOAKED)	Female Priest#e18b	4_M_TRAINEE,{
	if (ep18_1_main == 4) {
		if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
			mes "[Mini Elly]";
			mes "Take me out of the bag. Put me on your head.";
			npctalk "Mini Elly: Take me out of the bag. Put me on your head.", "", bc_self;
			close;
		}
		mes "[Mini Elly]";
		mes "Guests, wait a minute.";
		npctalk "Mini Elly: I have a question.", "", bc_self;
		next;
		if (select( "Ellie, what's going on?", "For a clue?" ) == 2) {
			mes "[Mini Elly]";
			mes "That's it, though.";
			next;
		}
		.@char_id = getcharid(0);
		mes "[Mini Elly]";
		mes "Have you ever been here before?";
		npctalk "Junok: Adventurer?", "", bc_self;
		next;
		select( "Yes" );
		mes "[Mini Elly]";
		mes "While coming all the way here, I felt strange gazes. The guests must have felt...";
		mes "Is this a town where there are many people with that kind of view?";
		next;
		select( "I didn't" );
		mes "[Mini Elly]";
		mes "Are they related to 'intruders'?";
		next;
		select( "maybe" );
		mes "[Mini Elly]";
		mes "Do you think you have recognized the guest?";
		npctalk "Junok: ?", "", bc_self;
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Not so.";
		next;
		mes "[Junok]";
		mes "Adventurer, what are you thinking so deeply about?";
		next;
		select("Nothing" );
		mes "[Junok]";
		mes "Anyway... we can talk quietly here.";
		next;
		mes "[Junok]";
		mes "I've just returned to Rachel, so I don't know for sure...";
		mes "The atmosphere has become quite ugly compared to before.";
		next;
		mes "[Junok]";
		mes "The conflict between indigenous peoples and migrants is growing.";
		mes "There are people out there who talk more than usual... as if they were promoting it.";
		next;
		mes "[Junok]";
		mes "Some people use the same excuse to say that you are a native or a migrant...";
		next;
		mes "[Junok]";
		mes "We are trying to solve this, but...";
		next;
		mes "[Policeman Gala]";
		mes "Recently, unknown people are trying to break into the Temple of Sethrumnir.";
		npctalk "Policeman: Weak and inconsistent for an intrusion itself.", "Policeman Gala#ep18c10", bc_self;
		npctalk "Mini Ellie: Intrusion?", "", bc_self;
		next;
		mes "[Policeman Gala]";
		mes "It's very strange to keep trying to break into the safest temple in Rachel, the capital, but...";
		npctalk "Mini Elly: Isn't it suspicious to hear from customers?", "", bc_self;
		next;
		mes "[Policeman Gala]";
		mes "To deal with them, the temple is now on alert. So there are some parts that are not able to respond in time to civil disputes these days.";
		next;
		mes "[Policeman Gala]";
		mes "We don't know how long it will last, and we don't know where it will come out so suddenly, so we can't take a hasty full response...";
		mes "However, it is difficult to multiply the security guard by multiples.";
		next;
		mes "[Policeman Gala]";
		mes "It's really difficult... um?";
		cloakoffnpcself( "Rookie Policeman#ep18c11" );
		npctalk "Rookie Policeman: Invaders west of the temple!", "Rookie Policeman#ep18c11", bc_self;
		next;
		mes "[Policeman Gala]";
		mes "They are attacking again in broad daylight! Let's go!";
		mes "Let's go together, adventurer!";
		next;
		select( "What do you believe in me?" );
		mes "[" + strcharinfo(0) + "]";
		mes "Do you know who I am?";
		mes "What if it's a gang of intruders?";
		next;
		mes "[Policeman Gala]";
		mes "I have been guarding the temple for quite some time.";
		mes "Would you have told this story to someone you didn't know?";
		npctalk "Junok: Did you know?", "", bc_self;
		npctalk "Policeman Gala: One-sided.", "Policeman Gala#ep18c10", bc_self;
		next;
		mes "[Policeman Gala]";
		mes "Let's go!";
		changequest 8684,8685;
		ep18_1_main = 5;
		navigateto("ra_temple",30,142);
		cloakonnpcself( "Female Priest#e18b" );
		cloakonnpcself( "Policeman Gala#ep18c10" );
		cloakonnpcself( "Rookie Policeman#ep18c11" );

		cloakoffnpcself( "Female Priest#e18c" );
		cloakoffnpcself( "Policeman Gala#ep18c12" );
		cloakoffnpcself( "Policeman Iz#ep18c13" );
		cloakoffnpcself( "Policeman Calsort#c14" );
		cloakoffnpcself( "Heart Hunter#ep18c15" );
		cloakoffnpcself( "Heart Hunter#ep18c16" );
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8684) == 1" );
	end;
}

ra_temple,75,54,3	duplicate(dummy_cloaked_npc)	Policeman Gala#ep18c10	4_M_RASWORD
ra_temple,78,56,3	duplicate(dummy_cloaked_npc)	Rookie Policeman#ep18c11	4_M_RASWORD

// Main Quest: Step 5.
ra_temple,30,142,1	script(CLOAKED)	Female Priest#e18c	4_M_TRAINEE,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	.@char_id = getcharid(0);
	if (ep18_1_main == 5) {
		mes "[Mini Elly]";
		mes "Do you remember seeing this place?";
		next;
		mes "[Mini Elly]";
		mes "You found it sooner than I thought.";
		next;
		select( "I don't know the status of the mansion yet" );
		mes "[" + strcharinfo(0) + "]";
		mes "Maybe it's a different team from those sent to the mansion...";
		next;
		mes "[Policeman Iz]";
		mes "You are under siege! Surrender!";
		next;
		mes "[Heart Hunter]";
		mes "Heh, to call this a siege at this level. Just as rumored.";
		next;
		mes "[Policeman Iz]";
		mes "What is it? You guys have failed a total of 14 times so far and ran away!";
		next;
		mes "[Policeman Calsort]";
		mes "This is number 15.";
		npctalk "Kek.", "Heart Hunter#ep18c15", bc_self;
		next;
		mes "[Heart Hunter]";
		mes "These were our new recruits sent out on reconnaissance!";
		mes "Now you have identified all your patrol routes. Be prepared.";
		next;
		mes "[Policeman Gala]";
		mes "I'll have to change it.";
		next;
		mes "[Heart Hunter]";
		mes "...";
		next;
		mes "[Guardians]";
		mes "...";
		next;
		mes "[Heart Hunter]";
		mes "Because this is the end! The detachment is already in the temple...";
		next;
		cloakoffnpcself( "Policeman Chaiv#c17" );
		mes "[Policeman Chaiv]";
		mes "If it's a separate group, these are these?";
		cloakoffnpcself( "Heart Hunter#ep18c18" );
		cloakoffnpcself( "Heart Hunter#ep18c19" );
		npctalk "Ugh...", "Hearthunter#ep18c19", bc_self;
		npctalk "Damn..", "Hearthunter#ep18c18", bc_self;
		next;
		mes "[Policeman Gala]";
		mes "I think I'm done.";
		next;
		mes "[Heart Hunter]";
		mes "...the next time you will definitely succeed!";
		cloakonnpcself( "Heart Hunter#ep18c15" );
		cloakonnpcself( "Heart Hunter#ep18c16" );
		changequest 8685,8686;
		ep18_1_main = 6;
		next;
		mes "[Policeman Gala]";
		mes "...";
		mes "It's a strange thing. It's strangely lax, conspicuous, and attacked over and over again, and now it's even a play where such lies are obvious.";
		mes "Even the bait is questionable.";
		next;
		mes "[Policeman Gala]";
		mes "Where the hell did they send them...";
		next;
		select( "Actually, what came to Rachel now" );
		mes "[" + strcharinfo(0) + "]";
		mes "I've come to find those related to them...";
		next;
		mes "[Junok]";
		mes "Did you have a relationship?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "More than that...";
		next;
		mes "I couldn't explain everything, so I explained that their purpose was to invade.";
		next;
		mes "[Policeman Gala]";
		mes "Hmm...";
		mes "Have you met Niren?";
		mes "It's been a while since you stopped by, so you probably haven't said hello yet.";
		next;
		mes "[Policeman Gala]";
		mes "Forcing... but not.";
		mes "A report must go in anyway. How about visiting once?";
		npctalk "Policeman Gala: Detain them first. They must be new.", "Policeman Gala#ep18c12", bc_self;
		npctalk "Policeman Chaiv: I see", "Policeman Chaiv#c17", bc_self;
		next;
		mes "[Policeman Gala]";
		mes "More details... tell me there";
		changequest 8686,8687;
		ep18_1_main = 7;
		getitem 1000405,30;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		close2;
		navigateto("ra_temin",173,40);
		cloakonnpcself( "Female Priest#e18c" );
		cloakonnpcself( "Policeman Gala#ep18c12" );
		cloakonnpcself( "Policeman Iz#ep18c13" );
		cloakonnpcself( "Policeman Calsort#c14" );
		cloakonnpcself( "Policeman Chaiv#c17" );
		cloakonnpcself( "Heart Hunter#ep18c18" );
		cloakonnpcself( "Heart Hunter#ep18c19" );
		end;
	}
	if (ep18_1_main == 6) {
		mes "[Policeman Gala]";
		mes "...";
		mes "It's a strange thing. It's strangely lax, conspicuous, and attacked over and over again, and now it's even a play where such lies are obvious.";
		mes "Even the bait is questionable.";
		next;
		mes "[Policeman Gala]";
		mes "Where the hell did they send them...";
		next;
		select( "Actually, what came to Rachel now" );
		mes "[" + strcharinfo(0) + "]";
		mes "I've come to find those related to them...";
		next;
		mes "[Junok]";
		mes "Did you have a relationship?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "More than that...";
		next;
		mes "I couldn't explain everything, so I explained that their purpose was to invade.";
		next;
		mes "[Policeman Gala]";
		mes "Hmm...";
		mes "Have you met Niren?";
		mes "It's been a while since you stopped by, so you probably haven't said hello yet.";
		next;
		mes "[Policeman Gala]";
		mes "Forcing... but not.";
		mes "A report must go in anyway. How about visiting once?";
		npctalk "Policeman Gala: Detain them first. They must be new.", "Policeman Gala#ep18c12", bc_self;
		npctalk "Policeman Chaiv: I see", "Policeman Chaiv#c17", bc_self;
		next;
		mes "[Policeman Gala]";
		mes "More details... tell me there";
		changequest 8686,8687;
		ep18_1_main = 7;
		getitem 1000405,30;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		close2;
		navigateto("ra_temin",173,40);
		cloakonnpcself( "Heart Hunter#ep18c15" );
		cloakonnpcself( "Heart Hunter#ep18c16" );
		cloakonnpcself( "Female Priest#e18c" );
		cloakonnpcself( "PolicemanGala#ep18c12" );
		cloakonnpcself( "Policeman Iz#ep18c13" );
		cloakonnpcself( "Policeman Calsort#c14" );
		cloakonnpcself( "Policeman Chaiv#c17" );
		cloakonnpcself( "Heart Hunter#ep18c18" );
		cloakonnpcself( "Heart Hunter#ep18c19" );
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8685) == 1 || isbegin_quest(8686) == 1" );
	end;
}

ra_temple,25,147,5	duplicate(dummy_cloaked_npc)	Policeman Gala#ep18c12	4_M_RASWORD
ra_temple,29,143,1	duplicate(dummy_cloaked_npc)	Policeman Iz#ep18c13	4_M_RASWORD
ra_temple,26,145,7	duplicate(dummy_cloaked_npc)	Policeman Calsort#c14	4_M_RASWORD
ra_temple,31,147,4	duplicate(dummy_cloaked_npc)	Heart Hunter#ep18c15	G_EP17_2_HEART_HUNTER
ra_temple,29,146,4	duplicate(dummy_cloaked_npc)	Heart Hunter#ep18c16	G_EP17_2_HEART_HUNTER

ra_temple,35,141,1	duplicate(dummy_cloaked_npc)	Policeman Chaiv#c17	4_M_RASWORD
ra_temple,36,140,4	duplicate(dummy_cloaked_npc)	Heart Hunter#ep18c18	G_EP17_2_HEART_HUNTER
ra_temple,37,140,4	duplicate(dummy_cloaked_npc)	Heart Hunter#ep18c19	G_EP17_2_HEART_HUNTER

// Main Quest: Step 6.
ra_temin,173,40,3	script	Guard Dent#ep18	4_M_RASWORD,{
	if (ep18_1_main == 7) {
		mes "[Guard Dent]";
		mes "<FONT SIZE = 16><B>Wait!!</FONT></B>";
		mes "<FONT SIZE = 14>Hey!</FONT>";
		mes "Can't you see the line?";
		mes "^e5555e If you're here to see Niren^000000, follow the order!";
		npctalk "Wait!! Hey!", "Dent the security guard#ep18", bc_self;
		next;
		mes "[Ellie]";
		mes "There are so many people.";
		mes "But if I don't meet Niren-sama soon, I'll be in trouble.";
		cutin "ep172_beta.bmp",2;
		next;
		select("It's urgent." );
		cutin "",255;
		mes "[Guard Dent]";
		mes "<FONT SIZE = 16><B>What?</FONT></B>";
		mes "<FONT SIZE = 14>I'm in a hurry too</FONT>";
		npctalk "What?", "Guard Dent#ep18", bc_self;
		next;
		mes "[Guard Dent]";
		mes "<FONT SIZE = 14><B>Oh~</FONT></B>";
		mes "Do you know how many times I've been dispatched to stop a fight just today?!";
		mes "People are fighting all the time, so this place is not even crazy!";
		npctalk "Uh-huh~ I wish everyone would stop fighting...", "Dent of the security guard#ep18", bc_self;
		next;
		mes "[Guard Dent]";
		mes "Even if you try to stop the fight, you won't listen!";
		mes "I used to fight saying that it was ^e5555e migrant ^000000 or ^e5555e native ^000000, but these days it's really no joke!";
		next;
		mes "[Guard Dent]";
		mes "If you say anything, they start yelling at natives ^e5555e discrimination^000000...";
		mes "I get a headache just thinking about it.";
		npctalk "I get a headache just thinking about it.", "Dent of the security guard#ep18", bc_self;
		next;
		mes "[Guard Dent]";
		mes "How are you these days? Neil?";
		completequest 8687;
		setquest 11696;
		ep18_1_main = 8;
		close;
	}
	mes "[Guard Dent]";
	mes "Ugh~";
	mes "I wish everyone would stop fighting...";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11696) == 0 && isbegin_quest(8687) == 1" );
	end;
}

// Main Quest: Step 7. and 10.
ra_temin,174,38,3	script	Marshall Neil#ep18	4_DST_SOLDIER,{
	if (ep18_1_main == 8) {
		mes "[Marshall Neil]";
		mes "<FONT SIZE = 14><B>Don't do it!</FONT></B>";
		mes "But you are better than me.";
		mes "You know I'm of indigenous origin.";
		npctalk "Don't talk!", "", bc_self;
		next;
		mes "[Marshall Neil]";
		mes "Before I even start talking, I'm told to call other security guards because I'm a native.";
		npctalk "I'm not racist!", "", bc_self;
		next;
		mes "[Marshall Neil]";
		mes "I'm tired of hearing the voices of aboriginal subjects, dare to say, do you know who I am?";
		mes "What do you think of the security guard!";
		next;
		mes "[Marshall Neil]";
		mes "To be honest, it's really weird these days.";
		mes "Because even people who didn't cause problems like this before start to get involved in fights, and even small fights turn into big fights.";
		next;
		mes "[Marshall Neil]";
		mes "That's right!";
		mes "Recently, there has been no uproar here and there.";
		mes "By the way, I also came to the temple yesterday";
		mes "Are you the priest who called me yesterday?";
		mes "How's the temple these days?";
		changequest 11696,11697;
		ep18_1_main = 9;
		close;
	}
	if (ep18_1_main == 11 || ep18_1_main == 12) {
		mes "[High Priest Niren]";
		mes "Neil didn't you see ^e5555eMaram^000000 today?";
		cloakoffnpcself( "Niren#ep18_in1" );
		cutin "ra_gwoman.bmp",2;
		next;
		cutin "",255;
		mes "[Marshall Neil]";
		mes "Are you Maram?";
		mes "I think I saw it on the way to the temple ^e5555e square^000000...";
		next;
		mes "[Marshall Neil]";
		mes "I don't know if it's still in the square, but if you ask the people in the square ^e5555e, maybe you'll find out where ^000000 Maram has gone?";
		next;
		mes "[High Priest Niren]";
		mes "Hmm I see.";
		mes "" + strcharinfo(0) + " ^e5555eMy son Maram will help you with your request.^000000";
		mes "He's a kid who knows this better than anyone else.";
		npctalk "My son Maram will help you with what I asked you earlier.", "Niren#ep18_in1", bc_self;
		cutin "ra_gwoman.bmp",2;
		next;
		mes "[High Priest Niren]";
		mes "I wish I could introduce myself, but as you can see, I can't leave right now.";
		mes "Ask people at ^000000 near the square ^e5555e and you will find them.";
		if (ep18_1_main == 11) {
			changequest 11699,11700;
			ep18_1_main = 12;
		}
		close2;
		navigateto("rachel",137,135);
		cloakonnpcself( "Niren#ep18_in1" );
		cutin "",255;
		end;
	}
	mes "[Marshall Neil]";
	mes "Ugh...";
	mes "Where did you go...";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11696) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11699) == 1" );
	end;
}

// Main Quest: Step 8.
ra_temin,172,36,7	script	Freyja Priest#ep18	4_F_MASK1,{
	if (ep18_1_main == 9) {
		mes "[Freyja Priest]";
		mes "We are always praying for the sincere faith and peace of mind of our members.";
		next;
		mes "[Marshall Neil]";
		mes "Ah, not that stereotyped greeting~";
		mes "I saw what~";
		mes "Besides, there's no way priests can stand in line like this if nothing happens.";
		next;
		mes "[Marshall Neil]";
		mes "If people need to know what the situation is these days, won't the security forces prepare for a response?";
		mes "Especially because we don't know the situation of those who come to the temple.";
		npctalk "Because we don't even know the situation of people who come to the temple.", "Marshall Neil#ep18", bc_self;
		next;
		mes "[Guard Dent]";
		mes "Give me some information~";
		npctalk "Give me some information~", "Dent of security guard#ep18", bc_self;
		next;
		mes "[Freyja Priest]";
		mes "The temple is a place to pray for Freyja.";
		mes "With a sincere heart";
		next;
		mes "[Marshall Neil]";
		mes "I saw it yesterday.";
		mes "<FONT SIZE = 14>This priest here half-masked...</FONT>";
		next;
		mes "[Freyja Priest]";
		mes "<FONT SIZE = 16><B>Evil!!!</FONT></B>";
		mes "<FONT SIZE = 14><B>Wait a minute!</FONT></B>";
		mes "<FONT SIZE = 14><B>Until there!!!</FONT></B>";
		npctalk "Evil!!! Wait a minute!", "", bc_self;
		next;
		mes "[Freyja Priest]";
		mes "<FONT SIZE = 10>Heavy breath...</FONT>";
		next;
		mes "[Freyja Priest]";
		mes "Actually";
		next;
		mes "[Freyja Priest]";
		mes "It is true that these days, more and more people are causing problems in temples.";
		next;
		mes "[Freyja Priest]";
		mes "Most of the content is not something that can be officially objected to, but people who express personal grievances, only to the extent of rioting or screaming at the entrance of the temple.";
		next;
		mes "[High Priest Niren]";
		mes "Wait...";
		mes "Can I hear the story in detail now?";
		cloakoffnpcself( "Niren#ep18_in1" );
		npctalk "Can I hear the story in detail now?", "Niren#ep18_in1", bc_self;
		cutin "ra_gwoman.bmp",2;
		next;
		cutin "",255;
		mes "[Freyja Priest]";
		mes "Niren!!!!";
		npctalk "Niren!!!!", "", bc_self;
		next;
		mes "[Freyja Priest]";
		mes "Oh, that's";
		mes "People with personal dissatisfaction have come to the temple and shouted, which has been a common occurrence for a long time, and we are taking care of it and sending it back.";
		next;
		mes "[Freyja Priest]";
		mes "Recently, there have been a lot of fights between people who have come to the temple...";
		next;
		mes "[High Priest Niren]";
		mes "A fight in the sacred temple...";
		mes "Isn't there any way to resolve their complaints through dialogue?";
		npctalk "Oh my God", "Niren#ep18_in1", bc_self;
		cutin "ra_gwoman.bmp",2;
		next;
		cutin "",255;
		mes "[Freyja Priest]";
		mes "Even if we try to reconcile opinions, there are people who call them heretics and ignore them, and there are people who ask how long they will let them stand still, so it is not an easy situation for us to solve.";
		next;
		mes "[Freyja Priest]";
		mes "But because of such dissatisfaction, I can't directly protest to Niren, but it seems like I'm arguing at the temple.";
		mes "Because they know how important Niren-sama is to harmony.";
		next;
		mes "[High Priest Niren]";
		mes "Ha...";
		mes "Heresy";
		mes "Efforts to eliminate discrimination seem to have not reached their hearts.";
		cutin "ra_gwoman.bmp",2;
		npctalk "Haha...", "Niren#ep18_in1", bc_self;
		next;
		mes "[High Priest Niren]";
		mes "Besides, it's not something that can be easily overcome to start a fight even in the temple.";
		next;
		mes "[High Priest Niren]";
		mes "I've heard of some conflicts of opinion, but...I may be wrong, thinking that if we get to know each other and understand each other, it will be resolved naturally.";
		next;
		cutin "",255;
		mes "[Freyja Priest]";
		mes "Even if the hardliners retreat, the hearts of those who supported them will not change all at once.";
		next;
		mes "[High Priest Niren]";
		mes "Sad but true.";
		mes "Wait for self-healing is the result of letting the wound swell and burst.";
		mes "It won't be easy to even talk for reconciliation...";
		cutin "ra_gwoman.bmp",2;
		next;
		mes "[High Priest Niren]";
		mes "<FONT SIZE = 10>Something must be triggered...</FONT>";
		next;
		cutin "",255;
		mes "[Guard Dent]";
		mes "Niren.";
		mes "If there is a chance, how about this adventurer here?";
		mes "Because you are a total outsider.";
		mes "Well... maybe we can't even start a conversation?";
		next;
		mes "[Guard Dent]";
		mes "Anyway, he said he came to Niren because he had something to say.";
		next;
		mes "[High Priest Niren]";
		mes "Oh my...!";
		mes "" + strcharinfo(0) + "Sir!!!";
		mes "I'm out of my mind " + strcharinfo(0) + "I didn't even notice you were there.";
		npctalk "Oh my...!", "Niren#ep18_in1", bc_self;
		cutin "ra_gwoman.bmp",2;
		next;
		mes "[High Priest Niren]";
		mes "As you can see, I'm sorry that I'm busy right now with ^e5555eRachel's internal problems^000000.";
		mes "But what you're going to say to me is...";
		next;
		select( "About the intruder." );
		mes "[High Priest Niren]";
		mes "Ah...";
		mes "<FONT SIZE = 10>Wait, it's a bit difficult to talk about that here.</FONT>";
		mes "Follow me this way";
		changequest 11697,11698;
		ep18_1_main = 10;
		close2;
		cloakonnpcself( "Niren#ep18_in1" );
		cutin "",255;
		navigateto("ra_temin",213,87);
		end;
	}
	mes "[Freyja Priest]";
	mes "We are always praying for the sincere faith and peace of mind of our members.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11697) == 1" );
	end;
}

ra_temin,170,38,5	duplicate(dummy_cloaked_npc)	Niren#ep18_in1	4_F_MADAME
ra_temin,171,42,5	duplicate(dummy_npc)	Rachelite#ep18_in1	4_F_SHABBY
ra_temin,173,43,3	duplicate(dummy_npc)	Rachelite#ep18_in2	4_M_RACHMAN2
ra_temin,175,36,0	duplicate(dummy_npc)	Rachelite#ep18_in3	4_F_DESERT
ra_temin,170,35,1	duplicate(dummy_npc)	Rachel Resident#ep18_in4	4_M_DST_GRAND
ra_temin,174,34,3	duplicate(dummy_npc)	Rachel Resident#ep18_in5	4_M_MIDDLE
ra_temin,177,33,5	duplicate(dummy_npc)	Rachel Resident#ep18_in6	4_M_CHILD1
ra_temin,173,32,0	duplicate(dummy_npc)	Rachel Resident#ep18_in7	4_F_MASK

// Main Quest: Step 9.
ra_temin,213,87,3	script	Niren#ep18_in2	4_F_MADAME,{
	if (ep18_1_main == 10) {
		mes "[High Priest Niren]";
		mes "I don't think anyone would listen here.";
		mes "^e5555eThis is a particularly sensitive matter^000000,";
		mes "I'm sorry to bring you to this place.";
		cutin "ra_gwoman.bmp",2;
		next;
		select( "Describe the intruder's identity." );
		mes "[High Priest Niren]";
		mes "<FONT SIZE = 14>I can't!!!</FONT>";
		mes "If the ^e5555eHeart Hunters^000000 are aiming for the ^e5555e Ymir's Heart Piece^000000, we can't stand still!";
		next;
		mes "[High Priest Niren]";
		mes "I'm sure you'll break in so easily...";
		mes "Right now ^e5555eWe will strengthen the security of the heart chamber^000000 and actively cooperate with the ^e5555eRebellion^000000.";
		next;
		mes "[High Priest Niren]";
		mes "But it is true that no matter how much security is tightened in the heart chamber, the recent chaos among the residents has made it an ideal situation for intruders to rampage.";
		next;
		mes "[High Priest Niren]";
		mes "I'll focus on security reinforcement work for now" + strcharinfo(0) + "Can I ask you to mediate the villagers ^e5555e^000000?";
		next;
		mes "[High Priest Niren]";
		mes "No";
		mes "It is not enough to intervene, just to listen and tell their stories.";
		next;
		mes "[High Priest Niren]";
		mes "Many people made a decision they thought would make them happy, and I didn't really understand the hearts of those who didn't support that choice.";
		next;
		mes "[High Priest Niren]";
		mes "You don't want everyone to get along overnight.";
		mes "Just";
		mes "What is the dissatisfaction";
		mes "I believe that if I knew where I went wrong, I could start over.";
		next;
		mes "[High Priest Niren]";
		mes "I don't think I'm going to listen to anyone right now, but as Dent said, " + strcharinfo(0) + " might tell you a story.";
		next;
		mes "[Ellie]";
		mes "Relationships between people are complicated.";
		cutin "ep172_beta.bmp",2;
		next;
		mes "[High Priest Niren]";
		mes "Ha ha... it is";
		mes "Then shall we go back to the temple entrance again?";
		mes "^e5555e I have something to ask of the security guards^000000...";
		cutin "ra_gwoman.bmp",2;
		changequest 11698,11699;
		ep18_1_main = 11;
		close2;
		cutin "",255;
		navigateto("ra_temin",174,38);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11698) == 1" );
	end;
}

// Main Quest: Step 11.
rachel,137,135,7	script	Villager#ep18_Rachel1	4_M_MIDDLE,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 12) {
		select( "Ask if you have seen Maram" );
		mes "[Villager]";
		mes "What?";
		mes "I don't know!";
		mes "What do I know where he is.";
		npctalk "What? I don't know!", "The villager#ep18_Rachel1", bc_self;
		next;
		mes "[Villager]";
		mes "By the way, you!";
		mes "It's a face I haven't seen around here...";
		next;
		mes "[Villager]";
		mes "Why are you looking for him?";
		mes "Aren't you up to something strange?";
		next;
		mes "[Ellie]";
		mes "You are an unkind person.";
		mes "I can't seem to tell you where Maram is, so ask someone else.";
		cutin "ep172_beta.bmp",2;
		changequest 11700,11701;
		ep18_1_main = 13;
		close2;
		cutin "",255;
		navigateto("rachel",105,134);
		end;
	}
	if (ep18_1_main == 13) {
		mes "[Ellie]";
		mes "You are an unkind person.";
		mes "I can't seem to tell you where Maram is, so ask someone else.";
		cutin "ep172_beta.bmp",2;
		close2;
		cutin "",255;
		navigateto("rachel",105,134);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11700) == 1" );
	end;
}

// Main Quest: Step 12.
rachel,105,134,3	script	 Villager#ep18_Rachel2	4_M_RACHMAN1,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 13) {
		select( "Ask if you have seen Maram" );
		mes "[Villager]";
		mes "";
		next;
		mes "[Villager]";
		mes "I'm not sure?";
		next;
		mes "[Villager]";
		mes "But who are you?";
		mes "Why are you looking for Maram?";
		next;
		mes "[Villager]";
		mes "How do you know Maram?";
		npctalk "Is it suspicious?", "The villager#ep18_Rachel2", bc_self;
		next;
		mes "[Ellie]";
		mes "I don't think this person will even tell you where Maram is.";
		mes "Ask someone else.";
		changequest 11701,11702;
		ep18_1_main = 14;
		close2;
		navigateto("rachel",69,117);
		end;
	}
	if (ep18_1_main == 14) {
		mes "[Ellie]";
		mes "I don't think this person will even tell you where Maram is.";
		mes "Ask someone else.";
		close2;
		navigateto("rachel",69,117);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11701) == 1" );
	end;
}

// Main Quest: Step 13.
rachel,69,117,7	script	Villager#ep18_Rachel3	4_F_SHABBY,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 14) {
		select( "Ask if you have seen Maram" );
		mes "[Villager]";
		mes "I think Maram said he had an appointment nearby.";
		mes "I passed this way, so if you go up ^e5555e, you may meet ^000000";
		changequest 11702,11703;
		ep18_1_main = 15;
		close2;
		navigateto("rachel",70,147);
		end;
	}
	if (ep18_1_main == 15) {
		mes "[Villager]";
		mes "I think Maram said he had an appointment nearby.";
		mes "I passed this way, so if you go up ^e5555e, you may meet ^000000";
		close2;
		navigateto("rachel",70,147);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11702) == 1" );
	end;
}

rachel,66,135,0	script	#Flower Room Main	HIDDEN_WARP_NPC,10,10,{
	end;
OnTouch:
	// Picking Half Flowers quest
	if (isbegin_quest(5936) == 2)
		cloakoffnpcself( "Mejai#E18_7" );
	else if (isbegin_quest(5933) == 1 || isbegin_quest(5934) == 1 || isbegin_quest(5935) == 1 || isbegin_quest(5936) == 1) {
		cloakoffnpcself( "Mejai#E18_5" );
		cloakoffnpcself( "Half Flower#E18_6" );
	}
	// main quest
	if (ep18_1_main == 16) {
		cloakoffnpcself( "Miriam#ep18_Rachel" );
		end;
	}
	if (ep18_1_main == 19 || ep18_1_main == 20) {
		cloakoffnpcself( "Miriam#ep18_merchant2" );
		cloakoffnpcself( "Maram#ep18_merchant2" );
		end;
	}
	if (ep18_1_main == 21 || ep18_1_main == 22 || ep18_1_main == 26) {
		cloakoffnpcself( "Merchant#ep18_Rachel3" );
		if (ep18_1_main == 22)
			cloakoffnpcself( "Miriam#ep18_merchant3" );
		end;
	}
	end;
}
rachel,112,136,0	duplicate(#Flower Room Main)	Niren Great Hall	HIDDEN_WARP_NPC,5,5
rachel,115,125,0	duplicate(#Flower Room Main)	Reminder#ra01	HIDDEN_WARP_NPC,3,3

// Main Quest: Step 14. and 24.
rachel,70,147,3	script	Maram#ep18_Rachel	4_EP18_MARAM,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 15) {
		mes "[Maram]";
		mes "Hello";
		mes "I think it's the first time I've met you, is this your first time with Rachel?";
		mes "May the traveler be blessed with Freya-sama.";
		cutin "ep18_maram_01.png",2;
		next;
		select( "Tell me Niren's words." );
		mes "[Maram]";
		mes "Ah!";
		mes "If my mother entrusted me with a job, of course I have to do my best to help!!!";
		npctalk "Leave it to me.", "Maram#ep18_Rachel", bc_self;
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Ellie]";
		mes "But we don't know the situation here, so how can we mediate?";
		cutin "ep172_beta.bmp",2;
		next;
		mes "[Maram]";
		mes "From my point of view...";
		mes "Before you intervene, I want you to know about the plight of the natives and of us ^e5555ethe children of the gray^000000.";
		cutin "ep18_maram_01.png",2;
		next;
		select( "What is a gray child?" );
		mes "[Maram]";
		mes "Rachel...";
		mes "Now it's a city with beautiful temples, but it was quite a while ago ^e5555e was a wasteland ^000000 where the natives lived.";
		next;
		mes "[Maram]";
		mes "But one day, ^e5555eFreya's followers ^000000 who suddenly came, pushed out the natives and built a temple.";
		next;
		mes "[Maram]";
		mes "There were people who tried to live with the people who migrated along the temple, but ^e5555e many people couldn't stand it and left this place^000000 ^e5555eThere were also people who suffered bad things^000000.";
		next;
		mes "[Maram]";
		mes "It would be nice if things like that were just a thing of the past... ^e5555e It continues to be ^000000 until now.";
		mes "The result is ^e5555e displaced children^000000, and I am one of them.";
		next;
		mes "[Maram]";
		mes "My mother, who felt sorry for that, adopted me, and after she became a high priest, she took the lead in adopting the children ^e5555e into the homes of wealthy immigrants^000000";
		next;
		mes "[Maram]";
		mes "People who disliked it called us ^e5555eGray Children^000000 and ^e5555eDiscrimination^000000, but my mother wanted us to be a bridge between migrants and indigenous peoples.";
		npctalk "Why are you doing this...", "Maram#ep18_Rachel", bc_self;
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 14>I was nothing but a heterogeneous entity that could not be properly mixed</FONT>.";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Maram]";
		mes "I think it would be better to hear this story from ^e5555e people ^000000 directly...";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "I have an important appointment with a friend ^e5555e^000000 right now, so could you give me time to meet and explain?";
		next;
		mes "[Maram]";
		mes "The time we agreed to meet...";
		next;
		mes "[???]";
		mes "It's been 5 minutes already?";
		cutin "ep18_miriam_03.png",2;
		cloakoffnpcself( "Miriam#ep18_Rachel" );
		npctalk "It's been 5 minutes already?", "Miriam#ep18_Rachel", bc_self;
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 14>^e5555eMiriam!^000000</FONT>";
		mes "Since when?";
		cutin "ep18_maram_01.png",2;
		npctalk "Surprised!", "Maram#ep18_Rachel", bc_self;
		next;
		mes "[Miriam]";
		mes "More than that";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "Ah!";
		mes "" + strcharinfo(0) + " This is my ^e5555e friend Miriam^000000";
		mes "Miriam these people are " + strcharinfo(0) + "and... Ellie?";
		mes "She came to find me at the request of her mother.";
		cutin "ep18_maram_01.png",2;
		changequest 11703,11704;
		ep18_1_main = 16;
		close2;
		cutin "",255;
		navigateto("rachel",62,144);
		end;
	}
	if (ep18_1_main == 16) {
		mes "[Maram]";
		mes "Ah!";
		mes "" + strcharinfo(0) + " This is my ^e5555e friend Miriam^000000";
		mes "Miriam these people are " + strcharinfo(0) + "and... Ellie?";
		mes "You came to me at the request of my mother.";
		cutin "ep18_maram_01.png",2;
		close2;
		cutin "",255;
		navigateto("rachel",62,144);
		end;
	}
	if (ep18_1_main == 25) {
		mes "[Maram]";
		mes "Ah!";
		mes "" + strcharinfo(0) + " You are here.";
		mes "It's a little short, but we've gathered some of the people we need.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "When Miriam returns... ah!";
		npctalk "Ah!", "Maram#ep18_Rachel", bc_self;
		next;
		mes "[Tamarin]";
		mes "Oh!";
		mes "Niren-sama's son!";
		cloakoffnpcself( "Tamarin#ep18_Maram" );
		cutin "ep18_tamarin_04.png",2;
		npctalk "Oh!", "Tamarin#ep18_Maram", bc_self;
		next;
		mes "[Maram]";
		mes "Ah, the people who visited my mother last time.";
		mes "Tamarin-nim, Mark, and Magi, right?";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Miriam]";
		mes "<FONT SIZE = 14>Maram.</FONT>";
		cloakoffnpcself( "Miriam#ep18_Rachel" );
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "Are you back Miriam?";
		mes "Did you find the clothes?";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Miriam]";
		mes "I just brought it...";
		mes "Is this enough?";
		cutin "ep18_miriam_01.png",2;
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 14>Ahahah!</FONT>";
		mes "That clothes...";
		mes "Very good!";
		cutin "ep18_maram_02.png",2;
		npctalk "Hahahahaha!", "Maram#ep18_Rachel", bc_self;
		next;
		mes "[Maram]";
		mes "Then all the necessary people have gathered and the clothes are ready, so I'll explain the job.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "We are going to move things to the top of the exotic ^000000 wearing clothes brought by ^e5555eMiriam.";
		mes "I can't tell you the destination yet, so all you have to do is follow me.";
		next;
		mes "[Maram]";
		mes "" + strcharinfo(0) + "Please go to the store where you bought ^e5555e a while ago^000000 and tell them that you are leaving soon.";
		mes "The others change clothes with me and go to the village entrance first.";
		changequest 11713,11714;
		ep18_1_main = 26;
		close2;
		cloakoffnpcself( "Merchant#ep18_Rachel3" );
		cloakonnpcself( "Miriam#ep18_Rachel" );
		cloakonnpcself( "Tamarin#ep18_Maram" );
		cutin "",255;
		navigateto("rachel",137,85);
		end;
	}
	if (ep18_1_main == 26) {
		mes "[Maram]";
		mes "Then all the necessary people have gathered and the clothes are ready, so I'll explain the job.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "We are going to move things to the top of the exotic ^000000 wearing clothes brought by ^e5555eMiriam.";
		mes "I can't tell you the destination yet, so all you have to do is follow me.";
		next;
		mes "[Maram]";
		mes "" + strcharinfo(0) + "Please go to the store where you bought ^e5555e a while ago^000000 and tell them that you are leaving soon.";
		mes "The others change clothes with me and go to the village entrance first.";
		close2;
		cloakoffnpcself( "Merchant#ep18_Rachel3" );
		cloakonnpcself( "Miriam#ep18_Rachel" );
		cloakonnpcself( "Tamarin#ep18_Maram" );
		cutin "",255;
		navigateto("rachel",137,85);
		end;
	}
	mes "[Maram]";
	mes "When is Miriam coming?";
	cutin "ep18_maram_01.png",2;
	close3;

OnInit:
	// note: on official the questinfo from this npc disappears when the quest 11703 is given by the previous npc, this is most likely a bug - or it's illogical
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11703) == 1" );

	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11713) == 1" );
	end;
}

// Main Quest: Step 15.
rachel,62,144,5	script(CLOAKED)	Miriam#ep18_Rachel	4_EP18_MIRIAM,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 16) {
		select( "Greetings" );
		mes "[Miriam]";
		mes "How are you?";
		mes "Nice to meet you";
		mes "" + strcharinfo(0) + ".";
		mes "My name is Miriam, Maram's friend.";
		cutin "ep18_miriam_01.png",2;
		next;
		mes "[Maram]";
		mes "That's why, Miriam.";
		mes "My mother told me to help " + strcharinfo(0) + ", so I don't think I can go with you this time.";
		mes "Can you go alone?";
		cutin "ep18_maram_01.png",2;
		npctalk "I'm sorry", "Maram#ep18_Rachel", bc_self;
		next;
		mes "[Miriam]";
		mes "If Niren-sama made you do it, there is nothing you can do.";
		mes "But I can't even start because I don't have anything.";
		cutin "ep18_miriam_03.png",2;
		npctalk "I don't have anything?", "Miriam#ep18_Rachel", bc_self;
		next;
		mes "[Maram]";
		mes "What?";
		mes "Did you not buy it?";
		cutin "ep18_maram_03.png",2;
		npctalk "What?", "Maram#ep18_Rachel", bc_self;
		next;
		mes "[Miriam]";
		mes "Here, check here.";
		cutin "ep18_miriam_03.png",2;
		npctalk "I'll give it back.", "Miriam#ep18_Rachel", bc_self;
		next;
		mes "[Maram]";
		mes "Ugh...";
		mes "Isn't there something wrong with buying something?";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Miriam]";
		mes "I...?";
		cutin "ep18_miriam_03.png",2;
		npctalk "What do you see me as!", "Miriam#ep18_Rachel", bc_self;
		next;
		mes "[Maram]";
		mes "Because you're good, sometimes you get angry...";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Miriam]";
		mes "<FONT SIZE = 16><B>Isn't it?</FONT></B>";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "Ha...";
		mes "It's a really big deal...";
		cutin "ep18_maram_03.png",2;
		npctalk "Damn!", "Maram#ep18_Rachel", bc_self;
		next;
		mes "[Miriam]";
		mes "Can't you buy from those merchants last time?";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "Ummm...";
		mes "To do business with them, ^e5555e I would have to go to ^000000 myself...";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "" + strcharinfo(0) + " Excuse me, but is it okay if I just buy something and leave?";
		mes "Just place an order and it will be over soon.";
		npctalk "Please wait a moment.", "Maram#ep18_Rachel", bc_self;
		changequest 11704,11705;
		ep18_1_main = 17;
		close2;
		cutin "",255;
		navigateto("rachel",87,122);
		cloakonnpcself( "Miriam#ep18_Rachel" );
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11704) == 1" );
	end;
}

rachel,68,146,5	duplicate(dummy_cloaked_npc)	Tamarin#ep18_Maram	4_EP18_TAMARIN

// Main Quest: Step 16.
rachel,87,122,7	script	Merchant#ep18_Rachel1	4_F_DST_GRAND,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 17) {
		mes "[Maram]";
		mes "Hello";
		mes "Chief Shilin.";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Merchant Shilin]";
		mes "<FONT SIZE = 16><B>What are you here for!</FONT></B>";
		mes "<FONT SIZE = 14><B>You guys have nothing to sell, so go back!</FONT></B>";
		next;
		mes "[Maram]";
		mes "Don't say that.";
		cutin "ep18_maram_02.png",2;
		next;
		cutin "",255;
		mes "[Merchant Shilin]";
		mes "<FONT SIZE = 16><B>Looking at Niren-sama, I don't think he's forcibly kicked him out!</FONT></B>";
		next;
		mes "[Miriam]";
		mes "<FONT SIZE = 14>Stop.</FONT>";
		mes "Let's go back";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Miriam]";
		mes "<B>I'm sorry</B>";
		mes "Chief Shilin.";
		next;
		mes "[Maram]";
		mes "But Miriam";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Miriam]";
		mes "<FONT SIZE = 14><B>Let's go!</FONT></B>";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "I spoke confidently, but from the beginning I was embarrassed.";
		mes "Then ^e5555e Shall we go to another store^000000?";
		cutin "ep18_maram_02.png",2;
		changequest 11705,11706;
		ep18_1_main = 18;
		close2;
		cutin "",255;
		navigateto("rachel",107,102);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11705) == 1" );
	end;
}

// Main Quest: Step 17.
rachel,107,102,7	script	Merchant#ep18_Rachel2	4_M_DESERT,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 18) {
		mes "[Maram]";
		mes "Hello";
		mes "Uncle Sannat.";
		mes "AuntAre you okay too?";
		cutin "ep18_maram_02.png",2;
		next;
		cutin "",255;
		mes "[Trader Sannat]";
		mes "Ah...";
		mes "Yes...";
		mes "What's going on?";
		mes "Maram.";
		next;
		mes "[Trader Sannat]";
		mes "";
		next;
		mes "[Maram]";
		mes "I want to buy some of the items listed here.";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Trader Sannat]";
		mes "Ah... well...";
		mes "I'm sorry, but we don't have a lot of stock right now.";
		next;
		mes "[Maram]";
		mes "Then take a look at the list and only stock items are ok.";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Trader Sannat]";
		mes "Ummm...";
		mes "I'm sorry, but the items here are out of stock...";
		next;
		mes "[Maram]";
		mes "Then it's okay if you don't have enough.";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Trader Sannat]";
		mes "I'm sorry...";
		next;
		mes "[Maram]";
		mes "Then bread and meat";
		cutin "ep18_maram_03.png",2;
		next;
		cutin "",255;
		mes "[Trader Sannat]";
		mes "Ah...";
		mes "<FONT SIZE = 10>It's already reserved...</FONT>";
		next;
		mes "[Maram]";
		mes "";
		cutin "ep18_maram_03.png",2;
		next;
		mes "[Maram]";
		mes "Yes... I'm sorry.";
		mes "Then next time...";
		next;
		cutin "",255;
		mes "[Trader Sannat]";
		mes "<FONT SIZE = 10>Yeah...</FONT>";
		changequest 11706,11707;
		ep18_1_main = 19;
		close2;
		cloakoffnpcself( "Miriam#ep18_merchant2" );
		cloakoffnpcself( "Maram#ep18_merchant2" );
		navigateto("rachel",117,104);
		end;
	}
	if (ep18_1_main == 19 || ep18_1_main == 20) {
		mes "[Trader Sannat]";
		mes "I'm sorry...";
		next;
		mes "[Maram]";
		mes "Then bread and meat";
		cutin "ep18_maram_03.png",2;
		next;
		cutin "",255;
		mes "[Trader Sannat]";
		mes "Ah...";
		mes "<FONT SIZE = 10>It's already reserved...</FONT>";
		next;
		mes "[Maram]";
		mes "";
		cutin "ep18_maram_03.png",2;
		next;
		mes "[Maram]";
		mes "Yes... I'm sorry.";
		mes "Then next time...";
		next;
		cutin "",255;
		mes "[Trader Sannat]";
		mes "<FONT SIZE = 10>Yeah...</FONT>";
		close2;
		cloakoffnpcself( "Miriam#ep18_merchant2" );
		cloakoffnpcself( "Maram#ep18_merchant2" );
		navigateto("rachel",117,104);
		end;
	}
	if (ep18_1_main == 21) {
		cloakoffnpcself( "Merchant#ep18_Rachel3" );
		end;
	}
	if (ep18_1_main == 22) {
		cloakoffnpcself( "Miriam#ep18_merchant3" );
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11706) == 1" );
	end;
}

// Main Quest: Step 18.
rachel,117,104,5	script(CLOAKED)	Miriam#ep18_merchant2	4_EP18_MIRIAM,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 19) {
		mes "[Miriam]";
		mes "Ha ha ha...";
		cutin "ep18_miriam_03.png",2;
		npctalk "what is this!", "Miriam#ep18_merchant2", bc_self;
		next;
		mes "[Maram]";
		mes "";
		cutin "ep18_maram_03.png",2;
		npctalk "Calm down Miriam.", "Maram#ep18_merchant2", bc_self;
		next;
		mes "[Miriam]";
		mes "Before I confess my shameful actions, I apologize.";
		mes "I'm sorry";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "???";
		cutin "ep18_maram_03.png",2;
		next;
		mes "[Miriam]";
		mes "I know it's against the rules, but actually " + strcharinfo(0) + "I overheard this conversation with Maram.";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Miriam]";
		mes "Niren and " + strcharinfo(0) + "I don't know what you think the friction between ^e5555eRachel's villagers^000000 is right now, but I'm sure you've seen it now.";
		next;
		mes "[Miriam]";
		mes "^e5555eThe gray children^000000 are saying that they have nothing to sell...";
		next;
		mes "[Maram]";
		mes "Miriam so far...";
		cutin "ep18_maram_03.png",2;
		next;
		mes "[Miriam]";
		mes "<FONT SIZE = 14>Maram this is real</FONT>";
		mes "<FONT SIZE = 14>You know it well</FONT>";
		cutin "ep18_miriam_03.png",2;
		npctalk "This is real.", "Miriam#ep18_merchant2", bc_self;
		next;
		mes "[Maram]";
		mes "Miriam";
		cutin "ep18_maram_03.png",2;
		next;
		mes "[Miriam]";
		mes "";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 10>Yeah, you're right.</FONT>";
		mes "Boss Shirin and Uncle Sannat ^e5555e Until recently, there were people who sold things ^000000, but...";
		mes "Now that even they don't want to sell things.";
		cutin "ep18_maram_01.png",2;
		npctalk "You're right.", "Maram#ep18_merchant2", bc_self;
		next;
		mes "[Miriam]";
		mes "";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 16><B>Yes!!!</FONT></B>";
		mes "<FONT SIZE = 16><B>Yes!!!</FONT></B>";
		mes "<FONT SIZE = 14><B>I'd feel better if I admit it!!!</FONT></B>";
		cutin "ep18_maram_02.png",2;
		npctalk "Era!", "Maram#ep18_merchant2", bc_self;
		next;
		mes "[Maram]";
		mes "Let's think about how we can buy things rather than continue to grumble about what happened anyway!";
		changequest 11707,11708;
		ep18_1_main = 20;
		close2;
		cutin "",255;
		navigateto("rachel",119,103);
		end;
	}
	if (ep18_1_main == 20) {
		mes "[Miriam]";
		mes "";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 16><B>Yes!!!</FONT></B>";
		mes "<FONT SIZE = 16><B>Yes!!!</FONT></B>";
		mes "<FONT SIZE = 14><B>I'd feel better if I admit it!!!</FONT></B>";
		cutin "ep18_maram_02.png",2;
		npctalk "Era!", "Maram#ep18_merchant2", bc_self;
		next;
		mes "[Maram]";
		mes "Let's think about how we can buy things rather than continue to grumble about what happened anyway!";
		close2;
		cutin "",255;
		navigateto("rachel",119,103);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11707) == 1" );
	end;
}

// Main Quest: Step 19.
rachel,119,103,3	script(CLOAKED)	Maram#ep18_merchant2	4_EP18_MARAM,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 20) {
		mes "[Maram]";
		mes "By the way, that's a big deal.";
		mes "If you don't get something quickly, somehow.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "It's going to be hard, but I'd rather live in another city~";
		mes "However, Rachel's situation is also <FONT SIZE = 10>My mother ordered me</FONT> It's difficult to go to another city...";
		next;
		mes "[Maram]";
		mes "In such a case, it would be good if ^e5555e traders in other countries ^000000 pass.";
		mes "<FONT SIZE = 10>Other country</FONT>";
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 16><B>!!!</FONT></B>";
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 16><B>Ah!!!!</FONT></B>";
		mes "<FONT SIZE = 16><B>That's it!!!!</FONT></B>";
		mes "<FONT SIZE = 14><B>" + strcharinfo(0) + "!!!!</FONT></B>";
		npctalk "Ah!!!! That's it!!!!", "Maram#ep18_merchant2", bc_self;
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 14>I have a favor!</FONT>";
		mes "^e5555e Could you help me buy things in secret from my mother^000000?";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Maram]";
		mes "^e5555e With the outsider ^000000 " + strcharinfo(0) + ", you might be able to buy something!";
		next;
		select( "Why buy something" );
		mes "[Maram]";
		mes "Ah~";
		mes "That's";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Miriam]";
		mes "How long do you plan to hide it?";
		mes "If you get a request like that without knowing why, it's natural to decline.";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "Yes.";
		mes "Okay.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "" + strcharinfo(0) + ",";
		mes "Actually, Miriam and I are ^e5555e helping the poor indigenous peoples who are living in other areas^000000";
		mes "^e5555e Procurement of materials necessary for living^000000 is one of those tasks.";
		next;
		mes "[Maram]";
		mes "^e5555eDiscrimination and persecution^000000 is said, but in fact, it is the same as running away ^000000 from ^e5555e hardliners and fanatics.";
		mes "The only way for those ^e5555e fugitives ^000000 to survive was ^e5555e hide^000000";
		next;
		mes "[Maram]";
		mes "Living in hiding is enough... without our help...<FONT SIZE = 10>No, even if it's not enough</FONT> It would have been nice if I could have survived somehow, but I can't.";
		cutin "ep18_maram_03.png",2;
		npctalk "It would have been nice if I could live somehow even if it wasn't enough...", "Maram#ep18_merchant2", bc_self;
		next;
		mes "[Miriam]";
		mes "Me too, please";
		mes "<FONT SIZE = 14>I want to prevent starving children from walking the same path as me...</FONT> <FONT SIZE = 10>I just want to prevent them from suffering the same</FONT>." ;
		cutin "ep18_miriam_03.png",2;
		npctalk "I just want to prevent those children from going through the same pain as me.", "Miriam#ep18_merchant2", bc_self;
		next;
		switch( select( "Help", "Do not help", "Reach Niren" ) ) {
		case 1:
			mes "[Maram]";
			mes "<FONT SIZE = 14><B>Thank you!</FONT></B>";
			mes "<FONT SIZE = 14><B>Then let's go now!</FONT></B>";
			mes "It's a bit strange to go back to the store you went to before, so I'd like the shop on the other side of the ^e5555e square^000000.";
			npctalk "Thank you!", "Maram#ep18_merchant2", bc_self;
			npctalk "Thank you!", "Miriam#ep18_merchant2", bc_self;
			cutin "ep18_maram_02.png",2;
			changequest 11708,11709;
			ep18_1_main = 21;
			cloakoffnpcself( "Merchant#ep18_Rachel3" );
			close2;
			cutin "",255;
			cloakonnpcself( "Miriam#ep18_merchant2" );
			cloakonnpcself( "Maram#ep18_merchant2" );
			navigateto("rachel",137,85);
			end;
		case 2:
		case 3:
			close3;
		}
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11708) == 1" );
	end;
}

// Main Quest: Step 20. and 25.
rachel,137,85,5	script(CLOAKED)	Merchant#ep18_Rachel3	4_M_MIDDLE1,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 21) {
		mes "[Maram]";
		mes "Hello~";
		mes "Chief Rencia~";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Merchant Rencia]";
		mes "What is it?";
		mes "Not to you...";
		next;
		mes "[Maram]";
		mes "Not me, <FONT SIZE = 14><B>this merchant here</FONT></B>is true.";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Merchant Rencia]";
		mes "Hmm...";
		mes "<FONT SIZE = 10>You don't look like a merchant?</FONT>";
		next;
		mes "[Maram]";
		mes "This is ^e5555e" + strcharinfo(0) + "^000000";
		mes "Because you're trading around here and there, you'll often pass dangerous areas, so you're armed~";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Merchant Rencia]";
		mes "I think I've heard of Marol...";
		next;
		mes "[Maram]";
		mes "If you meet <FONT SIZE = 14>Monster</FONT> on the road, it's a big deal~";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Merchant Rencia]";
		mes "<FONT SIZE = 10>thatThat's right.</FONT>";
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 16><B>Now!</FONT></B>";
		mes "<FONT SIZE = 14><B>Here is the inventory!</FONT></B>";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Merchant Rencia]";
		mes "Are you saying you come and buy this large amount alone?";
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 16><B>Dang-Yeon-Hee-</FONT></B> The other top performers are waiting elsewhere.";
		mes "<FONT SIZE = 14><B>Is that so?</FONT></B>";
		cutin "ep18_maram_02.png",2;
		next;
		cutin "",255;
		switch( select( "It is said to be in a bar.", "It is said to be in an inn.", "It is said to be in a temple." ) ) {
		case 1:
			mes "[Merchant Rencia]";
			mes "Hmm, I've heard that outsiders are occasionally seen these days...";
			next;
			mes "[Merchant Rencia]";
			mes "Anyway, it looks like you didn't bring your own luggage, so if you tell me when ^e5555e is leaving the village, I will deliver it to the village entrance^000000.";
			next;
			mes "[Maram]";
			mes "Even if you don't do that...";
			cutin "ep18_maram_01.png",2;
			next;
			cutin "",255;
			mes "[Merchant Rencia]";
			mes "Huh?";
			mes "Why?";
			next;
			mes "[Maram]";
			mes "The departure time hasn't been decided yet...";
			cutin "ep18_maram_01.png",2;
			next;
			cutin "",255;
			mes "[Merchant Rencia]";
			mes "I will prepare it in advance, so please let me know when the time is decided.";
			mes "You buy so much, but I have to do this <FONT SIZE = 14><B>service</FONT></B>~!";
			next;
			mes "[Maram]";
			mes "";
			cutin "ep18_maram_01.png",2;
			next;
			mes "[Miriam]";
			mes "Thank you for even delivering.";
			mes "I'll let you know when the departure time is decided.";
			mes "Then I'll see you when we leave.";
			cutin "ep18_miriam_03.png",2;
			next;
			cutin "",255;
			mes "[Merchant Rencia]";
			mes "Thank you for your purchase.";
			mes "" + strcharinfo(0) + ".";
			next;
			mes "[Miriam]";
			mes "We'll talk a little bit here ^e5555e^000000";
			cutin "ep18_miriam_03.png",2;
			changequest 11709,11710;
			ep18_1_main = 22;
			close2;
			cutin "",255;
			cloakoffnpcself( "Miriam#ep18_merchant3" );
			navigateto("rachel",120,79);
			end;
		case 2:
			close3;
		case 3:
			close3;
		}
	}
	if (ep18_1_main == 22) {
		mes "[Miriam]";
		mes "We'll talk a little bit here ^e5555e^000000";
		cutin "ep18_miriam_03.png",2;
		close2;
		cutin "",255;
		cloakoffnpcself( "Miriam#ep18_merchant3" );
		navigateto("rachel",120,79);
		end;
	}
	if (ep18_1_main == 26 || ep18_1_main == 27) {
		mes "[Merchant Rencia]";
		mes "Ah!";
		mes "It's the merchant earlier.";
		mes "Did you forget something?";
		next;
		select( "Ready to leave" );
		mes "[Merchant Rencia]";
		mes "Are you?";
		mes "Then I will contact the staff, so you can pick up the items at the west entrance of the village ^e5555e^000000.";
		if (ep18_1_main == 26) {
			changequest 11714,11715;
			ep18_1_main = 27;
		}
		close2;
		navigateto("rachel",41,132);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11709) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11714) == 1" );
	end;
}

// Main Quest: Step 21.
rachel,120,79,5	script(CLOAKED)	Miriam#ep18_merchant3	4_EP18_MIRIAM,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 22) {
		mes "[Miriam]";
		mes "I talk to you, but I don't even look at you...";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "What";
		mes "I can't help it.";
		mes "" + strcharinfo(0) + " Let's just say we're lucky to have bought the item thanks to you.";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Miriam]";
		mes "You must not be vigilant until it is completely in our hands.";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "Actually, I think Ms. Rencia is a little suspicious of her because we're together.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Miriam]";
		mes "People who do not want to sell things.";
		mes "And the merchant in combat attire who came with him.";
		mes "Other unseen members.";
		mes "The appearance of hesitating even if they offer to deliver...";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Miriam]";
		mes "<FONT SIZE = 14>Isn't it supposed to be suspicious?</FONT>";
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 14><B>Ahah?!</FONT></B>";
		mes "<FONT SIZE = 14>Well, it's actually all lies~</FONT>";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Miriam]";
		mes "<FONT SIZE = 16><B>It's time to laugh!!!!</FONT></B>";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "I'm sorry, sorry~";
		mes "Even if it's a service, it's delivered right before departure. ^e5555e I think I'd like to check the top ^000000.";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Maram]";
		mes "In order to receive the goods safely, it is better to set up ^e5555e to look like a real merchant when you leave ^000000";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "If only the three of us ^e5555e go, we can only see the future where things are stolen and thrown away ^000000 on the spot.";
		next;
		mes "[Maram]";
		mes "Then you'll need ^000000 people to disguise themselves as ^e5555e...";
		next;
		mes "[Maram]";
		mes "It's dangerous for this to get into the ears of other merchants.";
		mes "I will hire adventurers from outside ^e5555e as escort mercenaries^000000.";
		mes "Miriam, can you bring me some clothes for a top to wear?";
		next;
		mes "[Miriam]";
		mes "Okay.";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "" + strcharinfo(0) + "is...";
		mes "<FONT SIZE = 14>Well...</FONT>";
		mes "<FONT SIZE = 16>Ummm...</FONT>";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "Would you like to take a break in the store in front of here?";
		mes "^e5555e I will order food^000000, so when you're done, please come to ^e5555e under the first tree you met^000000";
		next;
		mes "[Maram]";
		mes "If you meet someone you know ^e5555e, I'd appreciate it if you could suggest a little bit of a mercenary story ^000000~";
		next;
		mes "[Ellie]";
		mes "Something we do is constantly changing.";
		cutin "ep172_beta.bmp",2;
		changequest 11710,11711;
		ep18_1_main = 23;
		close2;
		cutin "",255;
		cloakonnpcself( "Miriam#ep18_merchant3" );
		navigateto("rachel",108,73);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11710) == 1" );
	end;
}

// Main Quest: Step 22.
rachel,108,74,3	script	Dumpling#ep18_Rachel	4_POINT_RED,{
	if (getequipid(EQI_HEAD_TOP) != 400127)	// Ep18_Mini_Elly
		end;
	if (ep18_1_main == 23) {
		select( "Eat Maram's order" );
		mes "[Tamarin]";
		mes "<FONT SIZE = 16><B>Oh?</FONT></B>";
		mes "" + strcharinfo(0) + "!!";
		mes "Hello!";
		cloakoffnpcself( "Tamarin#ep18_Rachel dumpling" );
		cutin "ep18_tamarin_04.png",2;
		npctalk "Nice to meet you!", "Tamarin#ep18_Rachel dumplings", bc_self;
		next;
		mes "[Tamarin]";
		mes "It's a coincidence that we met here!";
		cutin "ep18_tamarin_02.png",2;
		npctalk "Meet you again!", "Tamarin#ep18_Rachel dumplings", bc_self;
		next;
		mes "[Tamarin]";
		mes "Isn't this really delicious?";
		mes "I tried it when I was in Rachel before and it was so delicious that I always stop by this restaurant every time I come.";
		next;
		mes "[Tamarin]";
		mes "<FONT SIZE = 14>President, give me a dumpling here!!!</FONT>";
		cutin "ep18_tamarin_01.png",2;
		next;
		select( "What are you doing?" );
		mes "[Tamarin]";
		mes "Are you eating dumplings?";
		mes "<FONT SIZE = 14><B>Ah!</FONT></B>";
		mes "<FONT SIZE = 14>Are you from Rachel?</FONT>";
		next;
		mes "[Tamarin]";
		mes "Well... I can't tell you in detail, but ^e5555e I met Niren-nim because I had a request, and I urgently needed manpower for the guard, so I took Mr. Durang Alf^000000.";
		next;
		mes "[Tamarin]";
		mes "So the two of you are taking a short break in Rachel to wait.";
		mes "If it seems like I'll have to wait too long, I'm thinking about moving to the next area first...";
		npctalk "I will follow you.", "Tamarin#ep18_Rachel dumplings", bc_self;
		next;
		select( "Request the top disguise." );
		next;
		mes "[Tamarin]";
		mes "<FONT SIZE = 14><B>Oh!</FONT></B>";
		mes "Is that good?";
		mes "Then ^e5555eMark and Magi^000000 are also found and go together.";
		mes "You are probably shopping^000000 near the ^e5555e square.";
		cutin "ep18_tamarin_02.png",2;
		changequest 11711,11712;
		ep18_1_main = 24;
		close2;
		cutin "",255;
		cloakonnpcself( "Tamarin#ep18_Rachel dumpling" );
		navigateto("rachel",122,120);
		end;
	}
	if (ep18_1_main == 24) {
		select( "Eat Maram's order" );
		mes "[Tamarin]";
		mes "If you eat all the dumplings, we'll find ^e5555eMark and Magi^000000 and we'll go together.";
		mes "You are probably shopping^000000 near the ^e5555e square.";
		cloakoffnpcself( "Tamarin#ep18_Rachel dumpling" );
		cutin "ep18_tamarin_02.png",2;
		// erasequest 11711;	// commented as it shouldn't happen
		cutin "",255;
		cloakonnpcself( "Tamarin#ep18_Rachel dumpling" );
		navigateto("rachel",122,120);
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11711) == 1" );
	end;
}

rachel,105,73,5	duplicate(dummy_cloaked_npc)	Tamarin#ep18_Rachel dumpling	4_EP18_TAMARIN

// Main Quest: Step 23.
rachel,122,120,3	script	Mark#ep18_Rachel	4_EP18_MARK,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 24) {
		mes "[Mark]";
		mes "Hello";
		mes "" + strcharinfo(0) + ".";
		cutin "ep18_mark_01.png",2;
		next;
		mes "[Magi]";
		mes "Ah...hello...";
		cutin "4job_maggi_04.PNG",2;
		next;
		mes "[Tamarin]";
		mes "Mark, are you done with your business, Magi?";
		mes "" + strcharinfo(0) + "Because you introduced me to this job?";
		mes "I'm going to meet the client from now on, let's go together.";
		cutin "ep18_tamarin_01.png",2;
		next;
		mes "[Mark]";
		mes "Ah...";
		mes "I found the book Mr. Alp asked for.";
		mes "I couldn't find the cookies Dew asked for.";
		cutin "ep18_mark_02.png",2;
		next;
		mes "[Tamarin]";
		mes "Then we can leave.";
		mes "Let's go to the meeting place.";
		cutin "ep18_tamarin_02.png",2;
		if (ep18_1_main == 24) {
			changequest 11712,11713;
			ep18_1_main = 25;
		}
		close2;
		cutin "",255;
		navigateto("rachel",70,147);
		end;
	}
	if (ep18_1_main == 25) {
		mes "[Mark]";
		mes "Ah...";
		mes "I found the book Mr. Alp asked for.";
		mes "I couldn't find the cookies Dew asked for.";
		cutin "ep18_mark_02.png",2;
		next;
		mes "[Tamarin]";
		mes "Then we can leave.";
		mes "Let's go to the meeting place.";
		cutin "ep18_tamarin_02.png",2;
		close2;
		cutin "",255;
		navigateto("rachel",70,147);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11712) == 1" );
	end;
}

rachel,121,120,5	script	Magi#ep18_rachel	4_4JOB_MAGGI,{
	mes "[Magi]";
	mes "Ah...hello...";
	cutin "4job_maggi_04.PNG",2;
	close3;
}

// Main Quest: Step 26.
rachel,41,132,3	script	box#ep18_procurement4	4_WOODBOX,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 27) {
		mes "[Merchant Rencia]";
		mes "Then check if the order is correct...";
		next;
		select( "Pass the check" );
		mes "[Merchant Rencia]";
		mes "Ahh~";
		mes "The amount is just right!";
		mes "Thank you!";
		mes "Please use again next time~!";
		next;
		mes "[Maram]";
		mes "" + strcharinfo(0) + " Before leaving ^e5555e, check the way outside the door ^000000.";
		cutin "ep18_maram_01.png",2;
		changequest 11715,11716;
		ep18_1_main = 28;
		close2;
		cutin "",255;
		navigateto("ra_fild11",354,235);
		end;
	}
	if (ep18_1_main == 28) {
		mes "[Maram]";
		mes "" + strcharinfo(0) + " Before leaving ^e5555e, check the way outside the door ^000000.";
		cutin "ep18_maram_01.png",2;
		close2;
		cutin "",255;
		navigateto("ra_fild11",354,235);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11715) == 1" );
	end;
}

rachel,42,133,3	duplicate(dummy_npc)	box#ep18_procurement1	4_WOODBOX
rachel,40,133,3	duplicate(dummy_npc)	box#ep18_procurement2	4_WOODBOX
rachel,39,132,3	duplicate(dummy_npc)	box#ep18_procurement3	4_WOODBOX

// Main Quest: Step 27.
ra_fild11,354,235,3	script	Merchant#ep18_rachel	4_EP18_MERCHANT,{
	if (ep18_1_main == 28 || ep18_1_main == 29) {
		mes "[Maram in disguise]";
		mes "" + strcharinfo(0) + " From now on, Miriam, Tamarin and the others, please go to Oz Gorge^000000 west of ^e5555e.";
		cutin "ep18_merchant.png",2;
		next;
		mes "[Maram in disguise]";
		mes "I don't think I'll be able to take all of these people because of work, so I'll send them back and follow them.";
		next;
		mes "[Maram in disguise]";
		mes "If we don't want to see our ^e5555e destination, we think it's better to go somewhere else ^000000 and send people back.";
		if (ep18_1_main == 28) {
			changequest 11716,11717;
			ep18_1_main = 29;
		}
		close2;
		cutin "",255;
		navigateto("ra_fild10",179,176);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11716) == 1" );
	end;
}

// Main Quest: Step 28. (entrance npc is a part of the instance Maze of Oz)
// Main Quest: Step 29. (1@oz solo instance)

// Main Quest: Step 30.
gw_fild01,276,339,3	duplicate(dummy_cloaked_npc)	Maram#ep18_Ozexit	4_EP18_MARAM

gw_fild01,273,339,3	script	#ep18_in front of Oz Exit	4_POINT_RED,1,1,{
// trigger OnClick + OnTouch, so OnTouch commented
	// end;
// OnTouch:
	if (ep18_1_main == 31 || ep18_1_main == 32) {
		mes "[Maram]";
		mes "<FONT SIZE = 14><B>Phew!</FONT></B>";
		mes "Finally out!";
		cloakoffnpcself( "Maram#ep18_Ozexit" );
		cutin "ep18_maram_01.png",2;
		npctalk "I'm so tired...", "Maram#ep18_Exit of Oz", bc_self;
		next;
		mes "[Maram]";
		mes "From here ^e5555e to the west^000000 a little further, there is the entrance to the village ^e5555e^000000";
		next;
		select( "town?" );
		mes "[Maram]";
		mes "It's more like a ^e5555e hideout^000000 where Rachel's fugitives are hiding, rather than a village.";
		next;
		mes "[Maram]";
		mes "You'd better see it yourself than I say.";
		if (ep18_1_main == 31) {
			completequest 11720;
			setquest 11721;
			ep18_1_main = 32;
		}
		close2;
		cutin "",255;
		cloakonnpcself( "Maram#ep18_Ozexit" );
		navigateto("gw_fild01",35,102);
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11720) == 1" );
	end;
}

// Main Quest: Step 31. + 33.
gw_fild01,39,100,5	duplicate(dummy_npc)	Exotic Merchant#ep18_gw2	4_EP18_MERCHANT
gw_fild01,34,96,3	duplicate(dummy_npc)	Exotic Merchant#ep18_gw3	4_EP18_MERCHANT

gw_fild01,35,102,5	script	Maram#ep18_gw	4_EP18_MARAM,{
	if (ep18_1_main == 32) {
		mes "[Camper]";
		mes "Ahhhh~~~";
		mes "It's not bad to go camping like this sometimes~~~";
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 14><B>It's me! It's me!</FONT></B>";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Camper]";
		mes "Are you my country?";
		mes "Did we know each other?";
		next;
		mes "[Maram]";
		mes "What are you talking about?";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Miriam]";
		mes "^e5555eIs this the reaction when I bring in an outsider ^000000?";
		cloakoffnpcself( "Miriam#ep18_gw" );
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "Ah...";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Imril]";
		mes "Then I'll go first.";
		cloakoffnpcself( "Imril#ep18_gw" );
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 14><B>Ah!! Imril wait!!!!</FONT></B>";
		cutin "ep18_maram_01.png",2;
		changequest 11721,11722;
		ep18_1_main = 33;
		close3;
	}
	if (ep18_1_main == 33) {
		mes "[Maram]";
		mes "Ah...";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Imril]";
		mes "Then I'll go first.";
		cloakoffnpcself( "Imril#ep18_gw" );
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Maram]";
		mes "<FONT SIZE = 14><B>Ah!! Imril wait!!!!</FONT></B>";
		cutin "ep18_maram_01.png",2;
		close3;
	}
	if (ep18_1_main == 34) {
		mes "[Maram]";
		mes "Suad is late...";
		mes "What if it really doesn't come?";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Miriam]";
		mes "Go back to Rachel.";
		mes "If trust has already been broken ^e5555e, you may never be able to enter the village again^000000";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Maram]";
		mes "But at this rate, the villagers will only continue to suffer.";
		mes "If you need help from an outsider...";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Miriam]";
		mes "You don't understand";
		cutin "ep18_miriam_03.png",2;
		npctalk "Because you are like us and different.", "Miriam#ep18_gw", bc_self;
		next;
		mes "[Maram]";
		mes "";
		cutin "ep18_maram_03.png",2;
		next;
		mes "[Maram]";
		mes "I also... want to understand... you guys...";
		npctalk "I'm sorry", "Maram#ep18_gw", bc_self;
		next;
		mes "[Miriam]";
		mes "";
		cutin "ep18_miriam_03.png",2;
		npctalk "I'm so sorry I said that.", "Miriam#ep18_gw", bc_self;
		next;
		mes "[Suad]";
		mes "How can such a guy bring an outsider without any advice?";
		mes "Considering the past, be grateful that you came to listen to even the last excuse.";
		cutin "ep18_suad_03.png",2;
		cloakoffnpcself( "Suad#ep18_gw" );
		next;
		mes "[Maram]";
		mes "Suad!";
		mes "I was reckless to bring an outsider to the village entrance without a word!";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Maram]";
		mes "But they are trustworthy enough to entrust your mother with an important task!";
		mes "What you worry about won't happen!";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Suad]";
		mes "Is it enough credit for Niren-sama to entrust you with the work?";
		mes "What does it have to do with being trusted by Niren?";
		cutin "ep18_suad_03.png",2;
		npctalk "It means nothing!", "Suad#ep18_gw", bc_self;
		next;
		mes "[Suad]";
		mes "<FONT SIZE = 14>Niren-sama wouldn't even know you were delivering supplies here.</FONT>";
		next;
		mes "[Maram]";
		mes "That's";
		cutin "ep18_maram_01.png",2;
		npctalk "That's right...", "Maram#ep18_gw", bc_self;
		next;
		mes "[Miriam]";
		mes "Stop sarcastic Suad";
		cutin "ep18_miriam_03.png",2;
		npctalk "Speak up!", "Miriam#ep18_gw", bc_self;
		next;
		mes "[Suad]";
		mes "I'm not sarcastic";
		mes "I was just telling the truth";
		cutin "ep18_suad_03.png",2;
		next;
		mes "[Miriam]";
		mes "If true ^e5555e, Rachel no longer sells anything to us, and if this continues, we will all die of starvation^000000.";
		cutin "ep18_miriam_03.png",2;
		npctalk "You don't want to be like that, do you?", "Miriam#ep18_gw", bc_self;
		next;
		mes "[Maram]";
		mes "You can buy things in Baines and other towns, but fewer and fewer people can get through the maze of Oz^000000.";
		cutin "ep18_maram_01.png",2;
		npctalk "Imril was also dangerous.", "Maram#ep18_gw", bc_self;
		next;
		mes "[Maram]";
		mes "Still ^e5555eIf you have combat skills^000000, you can pass by killing monsters, but in the future, it's not a battle skill problem, ^e5555eThe entire maze may be submerged in lava^000000.";
		next;
		mes "[Maram]";
		mes "Then the people who will help you won't even come here.";
		npctalk "It's too late then!", "Maram#ep18_gw", bc_self;
		next;
		mes "[Maram]";
		mes "And if ^e5555eMother requested ^000000 ^e5555eAboriginal and migrant mediation^000000, we will be able to cross the Gorge of Oz by bridge again!";
		next;
		mes "[Suad]";
		mes "Intervention? Niren-sama is thinking like a dream again.";
		mes "^e5555eGray children^000000 were born.";
		cutin "ep18_suad_03.png",2;
		npctalk "Niren-nim is thinking like a dream again.", "Suad#ep18_gw", bc_self;
		next;
		mes "[Miriam]";
		mes "But thanks to you, I was never hungry and now I can help the village children not starve.";
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Suad]";
		mes "Okay.";
		mes "Then give me a chance.";
		mes "Like Niren gave us a chance.";
		cutin "ep18_suad_03.png",2;
		npctalk "I gave up the opportunity and ran away...", "Suad#ep18_gw", bc_self;
		next;
		mes "[Miriam]";
		mes "What?";
		cutin "ep18_miriam_03.png",2;
		npctalk "Are you allowing this easily?", "Miriam#ep18_gw", bc_self;
		next;
		mes "[Maram]";
		mes "Really?!";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Maram]";
		mes "Are you serious?";
		cutin "ep18_miriam_03.png",2;
		npctalk "Actually, I didn't expect much!", "Maram#ep18_gw", bc_self;
		next;
		mes "[Suad]";
		mes "What is it,";
		mes "That reaction.";
		cutin "ep18_suad_03.png",2;
		npctalk "Then go back!!", "Suad#ep18_gw", bc_self;
		next;
		mes "[Maram]";
		mes "No~ No~";
		mes "Thank you~";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Maram]";
		mes "Then, before Suad changes his mind, come to the village ^e5555e^000000!";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "Let's go ahead and talk about the details.";
		ep18_1_main = 35;
		changequest 11723,11724;
		close2;
		cutin "",255;
		cloakonnpcself( "Miriam#ep18_gw" );
		cloakonnpcself( "Suad#ep18_gw" );
		warp "wolfvill",152,113;
		end;
	}
	mes "[Maram]";
	mes "Hmm~";
	mes "Shall we light a bonfire?";
	cutin "ep18_maram_01.png",2;
	close3;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11721) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11723) == 1" );
	end;
}

gw_fild01,36,103,5	duplicate(dummy_cloaked_npc)	Miriam#ep18_gw	4_EP18_MIRIAM
gw_fild01,41,103,5	duplicate(dummy_cloaked_npc)	Suad#ep18_gw	4_EP18_SUAD

// Main Quest: Step 32.
gw_fild01,37,105,5	script(CLOAKED)	Imril#ep18_gw	4_EP18_IMRIL,{
	if (ep18_1_main == 33) {
		mes "[Imril]";
		mes "why.";
		cutin "ep18_imril_01.png",2;
		next;
		mes "[Maram]";
		mes "Don't go alone, help us.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Imril]";
		mes "It's ^e5555eour rule^000000 not to bring in outsiders.";
		mes "Even if you ask for help, I can't do anything.";
		cutin "ep18_imril_02.png",2;
		npctalk "What power do I have?", "Imril#ep18_gw", bc_self;
		next;
		mes "[Maram]";
		mes "Ummm...";
		cutin "ep18_maram_03.png",2;
		next;
		mes "[Maram]";
		mes "Then why don't you go to the village and call me ^e5555e Suad^000000?";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Maram]";
		mes "I don't think I'll let you into the village because I brought in an outsider.";
		cutin "ep18_maram_01.png",2;
		npctalk "Save me", "Maram#ep18_gw", bc_self;
		next;
		mes "[Imril]";
		mes "^e5555eSuad^000000 is sensitive to such things.";
		mes "Didn't you tell me beforehand?";
		cutin "ep18_imril_02.png",2;
		npctalk "You must be very angry.", "Imril#ep18_gw", bc_self;
		next;
		mes "[Maram]";
		mes "This time, things got messed up, so I didn't have time to talk in advance.";
		mes "Now ^e5555eRachel's situation^000000, you know about it.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Imril]";
		mes "That's why I went all the way to ^e5555eBaines^000000 to buy stuff.";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "I've already helped you, so I'll ask ^e5555eSuad^000000.";
		mes "But don't expect too much.";
		cutin "ep18_imril_03.png",2;
		next;
		mes "[Maram]";
		mes "Okay.";
		cutin "ep18_maram_01.png",2;
		npctalk "Thank you", "Maram#ep18_gw", bc_self;
		next;
		mes "[Maram]";
		mes "Vegetable Merchant Adventurer_C735-nim, I think you need to persuade ^000000 with Suad to enter the village ^e5555e.";
		mes "I don't know if I'll meet you...";
		next;
		mes "[Maram]";
		mes "Let's wait until ^e5555eSuad^000000 comes";
		completequest 11722;
		setquest 11723;
		ep18_1_main = 34;
		close2;
		cloakonnpcself( "Imril#ep18_gw" );
		cutin "",255;
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11722) == 1" );
	end;
}

// Main Quest: Step 34.
// + Quest: Investigation of Oz Labyrinth. Step 1 + 13 (final).
wolfvill,143,114,5	duplicate(dummy_cloaked_npc)	Maram#ep18_wv	4_EP18_MARAM
wolfvill,145,114,5	duplicate(dummy_cloaked_npc)	Miriam#ep18_wv	4_EP18_MIRIAM

wolfvill,143,113,5	script	Imril#ep18_wv	4_EP18_IMRIL,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 35)
		end;
	if (ep18_1_main == 35) {
		mes "[Imril]";
		mes "<FONT SIZE = 14>!</FONT>";
		mes "Are you really here?";
		cutin "ep18_imril_03.png",2;
		next;
		mes "[Imril]";
		mes "I did convey the message.";
		mes "That ^e5555esuad^000000 would allow outsiders to enter the town!";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Miriam]";
		mes "That means that the situation in the village is not good.";
		cloakoffnpcself( "Miriam#ep18_wv" );
		cloakoffnpcself( "Maram#ep18_wv" );
		cutin "ep18_miriam_03.png",2;
		next;
		mes "[Ellie]";
		mes "In this kind of environment, it's unreasonable to be self-sufficient.yo. This.";
		mes "Wood is hard as stone.";
		mes "Isn't it a stone, not a tree?";
		cutin "ep172_beta.bmp",2;
		next;
		mes "[Maram]";
		mes "I think the situation will be better than it is now if we can get a little help from outside.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Imril]";
		mes "It would be nice if that was the case.";
		mes "Souard didn't say anything, but he must have been quite troubled.";
		cutin "ep18_imril_01.png",2;
		npctalk "Because he has a strong sense of responsibility.", "Imril#ep18_wv", bc_self;
		next;
		mes "[Maram]";
		mes "And, as expected, vegetable merchant adventurer_C735's help with purchases seems to have worked!";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Maram]";
		mes "^e5555eYou say that you will only be allowed to enter^000000 to procure supplies, but knowing that Vegetable Merchant Adventurer_C735 is ^e5555e a trustworthy person^000000 will make you more relaxed.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "Then, shall we start by having a conversation with the villagers ^e5555e^000000?";
		next;
		mes "[Maram]";
		mes "^e5555e Listening to people's stories^000000 and getting to know them ^e5555e might reveal a clue about the work that your mother has entrusted to you^000000.";
		// note: unlocks side quests
		completequest 11724;
		ep18_1_main = 36;
		getitem 1000405,50;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		close2;
		cutin "",255;
		cloakonnpcself( "Miriam#ep18_wv" );
		cloakonnpcself( "Maram#ep18_wv" );
		end;
	}

	// Quest before the daily quests
	switch( isbegin_quest(11735) ) {
	case 0:
		switch( isbegin_quest(11725) ) {
		case 0:
			mes "[Imril]";
			mes "Thanks to you, I was able to safely pass ^e5555eMaze of Oz^000000";
			mes "Thank you.";
			cutin "ep18_imril_03.png",2;
			next;
			mes "[Imril]";
			mes "In the past, if you were careful, going alone wasn't a big problem, but these days it's getting harder and harder to go alone.";
			cutin "ep18_imril_02.png",2;
			next;
			mes "[Imril]";
			mes "Currently, due to the circumstances of our village, it is impossible to take an escort with us every time, and it is dangerous to see a group of people traveling together.";
			cutin "ep18_imril_01.png",2;
			next;
			mes "[Imril]";
			mes "I wish I could explore the depths of the labyrinth of Oz.";
			mes "<FONT SIZE = 14>Lava progress...</FONT>";
			mes "<FONT SIZE = 16><B>The distribution of monsters...</FONT></B>";
			cutin "ep18_imril_02.png",2;
			next;
			mes "[Imril]";
			mes "Hmm...";
			mes "Adventurer, you are strong, so in your spare time ^e5555e Why don't you go to the maze of Oz with me^000000?";
			mes "Even if it's a frivolous request, the chance to meet someone as strong as an adventurer is rare.";
			next;
			switch( select( "Leave now!", "Later..." ) ) {
			case 1:
				mes "[Imril]";
				mes "Wow!";
				mes "Really?";
				mes "Isn't it impressive that you were so willing to do something like this?";
				cutin "ep18_imril_03.png",2;
				next;
				mes "[Imril]";
				mes "Then, let's meet at ^e5555eOz's maze entrance^000000!";
				mes "Do you remember the way?";
				cutin "ep18_imril_02.png",2;
				setquest 11725;
				navigateto("oz_dun01",27,184);
				close3;
			case 2:
				close3;
			}
			end;
		case 1:
			cutin "ep18_imril_02.png",2;
			mes "[Imril]";
			mes "whether carrying loads or handling lava";
			mes "Monsters are a stumbling block.";
			mes "It would be nice if there was a way to get rid of it.";
			navigateto("oz_dun01",27,184);
			close3;
		case 2:
			end;
		}
		end;
	case 1:
		mes "[Imril]";
		mes "Ah...";
		mes "It stings on my skin.";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Suad]";
		mes "What idiot goes so deep into the maze in a dress like that.";
		mes "I'm glad it wasn't baked as is!";
		cutin "ep18_suad_03.png",2;
		next;
		mes "[Imril]";
		mes "Whatever you say!";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "Anyway ^e5555eMaze of Oz Things are getting worse and worse^000000";
		mes "^e5555e The lava area is also getting up and there is ^000000.";
		cutin "ep18_imril_01.png",2;
		next;
		mes "[Imril]";
		mes "If this were the case, there wouldn't be much left to traverse the maze of Oz.";
		next;
		mes "[Suad]";
		mes "Certainly, if the lava has spread to that extent, countermeasures must be taken as soon as possible.";
		cutin "ep18_suad_03.png",2;
		next;
		mes "[Suad]";
		mes "For now";
		mes "You'll need to reduce the number of monsters in the Labyrinth of Oz to send people to work on.";
		next;
		cutin "",255;
		completequest 11735;
		getitem 1000405,20;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		mes "^4d4dff A favorable rating for you occurs.^000000";
		add_reputation_points(REPUTATION_EP18, 100);
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
		}
		close;
	case 2:
		break;
	}

	mes "[Imril]";
	mes "The monsters that were carrying luggage and handling lava are a stumbling block.";
	mes "It would be nice if there was a way to get rid of it.";
	cutin "ep18_imril_01.png",2;
	next;
	mes "[Imril]";
	mes "How are you, Adventurer?";
	mes "^e5555e Are you interested in defeating monsters^000000?";
	cutin "ep18_imril_02.png",2;
	next;

	.@menu$[0] = "Maze of Oz Level 1[170]";
	if (checkquest(11737,PLAYTIME) == 0 || checkquest(11737,PLAYTIME) == 1)
		.@menu$[0] = "^8C8C8C" + .@menu$[0] + "(pending)^000000";
	else if (checkquest(11736,HUNTING) == 0 || checkquest(11736,HUNTING) == 1)
		.@menu$[0] = "^8C8C8C" + .@menu$[0] + "(running)^000000";

	.@menu$[1] = "Maze of Oz Level 2[200]";
	if (checkquest(11739,PLAYTIME) == 0 || checkquest(11739,PLAYTIME) == 1)
		.@menu$[1] = "^8C8C8C" + .@menu$[1] + "(pending)^000000";
	else if (checkquest(11738,HUNTING) == 0 || checkquest(11738,HUNTING) == 1)
		.@menu$[1] = "^8C8C8C" + .@menu$[1] + "(running)^000000";

	switch( select( .@menu$[0], .@menu$[1], "Stop" ) ) {
	case 1:
		switch( checkquest(11737,PLAYTIME) ) {
		case -1:
			break;
		case 0:
		case 1:
			mes "[Imril]";
			mes "You did a great job today. Thank you.";
			mes "Will you help me tomorrow too?.";
			cutin "ep18_imril_04.png",2;
			close3;
		case 2:
			erasequest 11737;
			break;
		}
		switch( checkquest(11736,HUNTING) ) {
		case -1:
			mes "[Imril]";
			mes "^e5555eDefeat about 20^000000 " + strmobinfo(1,21295) + " in the first floor of the maze of Oz.";
			mes "Because even a small reduction in the number of monsters will be of great help to the hawkers who pass through the maze.";
			cutin "ep18_imril_03.png",2;
			next;
			if (select( "Accept", "Stop" ) == 2)
				close3;
			mes "[Imril]";
			mes "Then be careful and go there~";
			setquest 11736;
			close3;
		case 0:
		case 1:
			mes "[Imril]";
			mes "^e5555eDefeat about 20^000000 " + strmobinfo(1,21295) + " in the first floor of the maze of Oz.";
			mes "Because even a small reduction in the number of monsters will be of great help to the hawkers who pass through the maze.";
			cutin "ep18_imril_03.png",2;
			close3;
		case 2:
			mes "[Imril]";
			mes "Are you done already?";
			mes "Because it's reliable!";
			cutin "ep18_imril_04.png",2;
			erasequest 11736;
			setquest 11737;
			add_reputation_points(REPUTATION_EP18, 30);
			if (get_reputation_points(REPUTATION_EP18) >= 5000)
				.@bonus = 1;
			if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
				ep18_1_main = 37;
				setquest 18082;
			}
			getitem 1000405,3+.@bonus;	// Ep18_Amethyst_Fragment
			getexp 4364880,3000000;
			close3;
		}
	case 2:
		switch( checkquest(11739,PLAYTIME) ) {
		case -1:
			break;
		case 0:
		case 1:
			mes "[Imril]";
			mes "You did a great job today. Thank you.";
			mes "Will you help me tomorrow too?.";
			cutin "ep18_imril_04.png",2;
			close3;
		case 2:
			erasequest 11739;
			break;
		}
		switch( checkquest(11738,HUNTING) ) {
		case -1:
			mes "[Imril]";
			mes "^e5555eDefeat about 20^000000 " + strmobinfo(1,21298) + " in the second floor of the maze of Oz.";
			mes "Because even a small reduction in the number of monsters will be of great help to the hawkers who pass through the maze.";
			cutin "ep18_imril_03.png",2;
			next;
			if (select( "Accept", "Stop" ) == 2)
				close3;
			mes "[Imril]";
			mes "Then be careful and go there~";
			setquest 11738;
			close3;
		case 0:
		case 1:
			mes "[Imril]";
			mes "^e5555eDefeat about 20^000000 " + strmobinfo(1,21298) + " in the second floor of the maze of Oz.";
			mes "Because even a small reduction in the number of monsters will be of great help to the hawkers who pass through the maze.";
			cutin "ep18_imril_03.png",2;
			close3;
		case 2:
			mes "[Imril]";
			mes "Are you done already?";
			mes "Because it's reliable!";
			cutin "ep18_imril_04.png",2;
			erasequest 11738;
			setquest 11739;
			add_reputation_points(REPUTATION_EP18, 30);
			if (get_reputation_points(REPUTATION_EP18) >= 5000)
				.@bonus = 1;
			if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
				ep18_1_main = 37;
				setquest 18082;
			}
			getitem 1000405,3+.@bonus;	// Ep18_Amethyst_Fragment
			getexp 11588320,3000000;
			close3;
		}
		end;
	case 3:
		close3;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11724) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11724) == 2 && isbegin_quest(11725) == 0" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11735) == 1" );

	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(11735) == 2 && checkquest(11736,HUNTING) == -1 && (checkquest(11737,PLAYTIME) == -1 || checkquest(11737,PLAYTIME) == 2)" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11735) == 2 && checkquest(11736,HUNTING) == 2" );
	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(11735) == 2 && checkquest(11738,HUNTING) == -1 && (checkquest(11739,PLAYTIME) == -1 || checkquest(11739,PLAYTIME) == 2)" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11735) == 2 && checkquest(11738,HUNTING) == 2" );
	end;
}

// Main Quest: Step 35.
wolfvill,180,179,3	script	Village boy#distinction	4_M_DST_CHILD,{
	if (ep18_1_main == 37) {
		mes "[Village Boy]";
		mes "The conference is starting soon.";
		mes "It's not a small, frequent meeting, it's a contest with all the people you trust!";
		next;
		mes "[Village Boy]";
		mes "You can go to <NAVI>[the other way]<INFO>wolfvill,144,151,0,101,0</INFO></NAVI>. Adventurer's seat is also available.";
		mes "Of course, adventurers are also trustworthy now.";
		completequest 18082;
		setquest 16567;
		ep18_1_main = 38;
		close;
	}
	mes "[Boy]";
	mes "Meetings are often held in our village, because everyone gathers opinions there.";
	mes "But the competition is different! It's really important!";
	next;
	mes "[Boy]";
	mes "Of course not everyone can participate.";
	mes "I said only friends from trusted villages would participate.";
	next;
	mes "[Boy]";
	mes "Is this an event that even adventurers can participate in?";
	mes "It's up to you, adventurer!";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(18082) == 1" );
	end;
}

wolfvill,146,148,0	script	#contest1	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch:
	.@char_id = getcharid(0);
	if (ep18_1_main == 38 || ep18_1_main == 39 || ep18_1_main == 40) {
		cloakoffnpcself( "Radical Man#Extremist2" );
		cloakoffnpcself( "Suad#1" );
		cloakoffnpcself( "Miriam#1" );
		cloakoffnpcself( "Maram#1" );
		cloakoffnpcself( "Radical Man#extremist1" );
		cloakoffnpcself( "Radical Man#extremist2_" );
		cloakoffnpcself( "Exciting Youth#Extreme3" );
		cloakoffnpcself( "Hot-tempered youth#extremist4" );
		cloakoffnpcself( "Angry Youth#Extremist5" );
		cloakoffnpcself( "Native Old Man#Senior1" );
		cloakoffnpcself( "Embarrassed old man#Senior2" );
		cloakoffnpcself( "Timid middle-aged#senior3" );
		cloakoffnpcself( "Timid old man#senior4" );
		cloakoffnpcself( "Passionate man#WeaponHolder1" );
		cloakoffnpcself( "Skeptical Young Man#neutral1" );
		cloakoffnpcself( "Silent Youth#Neutral2" );
		cloakoffnpcself( "Neutral Youth#Neutral3" );
		end;
	}
	if (ep18_1_main == 41) {
		cloakoffnpcself( "Maram#1" );
		cloakoffnpcself( "Suad#1" );
		cloakoffnpcself( "Miriam#1" );
		cloakoffnpcself( "Radical Man#Extremist2" );
		cloakoffnpcself( "Exciting Youth#Extreme3" );
		end;
	}
	if (ep18_1_main == 42) {
		cloakoffnpcself( "Suad#1" );
		cloakoffnpcself( "Radical Man#Extremist2" );
		cloakoffnpcself( "Exciting Youth#Extreme3" );
		end;
	}
	if (ep18_1_main == 47) {
		cloakoffnpcself( "Suad#sms01" );
		npctalk ".......", "Suad#sms01", bc_self;
		end;
	}
	if (ep18_1_main == 49) {
		cloakoffnpcself( "Suad#sms02" );
		cloakoffnpcself( "Maram#sms02" );
		cloakoffnpcself( "Miriam#sms02" );
		cloakoffnpcself( "Lamachus#sms01" );
		cloakoffnpcself( "Kun#sms01" );
		cloakoffnpcself( "Yoppi#sms01" );
		end;
	}
	end;
}

wolfvill,147,148,3	script(CLOAKED)	Radical Man#extremist2_	4_DST_SOLDIER,{
	npctalk "Let's fight! We must fight!", "", bc_self;
	end;
}

wolfvill,145,144,7	script(CLOAKED)	Exciting Youth#Extreme3	4_EP18_GW_MAN02,{
	npctalk "Hahahaha! If we fight, we must win!", "", bc_self;
	end;
}

wolfvill,148,144,1	script(CLOAKED)	Hot-tempered youth#extremist4	4_EP18_GW_WOMAN01,{
	npctalk "Let's smash them all! Heavy! Heavy!", "", bc_self;
	end;
}

wolfvill,143,148,5	script(CLOAKED)	Angry Youth#Extremist5	4_EP18_GW_MAN02,{
	npctalk "You have to show everything spicy!", "", bc_self;
	end;
}

// Main Quest: Step 36 + 41.
wolfvill,144,151,5	script(CLOAKED)	Suad#1	4_EP18_SUAD,{
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		mes "[Mini Elly]";
		mes "Take me out of the bag. Put me on your head.";
		close;
	}
	if (ep18_1_main < 38)
		end;
	if (ep18_1_main == 38) {
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "You're a little late. No, I'm not blaming you.";
		mes "Come this way. The meeting will start soon.";
		next;
		cutin "ep18_maram_02.png",2;
		mes "[Maram]";
		mes "After all, being invited to this event, adventurer-nim is amazing.";
		mes "Well, we do that too.I was hoping you would.";
		next;
		cutin "ep18_miriam_02.png",2;
		mes "[Miriam]";
		mes "...a nonsense. Adventurer, don't worry too much about Maram's words.";
		mes "It's an important position. Maram, don't act like you normally do.";
		next;
		cutin "ep18_maram_03.png",2;
		emotion ET_HUK, getnpcid(0,"Maram#1");
		mes "[Maram]";
		mes "No, Miriam! When I say that, I think I'm usually wrong.";
		mes "Oh, okay, okay. I'll focus.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Even if it's late, Suad is Yunan, and in fact there is still time left for the meeting to start.";
		mes "Adventurer, how about coming to hear people's opinions in advance?";
		next;
		cutin "ep18_maram_02.png",2;
		mes "[Maram]";
		mes "I think it will definitely help you to participate in the meeting....";
		mes "Listen to the story, and summarize the position of the adventurer.";
		next;
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "Yeah. That's not bad either.";
		mes "If you've heard enough, tell me. I'll start the meeting.";
		erasequest 16567;
		setquest 16568;
		setquest 16569;
		setquest 16570;
		setquest 16571;
		ep18_1_main = 39;
		close2;
		cutin "",255;
		emotion ET_THINK;
		emotion ET_ANGER, getnpcid(0,"Radical Man#extremist1");
		end;
	}
	if (ep18_1_main == 40) {
		.@char_id = getcharid(0);
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "Have you all heard of it? This one is also ready.";
		mes "Let's start the meeting in a little while.";
		next;
		mes "[Suad]";
		mes "Everyone has gathered.";
		mes "Now let's start the conference.";
		npctalk "Suad: Everyone has gathered. Let's start the contest now.", "Suad#1", bc_self;
		next;
		mes "[Suad]";
		mes "Today we are going to talk about future countermeasures.";
		mes "The current location of the Gray Wolf Village is not very good.";
		next;
		cutin "ep18_suad_03.png",2;
		mes "[Suad]";
		mes "Today, thousands of people cross the canyon of Oz and come to the village.";
		mes "On the other hand, the supply of food and daily necessities is insufficient.";
		next;
		mes "[Suad]";
		mes "We now have to decide which way to go.";
		mes "If you have something you want to say, please feel free to say it.";
		next;
		cutin "",255;
		emotion ET_ANGER, getnpcid(0,"Radical Man#extremist1");
		mes "[Radical Man]";
		mes "Let's show Rachel's settlers a savory taste.";
		mes "You must destroy their temple!";
		npctalk "That's right! That's right!", "Radical Man#extremist2_", bc_self;
		npctalk "You have to destroy them all!", "Hot-tempered youth#extremist4", bc_self;
		next;
		mes "[Mini Elly]";
		mes "I felt it while listening to the story, but those guys are particularly harsh.";
		mes "It is difficult to determine whether the expressions are rough or those who are originally rough, but with the information given so far.";
		next;
		mes "[native old man]";
		mes "But haven't we had a good time in peace so far?";
		mes "Suddenly destroying the temple, what is the sound of a spear beating while sleeping!";
		npctalk "There are things to say and things not to say!", "Timid old man#senior4", bc_self;
		next;
		mes "[Radical Man]";
		mes "How long do you have to hide in this palm-sized piece of land?";
		mes "Didn't Mr. Suad also say that he lacks resources and land compared to people?";
		next;
		emotion ET_ANGER, getnpcid(0,"Radical Man#extremist1");
		mes "[Radical Man]";
		mes "Originally the land of Rachel belonged to our natives.";
		mes "It's time to get your money back!";
		npctalk "You must destroy it and take it back!", "Hot-tempered youth#extremist4", bc_self;
		npctalk "Okay, we have to fight now! It's a war!", "Hot-tempered youth#extremist4", bc_self;
		next;
		mes "[native old man]";
		mes "It's easy to say, what are you going to do without preparation!";
		mes "Besides, don't you know that once you bleed, you can't get it back?";
		npctalk "Things that have never been in a fight are luck for war!", "Timid middle-aged#senior3", bc_self;
		next;
		mes "[Radical Man]";
		mes "Have we not bled until now?";
		mes "They may not have shed.";
		next;
		mes "[Radical Man]";
		mes "But the despised indigenous peoples, many years of exposure to violence and unpaid wages.";
		mes "What do you mean if all they shed wasn't blood and tears?";
		npctalk "The only option left for us is war!", "Radical Man#Extremist2", bc_self;
		npctalk "All who oppose are the same persecutors!", "Angry Youth#Extremist5", bc_self;
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "Uh, I think it's overheating.";
		mes "Suad, don't you need to calm down?";
		next;
		cutin "ep18_suad_03.png",2;
		emotion ET_THINK;
		mes "[Suad]";
		mes "let's wait a little longer.";
		next;
		cutin "",255;
		mes "[Mini Elly]";
		mes "It's a bit odd.";
		mes "It's a way of turning even those who oppose it into an enemy.";
		next;
		mes "[Radical Man]";
		mes "We have endured enough!";
		mes "Let's show our wrath to those who are obsessed with Goddess!";
		npctalk "Let's show our wrath!", "Radical Man#extremist2_", bc_self;
		next;
		mes "[embarrassed old man]";
		mes "I, like those fearless little ones.";
		mes "If you make a mistake, everyone will die, isn't it! Why take such a risk!";
		next;
		mes "[Radical Man]";
		mes "Heh, I don't know those who hide here only to save their lives.";
		mes "We have already risked our lives to wash our blood with blood!";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Did you do it? I'm still.... Blood washes well with cold water.";
		next;
		cutin "ep18_miriam_03.png",2;
		mes "[Miriam]";
		mes "This is not the time to be joking, Maram.";
		mes "And Suad, if you don't really clean it up, the forest residents will be completely divided like this.";
		next;
		mes "[Miriam]";
		mes "Even if you don't like it, I think it needs to be cleaned up by now.";
		next;
		cutin "ep18_suad_03.png",2;
		emotion ET_THINK;
		mes "[Suad]";
		mes "...Stop it, this is not a place for us to blush.";
		mes "It's a place to gather opinions and move forward.";
		npctalk "Suad: Stop, this is not a place we made to blush amongst ourselves.", "Suad#1", bc_self;
		next;
		cutin "",255;
		emotion ET_ANGER, getnpcid(0,"Radical Man#extremist1");
		mes "[Radical Man]";
		mes "Then go ahead and destroy everything!";
		mes "Is Mr. Suad also on the side of those defeatists?";
		next;
		mes "[embarrassed old man]";
		mes "Look. Those blue-eyed kids don't know what they're talking about!";
		next;
		cutin "ep18_suad_02.png",2;
		mes "[Suad]";
		mes "Do you want to think about me?";
		mes "If you believed that someone would take a side, you must have misunderstood you until now.";
		next;
		cutin "ep18_suad_03.png",2;
		mes "[Suad]";
		mes "I will listen to both sides' positions and arguments.";
		mes "The opinion that you cannot stay here forever, the opinion that the team will be embarrassed if you go out without preparation. Both are not wrong.";
		next;
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "So, let's persuade each other rather than taking sides.";
		mes "It means to say how and why their opinions should be realized.";
		npctalk ".", "Embarrassed old man#Senior2", bc_self;
		npctalk ".", "Radical Man#extremist2_", bc_self;
		next;
		cutin "",255;
		mes "[Radical Man]";
		mes "We already have the capacity to arm ourselves.";
		mes "It is pointless to point out that you are not ready.";
		next;
		cutin "ep18_maram_03.png",2;
		emotion ET_QUESTION, getnpcid(0,"Maram#1");
		mes "[Maram]";
		mes "Huh? Are you saying there is a way to buy weapons that I don't know about?";
		mes "It's the first time I've heard that...";
		next;
		cutin "",255;
		mes "[Radical Man]";
		mes "Besides, how long are you going to prepare!";
		mes "Until we grow old and die? Until our next generation learns to give up completely?";
		next;
		mes "[native old man]";
		mes "But armed conflict is dangerous. Failure will get you out of control.";
		mes "No rebellion. All we can do is support protests.";
		npctalk "Until the protests, we are in favor.", "Timid old man#senior4", bc_self;
		npctalk "War is against war, but if it's a protest...", "Skeptical Young Man#neutral1", bc_self;
		next;
		mes "[timid old man]";
		mes "Yeah. We don't want to be completely rebounded either!";
		mes "It would be difficult to live here with such a stigma.";
		next;
		mes "[timid old man]";
		mes "I just want to show that we are so dissatisfied.";
		mes "It's the opposite of destroying everything.";
		npctalk "Yes. Be as quiet as possible.", "Neutral Youth#Neutral3", bc_self;
		next;
		mes "[timid youth]";
		mes "...if everyone can join forces, we will also support the protests.";
		mes "Let's show our opinion";
		next;
		mes "[Radical Man]";
		mes "Non-violent demonstrations that are mere verbal demonstrations have no effect!";
		mes "You must at least capture the temple and protest.";
		next;
		mes "[Hot-blooded old man]";
		mes "That's right. Can you just pretend you heard me say it out loud?";
		mes "They will listen to us only when we lose what they value the most.";
		next;
		mes "[Mini Elly]";
		mes "I thought we could gather opinions in a peaceful way, but then it turns into a violent one...";
		next;
		cutin "ep18_suad_01.png",2;
		emotion ET_SURPRISE;
		mes "[Suad]";
		mes "Stop, how many opinions have you gathered?";
		mes "Do you agree with the idea of ??proceeding with the protest, occupying the temple and making our will known?";
		next;
		cutin "",255;
		mes "[Radical Man]";
		mes "I don't like it at all...but that's the point of discussion.";
		next;
		mes "[Native Old Man]";
		mes "It still looks dangerous, but we'll still have to make our point.";
		next;
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "Then we will hold an additional meeting to discuss the details.";
		mes "Do you understand that this meeting must be a secret meeting?";
		npctalk "Suad: The conference will end here.", "Suad#1", bc_self;
		next;
		mes "[Suad]";
		mes "Adventures, and Maram and Miriam. And with the exception of a few, let them disband.";
		mes "The detailed operation is the operation establishmentI'll let you know when it's over.";
		next;
		cutin "",255;
		mes "[Radical Man]";
		mes "Let's show something through armed demonstrations!";
		mes "Ahhhhhhhhhh!";
		next;
		mes "[embarrassed old man]";
		mes "Maybe we made the right decision.";
		mes "It's not like you're being dragged along the way your son said.";
		cloakonnpcself( "Radical Man#extremist1" );
		cloakonnpcself( "Silent Youth#Neutral2" );
		cloakonnpcself( "Timid middle-aged#senior3" );
		cloakonnpcself( "Angry Youth#Extremist5" );
		next;
		mes "[neutral youth]";
		mes "Can we really do it?";
		mes "But as long as it's decided at the convention, we'll have to cooperate as much as possible.";
		cloakonnpcself( "Native Old Man#Senior1" );
		cloakonnpcself( "Embarrassed old man#Senior2" );
		cloakonnpcself( "Hot-tempered youth#extremist4" );
		cloakonnpcself( "Skeptical Young Man#neutral1" );
		next;
		cutin "ep18_miriam_03.png",2;
		cloakonnpcself( "Passionate man#WeaponHolder1" );
		cloakonnpcself( "Radical Man#extremist2_" );
		cloakonnpcself( "Neutral Youth#Neutral3" );
		cloakonnpcself( "Timid old man#senior4" );
		mes "[Miriam]";
		mes "Well, adventurer. I have something to tell you, so could you please come over here?";
		mes "Suad, Maram. I ask you to take a moment before the meeting as well.";
		changequest 16572,16573;
		// erasequest 16567;
		ep18_1_main = 41;
		close3;
	}
	if (ep18_1_main == 41) {
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "If you've heard enough, tell me. I'll start the meeting.";
		close3;
	}
	cutin "ep18_suad_01.png",2;
	mes "[Suad]";
	mes "If you've heard enough, tell me. I'll start the meeting.";
	close3;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16567) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16572) == 1" );
	end;
}

// Main Quest: Step 37.
wolfvill,145,146,5	script(CLOAKED)	Radical Man#extremist1	4_EP18_GW_MAN01,{
	if (ep18_1_main < 38)
		end;
	if (ep18_1_main == 39) {
		if (isbegin_quest(16568) == 1) {
			mes "[Radical Man]";
			mes "You must destroy all Freya's temples!";
			mes "Let us show you who owns this land!";
			next;
			mes "[Radical Man]";
			mes "Hoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo";
			mes "We must be strong! We must be armed!";
			next;
			mes "[Radical Man]";
			mes "Heavy! Whoa! Let's win! Let's fight!";
			npctalk "Let's win! Let's fight!", "Radical Man#extremist2_", bc_self;
			npctalk "Let's win! Let's fight!", "Radical Man#Extremist2", bc_self;
			npctalk "Let's win! Let's fight!", "Exciting Youth#Extreme3", bc_self;
			npctalk "Let's win! Let's fight!", "Hot-tempered youth#extremist4", bc_self;
			npctalk "Let's win! Let's fight!", "Angry Youth#Extremist5", bc_self;
			next;
			emotion ET_QUESTION, getnpcid(0,"Maram#1");
			mes "[Radical Man]";
			mes "It is to protect ourselves and find a place to stand!";
			mes "This is what we need to do right now!";
			completequest 16568;
			if (isbegin_quest(16569) == 2 && isbegin_quest(16570) == 2 && isbegin_quest(16571) == 2) {
				setquest 16572;
				ep18_1_main = 40;
			}
			close2;
			emotion ET_ANGER;
			end;
		}
	}
	mes "[Radical Man]";
	mes "Let us show you who owns this land!";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16568) == 1" );
	end;
}

// Main Quest: Step 38.
wolfvill,139,148,5	script(CLOAKED)	Native Old Man#Senior1	4_EP18_GW_OLD01,{
	if (ep18_1_main < 38)
		end;
	if (ep18_1_main == 39) {
		if (isbegin_quest(16569) == 1) {
			mes "[Native Old Man]";
			mes "I have never left this town since I was born.";
			mes "I was born, raised, and grown up in this town.";
			next;
			mes "[Native Old Man]";
			mes "It means that there was no problem even if I lived like that until now...";
			mes "But now, should I use a radical method?";
			next;
			mes "[Native Old Man]";
			mes "Isn't the young man doing something wrong with blood on his head?";
			mes "What should I do if I work too hard and get 4 months?";
			next;
			mes "[Native Old Man]";
			mes "No, I'm not against the idea of ??young people at all";
			mes "But just don't do anything too extreme.";
			completequest 16569;
			npctalk "I think I've heard enough of this. Let's go back to Suad.", "", bc_self;
			if (isbegin_quest(16568) == 2 && isbegin_quest(16570) == 2 && isbegin_quest(16571) == 2) {
				setquest 16572;
				ep18_1_main = 40;
			}
			close2;
			emotion ET_THINK, getnpcid(0,"Suad#1");
			emotion ET_ANGER, getnpcid(0,"Radical Man#extremist1");
			sleep2 500;
			npctalk "I don't think that's a good thing, it's stinky.", "Timid middle-aged#senior3", bc_self;
			sleep2 2000;
			emotion ET_QUESTION, getnpcid(0,"Maram#1");
			sleep2 1500;
			npctalk "I don't think that's a good thing, it's stinky.", "Timid middle-aged#senior3", bc_self;
			sleep2 1000;
			npctalk "I don't think that's a good thing, it's stinky.", "Timid middle-aged#senior3", bc_self;
			sleep2 1000;
			end;
		}
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16569) == 1" );
	end;
}

// Main Quest: Step 39.
wolfvill,150,147,1	script(CLOAKED)	Passionate man#WeaponHolder1	4_M_MIDDLE,{
	if (ep18_1_main < 38)
		end;
	if (ep18_1_main == 39) {
		if (isbegin_quest(16570) == 1) {
			mes "[Hot-blooded old man]";
			mes "Hey, isn't this an adventurer!";
			mes "Before the competition, you were nervous? Let's have a drink here.";
			next;
			select( "I will decline", "Well then, gulp!" );
			mes "[Hot-blooded old man]";
			mes "Ah, that Suad man. He's strict.";
			mes "You're not going to be that hard, don't you?";
			next;
			mes "[Hot-blooded old man]";
			mes "Don't be too nervous because it's a hard seat. You just have to say what you're comfortable with.";
			mes "If possible, it would be better if the adventurer supported our opinion!";
			next;
			mes "[Hot-blooded old man]";
			mes "What's our opinion? It's war, of course.";
			mes "Look at this weapon. We are ready to arm ourselves!";
			next;
			mes "[Hot-blooded old man]";
			mes "The rest are all goddesses going to Rachel and wiped out.";
			mes "It shows how much we have endured so far!";
			completequest 16570;
			if (isbegin_quest(16568) == 2 && isbegin_quest(16569) == 2 && isbegin_quest(16571) == 2) {
				setquest 16572;
				ep18_1_main = 40;
			}
			close2;
			npctalk "Let's smash them all! Heavy! Heavy!", "Hot-tempered youth#extremist4", bc_self;
			end;
		}
	}
	mes "[Hot-blooded old man]";
	mes "It's a convention, a convention. It's a big event!";
	mes "You should have a drink! Drink, drink!";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16570) == 1" );
	end;
}

// Main Quest: Step 40.
wolfvill,152,145,1	script(CLOAKED)	Skeptical Young Man#neutral1	4_M_RACHMAN1,{
	if (ep18_1_main < 39)
		end;
	if (ep18_1_main == 39) {
		if (isbegin_quest(16571) == 1) {
			mes "[Skeptical Young Man]";
			mes "Uh, our opinion?";
			mes "We're still young, can we just say that?";
			next;
			emotion ET_SURPRISE, getnpcid(0,"Suad#1");
			mes "[Skeptical Young Man]";
			mes "Well, those screaming guys over there are also young.";
			mes "I don't know what they believed in to fight...";
			next;
			mes "[Skeptical Young Man]";
			mes "You don't really think we can smash all the Rachel settlers.";
			mes "The number of heads is so different.";
			next;
			emotion ET_THINK, getnpcid(0,"Suad#1");
			mes "[Skeptical Young Man]";
			mes "Didn't we just do commando training or something?";
			mes "But whoever started it, the number of kids like that suddenly increased, and I'm just worried.";
			completequest 16571;
			if (isbegin_quest(16568) == 2 && isbegin_quest(16569) == 2 && isbegin_quest(16570) == 2) {
				setquest 16572;
				ep18_1_main = 40;
			}
			close2;
			emotion ET_ANGER, getnpcid(0,"Radical Man#extremist1");
			sleep2 500;
			npctalk ".", "Silent Youth#Neutral2", bc_self;
			end;
		}
	}
	mes "[Skeptical Young Man]";
	mes "We're still young, can we just say our opinions out loud?";
	mes "Even though it's a convention, don't adults have a loud voice?";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16571) == 1" );
	end;
}

wolfvill,149,152,3	script(CLOAKED)	Maram#1	4_EP18_MARAM,{
	if (ep18_1_main == 40) {	// 16572 = 2
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Shhh! The contest will start soon.";
		mes "If I talk, Miriam and Suad will be scolded?";
		next;
		emotion ET_SURPRISE, getnpcid(0,"Suad#1");
		mes "[Maram]";
		mes "So, adventurer-sama, please listen to Suad's story together.";
		mes "Of course other people's stories.";
		close3;
	}
	cutin "ep18_maram_01.png",2;
	mes "[Maram]";
	mes "Huh, huh, you're finally here.";
	mes "You believed in my eyes, but you're even more amazing than I thought, Adventurer, aren't you?";
	next;
	mes "[Maram]";
	mes "I hope you will be active in the meeting as well.";
	mes "Suad is a bit stubborn. I need someone to soften it up a bit~";
	next;
	cutin "ep18_maram_02.png",2;
	mes "[Maram]";
	mes "I'm looking forward to adventurers.";
	mes "I still believe in my eyes.";
	close3;
}

// Main Quest: Step 42.
wolfvill,148,153,3	script(CLOAKED)	Miriam#1	4_EP18_MIRIAM,{
	if (checkweight(1000405,40) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main == 41) {
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "What's going on? It seems like a lot of trouble to prepare for a demonstration.";
		mes "Ah, really, because I'm a business man, I.";
		next;
		cutin "ep18_miriam_01.png",2;
		mes "[Miriam]";
		mes "I'm not kidding. Hey, those people. Isn't it strange? The guys who said they could be armed.";
		mes "Look at your armament. Not for hunting.";
		next;
		cutin "",255;
		mes "[Mini Elly]";
		mes "I also analyzed them. They are classified as anti-personnel weapons, i.e. for warfare.";
		mes "If you try to hunt with that, your prey will become tattered, and you will not be able to use it.";
		next;
		cutin "ep18_suad_03.png",2;
		mes "[Suad]";
		mes "What happened?";
		mes "You wouldn't be able to get such an armament easily.";
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "Oh I can assure you, Maram, that stuff like that just doesn't go on the market.";
		mes "Where did it come from?";
		next;
		cutin "ep18_miriam_01.png",2;
		mes "[Miriam]";
		mes "I'm not sure where I'm guessing, but I'm not sure.";
		mes "So, can you dig them up and find out the source?";
		next;
		cutin "ep18_suad_03.png",2;
		mes "[Suad]";
		mes "That's right. If it's for a demonstration anyway, you'll need some armament.";
		mes "How about throwing a snack for a trade?";
		next;
		cutin "ep18_suad_02.png",2;
		mes "[Suad]";
		mes "And I'm not against actually trading and arming.";
		mes "The reason we've been oppressed so far is because we don't have the strength.";
		next;
		cutin "ep18_maram_02.png",2;
		mes "[Maram]";
		mes "Hey, leader. At best, I've reduced work from struggle to demonstration, but what if I'm addicted to war weapons?";
		mes "Let's find out the source, only the source.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "It doesn't look good for Suad to come out here.";
		mes "Me and Adventurer, why don't Miriam go on an investigation?";
		next;
		cutin "ep18_miriam_01.png",2;
		mes "[Miriam]";
		mes "There is something I want to investigate other than digging into those people myself.";
		mes "So I'll ask you and the adventurer to come in direct contact, Maram.";
		next;
		cutin "ep18_maram_02.png",2;
		mes "[Maram]";
		mes "Okay. Then let's go to work, adventurer?";
		mes "Approach it while pretending you want to trade.";
		mes "It won't be difficult with this Maram.";
		changequest 16573,16574;
		ep18_1_main = 42;
		getitem 1000405,40;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		close2;
		cutin "",255;
		cloakonnpcself( "Miriam#1" );
		cloakonnpcself( "Maram#1" );
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16573) == 1" );
	end;
}

// Main Quest: Step 43.
wolfvill,143,145,7	script(CLOAKED)	Radical Man#Extremist2	4_M_RASWORD,{
	if (ep18_1_main == 42) {
		cloakonnpcself( "Suad#1" );
		cloakoffnpcself( "Maram#1_1" );
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Uh, hello.";
		mes "I want to ask you something. Is it okay?";
		next;
		cutin "",255;
		mes "[Radical Man]";
		mes "What's going on? I have nothing to say.";
		next;
		cutin "ep18_maram_02.png",2;
		mes "[Maram]";
		mes "No, the armament is very cool.";
		mes "I don't think you can get it anywhere, where did you get it?";
		next;
		cutin "",255;
		mes "[Radical Man]";
		mes "Is this? Someone bought it because it was so cheap!";
		mes "To protect my body, to show others... Who would attack me with such an armament?";
		next;
		mes "[Radical Man]";
		mes "That's right! You need to be armed like this to be safe in protests!";
		mes "Aren't you afraid to bow your head in the temple?";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Who sold it, can you give me some information here?";
		next;
		cutin "",255;
		mes "[Radical Man]";
		mes "Uh... You can't do it with bare mouth. It's a purchase that we also worked hard for.";
		next;
		cutin "ep18_maram_02.png",2;
		mes "[Maram]";
		mes "But you said that you sold it very cheaply, didn't you?";
		mes "It's a stock disposal or something. If that's the case, would it be better for us to know that, or would it be better for the temple to know~";
		next;
		cutin "",255;
		mes "[Radical Man]";
		mes "Hey, really. Shouldn't it be okay for a weapon that is sold so cheaply to fall into the hands of those with goddess disease?";
		mes "Let me just tell you. If you want to go to a protest anyway, you have to be armed.";
		next;
		cutin "ep18_maram_02.png",2;
		mes "[Maram]";
		mes "Thought well. Are you wise?";
		next;
		cutin "",255;
		mes "[Radical Man]";
		mes "Okay...but we just won't meet.";
		mes "Go to Rachel and meet Jack the Beard.";
		next;
		npctalk "Maram: Bearded jack?", "Maram#1_1", bc_self;
		mes "[Radical Man]";
		mes "If you say you came to buy a smelly dandelion, they will guide you there.";
		mes "I mean, I know how to keep security. I'm not stupid either.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Who's stupid? I've only said wise so far.";
		mes "Thanks for the good info!";
		next;
		cutin "",255;
		mes "[Mini Elly]";
		mes "You're going back to Rachel. Let's reset the target coordinates.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Well then, adventurer. I guess I'll have to go round and round to find the core.";
		mes "Let's go to <NAVI>[Rachel]<INFO>rachel,75,44,0,101,0</INFO></NAVI> together!";
		changequest 16574,16575;
		ep18_1_main = 43;
		cutin "",255;
		cloakonnpcself( "Radical Man#Extremist2" );
		cloakonnpcself( "Exciting Youth#Extreme3" );
		cloakonnpcself( "Maram#1_1" );
		close;
	}
	mes "[Radical Man]";
	mes "Isn't it safe to be armed like this?";
	mes "Rachel with the goddess disease will be frightened and bow their heads!";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16574) == 1" );
	end;
}

wolfvill,148,145,3	duplicate(dummy_cloaked_npc)	Maram#1_1	4_EP18_MARAM

wolfvill,140,150,5	script(CLOAKED)	Embarrassed old man#Senior2	4_EP18_GW_MIDDLE01,{
	npctalk "No, why are these young people like that?", "", bc_self;
	end;
}

wolfvill,138,145,7	script(CLOAKED)	Timid middle-aged#senior3	4_EP18_GW_MIDDLE02,{
	npctalk "I don't think that's a good thing, it's stinky.", "", bc_self;
	end;
}

wolfvill,141,146,7	script(CLOAKED)	Timid old man#senior4	4_M_DST_GRAND,{
	npctalk "I'd love to hear your opinions...", "", bc_self;
	end;
}

wolfvill,154,146,1	script(CLOAKED)	Silent Youth#Neutral2	4_EP18_GW_MAN02,{
	npctalk ".", "", bc_self;
	end;
}

wolfvill,151,150,1	script(CLOAKED)	Neutral Youth#Neutral3	4_EP18_GW_MAN01,{
	npctalk "I don't agree with any opinion. They're all so pure.", "", bc_self;
	end;
}

// Main Quest: Step 44.
rachel,72,42,3	duplicate(dummy_cloaked_npc)	Maram#1_2	4_EP18_MARAM

rachel,75,44,3	script	Bearded jack#armsman_rachel	4_M_MIDDLE1,{
	if (ep18_1_main == 43) {
		cloakoffnpcself( "Maram#1_2" );
		mes "[Mini Elly]";
		mes "You have arrived. The 'Bearded jack' industry is a hardware store.";
		next;
		mes "[Bearded jack]";
		mes "Come here. What did you come looking for?";
		next;
		mes "[Bearded jack]";
		mes "When it comes to knives and pots, there's nothing like our shop in Rachel.";
		mes "Look around slowly.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Uh, we came looking for something a little different.";
		mes "Adventurer, what was that?";
		next;
		cutin "",255;
		switch( select( "Smelly Sock", "Smelly Dandelion", "Scented Sock", "Scented Dandelion" ) ) {
		case 1:
			mes "[Mini Elly]";
			mes "Um, I don't think it was.";
			next;
			mes "[Bearded jack]";
			mes "Why do you find such dirty things in our store?";
			close2;
			cloakonnpcself( "Maram#1_2" );
			end;
		case 2:
			mes "[Bearded jack]";
			mes "Heh, I found it right.";
			mes "Have you come to hear where the smelly dandelions bloom?";
			next;
			mes "[Bearded jack]";
			mes "Let's go to Baines, we'll meet you there.";
			mes "There is an unknown weapons dealer in the corner of Baines.";
			next;
			mes "[Bearded jack]";
			mes "If you ask who you came as an introduction, you can of course say that it was Jack's introduction.";
			mes "It's probably just a short trade in order to hit and run away. If it's too late, I won't deal with you.";
			next;
			mes "[Bearded jack]";
			mes "Well, <NAVI>[Weapon Merchant]<INFO>veins,293,282,0,101,0</INFO></NAVI> is not under my jurisdiction since you linked it.";
			mes "Then do your best.";
			changequest 16575,16576;
			ep18_1_main = 44;
			cloakonnpcself( "Maram#1_2" );
			navigateto("veins",293,282);
			close;
		case 3:
			mes "[Mini Elly]";
			mes "Um, I don't think it was.";
			next;
			mes "[Bearded jack]";
			mes "No, our store is a hardware store, not a laundry.";
			close2;
			cloakonnpcself( "Maram#1_2" );
			end;
		case 4:
			end;
		}
	}
	if (ep18_1_main == 44) {
		mes "[Bearded jack]";
		mes "Well, <NAVI>[Weapon Merchant]<INFO>veins,293,282,0,101,0</INFO></NAVI> is not under my jurisdiction since you linked it.";
		mes "Then do your best.";
		cloakonnpcself( "Maram#1_2" );
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16575) == 1" );
	end;
}

// Main Quest: Step 45.
veins,289,281,7	duplicate(dummy_cloaked_npc)	Maram#1_3	4_EP18_MARAM

veins,293,282,3	script	Dandelion#weapons_bains	4_M_DESERT,{
	if (ep18_1_main == 44) {
		cloakoffnpcself( "Maram#1_3" );
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Hello~";
		mes "Do you do business?";
		next;
		cutin "",255;
		mes "[Dandelion]";
		mes "I don't.";
		next;
		cutin "ep18_maram_02.png",2;
		mes "[Maram]";
		mes "Don't do that. I'm here because Jack introduced me to dandelions blooming here.";
		next;
		cutin "",255;
		mes "[Dandelion]";
		mes "Who is dandelion, who!";
		mes "Someone came up with such a strange password!";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Aha, the name is so it's a dandelion.";
		mes "Security is simple enough for what it is.";
		next;
		cutin "",255;
		mes "[Dandelion]";
		mes "Anyway, what's going on!";
		mes "If you come here to buy weapons, you just blow what you really need and take it with you.";
		next;
		select( "Rather than buying some weapons..." );
		cutin "ep18_maram_02.png",2;
		mes "[Maram]";
		mes "Is that right? Adventurer is right.";
		mes "Buy in bulk rather than just buying a weapon or two, huh?";
		next;
		cutin "",255;
		mes "[Dandelion]";
		mes "Buy in bulk? How much to buy.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Well, roughly this amount?";
		mes "Is this store accepting everything?";
		next;
		cutin "",255;
		mes "[Dandelion]";
		mes "Gulp, he, that much? War?";
		mes "Joe, I think it would be possible if you give me a little time.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "What? We don't have time.";
		mes "I wish I could get it as soon as possible.";
		next;
		cutin "",255;
		mes "[Dandelion]";
		mes "Call the schedule. I'll try to fit it as best as I can.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "That's fine, but how about connecting us with the supplier?";
		mes "I'll take care of the brokerage fee so you won't be disappointed.";
		next;
		cutin "",255;
		mes "[Dandelion]";
		mes "Hey! Who looks at the bottom while doing business!";
		mes "Okay, go back, go back!";
		next;
		cutin "ep18_maram_02.png",2;
		mes "[Maram]";
		mes "Hey, who said that? I already know everything. Selling this at a special price like this is a shiny business, isn't it?";
		mes "It's not like we're going to trade for a long time anyway.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "So, I just want a little bit of your information.";
		mes "It's good for us in a hurry, and the guy who pays a lot of brokerage fees is good. Isn't it one stone two sets?";
		next;
		cutin "",255;
		mes "[Dandelion]";
		mes "Okay... that's fine. Instead, you should never leak it.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Such a natural thing to say.";
		next;
		cutin "",255;
		mes "[Dandelion]";
		mes "It's Volcano Thor. If you go deep inside, there's a secret base, a weapon from there.";
		mes "I'm just letting you know that the deal is going to end when the stock there anyway.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Seeing you say that, it seems like it will be cut off soon?";
		next;
		cutin "",255;
		mes "[Dandelion]";
		mes "You bastard, don't try to think more and figure out the rest yourself.";
		mes "When you get what you want, pay a fee and go.";
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "The secret base of Thor Volcano... this smells very strange.";
		mes "Isn't this supposed to be our final destination?";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "I'll see you at <NAVI>[Thor Volcano]<INFO>thor_v01,169,169,0,101,0</INFO></NAVI> as Mr. Dandelion told me. Prepare properly and come!";
		mes "Don't go directly to the military base, come from there at 3 o'clock and I'll be waiting for you.";
		changequest 16576,16577;
		ep18_1_main = 45;
		cutin "",255;
		cloakonnpcself( "Maram#1_3" );
		navigateto("que_thr",133,53);
		close;
	}
	if (ep18_1_main == 45) {
		mes "[Maram]";
		mes "I'll see you at <NAVI>[Thor Volcano]<INFO>thor_v01,169,169,0,101,0</INFO></NAVI> as Mr. Dandelion told me. Prepare properly and come!";
		mes "Don't go directly to the military base, come from there at 3 o'clock and I'll be waiting for you.";
		cloakonnpcself( "Maram#1_3" );
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16576) == 1" );
	end;
}

// Main Quest: Step 46.
thor_v01,169,169,3	script	Maram#Armybase-Secret passage	4_EP18_MARAM,{
	if (ep18_1_main == 45 || ep18_1_main == 46) {
		mes "[Maram]";
		mes "Here, here! Follow me!";
		mes "It's a <NAVI>[shortcut]<INFO>que_thr,133,53,0,101,0</INFO></NAVI> that rotates a little but can avoid surveillance.";
		close2;
		warp "que_thr",181,53;
		end;
	}
	end;
}

// Main Quest: Step 47. (entrance npc is a part of the instance Thor Gunsu Base)
// Main Quest: Step 48-50 inside the instance 1@tcamp.

// Main Quest: Step 51.
wolfvill,140,112,0	duplicate(#contest1)	#sms01	HIDDEN_WARP_NPC,5,5

wolfvill,142,109,1	duplicate(dummy_cloaked_npc)	Miriam#sms01	4_EP18_MIRIAM
wolfvill,143,110,1	duplicate(dummy_cloaked_npc)	Maram#sms01	4_EP18_MARAM

wolfvill,140,112,5	script(CLOAKED)	Suad#sms01	4_EP18_SUAD,{
	if (ep18_1_main == 47) {
		cutin "ep18_suad_01.png",0;
		mes "[Suad]";
		mes "Adventurer? Why are you back already? Didn't you go with Miriam to investigate the source of the weapon?";
		next;
		select( "I know, but the source is..." );
		cutin "",255;
		mes "[Mini Elly]";
		mes "Not only that. The bigger problem is that weapons and ammunition that have to be disposed of have flowed in unsafe conditions.";
		mes "Analysis shows that the risk of old gunpowder and unmanaged weapons is about 9.72%.";
		next;
		cutin "ep18_suad_03.png",0;
		mes "[Suad]";
		mes "I expected it, but it's worse than I thought. I was only concerned about the source. I can't guarantee the stability of the weapon. It's an old weapon...";
		next;
		cutin "ep18_suad_01.png",0;
		mes "[Suad]";
		mes "Arms are necessary, but we can't use those that have a problematic source. If we track down weapons leaking from over there and make a problem with them, we could end up in a bad situation.";
		next;
		mes "[Suad]";
		mes "But finding a stable supplier and opening a trade will take a long time, so you have to decide carefully.";
		next;
		mes "[Suad]";
		mes "Retrieve all weapons for now, then let Maram and Miriam discuss when they return.";
		mes "Didn't Miriam and Maram come back together?";
		next;
		select( "To inform the trafficking..." );
		mes "[Suad]";
		mes "Yes. All I can do is wait.";
		next;
		cloakoffnpcself( "Miriam#sms01" );
		cloakoffnpcself( "Maram#sms01" );
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "Suad!!! Suad, Suad!!! It's a big deal! It's a big deal, it's a big deal!!! Suad! Listen, listen to me, Suad!!!";
		next;
		cutin "ep18_suad_04.png",0;
		mes "[Suad]";
		mes "Maram, Miriam. What's going on?";
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "If this is the case, we will all die!!";
		next;
		cutin "ep18_suad_04.png",0;
		mes "[Suad]";
		mes "...what? Please elaborate. Why?";
		next;
		cutin "ep18_miriam_03.png",1;
		mes "[Miriam]";
		mes "I'll explain. Maram, you sit over there and calm down.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Is that so? I'm surprised... I'm a little new-chested.";
		npctalk "Are you...?", "Miriam#sms01", bc_self;
		npctalk "Didn't you know? You didn't know", "Maram#sms01", bc_self;
		next;
		cutin "ep18_miriam_01.png",1;
		mes "[Miriam]";
		mes "People who were armed before, remember?";
		next;
		cutin "ep18_suad_01.png",0;
		mes "[Suad]";
		mes "They said they were the weapons of Thor Volcano? I heard that from an adventurer. Did Rachel find out after all?";
		next;
		cutin "ep18_miriam_01.png",1;
		mes "[Miriam]";
		mes "No, I heard that the group raided the migrant's top. They said they brought everything they had.";
		next;
		cutin "ep18_suad_04.png",0;
		mes "[Suad]";
		mes "What? When?";
		next;
		cutin "ep18_miriam_01.png",1;
		mes "[Miriam]";
		mes "It's been awhile, but Rachel already knows about it.";
		next;
		cutin "ep18_suad_03.png",0;
		mes "[Suad]";
		mes "Gee... Why...?";
		next;
		cutin "ep18_miriam_01.png",1;
		mes "[Miriam]";
		mes "It's not over yet. I think they're claiming that we're armed and raiding, so they're rebels. The voice for a tougher response is gaining strength.";
		next;
		cutin "ep18_suad_03.png",0;
		mes "[Suad]";
		mes "Oh my, that's the worst. If that side attacks first... No, no. I'll have to meet them first.";
		next;
		cutin "ep18_miriam_03.png",1;
		mes "[Miriam]";
		mes "What are you going to do?";
		next;
		cutin "ep18_suad_03.png",0;
		mes "[Suad]";
		mes "We should be held accountable for putting our position at a disadvantage with an unexpected action. We need to figure out the scale and come up with countermeasures.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Go together. I, <NAVI>[Where]<INFO>wolfvill,131,257,0,101,0</INFO></NAVI>I know there is! Adventurer goes with you too. There will be a need for a third-party witness. I feel the same way!";
		completequest 16580;
		setquest 17517;
		ep18_1_main = 48;
		close2;
		cutin "",255;
		cloakonnpcself( "Maram#sms01" );
		cloakonnpcself( "Miriam#sms01" );
		cloakonnpcself( "Suad#sms01" );
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16580) == 1" );
	end;
}

// Main Quest: Step 52.
wolfvill,132,256,1	duplicate(dummy_npc)	Loot#sms01	4_WOODBOX
wolfvill,131,258,1	duplicate(dummy_npc)	Loot#sms02	4_WOODBOX
wolfvill,132,258,1	duplicate(dummy_npc)	Loot#sms03	4_WOODBOX

wolfvill,131,257,1	script	Loot#sms04	4_WOODBOX,{
	if (ep18_1_main == 48) {
		setpcblock PCBLOCK_NPC, true;
		cloakoffnpcself( "Suad#sms02" );
		cloakoffnpcself( "Maram#sms02" );
		cloakoffnpcself( "Miriam#sms02" );
		npctalk "Is this a loot?", "Suad#sms02", bc_self;
		sleep2 1000;
		npctalk "Ha... Really, looted stuff.", "Maram#sms02", bc_self;
		npctalk "ÇÏ...", "Miriam#sms02", bc_self;
		sleep2 2000;
		cloakoffnpcself( "Lamachus#sms01" );
		cloakoffnpcself( "Kun#sms01" );
		cloakoffnpcself( "Yoppi#sms01" );
		npctalk "Who touches other people's things?", "Lamachus#sms01", bc_self;
		npctalk "Did the thief teacher appear?", "Kun#sms01", bc_self;
		npctalk "The liver is too big. Other people's stuff!!", "Yoppi#sms01", bc_self;
		sleep2 2000;
		emotion ET_QUESTION, getnpcid(0,"Lamachus#sms01");
		setpcblock PCBLOCK_NPC, false;
		mes "[Lamachus]";
		mes "Huh? Suad! Miriam and Maram are here too.";
		next;
		mes "[Kun]";
		mes "What's going on everyone? That's all I said before about weapons.";
		next;
		cutin "ep18_miriam_03.png",0;
		mes "[Miriam]";
		mes "Is there anything more to say besides that?";
		next;
		cutin "",255;
		mes "[Yoppi]";
		mes "Hey~ It's scary~ Why all of a sudden? You're even bringing in a stranger. Is there anything to scare you?";
		npctalk "Who is that person?", "Kun#sms01", bc_self;
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "I'm so scared? I'm more scared of you! How can I raid the top?";
		next;
		cutin "",255;
		mes "[Lamachus]";
		mes "Oh, that? You don't have to praise me.";
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "Chiyingcha, isn't it?";
		next;
		cutin "ep18_suad_01.png",1;
		mes "[Suad]";
		mes "We're here to tell you why we raided the innocent top.";
		next;
		cutin "",255;
		mes "[Kun]";
		mes "What? Did you come all this way with nothing?";
		next;
		cutin "ep18_suad_02.png",1;
		mes "[Suad]";
		mes "Nothing? What you've done now is driving us into rebels. You gave us an excuse to attack us!";
		next;
		cutin "",255;
		mes "[Yoppi]";
		mes "If you attack from there, you can counterattack. What are you worried about? We have weapons now, don't we?";
		npctalk "What's wrong?", "Kun#sms01", bc_self;
		npctalk "Is it easy to talk?", "Maram#sms02", bc_self;
		next;
		mes "[Yoppi]";
		mes "Do you know who we robbed? You'd thank us if you found out? It's not an Innocent Top?";
		npctalk "You'd be sorry for doing this to us now.", "Lamachus#sms01", bc_self;
		next;
		cutin "ep18_miriam_03.png",0;
		mes "[Miriam]";
		mes "Do you know what it's called to leave innocent and raid the top? It's called robbery.";
		next;
		cutin "",255;
		mes "[Kun]";
		mes "No, really, it's too much. Robbery. The gun we turned was the top of Ahmad.";
		next;
		emotion ET_SURPRISE, getnpcid(0,"Suad#sms02");
		emotion ET_HUK, getnpcid(0,"Miriam#sms02");
		emotion ET_HUK, getnpcid(0,"Maram#sms02");
		emotion ET_QUESTION, playerattached();
		cutin "ep18_miriam_03.png",0;
		mes "[Miriam]";
		mes "Amad Ramen...";
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "Isn't that Suadne?";
		npctalk "Uh... there, there it was", "Maram#sms02", bc_self;
		next;
		cutin "",255;
		mes "[Kun]";
		mes "Yeah! He treated us like trash and ignored even his own adopted son!";
		next;
		mes "[Lamachus]";
		mes "there used to suck people like us!";
		npctalk "Mosquito...?", "Yoppi#sms01", bc_self;
		next;
		mes "[Yoppi]";
		mes "Isn't it good that we took revenge on Suad and obtained the necessary supplies?";
		npctalk "There are a lot of things we need!", "Lamachus#sms01", bc_self;
		next;
		mes "[Kun]";
		mes "That's right!! You suffered a lot because of your father. You came here because of your father.";
		next;
		mes "[Kun]";
		mes "Just because you're a native, you didn't admit to being a handsome son and abused him. No, he wouldn't even admit he was a son.";
		next;
		mes "[Yoppi]";
		mes "Who doesn't know about Suad's troubles here??";
		npctalk "No, no. Think carefully. We're taking your revenge.", "Kun#sms01", bc_self;
		next;
		mes "[Lamachus]";
		mes "You always just imagined in your mind? You don't need to be treated like that. You want revenge on your stepfather.";
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "Tell me something, Suad.";
		next;
		cutin "ep18_suad_03.png",1;
		mes "[Suad]";
		mes "... ha... I get it... Well... Be careful next time. I know what you guys are thinking, but we could be in a bigger danger... .";
		next;
		cutin "ep18_miriam_03.png",0;
		mes "[Miriam]";
		mes "Suad? Is that the end?";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "I'm not familiar with this kind of thing. From my short insight, they will continue to be like this in the future, so shouldn't they be armed?";
		next;
		cutin "ep18_suad_03.png",1;
		mes "[Suad]";
		mes "It is true that there is a shortage of supplies in the village. It is true that trade is getting harder and harder.";
		next;
		mes "[Suad]";
		mes "And the armament... As I said before, we need armament. We'll have to leave the things we've already acquired and find a new one. Still, that's why I wanted to discuss it with you.";
		next;
		cutin "ep18_miriam_03.png",0;
		mes "[Miriam]";
		mes "Suad? Tell me. You don't have a boss at this disposal? Can you say that you don't have any?";
		next;
		cutin "ep18_suad_03.png",1;
		mes "[Suad]";
		mes "Wait, wait. I need some time to organize my thoughts.";
		changequest 17517,17518;
		ep18_1_main = 49;
		close3;
	}
	if (ep18_1_main == 49) {
		cloakoffnpcself( "Suad#sms02" );
		cloakoffnpcself( "Maram#sms02" );
		cloakoffnpcself( "Miriam#sms02" );
		cloakoffnpcself( "Lamachus#sms01" );
		cloakoffnpcself( "Kun#sms01" );
		cloakoffnpcself( "Yoppi#sms01" );
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17517) == 1" );
	end;
}

// Main Quest: Step 53.
wolfvill,131,252,3	script(CLOAKED)	Lamachus#sms01	EP18_ARMED_VILLAGER01,{
	if (checkweight(1000405,30) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main == 49) {
		mes "[Kun]";
		mes "No! But I was just thinking about it. What did we do wrong? Why are you not doing it?";
		npctalk "I don't know that either? Did we help?", "Yoppi#sms01", bc_self;
		next;
		mes "[Lamachus]";
		mes "It's not that we're going to eat alone, it's that we all want to live well.";
		next;
		mes "[Yoppi]";
		mes "Is that right? I think so. Maybe we will change our minds if we work harder and be more active?";
		next;
		select( "Can I leave it that way..?" );
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "No way. Of course.If you do whatever you want without thinking about the future, is that a child or an adult?";
		next;
		cutin "ep18_miriam_03.png",0;
		mes "[Miriam]";
		mes "Suad. Talk to me.";
		next;
		cutin "",255;
		cloakoffnpcself( "Resident#sms01" );
		cloakoffnpcself( "Resident#sms02" );
		cloakoffnpcself( "Resident#sms03" );
		mes "[resident]";
		mes "Everyone was here. They said they raided the top? Did you get anything?";
		next;
		mes "[resident]";
		mes "Good job. We just have to give it a go. What, we have no power and there is no evil. We've been quiet until now, so we're just looking down and ignoring.";
		npctalk "We have to show that we can squirm too.", "Jumin#sms02", bc_self;
		next;
		mes "[Yoppi]";
		mes "By the way, Suad told me not to do it now~";
		next;
		mes "[resident]";
		mes "Why don't you?";
		next;
		mes "[Kun]";
		mes "Well, our actions put us more at risk, I'm not sure what you're talking about because I have a bad brain~";
		next;
		mes "[Lamachus]";
		mes "We weightlifted us from Rachel because we robbed the top~ Deal to attack us.";
		npctalk "What weightlifting we are!", "Jumin#sms01", bc_self;
		npctalk "Attack us??", "Resident#sms03", bc_self;
		npctalk "Is this true?", "Resident#sms02", bc_self;
		next;
		cutin "ep18_suad_01.png",1;
		mes "[Suad]";
		mes "Yes. The position has become very disadvantageous. There has not been much movement yet, but public opinion is not good.";
		next;
		cutin "",255;
		mes "[Lamachus]";
		mes "In times like these, shouldn't we have to raise our voices?";
		npctalk "We are human too. Just like you.", "Jumin#sms02", bc_self;
		npctalk "Now armed.", "Kun#sms01", bc_self;
		next;
		mes "[resident]";
		mes "Let's Jailbreak!!! Let's raise our voices!!";
		npctalk "Yes!! Then!!!", "Jumin#sms02", bc_self;
		npctalk "It's time for us to talk too!", "Jumin#sms01", bc_self;
		npctalk "Is that right? It's time for us too!", "Lamachus#sms01", bc_self;
		npctalk "How long will you live like this?", "Kun#sms01", bc_self;
		npctalk "Yes!!!", "Yoppi#sms01", bc_self;
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "Calm down for a second.";
		next;
		cutin "",255;
		mes "[resident]";
		mes "Suad! How long do we have to live like this? I'm going to die of unfairness!";
		npctalk "Why do we have to hide like fugitives?", "Resident#sms03", bc_self;
		npctalk "You can't live like this forever.", "Jumin#sms01", bc_self;
		next;
		mes "[Kun]";
		mes "Suad, you're too careful. We'll go and do it. Just like the ones who raided the top. It's okay.";
		next;
		mes "[resident]";
		mes "There was an adventurer here too. What do you think? Didn't you see it a lot while traveling around?";
		next;
		select( "I..." );
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "The atmosphere is getting...";
		next;
		select( "It seems strange." );
		cutin "ep18_miriam_03.png",0;
		mes "[Miriam]";
		mes "People are out of Suad's control, if that's the case.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Bang! Ahhh! It saves people! What's going on.";
		next;
		cutin "ep18_suad_01.png",1;
		mes "[Suad]";
		mes "Yes. Let's do it. Demonstration. It's true that we can't wait forever.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "What? Like this? Right now? Without preparation?";
		next;
		cutin "ep18_suad_01.png",1;
		mes "[Suad]";
		mes "It's not that they didn't prepare at all. You can move to Rachel little by little and hide, and when the time comes, you can join the temple.";
		next;
		cutin "",255;
		mes "[Lamachus]";
		mes "It's good to be at sunset today. The guards are shifting and the boundaries will loosen.";
		next;
		mes "[resident]";
		mes "Okay!!! I'll gather people!!";
		next;
		cloakonnpcself( "Resident#sms01" );
		cloakonnpcself( "Resident#sms02" );
		cloakonnpcself( "Resident#sms03" );
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "Maram, you stay here just in case.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Okay.";
		next;
		cutin "ep18_suad_01.png",1;
		mes "[Suad]";
		mes "And, you guys leave all those weapons behind.";
		next;
		cutin "",255;
		mes "[Yoppi]";
		mes "Oh, why!! We have to protect ourselves too!!";
		next;
		cutin "ep18_suad_01.png",1;
		mes "[Suad]";
		mes "Because we're not going to start an armed conflict. If anything bad happens while we're still carrying weapons, we're really going to turn into rebels.";
		next;
		cutin "",255;
		mes "[Kun]";
		mes "Ah, okay! Suad worries a lot anyway.";
		next;
		mes "[Lamachus]";
		mes "Why worry in advance about things that will never happen?";
		next;
		cutin "ep18_suad_01.png",1;
		mes "[Suad]";
		mes "Well, it's decided, so let's hurry. Gather at Rachel's <NAVI>[in front of the temple]<INFO>rachel,169,245,0,101,0</INFO></NAVI>";
		changequest 17518,17519;
		ep18_1_main = 50;
		getitem 1000405,30;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		close2;
		cutin "",255;
		cloakonnpcself( "Suad#sms02" );
		cloakonnpcself( "Maram#sms02" );
		cloakonnpcself( "Miriam#sms02" );
		end;
	}
	if (ep18_1_main == 50) {
		mes "[Lamachus]";
		mes "What are you doing? We decided to go to Rachel's <NAVI>[in front of the temple]<INFO>rachel,169,245,0,101,0</INFO></NAVI>";
		close2;
		cloakonnpcself( "Lamachus#sms01" );
		cloakonnpcself( "Kun#sms01" );
		cloakonnpcself( "Yoppi#sms01" );
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17518) == 1" );
	end;
}

wolfvill,129,256,3	duplicate(dummy_cloaked_npc)	Kun#sms01	EP18_ARMED_VILLAGER02
wolfvill,126,255,5	duplicate(dummy_cloaked_npc)	Yoppi#sms01	EP18_ARMED_VILLAGER03

wolfvill,129,251,1	duplicate(dummy_cloaked_npc)	Resident#sms01	4_M_RACHMAN1
wolfvill,129,248,7	duplicate(dummy_cloaked_npc)	Resident#sms02	4_M_MIDDLE1
wolfvill,132,250,1	duplicate(dummy_cloaked_npc)	Resident#sms03	4_EP18_GW_MAN01

wolfvill,126,252,7	duplicate(dummy_cloaked_npc)	Suad#sms02	4_EP18_SUAD
wolfvill,124,253,5	duplicate(dummy_cloaked_npc)	Miriam#sms02	4_EP18_MIRIAM
wolfvill,127,250,7	duplicate(dummy_cloaked_npc)	Maram#sms02	4_EP18_MARAM

// Main Quest: Step 54. (entrance npc is a part of the instance A Gathering Place of Wolves)
// Main Quest: Step 55-58 instance 1@nyr.

// Main Quest: Step 59.
rachel,118,197,1	duplicate(dummy_cloaked_npc)	Miriam#sms04	4_EP18_MIRIAM
rachel,119,199,3	duplicate(dummy_cloaked_npc)	Suad#sms04	4_EP18_SUAD

rachel,115,198,5	script(CLOAKED)	Zhed#sms01	4_M_RACHOLD1,{
	cutin "ra_gman2.bmp",0;
	mes "[Zhed]";
	mes "I think I'll be very busy from now on.";
	close3;
}

rachel,116,200,5	script	Niren#sms01	4_F_MADAME,{
	if (checkweight(1000405,60) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (getequipid(EQI_HEAD_TOP) != 400127) {	// Ep18_Mini_Elly
		unittalk getcharid(3), "" + strcharinfo(0) + " : Where did Mini Elly go?", bc_self;
		end;
	}
	if (ep18_1_main == 52) {
		setpcblock PCBLOCK_NPC, true;
		cloakoffnpcself( "Zhed#sms01" );
		npctalk "The number of casualties is over.", "Zhed#sms01", bc_self;
		sleep2 800;
		cloakoffnpcself( "Suad#sms04" );
		cloakoffnpcself( "Miriam#sms04" );
		npctalk "All of this has been moved to a safe place.", "Miriam#sms04", bc_self;
		setpcblock PCBLOCK_NPC, false;

		cutin "ra_gwoman.bmp",0;
		mes "[Niren]";
		mes "The damage is... too great.";
		next;
		cutin "ep18_suad_03.png",2;
		mes "[Suad]";
		mes "Besides, there's bloodshed, so rumors will quickly spread to Aboriginal riots. Already in a bad yard with a raid on the top.";
		next;
		cutin "ra_gman2.bmp",0;
		mes "[Zhed]";
		mes "Don't worry about public opinion. Let's fix it.";
		next;
		cutin "ra_gwoman.bmp",0;
		mes "[Niren]";
		mes "All the things that have happened recently were scheming.";
		next;
		cutin "ra_gman2.bmp",0;
		mes "[Zhed]";
		mes "It's our ignorance that we didn't take a closer look at the disturbing movements within the temple.";
		next;
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "I think I'll do it later, and I think both of us will have to settle the situation first.";
		next;
		cutin "ra_gwoman.bmp",0;
		mes "[Niren]";
		mes "Are you sure High Priest Youth Amal was involved?";
		next;
		cutin "ep18_miriam_01.png",1;
		mes "[Miriam]";
		mes "There was a period when my withered stepfather, who had been withered after the fall, suddenly revived and became more motivated. From then on, conflicts between the natives and settlers of Arunafelts emerged one by one.";
		next;
		cutin "",255;
		mes "[Mini Elly]";
		mes "It fits perfectly with the time when the Heart Hunters escaped from the mansion.";
		next;
		cutin "ra_gman2.bmp",0;
		mes "[Zhed]";
		mes "Then I'm sure the two of them colluded.";
		next;
		select( "Because I even witnessed it." );
		cutin "ra_gwoman.bmp",0;
		mes "[Niren]";
		mes "One question is, High Priest Youth Amal will not know the value of Ymir's heart piece. It would not have been easy to give up just by infiltrating the organization and causing conflict...";
		next;
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "Did you give it to me to get something more?";
		next;
		cutin "ep18_miriam_01.png",1;
		mes "[Miriam]";
		mes "I'm not sure, but the foster father... No, I'll have to go check it out myself.";
		next;
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "Where are you going? Any guesses?";
		next;
		cutin "ep18_miriam_01.png",1;
		mes "[Miriam]";
		mes "There is a summer cottage on the outskirts of Rachel. You've been looking for a sanatorium there lately, maybe if you're working with those crazy scientists to work something out.";
		next;
		cutin "",255;
		mes "[Mini Elly]";
		mes "You must be tracked.";
		next;
		cutin "ra_gwoman.bmp",0;
		mes "[Niren]";
		mes "Miriam, don't leave it up to you to track down the person who stole the heart piece. I hope the adventurer will accompany you.";
		next;
		select("Okay." );
		cutin "ra_gman2.bmp",0;
		mes "[Zhed]";
		mes "We will pick up the wounded here and search for any remnants that may remain. We must also pay attention to public opinion.";
		next;
		cutin "ep18_suad_01.png",2;
		mes "[Suad]";
		mes "We'll have to go back to the forest and do some follow-up.";
		mes "Miriam, adventurer. Please follow me then.";
		next;
		cutin "ep18_miriam_01.png",1;
		mes "[Miriam]";
		mes "Come on, adventurer. I have someone to accompany me before going to the villa, so I'll meet you at <NAVI>[Maze of Oz]<INFO>oz_dun01,223,116,0,101,0</INFO></NAVI>";
		completequest 17521;
		setquest 17525;
		ep18_1_main = 53;
		getitem 1000405,60;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		close2;
		cutin "",255;
		cloakonnpcself( "Miriam#sms04" );
		cloakonnpcself( "Suad#sms04" );
		end;
	}
	if (ep18_1_main == 53) {
		cutin "ra_gwoman.bmp",0;
		mes "[Niren]";
		mes "Did you not agree to meet Miriam at <NAVI>[Maze of Oz]<INFO>oz_dun01,223,116,0,101,0</INFO></NAVI>";
		close3;
	}
	mes "[Miriam]";
	mes "The situation here is not so good these days.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17521) == 1" );
	end;
}

// Main Quest: Step 60.
oz_dun01,223,116,3	script	Appointmentpoint#c12_evt01	4_POINT_BLUE,5,5,{
	if (ep18_1_main == 53) {
		if (isnpccloaked("Maram#c12_01") == true) {
			mes "You have arrived at your appointment.";
			mes "The other party doesn't seem to have arrived yet.";
			mes "Let's wait";
			close2;
			setpcblock PCBLOCK_NPC, true;
			emotion ET_THINK, playerattached();
			sleep2 2000;
			emotion ET_SLEEPY, playerattached();
			cloakoffnpcself( "Maram#c12_01" );
			npctalk "Ah! It's still there!", "Maram#c12_01", bc_self;
			sleep2 500;
			cloakoffnpcself( "Suad#c12_01" );
			npctalk "Isn't it late?", "Suad#c12_01", bc_self;
			setpcblock PCBLOCK_NPC, false;
			end;
		}
		select( "Was waiting for Miriam?" );
		mes "[Maram]";
		mes "I apologized to my mother and came out for a while.";
		mes "I'm still working on the protests, so I have to go back soon...";
		mes "Where is Miriam?";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Suad]";
		mes "He's coming.";
		cutin "ep18_suad_01.png",0;
		next;
		cloakoffnpcself( "Miriam#c12_01" );
		cloakoffnpcself( "Aira#c12_01" );
		mes "[Miriam]";
		mes "Sorry for being late. It took some time to find someone.";
		cutin "ep18_miriam_01.png",0;
		next;
		mes "[Miriam]";
		mes "This is Aira.";
		mes "He is a child who often serves his father, and he needs help to get into the villa.";
		next;
		cutin "",255;
		npctalk "Hello", "Aira#c12_01", bc_self;
		next;
		mes "[Maram]";
		mes "What, why did Aira come here?";
		mes "Does this have anything to do with this?";
		cutin "ep18_maram_01.png",2;
		next;
		cutin "",255;
		mes "[Aira]";
		mes "Long time no see. Maram brother.";
		mes "I came here to repay the debt I owed to Miriam unnie.";
		next;
		mes "[Aira]";
		mes "You want to see the villa?";
		mes "If you push Amal's wheelchair, he goes everywhere.";
		next;
		mes "[Aira]";
		mes "I just got the user key I got.";
		mes "I've been traveling with Amal lately, so I haven't returned it yet.";
		next;
		mes "[Aira]";
		mes "And the villa.";
		mes "Sometimes you lend it to a monk.";
		mes "It was like this again.";
		mes "But it's kind of weird.";
		next;
		mes "[Suad]";
		mes "Is it strange?";
		mes "I'd like to be specific.";
		cutin "ep18_suad_04.png",0;
		next;
		cutin "",255;
		mes "[Aira]";
		mes "People called monks say they stay for a while, but it seems like monks are lying.";
		next;
		mes "[Aira]";
		mes "It seems that Amal is running a secret group again.";
		mes "You said you were going to war last time, but you were pushed out of the temple, didn't you?";
		next;
		mes "[Aira]";
		mes "It seems you haven't given up yet.";
		mes "This time, more dangerous people are staying in the villa than the last time.";
		next;
		mes "[Aira]";
		mes "Whoever likes it, I'd like it to dry a bit.";
		mes "Rachel's mood is not good.";
		mes "If there is a war, it will be our natives who stand by the arrowhead.";
		next;
		mes "[Miriam]";
		mes "Well. no, it won't be a war.";
		mes "It's okay to be safe.";
		cutin "ep18_miriam_01.png",0;
		next;
		cutin "",255;
		mes "[Aira]";
		mes "Sister! How can you be so carefree?";
		mes "Do you know how scared I was while managing the villa?!";
		mes "There is a particularly crazy woman....";
		next;
		mes "[Maram]";
		mes "Ahah...";
		mes "Okay. Calm down, Aira.";
		mes "Because we're here to find out from now on.";
		cutin "ep18_maram_02.png",2;
		next;
		mes "[Miriam]";
		mes "For that reason, we are going to go into the villa where radical guests are staying.";
		mes "Probably because the people I met in the temple are like the guests.";
		cutin "ep18_miriam_01.png",0;
		next;
		mes "[Suad]";
		mes "I know what you mean.";
		mes "Honestly, I want to go with you.";
		mes "But there is still work to be done.";
		cutin "ep18_suad_01.png",0;
		next;
		mes "[Maram]";
		mes "Yes. I apologized in a hurry and left for a while.";
		mes "The protests need to be sorted out, and they need to be coordinated.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "I'm sorry, but Suad and I can't be together.";
		mes "Can you understand?";
		next;
		mes "[Miriam]";
		mes "Of course not.";
		mes "It would be more appropriate for you to solve problems between people.";
		mes "Take care of the people of the Wolf Village.";
		cutin "ep18_miriam_01.png",0;
		next;
		mes "[Miriam]";
		mes "Then " + strcharinfo(0) + "Sir, would you like to scout the villa together?";
		next;
		select( "Leave it to me." );
		mes "[Suad]";
		mes "Thank you for your understanding.";
		mes "If you guys get into the villa safely, we'll take Aira with us.";
		cutin "ep18_suad_01.png",0;
		next;
		mes "[Miriam]";
		mes "Thank you.";
		mes "Well, Aira. Will you send us to the villa?";
		cutin "ep18_miriam_01.png",0;
		next;
		cutin "",255;
		mes "[Aira]";
		mes "Okay.";
		mes "Talk to me when you're ready.";
		mes "I'll send it to you right away.";
		completequest 17525;
		setquest 18083;
		ep18_1_main = 54;
		close;
	}
	if (ep18_1_main == 54) {
		npctalk "Are you ready?", "Aira#c12_01", bc_self;
		cloakoffnpcself( "Miriam#c12_01" );
		cloakoffnpcself( "Aira#c12_01" );
		end;
	}
	if (ep18_1_main == 55) {
		cloakoffnpcself( "Maram#c12_01" );
		end;
	}
	end;

OnTouch:
	if (ep18_1_main == 54) {
		npctalk "Are you ready?", "Aira#c12_01", bc_self;
		cloakoffnpcself( "Miriam#c12_01" );
		cloakoffnpcself( "Aira#c12_01" );
		end;
	}
	if (ep18_1_main == 55) {
		cloakoffnpcself( "Maram#c12_01" );
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_CLICKME, QMARK_YELLOW, "isbegin_quest(17525) == 1" );
	end;
}

oz_dun01,223,120,5	script(CLOAKED)	Suad#c12_01	4_EP18_SUAD,{
	mes "[Suad]";
	mes "Sorry for taking on a nuisance.";
	mes "But the members of the gray wolf village will be waiting for me.";
	cutin "ep18_suad_01.png",0;
	next;
	mes "[Suad]";
	mes "Please ask Miriam";
	close3;
}

oz_dun01,220,118,5	script(CLOAKED)	Miriam#c12_01	4_EP18_MIRIAM,{
	mes "[Miriam]";
	mes "Only me and the adventurer can enter the villa.";
	mes "Suad and Maram will return to settle the protests";
	cutin "ep18_miriam_01.png",0;
	next;
	mes "[Miriam]";
	mes "The villa is said to be at the bottom of this canyon.";
	mes "Aira says she has a separate entry key, so when she's ready, talk to Aira.";
	close3;
}

// Main Quest: Step 61. (entrance npc is a part of the instance Villa of High Priest)
// Main Quest: Step 62-66 inside the instance.

// Main Quest: Step 67.
oz_dun01,225,119,3	script(CLOAKED)	Maram#c12_01	4_EP18_MARAM,{
	if (ep18_1_main == 55) {
		mes "[Maram]";
		mes "Ah, you came out";
		mes "I've come to some degree of unrest.";
		mes "Miriam and Priest Youth went to the temple.";
		cutin "ep18_maram_01.png",2;
		next;
		mes "[Maram]";
		mes "Youth-nim was a bit raging, so Suad took him and left him.";
		mes "They told me to talk in detail at the temple.";
		next;
		mes "[Maram]";
		mes "Would you like to go right away?";
		next;
		switch( select( "I'll ask you.", "I'll take care of it." ) ) {
		case 1:
			mes "[Maram]";
			mes "Then let's go this way together. Haha..";
			close2;
			cutin "",255;
			warp "ra_temin",169,26;
			end;
		case 2:
			close3;
		}
		end;
	}
	mes "[Maram]";
	mes "Even if this event was fabricated by the Heart Hunters and the Illusions, it was going to explode someday.";
	cutin "ep18_maram_01.png",2;
	next;
	mes "[Maram]";
	mes "I don't know why it's so hard for everyone to live well together.";
	cutin "ep18_maram_03.png",2;
	next;
	mes "[Maram]";
	mes "These worries are left up to us.";
	mes "Adventures, investigate the villa with Miriam.";
	mes "I don't know what Amal is thinking.";
	cutin "ep18_maram_01.png",2;
	close3;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(18084) == 1" );
	end;
}

// Main Quest: Step 68.
ra_temin,256,130,1	script	Temple Knight#c12_02	4_M_RASWORD,3,3,{
	if (ep18_1_main == 55 || ep18_1_main == 56)
		end;
	mes "[Temple Knight]";
	mes "The Sanctuary Sethrumnir.";
	mes "The general chapel is not here, so please go back.";
	close;
OnTouch:
	if (ep18_1_main == 55 || ep18_1_main == 56) {
		npctalk "I was waiting. Please eat inside.", "Temple Knight#c12_02", bc_self;
		cloakoffnpcself( "Suad#c12last" );
		cloakoffnpcself( "Miriam#c12_02" );
		cloakoffnpcself( "Niren#c12last" );
		cloakoffnpcself( "Maram#c12last" );
		end;
	}
	npctalk "Access is prohibited except for officials.", "Temple Knight#c12_02", bc_self;
	warp "ra_temin",255,138;
	end;
}

ra_temin,254,117,5	script(CLOAKED)	Miriam#c12_02	4_EP18_MIRIAM,{
	if (getequipid(EQI_HEAD_TOP) == 400127 && countitem(400127) == 1) {	// player must unequip the item
		mes "Must carry a droopy Ellie in your inventory.";
		close;
	}
	if (ep18_1_main == 55) {
		mes "[Miriam]";
		mes "I heard more details during your visit, but .";
		mes "It seems that Freya-sama's advent as a piece of Ymir's heart was the real goal.";
		next;
		cutin "ep18_miriam_03.png",0;
		mes "[Miriam]";
		mes "It was to divert the attention of the temple and the people that set fires between the natives and the settlers.";
		mes "Ha...";
		next;
		mes "[Miriam]";
		mes "How many people were heartbroken and had a hard time because of that....";
		next;
		mes "[Miriam]";
		mes "God? What is all God?";
		mes "What the hell did my father want for such a false prayer?";
		next;
		mes "[Miriam]";
		mes ".";
		mes "I'll have to investigate further to find out more about the story";
		mes "I am very disillusioned with blind faith.";
		next;
		cutin "ra_gwoman.bmp",2;
		mes "[Niren]";
		mes "You guys really have no qualms.";
		mes "I really never imagined that he would do that.";
		next;
		mes "[Niren]";
		mes "Do you remember the other day that he was the head of the hardliners?";
		mes "But he could not wage war.";
		mes "I'm guessing he's behind the scenes and he's behind the scenes.";
		next;
		mes "[Niren]";
		mes "We are God's servants and we are servants of God's will.";
		mes "We are always waiting for Freyja's voice to be heard again.";
		next;
		mes "[Niren]";
		mes "But that doesn't mean you don't dare to bring God to earth.";
		mes "Isn't that God's will?";
		next;
		mes "[Niren]";
		mes "Youth is breaking the taboo.";
		mes "Someone who dares to claim that humans are servants of God has summoned God to make him his own.";
		next;
		mes "[Niren]";
		mes "That alone is unforgivable, but for that it has made believers and innocent people suffer.";
		mes "What should I do with the missing Ymir's heart ....";
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "mother.";
		mes "The piece of Ymir's heart may come back.";
		mes "Don't worry too much.";
		next;
		cutin "ep18_miriam_01.png",0;
		mes "[Miriam]";
		mes "That's right";
		mes "I will also bring back Ymir's heart piece.";
		next;
		mes "The story is getting longer.";
		mes "When can I wear it.";
		next;
		cutin "ep18_suad_01.png",0;
		mes "[Suad]";
		mes ".";
		mes "If you have come, make a sign that you have come.";
		next;
		cutin "ra_gwoman.bmp",2;
		mes "[Niren]";
		mes "Hey, you were talking without knowing that the adventurer was coming.";
		mes "What about investigating?";
		mes "The remnants of the blasphemies found in Youth's villa.";
		next;
		cutin "ep18_miriam_01.png",0;
		mes "[Miriam]";
		mes "Did you say bagot?";
		mes "What we saw at the villa was a chimera created by Bagot...";
		close2;
		cutin "",255;
		unittalk getcharid(3), "" + strcharinfo(0) + " Ellie: I'll explain that.", bc_self;
		cloakoffnpcself( "Ellie's shape#c12_02" );
		specialeffect EF_BLUELIGHTBODY, AREA, "Ellie's shape#c12_02";
		changequest 18084,18085;
		ep18_1_main = 56;
		end;
	}
	if (ep18_1_main == 56) {
		cutin "ep18_miriam_01.png",0;
		mes "[Miriam]";
		mes "Did you say bagot?";
		mes "What we saw at the villa was a chimera created by Bagot...";
		close2;
		cutin "",255;
		unittalk getcharid(3), "" + strcharinfo(0) + " Eli: I'll explain that.", bc_self;
		cloakoffnpcself( "Ellie's shape#c12_02" );
		specialeffect EF_BLUELIGHTBODY, AREA, "Ellie's shape#c12_02";
		end;
	}
	if (ep18_1_main == 57) {
		npctalk "I had to stop my father before he commits a bigger sin.", "Miriam#c12_02", bc_self;
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(18084) == 1" );
	end;
}

// Main Quest: Step 69.
ra_temin,258,117,3	script(CLOAKED)	Ellie's shape#c12_02	4_EP17_TABLET,{
	disable_items;
	if (checkweight(1201,2) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (getequipid(EQI_HEAD_TOP) == 400127 && countitem(400127) == 1 || countitem(400127) == 0) {
		mes "Must carry a droopy Ellie in the inventory.";
		close;
	}
	if (ep18_1_main == 56) {
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "I think it's a story that you all need to hear, so I projected my original self.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Oh.... I heard a chime sometimes coming from somewhere, so you were here?";
		next;
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "It's nice to see you calming down. You can say that they are an adventurer's party.";
		mes "Let's get to the bottom of our heads and get to the point. The maintenance time for this look is short.";
		next;
		cutin "ra_gwoman.bmp",2;
		mes "[Niren]";
		mes "It's really surprising, but please do. I need to know the identity of Freya-sama's incarnation.";
		next;
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "Okay. I'll explain quickly.";
		mes "The wreckage collected from the villa was basically identical to the structure of Embryo, the source of the homunculus.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Embrio?";
		mes "What is it? Is it like alchemy?";
		next;
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "Do you know anything about this field?";
		mes "You can think of Embryo as the embryonic form of an artificial organism, homunculus.";
		next;
		mes "[Ellie]";
		mes "Artificial life forms are beautiful. Depending on the magician they raise, they can have a hundred or ten thousand appearances.";
		next;
		mes "[Ellie]";
		mes "Based on Embryo, Bagot was bred to resemble the Pope and then transformed into a Chimera.";
		mes "I saw that modified chimera at the cottage.";
		next;
		select( "Because Illusion" );
		cutin "ep18_suad_01.png",0;
		mes "[Suad]";
		mes "Can you tell me more about that Illusion?";
		next;
		mes "He gave me a rough idea about Illusion.";
		next;
		cutin "ep18_suad_02.png",0;
		mes "[Suad]";
		mes "At the end of the day, did we play with the trick that Illusion used to get Ymir's heart piece?";
		next;
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "In summary, yes.";
		mes "You are a talented person with an excellent brain because you understand quickly.";
		next;
		cutin "ep18_suad_03.png",0;
		mes "[Suad]";
		mes "I understand very well that Youss-sama killed himself while trying to summon the goddess while playing under the clutches of Illusion.";
		mes "Then the Illusion? Where did Bagot and his heart go?";
		next;
		cutin "ep18_suad_01.png",0;
		mes "[Suad]";
		mes "More than anything else, I can't stand the fact that we were suffering from a ploy for personal power after all, just saying God's will.";
		next;
		cutin "ep18_miriam_03.png",0;
		mes "[Miriam]";
		mes "Suad.";
		mes "Me too. We all will.";
		mes "Above all, the fact that I didn't notice even though I was in the nearest place....";
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "Mother. What should we do next?";
		next;
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "Form a parliament.";
		mes "This country lacks communication from Eli's observation.";
		mes "Indigenous people and migrants don't talk to each other, how do they know what they want?";
		next;
		mes "[Ellie]";
		mes "Give the Indigenous peoples status and power. Ensure them legally.";
		mes "It's difficult but easy. You just have to guarantee it.";
		next;
		cutin "ra_gwoman.bmp",2;
		mes "[Niren]";
		mes "That's right. It's not just about waiting for the word of God and forcing it, it's about being able to listen to people as well.";
		mes "such a fundamental .";
		next;
		cutin "ep18_maram_03.png",2;
		mes "[Maram]";
		mes "But the basic establishment won't stand still.";
		mes "Rather than now, more resistance and disturbances may arise.";
		next;
		cutin "ep18_suad_01.png",0;
		mes "[Suad]";
		mes "Hey, isn't it impossible to stay like this forever?";
		next;
		cutin "ep18_miriam_01.png",0;
		mes "[Miriam]";
		mes "That's right. We need reform.";
		mes "You can't always scream at the wall and hide in the woods.";
		next;
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "Humans. Don't worry.";
		mes "Time is always on our side";
		mes "Your role is to apply force to the opposite side to match the pendulum of power. That's all.";
		next;
		mes "[Ellie]";
		mes "The rest is solved by time and human adaptability.";
		next;
		cutin "ra_gwoman.bmp",2;
		mes "[Niren]";
		mes "This is a great lesson from foreign guests.";
		mes "Okay. Let's put this on the official agenda so that we can proceed.";
		next;
		mes "[Niren]";
		mes "Perhaps High Zhed would be of great help.";
		mes "You choose representatives of the natives.";
		next;
		cutin "ep18_miriam_01.png",0;
		mes "[Miriam]";
		mes "There is Suad. Priest.";
		mes "And me and Maram. Aren't we here for this day?";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "It's the gray children's turn to do their job.";
		mes "My mother adopted me, it must have been for today.";
		next;
		cutin "ep18_suad_01.png",0;
		mes "[Suad]";
		mes "Don't worry about this, just prepare a proper plate.";
		next;
		cutin "ra_gwoman.bmp",2;
		mes "[Niren]";
		mes "Thank you. You grew up well.";
		next;
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "Okay. The situation in this country is not really my knowledge, but it seems to have been resolved.";
		mes "Now let's go back to the Illusion story.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Yeah. Bagot went somewhere with Ymir's heart piece?";
		mes "And the adventurer will go looking for the heart.";
		next;
		select( "You need to know where Bagot is." );
		cutin "ep18_miriam_01.png",0;
		mes "[Miriam]";
		mes "Bagot seems to have headed towards the northern continent.";
		mes "I heard you once talked about Jormungand with your father.";
		next;
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "North?";
		mes "Are you talking about the area where Jormungand is sealed beyond the barrier?";
		next;
		cutin "ep18_miriam_01.png",0;
		mes "[Miriam]";
		mes "Really? Jormungand is sealed. Bagot is interesting.";
		mes "It is said that Bagott was interested in resurrecting the gods.";
		next;
		mes "[Miriam]";
		mes "At first, it seems that he promised a false god to come in order to steal Ymir's heart piece...";
		mes "No one knows what he will do with the heart of Ymir that he has in his hands.";
		next;
		mes "[Miriam]";
		mes "However, it seems that Bagot's colleagues have already moved to the northern continent.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Does Jormungand exist?";
		next;
		cutin "ra_gwoman.bmp",2;
		mes "[Niren]";
		mes "The Jormungand Church was real.";
		mes "It was the heroes who became the beginnings of the Rune-Midgarts Kingdom to win the battle against the Church.";
		next;
		mes "[Niren]";
		mes "They fought in the name of Odin, and we fought in the name of Freya.";
		mes "It must have been Freya-sama who opened up the will for humans.";
		next;
		mes "[Niren]";
		mes "But the family of heroes who won the battle against the Order established a nation in the name of Odin.";
		mes "There is a story that Jormungand was a victorious hero and cursed the first king.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Is this your first time hearing about it?";
		mes "Curse?";
		next;
		select( "Curse doesn't matter" );
		cutin "ra_gwoman.bmp",2;
		mes "[Niren]";
		mes "Yeah. Now the story of the curse of the royal family doesn't matter.";
		mes "The important thing is that the Jormungand Church was real.";
		next;
		mes "[Niren]";
		mes "It is also said that Jormungand, which is sealed in a place called the Northern Continent, does exist.";
		next;
		cutin "ep18_miriam_01.png",0;
		mes "[Miriam]";
		mes "If Bagot really wants to resurrect the gods, then he will go after Jormungand.";
		next;
		cutin "ra_gwoman.bmp",2;
		mes "[Niren]";
		mes "You have to stop that.";
		mes "The darkness of the continent greater than the thousand years of Shinma War was Jormungand.";
		mes "You have to track down and stop a man named Bagot.";
		next;
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "The northern part is a sealed land. There is a barrier, so it cannot be easily crossed.";
		next;
		cutin "ep18_miriam_01.png",0;
		mes "[Miriam]";
		mes "Is there a barrier that you can't cross?";
		mes "Then did you use Ymir's Heart Fragment to cross the barrier?";
		next;
		mes "[Miriam]";
		mes "To pursue him, we must find a way to cross the barrier blocking the north.";
		mes "It will take time.";
		next;
		cutin "ep172_beta.png",2;
		mes "[Ellie]";
		mes "I'll do that.";
		mes "Let's go back to the mansion and find a way to get over the barrier.";
		next;
		mes "[Ellie]";
		mes "And I'm not proud of it, but if I used the airship of my master, I wouldn't have crossed that barrier somehow?";
		mes "If he used injustice, he would be able to trace the trail.";
		next;
		mes "[Ellie]";
		mes "I'll have to go back to the aircraft manager's body. I'll give this shell to the adventurer as a souvenir.";
		mes "See you at the mansion.";
		ep18_1_main = 57;
		completequest 18085;
		delitem 400127,1;	// Ep18_Mini_Elly
		getitem 400128,1;	// Costume Dropping Elly
		getitem 1000405,180;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		next;
		cloakonnpcself( "Ellie's shape#c12_02" );
		cutin "ep18_miriam_01.png",0;
		mes "[Miriam]";
		mes "There is nothing we can do until more information is gathered.";
		mes "I'll talk more with my father.";
		mes "Thanks for your help.";
		next;
		cutin "ep18_suad_01.png",0;
		mes "[Suad]";
		mes "Then I'll go back to the gray wolf forest.";
		mes "Niren-sama. Please call again when the council is formed. We will prepare before then.";
		next;
		cutin "ep18_maram_01.png",2;
		mes "[Maram]";
		mes "Then, shall I listen to the story of the youth with Miriam?";
		mes "I want to help find the fragment of Ymir's heart.";
		next;
		cutin "ra_gwoman.bmp",2;
		mes "[Niren]";
		mes "Then I must go see High Priest Iman Zhed.";
		mes "Adventurer. I'm indebted to you this time.";
		next;
		mes "[Niren]";
		mes "pray always to God";
		mes "It is to be raised to care for those who pray .";
		mes "To what did the youth pray?";
		next;
		mes "[Niren]";
		mes "There is only hell at the end of that prayer.";
		mes ".";
		close3;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(18085) == 1" );
	end;
}

ra_temin,254,114,7	script(CLOAKED)	Suad#c12last	4_EP18_SUAD,{
	npctalk "Thank you for helping the Gray Wolf Forest", "", bc_self;
	end;
}

ra_temin,258,114,3	script(CLOAKED)	Niren#c12last	4_F_RACHOLD,{
	npctalk "Time will help us as a man named Eli said. This timeis not God, but time .", "", bc_self;
	end;
}

ra_temin,259,111,1	script(CLOAKED)	Maram#c12last	4_EP18_MARAM,{
	npctalk "I wish I could accompany you to find the heart.", "", bc_self;
	end;
}



//--- Daily quests
//-------------------------------------------------------------------
// Quest: Investigation of Oz Labyrinth. Step 1 + 13 (final). (NPC part of the main quest).
// wolfvill,143,113,5	script	Imril#ep18_wv	4_EP18_IMRIL,{

// Quest: Investigation of Oz Labyrinth. Step 2.
oz_dun01,27,184,5	script	#ep18_sb1	4_POINT_RED,{
	switch( isbegin_quest(11725) ) {
	case 0:
		end;
	case 1:
		mes "[Imril]";
		mes "Huh It's hot!";
		mes "It used to be a cool cave";
		mes "I think I'll be sweating profusely even if I stand still.";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "You'll get dizzy if you stay too long, so let's look around.";
		mes "For now, this road is ^e5555e only one road^000000, so you can keep walking.";
		completequest 11725;
		setquest 11726;
		cutin "",255;
		navigateto("oz_dun01",68,284);
		close;
	case 2:
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11725) == 1" );
	end;
}

// Quest: Investigation of Oz Labyrinth. Step 3.
oz_dun01,68,284,5	script	Box#ep18_sb1	4_WOODBOX,{
	switch( isbegin_quest(11726) ) {
	case 0:
		end;
	case 1:
		mes "[Imril]";
		mes "Someone left their luggage.";
		mes "If you run into a monster or you are too tired to move things, you can hide your luggage and move it like this.";
		cutin "ep18_imril_01.png",2;
		next;
		mes "[Imril]";
		mes "Moving things is important, but you only have one life.";
		mes "It's close to the entrance, so it's easy to retrieve things.";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "Then let's retrieve this luggage later and move on.";
		changequest 11726,11727;
		cutin "",255;
		navigateto("oz_dun01",65,189);
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11726) == 1" );
	end;
}

// Quest: Investigation of Oz Labyrinth. Step 4.
oz_dun01,65,189,5	script	Steep Road#ep18_sb1	4_POINT_RED,{
	switch( isbegin_quest(11727) ) {
	case 0:
		end;
	case 1:
		mes "[Imril]";
		mes "The road here is rough, so be careful.";
		mes "If you accidentally slip, your ankle bone will not be safe.";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "Let's go all the way down to ^e5555e^000000 from here.";
		changequest 11727,11728;
		cutin "",255;
		navigateto("oz_dun01",111,96);
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11727) == 1" );
	end;
}

// Quest: Investigation of Oz Labyrinth. Step 5.
oz_dun01,111,96,5	script	Steam hole#ep18	4_POINT_RED,{
	switch( isbegin_quest(11728) ) {
	case 0:
		end;
	case 1:
		mes "[Imril]";
		mes "Whoa!";
		mes "It's hot!";
		mes "Steam is escaping from the fissure.";
		cutin "ep18_imril_01.png",2;
		next;
		mes "[Imril]";
		mes "Fortunately, the bottom seems to be fine, but the steam rising is a sign that the depths in the earth are hot, so lava may leak out of here soon.";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "It's really a big deal that it's starting to get so hot near the road I usually go to...";
		next;
		cutin "",255;
		mes "[???]";
		mes "<FONT SIZE = 16><B>Imril!!</FONT></B>";
		changequest 11728,11729;
		navigateto("oz_dun01",100,92);
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11728) == 1" );
	end;
}

// Quest: Investigation of Oz Labyrinth. Step 6 + 7 + 8.
oz_dun01,100,92,3	script	???#ep18_sb1	4_EP18_GW_MIDDLE02,{
	switch( isbegin_quest(11729) ) {
	case 0:
		break;
	case 1:
		mes "[Imril]";
		mes "Are you okay? Mr. Pauls?";
		cutin "ep18_imril_02.png",2;
		next;
		cutin "",255;
		mes "[Paul]";
		mes "Ahah...";
		mes "I was hit by hot steam while running away from a monster.";
		mes "I was careless because it was the road I always walked.";
		next;
		mes "[Paul]";
		mes "I don't even know where I spilled my luggage.";
		mes "It's unfortunate that you only get hurt and lose your luggage...";
		next;
		mes "[Imril]";
		mes "Your life is more important than your burden, so don't say that.";
		cutin "ep18_imril_02.png",2;
		next;
		cutin "",255;
		mes "[Paul]";
		mes "Yes.";
		mes "Thank you";
		next;
		mes "[Imril]";
		mes "I brought you a potion here, so drink it and go back to the village first.";
		mes "You can find your luggage later.";
		cutin "ep18_imril_01.png",2;
		next;
		cutin "",255;
		mes "[Paul]";
		mes "No, leave it alone!";
		mes "You can't waste the village's ^e5555e precious material^000000 like this.";
		next;
		mes "[Paul]";
		mes "You can rest for a while and then go back to the village and apply the ointment.";
		next;
		mes "[Paul]";
		mes "Still, I don't want to be hit by monsters while recovering, so why don't you clean up the monsters in the vicinity ^e5555e^000000?";
		changequest 11729,11730;
		close;
	}
	switch( checkquest(11730,HUNTING) ) {
	case -1:
		break;
	case 0:
	case 1:
		mes "[Paul]";
		mes "You can rest for a while and then go back to the village and apply the ointment.";
		next;
		mes "[Paul]";
		mes "Still, I don't want to be hit by monsters while recovering, so why don't you clean up the monsters in the vicinity ^e5555e^000000?";
		close;
	case 2:
		mes "[Paul]";
		mes "Phew~";
		mes "Thank you!";
		mes "Now I can move a little.";
		next;
		mes "[Paul]";
		mes "Then I'll go back to the village soon.";
		mes "Exploring the maze is good, but be careful.";
		next;
		mes "[Imril]";
		mes "Okay";
		mes "Be careful, Mr. Pauls.";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "Hmm";
		mes "Not only monsters, but also steam gushing out here and there is a big problem.";
		cutin "ep18_imril_01.png",2;
		next;
		mes "[Imril]";
		mes "The vendors don't often go down further, but sometimes they go the wrong way when they're being chased by monsters...";
		next;
		mes "[Imril]";
		mes "Let's go down a bit ^e5555e^000000 first.";
		changequest 11730,11731;
		cutin "",255;
		navigateto("oz_dun01",134,56);
		close;
	}
	if (isbegin_quest(11731) == 1) {
		mes "[Imril]";
		mes "Hmm";
		mes "Not only monsters, but also steam gushing out here and there is a big problem.";
		cutin "ep18_imril_01.png",2;
		next;
		mes "[Imril]";
		mes "The vendors don't often go down further, but sometimes they go the wrong way when they're being chased by monsters...";
		next;
		mes "[Imril]";
		mes "Let's go down a bit ^e5555e^000000 first.";
		cutin "",255;
		navigateto("oz_dun01",134,56);
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11729) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "checkquest(11730,HUNTING) == 2" );
	end;
}

// Quest: Investigation of Oz Labyrinth. Step 9.
oz_dun01,134,56,5	script	Box#ep18_sb2	4_WOODBOX,{
	if (isbegin_quest(11731) == 1) {
		mes "[Imril]";
		mes "I have luggage here...";
		mes "Is Mr. Pauls the lost luggage?";
		cutin "ep18_imril_01.png",2;
		next;
		mes "[Imril]";
		mes "For now, remember the location and retrieve it later.";
		mes "Because we still have to check ^000000 below ^e5555e.";
		mes "This way";
		changequest 11731,11732;
		cutin "",255;
		navigateto("oz_dun01",110,37);
		close;
	}
	mes "- The box is left unattended. -";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11731) == 1" );
	end;
}

// Quest: Investigation of Oz Labyrinth. Step 10.
oz_dun01,110,37,5	script	#ep18_sb2	4_POINT_RED,{
	switch( isbegin_quest(11732) ) {
	case 0:
		end;
	case 1:
		mes "[Imril]";
		mes "Ugh...";
		mes "The heat is no joke already.";
		mes "It's more dangerous down here, so be careful.";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "Actually, unless you're a strong person like adventurer-sama, if you've come this far, it's like a dead life.";
		cutin "ep18_imril_01.png",2;
		next;
		mes "[Imril]";
		mes "I also came with an adventurer, so I'm going downstairs.";
		changequest 11732,11733;
		cutin "ep18_imril_01.png",2;
		navigateto("oz_dun02",152,276);
		close3;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11732) == 1" );
	end;
}

// Quest: Investigation of Oz Labyrinth. Step 11.
oz_dun02,152,276,5	script	#ep18_sb3	4_POINT_RED,{
	switch( isbegin_quest(11733) ) {
	case 0:
		end;
	case 1:
		mes "[Imril]";
		mes "It's just a little further down the road ^e5555eThe shape of the monster is also slightly different^000000.";
		mes "If it's like this, it might be a little dangerous for you, right?";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "It's too dangerous here, so let's look around a bit more and return to the village.";
		changequest 11733,11734;
		cutin "",255;
		navigateto("oz_dun02",143,231);
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11733) == 1" );
	end;
}

// Quest: Investigation of Oz Labyrinth. Step 12.
oz_dun02,143,231,3	script	Old#ep18_sb1	4_EP18_GW_OLD01,{
	if (isbegin_quest(11734) == 1) {
		mes "[Imril]";
		mes "<FONT SIZE = 14><B>Sir!!!!</FONT></B>";
		mes "You're safe!!!";
		cutin "ep18_imril_03.png",2;
		next;
		cutin "",255;
		mes "[Elderly Man]";
		mes "No.";
		mes "Who is this?";
		mes "Isn't that Imril?";
		mes "Why are you in such a dangerous place!";
		next;
		mes "[Imril]";
		mes "No, sir, why are you here?";
		cutin "ep18_imril_02.png",2;
		next;
		cutin "",255;
		mes "[Maze Keeper]";
		mes "The maze keeper is in the maze, then where are you?";
		next;
		mes "[Imril]";
		mes "But the monsters here are too dangerous...";
		cutin "ep18_imril_01.png",2;
		next;
		cutin "",255;
		mes "[Maze Keeper]";
		mes "Well, I'm not the only one here, so don't worry.";
		mes "The monsters these days are so noisy, I just came down to see if anyone was in danger.";
		next;
		mes "[Maze Keeper]";
		mes "Tell me that the lava has come up here ^e5555eSuad^000000, and below this point, the bottom has already melted a lot and it's become more dangerous, so don't go down.";
		next;
		mes "[Maze Keeper]";
		mes "It's too dangerous for you if it's the adventurer yangban next to you.";
		next;
		mes "[Imril]";
		mes "Okay";
		mes "You too, take care of yourself.";
		mes "Come back to town.";
		cutin "ep18_imril_02.png",2;
		next;
		cutin "",255;
		mes "[Maze Keeper]";
		mes "Uh-huh";
		mes "If the maze keeper is not in the maze, who manages the maze!";
		next;
		mes "[Imril]";
		mes "Anyway, stubbornness";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "I don't think I can stand going further down as the headmaster said, so let's go back to the village ^e5555e^000000";
		mes "I feel like my skin is still ripe.";
		changequest 11734,11735;
		cutin "",255;
		navigateto("wolfvill",143,113);
		close;
	}
	if (isbegin_quest(11735) == 1) {
		mes "[Maze Keeper]";
		mes "Uh-huh";
		mes "If the maze keeper is not in the maze, who manages the maze!";
		next;
		mes "[Imril]";
		mes "Anyway, stubbornness";
		cutin "ep18_imril_02.png",2;
		next;
		mes "[Imril]";
		mes "I don't think I can stand going further down as the headmaster said, so let's go back to the village ^e5555e^000000";
		mes "I feel like my skin is still ripe.";
		cutin "",255;
		navigateto("wolfvill",143,113);
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11734) == 1" );
	end;
}
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Training Grey Wolves. Step 1 + 4 (final).
wolfvill,121,119,3	duplicate(dummy_npc)	Bowwow#wms01	EP18_GREY_GOAT
wolfvill,120,117,1	duplicate(dummy_npc)	Aisha#wms01	4_F_SHABBY
wolfvill,124,116,3	duplicate(dummy_npc)	Sheep#wms01	4_LAM
wolfvill,121,113,1	duplicate(dummy_npc)	Cookko#wms01	4_PECOPECO
wolfvill,117,113,7	duplicate(dummy_npc)	Littlecoco#wms01	4_HEN
wolfvill,123,110,5	duplicate(dummy_npc)	Guest#wms01	4_HEN
wolfvill,125,111,3	duplicate(dummy_npc)	Cute#wms01	4_HEN

wolfvill,117,119,5	script	Scania#wms01	4_EP18_GW_MAN02,5,5,{
	if (checkweight(1000405,10) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(17510) ) {
	case 0:
		mes "[Scania]";
		mes "Dog, you should learn a foreign language too...";
		npctalk "Night?", "Bowwow#wms01", bc_self;
		next;
		mes "[Scania]";
		mes "Oh my gosh, look at how he breathes. He's a genius, a genius!!";
		next;
		cloakoffnpcself( "Maram#wms01" );
		mes "[Maram]";
		mes "Hello! Scania!";
		next;
		mes "[Scania]";
		mes "Maram? When did you arrive? Did you come earlier than expected?";
		next;
		mes "[Maram]";
		mes "The adventurer helped me, so I came a little faster this time.";
		npctalk "Greetings. You are a strong and strong adventurer.", "Maram#wms01", bc_self;
		next;
		mes "[Scania]";
		mes "Are you the one who passed this time?";
		next;
		mes "[Maram]";
		mes "Is that a kid? It's not from this person. It's from a different place. You helped me with the purchase this time, so I brought it here.";
		npctalk "He was a very strong and strong adventurer.", "Maram#wms01", bc_self;
		next;
		mes "[Scania]";
		mes "Hmm... Adventurer...? So, you're a foreigner? Are you sure of your identity? If you confide everything here? Or if you say anything over there? Or if you take over our land like those settlers?";
		next;
		mes "[Maram]";
		mes "No, he!! There's nothing you can't say in front of people! You're not like that?";
		next;
		setnpcdisplay( "Baby Grey Wolf#wms01", 21324 );	// EP18_GREY_WOLF_BABY
		mes "[Scania]";
		mes "Does that person wear that on their face? Whether it's a thief or a military family remains to be seen!";
		mes "Aisha picked up some wolf cubs, Maram, are you picking up people?";
		npctalk "Pick it up! Be careful!", "Maram#wms01", bc_self;
		next;
		select( "I'm not that kind of person?" );
		mes "[Maram]";
		mes "Oh, of course, what comes out of his mouth isn't the truth, it's just the words. Words.";
		mes "Wolf cub by the way? What wolf cub?";
		next;
		mes "[Scania]";
		mes "Uh-huh! Aisha picked up a gray wolf cub from the forest a while ago! Bring it back!Even if I tell you to leave it all, I won't listen!";
		next;
		mes "[Scania]";
		mes "Do you know what it is? He's already flirting with our sheep! It's the same now, but what if it's a little bigger? It'll hurt our sheep!";
		mes "So you go and tell me! You won't listen to what I say!";
		next;
		mes "[Maram]";
		mes "Huh? That's a good suggestion. It's going to be a very progressive conversation. But what? I need to organize my luggage.";
		npctalk "What is that awkward tone?", "Scania#wms01", bc_self;
		next;
		mes "[Maram]";
		mes "Ah, yes! Adventurer! Would you like to visit this place? To take a look around here, and to stamp people's eyes.";
		mes "You have to stay here for a while anyway? Everyone here is kind and friendly like me, so I won't be harsh.";
		next;
		mes "[Maram]";
		mes "Is that right, Scania?";
		next;
		mes "[Scania]";
		mes "......";
		npctalk "What else are you looking for like that?", "Maram#wms01", bc_self;
		next;
		mes "[Maram]";
		mes "You just have to go and see if the one Aisha picked up is a real wolf pup or just a puppy that looks like a wolf.";
		npctalk "It's a wolf even if you don't check it! I've seen it all!", "Scania#wms01", bc_self;
		next;
		select( "After confirming?" );
		mes "[Maram]";
		mes "Uh... Well? I didn't even think about it that far. But wouldn't it be a problem if it was a real wolf baby? Puppies are in trouble too.";
		npctalk "Where are you in trouble?", "Scania#wms01", bc_self;
		next;
		mes "[Maram]";
		mes "To explain for the adventurer who has just arrived, there are not many animals that can be raised here because of this land.";
		next;
		mes "[Maram]";
		mes "Nearly all the goats and chickens that Scania cares for. Few cattle or pigs can adapt to places like this. That's why livestock is so precious.";
		next;
		mes "[Scania]";
		mes "But what if Aisha has a wolf cub?";
		next;
		mes "[Maram]";
		mes "The mother is coming to find her cubs!";
		next;
		mes "[Scania]";
		mes "Even if your mother doesn't come to find you?";
		next;
		mes "[Maram]";
		mes "The cubs will grow up and harm the livestock!";
		next;
		emotion ET_SWEAT, playerattached();
		mes "[Scania]";
		mes "Did you hear that?";
		next;
		select( "Where can I go?" );
		mes "[Maram]";
		mes "Where did Aisha live? She ah! This she <NAVI> [top] <INFO> wolfvill, 99,178,0,101,0 </ INFO> </ NAVI> there is Aisha's house.";
		next;
		emotion ET_SWEAT, playerattached();
		mes "[Scania]";
		mes "But there's no use talking about it? If you convince me, I'll change my mind about you.";
		npctalk "Scania, adventurers are not valued in your opinion.", "Maram#wms01", bc_self;
		npctalk "Who says what? You'll be fine.", "Scania#wms01", bc_self;
		next;
		mes "[Maram]";
		mes "Adventurer, then go! I'll go too!";
		setquest 17510;
		cloakonnpcself( "Maram#wms01" );
		close;
	case 1:
		mes "[Scania]";
		mes "<NAVI>[Aisha]<INFO>wolfvill,99,178,0,101,0</INFO></NAVI> for a hundred days won't help? If you convince me, I'll change my opinion of you.";
		close;
	case 2:
		break;
	}
	switch( isbegin_quest(17512) ) {
	case 0:
		mes "[Scania]";
		mes "<NAVI>[Aisha]<INFO>wolfvill,99,178,0,101,0</INFO></NAVI> for a hundred days won't help? If you convince me, I'll change my opinion of you.";
		close;
	case 1:
		mes "[Scania]";
		mes "Dog dog. Today's walk is over. I'm having a hard time.";
		next;
		mes "[Bowwow]";
		mes "yaaaaa---";
		next;
		mes "[Scania]";
		mes "I can't let you go alone. How can I send you alone in that dangerous place. Of course I know you can go for a walk alone, but I'm anxious.";
		next;
		setnpcdisplay( "Baby Grey Wolf#wms01", 21324 );	// EP18_GREY_WOLF_BABY
		cloakoffnpcself( "Aisha#wms01" );
		cloakoffnpcself( "Baby Grey Wolf#wms01" );
		npctalk "Scania!", "Aisha#wms01", bc_self;
		mes "[Scania]";
		mes "Aisha? Why are you here? Did the wolf come back?";
		next;
		npctalk "Woof!!", "Baby Grey Wolf#wms01", bc_self;
		mes "[Scania]";
		mes "Isn't it? Did you bring... a wolf? In front of the sheep? Are you insane?";
		next;
		mes "[Scania]";
		mes "Why the hell do you want a wolf? You need a dog? Then you can have a dog.";
		mes "No. I'll just be a dog. I mess up your house and sometimes bite.";
		next;
		mes "[Aisha]";
		mes "Scania, I have heard your wishes. So you sent me someone? What kind of contractor is your adventurer?";
		next;
		mes "[Aisha]";
		mes "I tried so hard, but what? This guy has already turned to me! Hahaha! Come on, show me your despairing face!!";
		next;
		mes "[Scania]";
		mes "What? Adventurer? Have you betrayed me? How can you do that? Isn't it too much to say that you betrayed me in the first place? I knew this.";
		next;
		mes "[Aisha]";
		mes "Scania, have you been to an ice cave? The blood in your veins is colder than the frozen water there? You cold-blooded!";
		npctalk "What? Was that frozen water?", "Scania#wms01", bc_self;
		npctalk "No...?", "Aisha#wms01", bc_self;
		next;
		mes "[Aisha]";
		mes "How do you send this little and fragile Boksil to that dangerous place. Even her mother died, so she can't live alone.";
		next;
		mes "[Scania]";
		mes "You lost your mother...?";
		next;
		mes "[Aisha]";
		mes "I did. I said it 100 times. You didn't hear it again? Are you believing what you want to believe?";
		next;
		mes "[Aisha]";
		mes "Whatever you do, I will never return this little, fragile young wolf back to my limbs.";
		next;
		setnpcdisplay( "Baby Grey Wolf#wms01", 21324 );	// EP18_GREY_WOLF_BABY
		mes "[Scania]";
		mes "But when the wolf is big, our sheep...";
		next;
		mes "[Aisha]";
		mes "Don't worry about that. Adventurer?";
		next;
		select( "Oh, should I talk to you?" );
		mes "[Aisha]";
		mes "Because if I tell you, you won't listen. When I talk, you don't listen, because you have to tell others to believe.";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "This baby wolf will be fine as long as you train it. If you grow up together with other friends from a young age, you won't harm it and will rather protect the sheep.";
		next;
		mes "[Aisha]";
		mes "Did you hear? Where are you going to argue? Now, you clever genius Boksil! Sit down! Hands!";
		emotion ET_WRAP, getnpcid(0,"Aisha#wms01");
		npctalk "Woof!!", "Baby Grey Wolf#wms01", bc_self;
		emotion ET_ROCK, getnpcid(0,"Baby Grey Wolf#wms01");
		npctalk "Good job!!! Our smart boksil!", "Aisha#wms01", bc_self;
		next;
		mes "[Scania]";
		mes "It's true. But... But I don't know how long it will last... I don't know if I can really hit the wild...";
		next;
		mes "[Scania]";
		mes "First of all, I don't think you're going to train that hard.";
		npctalk "What? What do you see me as! Hey, follow me.", "Aisha#wms01", bc_self;
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "If you're anxious, I'll help you. So that you can be perfectly trained. I also help you for a walk with both of your friends to build a bond.";
		next;
		mes "[Scania]";
		mes "But...";
		next;
		mes "[Aisha]";
		mes "You said that it's hard to follow a dog walking alone every day. Isn't that a good thing?";
		npctalk "I'm tired of feeding grass on the theme of shepherds.", "Aisha#wms01", bc_self;
		next;
		mes "[Scania]";
		mes "Really... instead of me? Is that so...? Can you take good care of our dog? There are a lot of dangerous monsters out there.";
		next;
		mes "[Aisha]";
		mes "Can't you see the calluses on the adventurer's hand? He said Maram brought him? Then he'd be trustworthy. Our Boksil is a veteran who trained in minutes too!";
		npctalk "There's nothing you can't do!", "Aisha#wms01", bc_self;
		next;
		mes "[Scania]";
		mes "Ah, so... I can't help it to come out like this.";
		next;
		mes "[Aisha]";
		mes "I like you so much as if you've been waiting for this moment. Isn't it too cold to take it?";
		next;
		mes "[Scania]";
		mes "No, you're asking so earnestly!! So I have no choice but to...";
		next;
		mes "[Aisha]";
		mes "Anyway... I have to tell the villagers about Boksil. Our Boksil is safe! Let's go, Boksil!";
		npctalk "Woof!", "Baby Grey Wolf#wms01", bc_self;
		next;
		cloakonnpcself( "Aisha#wms01" );
		cloakonnpcself( "Baby Grey Wolf#wms01" );
		mes "[Scania]";
		mes "Uh... Suddenly you have an acting shepherd...? Thank you. I have a lot of work to do. What can I do?";
		next;
		mes "[Scania]";
		mes "Oh yes! A lot of foreigners like this kind of thing. Adventurers like it too? Even if you don't like it, you can change it to something the person you like needs, so take it.";
		next;
		mes "[Scania]";
		mes "Well, I'll see you when I go for a walk.";
		mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
		mes "You are eligible to participate in the ^4d4dff conference.^000000";
		completequest 17512;
		add_reputation_points(REPUTATION_EP18, 100);
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		getitem 1000405,10;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;
		setnpcdisplay("Baby Grey Wolf#wms01", 21324 );	// EP18_GREY_WOLF_BABY
		close;
	case 2:
		break;
	}

	// daily
	switch( checkquest(17516,PLAYTIME) ) {
	case -1:
		break;
	case 0:
	case 1:
		mes "[Scania]";
		mes "Please wait the end of the quest delay.";
		close;
	case 2:
		erasequest 17516;
		break;
	}
	if (isbegin_quest(17515) == 1) {
		mes "[Scania]";
		mes "Adventurer, you've worked hard. I think our dog is also satisfied. Did you have a good meal time? Then, please try again tomorrow!";
		erasequest 17515;
		setquest 17516;
		add_reputation_points(REPUTATION_EP18, 30);
		if (get_reputation_points(REPUTATION_EP18) >= 5000)
			.@bonus = 1;
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		getitem 1000405,3+.@bonus;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;
		close;
	}
	if (isbegin_quest(17514) == 1) {
		mes "[Scania]";
		mes "There are a few places the dog likes, and I will guide you. You only need to deal with dangerous monsters nearby.";
		next;
		mes "[Scania]";
		mes "It's a pain in the ass because ashrings rush in. Please take care of the surrounding ashrings. I usually catch 20 eagles a day. Then please.";
		close;
	}
	switch( isbegin_quest(17513) ) {
	case 0:
		mes "[Scania]";
		mes "Adventurer, you came just in time for a walk. But Aisha didn't come...";
		next;
		setnpcdisplay( "Baby Grey Wolf#wms01", 21324 );	// EP18_GREY_WOLF_BABY
		cloakoffnpcself( "Aisha#wms01" );
		cloakoffnpcself( "Baby Grey Wolf#wms01" );
		mes "[Aisha]";
		mes "Wow! We're here!";
		next;
		mes "[Baby Grey Wolf]";
		mes "Wait!!";
		next;
		mes "[Scania]";
		mes "Then please take a walk. Really.. Can I not go? Can I trust you?";
		next;
		if (select( "Okay.", "I'm a little busy today." ) == 2)
			end;
		mes "[Aisha]";
		mes "If you are anxious, follow me.";
		next;
		mes "[Scania]";
		mes "Oh no. Well then, please take care of me. Doggy. Have a good day. If you are anxious or not satisfied, talk and come home. Okay?";
		next;
		mes "[Dog]";
		mes "yaaaaaa---";
		next;
		mes "[Scania]";
		mes "There are a few places the dog likes, and I will guide you. You only need to deal with dangerous monsters nearby.";
		next;
		mes "[Scania]";
		mes "It's a pain in the ass because ashrings rush in. Please take care of the surrounding ashrings. I usually catch 20 eagles a day. Then please.";
		setquest 17513;
		close2;
		cloakonnpcself( "Aisha#wms01" );
		cloakonnpcself( "Baby Grey Wolf#wms01" );
		navigateto("gw_fild01",138,106);
		end;
	case 1:
		mes "[Scania]";
		mes "There are a few places the dog likes, and I will guide you. You only need to deal with dangerous monsters nearby.";
		next;
		mes "[Scania]";
		mes "It's a pain in the ass because ashrings rush in. Please take care of the surrounding ashrings. I usually catch 20 eagles a day. Then, please.";
		close;
	case 2:
		end;
	}
	end;

OnTouch_:
	if (isbegin_quest(17510) == 0)
		npctalk "Dog, even if you want to go for a walk, be patient.", "Scania#wms01", bc_self;
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17510) == 0 && isbegin_quest(11724) == 2" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17512) == 1" );
	
	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(17512) == 2 && isbegin_quest(17513) == 0 && isbegin_quest(17514) == 0 && (checkquest(17516,PLAYTIME) == -1 || checkquest(17516,PLAYTIME) == 2)" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17512) == 2 && isbegin_quest(17515) == 1" );
	end;
}

wolfvill,120,121,3	duplicate(dummy_cloaked_npc)	Maram#wms01	4_EP18_MARAM
wolfvill,119,117,1	duplicate(dummy_cloaked_npc)	Baby Grey Wolf#wms01	EP18_GREY_WOLF_BABY

// Quest: Training Grey Wolves. Step 2.
wolfvill,99,178,5	script	Aisha#wms02	4_F_SHABBY,{
	switch( isbegin_quest(17510) ) {
	case 0:
		end;
	case 1:
		mes "[Aisha]";
		mes "Boksil, let's live with your sister for a thousand years. If someone comes to harm you, she will directly bury you in the Oz maze. Don't worry about it, Boksil, let's just trust your sister and live happily.";
		next;
		mes "[Baby Grey Wolf]";
		mes "Uh----";
		emotion ET_FRET, getnpcid(0,"Baby Grey Wolf#wms02");
		next;
		mes "[Aisha]";
		mes "No, Boksil. Calm down. Oh, what if it's still unfamiliar to you. No, I'm not saying anything to you... Let's get closer.";
		next;
		mes "[Baby Grey Wolf]";
		mes "Groooooooooooooooooooooooooooooooooooooo king!!";
		next;
		mes "[Aisha]";
		mes "Okay, okay. You need time to be alone. Actually, I am too. The world is all alone anyway. So let's each live well and live together.";
		next;
		mes "[Baby Grey Wolf]";
		mes "Rulle---";
		next;
		mes "[Aisha]";
		mes "Why? What did I do... Oh? Who are you? It's the first time I've seen him.";
		npctalk "Our Boksil was wary of strangers coming? Oh, you did well~", "Aisha#wms02", bc_self;
		npctalk "Rul--", "Baby Grey Wolf#wms02", bc_self;
		next;
		select( "Is this wolf that wolf cub?" );
		mes "[Aisha]";
		mes "Don't come close to our Boksil. Put your hands down. Turn around and disappear.";
		next;
		select( "I'm not that bad guy..." );
		mes "[Aisha]";
		mes "I don't say bad people are bad people. Anyone who tells me to get rid of my goodies is bad guys. And I have no mercy on bad guys.";
		next;
		select( "How long have you been here?" );
		mes "[Aisha]";
		mes "I can't tell you because it's personal information. Why are you asking?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "No, this little wolf. I don't think he's trained yet.";
		next;
		mes "[Aisha]";
		mes "... No, that's. It's been about a month now. I'm still a baby, so I can't train.";
		next;
		select( "Actually, I came..." );
		mes "[Aisha]";
		mes "What? I thought it would! Stay 10 steps away from Boksil. Don't come closer.";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "I'm not here to take you, I'm here to take a look... If you fall from the pack, you have to send it back. You have to be prepared because the mother wolf might come looking for you.";
		next;
		mes "[Aisha]";
		mes "I didn't fall out of the pack. I mean, I brought something that was dying next to a dead mother wolf.";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Damn it. It seems that you are worried about living in an unfamiliar place away from your mother.";
		next;
		mes "[Aisha]";
		mes "Aren't you really here to take me? Then why are you here?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "I came here to convince you after confirming that it is really a wolf cub...";
		next;
		mes "[Aisha]";
		mes "I thought so! Scania sent it? No, why are you telling me to put it in someone else's pet? We're not in danger, so go back. There's nothing else to see.";
		next;
		select( "There's nothing wrong with being careful." );
		mes "[Aisha]";
		mes "You really think so? Do you really think our Boksil will be a potential threat? He's so small and cute...?";
		npctalk "Rul--", "Baby Grey Wolf#wms02", bc_self;
		npctalk "Oh, Bok-sil hates compliments? Okay, okay.", "Aisha#wms02", bc_self;
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Usually I would have thought so... If there was no mother, at least there would be no reason for the wolves to come here.";
		next;
		mes "[Aisha]";
		mes "Because that's what I mean! But stupid Scania doesn't know that! People who don't know me like this know my heart so well!";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Besides, this motherless wolf cub cannot survive alone.";
		next;
		mes "[Aisha]";
		mes "That's right! That cold-blooded head turned to ice.";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "But Boksil needs training to live together in the village. He needs to learn how to get along without harming others.";
		next;
		mes "[Aisha]";
		mes "You're still so young...?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "You have to do it when you're young. If you train from a young age, the villagers won't be afraid.";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "As long as you give them a firm tone, an immediate reaction, and enough compliments, they'll understand. Wolves are smart. What's Boksil's favorite thing?";
		next;
		mes "[Aisha]";
		mes "Um... meat? But not now. Do you have any adventurers?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Ah...! I don't have any meat for a snack, meat... I'll have to bring some meat.";
		completequest 17510;
		setquest 17511;
		close;
	case 2:
		mes "[Aisha]";
		mes "How do you train with meat? All you need is one?";
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17510) == 1" );
	end;
}

// Quest: Training Grey Wolves. Step 3.
wolfvill,100,177,1	script	Baby Grey Wolf#wms02	EP18_GREY_WOLF_BABY,{
	if (checkweight(1000405,10) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	switch( isbegin_quest(17511) ) {
	case 0:
		end;
	case 1:
		if (countitem(517) < 1) {	// Meat
			emotion ET_QUESTION;
			npctalk "Mung?", "Baby Grey Wolf#wms02", bc_self;
			mes "[Aisha]";
			mes "Didn't I say you needed a piece of meat, didn't you?";
			close;
		}
		disable_items;
		.@player_name$ = strcharinfo(0);
		mes "[" + .@player_name$ + "]";
		mes "Hello~ I'm " + .@player_name$ + ". Is this Boksil? Nice to meet you. Are you worried about coming to an unfamiliar place? I know how you feel, I know everything.";
		next;
		emotion ET_FRET, getnpcid(0,"Baby Grey Wolf#wms02");
		mes "[Baby Grey Wolf]";
		mes "rumble---";
		npctalk "Are you okay? It looks uncomfortable to plant.", "Aisha#wms02", bc_self;
		next;
		mes "[" + .@player_name$ + "]";
		mes "But it's okay. Everything's okay. There's no one here to hurt Boksil. Don't worry.";
		next;
		mes "[" + .@player_name$ + "]";
		mes "Now we are all living together. Having a warm home and eating delicious food.";
		mes "To do that, we have to set some rules, okay?";
		next;
		emotion ET_QUESTION, getnpcid(0,"Baby Grey Wolf#wms02");
		mes "[Baby Grey Wolf]";
		mes "Wah?";
		next;
		mes "[Aisha]";
		mes "It sounds like you're talking to a child.";
		next;
		mes "[" + .@player_name$ + "]";
		mes "Come on, look. Meat. Does Boksil like meat? Grilled? Raw? Boiled? Have you tried grilled? It's okay. There are many opportunities to eat in the future.";
		next;
		emotion ET_THROB, getnpcid(0,"Baby Grey Wolf#wms02");
		mes "[Baby Grey Wolf]";
		mes "Wah!";
		next;
		mes "[" + .@player_name$ + "]";
		mes "Let's do our best";
		mes "Boksil, sit down!";
		mes "Wait!";
		mes "Good job. Now, meat.";
		emotion ET_THROB, getnpcid(0,"Baby Grey Wolf#wms02");
		next;
		mes "[" + .@player_name$ + "]";
		mes "Did you see it? Please give me lots of compliments if you follow the instructions.";
		next;
		mes "[Aisha]";
		mes "Mommy, mommy. Isn't our kid a real genius?";
		mes "Our boksil did a good job!!!!";
		emotion ET_GOODBOY, getnpcid(0,"Baby Grey Wolf#wms02");
		next;
		mes "[" + .@player_name$ + "]";
		mes "You have to keep doing it until you get used to it. Repetitions are important. You just have to do it the way you are now.";
		next;
		mes "[" + .@player_name$ + "]";
		mes "Boksil, sit down.";
		mes "hand.";
		mes "Wait. Now, try it yourself.";
		next;
		mes "[Aisha]";
		mes "Boksil, sit down!";
		mes"hand!";
		mes "Wow, that's amazing.";
		next;
		mes "[" + .@player_name$ + "]";
		mes "These canines are up to you to train. They make this place feel like a safe home, and if you bond well, they will get along.";
		next;
		mes "[" + .@player_name$ + "]";
		mes "And if you greet other friends and stay together from childhood, you will get along without any major problems.";
		next;
		mes "[Aisha]";
		mes "Would people know that?";
		next;
		mes "[" + .@player_name$ + "]";
		mes "You just have to show them what you've done, so that Boksil is ready to live as a member of this village.";
		mes "<NAVI>[Scania]<INFO>Go to wolfvill,117,119,0,101,0</INFO></NAVI>. Go and show us our handsome and handsome Boksil.";
		delitem 517,1;	// Meat
		completequest 17511;
		setquest 17512;
		getitem 1000405,10;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;
		close;
	case 2:
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17511) == 1 && countitem(517) > 0" );	// Meat
	end;
}
//-------------------------------------------------------------------

// Quest: Training Grey Wolves. Daily.
gw_fild01,138,106,5	script	Grass#wms01	4_POINT_YELLOW,5,5,{
	if (isbegin_quest(17513) == 1) {
		setpcblock PCBLOCK_NPC, true;
		npctalk "Yah ha ha?", "", bc_self;
		sleep2 2000;
		setnpcdisplay( "Baby Grey Wolf#wms03", 21324 );	// EP18_GREY_WOLF_BABY
		erasequest 17513;
		setquest 17514;
		unittalk getcharid(3), "You've already been here. Do you like it? Ah.. There is no grass here. Let's find another place. Is there any place you want?", bc_self;
		sleep2 1500;
		npctalk "Yah ha ha!", "", bc_self;
		sleep2 1500;
		setpcblock PCBLOCK_NPC, false;
		cloakonnpcself( "Dog#wms02" );
		cloakonnpcself( "Baby Grey Wolf#wms03" );
		setnpcdisplay( "Baby Grey Wolf#wms03", CLEAR_NPC );
		unittalk getcharid(3), "Already gone. Let's catch Ashling!!", bc_self;
		end;
	}
	if (checkquest(17514,HUNTING) == 2) {
		setpcblock PCBLOCK_NPC, true;
		setnpcdisplay( "Baby Grey Wolf#wms03", 21324 );	// EP18_GREY_WOLF_BABY
		cloakoffnpcself( "Dog#wms02" );
		cloakoffnpcself( "Baby Grey Wolf#wms03" );
		erasequest 17514;
		setquest 17515;
		unittalk getcharid(3), "Are you full?", bc_self;
		sleep2 1000;
		npctalk "Yah ha ha!", "", bc_self;
		sleep2 1000;
		unittalk getcharid(3), "Did Boksil take good care of the dog?", bc_self;
		sleep2 1000;
		npctalk "Woof!!!", "Baby Grey Wolf#wms03", bc_self;
		sleep2 1500;
		unittalk getcharid(3), "Good job. Let's go home!!!", bc_self;
		cloakonnpcself( "Dog#wms02" );
		cloakonnpcself( "Baby Grey Wolf#wms03" );
		setnpcdisplay( "Baby Grey Wolf#wms03", CLEAR_NPC );
		setpcblock PCBLOCK_NPC, false;
		end;
	}
	end;
OnTouch:
	if (isbegin_quest(17513) == 1 || checkquest(17514,HUNTING) == 2) {
		cloakoffnpcself( "Dog#wms02" );
		cloakoffnpcself( "Baby Grey Wolf#wms03" );
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17513) == 1 || checkquest(17514,HUNTING) == 2" );
	end;
}

gw_fild01,160,104,0	script	Delicious grass#wms11	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch:
	if (isbegin_quest(17513) == 1 || checkquest(17514,HUNTING) == 2) {
		cloakoffnpcself( "Dog#wms02" );
		cloakoffnpcself( "Baby Grey Wolf#wms03" );
	}
	end;
}
gw_fild01,26,101,0	duplicate(Delicious grass#wms11)	#wms01	HIDDEN_WARP_NPC,3,3

gw_fild01,138,106,3	script(CLOAKED)	Dog#wms02	EP18_GREY_GOAT,{
	if (isbegin_quest(17513) == 1) {
		setpcblock PCBLOCK_NPC, true;
		npctalk "Yah ha ha?", "", bc_self;
		sleep2 2000;
		setnpcdisplay( "Baby Grey Wolf#wms03", 21324 );	// EP18_GREY_WOLF_BABY
		erasequest 17513;
		setquest 17514;
		unittalk getcharid(3), "You've already been here. Do you like it? Ah.. There is no grass here. Let's find another place. Is there any place you want?", bc_self;
		sleep2 1500;
		npctalk "Yah ha ha!", "", bc_self;
		sleep2 1500;
		setpcblock PCBLOCK_NPC, false;
		cloakonnpcself( "Dog#wms02" );
		cloakonnpcself( "Baby Grey Wolf#wms03" );
		setnpcdisplay( "Baby Grey Wolf#wms03", CLEAR_NPC );
		unittalk getcharid(3), "Already gone. Let's catch Ashling!!", bc_self;
		end;
	}
	if (checkquest(17514,HUNTING) == 2) {
		setpcblock PCBLOCK_NPC, true;
		setnpcdisplay( "Baby Grey Wolf#wms03", 21324 );	// EP18_GREY_WOLF_BABY
		cloakoffnpcself( "Dog#wms02" );
		cloakoffnpcself( "Baby Grey Wolf#wms03" );
		erasequest 17514;
		setquest 17515;
		unittalk getcharid(3), "Are you full?", bc_self;
		sleep2 1000;
		npctalk "Yah ha ha!", "", bc_self;
		sleep2 1000;
		unittalk getcharid(3), "Did Boksil take good care of the dog?", bc_self;
		sleep2 1000;
		npctalk "Woof!!!", "Baby Grey Wolf#wms03", bc_self;
		sleep2 1500;
		unittalk getcharid(3), "Good job. Let's go home!!!", bc_self;
		cloakonnpcself( "Dog#wms02" );
		cloakonnpcself( "Baby Grey Wolf#wms03" );
		setnpcdisplay( "Baby Grey Wolf#wms03", CLEAR_NPC );
		setpcblock PCBLOCK_NPC, false;
		end;
	}
	end;
}

gw_fild01,137,104,7	duplicate(dummy_npc)	Baby Grey Wolf#wms03	CLEAR_NPC
//-------------------------------------------------------------------



//-------------------------------------------------------------------
// Quest: Ahab's Request. Step 1 + 8 (final).
wolfvill,85,111,3	script	Zlan#ep18	4_M_RACHMAN1,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(16560) ) {
	case 0:
		mes "[Zlan]";
		mes "Ugh, we were just talking strange things at the village meeting today, man.";
		next;
		mes "[Desel]";
		mes "That man? Oh, the unnamed man?";
		next;
		mes "[Zlan]";
		mes "I can't say anything I can't say.";
		mes "Something high in Rachel, what kind of power is that in the gray wolf forest.";
		next;
		mes "[Zlan]";
		mes "The man who asks if it's Ahab or Clam!";
		mes "It's not like that in Rachel I'm meeting~ I'm wrong~";
		next;
		mes "[Zlan]";
		mes "If that's the case, why don't you stay with Rachel? Why did you come all the way here?";
		mes "I really don't understand!";
		next;
		mes "[Kayar]";
		mes "She still thinks she is in Rachel.";
		mes "Are you sleeping in the windy tent and still haven't woken up from your dream?";
		next;
		mes "[Zlan]";
		mes "If you're going to dream, you can dream alone.";
		mes "Why are you so rude to others?";
		next;
		mes "[Desel]";
		mes "...what are you, are you eavesdropping on us?";
		mes "Is it the clam uncle's stingray!";
		next;
		mes "[Kayar]";
		mes "You're not even a great person smart enough to grow something like sagebrush.";
		mes "So, who are you? Overhearing other people's gossip. Embarrassed.";
		next;
		select( "I'm just a passing traveler." );
		mes "[Zlan]";
		mes "Liar. Where is the traveler who passed through this gray wolf forest?";
		mes "Somehow related to us.";
		next;
		mes "[Desel]";
		mes "If you don't say it, you'll have no choice but to listen~";
		mes "Are you really going to tell lies?";
		next;
		mes "[Kayar]";
		mes "Calm down, Redsell. As Zlan said, I'm not a passerby. Is there anyone that we don't know but wouldn't be surprised to be here?";
		next;
		mes "[Zlan]";
		mes "Who is that?";
		setquest 16560;
		close;
	case 1:
		mes "[Zlan]";
		mes "Mr. Ahab is starting to listen a little... I don't think he's a very bad person.";
		mes "Yes, this is how adults interact.";
		next;
		mes "[Zlan]";
		mes "I'm glad we didn't say anything because we covered each other's ears and squawked, and eventually kicked them out.";
		mes "Thanks to you. Thank you.";
		close;
	case 2:
		break;
	}
	if (isbegin_quest(16566) == 1) {
		mes "[Zlan]";
		mes "Have you been here? What is clam?";
		mes "What? You said you would listen to others now?";
		next;
		mes "[Zlan]";
		mes "As expected, you haven't heard it until now.";
		next;
		mes "[Kayar]";
		mes "Suck don't make fun of me, Zlan.";
		mes "Now it's important to do it right.";
		next;
		mes "[Desel]";
		mes "Yes, yes.";
		mes "Dam no, what's wrong with Mr. Ahab?";
		mes "You must have told me well, a tall person or a wide person.";
		next;
		mes "[Desel]";
		mes "Thank you. Thanks to you, we don't even have to send people out of here.";
		mes "Even if I said yes, it was very uncomfortable.";
		next;
		mes "[Kayar]";
		mes "Representing the village meeting We are not able to attend the meeting, but we will show a little sincerity.";
		mes "It's nice to have someone like you.";
		completequest 16566;
		getitem 1000405,20;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;
		mes " ";
		mes "^4d4dff A favorable rating for you occurs.^000000";
		add_reputation_points(REPUTATION_EP18, 100);
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		close;
	}
	mes "[Zlan]";
	mes "If you don't want to abide by the rules of this forest, please leave.";
	mes "So are you. Rules are there to keep.";
	next;
	mes "[Zlan]";
	mes "It's the same with manners. Society is a place without manners and rules? It's barbarism.";
	mes "I don't want to be wild!";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16560) == 0 && isbegin_quest(11724) == 2" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16566) == 1" );
	end;
}

// Quest: Ahab's Request. Step 2.
wolfvill,83,109,5	script	Kayar#ep18	4W_M_03,{
	switch( isbegin_quest(16560) ) {
	case 0:
		mes "[Kayar]";
		mes "Oh, I'm in trouble. I've got a troublesome problem.";
		next;
		mes "[Kayar]";
		mes "I hate talking to people I don't know because it's a relationship problem...";
		close;
	case 1:
		mes "[Kayar]";
		mes "Wouldn't it make sense to be a guest of high ranks?";
		mes "Because we can't keep up with the affairs of the leaders here.";
		next;
		mes "[Zlan]";
		mes "You, is that true?";
		mes "...well, if it's a secret from us, you won't tell us.";
		next;
		mes "[Desel]";
		mes "If you are a really tall person, listen to us.";
		mes "Isn't he a tall person? Still, he must be something important. Listen to me.";
		next;
		mes "[Desel]";
		mes "That clam..., no, that's the nickname we call each other.";
		mes "How can I help a man named Ahab?";
		next;
		mes "[Zlan]";
		mes "You're a real troublemaker, that guy!";
		mes "I'm going to die for interrupting every village meeting and talking nonsense.";
		next;
		mes "[Zlan]";
		mes "You don't listen to other people, you just say what you want to say, but that's not a useful word to hear again.";
		mes "Because he is the oldest, he insists that he be heard as a superior, but his head hurts so much.";
		next;
		mes "[Zlan]";
		mes "I heard that he was a great man who lived as a co-worker with the migrants.";
		mes "If you think that you can say this to the natives with the melodies you used back then, you are mistaken.";
		next;
		mes "[Kayar]";
		mes "If I could just kick you out, I would.";
		mes "Maybe we can gather our opinions and make a strong argument.";
		next;
		mes "[Desel]";
		mes "Hey, anyway, that's not it.";
		mes "I mean, this is a place for people who have nowhere else to go.";
		next;
		mes "[Desel]";
		mes "If you get him out of here, he'll have nowhere to go.";
		next;
		mes "[Zlan]";
		mes "But how long do we have to accept that truth?";
		mes "I have nowhere else to go but here, so can I just act my way from now on?";
		next;
		mes "[Kayar]";
		mes "If you do, the truth becomes two. I can't stand it...";
		next;
		mes "[Desel]";
		mes "Yeah, there's a high-ranking person! You're still listening, so you're interested in our work?";
		mes "It doesn't matter if you're not tall. You're a wide person!";
		completequest 16560;
		setquest 16561;
		close;
	case 2:
		break;
	}
	mes "[Kayar]";
	mes "In our village, not only high-ranking people participate in village management meetings.";
	mes "Of course, the decision itself is made by high-ranking people...";
	next;
	mes "[Kayar]";
	mes "So, no one is bothering you just because you're in a meeting.";
	mes "Except that clam uncle.";
	next;
	mes "[Kayar]";
	mes "I don't like that attitude, I really don't like it...";
	mes "The longer it goes, the worse the effect will be.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16560) == 1" );
	end;
}

// Quest: Ahab's Request. Step 3.
wolfvill,87,109,3	script	Desel#ep18	4_M_DESERT,{
	if (isbegin_quest(16562) == 1) {
		mes "[Desel]";
		mes "Make me that Ahab uncle.";
		mes "A person has to look like a person to be a person, or act like a person to become a person....";
		next;
		mes "[Desel]";
		mes "Isn't that too much slander? ...well, I admit it a little.";
		mes "But you'll find out after working with them.";
		close;
	}
	if (isbegin_quest(16561) == 1) {
		mes "[Desel]";
		mes "Did you hear about it?";
		mes "You are the only one who can solve our pain.";
		next;
		mes "[Zlan]";
		mes "Since there is no real answer, if it doesn't work, we will gather opinions and propose to leave the village.";
		next;
		mes "[Desel]";
		mes "Damn it, let's put that aside...";
		mes "But again, that would be the last solution.";
		next;
		mes "[Kayar]";
		mes "We're not the only ones with trouble, so if you propose, it will work.";
		mes "Now everyone who attends the village meeting is in trouble.";
		next;
		mes "[Desel]";
		mes "But! Let's do it last.";
		mes "Help me before the end comes, bro.";
		next;
		mes "[Kayar]";
		mes "We can't talk to him.";
		mes "Can't you go and talk to me?";
		next;
		mes "[Desel]";
		mes "Uh, wow. That would be nice. Let's talk and find out why you do that and why you can't be like that.";
		mes "It's truly a lifetime request.";
		next;
		mes "[Zlan]";
		mes "Do this as a request for the rest of your life. I've saved it and will use it when I have a lover.";
		next;
		mes "[Desel]";
		mes "Yeah, that's probably fine, because I'm not dating.";
		mes "So this is my lifelong wish. Please make me a man that Ahab uncle.";
		next;
		mes "[Kayar]";
		mes "Somehow, my wish seems to be getting bigger.";
		mes "Anyway, please take care of me. <NAVI>[Mr. Ahab] Go and talk to <INFO>wolfvill,127,155,0,101,0</INFO></NAVI>.";
		changequest 16561,16562;
		close;
	}
	mes "[Desel]";
	mes "People who don't understand words! Stupid people! People who make you say things over and over again! People who show their emotions at work!";
	next;
	mes "[Desel]";
	mes "A person who hides his mistakes and secretly reveals them when there is no way back! A person who can't take responsibility for his work!";
	next;
	mes "[Desel]";
	mes "I just hate it!";
	next;
	mes "[Desel]";
	mes "Why do so many people hate it?";
	mes "No, the person I hate the only one!";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16561) == 1" );
	end;
}

// Quest: Ahab's Request. Step 4 + 6 + 7.
wolfvill,127,155,3	script	Ahab#ep18	4_M_MIDDLE1,{
	if (isbegin_quest(16566) == 1) {
		mes "[Ahab]";
		mes "I, I am trying too.";
		mes "Then don't kick me out.";
		next;
		mes "[Ahab]";
		mes "If I get kicked out of here, I have nowhere to go.";
		mes "So I tried to do my best on my own. Everyone hates it.";
		navigateto("wolfvill",85,111);
		close;
	}
	if (isbegin_quest(16565) == 1) {
		mes "[Ahab]";
		mes "Zep, yes, where can I talk about Ahab's manners?";
		mes "I won't forgive you if you keep talking to me!";
		next;
		select( "You know what people hate Ahab?" );
		mes "[Ahab]";
		mes "Ah I know! What's wrong with that!";
		mes "Is it my fault? Young people are bullying old people!";
		next;
		select( "It's not like that.", "It's Mr. Ahab's problem." );
		mes "[Ahab]";
		mes "What's wrong with me!";
		mes "I have no problem!";
		next;
		select( "I'm even thinking of exporting it here." );
		mes "[Ahab]";
		mes "What, what? That's not okay!";
		mes "I have nowhere to go but here.";
		next;
		mes "[Ahab]";
		mes "In Rachel everything was going well";
		mes "I was proud that none of the natives was as successful as me.";
		next;
		mes "[Ahab]";
		mes "However, I accidentally hated the boss of migrants...";
		mes "I came here because I had lost all my possessions and had nowhere to go.";
		next;
		mes "[Ahab]";
		mes "Hey, hey. How can I not get kicked out of here?";
		next;
		mes "[Ahab]";
		mes "Actually I know. I have no power here.";
		mes "Huh? Now I have no power and no money. What should I do?";
		next;
		select( "I don't need power or money.", "Treat people politely." );
		mes "[Ahab]";
		mes "Ugh, I'm doing my best.";
		mes "I give advice to young people, and I go to town meetings all the time to give my opinions.";
		next;
		mes "[Ahab]";
		mes "Are you saying my efforts are wrong?";
		next;
		select("You can't think of it as a superior" );
		mes "[Ahab]";
		mes "But, I'm an adult! Is it wrong to expect a grown-up to be treated like a grown-up?";
		next;
		select( "Then you will be kicked out..." );
		mes "[Ahab]";
		mes "No, no, no... what should I do!";
		next;
		select( "Don't shout.", "Advice that doesn't know the situation is nagging.", "Listen to others.", "Try to learn about this place." );
		mes "[Ahab]";
		mes "Ah ok. ok. don't kick me out.";
		mes "Look, I've listened to you first. You're not even screaming?";
		next;
		mes "[Ahab]";
		mes "I will listen to your advice.";
		mes "So you can't kick me out of here.";
		next;
		mes "[Ahab]";
		mes "I... just wanted to get along well with young people...";
		mes "Was it so bad that it was a bit bittersweet...";
		next;
		mes "[Ahab]";
		mes "Anyway, thank you for coming to talk to me without letting me go right away.";
		mes "I'll do my best anyway <NAVI>[other people] Tell <INFO>wolfvill,85,111,0,101,0</INFO></NAVI>...";
		changequest 16565,16566;
		navigateto("wolfvill",85,111);
		close;
	}
	if (isbegin_quest(16564) == 1) {
		mes "[Ahab]";
		mes "Oh, did you get the cucumber sauce? Let's see.";
		mes "You bought it right.";
		next;
		mes "[Ahab]";
		mes "Then where would you like to eat?";
		mes "I'm really hungry because I haven't been able to eat properly in this cold place.";
		next;
		select( "Let's talk before that..." );
		mes "[Ahab]";
		mes "Hey, yo, you're a young thing with no manners!";
		mes "The old man is eating, so you have to wait politely until it's over!";
		next;
		mes "[Ahab]";
		mes "Rachel pointed at me that I couldn't learn everything if I had a guy like you!";
		next;
		select( "This is a story about courtesy of Mr. Ahab." );
		mes "[Ahab]";
		mes "Mr. Ahab? Mr. Ahab? No, you are campaigning for some errands now!";
		mes "If I run errands twice, uh, I'll be very shoulder-to-shoulder and eat my friends!";
		next;
		mes "[Ahab]";
		mes "Yes, let's hear that precious word!";
		mes "I will listen while eating!";
		changequest 16564,16565;
		close;
	}
	if (isbegin_quest(16563) == 1) {
		mes "[Ahab]";
		mes "If you don't eat it quickly, it will go bad, so buy just one bottle from <NAVI>[Mernomart]<INFO>rachel,135,64,0,101,0</INFO></NAVI>";
		mes "It tastes good when eaten fresh.";
		close2;
		navigateto("rachel",135,64);
		end;
	}
	if (isbegin_quest(16562) == 1) {
		mes "[Ahab]";
		mes "Woah, something. Someone I haven't seen. Are you a resident here?";
		mes "Heh heh heh. In the beginning, it's hard for a superior to remember all of his subordinates. You should understand.";
		next;
		mes "[Ahab]";
		mes "Yes, I'm here, so you can run my errands.";
		mes "It's not difficult. It's a simple thing that even an idiot can do.";
		next;
		mes "[Ahab]";
		mes "For a person like me, the value of available time is different for each person.";
		mes "Of course I am expensive. Ha ha ha!";
		next;
		switch( select( "I'll do an errand for you.", "I'm not here to do that." ) ) {
		case 1:
			mes "[Ahab]";
			mes "Oh, it's good to be obedient~";
			mes "Yeah. A young man should have a bit of a docile taste.";
			next;
			mes "[Ahab]";
			mes "It's no different, because I have a delicious sauce that I must accompany my meal.";
			mes "If you don't have it, you don't feel like you've eaten at all...";
			next;
			mes "[Ahab]";
			mes "So, go to Rachel and get some sauce.";
			mes "If you go to Manomart and say it's cucumber sauce, they'll understand.";
			next;
			mes "[Ahab]";
			mes "If you don't eat it quickly, it will go bad, so buy just one bottle from <NAVI>[Mernomart]<INFO>rachel,135,64,0,101,0</INFO></NAVI>";
			mes "It tastes good when eaten fresh.";
			changequest 16562,16563;
			close2;
			navigateto("rachel",135,64);
			end;
		case 2:
			end;
		}
	}
	mes "[Ahab]";
	mes "At the meeting, I try to be humble.";
	mes "Then the young men's eyes became softer...";
	next;
	mes "[Ahab]";
	mes "I think it might be a little to say that it's not a change, but an attitude, and the world is changing. There is no one who doesn't change.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16562) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16564) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16565) == 1" );
	end;
}

// Quest: Ahab's Request. Step 5.
rachel,135,64,3	script	Shop Keeper#ep18	4_M_RACHMAN2,{
	if (isbegin_quest(16563) == 1) {
		mes "[Shop Keeper]";
		mes "Welcome to the grocery store Manomart.";
		mes "What material are you looking for?";
		next;
		if (select( "Obi Lugger Sauce", "Obi Gut Sauce", "Cucumber Sauce", "Cucumber Sauce" ) != 3) {
			mes "[Shop Keeper]";
			mes "Hmm? There is no such source.";
			mes "Isn't that a sauce you've never heard of?";
			close;
		}
		mes "[Shop Keeper]";
		mes "Ah~ the cucumber sauce! Let's see... it's here.";
		mes "Cucumber and yogurt are added to this sauce, so it is very refreshing and delicious when served on bread.";
		next;
		mes "[Shop Keeper]";
		mes "How many? One? Here it is.";
		mes "Keep in a cool place and eat soon after opening the seal.";
		changequest 16563,16564;
		close;
	}
	mes "[Shop Keeper]";
	mes "Welcome. Grocery store Manomart. Rachel's best grocery store. Yes.";
	next;
	mes "[Shop Keeper]";
	mes "Because most restaurants use our ingredients.";
	mes "Take it, heat it up, cook it, and fry it, and you'll be ready to eat!";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16563) == 1" );
	end;
}
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Collecting Folklore. Step 1 + 5 (final).
wolfvill,61,170,5	script	Folklorist Gudra#ep18	4_F_SHABBY,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(16554) ) {
	case 0:
		if ((isbegin_quest(16551)+isbegin_quest(16552)+isbegin_quest(16553)) == 0) {
			select( "Scholar, what are you doing?" );
			mes "[Folklorist Gudra]";
			mes "Oh, oh.";
			mes "do I look like a scholar?";
			next;
			select( "Are you not a scholar?" );
			mes "[Folklorist Gudra]";
			mes "No! That's a scholar. I am a scholar.";
			mes "I'm glad that someone from outside sees me as a scholar right away.";
			next;
			mes "[Folklorist Gudra]";
			mes "Hmm, hmm. What are you doing?";
			mes "I'm organizing the stories I've recorded.";
			next;
			mes "[Folklorist Gudra]";
			mes "Collecting myths and oral tales handed down to us.";
			mes "It is also about safeguarding the precious cultural property of the indigenous peoples";
			next;
			mes "[Folklorist Gudra]";
			mes "These stories will not be lost, and will be published in a book so that they can be passed on to future generations.";
			next;
			mes "[Folklorist Gudra]";
			mes "You seem to be interested in listening.";
			mes "are you interested in this work?";
			next;
			switch( select( "I am interested", "I am not interested" ) ) {
			case 1:
				mes "[Folklorist Gudra]";
				mes "If you are interested, does that mean you are willing to help?";
				mes "Hands are always needed. I'd be happy to help.";
				next;
				mes "[Folklorist Gudra]";
				mes "Can you write? Good.";
				mes "Please record stories from the villagers.";
				next;
				mes "[Folklorist Gudra]";
				mes "I have made an appointment to hear from a village child, a young man, and a grandmother.";
				next;
				mes "[Folklorist Gudra]";
				mes "It's a long story, so you won't be able to hear it all in one day, so you need to help with a little bit of breathing.";
				mes "Here, I'll give you a journal for recording.";
				next;
				mes "[Folklorist Gudra]";
				mes "The child's name is Dina. The young man is a woman named Amira.";
				mes "Then go to Shani or her grandmother, listen to the story, and write it down.";
				setquest 16551;
				setquest 16552;
				setquest 16553;
				getitem 1000408,1;	// Ep18_Recording_Note
				close;
			case 2:
				end;
			}
			end;
		}
		if (countitem(1000408) < 1) {
			getitem 1000408,1;	// Ep18_Recording_Note
		}
		mes "[Folklorist Gudra]";
		mes "I have made an appointment to hear from a village child, a young man, and a grandmother.";
		next;
		mes "[Folklorist Gudra]";
		mes "It's a long story, so you won't be able to hear it all in one day, so you need to help with a little bit of breathing.";
		next;
		mes "[Folklorist Gudra]";
		mes "The child's name is Dina. The young man is a woman named Amira.";
		mes "Then go to Shanina Grandma and listen to the story and write it down.";
		close;
	case 1:
		mes "[Folklorist Gudra]";
		mes "Dina and Amira, have you been writing stories to Grandma Shanina?";
		mes "I'm excited about what kind of story it will be. Come on, show me your notebook.";
		next;
		mes "[Folklorist Gudra]";
		mes "Uhhhhhh... This is a fairy tale that I can't tell my kids right now.";
		mes "It contains discriminatory stereotypes that are unacceptable by today's standards.";
		next;
		mes "[Folklorist Gudra]";
		mes "Oh, don't get me wrong. I just can't tell the kids, but it's a great resource for me.";
		mes "Who did you hear this from?";
		next;
		mes "[Folklorist Gudra]";
		mes "Are you saying this is the story that Shanina Grandma told me?";
		mes "A story that her grandmother grew up listening to when she was young....";
		next;
		mes "[Folklorist Gudra]";
		mes "I will read this carefully and organize it.";
		mes "Please continue to receive stories from Shanina Grandma.";
		next;
		mes "[Folklorist Gudra]";
		mes "I hope you will come back tomorrow and dictate the next part of this story.";
		mes "Thank you. This is your pay for today's work.";
		delitem 1000408,1;	// Ep18_Recording_Note
		completequest 16554;
		setquest 16559;
		getitem 1000405,20;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;
		mes " ";
		mes "^4d4dff A favorable rating for you occurs.^000000";
		add_reputation_points(REPUTATION_EP18, 100);
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		close;
	case 2:
		break;
	}
	switch( checkquest(16559,PLAYTIME) ) {
	case -1:
		break;
	case 0:
	case 1:
		mes "[Folklorist Gudra]";
		mes "It's like I thought, I want to hear all the stories within today.... So, adventurers and people will be exhausted.";
		next;
		mes "[Folklorist Gudra]";
		mes "Get a good rest for the rest of the day, and come back after dawn.";
		mes "I will organize and analyze the stories you have gathered.";
		close;
	case 2:
		erasequest 16559;
		break;
	}
	switch( isbegin_quest(16558) ) {
	case 0:
		if ((isbegin_quest(16555)+isbegin_quest(16556)+isbegin_quest(16557)) == 0) {
			mes "[Folklorist Gudra]";
			mes "Thank you last time";
			mes "I would like you to record the story today as well.";
			next;
			mes "[Folklorist Gudra]";
			mes "Dina and Amira, go to Grandma Shanina and listen to the story and write it down.";
			mes "I'll give you a notebook for recording here.";
			next;
			if (select( "I'll go.", "It's difficult right now." ) == 2)
				end;
			mes "[Folklorist Gudra]";
			mes "Thank you for always being willing to take on a task.";
			mes "I will repay this favor by making a good storybook.";
			next;
			mes "[Folklorist Gudra]";
			mes "Oh, of course, I'll take care of your daily chi for today.";
			mes "Isn't that also important? I know.";
			setquest 16555;
			setquest 16556;
			setquest 16557;
			getitem 1000408,1;	// Ep18_Recording_Note
			close;
		}
		if (countitem(1000408) < 1) {
			getitem 1000408,1;	// Ep18_Recording_Note
		}
		break;
	case 1:
		if (countitem(1000408) < 1) {
			getitem 1000408,1;	// Ep18_Recording_Note
		}
		mes "[Folklorist Gudra]";
		mes "Dina and Amira, have you been writing stories to Grandma Shanina?";
		mes "I'm excited about what kind of story it will be. Come on, show me your notebook.";
		next;
		mes "[Folklorist Gudra]";
		mes "Uhhhhhh... This is a fairy tale that I can't tell my kids right now.";
		mes "It contains discriminatory stereotypes that are unacceptable by today's standards.";
		next;
		mes "[Folklorist Gudra]";
		mes "But all of that is research material.";
		mes "Isn't it interesting that the past times are melted into fairy tales?";
		next;
		mes "[Folklorist Gudra]";
		mes "I will read this carefully and organize it.";
		mes "Please continue to receive stories from Shanina Grandma.";
		next;
		mes "[Folklorist Gudra]";
		mes "I hope you will come back tomorrow and dictate the next part of this story.";
		mes "Thank you. This is your pay for today's work.";
		delitem 1000408,1;	// Ep18_Recording_Note
		erasequest 16555;
		erasequest 16556;
		erasequest 16557;
		erasequest 16558;
		setquest 16559;
		add_reputation_points(REPUTATION_EP18, 30);
		if (get_reputation_points(REPUTATION_EP18) >= 5000)
			.@bonus = 1;
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		getitem 1000405,3+.@bonus;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		close;
	case 2:	// shouldn't happen
		break;
	}
	mes "[Folklorist Gudra]";
	mes "I have made an appointment to hear from a village child, a young man, and a grandmother.";
	next;
	mes "[Folklorist Gudra]";
	mes "It's a long story, so you won't be able to hear it all in one day, so you need to help with a little bit of breathing.";
	next;
	mes "[Folklorist Gudra]";
	mes "The child's name is Dina. The young man is a woman named Amira.";
	mes "Then go to Shanina Grandma and listen to the story and write it down.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11724) == 2 && isbegin_quest(16554) == 0 && isbegin_quest(16551) == 0" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16554) == 1" );

	// note: QTYPE_DAILYQUEST to take the quest, QTYPE_QUEST otherwise
	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(16554) == 2 && isbegin_quest(16558) == 0 && isbegin_quest(16555) == 0 && (checkquest(16559,PLAYTIME) == -1 || checkquest(16559,PLAYTIME) == 2)" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16554) == 2 && isbegin_quest(16558) == 1" );
	end;
}

// Quest: Collecting Folklore. Step 2.
wolfvill,106,224,3	script	Dina#ep18	4_F_DST_CHILD,{
	if (isbegin_quest(16551) == 1) {
		mes "[Dina]";
		mes "Are you here to hear me?";
		mes "Oh, I'm right. I promised Aunt Gudra!";
		next;
		mes "[Dina]";
		mes "Hmm, hmmm. I will only tell you once, so please write well.";
		mes "This is what I really experienced.";
		next;
		select( "Isn't this an oral story?" );
		mes "[Dina]";
		mes "What is oral tradition? Anyway, please listen carefully!";
		mes "Once upon a time, when I was still young.";
		next;
		select( "I'm still young..." );
		mes "[Dina]";
		mes "Uh-huh, you keep talking!";
		mes "Among the gray wolves I met in the gray wolf forest, there was a wolf who seemed to be the head...";
		completequest 16551;
		if (isbegin_quest(16552) == 2 && isbegin_quest(16553) == 2) {
			npctalk "I wrote down all three stories. Let's go back to Gudra.", "", bc_self;
			setquest 16554;
		}
		close;
	}
	if (isbegin_quest(16555) == 1) {
		mes "[Dina]";
		mes "You came to hear my story today too!";
		mes "Aunt Gudra said she would make a book later.";
		next;
		mes "[Dina]";
		mes "Um..., how far did you go last time?";
		mes "Dragon with sapphire eyes meeting a purple fairy, wasn't it?";
		next;
		mes "[Dina]";
		mes "The purple fairy was actually one of the most outstanding of the fairies, how did I prove this...";
		completequest 16555;
		if (isbegin_quest(16557) == 2 && isbegin_quest(16556) == 2) {
			npctalk "I wrote down all three stories. Let's go back to Gudra.", "", bc_self;
			setquest 16558;
		}
		close;
	}
	mes "[Dina]";
	mes "I love reading interesting stories.";
	mes "It's better to read and imagine the next story!";
	next;
	mes "[Dina]";
	mes "The main characters, live in my heart.";
	mes "I just have to watch the characters as if they were in a play.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16551) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16555) == 1" );
	end;
}

// Quest: Collecting Folklore. Step 3.
wolfvill,180,204,3	script	Amira#ep18	4_F_DESERT,{
	if (isbegin_quest(16552) == 1) {
		mes "[Amira]";
		mes "Are you the one who was asked by her older sister Gudra?";
		mes "Her sister made a strange request. Tell me a story from the old days you know...";
		next;
		mes "[Amira]";
		mes "Anyway, I promised to tell you the story I heard from my late grandfather before we came to the Gray Wolf Forest.";
		next;
		mes "[Amira]";
		mes "Are you ready to listen? Now, I'll speak slowly.";
		mes "There are many more gods in the world than we know...";
		completequest 16552;
		if (isbegin_quest(16551) == 2 && isbegin_quest(16553) == 2) {
			npctalk "I wrote down all three stories. Let's go back to Gudra.", "", bc_self;
			setquest 16554;
		}
		close;
	}
	if (isbegin_quest(16556) == 1) {
		mes "[Amira]";
		mes "Goudra unnie's errand came today as well.";
		mes "Where are you collecting these stories to be written?";
		next;
		mes "[Amira]";
		mes "Anyway, I'll tell you the next story.";
		mes "This is also a story my grandfather told me, but some gods still...";
		next;
		mes "[Amira]";
		mes "...so, um, what was the name. I can't remember it very well, but the important thing is...";
		completequest 16556;
		if (isbegin_quest(1655) == 2 && isbegin_quest(16557) == 2) {
			npctalk "I wrote down all three stories. Let's go back to Gudra.", "", bc_self;
			setquest 16558;
		}
		close;
	}
	mes "[Amira]";
	mes "My grandfather said it. It is important not to forget our gods.";
	mes "That's why you tell me so many stories.";
	next;
	mes "[Amira]";
	mes "I've heard so many stories, but now there are some that I forgot...";
	mes "If Gudra unnie makes a book, I won't forget it anymore.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16552) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16556) == 1" );
	end;
}

// Quest: Collecting Folklore. Step 4.
wolfvill,154,184,5	script	Shanina#ep18	4_F_DST_GRAND,{
	if (isbegin_quest(16553) == 1) {
		mes "[Shanina]";
		mes "Oh, is that Gudra's errand? Did you come to hear the old story?";
		mes "I'll tell you. It's a very old story, my grandmother told me, so it may not be your taste.";
		next;
		mes "[Shanina]";
		mes "Isn't that a nuisance? Don't worry. It's fun being a pastime.";
		next;
		mes "[Shanina]";
		mes "Well then, once upon a time, a very long time ago. There was a blacksmith living there";
		completequest 16553;
		if (isbegin_quest(16551) == 2 && isbegin_quest(16552) == 2) {
			npctalk "I wrote down all three stories. Let's go back to Gudra.", "", bc_self;
			setquest 16554;
		}
		close;
	}
	if (isbegin_quest(16557) == 1) {
		mes "[Shanina]";
		mes "You came to Gudra's errand again today. You're also diligent.";
		mes "Did you say that the story I tell you is okay?";
		next;
		mes "[Shanina]";
		mes "I'd be happy if I could help Gudra.";
		mes "How far have you been? Is it your turn to tell a new story today?";
		next;
		mes "[Shanina]";
		mes "Ah, the last story isn't over yet. I can't remember.";
		mes "Did you hear that the blacksmith rode an owl that came down from the sky and went up to the sky?";
		next;
		mes "[Shanina]";
		mes "Yes, I have a good memory.";
		mes "Then I'll tell you the next part. Stop the poor angel...";
		completequest 16557;
		if (isbegin_quest(16555) == 2 && isbegin_quest(16556) == 2) {
			npctalk "I wrote down all three stories. Let's go back to Gudra.", "", bc_self;
			setquest 16558;
		}
		close;
	}
	mes "[Shanina]";
	mes "Grandma doesn't have much fun in life anymore, but she enjoys telling little children old stories.";
	next;
	mes "[Shanina]";
	mes "Thank you very much for having a child who comes and listens. You will be blessed.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16553) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16557) == 1" );
	end;
}
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Purifying Water. Step 1 + 4 (final).
wolfvill,103,230,3	script	Budan#ep18	4_M_RACHMAN1,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(8693) ) {
	case 0:
		if (isbegin_quest(8691) == 1 || isbegin_quest(8692) == 1) {
			mes "[Budan]";
			mes "If you go in front of the temple, there will probably be devotees out there for good deeds that day.";
			mes "Just say a few words and buy it.";
			mes "I beg you.";
			close;
		}
		// isbegin_quest(8691) == 0
		mes "[Budan]";
		mes "I want to hear you, so meddle in our affairs...";
		mes "They tell me how to do it easily.";
		mes "Can I help you too?";
		next;
		mes "[Budan]";
		mes "You know we can't get to Rachel easily.";
		mes "So this is something I really need your help with, adventurer.";
		next;
		mes "[Budan]";
		mes "I want you to buy me some items that can only be made in Rachel's Temple of Sethrumnir.";
		mes "As you can see, clean water is not readily available in this area because of the volcanic ash and the sand near Rachel.";
		next;
		mes "[Budan]";
		mes "That's why it was developed as a holy water for purification...";
		mes "This is it, it really absorbs the filth in the water through some mysterious magical treatment.";
		mes "Even all kinds of miscellaneous magic.";
		next;
		mes "[Budan]";
		mes "Even the sulfur spring water that contains the mysterious magic of this forest can be turned into drinking water.";
		mes "But the magic doesn't last long... you have to buy it when you need it.";
		next;
		mes "[Budan]";
		mes "You know what I mean.";
		mes "Can I ask for help?";
		mes "Anyway we go... they don't sell to us.";
		next;
		mes "[Budan]";
		mes "Looking at Rachel, pretending to be the owner, buy a sneak peek and put it in the water bottle over there.";
		mes "Then you will have completely purified, clean water.";
		mes "You can bring it to me.";
		next;
		switch( select( "It shouldn't be difficult", "It shouldn't be difficult" ) ) {
		case 1:
			mes "[Budan]";
			mes "Thank you for the short reply, which was a long talk.";
			next;
			setquest 8691;
			mes "[Budan]";
			mes "If you go in front of the temple, there will probably be devotees out there for good deeds that day.";
			mes "Just say a few words and buy it.";
			mes "I beg you.";
			close;
		case 2:
			end;
		}
	case 1:
		if (countitem(1000411) < 1) {
			mes "[Budan]";
			mes "If you go in front of the temple, there will probably be devotees out there for good deeds that day.";
			mes "Just say a few words and buy it.";
			mes "I beg you.";
			close;
		}
		delitem 1000411,1;	// Ep18_Purified_Bucket
		getitem 1000405,20;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;
		completequest 8693;
		setquest 8694;
		add_reputation_points(REPUTATION_EP18, 100);
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		mes "^4d4dff A favorable rating for you occurs.^000000";
		next;
		mes "[Budan]";
		mes "Thank you for helping me secure drinking water. Then I will boil this and prepare a meal.";
		mes "If you have time to stay here tomorrow, may I ask for another route to Rachel?";
		next;
		select( "I do", "I think I will be busy tomorrow" );
		mes "[Budan]";
		mes "Is your answer quick?";
		mes "Sorry for the long journey. But I want to feed my kids something safe. Thanks.";
		close;
	case 2:
		break;
	}

	// daily
	switch( checkquest(8694,PLAYTIME) ) {
	case -1:
		break;
	case 0:
	case 1:
		mes "[Budan]";
		mes "I've got plenty of drinking water for a while.";
		close;
	case 2:
		erasequest 8694;
		break;
	}
	if (isbegin_quest(8695) == 1 || isbegin_quest(8696) == 1) {
		mes "[Budan]";
		mes "If you go in front of the temple, there will probably be devotees out there for good deeds that day.";
		mes "Just say a few words and buy it.";
		mes "I beg you.";
		close;
	}
	if (isbegin_quest(8697) == 1) {
		if (countitem(1000411) < 1) {
			mes "[Budan]";
			mes "If you go in front of the temple, there will probably be devotees out there for good deeds that day.";
			mes "Just say a few words and buy it.";
			mes "I beg you.";
			close;
		}
		delitem 1000411,1;	// Ep18_Purified_Bucket
		add_reputation_points(REPUTATION_EP18, 30);
		if (get_reputation_points(REPUTATION_EP18) >= 5000)
			.@bonus = 1;
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		getitem 1000405,3+.@bonus;	// Ep18_Amethyst_Fragment
		// erasequest 8695;
		// erasequest 8696;
		erasequest 8697;
		setquest 8694;
		getexp 18252408,2000000;
		mes "[Budan]";
		mes "Thank you for helping me secure drinking water. Then I will boil this and prepare a meal.";
		mes "If you have time to stay here tomorrow, may I ask for another route to Rachel?";
		next;
		select( "I do", "I think I will be busy tomorrow" );
		mes "[Budan]";
		mes "Is your answer quick?";
		mes "Sorry for the long journey. But I want to feed my kids something safe. Thanks.";
		close;
	}
	mes "[Budan]";
	mes "Adventurer, here you are again.";
	mes "Can you afford to go to Rachel?";
	next;
	mes "[Budan]";
	mes "Looking at Rachel, pretending to be the owner, buy a sneak peek and put it in the water bottle over there.";
	mes "Then you will have completely purified, clean water.";
	mes "You can bring it to me.";
	next;
	if (select( "It shouldn't be difficult", "It shouldn't be difficult" ) == 2)
		end;
	mes "[Budan]";
	mes "Thank you for the short reply, which was a long talk.";
	next;
	setquest 8695;
	mes "[Budan]";
	mes "If you go in front of the temple, there will probably be devotees out there for good deeds that day.";
	mes "Just say a few words and buy it.";
	mes "I beg you.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8691) == 0 && isbegin_quest(8692) == 0 && isbegin_quest(8693) == 0 && isbegin_quest(11724) == 2" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8693) == 1" );

	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(8693) == 2 && (checkquest(8694,PLAYTIME) == -1 || checkquest(8694,PLAYTIME) == 2) && isbegin_quest(8695) == 0 && isbegin_quest(8696) == 0 && isbegin_quest(8697) == 0" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8697) == 1" );
	end;
}

// Quest: Purifying Water. Step 2.
rachel,103,141,5	script	Hallowed Salesperson#ep18	4_M_DESERT,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (isbegin_quest(8691) == 1 || isbegin_quest(8692) == 1 && countitem(1000410) < 1) {
		mes "[Holy Relic Salesman]";
		mes "It is a holy relic for the essence of today's fish~";
		mes "Hurry up before it's sold out~";
		next;
		mes "[Holy Relic Salesman]";
		mes "Huh?";
		mes "What's going on? Alien?";
		next;
		select("Needed for purified water" );
		mes "[Holy Relic Salesman]";
		mes "Ah~ You came to hear the rumors~";
		mes "I'll explain briefly~";
		mes "It is a consecrated holy water for purification that purifies a large amount of polluted water at once~";
		mes "This is it~";
		next;
		mes "[Holy Relic Salesman]";
		mes "It's made in a temple~";
		mes "Now that the waterway is well maintained, there is not much demand for it~";
		mes "I'm making a small amount~";
		mes "The materials are also difficult~";
		next;
		mes "[Holy Relic Salesman]";
		mes "I can't buy in bulk because I have to use it within a few days~";
		mes "But~ Since there is quite a lot of water that can be purified with one use~";
		next;
		mes "[Holy Relic Salesman]";
		mes "If there is a suitable water supply point when the water runs out on the way to the destination~";
		mes "maybe better than carrying water";
		next;
		mes "[Holy Relic Salesman]";
		mes "But you have to boil it once.";
		mes "Some people say it smells~";
		next;
		mes "[Holy Relic Salesman]";
		mes "This is 550 Jenny~";
		next;
		switch( select( "Buy", "Don't buy" ) ) {
		case 1:
			if (Zeny < 550) {
				mes "[Holy Relic Salesman]";
				mes "You don't have enough Zeny.";
				close;
			}
			Zeny -= 550;
			if (isbegin_quest(8691) == 1) {
				erasequest 8691;
				setquest 8692;
			}
			getitem 1000410,1;	// Ep18_Water_Filter
			mes "[Holy Relic Salesman]";
			mes "The stuff is here~";
			mes "May Goddess Freya bless you~";
			close2;
			navigateto("wolfvill",104,234);
			end;
		case 2:
			end;
		}
	}
	if (isbegin_quest(8695) == 1 || isbegin_quest(8696) == 1 && countitem(1000410) < 1) {
		mes "[Holy Relic Salesman]";
		mes "It is a holy relic for the essence of today's fish~";
		mes "Hurry up before it's sold out~";
		next;
		mes "[Holy Relic Salesman]";
		mes "Ah, the last time you went to the top, didn't you?";
		mes "You came back sooner than expected. It seems that business is going well~";
		next;
		switch( select( "Buy a relic", "Listen to an explanation", "Cancel" ) ) {
		case 1:
			break;
		case 2:
			end;
		case 3:
			end;
		}
		mes "[Holy Relic Salesman]";
		mes "This is 550 Jenny~";
		next;
		if (select( "buy", "don't buy" ) == 2)
			end;
		if (Zeny < 550) {
			mes "[Holy Relic Salesman]";
			mes "You don't have enough Zeny.";
			close;
		}
		Zeny -= 550;
		if (isbegin_quest(8695) == 1) {
			erasequest 8695;
			setquest 8696;
		}
		getitem 1000410,1;	// Ep18_Water_Filter
		mes "[Holy Relic Salesman]";
		mes "The stuff is here~";
		mes "May Goddess Freya bless you~";
		close;
	}
	mes "[Holy Relic Salesman]";
	mes "Today's sale has run out~";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8691) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8695) == 1" );
	end;
}

// Quest: Purifying Water. Step 3.
wolfvill,104,235,0	script	Water barrel#ep1801	CLEAR_NPC,{
	if (isbegin_quest(8692) == 1 || isbegin_quest(8696) == 1) {
		if (countitem(1000410) > 0) {
			if (checkweight(1000411,1) == 0) {
				mes "- Wait a minute !! -";
				mes "- Currently you're carrying -";
				mes "- too many items with you. -";
				mes "- Please try again -";
				mes "- after you loose some weight. -";
				close;
			}
			specialeffect EF_BLUECASTING;
			specialeffect EF_STOPEFFECT;
			specialeffect EF_HEALSP;
			specialeffect EF_SMOKE;
			delitem 1000410,1;	// Ep18_Water_Filter
			getitem 1000411,1;	// Ep18_Purified_Bucket
			if (isbegin_quest(8692) == 1)
				changequest 8692,8693;
			else
				changequest 8696,8697;
			mes "I thought it was relatively clean water, but when I put a holy object in it, it emits a bright light and somehow has a sacred feeling.";
			mes "When the light goes down, the water looks clear even if you pretend.";
			next;
			mes "I'll put it in a bucket and take it to Budan.";
			close;
		}
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8692) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8696) == 1" );
	end;
}
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Transporting Goods. Step 1 + 3.
wolfvill,53,234,0	script	#ep18_wp01	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch:
	if (ep18_1_main < 36)
		end;
	cloakoffnpcself( "Hazar#ep18_1" );
	cloakoffnpcself( "Camille#ep18_1" );
	cloakoffnpcself( "Wagon#ep18_1" );
	end;
}

wolfvill,50,234,6	script(CLOAKED)	Hazar#ep18_1	4_EP18_HAZAR,{
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(12532) ) {
	case 0:
		mes "^0000ffThe old man is scolding the young man^000000";
		next;
		npctalk "Did I say that I had to leave today or not?", "Hazar#ep18_1", bc_self;
		next;
		npctalk "Ha thank you.", "Camille#ep18_1", bc_self;
		next;
		npctalk "By the way, what's the shape of this cart? There's a crack in the wheel. Maybe you replaced it with a new one, but my eyes aren't getting old?", "Hazar#ep18_1", bc_self;
		next;
		npctalk "Sorry! I was in a hurry to find a new wheel, but I can't find a spare...", "Camille#ep18_1", bc_self;
		next;
		npctalk "There should be 30 bags of leather for the items going uphill. This is also invisible to my eyes. Is this also a problem with my eyes.", "Hazar#ep18_1", bc_self;
		next;
		emotion ET_HUK, getnpcid(0,"Camille#ep18_1");
		npctalk "Hey!", "Camille#ep18_1", bc_self;
		next;
		npctalk "Where else did Uma to pull the cart go? I'm old enough to retire. I can't see anything in front of the cart.", "Hazar#ep18_1", bc_self;
		next;
		npctalk "Sorry, it will arrive soon!!", "Camille#ep18_1", bc_self;
		next;
		npctalk "Have you recruited someone to use as an escort? How come you don't see anyone? I'm sure you were going to lead the entire cart by yourself", "Hazar#ep18_1", bc_self;
		next;
		npctalk "That's... Master, I've been recruiting since the decision to go up, but no one volunteered.", "Camille#ep18_1", bc_self;
		next;
		npctalk "You have no intention of going up, Camille... What are you thinking?", "Hazar#ep18_1", bc_self;
		next;
		npctalk "......", "Camille#ep18_1", bc_self;
		next;
		npctalk "I'll take a serious look at the lack of preparation for the ascent later, but let's start with a realistic story first.", "Hazar#ep18_1", bc_self;
		next;
		npctalk "The transaction date has already been set, and the ascending cart must start. We will have to look at the resolution of the cart wheel and the insufficient ascending items. How are you going to solve it?", "Hazar#ep18_1", bc_self;
		next;
		npctalk "This... First of all, I will work on matching the leather quantity! Uma has sent someone to prepare it soon", "Camille#ep18_1", bc_self;
		next;
		npctalk "What about the wheel of the cart? It looks like it will collapse after not being able to take a few steps.", "Hazar#ep18_1", bc_self;
		next;
		select( "interrupt", "ignore" );
		npctalk "Um? We've been worrying about it since a while ago, so are we going to see anything? We're in trouble because of that wheelbarrow, so don't disturb me...", "Hazar#ep18_1", bc_self;
		next;
		select("Describe the repair method" );
		npctalk "This. If you reinforce the wheel with a tough string, it will roll somehow?", "", bc_self;
		next;
		npctalk "No, this guy. The cart wheel isn't like a wooden chair... No. Could it be possible?", "Hazar#ep18_1", bc_self;
		next;
		select( "Isn't it better to try?", "It's too much" );
		npctalk "Adventurer. I am responsible for this ascent. If the adventurer solves the cart wheel, we will pay the adventurer the appropriate experience points based on the vision of our clan", "Camille#ep18_1", bc_self;
		next;
		if (select( "Transaction established!", "I can't do that" ) == 2)
			end;
		npctalk "Thank you. Could you take a look at this cart right here?", "Camille#ep18_1", bc_self;
		specialeffect 1090, AREA, "Wagon#ep18_1";
		next;
		npctalk "I would appreciate it if you could reinforce the wheels of this cart enough to use it for ascending. I will go back to check the leather used for ascending, so I will be away for a while.", "Camille#ep18_1", bc_self;
		setquest 12532;
		emotion ET_HUK, getnpcid(0,"Camille#ep18_1");
		cloakonnpcself( "Camille#ep18_1" );
		close;
	case 1:
		end;
	case 2:
		break;
	}
	switch( isbegin_quest(12533) ) {
	case 0:
		mes "^0000ffHazard looks at him with friendly eyes^000000";
		next;
		progressbar_npc "FFFF00",2;
		npctalk "Hey... you have some pretty strange talents.", "Hazar#ep18_1", bc_self;
		next;
		npctalk "By the way, this guy Camille isn't finished yet", "Hazar#ep18_1", bc_self;
		next;
		npctalk "I have checked all the items necessary for the senior climb. Now, if I only check the cart and leave...", "Camille#ep18_1", bc_self;
		next;
		npctalk "The wheel of the cart was taken care of by the adventurers here. Let me thank you.", "Hazar#ep18_1", bc_self;
		next;
		npctalk "Ah, thank you so much Adventurer. I'll make sure to visit you when I get back from the mountain. Could you tell me your name?", "Camille#ep18_1", bc_self;
		next;
		select( "My name is " + strcharinfo(0) + "" );
		select( "We have a long way to go, so let's start." );
		npctalk "That's right. I'll have to leave for the first time. I'll greet you after I return. " + strcharinfo(0) + ". Then I'll be back. Senior", "Camille#ep18_1", bc_self;
		next;
		cloakonnpcself( "Camille#ep18_1" );
		cloakonnpcself( "Wagon#ep18_1" );
		npctalk "Thank you so much for helping my poor successor. I'm a smart but thoughtful child, so I guess I was unintentionally ashamed.", "Hazar#ep18_1", bc_self;
		next;
		npctalk "I can't say for sure whether that guy will finish the climb safely or not. If my body was a little better, he would have led the climb.", "Hazar#ep18_1", bc_self;
		next;
		npctalk "" + strcharinfo(0) + " Can I call you Mr. If you can afford it, can you do one more request from this old man?", "Hazar#ep18_1", bc_self;
		next;
		select("Tell me" );
		npctalk "It's the first time that Camille conducts an ascent, so I don't think he's at ease. I wonder if he'll be able to avoid monster attacks. ", "Hazar#ep18_1", bc_self;
		next;
		npctalk "So, can you please follow him in moderation and look after him from behind? It's not a big deal, but please.", "Hazar#ep18_1", bc_self;
		next;
		if (select( "accept", "reject" ) == 2)
			end;
		npctalk "Thank you. Thank you very much" + strcharinfo(0) + " Mr.", "Hazar#ep18_1", bc_self;
		setquest 12533;
		close;
	case 1:
	case 2:
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8692) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(12532) == 0 && isbegin_quest(11724) == 2" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(12533) == 0 && isbegin_quest(12532) == 2" );
	end;
}

// Quest: Transporting Goods. Step 2.
wolfvill,53,234,4	script	Wagon#ep18_1	4_EP18_WAGON,{
	if (ep18_1_main < 36)
		end;
	if (isbegin_quest(12532) == 1) {
		mes "^0000ffIt looks fine, but I see an old wagon wheel.^000000";
		next;
		if (select( "Try repair work", "Stop" ) == 2)
			end;
		progressbar_npc "FFFF00",2;
		if (countitem(7197) < 1) {
			mes "There is no <ITEM>[material]<INFO>7197</INFO></ITEM> to reinforce the wagon wheel.";
			close;
		}
		// note: Tough_Vines not deleted on fail
		.@r = rand(1,5);
		if (.@r == 1) {
			specialeffect EF_REFINEOK;
			mes "^0000ffRepair successful!^000000";
			delitem 7197,1;	// Tough_Vines
			removespecialeffect 1090;
			completequest 12532;
			close;
		}
		specialeffect EF_REFINEFAIL;
		mes "^0000ff It doesn't seem to have been properly reinforced yet. The material hasn't disappeared, so let's keep trying^000000";
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(12532) == 1" );
	end;
}

wolfvill,56,234,4	script(CLOAKED)	Camille#ep18_1	4_EP18_KAMIL,{
	mes "^0000ffHazard looks like he's getting mad at him^000000";
	close;
}

// Quest: Transporting Goods. Step 4.
gw_fild01,115,130,0	script	#ep18_wp02	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch:
	if (isbegin_quest(12533) == 1)
		cloakoffnpcself( "Wagon#ep18_2" );
	end;
}

gw_fild01,115,130,4	script(CLOAKED)	Wagon#ep18_2	4_EP18_WAGON,{
	if (ep18_1_main < 36)
		end;
	if (isbegin_quest(12533) == 1) {
		mes "^0000ffIt is clear that the wagon was led by Camille. From the condition of the cargo scattered everywhere, something bad must have happened. I'll have to look for Camille^000000";
		completequest 12533;
		setquest 12534;
		close;
	}
	mes "^0000ff Looks like most of the cargo has already been lost.^000000";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(12533) == 1" );
	end;
}

// Quest: Transporting Goods. Step 5.
gw_fild01,202,102,0	script	#ep18_wp03	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch:
	if (isbegin_quest(12534) == 1) {
		cloakoffnpcself( "#ep18_2_mon" );
		cloakoffnpcself( "Camille#ep18_2" );
		end;
	}
	if (isbegin_quest(12534) == 2 && isbegin_quest(12535) == 0) {
		cloakoffnpcself( "Camille#ep18_2" );
		end;
	}
	end;
}

gw_fild01,205,102,4	script(CLOAKED)	#ep18_2_mon	EP18_GREY_WOLF,{
	if (ep18_1_main < 36)
		end;
	if (isbegin_quest(12534) != 1)
		end;
	.@wolf_hp = 1000;
	.@camille_hp = 1000;

	mes "^0000ffThe situation doesn't look very good^000000";
	next;
	npctalk "rumble...", "#ep18_2_mon", bc_self;
	next;
	npctalk "Damn", "Camille#ep18_2", bc_self;
	next;
	mes "^0000ff I feel like I'm going to fall. I can't even keep my eyes on where to attack, so I'm rolling my eyes relentlessly. I'll probably end up with wolf food that doesn't last even a second and melts away ^000000";
	while(1) {
		next;
		switch( select("Combat advice to Camille", "Treat the wolf yourself", "Walk by" ) ) {
		case 1:
			mes "^0000ffWhere are you going to tell Camille to attack the wolf?^000000";
			playbgm "182";
			while(1) {
				mes "Wolf Health - ^ff0000" + .@wolf_hp + "^000000";
				mes "Camille's Health - ^0000ff" + .@camille_hp + "^000000";
				next;
				switch( select( "timid attack (high probability)", "moderate attack (normal probability)", "big attack (low probability)", "converting blow (low probability)", "Make them run away" ) ) {
				case 1:
					.@wolf_chance = 65;	// 65% chance the wolf is being hit / 35% Camille
					.@wolf_damage = rand(25,50);
					.@camille_damage = rand(45,93);
					break;
				case 2:
					.@wolf_chance = 42;
					.@wolf_damage = rand(32,58);
					.@camille_damage = rand(37,72);
					break;
				case 3:
					.@wolf_chance = 30;
					.@wolf_damage = rand(45,70);
					.@camille_damage = rand(34,53);
					break;
				case 4:
					.@wolf_chance = 25;
					.@wolf_damage = rand(66,80);
					.@camille_damage = rand(26,50);
					break;
				case 5:
					mes "I'm upset, but there's no chance of winning now. Let's fix it and try again";
					close;
				}
				if (.@wolf_chance > rand(100)) {
					.@wolf_hp = .@wolf_hp - .@wolf_damage;
					npctalk "-" + .@wolf_damage, "#ep18_2_mon", bc_self;
					npctalk " ", "Camille#ep18_2", bc_self;
					specialeffect EF_ACIDDEMON, SELF, "#ep18_2_mon";
					specialeffect EF_HFLIMOON3, SELF, "#ep18_2_mon";
				}
				else {
					.@camille_hp = .@camille_hp - .@camille_damage;
					npctalk " ", "#ep18_2_mon", bc_self;
					npctalk "-" + .@camille_damage, "Camille#ep18_2", bc_self;
					specialeffect EF_ACIDDEMON, SELF, "Camille#ep18_2";
					specialeffect EF_HFLIMOON3, SELF, "Camille#ep18_2";
				}
				if (.@wolf_hp < 1) {
					mes "^0000ff You defeated the gray wolf.^000000";
					completequest 12534;
					cloakonnpcself( "#ep18_2_mon" );
					playbgm "183";
					close;
				}
				if (.@camille_hp < 1) {
					next;
					mes "^ff0000Dangerous!! I need to stop the battle and restore Camille's health.^000000";
					playbgm "183";
					close;
				}
			}
			break;
		case 2:
			mes "^0000ff No, it might be right to just help Camille grow up on her own....^000000";
			continue;
		case 3:
			mes "^0000ffCome back later and build Camille's grave.^000000";
			close;
		}
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(12534) == 1" );
	end;
}

// Quest: Transporting Goods. Step 6.
gw_fild01,201,102,6	script	Camille#ep18_2	4_EP18_KAMIL,{
	if (ep18_1_main < 36)
		end;
	if (isbegin_quest(12534) == 2 && isbegin_quest(12535) == 0) {
		mes "^0000ff Camille's body is trembling with excitement after the battle.^000000";
		npctalk "Uhhhhhhhh...", "Camille#ep18_2", bc_self;
		next;
		select( "It was a pretty good move", "It wasn't good. Don't hold a knife in the future" );
		npctalk "No" + strcharinfo(0) + "If it wasn't for your instructions, I'd be stuck.", "Camille#ep18_2", bc_self;
		next;
		select( "Why did you leave the cart here?" );
		npctalk "It happened while chasing those who were scattered all over the place with trade goods. I didn't recover all of them, but I did get some.", "Camille#ep18_2", bc_self;
		next;
		npctalk "First, we need to move the ascending cart back to the village. We need to pack up the rest of our luggage and make a claim.", "Camille#ep18_2", bc_self;
		next;
		select( "Isn't it just an accident? It's enough to ask for a crime..." );
		npctalk "They were trade goods to be exchanged for food and daily necessities to support the village's several months' livelihood. Perhaps the crime is not light.", "Camille#ep18_2", bc_self;
		next;
		select( "You're too harsh on the trade officer" );
		npctalk "Master stopped me from the beginning, but I ended up insisting that I want to lead the way. It's not forcing me to take it, so it's my responsibility.", "Camille#ep18_2", bc_self;
		next;
		npctalk "If I died here or if I ran away, Master would be held responsible. That's absolutely not going to happen.", "Camille#ep18_2", bc_self;
		next;
		if (select( "Yes, it's your job, so do it yourself.", "How about running away like this?" ) == 2)
			end;
		npctalk "Thanks again for your help. Now I have to clear the procession and come back again. I hope to see you again if fate guides you...", "Camille#ep18_2", bc_self;
		setquest 12535;
		navigateto("wolfvill",79,211);
		cloakonnpcself( "Camille#ep18_2" );
		close;
	}
	mes "^0000ff It seems that you cannot hear the story properly^000000";
	close;

OnInit:
	cloakonnpc strnpcinfo(0);
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(12534) == 2 && isbegin_quest(12535) == 0" );
	end;
}

wolfvill,76,210,0	script	#ep18_wp03_	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch_:
	if (isbegin_quest(12531) == 1 || isbegin_quest(12535) == 1) {
		cloakoffnpcself( "Hazar#ep18_3" );
		cloakoffnpcself( "Camille#ep18_3" );
		cloakoffnpcself( "Villager#ep18_31" );
		cloakoffnpcself( "Villager#ep18_32" );
		cloakoffnpcself( "Villager#ep18_33" );
	}
	end;
}

// Quest: Transporting Goods. Step 7 + 12 (final).
wolfvill,75,214,4	script(CLOAKED)	Hazar#ep18_3	4_EP18_HAZAR,{
	if (ep18_1_main < 36)
		end;
	if (!checkweight(1000405,20)) {
		mes "^ff0000 I think the weight of the items I have is too much. Please organize Tori once.^000000";
		close;
	}
	if (isbegin_quest(12535) == 1) {
		mes "^0000ff A meeting between the head of the wolf village and the owners of the wolf village is being held.^000000";
		next;
		npctalk "I feel sorry for everyone. I couldn't get enough disciples because I didn't have enough.", "Hazar#ep18_3", bc_self;
		next;
		npctalk "It's not your problem, Hazard. It's probably Camille's problem, who was too greedy for going uphill.", "Villager#ep18_31", bc_self;
		next;
		npctalk "No, I was the one who forced my disciple to experience ascending.", "Hazar#ep18_3", bc_self;
		next;
		npctalk "Is that real, Camille? Is it true that your master was forcing your back?", "Villager#ep18_33", bc_self;
		next;
		npctalk "I'm really sorry to everyone. And Master didn't pat me on the back, I was stubborn.", "Camille#ep18_3", bc_self;
		next;
		npctalk "I knew this was going to happen. For some reason, something strange happened when Hazard suddenly felt uncomfortable.", "Villager#ep18_32", bc_self;
		next;
		npctalk "Camille, you bastard! What are you doing now!", "Hazar#ep18_3", bc_self;
		next;
		npctalk "I'm stubborn with my master. I couldn't even get the job done properly. It's all my fault.", "Camille#ep18_3", bc_self;
		next;
		npctalk "Hmmm... Hmmm", "Villager#ep18_31", bc_self;
		npctalk "Eing~", "Villager#ep18_32", bc_self;
		npctalk "ttttttt.", "Villager#ep18_33", bc_self;
		next;
		npctalk "Well, I think I got a rough idea of ??what happened. Then, should we discuss the post-processing now?", "Villager#ep18_33", bc_self;
		next;
		npctalk "Hey guys! How can you make such a hasty decision!", "Hazar#ep18_3", bc_self;
		next;
		npctalk "Actually, we've been watching Camille since childhood. I want to take care of the situation.", "Villager#ep18_32", bc_self;
		next;
		npctalk "It's a matter of the circumstances, but there are rules for the top, right?", "Villager#ep18_33", bc_self;
		next;
		emotion ET_HUK, getnpcid(0, "Villager#ep18_31");
		npctalk "This person! If you follow the rules above, you should give up your head! It's not a rude thing to talk about!", "Villager#ep18_31", bc_self;
		next;
		npctalk "No, that's right... Ha, how do I do this?", "Villager#ep18_33", bc_self;
		next;
		npctalk "I will follow the rules. I did it myself, so I guess that's right.", "Camille#ep18_3", bc_self;
		next;
		npctalk "Uh-huh! Camille, you bastard! You're not in a position to speak up!", "Hazar#ep18_3", bc_self;
		next;
		npctalk "Calm down. Speaking of the rules above. Let's examine the grounds for Camille's disposition first.", "Villager#ep18_31", bc_self;
		next;
		npctalk "The loss of 800kg of clothing/leather for winter budget. And the failure to purchase food materials due to the loss.", "Villager#ep18_33", bc_self;
		next;
		npctalk "Ummm... Can't we just pack up the upper search team and find our luggage?", "Villager#ep18_31", bc_self;
		next;
		npctalk "I do, but Camille's mistake will be officially sanctioned once the top has resolved the situation.", "Villager#ep18_33", bc_self;
		next;
		npctalk "Yeah, now, the villagers and the top executives don't know this yet. Camille's guilt is confirmed as soon as the search is sent.", "Villager#ep18_32", bc_self;
		next;
		select( "Try another advice" );
		npctalk "What happens if the top outsider unofficially retrieves and returns the cargo?", "", bc_self;
		next;
		npctalk "No, you are " + strcharinfo(0) + "Are you not Mr.", "Hazar#ep18_3", bc_self;
		next;
		npctalk "Ah, that's a good opinion. If an outsider solves it without anyone knowing, then this case would never have happened.", "Villager#ep18_33", bc_self;
		next;
		npctalk "You can't punish something without the above rules.", "Villager#ep18_31", bc_self;
		next;
		npctalk "" + strcharinfo(0) + "Mr. Could it be that... can I take that as saying that we will find lost items on our behalf?", "Hazar#ep18_3", bc_self;
		next;
		if (select( "I'll give it a try", "What are you kidding me?" ) == 2)
			end;
		npctalk "Thank you " + strcharinfo(0) + "Sir. I will lead the way.", "Camille#ep18_3", bc_self;
		next;
		npctalk "No, that shouldn't be happening. This should be a non-event. Camille, you shouldn't step in.", "Villager#ep18_33", bc_self;
		next;
		npctalk "" + strcharinfo(0) + "Did you say nim? I'll thank you for coming out for our ugly Camille.", "Villager#ep18_31", bc_self;
		next;
		npctalk "I'd like to thank you too. Even if he's a bit shy, he's a talented person who shouldn't lose his life because of this.", "Villager#ep18_32", bc_self;
		next;
		npctalk "I'm so grateful that I can't say anything. What are you doing, I'll tell you about Camille's approximate location.", "Hazar#ep18_3", bc_self;
		next;
		emotion ET_HUK, getnpcid(0, "Villager#ep18_31");
		sleep2 400;
		npctalk "Yes! I see", "Camille#ep18_3", bc_self;
		next;
		mes "^ff0000We have obtained a rough idea of ??where the cargo looted from Camille was headed^000000";
		completequest 12535;
		setquest 12536;
		setquest 12537;
		setquest 12538;
		setquest 12539;
		next;
		npctalk "Then " + strcharinfo(0) + "I'll bet everything on Mr.", "Hazar#ep18_3", bc_self;
		next;
		npctalk "Well, this was a meeting that didn't exist. Let's disband quickly", "Villager#ep18_31", bc_self;
		next;
		emotion ET_HUK, getnpcid(0, "Villager#ep18_31");
		npctalk "That's right. I'm also busy with work.", "Villager#ep18_33", bc_self;
		next;
		cloakonnpcself( "Hazar#ep18_3" );
		cloakonnpcself( "Camille#ep18_3" );
		cloakonnpcself( "Villager#ep18_31" );
		cloakonnpcself( "Villager#ep18_32" );
		cloakonnpcself( "Villager#ep18_33" );
		close;
	}
	if (isbegin_quest(12531) == 1) {
		mes "^0000ff A meeting between the head of the wolf village and the owners of the wolf village is being held.^000000";
		next;
		npctalk "Lost cargo has been collected as shown. Let's check the quantity.", "", bc_self;
		next;
		npctalk "Oh. So fast?", "Villager#ep18_31", bc_self;
		next;
		npctalk "I feel like I have already been owed to you twice. No, I was also owed to you in Camille's battle, so three times?", "Hazar#ep18_3", bc_self;
		next;
		npctalk "I'm sorry. I really... thank you.", "Camille#ep18_3", bc_self;
		next;
		npctalk "Let's see, leather 500, cloth processing 280. Ummm... the cloth is a bit lacking...", "Villager#ep18_32", bc_self;
		next;
		npctalk "That's about the level of a typical defective product. ", "Villager#ep18_33", bc_self;
		next;
		npctalk "Yeah, it's not within the allowable range. If that's the case, huh... I think we can reschedule the meeting agenda", "Villager#ep18_31", bc_self;
		next;
		select( "What will change to?" );
		npctalk "The original agenda was a meeting about the loss of trade goods. Now it has been changed to the agenda for delaying the top departure. Isn't it, General?", "Villager#ep18_33", bc_self;
		next;
		npctalk "Uh...hmmmm. That's right. We started two days later than the original schedule", "Hazar#ep18_3", bc_self;
		next;
		npctalk "Master... that's", "Camille#ep18_3", bc_self;
		next;
		npctalk "Shut up, Camille. Well, let's come to a conclusion quickly. What's the punishment for being delayed?", "Hazar#ep18_3", bc_self;
		next;
		npctalk "This is a probationary sentence within 3 months. I am reflecting on my work as an upper-level administrator", "Villager#ep18_33", bc_self;
		next;
		emotion ET_CRY, getnpcid(0, "Villager#ep18_31");
		npctalk "I have no objection", "Villager#ep18_31", bc_self;
		next;
		npctalk "I have no objection, either.", "Villager#ep18_32", bc_self;
		next;
		npctalk "That's right, Camille. You've never had a sore throat.", "Hazar#ep18_3", bc_self;
		next;
		npctalk "Thank you, Master. Thank you also to the upper-level Lords", "Camille#ep18_3", bc_self;
		next;
		npctalk "Uhhhhhh, what are you doing? The climb has been delayed, so hurry up and get ready to start again.", "Villager#ep18_31", bc_self;
		next;
		npctalk "Yes, I have to be punished from today, so it will end sooner than a day.", "Villager#ep18_32", bc_self;
		next;
		npctalk "Then the important issue is over, so let's wrap this up." + strcharinfo(0) + "Thank you again Mr.", "Hazar#ep18_3", bc_self;
		next;
		npctalk "Thank you so much " + strcharinfo(0) + "Sir. You are my lifesaver. Here is a small but small token of my gratitude.", "Camille#ep18_3", bc_self;
		emotion ET_CRY, getnpcid(0, "Villager#ep18_31");
		completequest 12531;
		getitem 1000405,20;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;
		add_reputation_points(REPUTATION_EP18, 100);
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		close2;
		cloakonnpcself( "Hazar#ep18_3" );
		cloakonnpcself( "Camille#ep18_3" );
		cloakonnpcself( "Villager#ep18_31" );
		cloakonnpcself( "Villager#ep18_32" );
		cloakonnpcself( "Villager#ep18_33" );
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(12535) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(12531) == 1" );
	end;
}

wolfvill,79,213,3	duplicate(dummy_cloaked_npc)	Camille#ep18_3	4_EP18_KAMIL

wolfvill,77,207,8	script(CLOAKED)	Villager#ep18_33	4_M_RACHMAN1,{
	mes "[Villager]";
	mes "Hmmmm, let's talk about private things later.";
	close;
}

wolfvill,74,208,8	script(CLOAKED)	Villager#ep18_32	4_M_MIDDLE1,{
	mes "[Villager]";
	mes "No time to chat";
	close;
}

wolfvill,72,209,8	script(CLOAKED)	Villager#ep18_31	4_M_MIDDLE,{
	mes "[Villager]";
	mes "It is forbidden to chat during the upper meeting.";
	close;
}

// Quest: Transporting Goods. Step 8 + 9 + 10 + 11.
gw_fild01,242,325,4	script	#ep18_12536	4_POINT_RED,5,5,{
	if (isnpccloaked(strnpcinfo(0)) == true)
		end;
	.@quest_id = atoi( replacestr(strnpcinfo(2), "ep18_", "") );
	.@state = isbegin_quest(.@quest_id);
	if (.@state == 1) {
		specialeffect EF_BIG_PORTAL, SELF; // 561
		progressbar_npc "FFFF00",2;
		completequest .@quest_id;
		removespecialeffect 561;
		specialeffect EF_ICECRASH, SELF; // 135

		if (isbegin_quest(12536) == 2 && isbegin_quest(12537) == 2 && isbegin_quest(12538) == 2 && isbegin_quest(12539) == 2)
			setquest 12531;
		cloakonnpc strnpcinfo(0), getcharid(0);
	}
	end;

OnTouch:
	end;

OnInit:
	.@quest_id = atoi( replacestr(strnpcinfo(2), "ep18_", "") );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(" + .@quest_id + ") == 1" );
	end;
}
gw_fild01,89,211,4	duplicate(#ep18_12536)	#ep18_12537	4_POINT_RED,5,5
gw_fild01,347,194,4	duplicate(#ep18_12536)	#ep18_12538	4_POINT_RED,5,5
gw_fild01,230,52,4	duplicate(#ep18_12536)	#ep18_12539	4_POINT_RED,5,5

gw_fild01,242,325,0	script	#wp12536	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	.@quest_id = atoi( replacestr(strnpcinfo(2), "wp", "") );
	if (isbegin_quest(.@quest_id) == 1)
		cloakoffnpcself( "#ep18_" + .@quest_id );
	end;
}
gw_fild01,89,211,0	duplicate(#wp12536)	#wp12537	HIDDEN_WARP_NPC,5,5
gw_fild01,347,194,0	duplicate(#wp12536)	#wp12538	HIDDEN_WARP_NPC,5,5
gw_fild01,230,52,0	duplicate(#wp12536)	#wp12539	HIDDEN_WARP_NPC,5,5
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Clinic Construction. Step 1 + 3 + 4 + 5 (final).
wolfvill,171,253,5	script	Ezekiel#hms01	4_M_RACHMAN2,5,5,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(17507) ) {
	case 0:
		if (isbegin_quest(17506) == 1) {
			if (countitem(999) < 3) {
				mes "[Ezekiel]";
				mes "Anything you can get here, but not just steel. It's difficult to import, and you need a lot of facilities to make steel. I'd like a little favor. Only about three...";
				close;
			}
			mes "[Ezekiel]";
			mes "Steel!! When is steel coming! ... is here. You're here, Adventurer. Is it heavy? Please come here. You are precious, but I can't keep you holding it for one second. Thank you. Thank you for your hard work.";
			next;
			mes "[Ezekiel]";
			mes "When this clinic is completed, we will engraved the name of the adventurer on the cornerstone so that the name of the adventurer will be widely known to newborn babies in the future.";
			next;
			emotion ET_SWEAT, playerattached();
			mes "[Ezekiel]";
			mes "Even if the building disappears over the years, the will of the adventurer will remain forever.";
			next;
			select( "No, it's not necessary..." );
			mes "[Ezekiel]";
			mes "With this steel I will now build a clinic like steel. It won't budge even in the wind and rain.";
			next;
			cloakoffnpcself( "Old man#hms01" );
			cloakoffnpcself( "Old man#hms02" );
			cloakoffnpcself( "Old man#hms03" );
			mes "[Old man]";
			mes "No, what are you doing now?";
			npctalk "Didn't I explain it so you could understand?", "Old man#hms03", bc_self;
			next;
			mes "[Old man]";
			mes "Are you planning to build this clinic? Now?";
			next;
			select( "Old people calm their excitement..." );
			mes "[Old man]";
			mes "What and when were we excited? We're talking with the most ice-cold reason, now!";
			npctalk "We don't have the energy to spend like this!", "Old man#hms02", bc_self;
			next;
			mes "[Ezekiel]";
			mes "Why the hell are you doing this? Are you territorial with new immigrants?";
			next;
			mes "[Old man]";
			mes "Oh, we're not like that.";
			npctalk "What? What?", "Old man#hms03", bc_self;
			next;
			mes "[Ezekiel]";
			mes "Then why are you so opposed?";
			next;
			mes "[Old man]";
			mes "The comfortable life you desire is a trap. The foreign, the comfortable. Those things will ruin us.";
			next;
			mes "[Ezekiel]";
			mes "Comfortable living spaces, decent schools, clean clinics. What can we not enjoy? We have been avoiding discrimination, not convenience.";
			next;
			mes "[Ezekiel]";
			mes "What's wrong with living here anyway, having better facilities?";
			next;
			mes "[Old man]";
			mes "No, well, that's what the migrants want?";
			npctalk "Yes!", "Old man#hms01", bc_self;
			next;
			mes "[Old man]";
			mes "To accustom the body to comfort and to make an uncomfortable life intolerable. Live contentedly in the minimum life they provide.";
			mes "They say that if you protest, they will even take it away.";
			next;
			mes "[Old man]";
			mes "How long do you think we will live here? We have no intention of reclaiming our land!";
			npctalk "I mean!", "Old man#hms03", bc_self;
			next;
			mes "[Old man]";
			mes "What I have now is enough, what more do you need?";
			next;
			mes "[Ezekiel]";
			mes "I'm not doing this out of envy. I'm not bringing it here because it's a migrant style. It's a technology and facility that has developed over time, but you don't understand it!";
			next;
			cloakoffnpcself( "Maram#hms01" );
			cloakoffnpcself( "Villager#hms01" );
			cloakoffnpcself( "Injured#hms01" );
			mes "[Joel]";
			mes "Oh, I'm dying. I'm dying...";
			npctalk "Someone beckons from afar...", "Injured#hms01", bc_self;
			next;
			mes "[Maram]";
			mes "Ezekiel!!! It's a big deal!";
			next;
			mes "[Ezekiel]";
			mes "Maram? Why? What's going on?";
			next;
			mes "[Joel]";
			mes "If I die... my fortune I've saved up...! Take me on a ride. How did you collect it! It's unfair! Maram, you keep an eye on it! Don't let a single stone be stolen!";
			emotion ET_CRY, getnpcid(0,"Injured#hms01");
			next;
			mes "[Maram]";
			mes "No, you won't die. Don't say anything sinister.";
			next;
			mes "[Old man]";
			mes "Why is Joel like this?";
			next;
			mes "[Maram]";
			mes "There was an accident while moving the luggage. I think we need to deal with it quickly. Is it possible, Ezekiel?";
			next;
			mes "[Old man]";
			mes "Oh my gosh, why? One leg is completely disabled.";
			next;
			mes "[Old man]";
			mes "Let's see. Hmm...";
			next;
			mes "[Old man]";
			mes "Move to my house immediately. I can't use my legs, but I'll have to put some medicine on it so it doesn't rot.";
			npctalk "What? My leg is rotting??", "Injured#hms01", bc_self;
			npctalk "Can I have the plaster?", "Maram#hms01", bc_self;
			next;
			mes "[Joel]";
			mes "Me, me, do I have to cut off my legs like the old poplar? That's not okay...! I'm so excited I bought a new work boot...!";
			next;
			mes "[Old man]";
			mes "Are the boots a problem now?";
			next;
			mes "[Joel]";
			mes "...Yes, Maram. I have a favor. Can you find someone who doesn't have a left leg but has a strong right leg? I'm going to sell my right boot to him.";
			mes "Senior, please be as smooth as possible.";
			npctalk "size doesn't matter", "Injured#hms01", bc_self;
			next;
			mes "[Ezekiel]";
			mes "I don't cut my leg. I can cure it.";
			next;
			mes "[Old man]";
			mes "What? Are your legs that shape?";
			next;
			mes "[Old man]";
			mes"How can you fix a leg like that...! Hurry up and cut it off and apply some medicine to prevent infection! Don't waste your time holding on to it...!";
			next;
			mes "[Ezekiel]";
			mes "I'm saying you can do it because you can do it. Everyone please get out of the way.";
			next;
			mes "[Maram]";
			mes "Elderly people, trust me first. Ezekiel may look a little out of place in the eyes of the elderly, but he's pretty good, isn't he?";
			npctalk "I didn't take it for nothing.", "Maram#hms01", bc_self;
			next;
			mes "[Old man]";
			mes "No, time is...!";
			next;
			specialeffect EF_HEALSP, AREA, "Injured#hms01";
			mes "[Ezekiel]";
			mes "Ah... if the equipment was right... I could do it faster... I can't help it.";
			next;
			specialeffect EF_REPAIRWEAPON, AREA, "Injured#hms01";
			mes "[Joel]";
			mes "Aaaaaaaaaaaaaaa I'm dying!!!";
			npctalk "Damn!!!", "Old man#hms01", bc_self;
			npctalk "Isn't that how you catch people?", "Old man#hms02", bc_self;
			npctalk "You must stop these people!!!!", "Old man#hms03", bc_self;
			delitem 999,3;	// Steel
			changequest 17506,17507;
			close;
		}
		if (isbegin_quest(17505) == 1) {
			mes "[Ezekiel]";
			mes "Adventurer, how is it? Can I start the construction?";
			next;
			select( "I told you..." );
			mes "[Ezekiel]";
			mes "Ah, is that so? Still, I'm building it on the outskirts so that it doesn't affect other places as much as possible, but I don't think that's possible either.";
			next;
			mes "[Ezekiel]";
			mes "Still, I can't give up. I'll have to gather like-minded people and prepare to persuade me to come back and talk to them.";
			next;
			mes "[Ezekiel]";
			mes "I thought about doing what they said, but I can't. I don't know anything else, but this is absolutely necessary.";
			next;
			mes "[Ezekiel]";
			mes "So, adventurer, I have a favor.";
			next;
			select( "What's going on?" );
			mes "[Ezekiel]";
			mes "Anything you can get here, but not just steel. It's difficult to import, and you need a lot of facilities to make steel. I'd like a little favor. Only about three...";
			next;
			select( "I'll bring you" );
			mes "[Ezekiel]";
			mes "Thank you for willingly accepting. Until you agree with my work and help me... Then I will be preparing for the construction.";
			changequest 17505,17506;
			close3;
		}
		if (isbegin_quest(17504) == 1) {
			mes "[Ezekiel]";
			mes "<NAVI>Convince the [Old man]<INFO>wolfvill,176,111,0,101,0</INFO></NAVI>. It's a necessary facility.";
			close;
		}
		mes "[Ezekiel]";
		mes "Ezekiel, what wealth and glory did you come here to enjoy. What the hell did you do!";
		next;
		mes "[Ezekiel]";
		mes "No. But living here as me is really living life. Am I a permanent stranger there?";
		next;
		cloakoffnpcself( "Maram#hms01" );
		select( "Who is that...?" );
		mes "[Maram]";
		mes "Shh- wait a minute. Listen to what they have to say. I think you're saying something funny.";
		next;
		mes "[Ezekiel]";
		mes "No, by the way, you are treated like an outsider here as well? Isn't it the same here or there? Then, wouldn't it be better to be more comfortable?";
		mes "Should I just give up and go back?";
		next;
		mes "[Ezekiel]";
		mes "No, but there is something I was aiming for in the beginning. After all, finding my roots...";
		next;
		mes "[Maram]";
		mes "Ezekiel! How are you? What are you muttering to yourself?";
		next;
		mes "[Ezekiel]";
		mes "Maram? Maram?? All right. You know. Listen to me. Busy? Busy, listen to me. Who am I going to tell this to? I don't even have close friends yet. So, listen.";
		npctalk "Okay, okay. I'll listen, so calm down.", "Maram#hms01", bc_self;
		next;
		mes "[Ezekiel]";
		mes "I told you I was going to build a clinic here. I came here and there is no such thing as a decent clinic, so I said I would build one.";
		next;
		mes "[Maram]";
		mes "That's right. That's why I've been looking for a lot of stuff to put in it this time.";
		npctalk "Okay? We'll see about that later. Listen first.", "Ezekiel#hms01", bc_self;
		next;
		mes "[Ezekiel]";
		mes "But, as soon as you open the shovel, the elders here dry you up. They see me as a destroyer of the environment, saying that I have to live in harmony with nature as I did until now. Am I that kind of person?";
		next;
		mes "[Ezekiel]";
		mes "Just building a more sanitary and more modern clinic is such an act of destroying nature and the environment? Can we respond more quickly in case of emergency?";
		next;
		mes "[Maram]";
		mes "No. You're never like that. Everyone else is, but you're never alone.";
		next;
		mes "[Ezekiel]";
		mes "Is that right? But you drove me like that... Am I really trash? I can't do anything right now.";
		next;
		mes "[Maram]";
		mes "If that's the case, talk to Suad. It's too much. It's about wanting everyone to live well together. The clinic isn't against nature. It's true.";
		next;
		mes "[Ezekiel]";
		mes "That's... I've talked to Suad... He said he can't help it and he can't do it on his own.";
		next;
		mes "[Ezekiel]";
		mes "It is necessary to have a clinic, but the opinions of the elderly who have lived here for a long time are that they can't just push it, so they have no choice but to persuade them.";
		next;
		mes "[Maram]";
		mes "I heard that he is too. In any case, you can't ignore the opinions of the elders. It's not like Suad's personality is wielding as much as he wants, ignoring them.";
		next;
		mes "[Ezekiel]";
		mes "So... I... go back to Rachel... what do you think?";
		next;
		mes "[Maram]";
		mes "What? You came all the way here to go back?";
		next;
		mes "[Ezekiel]";
		mes "No, I didn't intend to go back... That's what people are. I came here to live a better life, but if it's the same here or there, wouldn't you want to be more comfortable...";
		next;
		mes "[Ezekiel]";
		mes "So I mean... you're thinking. When did I say I was going to cut it off and go back? Will you not listen to me?";
		next;
		mes "[Maram]";
		mes "Hmm... But I think the clinic is absolutely necessary. How can I persuade you well...";
		next;
		mes "[Maram]";
		mes "Yes! I think an adventurer can help you? Hey, this adventurer is very good at talking? Doesn't it make you believe just by looking at his face? It's just an award that adults will like.";
		next;
		mes "[Maram]";
		mes "He was kind and helped us from purchasing materials to transporting them.";
		next;
		mes "[Ezekiel]";
		mes "You are a good person. You are a good person. You are, but...";
		next;
		mes "[Ezekiel]";
		mes "...really such a person is liked by adults? Very... those... stubborn people.";
		npctalk "You wrap up the word stubbornness well.", "Maram#hms01", bc_self;
		next;
		mes "[Maram]";
		mes "It's only the bottom line. Even if you can't convince you, there's nothing more than listening to a nag? Is that adventurer going to listen to you instead?";
		npctalk "Oh, that's nice?", "Ezekiel#hms01", bc_self;
		next;
		mes "[Ezekiel]";
		mes "Then... Shall I ask you a favor?";
		mes "Adventurer, I have a favor. We need a state-of-the-art clinic here, though not as big as Rachel.";
		next;
		mes "[Ezekiel]";
		mes "Now, if you get hurt or get sick, you have no choice but to rely on folk remedies from ancient times.";
		npctalk "Ah, I know what it is! He put some mysterious plaster on the wound!", "Maram#hms01", bc_self;
		next;
		mes "[Ezekiel]";
		mes "There are medicines and medical tools that Rachel brings in little by little, but they are not enough. There is no suitable environment to use them.";
		next;
		mes "[Ezekiel]";
		mes "However, there is no way for me to convince those who oppose it. So, <NAVI>[Old man]<INFO>wolfvill,176,111,0,101,0</INFO></NAVI> ask an adventurer called the Freepass Award I'll give it to you.";
		next;
		mes "[Maram]";
		mes "Please, please. In the meantime, I will also meet other people.";
		setquest 17504;
		cloakonnpcself( "Maram#hms01" );
		navigateto("wolfvill",176,111);
		close;
	case 1:
		specialeffect EF_PHARMACY_OK, AREA, "Injured#hms01";
		specialeffect EF_HEALSP, AREA, "Injured#hms01";
		mes "[Ezekiel]";
		mes "How do you feel? If you don't overdo it for a while, eat good food, and take a good rest while thinking good thoughts, you will be able to walk or do a light run.";
		next;
		mes "[Joel]";
		mes "Am I alive?? Did I buy?? Is my leg okay??";
		next;
		mes "[Maram]";
		mes "Uh, that's why you're saying that, right?";
		next;
		mes "[Joel]";
		mes "Thank you so much!! You protected my boots! What's your name? I'll take good care of you in the future. You are my benefactor. Yoel will never forget my benefactor. Forever.";
		next;
		mes "[Old man]";
		mes "Hey, how did you save a broken leg?";
		next;
		mes "[Ezekiel]";
		mes "Because that's what I learned. If the clinic had been properly equipped, it would have been a more complete treatment and a faster recovery.";
		next;
		mes "[Old man]";
		mes "Ho... Is everyone doing that these days?";
		next;
		mes "[Ezekiel]";
		mes "That's right. It doesn't damage your legs. As long as you do it properly.";
		next;
		mes "[Old man]";
		mes "You mean you can do that faster and more appropriately if you have a clinic?";
		next;
		mes "[Ezekiel]";
		mes "Yes...? Is it...?";
		next;
		mes "[Old man]";
		mes "Hmm... that's the way it is these days? Adventurers there, really?";
		next;
		select( "Everything is like this these days." );
		mes "[Ezekiel]";
		mes "As I said, it is not the technology of migrants, but the technology and facilities of the advanced age.";
		next;
		mes "[Old man]";
		mes "Hang on, I don't think it's something that you're just going to oppose.";
		npctalk "Looks very useful.", "Old man#hms01", bc_self;
		next;
		mes "[Old man]";
		mes "Is that right? I think so. It's about saving people. If we do it our way, we can save the dead.";
		npctalk "If only the poplar house did this...", "The old man#hms02", bc_self;
		next;
		mes "[Old man]";
		mes "Hmm... that clinic, how long will it take to build it?";
		next;
		mes "[Ezekiel]";
		mes "Yes...? It is, it depends on manpower and capital.";
		next;
		mes "[Old man]";
		mes "We will support you as much as possible. Build it once.";
		npctalk "I'll give it to you anyway.", "Old man#hms03", bc_self;
		next;
		mes "[Old man]";
		mes "Instead, it should fit into the way of life here, to the mood of the place.";
		npctalk "Because old people here have a hard time adapting to new things.", "Old man#hms02", bc_self;
		next;
		mes "[Ezekiel]";
		mes "That's it... I see.";
		next;
		mes "[Maram]";
		mes "Hey, you've taken good care of the elders. This is really necessary. I'm thankful for everything.";
		next;
		mes "[Old man]";
		mes "Is there anything else you need here?";
		next;
		mes "[Old man]";
		mes "What? Will you accept more than a clinic?";
		next;
		mes "[Old man]";
		mes "Can't you feel anything while watching that? As time goes by, you have to live according to the way it flows. You can't be stubborn forever.";
		next;
		mes "[Old man]";
		mes "Well, even if we get back to our homeland, we're not going to live the way we are now. We're already living the way we used to.";
		next;
		mes "[Old man]";
		mes "Hey, young man. If you have anything else important or necessary, tell me. We'll think about it.";
		next;
		mes "[Ezekiel]";
		mes "I will. I will build the clinic as much as possible according to the elders' advice.";
		next;
		mes "[Old man]";
		mes "Yes. You know how long we won't be living here?";
		next;
		mes "[Ezekiel]";
		mes "Yes! I think so.";
		next;
		mes "[Old man]";
		mes "Well then, we can go. You've worked hard today.";
		next;
		cloakonnpcself( "Old man#hms01" );
		cloakonnpcself( "Old man#hms02" );
		cloakonnpcself( "Old man#hms03" );
		mes "[Maram]";
		mes "Take a look!!!";
		mes "Whoa- I'm really happy, right?";
		next;
		mes "[Ezekiel]";
		mes "That's it.. isn't it? But it's so sudden that it's embarrassing??";
		next;
		mes "[Maram]";
		mes "Even the elders have changed their minds after seeing them with their own eyes. I think it's good. Now, then, should we build what we built now?";
		next;
		mes "[Ezekiel]";
		mes "Yeah. But before that, I think we need to change the design to suit this place first.";
		next;
		mes "[Maram]";
		mes "The adventurer will help you, right?";
		next;
		select( "Yeah... that's right..." );
		mes "[Maram]";
		mes "If you have any equipment or tools you need, tell me in advance. I'll bring it to you next time.";
		mes "Joel, let's go and get some rest.";
		next;
		mes "[Joel]";
		mes "Goodbye, my benefactor. I'll be back soon!";
		emotion ET_THROB, getnpcid(0,"Injured#hms01");
		next;
		cloakonnpcself( "Maram#hms01" );
		cloakonnpcself( "Villager#hms01" );
		cloakonnpcself( "Injured#hms01" );
		mes "[Ezekiel]";
		mes "Adventurer, thank you very much for your help. This is what I got while I settled here, I don't need anything... I'll give it to the adventurer. As a sign of wishing you well in the future.";
		next;
		mes "[Ezekiel]";
		mes "Well then, see you next time. Maybe I can ask you a favor, so please stop by often!";
		completequest 17507;
		mes "^4d4dff A favorable rating for you occurs.^000000";
		getitem 1000405,20;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;
		add_reputation_points(REPUTATION_EP18, 100);
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		close;
	case 2:
		break;
	}
	// daily
	switch( checkquest(17509,PLAYTIME) ) {
	case -1:
		break;
	case 0:
	case 1:
		mes "[Ezekiel]";
		mes "Ugh, it's hard. Adventurer, what's going on here. The thing you brought me is under construction... It's dangerous if you're here, so come back after dawn.";
		close;
	case 2:
		erasequest 17509;
		break;
	}
	switch( isbegin_quest(17508) ) {
	case 0:
		mes "[Ezekiel]";
		mes "Hello, adventurer.";
		next;
		select("Is the construction going well?");
		mes "[Ezekiel]";
		mes "Of course. But still we are short of some supplies, such as steel or berry crystals.";
		next;
		mes "[Ezekiel]";
		mes "A lot of crystals are used here. It's very hard, so it's good to use everywhere.";
		next;
		if (select( "I'll save you", "I want to save you..." ) == 2)
			end;
		mes "[Ezekiel]";
		mes "Wow, thank you so much!";
		next;
		mes "[Ezekiel]";
		mes "I would like 1 steel and 10 berry tandan crystals, please. You can get berry tandan crystals from the gray wolf.";
		mes "I'll wait!";
		setquest 17508;
		close;
	case 1:
		if (countitem(999) < 1 || countitem(1000406) < 10) {
			mes "[Ezekiel]";
			mes "I would like 1 steel and 10 berry tandan crystals, please. You can get berry tandan crystals from the gray wolf.";
			mes "I'll wait!";
			close;
		}
		mes "[Ezekiel]";
		mes "Adventurer, you've worked hard. I'm always grateful. I'll take a break today and see you again after dawn!";
		delitem 999,1;	// Steel
		delitem 1000406,10;	// Ep18_Very_Ddan_Crystal
		erasequest 17508;
		setquest 17509;
		add_reputation_points(REPUTATION_EP18, 30);
		if (get_reputation_points(REPUTATION_EP18) >= 5000)
			.@bonus = 1;
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		getitem 1000405,3+.@bonus;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		close;
	case 2:	// impossible
		end;
	}
	end;

OnTouch:
	if (isbegin_quest(17504) == 0 && isbegin_quest(17505) == 0 && isbegin_quest(17506) == 0 && isbegin_quest(17507) == 0)
		npctalk "What wealth and glory did you come here to enjoy. What did you do?", "Ezekiel#hms01", bc_self;
	else if (isbegin_quest(17507) == 1) {
		cloakoffnpcself( "Old man#hms01" );
		cloakoffnpcself( "Old man#hms02" );
		cloakoffnpcself( "Old man#hms03" );
		cloakoffnpcself( "Maram#hms01" );
		cloakoffnpcself( "Villager#hms01" );
		cloakoffnpcself( "Injured#hms01" );
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11724) == 2 && isbegin_quest(17504) == 0 && isbegin_quest(17505) == 0 && isbegin_quest(17506) == 0 && isbegin_quest(17507) == 0" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17505) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17506) == 1 && countitem(999) >= 2" );	// Steel
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17507) == 1" );

	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(17507) == 2 && isbegin_quest(17508) == 0 && (checkquest(17509,PLAYTIME) == -1 || checkquest(17509,PLAYTIME) == 2)" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17508) == 1 && countitem(999) > 0 && countitem(1000406) > 9" );
	end;
}

wolfvill,174,252,3	duplicate(dummy_cloaked_npc)	Maram#hms01	4_EP18_MARAM
wolfvill,175,249,1	duplicate(dummy_cloaked_npc)	Old man#hms01	4_EP18_GW_OLD01
wolfvill,173,247,1	duplicate(dummy_cloaked_npc)	Old man#hms02	4_EP18_GW_OLD02
wolfvill,170,248,7	duplicate(dummy_cloaked_npc)	Old man#hms03	4_EP18_GW_MIDDLE01
wolfvill,170,251,5	duplicate(dummy_cloaked_npc)	Villager#hms01	4_M_RACHMAN1
wolfvill,172,250,1	duplicate(dummy_cloaked_npc)	Injured#hms01	4_M_DIEMAN

// Quest: Clinic Construction. Step 2.
wolfvill,174,111,5	script	Old man#hms05	4_EP18_GW_OLD02,{
	mes "[Old man]";
	mes "If you have any difficulties in life, tell me.";
	close;
}

wolfvill,178,110,3	script	Old man#hms06	4_EP18_GW_MIDDLE01,{
	mes "[Old man]";
	mes "Do you have any questions?";
	close;
}

wolfvill,176,111,3	script	Old man#hms04	4_EP18_GW_OLD01,{
	if (ep18_1_main < 36)
		end;
	if (isbegin_quest(17504) == 1) {
		mes "[Old man]";
		mes "The people who came in this time must also adapt well.";
		next;
		mes "[Old man]";
		mes "We should take another look.";
		next;
		mes "[Old man]";
		mes "I hate it when I visit you too often. Do you think it's the same as ours?";
		next;
		mes "[Old man]";
		mes "Now, if you want to live here in the future, you have to agree. If you follow the rules here, we can all live in harmony. Cancer.";
		next;
		mes "[Old man]";
		mes "Whether it's the same as ours or not, it's easy to get used to if we talk more than once.";
		npctalk "All my peers have adapted like that.", "Old man#hms05", bc_self;
		next;
		select( "I..." );
		mes "[Old man]";
		mes "Who are you? It's a face you haven't seen before?";
		npctalk "Are you new here?", "Old man#hms05", bc_self;
		npctalk "Isn't that right? I don't remember?", "Old man#hms06", bc_self;
		next;
		mes "[Old man]";
		mes "Oh, you've been here again? Haven't you been here recently? Are you able to come often now?";
		next;
		mes "[Old man]";
		mes "Welcome, welcome. If there is anything difficult, please ask.";
		next;
		mes "[Old man]";
		mes "Everyone here doesn't bother with that, so feel free to ask.";
		next;
		select( "I came to the clinic for a problem..." );
		mes "[Old man]";
		mes "What? Clinic? It's probably not the same clinic you used to do, right?";
		npctalk "That's right. Anything other than that.", "Old man#hms05", bc_self;
		next;
		mes "[Old man]";
		mes "I think I spoke well to everyone at the time. You don't need to build a clinic, don't build it.";
		next;
		mes "[Old man]";
		mes "It is enough to treat now, and you can do it in an existing place like now.";
		next;
		mes "[Old man]";
		mes "Isn't everyone living like this without them?";
		next;
		select( "Because medical facilities are important" );
		mes "[Old man]";
		mes "No, what? So it's because we don't care? Are we short?";
		npctalk "We're not being grumpy for no reason.", "Old man#hms06", bc_self;
		next;
		mes "[Old man]";
		mes "We know that it's good. It's comfortable and it's good. But it's because you don't have to get used to it.";
		next;
		mes "[Old man]";
		mes "Once we become accustomed to the lives of migrants, we end up getting immersed in them and later we will not be able to live without their convenience.";
		npctalk "That's what those who occupy our land want.", "Old man#hms05", bc_self;
		next;
		mes "[Old man]";
		mes "Cancer. Just being here is enough, you shouldn't lean on it. That's losing.";
		next;
		select( "But it's a necessary facility." );
		mes "[Old man]";
		mes "Well, so far we haven't had enough. If it wasn't enough, we wouldn't have survived here for so long.";
		next;
		mes "[Old man]";
		mes "I think that's the case. I didn't understand you even though you talked well.";
		next;
		mes "[Old man]";
		mes "If you're going to live here from now on, you'd better forget all the life over there as soon as possible.";
		next;
		mes "[Old man]";
		mes "The sooner you adjust to life here, the better off you are.";
		next;
		select( "I'm not... I'm not here..." );
		mes "[Old man]";
		mes "What? It's not even from here? How can a foreigner be meddling like this?";
		next;
		mes "[Old man]";
		mes "Calm down. It can be. You helped the kids, so don't be angry.";
		next;
		mes "[Old man]";
		mes "As for the clinic case, we'll go to <NAVI>[he]<INFO>wolfvill,171,253,0,101,0</INFO></NAVI> and talk to him one more time, so I hope outsiders get out of this business. ";
		erasequest 17504;
		setquest 17505;
		navigateto("wolfvill",171,253);
		close;
	}
	mes "[Old man]";
	mes "I'll have to go to the newcomers.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(17504) == 1" );
	end;
}
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Checking Traps for Food. Step 1 + 3 (final).
wolfvill,197,170,5	script	Larama#ep18	4_M_DESERT,{
	if (rand(2))
		mes "He is busy sharpening his knife, so I call, but there is no answer.";
	else {
		mes "[Larama]";
		mes "Ah~ I'm busy right now. I'll talk later.";
	}
	close;
}

wolfvill,202,166,3	script	Eruin#ep18	4_F_SHABBY,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(8688) ) {
	case 0:
		mes "[Eruin]";
		mes "...they said an adventurer came.";
		mes "Looking around, looking for something to do?";
		next;
		if (select( "yes", "no" ) == 2)
			end;
		mes "[Eruin]";
		mes "I am in charge of livestock and wildlife observation with Larama and her family over there.";
		mes "It's my job to maintain knives and other cutlery.";
		npctalk "Take care of Grandma Eruin~!", "Larama#ep18", bc_self;
		next;
		mes "[Eruin]";
		mes "...Hehehe.";
		npctalk "Hehehe.", "Larama#ep18", bc_self;
		next;
		mes "[Eruin]";
		mes "Any job worth entrusting to an outsider is just checking out the traps we've set up this morning.";
		mes "Can you do it?";
		next;
		select("It's not that difficult" );
		mes "[Eruin]";
		mes "It's good that the answer is quick.";
		mes "...";
		next;
		setquest 8688;
		mes "[Eruin]";
		mes "<NAVI>[Grey Wolf Forest]<INFO>gw_fild01,25,101,0,101,0</INFO></NAVI> If you look here and there, you will find several traps.";
		mes "If there is something hanging, please collect about 5.";
		mes "If you leave the remaining bait alone, it will catch something again, so you'll have to wait and see.";
		next;
		mes "[Eruin]";
		mes "Please do your best.";
		close;
	case 1:
		.@trap01 = countitem(1000412);
		.@trap02 = countitem(1000413);
		.@trap03 = countitem(1000414);
		if ((.@trap01 + .@trap02 + .@trap03) < 5) {
			mes "[Eruin]";
			mes "<NAVI>[Grey Wolf Forest]<INFO>gw_fild01,25,101,0,101,0</INFO></NAVI> I'd like to collect 5 or so of the traps.";
			close;
		}
		if (.@trap01 > 0)
			delitem 1000412, .@trap01;
		if (.@trap02 > 0)
			delitem 1000413, .@trap02;
		if (.@trap03 > 0)
			delitem 1000414, .@trap03;

		completequest 8688;
		setquest 8689;
		getitem 1000405,20;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;
		mes "^4d4dff A favorable rating for you occurs.^000000";
		add_reputation_points(REPUTATION_EP18, 100);
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		next;
		mes "[Eruin]";
		mes "...Okay. Good job.";
		mes "If you are free enough to be here tomorrow as well, can I ask you again?";
		next;
		if (select( "Okay", "I think I'll be busy tomorrow" ) == 2)
			end;
		mes "[Eruin]";
		mes "That's good.";
		mes "He does not refuse help. Thank you.";
		close;
	case 2:
		break;
	}

	// daily
	switch( checkquest(8689,PLAYTIME) ) {
	case -1:
		break;
	case 0:
	case 1:
		mes "[Eruin]";
		mes "Go back and rest today.";
		close;
	case 2:
		erasequest 8689;
		break;
	}
	switch( isbegin_quest(8690) ) {
	case 0:
		mes "[Eruin]";
		mes "Are you here? It looks like you're taking a break from looking around again.";
		next;
		switch( select( "go to investigate the trap", "talk", "stop" ) ) {
		case 1:
			break;
		case 2:
			end;
		case 3:
			end;
		}
		mes "[Eruin]";
		mes "If you help me, I have a lot of other things to do, so I'd appreciate it.";
		mes "<NAVI>[Grey Wolf Forest]<INFO>gw_fild01,25,101,0,101,0</INFO></NAVI> If you look here and there, you will find several traps.";
		mes "If there is something hanging, please bring back 5 of them.";
		next;
		if (select( "accept", "reject" ) == 2)
			end;
		setquest 8690;
		mes "[Eruin]";
		mes "If you leave the remaining bait alone, it will catch something again, so you'll have to wait and see.";
		mes "Please do your best.";
		close;
	case 1:
		.@trap01 = countitem(1000412);
		.@trap02 = countitem(1000413);
		.@trap03 = countitem(1000414);
		if ((.@trap01 + .@trap02 + .@trap03) < 5) {
			mes "[Eruin]";
			mes "<NAVI>[Grey Wolf Forest]<INFO>gw_fild01,25,101,0,101,0</INFO></NAVI> I'd like to collect 5 or so of the traps.";
			close;
		}
		if (.@trap01 > 0)
			delitem 1000412, .@trap01;
		if (.@trap02 > 0)
			delitem 1000413, .@trap02;
		if (.@trap03 > 0)
			delitem 1000414, .@trap03;

		erasequest 8690;
		setquest 8689;
		add_reputation_points(REPUTATION_EP18, 30);
		if (get_reputation_points(REPUTATION_EP18) >= 5000)
			.@bonus = 1;
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		getitem 1000405,3+.@bonus;	// Ep18_Amethyst_Fragment
		getexp 18252408,2000000;
		mes "[Eruin]";
		mes "...Okay. Good job.";
		mes "If you are free enough to be here tomorrow as well, can I ask you again?";
		next;
		if (select( "Okay", "I think I'll be busy tomorrow" ) == 2)
			end;
		mes "[Eruin]";
		mes "That's good.";
		mes "He does not refuse help. Thank you.";
		close;
	case 2:	// impossible
		end;
	}
	end;

OnInit:
	// note: the questinfo on official is never removed except by PLAYTIME == 1
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11724) == 2 && isbegin_quest(8688) == 0" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8688) == 1" );

	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(8688) == 2 && isbegin_quest(8690) == 0 && (checkquest(8689,PLAYTIME) == -1 || checkquest(8689,PLAYTIME) == 2)" );
	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(8690) == 1" );
	
	// questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(11724) == 2 && isbegin_quest(8688) == 0" );
	// questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8688) == 1 && (countitem(1000412)+countitem(1000413)+countitem(1000414)) > 4" );
	// questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(8688) == 2 && isbegin_quest(8690) == 0 && (checkquest(8689,PLAYTIME) == -1 || checkquest(8689,PLAYTIME) == 2)" );
	// questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8690) == 1 && (countitem(1000412)+countitem(1000413)+countitem(1000414)) > 4" );
	end;
}

// Quest: Checking Traps for Food. Step 2.
gw_fild01,24,122,0	script	Installed trap#01	CLEAR_NPC,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 36)
		end;
	if (isbegin_quest(8688) == 1 || isbegin_quest(8690) == 1) {
		.@amount = countitem(1000412) + countitem(1000413) + countitem(1000414);
		if (.@amount >= 5) {
			mes "Today we have recovered enough of the traps.";
			mes "Let's bring it to <NAVI>[Eruin]<INFO>wolfvill,202,166,0,101,0</INFO></NAVI>";
			close;
		}
		specialeffect2 EF_STEAL;
		progressbar "FFFF00",10;
		.@r = rand(1,5);
		if (.@r == 1)
			getitem 1000412,1;	// Ep18_Trapped01
		else if (.@r == 2)
			getitem 1000413,1;	// Ep18_Trapped02
		else if (.@r == 3)
			getitem 1000414,1;	// Ep18_Trapped03
		else
			mes "I didn't get anything...";
		disablenpc strnpcinfo(0);
		initnpctimer;
		end;
	}
	end;
OnTimer60000:
	enablenpc strnpcinfo(0);
	stopnpctimer;
	end;

OnInit:
	questinfo( QTYPE_CLICKME, QMARK_YELLOW, "isbegin_quest(8688) == 1" );
	questinfo( QTYPE_CLICKME, QMARK_YELLOW, "isbegin_quest(8690) == 1" );
	end;
}
gw_fild01,93,113,0	duplicate(Installed trap#01)	Installed trap#02	CLEAR_NPC
gw_fild01,106,126,0	duplicate(Installed trap#01)	Installed trap#03	CLEAR_NPC
gw_fild01,213,130,0	duplicate(Installed trap#01)	Installed trap#04	CLEAR_NPC
gw_fild01,267,156,0	duplicate(Installed trap#01)	Installed trap#05	CLEAR_NPC
gw_fild01,229,205,0	duplicate(Installed trap#01)	Installed trap#06	CLEAR_NPC
gw_fild01,192,210,0	duplicate(Installed trap#01)	Installed trap#07	CLEAR_NPC
gw_fild01,153,212,0	duplicate(Installed trap#01)	Installed trap#08	CLEAR_NPC
gw_fild01,121,245,0	duplicate(Installed trap#01)	Installed trap#09	CLEAR_NPC
gw_fild01,86,327,0	duplicate(Installed trap#01)	Installed trap#10	CLEAR_NPC
gw_fild01,126,356,0	duplicate(Installed trap#01)	Installed trap#11	CLEAR_NPC
gw_fild01,175,339,0	duplicate(Installed trap#01)	Installed trap#12	CLEAR_NPC
gw_fild01,192,361,0	duplicate(Installed trap#01)	Installed trap#13	CLEAR_NPC
gw_fild01,232,319,0	duplicate(Installed trap#01)	Installed trap#14	CLEAR_NPC
gw_fild01,257,297,0	duplicate(Installed trap#01)	Installed trap#15	CLEAR_NPC
gw_fild01,249,245,0	duplicate(Installed trap#01)	Installed trap#16	CLEAR_NPC
gw_fild01,303,276,0	duplicate(Installed trap#01)	Installed trap#17	CLEAR_NPC
gw_fild01,325,254,0	duplicate(Installed trap#01)	Installed trap#18	CLEAR_NPC
gw_fild01,335,241,0	duplicate(Installed trap#01)	Installed trap#19	CLEAR_NPC
gw_fild01,308,318,0	duplicate(Installed trap#01)	Installed trap#20	CLEAR_NPC
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Firewind Kites. Step 1 + 2 + 3 (final).
wolfvill,147,97,5	script	Ahir#ep18	4_M_DST_CHILD,3,3,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 36)
		end;
	if (isbegin_quest(16548) != 2) {
		switch( checkquest(16548,HUNTING) ) {
		case -1:
			mes "[Ahir]";
			mes "Ha-am... Huh? Someone I haven't seen. Are you a new member of the Gray Wolf Village?";
			mes "Ahhh...";
			next;
			select( "Did you not sleep well at night?" );
			mes "[Ahir]";
			mes "Yes, I haven't slept.";
			mes "Ha-a-am in the forest of gray wolves, when you lie down to sleep, you can hear all kinds of noises.";
			next;
			mes "[Ahir]";
			mes "The sound of bugs, the sound of adults talking, the sound of animals...";
			mes "The most disturbing thing is the sounds of all kinds of monsters.";
			next;
			mes "[Ahir]";
			mes "Huam Among them, the sound of a kite chirping is the scariest.";
			mes "Even adults are worried about when the fire will come and burn the whole village.";
			next;
			mes "[Ahir]";
			mes "It's really scary to cry with a suppressed voice with an embers in your mouth...";
			mes "Ugh, my body is shaking just thinking about it.";
			next;
			select( "I'm an adventurer, would you like me to hunt?" );
			mes "[Ahir]";
			mes "Wow! Were you an adventurer?";
			mes "Then I'll be sure to ask!";
			next;
			mes "[Ahir]";
			mes "Can't you just catch 30 " + strmobinfo(1,21306) + "?";
			mes "If you hunt a herd, the " + strmobinfo(1,21306) + " may be holding their breath tonight.";
			next;
			switch( select( "Leave it to me!", "Oops, I'm in trouble now." ) ) {
			case 1:
				mes "[Ahir]";
				mes "wow, thank you. Adventurer!";
				mes "30 fire and wind kites. I'll be sure to ask for it.";
				next;
				mes "[Ahir]";
				mes "If you come back from hunting and tell me, I will prepare even a small reward!";
				setquest 16548;
				close;
			case 2:
				end;
			}
		case 0:
		case 1:
			mes "[Ahir]";
			mes "Thank you. Adventurer! Thirty " + strmobinfo(1,21306) + ". I'll be sure to ask for it.";
			close;
		case 2:
			mes "[Ahir]";
			mes "Thank you! The chirping sound of the windstorm kite has definitely been reduced!";
			mes "I can sleep comfortably tonight.";
			next;
			mes "[Ahir]";
			mes "Okay, it probably won't last long.";
			mes "It will increase again tomorrow, but I hope you will come again after dawn and catch a " + strmobinfo(1,21306) + ".";
			next;
			mes "[Ahir]";
			mes "This is a thank you for letting me sleep well tonight.";
			mes "Please accept even a small heart, adventurer.";
			completequest 16548;
			setquest 16550;
			getitem 1000405,20;	// Ep18_Amethyst_Fragment
			getexp 7769124,3000000;
			mes " ";
			mes "^4d4dff A favorable rating for you occurs.^000000";
			add_reputation_points(REPUTATION_EP18, 100);
			if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
				ep18_1_main = 37;
				setquest 18082;
				mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
				mes "You are eligible to participate in the ^4d4dff conference.^000000";
			}
			close;
		}
	}
	switch( checkquest(16550,PLAYTIME) ) {
	case -1:
		break;
	case 0:
	case 1:
		mes "[Ahir]";
		mes "It looks like the " + strmobinfo(1,21306) + " is still lurking.";
		mes "If you provoke me now, it might be more noisy because of evil.";
		next;
		mes "[Ahir]";
		mes "Will you come back after dawn and catch a " + strmobinfo(1,21306) + "?";
		mes "I beg you, Adventurer.";
		close;
	case 2:
		erasequest 16550;
		break;
	}
	switch( checkquest(16549,HUNTING) ) {
	case -1:
		mes "[Ahir]";
		mes "Ha-am, I'm so sleepy today.";
		mes "Adventurer, won't you just catch 30 " + strmobinfo(1,21306) + "?";
		next;
		mes "[Ahir]";
		mes "If you hunt a pack, the " + strmobinfo(1,21306) + " will be holding their breath tonight.";
		next;
		switch( select( "Hold it", "Do not grab it" ) ) {
		case 1:
			mes "[Ahir]";
			mes "Wow, thank you. Adventurer!";
			mes "30 " + strmobinfo(1,21306) + ". I'll be sure to ask for it.";
			next;
			mes "[Ahir]";
			mes "If you come back from hunting and tell me, I will prepare even a small reward!";
			setquest 16549;
			close;
		case 2:
			end;
		}
		end;
	case 0:
	case 1:
		mes "[Ahir]";
		mes "Thank you. Adventurer! Thirty " + strmobinfo(1,21306) + ". I'll be sure to ask for it.";
		close;
	case 2:
		mes "[Ahir]";
		mes "Thank you! The chirping sound of the windstorm kite has definitely been reduced!";
		mes "I can sleep comfortably tonight.";
		next;
		mes "[Ahir]";
		mes "Okay, it probably won't last long.";
		mes "It will increase again tomorrow, but I hope you will come again after dawn and catch a " + strmobinfo(1,21306) + ".";
		next;
		mes "[Ahir]";
		mes "This is a thank you for letting me sleep well tonight.";
		mes "Please accept even a small heart, adventurer.";
		erasequest 16549;
		setquest 16550;
		add_reputation_points(REPUTATION_EP18, 30);
		if (get_reputation_points(REPUTATION_EP18) >= 5000)
			.@bonus = 1;
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		getitem 1000405,3+.@bonus;	// Ep18_Amethyst_Fragment
		getexp 10318080,3000000;
		close;
	}
	end;

OnTouch_:
	npctalk "Ahir: I'm sleepy... so tired.", "", bc_self;
	end;

OnInit:
	// first completion
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "checkquest(16548,HUNTING) == -1 && isbegin_quest(11724) == 2" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "checkquest(16548,HUNTING) == 2" );

	// daily
	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(16548) == 2 && checkquest(16549,HUNTING) == -1 && (checkquest(16550,PLAYTIME) == -1 || checkquest(16550,PLAYTIME) == 2)" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "checkquest(16549,HUNTING) == 2" );
	end;
}
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Childhood Friends. Step 1.
wolfvill,182,82,5	script	Alber#ep18	4_M_RACHMAN1,{
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(8718) ) {
	case 0:
		mes "[Alber]";
		mes "If you ever want to go back to Rachel, won't you do one thing for me?";
		next;
		mes "[Alber]";
		mes "To be honest... I have a friend of mine who worked as a waitress at Rachel's hotel.";
		mes "If you haven't come here yet, you're probably still working there.";
		next;
		mes "[Alber]";
		mes "Me and my friend... Horim has lived next door since childhood.";
		mes "I used to live in Rachel. But, I just couldn't stand it...";
		next;
		mes "[Alber]";
		mes "Their family and my family decided to knit Rachel.";
		mes "But Horimman said he would stay with Rachel.";
		mes "We couldn't delay any longer, so we left him and moved here.";
		next;
		mes "[Alber]";
		mes "Rachel is a big city, but now she is alone.";
		mes "...";
		mes "If it's okay with you, can you stop by and see how you live?";
		next;
		switch( select( "I do", "I don't have time to go" ) ) {
		case 1:
			mes "[Alber]";
			mes "Thank you";
			mes "Just... stop by. You don't have to report to me.";
			setquest 8718;
			navigateto("ra_in01",388,59);
			close;
		case 2:
			end;
		}
		end;
	case 1:
		mes "[Alber]";
		mes "You don't have to report to me.";
		mes "You only need to check that Horim is doing well.";
		close;
	case 2:
		mes "[Alber]";
		mes "Has he met the boy?";
		mes "Yes.";
		mes "...yes.";
		mes "I said everything I couldn't say when I left.";
		mes "Now I have no regrets left.";
		next;
		mes "[Alber]";
		mes "It feels like a gray forest is shining.";
		mes "I can't.";
		mes "All adventurers, thanks to you.";
		mes "Thank you.";
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8718) == 0 && isbegin_quest(11724) == 2" );
	end;
}

// Quest: Childhood Friends. Step 2.
ra_in01,386,44,0	script	#ep18w01_	HIDDEN_WARP_NPC,2,2,{
	end;
OnTouch:
	if (isbegin_quest(8718) == 1) {
		cloakoffnpcself( "Employee#ep1800" );
		cloakoffnpcself( "Employee#ep1801" );
	}
	end;
}	

ra_in01,388,59,5	script(CLOAKED)	Employee#ep1800	4_M_RACHMAN2,{
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(8718) ) {
	case 0:
		end;
	case 1:
		mes "[Employee]";
		mes "...!";
		mes "Adventurer, you smell of volcanic ash.";
		mes "Thor Volcano... No.";
		next;
		mes "The employee looked around for a moment and spoke in a low voice.";
		next;
		mes "[Employee]";
		mes "Maybe the road to the gray wolf forest...";
		next;
		switch( select( "I know", "I don't know" ) ) {
		case 1:
			mes "[Employee]";
			mes "...can you guide me there?";
			mes "Really... I really want to go there.";
			next;
			mes "[Employee]";
			mes "I know it's a dangerous road. I'm not an adventurer...";
			mes "But I really have no way to get there.";
			next;
			mes "[Employee]";
			mes "My friends and family said they were leaving, so I told them to hold on a bit longer...";
			mes "I thought I was going to get in the way, so they all ran away one night.";
			mes "Then, of course, the news was cut off...";
			next;
			mes "[Employee]";
			mes "Please take me there";
			mes "I don't have anyone anymore";
			next;
			select( "Something went wrong?" );
			mes "He smiled bitterly, not yet finished introducing himself.";
			next;
			mes "[Employee]";
			mes "That's right, what am I talking about to someone I've never met?";
			mes "My name is Horim.";
			mes "The Adventurer is...";
			mes "" + strcharinfo(0) + "Your name?";
			next;
			mes "[Horim]";
			mes "So... " + strcharinfo(0) + "Sir.";
			mes "Once you've been there, it means that you know the current situation <B>we</B> are in.";
			next;
			mes "[Horim]";
			mes "It was better than now until my family left.";
			mes "It doesn't look any different now and then...";
			next;
			mes "[Horim]";
			mes "Now... it looks fine on the outside. There are various policies. But inside, it's stinky...";
			mes "When I go out on the street, it's hard to even hear laughter. It's like someone is cursing me or us.";
			mes "I can't stand it anymore...";
			next;
			select( "Once started..." );
			mes "[" + strcharinfo(0) + "]";
			mes "Started once, twice or three times the same.";
			next;
			mes "[Horim]";
			mes "...Thank you. Thank you so much...";
			next;
			mes "Horim barely squeezed a word of thanks and sighed in relief.";
			next;
			npctalk "Employee: Yes~", "Employee#ep1801", bc_self;
			mes "[Horim]";
			mes "...I'm sorry. I'm a little busy right now, so I guess I'll have to go.";
			next;
			mes "[Horim]";
			mes "See you later, outside Rachel's West Gate.";
			completequest 8718;
			setquest 8698;
			cloakonnpcself( "Employee#ep1800" );
			cloakonnpcself( "Employee#ep1801" );
			close;
		case 2:
			end;
		}
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8718) == 1" );
	end;
}

ra_in01,388,63,5	duplicate(dummy_cloaked_npc)	Employee#ep1801	4_M_03

// Quest: Childhood Friends. Step 3.
ra_fild11,355,226,0	script	#ep18w02__	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch:
	if (isbegin_quest(8698) == 1)
		cloakoffnpcself( "Horim#ep1810" );
	end;
}

ra_fild11,350,236,0	script	#Horim01	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch:
	if (isbegin_quest(8698) == 1)
		cloakoffnpcself( "Horim#ep1810" );
	end;
}

ra_fild11,350,236,3	script(CLOAKED)	Horim#ep1810	4_M_RACHMAN2,{
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(8698) ) {
	case 0:
		end;
	case 1:
		mes "[Horim]";
		mes "...Oh, adventurer.";
		mes "Actually I've never been farther from the city than here.";
		next;
		mes "[Horim]";
		mes "Then where is my hometown?";
		mes "Is it Rachel?";
		next;
		mes "[Horim]";
		mes "If you have never felt comfortable wherever you are...";
		mes "Is it right to leave Rachel...?";
		next;
		mes "[Horim]";
		mes "...that was too long.";
		mes "Which direction is it from here?";
		mes "I will follow you wherever you go.";
		navigateto("ra_fild10",375,293);
		changequest 8698,8699;
		cloakonnpcself( "Horim#ep1810" );
		next;
		mes "Let's head back to the gray wolf forest.";
		navigateto("ra_fild10",375,293);
		close;
	case 2:
		end;
	}
	end;
OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8698) == 1" );
	end;
}

// Quest: Childhood Friends. Step 4.
ra_fild10,375,293,0	script	#Horim02	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch:
	if (isbegin_quest(8699) == 1)
		cloakoffnpcself( "Horim#ep1811" );
	end;
}

ra_fild10,379,282,0	script	#Horim03	HIDDEN_WARP_NPC,3,3,{
	end;
OnTouch:
	if (isbegin_quest(8699) == 1)
		cloakoffnpcself( "Horim#ep1811" );
	end;
}

ra_fild10,375,293,5	script(CLOAKED)	Horim#ep1811	4_M_RACHMAN2,5,5,{
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(8699) ) {
	case 0:
		end;
	case 1:
		mes "[Horim]";
		mes "Adventurer, wait a minute.";
		mes "Where are you here?";
		next;
		mes "[Horim]";
		mes "I looked back and Rachel... I saw the wall too far away.";
		mes "How much more do I have to go?";
		next;
		mes "[Horim]";
		mes "...";
		mes "Is this not even halfway here?";
		next;
		mes "[Horim]";
		mes "Is the road rough?";
		mes "Is your family doing well?";
		next;
		mes "[Horim]";
		mes "Are your friends doing well?";
		mes "Is it okay if I go?";
		navigateto("oz_dun01",285,170);
		changequest 8699,8700;
		cloakonnpcself( "Horim#ep1811" );
		next;
		mes "Let's head back to the gray wolf forest.";
		close;
	case 2:
		end;
	}
	end;

OnTouch:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8699) == 1" );
	end;
}

// Quest: Childhood Friends. Step 5.
oz_dun01,285,169,0	script	#ep18w04	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch:
	if (isbegin_quest(8700) == 1)
		cloakoffnpcself( "Horim#ep1812" );
	end;
}

oz_dun01,285,170,5	script	Horim#ep1812	4_M_RACHMAN2,{
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(8700) ) {
	case 0:
		end;
	case 1:
		mes "[Horim]";
		mes "I've never seen a landscape like this.";
		next;
		mes "[Horim]";
		mes "You must have always seen something like this.";
		next;
		mes "[Horim]";
		mes "What kind of landscape is that place?";
		mes "I heard rumors that life was not so comfortable.";
		next;
		mes "[Horim]";
		mes "But...";
		next;
		mes "[Horim]";
		mes "This road is nice";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "This way?";
		next;
		mes "[Horim]";
		mes "There are a lot of monsters, so I can't come alone...";
		mes "Isn't it strange that Adventurer-nim has traveled so much now?";
		next;
		mes "[Horim]";
		mes "It's okay, I'm confident in my chores.";
		mes "Because it was my job to work hard.";
		next;
		mes "[Horim]";
		mes "Let's go";
		navigateto("gw_fild01",272,342);
		changequest 8700,8701;
		cloakonnpcself( "Horim#ep1812" );
		next;
		mes "Let's head back to the gray wolf forest.";
		close;
	case 2:
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8700) == 1" );
	end;
}

// Quest: Childhood Friends. Step 6.
gw_fild01,272,342,0	script	#Horim04	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch:
	if (isbegin_quest(8701) == 1) {
		cloakoffnpcself( "Horim#ep1813" );
		navigateto("ra_fild11",358,229);
	}
	end;
}
gw_fild01,275,338,0	duplicate(#Horim04)	#ep18w04_	HIDDEN_WARP_NPC,4,4

gw_fild01,272,342,5	script(CLOAKED)	Horim#ep1813	4_M_RACHMAN2,{
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(8701) ) {
	case 0:
		end;
	case 1:
		mes "[Horim]";
		mes "The ash smell has changed.";
		next;
		mes "[Horim]";
		mes "Do you remember what I said when I first met Adventurer?";
		mes "Thor Volcano and Volcanic Ash smell different.";
		next;
		mes "[Horim]";
		mes "That's... I've never been outside, but sometimes the guests who come to my work smell it.";
		mes "Obviously they came from Thor Volcano who hid some weapon...";
		next;
		mes "[Horim]";
		mes "How did you know you hid the weapon?";
		mes "They don't see our employees anyway.";
		next;
		mes "[Horim]";
		mes "Sometimes at dinner, we talk about some sort of secret as if we really can't see it.";
		mes "Even if you don't listen, you can hear a word or two.";
		next;
		mes "[Horim]";
		mes "Of course, it's a really important story, but I won't say it in such a place.";
		next;
		mes "[Horim]";
		mes "But there are people who have a slightly different smell of ash.";
		mes "People like me... people.";
		next;
		mes "[Horim]";
		mes "Can I smell that too?";
		mes "...";
		next;
		mes "[Horim]";
		mes "...let's go";
		navigateto("gw_fild01",36,99);
		changequest 8701,8702;
		cloakonnpcself( "Horim#ep1813" );
		next;
		mes "Let's head back to the gray wolf village.";
		close;
	case 2:
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8701) == 1" );
	end;
}

// Quest: Childhood Friends. Step 7.
gw_fild01,36,99,0	script	#HorimF	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch:
	if (isbegin_quest(8702) == 1) {
		cloakoffnpcself( "Horim#ep1814" );
		navigateto("ra_fild11",358,229);
	}
	end;
}

gw_fild01,36,99,5	script(CLOAKED)	Horim#ep1814	4_M_RACHMAN2,{
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(8702) ) {
	case 0:
		end;
	case 1:
		mes "[Horim]";
		mes "Let's take a break here...";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Where?";
		next;
		mes "[Horim]";
		mes "There are logs...";
		next;
		mes "[Gatekeeper]";
		mes "Hello?";
		next;
		mes "[Horim]";
		mes "Hello...";
		next;
		mes "[Horim]";
		mes "Does it seem difficult to live there?";
		next;
		select( "Don't worry too much" );
		mes "[" + strcharinfo(0) + "]";
		mes "I don't think you need to worry too much.";
		next;
		mes "[Horim]";
		mes "I will.";
		mes "Already I...";
		mes "I left Rachel.";
		next;
		mes "[Horim]";
		mes "...";
		next;
		select( "Reason for leaving" );
		mes "[" + strcharinfo(0) + "]";
		mes "You said that all your friends and family went away and followed you?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Then why do I need to think again?";
		next;
		mes "[Horim]";
		mes "The Adventurer is...";
		mes "That's right. Is there a place you must go back to?";
		mes "Once upon a time, many adventurers who came to my place of work did not.";
		next;
		mes "[Horim]";
		mes "But I need a place to return to.";
		mes "A place to go to sleep after telling everyone to sleep well.";
		next;
		mes "[Horim]";
		mes "Not because I'm lonely...";
		mes "...";
		next;
		mes "Horim swallowed while trying to say something.";
		next;
		mes "[Horim]";
		mes "There are those kinds of people.";
		next;
		mes "[Horim]";
		mes "...let's go";
		next;
		mes "[Gatekeeper]";
		mes "Are you coming to town?";
		next;
		mes "[Horim]";
		mes "?";
		next;
		mes "[Gatekeeper]";
		mes "I've heard of it. If you're the one who brought it here, you'd believe it. Go inside.";
		next;
		mes "[Horim]";
		mes "Yes?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "This is the entrance.";
		mes "Go in.";
		changequest 8702,8703;
		close2;
		warp "wolfvill",270,26;
		end;
	case 2:
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8702) == 1" );
	end;
}

// Quest: Childhood Friends. Step 8 (final).
wolfvill,271,26,0	script	#HorimG	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch_:
	if (isbegin_quest(8703) == 1)
		cloakoffnpcself( "Horim#ep1815" );
	end;
}

wolfvill,266,26,5	script(CLOAKED)	Horim#ep1815	4_M_RACHMAN2,{
	if (checkweight(1000405,20) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 36)
		end;
	switch( isbegin_quest(8703) ) {
	case 0:
		end;
	case 1:
		mes "[" + strcharinfo(0) + "]";
		mes "Here.";
		next;
		mes "[Horim]";
		mes "...";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Are you disappointed?";
		next;
		mes "[Horim]";
		mes "No.";
		next;
		mes "[Horim]";
		mes "...I will find my family.";
		mes "Somewhere here?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "I'm glad I didn't forsake you.";
		mes "You'll be welcome because you're good at doing your best.";
		next;
		mes "[Horim]";
		mes "Whoops...";
		next;
		mes "[Horim]";
		mes "Thank you";
		next;
		mes "[Horim]";
		mes "Thank you so much!";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Now then, can I go?";
		next;
		mes "[Horim]";
		mes "Yes.";
		mes "Tonight... after a long time I can tell everyone good night.";
		next;
		mes "[Horim]";
		mes "Blessed be the adventurer's journey ahead...";
		completequest 8703;
		getitem 1000405,20;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;
		mes "^4d4dff A favorable rating for you occurs.^000000";
		add_reputation_points(REPUTATION_EP18, 100);
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		next;
		close2;
		cloakonnpcself( "Horim#ep1815" );
		end;
	case 2:
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(8703) == 1" );
	end;
}
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Helping the Children. Step 1.
rachel,38,44,3	script	Samaritan#ep18	4_M_CHILD1,{
	if (BaseLevel < 170)
		end;
	if (isbegin_quest(16581) == 0) {
		mes "[Samaritan]";
		mes "Niman, I'm thirsty. Can you get me some water? Your house is the closest here.";
		next;
		mes "[Kar]";
		mes "Do you have anything to eat at home? If not, buy me some dried fruits.";
		mes "Only me, you're nice.";
		next;
		mes "[Naiman]";
		mes "I don't have anything to eat";
		mes "I have no money.";
		next;
		mes "[Lucky]";
		mes "Hey, where's the house without food?";
		mes "It's because we don't want to give it to you.";
		next;
		mes "[Samaritan]";
		mes "It's a disappointment, only my age.";
		mes "I thought you were a good boy";
		next;
		mes "[Naiman]";
		mes "Oh no!";
		mes "There is water, so go and get some water.";
		next;
		mes "[Samaritan]";
		mes "Okay. Water must be scarce. Where can we get something?";
		mes "You pay money to buy water, but you say you don't have money in your house.";
		setquest 16581;
		close;
	}
	mes "[Samaritan]";
	mes "Oh, I'm hungry and thirsty after playing.";
	mes "I wish I could sit somewhere cool and eat iced tea and dried fruits.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16581) == 0" );
	end;
}

// Quest: Helping the Children. Step 2.
rachel,37,42,7	script	Kar#ep18	4_M_RACHMAN1,{
	if (isbegin_quest(16581) == 1) {
		mes "[Kar]";
		mes "Why don't you have no money? Your father is Lucky and works at a cloth shop.";
		mes "You mean you're lucky, your mom didn't give your dad any money?";
		next;
		mes "[Lucky]";
		mes "My mom gives your dad money, but you don't want to buy us a piece of dried fruit, do you?";
		next;
		mes "[Samaritan]";
		mes "Hey, okay, stop it. You're pitiful~ Let's stop because we don't have money.";
		next;
		mes "[Naiman]";
		mes "No!!! I'm not sorry...";
		mes "I'm not sorry...!!";
		next;
		mes "[Samaritan]";
		mes "Uh, sorry~ I'm joking.";
		mes "Why do you get angry because you're sober. It's scary.";
		next;
		mes "[Samaritan]";
		mes "I heard that the natives are a little hot-tempered, but it's a little bit irritating, right?";
		mes "Isn't it?";
		next;
		mes "[Kar]";
		mes "That's right. You have to be able to be patient when you're angry so we can play together.";
		mes "Thank you for playing with a kid like you.";
		completequest 16581;
		setquest 16582;
		close;
	}
	mes "[Kar]";
	mes "I want to drink sweet tea with lots of ice.";
	mes "After that, I think it will be more fun to play!";
	next;
	mes "[Kar]";
	mes "It's too hot and I'm thirsty right now.";
	mes "I don't want to go home though.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16581) == 1" );
	end;
}

// Quest: Helping the Children. Step 3.
rachel,40,45,3	script	Lucky#ep18	4_M_DST_CHILD,{
	if (isbegin_quest(16582) == 1) {
		mes "[Lucky]";
		mes "That's right, thank you!";
		next;
		select( "I can't see you", "Stop bullying me." );
		mes "[Lucky]";
		mes "Um? Who is that? Do you join us in our game?";
		mes "I don't think you're a human here... Why are you meddling?";
		next;
		select( "Is that playing?", "Playing, teasing me." );
		mes "[Samaritan]";
		mes "It is unavoidable that we are different only in our age~";
		mes "He's a native here, we're all migrants.";
		next;
		mes "[Samaritan]";
		mes "Everyone knows that the natives are a little less than the migrants, right?";
		mes "But we play together like this.";
		next;
		mes "[Naiman]";
		mes "No! Who is it? What is the difference between natives and migrants!";
		next;
		mes "[Kar]";
		mes "Scream again";
		mes "You are proving that the natives are more hot-blooded.";
		next;
		select( "You can't help but be angry", "Of course you'll get angry if you say that." );
		mes "[Samaritan]";
		mes "But is it true?";
		mes "Naiman's dad works at Lucky's cloth shop, but Lucky's mom always does.";
		next;
		mes "[Samaritan]";
		mes "Indigenous people are late to teachLearned and hot-blooded.";
		mes "It's great to have an aunt who hires and pays such natives.";
		erasequest 16582;
		setquest 16583;
		close;
	}
	mes "[Lucky]";
	mes "When we go to my house, we have cool tea and snacks!";
	mes "But it's too far... Isn't Naiman's house the closest here?";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16582) == 1" );
	end;
}

// Quest: Helping the Children. Step 4 (final).
rachel,36,45,5	script	Naiman#ep18	4_F_DST_CHILD,{
	if (isbegin_quest(16583) == 1) {
		if (checkweight(1000405,10) == 0) {
			mes "- Wait a minute !! -";
			mes "- Currently you're carrying -";
			mes "- too many items with you. -";
			mes "- Please try again -";
			mes "- after you loose some weight. -";
			close;
		}
		mes "[Naiman]";
		mes ".";
		next;
		select("Why do you hang out with them?");
		mes "[Naiman]";
		mes "Yes, yes?";
		next;
		select("Why are you being treated like this?");
		mes "[Naiman]";
		mes "Yeah... they're friends.";
		mes "There is no one else to play with except them.";
		next;
		mes "[Samaritan]";
		mes "Look. You're just old enough to play with us.";
		mes "If we really bothered him, we just wouldn't have played with us.";
		next;
		mes "[Lucky]";
		mes "I've heard that strangers are meddling, but...";
		mes "Don't meddle in things you don't even know.";
		next;
		mes "[Naiman]";
		mes "I... go home and fetch water.";
		mes "And... I'm sorry for being rude for nothing.";
		next;
		cloakonnpcself( "Naiman#ep18" );
		mes "[Samaritan]";
		mes "Well, it might be like playing together, isn't it?";
		mes "Don't worry too much.";
		next;
		cloakonnpcself( "Samaritan#ep18" );
		mes "[Lucky]";
		mes "Now let's go play somewhere else.";
		mes "Leave the meddling stranger here.";
		next;
		cloakonnpcself( "Lucky#ep18" );
		mes "[Kar]";
		mes "Yes, then.";
		mes "Goodbye, stranger adventurer!";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "...I feel like I have accumulated some life experience.";
		mes "It's not a very good feeling...";
		cloakonnpcself( "Kar#ep18" );
		erasequest 16583;
		getitem 1000405,10;	// Ep18_Amethyst_Fragment
		close;
	}
	mes "[Naiman]";
	mes "It's hot... I want to go home.";
	mes "But because everyone wants to play more...";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16583) == 1" );
	end;
}
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Price of Labor. Step 1 + 3 (final).
rachel,181,51,3	script	Amodipine#ep18	4_M_MIDDLE,{
	if (checkweight(1000405,10) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (isbegin_quest(16584) == 0) {
		mes "[Amodipine]";
		mes "You can't get your paycheck today. It's already been delayed for three months...";
		mes "I would like to quit this store right away, but if I do, there will be no way to get a delayed salary.";
		next;
		mes "[Amodipine]";
		mes "Besides, if the rumors spread that they ran out like that, Native Americans like me won't be able to work in other stores.";
		mes "Ah, what should I do...";
		next;
		mes "[Amodipine]";
		mes "Hey, did you hear me?";
		mes "Looking at your outfit, you look like an adventurer. It's good. A life of free adventure....";
		next;
		mes "[Amodipine]";
		mes "I, I have a favor to ask of the adventurer.";
		mes "My boss pretends to listen to me, but I think he'll listen to what a famous adventurer says.";
		next;
		mes "[Amodipine]";
		mes "Can't you go to my boss's shop and ask for a paycheck?";
		mes "I can't even buy a meal tomorrow at this rate.";
		next;
		if (select( "I'll help you", "Why would you do that?" ) == 2)
			end;
		mes "[Amodipine]";
		mes "Thank you, thank you!";
		mes "Our boss's shop is <NAVI>[here]<INFO>rachel,136,95,0,101,0</INFO></NAVI>";
		setquest 16584;
		close;
	}
	if (isbegin_quest(16585) == 1) {
		mes "[Amodipine]";
		mes "Are you here. Any good news?";
		next;
		select("Tell me what you shared");
		mes "[Amodipine]";
		mes "I'm going to pay my late salary tomorrow! Oh, thanks. Thank you so much.";
		mes "Now I can buy food and clothes for the children.";
		next;
		mes "[Amodipine]";
		mes "If you go tomorrow, you'll hear a bit of nagging, but I'm actually more happy that you got your paycheck.";
		mes "You're nagging me, it's not like it's a day or two.";
		next;
		mes "[Amodipine]";
		mes "Aren't you mad? That's mad.";
		mes "But how can I say I'm angry. It's wrong to be born aboriginal.";
		next;
		mes "[Amodipine]";
		mes "You can't run away and live.";
		mes "I've heard rumors that there is a village on the Baines side of the fugitive Aboriginal people, but I'm sure it's true.";
		next;
		mes "[Amodipine]";
		mes "But I don't even have the courage to live there. Oh my, you talked too much.";
		mes "Sorry for holding on to you when you're busy. Thank you so much!";
		completequest 16585;
		getitem 1000405,10;	// Ep18_Amethyst_Fragment
		close;
	}
	mes "[Amodipine]";
	mes "Every day I worry about my meals, I worry about my children, I don't sleep well.";
	mes "Why do I have to suffer because I was born as an indigenous person?";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16584) == 0" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16585) == 1" );
	end;
}

// Quest: Price of Labor. Step 2.
rachel,136,95,3	script	Dahill#ep18	4_M_RACHMAN2,{
	if (isbegin_quest(16584) == 1) {
		mes "[Dahil]";
		mes "Welcome, this is Dahill Sanghoe.";
		mes "Nice to meet you. You look like you're an adventurer!";
		next;
		mes "[Dahil]";
		mes "I love adventurers!";
		mes "I once dreamed of being an adventurer. Then I got shot in the knee by an arrow, and now I'm stuck in the city.";
		next;
		mes "[Dahil]";
		mes "If it's okay with you, please take a look at the items and tell me about your adventures.";
		next;
		select("I'm here to tell you another story");
		mes "[Dahil]";
		mes "A different story?";
		mes "Ummm, you mean Amodipine's salary? Did Amodipine ask for it?";
		next;
		mes "[Dahil]";
		mes "Uhm, I know Amodipine, of course, but things are not going well in the store.";
		mes "I said that I would give it all at once next month, but you're using my favorite adventurer.";
		next;
		mes "[Dahil]";
		mes "Should I say that it is native to hide behind others cowardly?";
		mes "So far, I have hired them because they seem to be doing well, but should I think about hiring indigenous people again?";
		next;
		select("What do you mean by that?");
		mes "[Dahil]";
		mes "Oh, adventurer, don't worry. It's like an old ritual problem of the natives.";
		mes "I am weak and like to hide behind others.";
		next;
		select( "It's still wrong to pay arrears", "Isn't that discrimination" );
		mes "[Dahil]";
		mes "It's because someone doesn't know. It's because they don't have money to know.";
		mes "Well, the pay to Amodipine was the latest. But it can't be helped.";
		next;
		mes "[Dahil]";
		mes "It's not like Aboriginal discrimination.";
		mes "It's just that the order was reversed because the employee was the last to arrive.";
		next;
		mes "[Dahil]";
		mes "Hey, I don't know why you have to talk like this with Adventurer-nim.";
		mes "Tell Amodipine to stop working like this, I'll give you a paycheck tomorrow.";
		next;
		mes "[Dahil]";
		mes "I won't scold you for this, so please tell <NAVI>[Amodipine]<INFO>rachel,181,51,0,101,0</INFO></NAVI> to go to work and work properly.";
		mes "I'm not a racist, but Aboriginal people are irresponsible, so if you scold me, I might quit.";
		completequest 16584;
		setquest 16585;
		close;
	}
	mes "[Dahil]";
	mes "Now I run a business, but I love adventurers!";
	mes "I once dreamed of being an adventurer. Then I got hit by an arrow in the knee and I'm stuck in the city.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(16584) == 1" );
	end;
}
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Quest: Gather Opinions in Rachel. Step 1 + 2 (final).
rachel,155,236,3	script	Junok#atm	4_M_TRAINEE,{
	if (checkweight(1000405,10) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	switch( checkquest(3504,PLAYTIME) ) {
	case -1:
		break;
	case 0:
	case 1:
		mes "[Junok]";
		mes "I got enough information today. If you can help again tomorrow, please come back.";
		close;
	case 2:
		break;
	}
	switch( isbegin_quest(3503) ) {
	case 0:
		mes "[Junok]";
		mes "Hello, my name is Priest Junok.";
		next;
		mes "[Junok]";
		mes "This village is at some point in a state of confrontation with two factions, the natives and the migrants.";
		next;
		mes "[Junok]";
		mes "Efforts to resolve the conflict between the two factions continue, but no clear results have been achieved.";
		next;
		mes "[Junok]";
		mes "That's why I want you to personally approach them and find out what the problem is.";
		next;
		mes "[Junok]";
		mes "Can the adventurer come and talk to them instead of me? It's hard for me to leave.";
		next;
		if (select( "Do it", "Do it next" ) == 2)
			end;
		setquest 3503;

		setarray .@quest_id[0],3493,3494,3495,3496,3497,3498,3499,3500,3501,3502;
		.@size = getarraysize(.@quest_id);

		for ( .@i = 0; .@i < 6; ++.@i ) {
			.@r = rand(.@size);
			setquest .@quest_id[.@r];
			deletearray .@quest_id[.@r],1;
			.@size--;
		}
		mes "[Junok]";
		mes "You can come after talking to the 3 natives and 3 immigrants you have designated.";
		next;
		mes "[Junok]";
		mes "For a list of people to talk to, please refer to the quest window or the minimap.";
		close;
	case 1:
		break;
	case 2:
		end;
	}
	switch( isbegin_quest(3505) ) {
	case 0:
		mes "[Junok]";
		mes "You can come after talking to the 3 natives and 3 immigrants you have designated.";
		next;
		mes "[Junok]";
		mes "For a list of people to talk to, please refer to the quest window or the minimap.";
		close;
	case 1:
		switch( checkquest(3504,PLAYTIME) ) {
		case -1:	// first time
			mes "[Junok]";
			mes "Is that so...";
			next;
			mes "[Junok]";
			mes "It seems that there is still a lot of sediment between each other.";
			next;
			mes "[Junok]";
			mes "It's worse than I expected, hmm... I don't know if I should mess with it.";
			next;
			getitem 1000405,10;	// Ep18_Amethyst_Fragment
			getexp 7769124,3000000;	// dummy value
			break;
		case 0:
		case 1:
			mes "[Junok]";
			mes "I got enough information today. If you can help again tomorrow, please come back.";
			close;
		case 2:
			mes "[Junok]";
			mes "Well, I see. It seems things are starting to get better.";
			next;
			mes "[Junok]";
			mes "It seems that the effort is worthwhile.";
			next;
			mes "[Junok]";
			mes "The future will be more important.";
			next;
			getitem 1000405,3;	// Ep18_Amethyst_Fragment
			getexp 18252408,2000000;
			break;
		}
		for ( .@i = 3493; .@i < 3506; ++.@i ) {
			if (isbegin_quest(.@i) > 0)
				erasequest .@i;
		}
		setquest 3504;
		mes "[Junok]";
		mes "It was a good reference.";
		next;
		mes "[Junok]";
		mes "Thank you for your help. If you can help again tomorrow, please come back.";
		close;
	case 2:
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "isbegin_quest(3503) == 0 && (checkquest(3504,PLAYTIME) == -1 || checkquest(3504,PLAYTIME) == 2)" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3505) == 1" );
	end;
}

rachel,69,234,3	script	Jarad#atm1	4_M_CHILD1,2,2,{
	if (isbegin_quest(3493) == 1) {
		mes "[Jarad]";
		mes "Hello";
		next;
		mes "[Jarad]";
		mes "As a native, I was in a position to accept whatever treatment was given to us.";
		next;
		mes "[Jarad]";
		mes "If it is impossible to change your surroundings by your own efforts, give up change and live a life of conformity.";
		next;
		mes "[Jarad]";
		mes "It's something I've felt in my short life, although it has created a rather indifferent attitude...";
		next;
		mes "[Jarad]";
		mes "But now it seems that something is really starting to change.";
		next;
		mes "[Jarad]";
		mes "It is said that there are institutional arrangements for us, so I'll try to believe it.";
		next;
		completequest 3493;
		for ( .@i = 3493; .@i <= 3502; ++.@i )
			.@total += isbegin_quest(.@i);
		if (.@total == 12)
			setquest 3505;	// setquest here to prevent bug
		mes "[Jarad]";
		mes "Have a nice day then.";
		next;
		mes " - End of conversation with Jarad. - ";
		next;
		mes " - Let's find the next contact. - ";
		if (.@total == 12) {
			next;
			// setquest 3505;
			mes " - I have finished talking to all 6 people. Let's go back to Junok. -";
		}
		close;
	}
	end;

OnTouch_:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3493) == 1" );
	end;
}

rachel,100,72,3	script	Rohi#atm2	4_F_SHABBY,2,2,{
	if (isbegin_quest(3494) == 1) {
		mes "[Rohi]";
		mes "Hello, how have you been?";
		next;
		mes "[Rohi]";
		mes "Gina finally agreed.";
		next;
		mes "[Rohi]";
		mes "Finally, I am able to receive a proper salary from Gina-sama.";
		next;
		mes "[Rohi]";
		mes "It was difficult for me to do on my own, I am really grateful to Maram and the priests.";
		next;
		mes "[Rohi]";
		mes "It's great to hear that other people who were in a similar position to me also had improvements.";
		next;
		mes "[Rohi]";
		mes "Now that I can sleep a little more comfortably, I would also like to thank the adventurer.";
		next;
		completequest 3494;
		for ( .@i = 3493; .@i <= 3502; ++.@i )
			.@total += isbegin_quest(.@i);
		if (.@total == 12)
			setquest 3505;
		mes "[Rohi]";
		mes "Then I hope you have a good day as well.";
		next;
		mes " - Finished the conversation with Rohi. - ";
		next;
		mes " - Let's find the next contact. - ";
		if (.@total == 12) {
			next;
			mes " - I have finished talking to all 6 people. Let's go back to Junok. -";
		}
		close;
	}
	end;

OnTouch_:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3494) == 1" );
	end;
}

rachel,258,207,3	script	Lord#atm3	4_F_RACHOLD,2,2,{
	if (isbegin_quest(3495) == 1) {
		mes "[Lord]";
		mes "Hello, how are you?";
		next;
		mes "[Lord]";
		mes "If the priests had been a little late, they would have sold the building.";
		next;
		mes "[Lord]";
		mes "Isn't that the measure to ensure that indigenous peoples and migrants have equal rights in business?";
		next;
		mes "[Lord]";
		mes "I am amazed and grateful that the settlers accept it...";
		next;
		mes "[Lord]";
		mes "Anyway, I think the time has come to spur my business.";
		next;
		mes "[Lord]";
		mes "I want you to support me as well.";
		next;
		completequest 3495;
		for ( .@i = 3493; .@i <= 3502; ++.@i )
			.@total += isbegin_quest(.@i);
		if (.@total == 12)
			setquest 3505;
		mes "[Lord]";
		mes "Have a nice day then.";
		next;
		mes " - End of conversation with Lord. - ";
		next;
		mes " - Let's find the next contact. - ";
		if (.@total == 12) {
			next;
			mes " - I have finished talking to all 6 people. Let's go back to Junok. -";
		}
		close;
	}
	end;

OnTouch_:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3495) == 1" );
	end;
}

rachel,159,173,3	script	Squain#atm4	4_M_LGTPOOR,2,2,{
	if (isbegin_quest(3496) == 1) {
		mes "[Squain]";
		mes "Hello~~";
		next;
		mes "[Squain]";
		mes "Thank you so much for the job.";
		next;
		mes "[Squain]";
		mes "You don't have to depend on others anymore!";
		next;
		mes "[Squain]";
		mes "If I get paid, I'd like to change the clothes I'm wearing first.";
		next;
		mes "[Squain]";
		mes "There have been many people's help...";
		next;
		mes "[Squain]";
		mes "Now I will become a person who can help others.";
		next;
		completequest 3496;
		for ( .@i = 3493; .@i <= 3502; ++.@i )
			.@total += isbegin_quest(.@i);
		if (.@total == 12)
			setquest 3505;
		mes "[Squain]";
		mes "Then enter carefully.";
		next;
		mes " - Finished the conversation with Squain. - ";
		next;
		mes " - Let's find the next contact. - ";
		if (.@total == 12) {
			next;
			mes " - I have finished talking to all 6 people. Let's go back to Junok. -";
		}
		close;
	}
	end;

OnTouch_:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3496) == 1" );
	end;
}

rachel,190,30,5	script	Senado#atm5	4_F_MONK,2,2,{
	if (isbegin_quest(3497) == 1) {
		mes "[Senado]";
		mes "Hello, I'm Senado.";
		next;
		mes "[Senado]";
		mes "Not long ago, a strong challenger appeared and came to a conclusion.";
		next;
		mes "[Senado]";
		mes "The challenger was a fighter from immigrants, so it was quite a hot topic.";
		next;
		mes "[Senado]";
		mes "On behalf of the indigenous people, you can never lose!! It wasn't prepared enough, but...";
		next;
		mes "[Senado]";
		mes "It was more important for me to be able to adjust the rental fee according to the changed policy.";
		next;
		mes "[Senado]";
		mes "Oh, and Dalian ended with my victory.";
		next;
		mes "[Senado]";
		mes "You also feel unusual martial arts... It would be good to fight with me once in a while.";
		next;
		completequest 3497;
		for ( .@i = 3493; .@i <= 3502; ++.@i )
			.@total += isbegin_quest(.@i);
		if (.@total == 12)
			setquest 3505;
		mes "[Senado]";
		mes "Then I'll see you next time.";
		next;
		mes " - Finished the conversation with Senado. - ";
		next;
		mes " - Let's find the next contact. - ";
		if (.@total == 12) {
			next;
			mes " - I have finished talking to all 6 people. Let's go back to Junok. -";
		}
		close;
	}
	end;

OnTouch_:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3497) == 1" );
	end;
}

rachel,210,52,5	script	Japer#atm6	1_ETC_01,2,2,{
	if (isbegin_quest(3498) == 1) {
		mes "[Japer]";
		mes "Hello, my name is Merchant Japer.";
		next;
		mes "[Japer]";
		mes "Some of the items I own are exclusive to quite a few.";
		next;
		mes "[Japer]";
		mes "It is true that this has made it difficult for indigenous merchants to compete.";
		next;
		mes "[Japer]";
		mes "So there is a system that prevents one merchant from buying all of a certain item.";
		next;
		mes "[Japer]";
		mes "Besides, I think it should be done in the direction of raising the wages of the indigenous people I hire.";
		next;
		mes "[Japer]";
		mes "It's true that it's a huge loss right now, but the commercial district itself will become more active, so I'll have to look at it for a long time now that it's like this.";
		next;
		mes "[Japer]";
		mes "It seems that I've been too stubborn, so I'm a little concerned.";
		next;
		completequest 3498;
		for ( .@i = 3493; .@i <= 3502; ++.@i )
			.@total += isbegin_quest(.@i);
		if (.@total == 12)
			setquest 3505;
		mes "[Japer]";
		mes "Then see you next time.";
		next;
		mes " - End of conversation with Japer. - ";
		if (.@total == 12) {
			next;
			mes " - I have finished talking to all 6 people. Let's go back to Junok. -";
		}
		close;
	}
	end;

OnTouch_:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3498) == 1" );
	end;
}

rachel,40,73,7	script	Shiroan#atm7	1_F_02,2,2,{
	if (isbegin_quest(3499) == 1) {
		mes "[Shiroan]";
		mes "Hello, this is Jafer's disciple Siroan.";
		next;
		mes "[Shiroan]";
		mes "Have you ever heard of a man struck by lightning by the natives?";
		next;
		mes "[Shiroan]";
		mes "Yes, that person is me...";
		next;
		mes "[Shiroan]";
		mes "It's a matter of negotiating with Jafer.";
		next;
		mes "[Shiroan]";
		mes "It's difficult to approach Jafer, who has a tight stomach, so that must have been the case with me, who is more sympathetic...";
		next;
		mes "[Shiroan]";
		mes "But now that our interests are aligned to some extent, I think we can move around with confidence.";
		next;
		mes "[Shiroan]";
		mes "Good job";
		next;
		completequest 3499;
		for ( .@i = 3493; .@i <= 3502; ++.@i )
			.@total += isbegin_quest(.@i);
		if (.@total == 12)
			setquest 3505;
		mes "[Shiroan]";
		mes "Then I hope you have a peaceful day.";
		next;
		mes " - Conversation with Shiroan is over. - ";
		next;
		mes " - Let's find the next contact. - ";
		if (.@total == 12) {
			next;
			mes " - I have finished talking to all 6 people. Let's go back to Junok. -";
		}
		close;
	}
	end;

OnTouch_:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3499) == 1" );
	end;
}

rachel,88,151,3	script	Ishira#atm8	1_F_03,2,2,{
	if (isbegin_quest(3500) == 1) {
		mes "[Ishira]";
		mes "Hello, how are you?";
		next;
		mes "[Ishira]";
		mes "The atmosphere of the village is changing little by little due to the intervention of the priests.";
		next;
		mes "[Ishira]";
		mes "If you change your position, you can feel that you have been treated unfairly enough.";
		next;
		mes "[Ishira]";
		mes "I think they had good reason to be outraged in a speech that was given a while ago.";
		next;
		mes "[Ishira]";
		mes "But it's true that it was too much. At least not with violence!";
		next;
		mes "[Ishira]";
		mes "In any case, I hope that the relationship between the natives and the migrants will improve little by little.";
		next;
		completequest 3500;
		for ( .@i = 3493; .@i <= 3502; ++.@i )
			.@total += isbegin_quest(.@i);
		if (.@total == 12)
			setquest 3505;
		mes "[Ishira]";
		mes "Then have a peaceful day.";
		next;
		mes " - Finished the conversation with Ishira. - ";
		next;
		mes " - Let's find the next contact. - ";
		if (.@total == 12) {
			next;
			mes " - I have finished talking to all 6 people. Let's go back to Junok. -";
		}
		close;
	}
	end;

OnTouch_:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3500) == 1" );
	end;
}

rachel,240,182,5	script	Gina#atm9	1_F_04,2,2,{
	if (isbegin_quest(3501) == 1) {
		mes "[Gina]";
		mes "Hello, how are you?";
		next;
		mes "[Gina]";
		mes "I didn't get along very well.";
		next;
		mes "[Gina]";
		mes "We were able to expand our business by purchasing additional buildings, but it ended in failure.";
		next;
		mes "[Gina]";
		mes "But now that I think about it, even if we had succeeded in purchasing additional buildings, problems would have arisen.";
		next;
		mes "[Gina]";
		mes "So I just decided to accept this state for now.";
		next;
		mes "[Gina]";
		mes "These days, I think we need to stop thinking negatively and have a positive mindset.";
		next;
		completequest 3501;
		for ( .@i = 3493; .@i <= 3502; ++.@i )
			.@total += isbegin_quest(.@i);
		if (.@total == 12)
			setquest 3505;
		mes "[Gina]";
		mes "Then I hope you have a nice day.";
		next;
		mes " - Finished the conversation with Gina. - ";
		next;
		mes " - Let's find the next contact. - ";
		if (.@total == 12) {
			next;
			mes " - I have finished talking to all 6 people. Let's go back to Junok. -";
		}
		close;
	}
	end;

OnTouch_:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3501) == 1" );
	end;
}

rachel,212,52,3	script	Hari#atm10	1_F_MERCHANT_02,2,2,{
	if (isbegin_quest(3502) == 1) {
		mes "[Hari]";
		mes "Hello, this is Jafer's wife Hari.";
		next;
		mes "[Hari]";
		mes "Because of his fiery nature, sometimes when an accident occurs, I take care of the rearrangement.a person who does.";
		next;
		mes "[Hari]";
		mes "I suffered a lot because there was no compromise on the wage increase for the natives.";
		next;
		mes "[Hari]";
		mes "Actually, I didn't think there was any need for a raise, but I hated fighting with my husband more.";
		next;
		mes "[Hari]";
		mes "Anyway, I'm glad there seems to be some compromise.";
		next;
		mes "[Hari]";
		mes "I want you to be quiet now.";
		next;
		completequest 3502;
		for ( .@i = 3493; .@i <= 3502; ++.@i )
			.@total += isbegin_quest(.@i);
		if (.@total == 12)
			setquest 3505;
		mes "[Hari]";
		mes "Then just go inside~";
		next;
		mes " - Conversation with Hari is over. - ";
		next;
		mes " - Let's find the next contact. - ";
		if (.@total == 12) {
			next;
			mes " - I have finished talking to all 6 people. Let's go back to Junok. -";
		}
		close;
	}
	end;

OnTouch_:
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(3502) == 1" );
	end;
}
//-------------------------------------------------------------------



//-------------------------------------------------------------------
// Quest: Picking Half Flowers. Step 1.
rachel,169,79,0	script(CLOAKED)	#Warp for flower	WARPNPC,{
	end;
OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(5932) == 0" );
	end;
}

rachel,170,80,6	duplicate(dummy_cloaked_npc)	Greedy man#E18_1	4_M_RASWORD
rachel,172,80,4	duplicate(dummy_cloaked_npc)	Abused child#E18_2	4_M_DST_CHILD
rachel,175,80,4	duplicate(dummy_cloaked_npc)	Abused child#E18_3	4_M_DST_CHILD
	
rachel,176,80,0	script	#Hoesopflowerstart	HIDDEN_WARP_NPC,10,10,{
	end;
OnTouch:
	switch( isbegin_quest(5932) ) {
	case 0:
		cloakoffnpcself( "#Warp for flower" );	// weird but official
		cloakoffnpcself( "Greedy man#E18_1" );
		cloakoffnpcself( "Abused child#E18_2" );

		mes "- a man who looks greedy";
		mes "- You are abusing a child.";
		next;
		if (select( "Listen to what's going on", "Ignore" ) == 2)
			end;
		emotion ET_FRET, getnpcid(0,"Greedy man#E18_1");
		sleep2 300;
		npctalk "Man: Feeding and putting a native kid who doesn't come and goes, is that the only reward you get?", "Greedy man#E18_1", bc_self;
		emotion ET_SURPRISE, playerattached();
		unittalk getcharid(3), "" + strcharinfo(0) + " : ??", bc_self;
		next;
		emotion ET_ANGER, getnpcid(0,"Greedy man#E18_1");
		sleep2 300;
		npctalk "Man: Ha?! That's not even funny. How dare you touch a customer's wallet?", "Greedy man#E18_1", bc_self;
		next;
		emotion ET_FRET, getnpcid(0,"Greedy man#E18_1");
		sleep2 300;
		npctalk "Man: Eying - I was listening to the advice of people around me not to have any dealings with the natives.", "Greedy man#E18_1", bc_self;
		next;
		npctalk "Man: I lost my mind for a while. I'll look at you this time, so disappear from my eyes right now.", "Greedy man#E18_1", bc_self;
		sleep2 300;
		specialeffect EF_HIT1, AREA, "Abused child#E18_2";
		npctalk "Child: Aww!", "Abused child#E18_2", bc_self;
		emotion ET_PROFUSELY_SWAT, getnpcid(0,"Abused child#E18_2");
		cloakonnpcself( "Abused child#E18_2" );
		cloakoffnpcself( "Abused child#E18_3" );
		next;
		emotion ET_STARE, getnpcid(0,"Greedy man#E18_1");
		sleep2 300;
		npctalk "Man: Can't you be quiet? Are you screaming and fussing in the neighborhood?!", "Greedy man#E18_1", bc_self;
		next;
		emotion ET_CRY, getnpcid(0,"Abused child#E18_3");
		sleep2 300;
		npctalk "Child: I didn't. I've never seen a guest wallet.", "Abused child#E18_3", bc_self;
		next;
		npctalk "Man: This.. This..", "Greedy man#E18_1", bc_self;
		next;
		npctalk "Man: I don't know if this kid can't beg, but where does he get the full answer?", "Greedy man#E18_1", bc_self;
		next;
		npctalk "Man: The last time you tried to be nice and gracious, are you even lying now?", "Greedy man#E18_1", bc_self;
		next;
		emotion ET_BLABLA, getnpcid(0,"Greedy man#E18_1");
		sleep2 300;
		npctalk "Man: I don't need a cheeky little bastard like you! Get fired right now!", "Gaudy Man#E18_1", bc_self;
		next;
		cloakonnpcself( "Abused child#E18_3" );
		sleep2 300;
		cloakoffnpcself( "Abused child#E18_2" );
		emotion ET_CRY, getnpcid(0,"Abused child#E18_2");
		npctalk "Child: The boss was wrong", "Abused child#E18_2", bc_self;
		next;
		npctalk "Child: Please, just get fired. I have to pay for my father's medicine.", "Abused child#E18_2", bc_self;
		next;
		emotion ET_FRET, getnpcid(0,"Greedy man#E18_1");
		sleep2 300;
		npctalk "Man: ?! What's the drug?", "Greedy man#E18_1", bc_self;
		next;
		npctalk "Man: That's your guy. Should I take care of that too?", "Greedy man#E18_1", bc_self;
		next;
		npctalk "Child: Boss, then even the money I worked so far...", "Abused child#E18_2", bc_self;
		next;
		emotion ET_QUESTION, getnpcid(0,"Greedy man#E18_1");
		sleep2 300;
		npctalk "Man: What? Worked Money?", "Gravish Man#E18_1", bc_self;
		next;
		npctalk "Man: Huh, how long have I lived? I hear all sorts of bullshit, blatantly asking for money on the subject of stealing?", "Greedy man#E18_1", bc_self;
		next;
		emotion ET_QUESTION, getnpcid(0,"Greedy man#E18_1");
		sleep2 300;
		npctalk "Man: It's okay to claim compensation for a stolen wallet, but what? Money? You sat there laughing.", "Greedy man#E18_1", bc_self;
		next;
		emotion ET_CRY, getnpcid(0,"Abused child#E18_2");
		sleep2 300;
		specialeffect EF_HIT1, AREA, "Abused child#E18_2";
		npctalk "Child: Aww!", "Abused child#E18_2", bc_self;
		cloakonnpcself( "Abused child#E18_2" );
		cloakoffnpcself( "Abused child#E18_4" );
		next;
		npctalk "Man: Icy! It's loud!", "Greedy man#E18_1", bc_self;
		next;
		npctalk "Man: Little boy, you'd better be prepared if you catch my eye while you're around here again.", "Greedy man#E18_1", bc_self;
		next;
		setquest 5932;
		emotion ET_FRET, getnpcid(0,"Greedy man#E18_1");
		npctalk "Man: Awkwardly.", "Greedy man#E18_1", bc_self;
		cloakonnpcself( "#Warp for flower" );
		cloakonnpcself( "Greedy man#E18_1" );
		close;
	case 1:
		cloakonnpcself( "#Warp for flower" );
		cloakonnpcself( "Greedy man#E18_1" );
		cloakoffnpcself( "Abused child#E18_4" );
		end;
	case 2:
		end;
	}
}

rachel,180,80,4	script(CLOAKED)	Abused child#E18_4	4_M_DST_CHILD,{
	if (isbegin_quest(5932) == 1) {
		mes "[child]";
		mes "Ah.. that's bad luck, it's the Aboriginal people who are very happy.";
		next;
		mes "[child]";
		mes "Ah.. I gave money freely, but I did not cut it freely, so I liked it quite a bit, but I thought it would last a long time.";
		next;
		select("Are you okay?");
		mes "[child]";
		mes "What are you doing?";
		next;
		mes "[child]";
		mes "You look like a foreigner, but if you are a clumsy sympathizer, please stop. This kind of treatment is common among indigenous people.";
		next;
		mes "[child]";
		mes "Then you keep going the way you went. It wasn't nice to meet you, but let's not meet again~";
		next;
		emotion ET_STARE_ABOUT, getnpcid(0,"Abused child#E18_4");
		mes "[child]";
		mes "Ha.. I thought I was caught.";
		next;
		emotion ET_KIK, getnpcid(0,"Abused child#E18_4");
		mes "[child]";
		mes "Even the boss is stupid, but I didn't steal the customer's wallet.";
		next;
		mes "[child]";
		mes "Ah! But who else stole the customer's wallet? It's less embarrassing if I stole it too.";
		next;
		mes "[child]";
		mes "Let's see, how much did you hear?";
		next;
		emotion ET_MONEY, getnpcid(0,"Abused child#E18_4");
		mes "[child]";
		mes "one. two.. ginseng, raccoon dog, squid, yukgaejang, childogi, palpuni, serpent, cross driver";
		next;
		mes "[child]";
		mes "Hey, it's salty. It's salty.";
		next;
		emotion ET_THINK, getnpcid(0,"Abused child#E18_4");
		sleep2 3000;
		emotion ET_SWEAT, getnpcid(0,"Abused child#E18_4");
		mes "[child]";
		mes "Haha? Mister.. haven't you gone yet? Have you seen all the money counting? Are you going to braid to the boss?";
		next;
		select("It won't come, so why not return it?");
		mes "[child]";
		mes "Ha.. this uncle! People are saying nice things again, haven't you seen them before?";
		next;
		mes "[child]";
		mes "Did I not get my paycheck after working hard for months?";
		next;
		mes "[child]";
		mes "Even if you can't, you need to take care of your boss' wallet so that even a small consolation fee will be satisfied.";
		next;
		mes "[child]";
		mes "Oh, I don't know! If you want to brag, say braid. Now, my father is healthy enough to be able to move on his own.";
		next;
		mes "[child]";
		mes "Because I was about to open the business by gathering roughly all of my business funds.";
		next;
		select("What business? Isn't it illegal?");
		mes "[child]";
		mes "Heh heh.. This uncle! He's going to make a big deal out of it. ";
		next;
		mes "[child]";
		mes "Where are you trying to steal someone else's business idea?";
		next;
		mes "[child]";
		mes "Well, it's a difficult task for me to do alone, and I don't think I'm an adult with a bad personality, so I'll give you a special offer.";
		next;
		mes "[child]";
		mes "I'll give you a map of the places I've been looking for business. If you're really interested in my business, let me know.";
		next;
		completequest 5932;
		setquest 5933;
		mes "[child]";
		mes "Oh! And my name is Mejay. See you again.";
		close2;
		cloakonnpcself( "Abused child#E18_4" );
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(5932) == 1" );
	end;
}

// Quest: Picking Half Flowers. Step 2.
rachel,70,135,4	script(CLOAKED)	Mejai#E18_5	4_M_DST_CHILD,{
	if (checkweight(1000405,10) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (isbegin_quest(5933) == 1) {
		mes "[Mejai]";
		mes "Oh my God, this guy is really here. Does that mean he's interested in my business?";
		next;
		mes "[Mejai]";
		mes "Hmm.. what should I do..";
		next;
		mes "[Mejai]";
		mes "Hiding this isn't my aptitude, I'll just be honest.";
		next;
		mes "[Mejai]";
		mes "There were a few people who came to hear about my business plan, and as soon as they heard it, they all just left.";
		next;
		if (select( "What the hell are you doing?", "I'm not interested?" ) == 2)
			end;
		mes "[Mejai]";
		mes "Heh! Don't be surprised to hear that, I'm selling flowers in this desert.";
		next;
		emotion ET_QUESTION, playerattached();
		sleep2 3000;
		emotion ET_THINK, playerattached();
		mes "[Mejai]";
		mes "Why? What? Look, this. Foreigners shouldn't be like this. Do you know how precious flowers are in the desert?";
		next;
		mes "[Mejai]";
		mes "Did you see the flower shop in Rachel, Mister?";
		next;
		emotion ET_OK, playerattached();
		mes "[Mejai]";
		mes "Well, of course, you must have seen it, doesn't Rachel not have a flower shop?";
		next;
		mes "[Mejai]";
		mes "If a florist selling only artificial flowers, not living flowers, could be called a florist.";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "By the way, where to get flowers?";
		next;
		mes "[Mejai]";
		mes "Yeah, that's the problem. You're pretty sharp? I like it.";
		next;
		mes "[Mejai]";
		mes "It's not that you can't find fresh flowers around here. It's rare, but there are ways to get them.";
		next;
		mes "[Mejai]";
		mes "You know it's a Half Flower? Maybe outsiders don't know. Do the natives here know?";
		next;
		mes "[Mejai]";
		mes "It is a beautiful and mysterious flower that only blooms in the gray wolf forest. It is said that when my father proposed to my mother, I cut it and proposed it.";
		next;
		mes "[Mejai]";
		mes "And since her mother died, her father only drank alcohol, and he taught me how to gather Half Flowers.";
		next;
		mes "[Mejai]";
		mes "What if the place where the Half Flower blooms is under a tree... What if it's under a stone... What if it's by the grass...";
		next;
		mes "[Mejai]";
		mes "Considering the humidity around the flower, the direction of cutting should be at an angle of 10 degrees, 20 degrees, or 30 degrees..";
		next;
		emotion ET_THINK, getnpcid(0,"Mejai#E18_5");
		mes "[Mejai]";
		mes "Ah.. I was excited for a moment. Every time my dad told me this, it was stressful...";
		next;
		mes "[Mejai]";
		mes "Well, after all, I ended up doing business with it, so it was all nagging that turned into blood and flesh...";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "So what can I do to help?";
		next;
		mes "[Mejai]";
		mes "I think it's important to keep a sufficient supply of Half Flowers in order for the business we're planning to run stably.";
		next;
		mes "[Mejai]";
		mes "So I'm planning to sign a contract with a lot of adventurers. Of course you'll be one of them too, right?";
		next;
		mes "[Mejai]";
		mes "I'm going to go to the old Gray Wolf Forest and collect Half Flowers.";
		next;
		mes "[Mejai]";
		mes "Of course, there are other projects we want to do when this business is stable, but we'll talk about it after things are really stable.";
		next;
		mes "[Mejai]";
		mes "How about working with me, Mister?";
		next;
		if (select( "Okay.", "I'm having a hard time right now." ) == 2)
			end;
		mes "[Mejai]";
		mes "Okay. I think mutual respect between the boss and employees is important. You can guess why I say this.";
		next;
		mes "[Mejai]";
		mes "Now that we are working together, please call me President Mejai from now on. I will respect you as well as the staff.";
		next;
		mes "[Mejai]";
		mes "I'm not going to treat you badly. I'm tired of that kind of thing...";
		next;
		mes "[Mejai]";
		mes "First of all, I would like to educate you on the most important task, how to gather Half Flowers.";
		next;
		erasequest 5933;
		setquest 5934;
		mes "[Mejai]";
		mes "Talk to me when you're ready.";
		close;
	}
	if (isbegin_quest(5934) == 1) {
		mes "[Mejai]";
		mes "I'm thinking of starting a Half Flower gathering training, are you ready?";
		next;
		if (select( "Sir, let's start.", "Wait a minute." ) == 2)
			end;
		mes "[Mejai]";
		mes "Welcome to the Half Flower collection training.";
		next;
		mes "[Mejai]";
		mes "Collecting Half Flowers is divided into four stages. First, cut the stems.";
		next;
		mes "[Mejai]";
		mes "And remove the leaves from the second cut stem...";
		next;
		mes "[Mejai]";
		mes "Thirdly, put water and secret powder in a small container for soaking the tip of the stem and mix well.";
		next;
		mes "[Mejai]";
		mes "Put the tip of the stem in the fourth and last small barrel and wrap it well to avoid damaging the flower.";
		next;
		mes "[Mejai]";
		mes "Isn't it difficult to simply look at the method?";
		next;
		mes "[Mejai]";
		mes "Due to the deepening process, depending on where the Half Flower is blooming, the angle at which the stem is cut, the number of leaves to be removed, the amount of water and secret powder in the barrel, etc. will vary...";
		next;
		mes "[Mejai]";
		mes "Don't worry. I'll write it down in detail when you get the job so that you never forget it.";
		next;
		mes "[Mejai]";
		mes "Can you see the Half Flower I made for practice next to you?";
		next;
		mes "[Mejai]";
		mes "I think I invested half of the money I had to make this practice Half Flower when I started.";
		next;
		mes "[Mejai]";
		mes "Well, I don't regret it because it's become easier to train employees. Then let's practice like a real one?";
		next;
		erasequest 5934;
		setquest 5935;
		mes "[Mejai]";
		mes "What would be good? Let's practice for practice, assuming that the Half Flower is blooming under the tree.";
		close;
	}
	if (isbegin_quest(5935) == 1) {
		mes "[Mejai]";
		mes "Please pay attention to the Half Flower for practice beside me, not me.";
		close;
	}
	if (isbegin_quest(5936) == 1) {
		// if (rentalcountitem(1000407) < 1)
		mes "[Mejai]";
		mes "Thank you for your hard work. The next Half Flower collection will be carried out in the same way.";
		next;
		mes "[Mejai]";
		mes "All you have to do is deliver the collected flowers to me.";
		next;
		mes "[map]";
		mes "Unlike me, the employee is a person who does many different things at the same time..";
		next;
		mes "[Mejai]";
		mes "I would appreciate it if you could bring me the Half Flower before it withers while you work.";
		next;
		mes "[Mejai]";
		mes "Ah! One tip, the more you collect the same as I told you, the longer the flowers will last.";
		next;
		select("When will the work start?");
		mes "[Mejai]";
		mes "Today, I'm also preparing to open the store. I'm busy, so why not start tomorrow?";
		next;
		select("Okay. See you tomorrow.");
		mes "[Mejai]";
		mes "Oops, I have to give this to you.";
		next;
		mes "[Mejai]";
		mes "I've been doing a lot of work for two days, but it can't be that unsightly to do one thing and another on the pretext of the training period while doing the job one by one.";
		next;
		if (rentalcountitem(1000407) > 0)
			delitem 1000407,1;	// Ep18_Half_Flower
		completequest 5936;
		setquest 5937;
		getitem 1000405,10;	// Ep18_Amethyst_Fragment
		getexp 7769124,3000000;	// dummy value
		mes "[Mejai]";
		mes "What I'm giving you now is a reward for today's education. Take a good rest and see you tomorrow.";
		close;
	}
	mes "[Mejai]";
	mes "Are you here? Eunha Cho. Not yet";
	mes "La open, I sat down. It's the first day, so it's right to prepare something.";
	next;
	mes "[Mejai]";
	mes "It will be open soon, so see.";
	close;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(5933) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(5934) == 1" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(5936) == 1" );
	end;
}

// Quest: Picking Half Flowers. Step 3 (final).
rachel,72,133,4	script(CLOAKED)	Half Flower#E18_6	4_EP18_HALFFLOWER,{
	if (checkweight(1000407,1) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (isbegin_quest(5935) == 1) {
		setarray .@good_answer[0],2,2,2,3;
		.@time = 86400;
		mes "This is a practice Half Flower.";
		next;
		npctalk "Mejai: Let's start by assuming that a Half Flower blooms under a purple tree.", "Mejai#E18_5", bc_self;
		next;
		npctalk "Mejai: Shall we cut the stem of the Half Flower first?", "Mejai#E18_5", bc_self;
		next;
		if (select("Cut to 10¡Æ", "Cut to 20¡Æ", "Cut to 30¡Æ", "Cut to 40¡Æ" ) != .@good_answer[0])
			.@time /= 2;
		progressbar "FFFF00",1;
		npctalk "Mejai: Well done. First you cut the stems.", "Mejay#E18_5", bc_self;
		next;
		npctalk "Mejai: Next, I'll remove the leaves. Leave only as much as I can and remove the rest.", "Mejai#E18_5", bc_self;
		next;
		if (select("Leave 2 cards", "Leave 4 cards", "Leave 6 cards", "Leave 8 cards" ) != .@good_answer[1])
			.@time /= 2;
		progressbar "FFFF00",1;
		npctalk "Mejay: Well done. Next I'll prepare a bottle for the stem tip.", "Mejay#E18_5", bc_self;
		next;
		npctalk "Mejai: First fill the small bottle with water.", "Mejai#E18_5", bc_self;
		next;
		if (select("Contains 20 ml", "Contains 30 ml", "Contains 40 ml", "Contains 50 ml" ) != .@good_answer[2])
			.@time /= 2;
		progressbar "FFFF00",1;
		npctalk "Mejai: I'm going to add my secret powder to the water and mix it.", "Mejai#E18_5", bc_self;
		next;
		npctalk "Mejay: Mix it properly.", "Mejay#E18_5", bc_self;
		next;
		if (select( "put 2 gC.", "Add 4 g.", "Add 6 g.", "Add 8 g." ) != .@good_answer[3])
			.@time /= 2;
		npctalk "Mejai: Now finally", "Mejai#E18_5", bc_self;
		next;
		npctalk "Mejai: Just put the cut stem ends in a bucket of water and secret powder and wrap!", "Mejai#E18_5", bc_self;
		next;
		progressbar "FFFF00",1;
		// note: the timer decreases according to the answer but no idea of the ratio
		rentitem 1000407,.@time;	// Ep18_Half_Flower
		erasequest 5935;
		setquest 5936;
		cloakonnpcself( "Half Flower#E18_6" );
		npctalk "Mejai: Complete! Then will you bring me the Half Flower you just collected?", "Mejai#E18_5", bc_self;
		close;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(5935) == 1" );
	end;
}

// daily quest
rachel,70,135,4	script(CLOAKED)	Mejai#E18_7	4_M_DST_CHILD,{
	if (checkweight(1000405,3) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	setpcblock PCBLOCK_NPC, true;
	if (checkquest(5937,PLAYTIME) != 2)
		npctalk "Mejai: Hello. Let's do our best today.", "", bc_self;
	else {
		npctalk "Mejai: Oh, are you here? Let's start today, shall we?", "", bc_self;
		sleep2 1000;
		npctalk "Mejai: Hello. It's Saturday, so why don't you try to work with a relaxed mind?", "", bc_self;
	}
	sleep2 1000;
	setpcblock PCBLOCK_NPC, false;
	switch( select( "I'm busy right now..", "Gathering Half Flowers", "Shipping Half Flowers" ) ) {
	case 1:
		npctalk "Mejai: Are you busy? Find me when you are comfortable.", "", bc_self;
		end;
	case 2:
		for ( .@id = 5938; .@id < 5942; .@id++ ) {
			if (isbegin_quest(.@id) == 1) {
				.@quest_id = .@id;
				break;
			}
		}
		if (.@quest_id == 0)
			.@quest_id = rand(5938,5941);

		switch( isbegin_quest(.@quest_id) ) {
		case 0:
			npctalk "Mejai: Are you going to go gather Half Flowers?", "", bc_self;
			if (select( "I'll collect it.", "I'll skip today." ) == 2) {
				end;
			}
			switch( checkquest(5937,PLAYTIME) ) {
			case -1:
				break;
			case 0:
			case 1:
				npctalk "Mejai: Oh! Do you?", "", bc_self;
				sleep2 1000;
				npctalk "Mejai: It's not over yet, so if today's work is done early, please help with the Flower Room.", "", bc_self;
				end;
			case 2:
				break;
			}
			setquest .@quest_id;
			npctalk "Mejai: Pay attention to the Half Flower that blooms on the flatland today.", "", bc_self;
			sleep2 1000;
			npctalk "Mejai: Alright! Fighting today! Please do your best to bring fresh Half Flowers.", "", bc_self;
			end;
		case 1:
			if (rentalcountitem(1000407) < 1) {
				npctalk "Mejai: Pay attention to the Half Flower that blooms on the flatland today.", "", bc_self;
				sleep2 1000;
				npctalk "Mejai: Alright! Fighting today! Please do your best to bring fresh Half Flowers.", "", bc_self;
				end;
			}
			delitem 1000407,1;	// Ep18_Half_Flower
			erasequest .@quest_id;
			if (checkquest(5937,PLAYTIME) == 2)
				erasequest 5937;
			setquest 5937;
			getitem 1000405,3;	// Ep18_Amethyst_Fragment
			getexp 18252408,2000000;
			npctalk "Mejai: You worked hard today. Leave the rest to me.", "", bc_self;
			end;
		case 2:
			end;	// impossible
		}
		end;
	case 3:
		npctalk "Mejai: It's a service I'm still thinking about. Won't it start when the business is a little more stable?", "", bc_self;
		sleep2 1000;
		npctalk "Mejai: Please take care of me when that time comes.", "", bc_self;
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(5936) == 2 && isbegin_quest(5938) == 0 && isbegin_quest(5939) == 0 && isbegin_quest(5940) == 0 && isbegin_quest(5941) == 0 && checkquest(5937,PLAYTIME) == 2" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "isbegin_quest(5936) == 2 && rentalcountitem(1000407) > 0" );
	end;
}

gw_fild01,325,376,1	script	Half Flower#EP18_R01	4_EP18_HALFFLOWER,7,7,{
	if (checkweight(1000407,1) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	for ( .@id = 5938; .@id < 5942; .@id++ ) {
		if (isbegin_quest(.@id) == 1) {
			.@quest_id = .@id;
			break;
		}
	}
	if (.@quest_id == 0) {
		unittalk getcharid(3), "Half flower is blooming", bc_self;
		end;
	}
	// player interacts with the npc according to the quest ID
	// 5938 requires EP18_R (flower near a Rock)
	// 5939 requires EP18_L (?)
	// 5940 requires EP18_T (Tree)
	// 5941 requires EP18_W (Water)
	switch( .@quest_id ) {
	case 5938:
		.@string$ = "EP18_R";
		setarray .@good_answer[0],4,1,4,1;
		break;
	case 5939:
		.@string$ = "EP18_L";
		setarray .@good_answer[0],3,2,3,2;
		break;
	case 5940:
		.@string$ = "EP18_T";
		setarray .@good_answer[0],2,2,2,3;
		break;
	case 5941:
		.@string$ = "EP18_W";
		setarray .@good_answer[0],1,4,1,4;
		break;
	}
	if (compare(strnpcinfo(2), .@string$) == false) {
		cloakonnpc strnpcinfo(0), getcharid(0);
		end;
	}
	if (rentalcountitem(1000407) > 0) {
		mes "- the Half Flower is more";
		mes "- not necessary, before wither";
		mes "- Bring it to Mejai.";
		close;
	}
	.@time = 86400;
	mes "- the half-flower is blooming. Mejaiga";
	mes "- Necessary for the Gathering Tool you gave me";
	mes "- Let's find and gather materials.";
	next;
	unittalk getcharid(3), "" + strcharinfo(0) + " : How do I cut the stem at an angle?", bc_self;
	next;
	if (select("Cut to 10¡Æ", "Cut to 20¡Æ", "Cut to 30¡Æ", "Cut to 40¡Æ" ) != .@good_answer[0])
		.@time /= 2;
	progressbar "FFFF00",1;
	unittalk getcharid(3), "" + strcharinfo(0) + " : how many leaves to leave?", bc_self;
	next;
	if (select("Leave 2 cards", "Leave 4 cards", "Leave 6 cards", "Leave 8 cards" ) != .@good_answer[1])
		.@time /= 2;
	progressbar "FFFF00",1;
	unittalk getcharid(3), "" + strcharinfo(0) + " : How many ml of water will a small bottle hold?", bc_self;
	next;
	if (select("Contains 20 ml", "Contains 30 ml", "Contains 40 ml", "Contains 50 ml" ) != .@good_answer[2])
		.@time /= 2;
	progressbar "FFFF00",1;
	unittalk getcharid(3), "" + strcharinfo(0) + " : How many grams of secret powder should you put in?", bc_self;
	next;
	if (select( "Add 2 g", "Put 4 g", "Put 6 g", "Put 8 g" ) != .@good_answer[3])
		.@time /= 2;
	progressbar "FFFF00",1;
	cloakonnpc strnpcinfo(0), getcharid(0);
	// note: the timer decreases according to the answer but no idea of the ratio
	rentitem 1000407, .@time;	// Ep18_Half_Flower
	mes "- I have collected Half Flowers";
	mes "- Bring it to Mejai before it withers.";
	close;

OnTouch:
	for ( .@id = 5938; .@id < 5942; .@id++ ) {
		if (isbegin_quest(.@id) == 1) {
			.@quest_id = .@id;
			break;
		}
	}
	if (.@quest_id == 0)
		end;
	setarray .@string$[5938], "EP18_R", "EP18_L", "EP18_T", "EP18_W";
	if (compare(strnpcinfo(2), .@string$[.@quest_id]) == false) {
		cloakonnpc strnpcinfo(0), getcharid(0);
		end;
	}
	end;
}
gw_fild01,280,106,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_R02	4_EP18_HALFFLOWER,7,7
gw_fild01,382,271,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_R03	4_EP18_HALFFLOWER,7,7
gw_fild02,291,248,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_R04	4_EP18_HALFFLOWER,7,7
gw_fild02,119,93,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_R05	4_EP18_HALFFLOWER,7,7
gw_fild02,287,321,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_R06	4_EP18_HALFFLOWER,7,7

gw_fild01,297,310,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_L01	4_EP18_HALFFLOWER,7,7
gw_fild01,219,211,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_L02	4_EP18_HALFFLOWER,7,7
gw_fild01,316,150,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_L03	4_EP18_HALFFLOWER,7,7
gw_fild02,104,338,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_L04	4_EP18_HALFFLOWER,7,7
gw_fild02,207,101,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_L05	4_EP18_HALFFLOWER,7,7
gw_fild02,268,262,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_L06	4_EP18_HALFFLOWER,7,7
gw_fild02,144,94,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_L07	4_EP18_HALFFLOWER,7,7
wolfvill,212,86,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_L08	4_EP18_HALFFLOWER,7,7
wolfvill,143,43,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_L09	4_EP18_HALFFLOWER,7,7
wolfvill,58,113,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_L10	4_EP18_HALFFLOWER,7,7

gw_fild01,157,92,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_T01	4_EP18_HALFFLOWER,7,7
gw_fild01,189,183,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_T02	4_EP18_HALFFLOWER,7,7
gw_fild01,202,358,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_T03	4_EP18_HALFFLOWER,7,7
gw_fild01,279,64,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_T04	4_EP18_HALFFLOWER,7,7
gw_fild01,159,206,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_T05	4_EP18_HALFFLOWER,7,7
gw_fild02,125,367,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_T06	4_EP18_HALFFLOWER,7,7
gw_fild02,114,355,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_T07	4_EP18_HALFFLOWER,7,7
gw_fild02,248,288,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_T08	4_EP18_HALFFLOWER,7,7
wolfvill,258,226,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_T09	4_EP18_HALFFLOWER,7,7
wolfvill,130,203,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_T10	4_EP18_HALFFLOWER,7,7

gw_fild01,48,83,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_W01	4_EP18_HALFFLOWER,7,7
wolfvill,88,57,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_W02	4_EP18_HALFFLOWER,7,7
wolfvill,65,95,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_W03	4_EP18_HALFFLOWER,7,7
wolfvill,78,222,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_W04	4_EP18_HALFFLOWER,7,7
wolfvill,193,238,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_W05	4_EP18_HALFFLOWER,7,7
wolfvill,208,245,1	duplicate(Half Flower#EP18_R01)	Half Flower#EP18_W06	4_EP18_HALFFLOWER,7,7
//-------------------------------------------------------------------


//-------------------------------------------------------------------
// Others daily
gw_fild01,32,101,3	script	Camper#to_wolfvill	4_M_SITDOWN,{
	if (ep18_1_main < 35)
		end;
	if (checkweight(1000405,4) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (checkquest(18086,HUNTING) == 2) {
		mes "[Gatekeeper]";
		mes "Oh, I heard you said it was peaceful, so you did my favor.";
		mes "Thank you.";
		mes "Come on, I'll give you what I have.";
		erasequest 18086;
		setquest 18087;
		add_reputation_points(REPUTATION_EP18, 30);
		if (get_reputation_points(REPUTATION_EP18) >= 5000)
			.@bonus = 1;
		if (get_reputation_points(REPUTATION_EP18) >= 1000 && ep18_1_main == 36) {// Custom implementation: reputation 1000 on wolfvill => player can continue the main quest
			ep18_1_main = 37;
			setquest 18082;
			mes "^4d4dff The villagers of the gray wolf have accepted you as part of the village.^000000";
			mes "You are eligible to participate in the ^4d4dff conference.^000000";
		}
		getitem 1000405,3+.@bonus;	// Ep18_Amethyst_Fragment
		getexp 9956480,2000000;
		next;
	}
	mes "[Gatekeeper]";
	mes "Are you going into town?";
	next;
	switch( select( "To the gray wolf village", "Do not go", "What is it?", "Secure the gray wolf forest" ) ) {
	case 1:
		mes "[Gate]";
		mes "Okay. You have to go through the trees here.";
		mes "Follow me.";
		close2;
		warp "wolfvill",270,26;
		end;
	case 2:
		end;
	case 3:
		end;
	case 4:
		switch( checkquest(18087,PLAYTIME) ) {
		case -1:
			break;
		case 0:
		case 1:
			mes "[Gatekeeper]";
			mes "Um... it'll be fine for a while.";
			mes "It's been a threat to some extent, so if they think about it, they won't attack.";
			close;
		case 2:
			erasequest 18087;
			break;
		}
		switch( checkquest(18086,HUNTING) ) {
		case -1:
			mes "[Gatekeeper]";
			mes "As you can see, I'm guarding the entrance from here, right?";
			mes "Sometimes even though I'm tired, monsters come all the way here and torment me.";
			next;
			mes "[Gatekeeper]";
			mes "Can you kill only 30 monsters in the forest near here, of any kind?";
			mes "I have a piece of amethyst I picked up because it's beautiful, I'll give it to you.";
			next;
			switch( select( "Request accept", "Reject request" ) ) {
			case 1:
				mes "[Gatekeeper]";
				mes "Thank you!";
				mes "Now I can relax and rest a bit!";
				mes "Then I'll ask you.";
				setquest 18086;
				close;
			case 2:
				end;
			}
		case 0:
		case 1:
			mes "[Gatekeeper]";
			mes "Can you kill only 30 monsters in the forest near here, of any kind?";
			mes "I have a piece of amethyst I picked up because it's beautiful, I'll give it to you.";
			close;
		case 2:
			end;
		}
	}
	end;

OnInit:
	// note: click me icon appears after talking to MARAM. Daily quest icon appears later on
	questinfo( QTYPE_CLICKME, QMARK_YELLOW, "ep18_1_main == 35" );

	questinfo( QTYPE_DAILYQUEST, QMARK_YELLOW, "ep18_1_main > 35 && checkquest(18086,HUNTING) == -1 && (checkquest(18087,PLAYTIME) == -1 || checkquest(18087,PLAYTIME) == 2)" );
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "checkquest(18086,HUNTING) == 2" );
	end;
}
//-------------------------------------------------------------------



//--- Others NPCs
//============================================================
oz_dun01,284,164,3	script	Rope#to_ra_fild10	4_ROPEPILE,{
	if (ep18_1_main >= 31) {
		mes "I think I can climb up with a rope.";
		next;
		switch( select( "Use a rope to climb", "Do not use" ) ) {
		case 1:
			close2;
			warp "ra_fild10",173,176;
			end;
		case 2:
			emotion ET_THINK, playerattached();
			end;
		}
	}
	end;

OnInit:
	questinfo( QTYPE_CLICKME, QMARK_YELLOW, "isbegin_quest(11720) == 2" );
	end;
}

oz_dun01,28,190,3	script	Rope#to_gw_fild01	4_ROPEPILE,{
	if (ep18_1_main >= 31) {
		mes "I think I can climb up with a rope.";
		next;
		switch( select( "Use a rope to climb", "Do not use" ) ) {
		case 1:
			close2;
			warp "gw_fild01",275,337;
			end;
		case 2:
			emotion ET_THINK, playerattached();
			end;
		}
	}
	end;

OnInit:
	questinfo( QTYPE_CLICKME, QMARK_YELLOW, "isbegin_quest(11720) == 2" );
	end;
}


gw_fild01,279,335,3	script	Rope#to_oz_dun01	4_ROPEPILE,{
	if (ep18_1_main >= 31) {
		mes "Under the fissures in the rock you can see an underground cavern.";
		mes "I think you can use a rope to get into a crevice.";
		next;
		switch( select( "Use a rope to go down", "Do not use" ) ) {
		case 1:
			close2;
			warp "oz_dun01",27,188;
			end;
		case 2:
			emotion ET_THINK, playerattached();
			end;
		}
	}
	end;

OnInit:
	questinfo( QTYPE_CLICKME, QMARK_YELLOW, "isbegin_quest(11720) > 0" );
	end;
}

ra_fild10,175,179,3	script	Rope#to_oz_dun01_	4_ROPEPILE,{
	if (ep18_1_main >= 31) {
		mes "Under the fissures in the rock you can see an underground cavern.";
		mes "I think you can use a rope to get into a crevice.";
		next;
		switch( select( "Use a rope to go down", "Do not use" ) ) {
		case 1:
			close2;
			warp "oz_dun01",284,167;
			end;
		case 2:
			emotion ET_THINK, playerattached();
			end;
		}
	}
	end;

OnInit:
	questinfo( QTYPE_CLICKME, QMARK_YELLOW, "isbegin_quest(11720) > 0" );
	end;
}



//-------------------------------------------------------------------
// Other NPCs
//-------------------------------------------------------------------

gw_fild01,396,269,3	script	Old milestone#ep18	2_BOARD2,{
	mes "Only traces of a broken bridge over the cliff are visible.";
	mes "This path is not currently in use.";
	close;
}

wolfvill,90,261,6	script	Shale#E18_D7	4_F_RUSWOMAN1,{
	mes "[Shale]";
	mes "I came to a place where there was no one because it was frustrating, but there is also someone here.";
	close;
}

wolfvill,269,68,4	duplicate(dummy_npc)	Vendor#E18_D8	4_F_RUSWOMAN2

wolfvill,167,253,1	duplicate(dummy_npc)	Building materials#hms01	4_WOODBOX
wolfvill,166,252,1	duplicate(dummy_npc)	Building materials#hms02	4_WOODBOX
wolfvill,165,254,1	duplicate(dummy_npc)	Building materials#hms03	4_ROPEPILE
wolfvill,165,250,1	duplicate(dummy_npc)	Building materials#hms04	4_WOODPILE
wolfvill,164,251,1	duplicate(dummy_npc)	Building materials#hms05	4_BRICKPILE

wolfvill,154,217,3	script	Sarana#cmm01	4_EP18_GW_WOMAN01,{
	mes "[Sarana]";
	mes "Here mainly corn and soybeans are planted.";
	mes "It grows well no matter how you plant it. You just need to fertilize it well.";
	next;
	mes "[Sarana]";
	mes "Potatoes also grow steadily, but other than that...";
	mes "Ha... I want to eat food made from wheat.";
	close;
}

wolfvill,146,131,1	duplicate(dummy_npc)	Village child#cmm01	4_EP18_GW_CHILD02

wolfvill,192,146,3	script	Oha#cmm01	4_EP18_GW_MIDDLE01,{
	mes "[Oha]";
	mes "Will this be enough for 35 people? I can't get enough of it even if I cook it every day.";
	close;
}

wolfvill,123,162,7	script	Zen#cmm01	4_EP18_GW_OLD02,{
	mes "[Zen]";
	mes "Just keep it safe so that the primordial fire does not devour this village and forest...";
	close;
}

wolfvill,38,243,5	duplicate(dummy_npc)	#con_admin	CLEAR_NPC

wolfvill,188,140,7	script	Casule#village	4_EP18_GW_CHILD01,{
	mes "[Casule]";
	mes "Hey... it smells delicious.";
	mes "I will wait here until it boils.";
	next;
	mes "[Casule]";
	mes "What if I'm late and I don't have my share?";
	mes "I'm going to wait in line here and eat first.";
	close;
}

wolfvill,202,130,7	script	Hyyares#villager	4_EP18_GW_WOMAN02,{
	mes "[Hyyares]";
	mes "This is a valuable storage container. You must not touch it as it is still ripening.";
	next;
	mes "[Hyyares]";
	mes "It's a fermented food made from fermented species handed down from the days of my grandfather.";
	mes "Actually, I don't like it very much because it smells so stinky.";
	close;
}

wolfvill,224,230,3	script	Director#villager	4_EP18_GW_CHILD02,{
	mes "[Director]";
	mes "You can't go into the water? Why?";
	next;
	mes "[Director]";
	mes "You look so warm and comfortable... I want to play in the water.";
	mes "If you're playing with the wind, you'll soon be full of ash.";
	close;
}


gw_fild01,147,137,2	script	Baby Grey Wolf#wms04	EP18_GREY_WOLF_BABY,{
	end;
OnMove:
	while(1) {
		switch( .move ) {
		case 0:
			.val = !.val;
			setarray .@a[0],147,137;
			setarray .@b[0],147,138;
			break;
		case 1:
			setarray .@a[0],148,127;
			setarray .@b[0],147,127;
			break;
		case 2:
			setarray .@a[0],159,115;
			setarray .@b[0],160,115;
			break;
		case 3:
			setarray .@a[0],159,104;
			setarray .@b[0],160,104;
			break;
		case 4:
			setarray .@a[0],159,93;
			setarray .@b[0],160,93;
			break;
		case 5:
			setarray .@a[0],160,82;
			setarray .@b[0],161,82;
			break;
		case 6:
			.val = !.val;
			setarray .@a[0],161,71;
			setarray .@b[0],162,71;
			break;
		}
		.move = .move + .sens[.val];
		unitstopwalk getnpcid(0),USW_FORCE_STOP;
		unitstopwalk getnpcid(0,"Goat#wms03"),USW_FORCE_STOP;
		unitwalk getnpcid(0),.@a[0],.@a[1];
		unitwalk getnpcid(0,"Goat#wms03"),.@b[0],.@b[1];
		sleep 6000;
	}
	end;
OnInit:
	npcspeed 300;
	setarray .sens[0],1,-1;
	.move = 1;
	donpcevent strnpcinfo(0) + "::OnMove";
	end;
}

gw_fild01,147,138,15	script	Goat#wms03	EP18_GREY_GOAT,{
	end;
OnInit:
	npcspeed 300;
	end;
}


//-------------------------------------------------------------------
// Dummy NPCs (need to check the dialog)
//-------------------------------------------------------------------
// rachel,67,134,8	duplicate(dummy_cloaked_npc)	Guest#E18_8	4_M_OLDSCHOLAR
// rachel,114,66,2	duplicate(dummy_npc)	Flower Lady#E18_9	4_F_GODEMOM
// rachel,55,106,6	duplicate(dummy_npc)	Telling#E18_D6	4_F_07	// an old npc already exists at this location

rachel,135,208,6	duplicate(dummy_npc)	Physics#E18_D1	4_F_MASK
rachel,163,196,4	duplicate(dummy_npc)	Molly#E18_D2	4_F_MASK1
rachel,31,89,6	duplicate(dummy_npc)	Tiling#E18_D5	4_F_02


//-------------------------------------------------------------------
// Merchants NPCs
//-------------------------------------------------------------------

// Storage and unlock reputation feature
wolfvill,167,135,3	script	Assad#asad	4_EP18_GW_MAN01,{
	if (checkweight(1201,1) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you loose some weight. -";
		close;
	}
	if (ep18_1_main < 38) {
		mes "[Assad]";
		mes "" + strcharinfo(0) + ", it's a face I haven't seen in a while.";
		mes "Come to me when you get used to the village.";
		mes "I'll take care of this and that.";
		next;
		mes "[Assad]";
		mes "But the reputation should be enough to attend the ^4d4dffconference^000000.";
		mes "It's not a favor to anyone.";
		next;
		mes "[Assad]";
		mes "If you look closely, there will be places where they need a hand.";
		mes "If you help out a little, you will build up a level between people, right?";
		mes "Try hard";
		close;
	}
	.@reputation = get_reputation_points(REPUTATION_EP18);
	if (.@reputation >= 3000) {
		mes "[Assad]";
		mes "Welcome, my wolf-like " + strcharinfo(0) + ".";
		mes "What do you need?";
		mes "Oh, I've been looking for a better smelting box.";
		mes "Would you like to exchange it for amethyst?";
	}
	else {
		mes "[Assad]";
		mes "Welcome, " + strcharinfo(0) + ".";
		mes "Would you like to organize your luggage?";
		mes "Or I'm in business, would you like to see some stuff?";
	}
	next;
	.@amethyst_name$ = getitemname(1000405);
	if (.@reputation >= 4000)
		.@menu$[2] = "Exchange Smelting Box for " + .@amethyst_name$;
	else if (.@reputation >= 3000)
		.@menu$[1] = "Exchange Smelting Box for " + .@amethyst_name$;
	if (.@reputation >= 2000)
		.@menu$[0] = "Request space movement.";
	switch( select( "Use the warehouse", "Use the store", .@menu$[0], .@menu$[1], .@menu$[2] ) ) {
	case 1:
		mes "[Assad]";
		mes "The warehouse fee is 200z.";
		mes "Which warehouse would you like to open?";
		next;
		switch( select( "Warehouse #1", "" ) ) {
		// switch( select( "Warehouse #1", "Warehouse #2" ) ) {
		case 1:
			if (Zeny < 200)
				end;
			Zeny -= 200;
			mes "[Assad]";
			mes "Come on, I'll open the warehouse.";
			mes "Use it well.";
			close2;
			openstorage();
			end;
		case 2:
			end;
		}
		break;
	case 2:
		mes "[Assad]";
		mes "Do you want to sell your belongings?";
		next;
		switch( select( "Open the store", "Sell your belongings." ) ) {
		case 1:
			close2;
			callshop "Tool Dealer#wolf",1;
			end;
		case 2:
			close2;
			callshop "Tool Dealer#wolf",2;
			end;
		}
		end;
	case 3:
		mes "[Assad]";
		mes "Do you want to teleport to Rachel for 1 " + .@amethyst_name$ + " ?";
		next;
		if (select( "No", "Yes" ) == 1)
			end;
		if (countitem(1000405) < 1) {
			mes "[Assad]";
			mes "You don't have enough material.";
			close;
		}
		delitem 1000405,1;	// Ep18_Amethyst_Fragment
		warp "rachel",115,125;
		end;
	case 4:
		mes "[Assad]";
		mes "Amethyst shop?";
		mes "You can exchange them for a smelting box..";
		close2;
		callshop "barter_ep18_2",1;
		end;
	case 5:
		mes "[Assad]";
		mes "Amethyst shop?";
		mes "You can exchange them for a smelting box..";
		close2;
		callshop "barter_ep18_3",1;
		end;
	}
	end;
}

// (custom tool dealer)
-	shop	Tool Dealer#wolf	-1,611:-1,1750:-1,501:-1,502:-1,503:-1,504:-1,506:-1,645:-1,656:-1,601:-1,602:-1,1065:-1,2239:-1

// Greywolf enchant
wolfvill,164,137,3	script	Emmett#emet	4_EP18_GW_WOMAN01,{
	if (ep18_1_main < 38)
		end;
	disable_items;
	mes "[Emmett]";
	mes "Hello";
	mes "Do you have <ITEM>[Amethyst Fragment]<INFO>1000405</INFO></ITEM>?";
	mes "We are collecting amethyst.";
	next;
	mes "[Emmett]";
	mes "I can provide you powerful crafted ^4d4dff armor and enchantment^000000.";
	mes "What would you like to do?";
	next;
	switch( select( "Exchange Armor", "Greywolf Enchant" ) ) {
	case 1:
		mes "[Emmett]";
		mes "Did you collect a lot of amethyst fragments as promised?";
		mes "Look.";
		close2;
		callshop "barter_ep18_1",1;
		end;
	case 2:
		mes "[Emmett]";
		mes "Choose the part you want to enchant.";
		next;
		switch( select( "Armor", "Garment", "Shoes", "Right acc", "Left(L) acc" ) ) {
		case 1:
			mes "[Emmett]";
			mes "You are enchanting armor.";
			close2;
			item_enchant(1);
			end;
		case 2:
			mes "[Emmett]";
			mes "You are enchanting Garment.";
			close2;
			item_enchant(2);
			end;
		case 3:
			mes "[Emmett]";
			mes "You are enchanting Shoes.";
			close2;
			item_enchant(3);
			end;
		case 4:
			mes "[Emmett]";
			mes "You're giving the right accessory an enchantment.";
			close2;
			item_enchant(4);
			end;
		case 5:
			mes "[Emmett]";
			mes "You are enchanting the accessory on the left.";
			close2;
			item_enchant(5);
			end;
		}
		end;
	}
	end;
}

// item exchange
wolfvill,170,131,3	script	Bamdat#bamdat	4_EP18_GW_OLD02,{
	if (ep18_1_main < 38)
		end;
	disable_items;
	mes "[Night Dart]";
	mes "The priest's villa has changed very strangely, hasn't it?";
	mes "The loot obtained there must also be filled with good beliefs.";
	next;
	mes "[Night Dart]";
	mes "If you wish, I will perform a purification ritual and turn it into a better weapon .";
	mes "My petty skills will be useful.";
	next;
	mes "[Night Dart]";
	mes "Choose between the ^4d4dffnormal purification ritual^000000, which has a lower the refine rate, and the ^4d4dffadvanced purification ritual^000000, which does not lower the refine rate that much.";
	next;
	mes "^4d4dff +9 Reforged Adulter Fides weapon series can be reformed into Vicatus Fides series.^000000";
	mes "^4d4dffThe refinement level varies depending on the selected purification ritual.^000000";
	next;
	switch( select("General Purification Ritual", "Advanced Purification Ritual", "Stop" ) ) {
	case 1:
		mes "[Night Dart]";
		mes "God bless you.";
		close2;
		item_reform("Consecrate_Weapon_1");
		end;
	case 2:
		mes "[Night Dart]";
		mes "God bless you.";
		close2;
		item_reform("Consecrate_Weapon_2");
		end;
	case 3:
		end;
	}
	end;
}
