//===== rAthena Script =======================================
//= Lost Farm in Time
//===== Description: =========================================
//= [Walkthrough Conversion]
//= Episode 17.2 Lost Farm in Time
//===== Changelog: ===========================================
//= 1.0 Initial release [crazyarashi]
//= 1.1 Optimizations and cleanup [Everade]
//= 1.2 Cleanup [Capuche]
//============================================================

ba_maison,311,206,3	script	Luina#greeen	4_EP17_BASIC_B,{
	if (checkweight(1000103,20) == 0) {
		mes "- You cannot proceed with the quest because you have too many items. -";
		close;
	}
	if (BaseLevel < 150) {
		mes "[Cotton]";
		mes "Well, you look to weak to work. I don't think you can do it right now.";
		next;
		mes "- This quest is for level 150 or higher -";
		close;
	}
	if (ep17_2_main < 9) {
		mes "- I've met eyes with the automatic doll in front of the farming facility. -";
		next;
		mes "- The doll looked at me up and down, and turn its head. -";
		close;
	}
	if (isbegin_quest(8586) == 0) {
		mes "- I've met eyes with the automatic doll in front of the farming facility. -";
		next;
		mes "[Automatic Doll]";
		mes "Heart rate, blood pressure, and body temperature is all normal.";
		mes "Breathing is normal. Eyes stability normal.";
		mes "Checking registration information...";
		next;
		mes "- The doll looked at me up and down, and as if she look satisfied. -";
		next;
		mes "[Automatic Doll]";
		mes "Hello, " + strcharinfo(0) + "?";
		mes "Did you come to see farming facility?";
		npctalk "Meow.", "Kitty#greeen", bc_self;
		next;
		if (select( "Huh.", "No." ) == 2) {
			mes "[Automatic Doll]";
			mes "This is the farming facility, where Kitty and the others live.";
			mes "Just talk to me, if you're interested.";
			mes "I will explain everything to you.";
			close;
		}
		mes "[Automatic Doll]";
		mes "Kitty, hold still for a minute. Good boy~";
		mes "I am in charge of the farm facility here.";
		mes "I fix the plants, give it fertilizer and feed kitty here and his friends.";
		npctalk "Purr.", "Kitty#greeen", bc_self;
		next;
		mes "[Automatic Doll]";
		mes "The ingredients for the dessert that comes out from the cafeteria is harvested here.";
		mes "Ehem.";
		next;
		mes "[Automatic Doll]";
		mes "There have been a lot of guests lately, so we've been given more orders to harvest.";
		mes "My colleague from an another job has just been assigned to this place, but she's a little clumsy.";
		mes "It's easy to get a good harvest when everyone listens.";
		next;
		select( "You're talkative." );
		mes "[Luina]";
		mes "Oh, I forgot that I should introduce myself first, if I wanted to talk to a guest for a long time.";
		mes "My name is Luina.";
		next;
		mes "[Luina]";
		mes "Kitty here is a plant called a Pitaya. It's an improved ancient species that lived somewhere on this island.";
		mes "I don't know if it's weird, but I'm not a Pitaya, but I'm good at listening.";
		next;
		mes "- Luina stroked the Pitaya. -";
		npctalk "Purr.", "Kitty#greeen", bc_self;
		next;
		mes "[Luina]";
		mes "My master told me, I should name cute little things.";
		mes "Kitty, Butterfly, Happy, and so on.";
		mes "Pitaya is a small and cute creature, so I gave them a name.";
		next;
		mes "[Luina]";
		mes "Kitty is the cutest, the pitaya over here is Kitty.";
		next;
		mes "[Luina]";
		mes "So...";
		mes "Are you here to cut off some tails?";
		next;
		select( "Tail?", "I don't have a tail." );
		mes "[Luina]";
		mes "You're here to cut off some tails, aren't you?";
		mes "Oh, I've made a mistake.";
		mes "Hold on for a while. I'll process the explanation.";
		setquest 8586;
		close;
	}
	if (isbegin_quest(8586) == 1) {
		mes "[Luina]";
		mes "If you look at Kitty right now, He doesn't have roots, right?";
		mes "It absorbs moisture from the air and photosyntheses it even without the roots.";
		mes "Just some fertilizer... and some foods.";
		next;
		mes "[Luina]";
		mes "When you plant the seeds, they grow out of the ground, but I've never seen a multiple sprout before.";
		next;
		mes "[Luina]";
		mes "For the tail, You just grab the Pitaya, stroke it like this, and let them go.";
		next;
		mes "- Luina held the Pitaya, demo to on how to pull the tail and put it down. -";
		next;
		mes "[Luina]";
		mes "No, no. I didn't pull it.";
		mes "The harvested tail is not necessarily enough to eat.";
		mes "You have to take the loss into account.";
		npctalk "Cluck...!", "Kitty#greeen", bc_self;
		next;
		mes "[Luina]";
		mes "You need to remove the seeds and the skin, but it's not difficult.";
		mes "After processing it, the harvested Pitaya tail goes up to the table.";
		next;
		mes "[Luina]";
		mes "Harvesting is actually a bit difficult, so my colleague, 'Silk', will guide you.";
		mes "You can enter even without a harvest. I'll just let you in here without a guide.";
		next;
		mes "[Luina]";
		mes "If you're free, talk to 'Cotton' here, she's the play manager, and she'll let you know what to do.";
		mes "I know it's a little hard for you, but... if you lend us a hand, we will properly compensate you.";
		npctalk "Cotton : I wish it's a little higher...", "Cotton#172_lost_0", bc_self;
		next;
		mes "[Luina]";
		mes "Now that you've heard the instructions, you can enter now.";
		mes "You can just go in if you want to look around.";
		next;
		mes "[Luina]";
		mes "We talked about Cotton's job first, but it's actually the harvest that's more urgent.";
		mes "If you're confident in your combat skills, I'd like you to help with the harvest.";
		mes "I wish you can help me with the harvest...";
		mes "We have to feed Boss Kitty also.";
		next;
		select( "Boss Kitty?" );
		mes "[Luina]";
		mes "I just call him that, He is a little different from the other, it's hiding in a place that's hard to see.";
		mes "If you want to see him around, you'll have to sprink the food and make it a little noisy around the farm.";
		next;
		mes "[Luina]";
		mes "I'm the one in charge of the harvest, so please talk to me anytime you want!";
		completequest 8586;
		next;
		mes "[Luina]";
		mes "Let's talk about the details when you want to help.";
		close;
	}
	if (isbegin_quest(8589) == 1) {
		mes "[Luina]";
		mes "Did the younglings came to play with you?";
		mes "That's strange... I heard you very well.";
		mes "... what? Even Silk?";
		mes "What happened?";
		next;
		select( "She is pretending to be a cat." );
		emotion ET_FRET, getnpcid(0,"Kitty#greeen");
		mes "[Kitty]";
		mes "Cluck.";
		next;
		mes "-- The cat hid behind Luina before she reached it. --";
		next;
		mes "[Luina]";
		mes "What...";
		next;
		mes "[Luina]";
		mes "Maybe... just maybe?";
		mes "It's listening to me?";
		next;
		select( "I guess." );
		mes "[Luina]";
		mes "Kitty.";
		npctalk "*Growl*", "Kitty#greeen", bc_self;
		next;
		mes "[Luina]";
		mes "...";
		mes "Is this what the guests would say as 'embarassed'?";
		npctalk "*Croak*", "Kitty#greeen", bc_self;
		next;
		mes "- When Luina reached out her hand to the cat, it put it's heads up to her hand. -";
		next;
		mes "- Luina's face became complex with a satisfied expression while petting the cat. -";
		next;
		mes "[Luina]";
		mes "Hmm...";
		mes "Won't the guest will be able to befriend meow someday?";
		next;
		mes "[Luina]";
		mes "Wouldn't it be great if we continued playing with them like this?";
		npctalk "*Croak*", "Kitty#greeen", bc_self;
		next;
		mes "[Luina]";
		mes "Yes! Please help Silk again tomorrow as well.";
		mes "Then, one day... You'll be able to befriend all of the Pitayas!";
		mes "Here... it's a token of promise.";
		completequest 8589;
		getitem 1000103,20;
		getexp 3094009,0;
		next;
		mes "[Luina]";
		mes "Probably.";
		npctalk "Quack Quack.", "Kitty#greeen", bc_self;
		next;
		mes "- The cat cried with a high pitch sound as if it's excited. -";
		next;
	}
	switch( checkquest(8587,PLAYTIME) ) {
	case -1:
		break;
	case 0:
	case 1:
		mes "[Luina]";
		mes "We have completed the necessary harvest for today.";
		mes "We will resume our harvest again by dawn. Come back by then.";
		close;
	case 2:
		mes "[Luina]";
		mes "^0000FFOur struggle with the Pitaya seems like a long time ago.^000000";
		mes "^0000FFI now have the courage again to go back into the farming facility again.^000000";
		erasequest 8587;
		close;
	}
	.@party_id = getcharid(1);
	if (.@party_id < 1) {
		mes "^FF0000You must organize for atleast one person or join a party to enter.^000000";
		close;
	}
	.@md_name$ = "Farm Lost in Time";

	setarray .@item[0],1000093,1000094,1000095,1000096,1000097,1000098;
	for ( .@i = 0; .@i < 6; ++.@i ) {
		if (countitem(.@item[.@i]) > 0) {
			.@count = 1;
			delitem .@item[.@i], countitem(.@item[.@i]);
		}
	}
	if (.@count > 0) {
		mes "[Luina]";
		mes "!? What happened? You have a broken tail.";
		mes "I'll take care of that, please.";
		mes "Thank you.... After the next harvest experience, be sure to deliver it to Silk and come out.";
		next;
	}
	mes "[Luina]";
	mes "Hello, " + strcharinfo(0) + ".";
	mes "Are you going to enter the farming facility today?";
	next;
	switch( select( (is_party_leader() ? "Create " + .@md_name$ : ""), "Enter the dungeon.", "Cancel" ) ) {
	case 1:
		if (instance_create(.@md_name$) == -3)
			dispbottom "The reservation of the instance '" + .@md_name$ + "' has failed due to an active instance.";
		mes "[Luina]";
		mes "Please wait for a moment~";
		mes "I'll prepare the food for today.";
		close;
	case 2:
		if (instance_enter(.@md_name$) != IE_OK) {
			mes "^FF0000The memorial dungeon hasn't been created yet.^000000";
			close;
		}
		setquest 8587;
		if (isbegin_quest(8588) > 0)
			erasequest 8588;
		setquest 8588;
		mapannounce "ba_maison", "" + strcharinfo(0) + " of the party, " + .@party_name$ + ", is entering the " + .@md_name$ + ".", bc_map, "0x00FF99";
		end;
	case 3:
		end;
	}
	end;

OnInit:
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "checkquest(8587,PLAYTIME) == -1" );	// condition on ep17_2_main not required
	questinfo( QTYPE_QUEST, QMARK_YELLOW, "checkquest(8587,PLAYTIME) == 2" );
	end;
}


1@lost,1,1,0	script	#lost_farm_control	-1,{
	end;
OnInstanceInit:
	'lost_farm = 0;
	deletearray 'banghae;
	'map_lost$ = instance_mapname("1@lost");
	end;
}

1@lost,161,40,0	script	#startline	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch:
	if (!is_party_leader())
		end;
	disablenpc();
	'lost_farm = 0;
	enablenpc instance_npcname("Wooden Box#01");
	npctalk "Oh! Guest! Over here!!", instance_npcname("Wooden Box#01");
	end;
}

1@lost,163,47,3	script(DISABLED)	Wooden Box#01	4_WOODBOX,{
	if (!is_party_leader()) {
		mes "[Silk]";
		mes "I'll talk to the leader of the guests!";
		mes "Please bring the leader here!";
		close;
	}
	if ('lost_farm == 0) {
		mes "[Silk]";
		mes "Welcome to the breeding ground! I'm silk the one in charge of collecting!";
		npctalk "Silk : Welcome to the breeding ground! I'm silk the one in charge of collecting!";
		next;
		mes "[Silk]";
		mes "Eeek... Save me!";
		npctalk "Silk : Eeek... Save me!";
		close2;
		if ('lost_farm == 0) {
			'lost_farm = 1;
			donpcevent instance_npcname("Wooden Box#01") + "::OnStart";
		}
		end;
	}
	npctalk "Silk : Calm down the Pitayas!";
	end;

OnStart:
	sleep 1000;
	.@event$ = instance_npcname("Wooden Box#01") + "::OnMobDead";
	monster 'map_lost$,155,43,"King Eyes",20660,1, .@event$;
	monster 'map_lost$,154,50,"Happy",20664,1, .@event$;
	monster 'map_lost$,158,49,"Toto",20661,1, .@event$;
	monster 'map_lost$,162,48,"Lightning",20662,1, .@event$;
	monster 'map_lost$,168,49,"Cutie",20660,1, .@event$;
	monster 'map_lost$,170,45,"Woody",20663,1, .@event$;
	monster 'map_lost$,165,42,"Rusk",20664,1, .@event$;
	end;
OnMobDead:
	if (mobcount('map_lost$, instance_npcname("Wooden Box#01") + "::OnMobDead") == 0) {
		'lost_farm = 2;
		disablenpc();
		enablenpc instance_npcname("Silk#01");
		sleep 1000;
		npctalk "Silk : !!", instance_npcname("Silk#01");
	}
	end;
}


1@lost,163,47,3	script(DISABLED)	Silk#01	4_EP17_BASKET,{
	if (!is_party_leader()) {
		mes "[Silk]";
		mes "I'll talk to the leader of the guests!";
		mes "Please bring the leader here!";
		close;
	}
	if ('lost_farm != 2)
		end;
	mes "[Silk]";
	mes "Thank you for saving my life! According to Luina, the Pitaya are a gentle creature!";
	npctalk "Silk : Thank you for saving my life! According to Luina, the Pitaya are a gentle creature!";
	next;
	mes "[Silk]";
	mes "You've seen it too! I'm scared!";
	npctalk "Silk : You've seen it too! I'm scared!";
	next;
	mes "[Silk]";
	mes "Feed and hug for five minutes each? How do I pet them, when they keep showing their teeth?";
	npctalk "Silk : Feed and hug for five minutes each? How do I pet them, when they keep showing their teeth?";
	next;
	mes "[Silk]";
	mes "What else should be done in 5 minutes!";
	npctalk "Silk : What else should be done in 5 minutes!";
	next;
	mes "[Silk]";
	mes "...";
	npctalk "Silk : ...";
	next;
	mes "[Silk]";
	mes "Dear guest...";
	npctalk "Silk : Dear guest...";
	next;
	mes "[Silk]";
	mes "I understand why Luina asked for more worker because she couldn't harvest quickly herself.";
	npctalk "Silk : I understand why Luina asked for more worker because she couldn't harvest quickly herself.";
	next;
	mes "[Silk]";
	mes "But it would be faster to hold it and play with it just like you did, rather than petting it for 5 minutes.";
	npctalk "Silk : But it would be faster to hold it and play with it just like you did, rather than petting it for 5 minutes.";
	next;
	mes "[Silk]";
	mes "... though I can't hold onto it.";
	npctalk "Silk : ... though I can't hold onto it.";
	next;
	mes "[Silk]";
	mes "Let's move on to the next habitat, it's around here. Ready? Here we go!";
	npctalk "Silk : Let's move on to the next habitat, it's around here. Ready? Here we go!";
	close2;
	if ('lost_farm == 2) {
		'lost_farm = 3;
		disablenpc();
		enablenpc instance_npcname("Silk#02");
		instance_warpall 'map_lost$,218,149,instance_id();
	}
	end;
}


1@lost,214,146,3	script(DISABLED)	Silk#02	4_EP17_BASKET,{
	if (!is_party_leader()) {
		mes "[Silk]";
		mes "I'll talk to the leader of the guests!";
		mes "Please bring the leader here!";
		close;
	}
	if ('lost_farm == 3) {
		mes "[Silk]";
		mes "This facility... As you can see, this is a convenient breeding ground for our scaled friends.";
		npctalk "Silk : This facility... As you can see, this is a convenient breeding ground for our scaled friends.";
		next;
		mes "[Silk]";
		mes "Whether it's plants or animals. The temperature and humidity are always constant.";
		npctalk "Silk : Whether it's plants or animals. The temperature and humidity are always constant.";
		next;
		mes "[Silk]";
		mes "I heard it's not pleasant for people, how about breathing?";
		npctalk "Silk : I heard it's not pleasant for people, how about breathing?";
		next;
		mes "[Silk]";
		mes "Now I'm going to sprinkle some food here, too. Let's get this over with. I'll go hide...";
		npctalk "Silk : Now I'm going to sprinkle some food here, too. Let's get this over with... I'll go hide.";
		next;
		mes "[Silk]";
		mes "Hey... Guys, it's time for bars and rice~";
		npctalk "Silk : Hey... Guys, it's time for bars and rice~";
		close2;
		if ('lost_farm == 3) {
			'lost_farm = 4;
			npctalk "Silk : I've sprinkled the food already, they'll show up soon!";
			disablenpc();
			donpcevent instance_npcname("Wooden Box#02") + "::OnStart";
		}
		end;
	}
	if ('lost_farm == 4) {
		mes "[Silk]";
		mes "Haa, haa... I was so scared...";
		npctalk "Silk : Haa, haa... I was so scared...";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Are you sure that you're not playing right now?";
		unittalk getcharid(3), "" + strcharinfo(0) + " : Are you sure that you're not playing right now?";
		next;
		mes "[Silk]";
		mes "I think it's right for them. I told you before, they'll only produce tails if they're in a good mood.";
		npctalk "Silk : I think it's right for them. I told you before, they'll only produce tails if they're in a good mood.";
		next;
		mes "[Silk]";
		mes "By the way, shall we move on to the next location...? We're not done yet, so...";
		npctalk "Silk : By the way, shall we move on to the next location...? We're not done yet, so...";
		next;
		mes "[Silk]";
		mes "The next one is a playground with rocks and sand. When I harvest, I'll have to shake off the sand first...";
		npctalk "Silk : The next one is a playground with rocks and sand. When I harvest, I'll have to shake off the sand first...";
		close2;
		if ('lost_farm == 4) {
			'lost_farm = 5;
			disablenpc();
			enablenpc instance_npcname("Silk#03");
			instance_warpall 'map_lost$,86,101,instance_id();
		}
		end;
	}
	end;
}

1@lost,214,146,3	script(DISABLED)	Wooden Box#02	4_WOODBOX,{
	npctalk "Silk : Save me! I'm going to get eaten by the Pitayas!";
	end;
OnStart:
	enablenpc();
	sleep 1000;
	.@event$ = instance_npcname("Wooden Box#02") + "::OnMobDead";
	monster 'map_lost$,210,148,"Lucy",20662,1, .@event$;
	monster 'map_lost$,208,153,"Elizabeth",20660,1, .@event$;
	monster 'map_lost$,215,151,"Dorothy",20664,1, .@event$;
	monster 'map_lost$,216,151,"Clara",20661,1, .@event$;
	monster 'map_lost$,211,143,"Coco",20662,1, .@event$;
	monster 'map_lost$,211,144,"Cloud",20663,1, .@event$;
	monster 'map_lost$,216,151,"Harmony",20660,1, .@event$;
	sleep 3000;
	npctalk "Silk : He~, Help me~~~~";
	sleep 3000;
	npctalk "Silk : Save the automatic doll~~~~~";
	end;
OnMobDead:
	.@count = mobcount('map_lost$, instance_npcname("Wooden Box#02") + "::OnMobDead");
	if (.@count == 0) {
		'lost_farm = 4;
		disablenpc();
		enablenpc instance_npcname("Silk#02");
		npctalk "Silk : ...Is it over?", instance_npcname("Silk#02");
		end;
	}
	npctalk "Silk : There " + (.@count == 1 ? "is" : "are") + " " + .@count + " left!";
	end;
}


1@lost,91,92,3	script(DISABLED)	Silk#03	4_EP17_BASKET,{
	if (!is_party_leader()) {
		mes "[Silk]";
		mes "I'll talk to the leader of the guests!";
		mes "Please bring the leader here!";
		close;
	}
	if ('lost_farm == 5) {
		mes "[Silk]";
		mes "Don't mind my location...";
		npctalk "Silk : Don't mind my location...";
		next;
		mes "[Silk]";
		mes "Even if it's right to come over to play, at least not with me.";
		npctalk "Silk : Even if it's right to come over to play, at least not with me.";
		next;
		mes "[Silk]";
		mes "But I think they should be playing with you! That's right!";
		npctalk "Silk : But I think they should be playing with you! That's right!";
		next;
		mes "[Silk]";
		mes "Anyway, help me with the next harvest! Hey, guys~ It's time to eat~~";
		npctalk "Silk : Anyway, help me with the next harvest! Hey, guys~ It's time to eat~~";
		close2;
		if ('lost_farm == 5) {
			'lost_farm = 6;
			npctalk "Silk : I've spread the food, so they'll show up soon!";
			disablenpc();
			donpcevent instance_npcname("Wooden Box#03") + "::OnStart";
		}
		end;
	}
	if ('lost_farm == 7) {
		mes "[Silk]";
		mes "Woo...";
		npctalk "Silk : Woo...";
		next;
		mes "[Silk]";
		mes "You and I... are covered in sand...";
		npctalk "Silk : You and I... are covered in sand...";
		next;
		mes "[Silk]";
		mes "Oh, I'm waterproof and dustproof, my core is fine.";
		npctalk "Silk : Oh, I'm waterproof and dustproof, my core is fine.";
		next;
		mes "[Silk]";
		mes "Am I angry? to the guest? no...";
		npctalk "Silk : Am I angry? to the guest? no...";
		next;
		mes "[Silk]";
		mes "The automatic doll... can I be angry? ...Hmmm...";
		npctalk "Silk : The automatic doll... can I be angry? ...Hmmm...";
		next;
		mes "[Silk]";
		mes "...not now, but I feel like I can... hmmm.";
		npctalk "Silk : ...not now, but I feel like I can... hmmm.";
		next;
		mes "[Silk]";
		mes "Next is the playground with an oasis-like pool. Let us go...";
		npctalk "Silk : Next is the playground with an oasis-like pool. Let us go...";
		close2;
		if ('lost_farm == 7) {
			'lost_farm = 8;
			disablenpc();
			enablenpc instance_npcname("Silk#04");
			instance_warpall 'map_lost$,226,256,instance_id();
		}
		end;
	}
	end;
}

1@lost,91,92,3	script(DISABLED)	Wooden Box#03	4_WOODBOX,{
	npctalk "Silk : Kyaaah!";
	end;
OnStart:
	enablenpc();
	sleep 1000;
	.@event$ = instance_npcname("Wooden Box#03") + "::OnMobDead";
	monster 'map_lost$,81,103,"Lotti",20661,1, .@event$;
	monster 'map_lost$,81,99,"Sally",20660,1, .@event$;
	monster 'map_lost$,82,95,"Glory",20662,1, .@event$;
	monster 'map_lost$,91,108,"Connie",20664,1, .@event$;
	monster 'map_lost$,92,105,"Boris",20661,1, .@event$;
	monster 'map_lost$,92,99,"Rony",20664,1, .@event$;
	monster 'map_lost$,89,94,"Mikey",20663,1, .@event$;
	sleep 3000;
	npctalk "Silk : Oh, don't come here~~~";
	sleep 3000;
	npctalk "Silk : Not me, not meeee~~~";
	end;
OnMobDead:
	.@count = mobcount('map_lost$, instance_npcname("Wooden Box#03") + "::OnMobDead");
	if (.@count == 0) {
		'lost_farm = 7;
		disablenpc();
		enablenpc instance_npcname("Silk#03");
		end;
	}
	npctalk "Silk : There " + (.@count == 1 ? "is" : "are") + " " + .@count + " left!";
	end;
}






1@lost,232,257,3	script(DISABLED)	Silk#04	4_EP17_BASKET,{
	if (!is_party_leader()) {
		mes "[Silk]";
		mes "I'll talk to the leader of the guests!";
		mes "Please bring the leader here!";
		close;
	}
	if ('lost_farm == 8) {
		mes "[Silk]";
		mes "Again, don't worry about my location...";
		npctalk "Silk : Again, don't worry about my location...";
		next;
		mes "[Silk]";
		mes "What do you think? I think you're doing good for a first timer.";
		npctalk "Silk : What do you think? I think you're doing good for a first timer.";
		next;
		mes "[Silk]";
		mes "As expected, you have a talent for this! I was right!";
		npctalk "Silk : As expected, you have a talent for this! I was right!";
		next;
		mes "[Silk]";
		mes "Do you think an automatic doll can flatter people? I only told the truth.";
		npctalk "Silk : Do you think an automatic doll can flatter people? I only told the truth.";
		next;
		mes "[Silk]";
		mes "Let's look at your talent and spread the food! Guys~~ It's time to eat~~~";
		npctalk "Silk : Let's look at your talent and spread the food! Guys~~ It's time to eat~~~";
		close2;
		if ('lost_farm == 8) {
			'lost_farm = 9;
			disablenpc();
			donpcevent instance_npcname("Wooden Box#04") + "::OnStart";
		}
		end;
	}
	if ('lost_farm == 10) {
		mes "[Silk]";
		mes "...";
		npctalk "Silk : ...";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Are you okay?";
		unittalk getcharid(3), "" + strcharinfo(0) + " : Are you okay?";
		next;
		mes "[Silk]";
		mes "I think it's a little different from geting used to a guest and getting used to this kind of work.";
		npctalk "Silk : I think it's a little different from geting used to a guest and getting used to this kind of work";
		next;
		mes "[Silk]";
		mes "Let's move on to the next location!";
		npctalk "Silk : Let's move on to the next location!";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Is there another one?";
		unittalk getcharid(3), "" + strcharinfo(0) + " : Is there another one?";
		next;
		mes "[Silk]";
		mes "It may have been a small greenhouse from the outside, but it's an illusion. Look at the ceiling... It's really high, right?";
		npctalk "Silk : It may have been a small greenhouse from the outside, but it's an illusion. Look at the ceiling... It's really high, right?";
		next;
		mes "[Silk]";
		mes "There is a reason why I always guide guests.";
		npctalk "Silk : There is a reason why I always guide guests.";
		next;
		mes "[Silk]";
		mes "Next up is near the entrance, but according to Luina's information, it's a sleepy area. You think it's about to wake up?";
		npctalk "Silk : Next up is near the entrance, but according to Luina's information, it's a sleepy area. You think he's about to wake up?";
		close2;
		if ('lost_farm == 10) {
			'lost_farm = 11;
			disablenpc();
			enablenpc instance_npcname("Silk#05");
			instance_warpall 'map_lost$,242,117,instance_id();
		}
		end;
	}
	end;
}

1@lost,232,257,3	script(DISABLED)	Wooden Box#04	4_WOODBOX,{
	npctalk "Silk : Don't come! Don't come!";
	end;
OnStart:
	enablenpc();
	npctalk "Silk : Hey, guys~ Not me~";
	sleep 1000;
	.@event$ = instance_npcname("Wooden Box#04") + "::OnMobDead";
	monster 'map_lost$,227,261,"Rudolf",20664,1, .@event$;
	monster 'map_lost$,223,262,"Daisy",20663,1, .@event$;
	monster 'map_lost$,217,260,"Adonis",20660,1, .@event$;
	monster 'map_lost$,216,252,"Bingo",20662,1, .@event$;
	monster 'map_lost$,223,253,"Molly",20663,1, .@event$;
	monster 'map_lost$,228,247,"Sammy",20661,1, .@event$;
	monster 'map_lost$,234,253,"Joy",20662,1, .@event$;
	sleep 3000;
	npctalk "Silk : Don't come! Don't comeee!";
	sleep 3000;
	npctalk "Silk : Don't come this waaaaaay!";
	end;
OnMobDead:
	.@count = mobcount('map_lost$, instance_npcname("Wooden Box#04") + "::OnMobDead");
	if (.@count == 0) {
		'lost_farm = 10;
		disablenpc();
		enablenpc instance_npcname("Silk#04");
		npctalk "Silk : ...Oh, my...", instance_npcname("Silk#04");
		end;
	}
	npctalk "Silk : There " + (.@count == 1 ? "is" : "are") + " " + .@count + " left!";
	end;
}


1@lost,247,119,3	script(DISABLED)	Silk#05	4_EP17_BASKET,{
	if (!is_party_leader()) {
		mes "[Silk]";
		mes "I'll talk to the leader of the guests!";
		mes "Please bring the leader here!";
		close;
	}
	if ('lost_farm == 11) {
		mes "[Silk]";
		mes "Deep breaths... Deep Breaths...";
		npctalk "Silk : Deep breaths... Deep Breaths...";
		next;
		mes "[Silk]";
		mes "What? Does an automatic doll breathe deeply? Wouldn't you want to catch a breath if you can't control your mind?";
		npctalk "Silk : What? Does an automatic doll breathe deeply? Wouldn't you want to catch a breath if you can't control your mind?";
		next;
		mes "[Silk]";
		mes "Not with lungs, but... Come to think of it, how does Pitaya make a sounds?";
		npctalk "Silk : Not with lungs, but... Come to think of it, how does Pitaya make a sounds?";
		next;
		mes "[Silk]";
		mes "...I don't want to be afraid.";
		npctalk "Silk : ...I don't want to be afraid.";
		next;
		mes "[Silk]";
		mes "So let's move on... The Pitayas here are sleepyheads, so the responses may be a little different. Now, guys...Come here...";
		npctalk "Silk : So let's move on... The Pitayas here are sleepyheads, so the responses may be a little different. Now, guys...Come here...";
		close2;
		if ('lost_farm == 11) {
			'lost_farm = 12;
			disablenpc();
			donpcevent instance_npcname("Wooden Box#05") + "::OnStart";
		}
		end;
	}
	if ('lost_farm == 13) {
		mes "[Silk]";
		mes "Phew...";
		npctalk "Silk : Phew...";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Are you okay?";
		unittalk getcharid(3), "" + strcharinfo(0) + " : Are you okay?";
		next;
		mes "[Silk]";
		mes "Do 'Cats' bite you?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "I think so.";
		unittalk getcharid(3), "" + strcharinfo(0) + " : I think so.";
		next;
		mes "[Silk]";
		mes "Is there a condition that requires you to bite people to be cute?";
		npctalk "Silk : Is there a condition that requires you to bite people to be cute?";
		next;
		mes "[Silk]";
		mes "As expected... Joy comes with a price.";
		npctalk "Silk : As expected... Joy comes with a price.";
		next;
		mes "[Silk]";
		mes "To enjoy it's cuteness, I'm ready to give my arms and legs...!";
		npctalk "Silk : To enjoy it's cuteness, I'm ready to give my arms and legs...!";
		next;
		mes "[Silk]";
		mes "I saw the guests again. I respect you. Oh, of course, it was admirable from the beginning.";
		npctalk "Silk : I saw the guests again. I respect you. Oh, of course, it was admirable from the beginning.";
		next;
		mes "[Silk]";
		mes "Does an automatic doll make jokes? Oh, you're pretty good at joking. I always mean it.";
		npctalk "Silk : Does an automatic doll make jokes? Oh, you're pretty good at joking. I always mean it.";
		next;
		mes "[Silk]";
		mes "Do we still have something to harvest? I'm sorry about that, too. Let's move to the next section.";
		npctalk "Silk : Do we still have something to harvest? I'm sorry about that, too. Let's move to the next section.";
		close2;
		if ('lost_farm == 13) {
			'lost_farm = 14;
			disablenpc();
			enablenpc instance_npcname("Silk#06");
			instance_warpall 'map_lost$,116,165,instance_id();
		}
		end;
	}
	end;
}

1@lost,247,119,3	script(DISABLED)	Wooden Box#05	4_WOODBOX,{
	npctalk "Silk : Save the automatic doll!";
	end;
OnStart:
	enablenpc();
	npctalk "Silk : ...";
	sleep 1000;
	.@event$ = instance_npcname("Wooden Box#05") + "::OnMobDead";
	monster 'map_lost$,248,115,"Dough",20664,1, .@event$;
	monster 'map_lost$,247,110,"Roro",20663,1, .@event$;
	monster 'map_lost$,246,120,"Jasmine",20661,1, .@event$;
	monster 'map_lost$,243,124,"Melody",20660,1, .@event$;
	monster 'map_lost$,247,120,"Misty",20664,1, .@event$;
	monster 'map_lost$,244,115,"Sandy",20662,1, .@event$;
	monster 'map_lost$,243,116,"Bonnie",20661,1, .@event$;
	sleep 3000;
	npctalk "Silk : .....";
	sleep 3000;
	npctalk "Silk : ........... what's the difference!";
	end;
OnMobDead:
	.@count = mobcount('map_lost$, instance_npcname("Wooden Box#05") + "::OnMobDead");
	if (.@count == 0) {
		'lost_farm = 13;
		disablenpc();
		enablenpc instance_npcname("Silk#05");
		npctalk "Silk : Is it over?!", instance_npcname("Silk#05");
		end;
	}
	npctalk "Silk : There " + (.@count == 1 ? "is" : "are") + " " + .@count + " left!";
	end;
}


1@lost,106,160,3	script(DISABLED)	Silk#06	4_EP17_BASKET,{
	if (!is_party_leader()) {
		mes "[Silk]";
		mes "I'll talk to the leader of the guests!";
		mes "Please bring the leader here!";
		close;
	}
	if ('lost_farm == 14) {
		mes "[Silk]";
		mes "I'm worried...";
		npctalk "Silk : I'm worried...";
		next;
		mes "[Silk]";
		mes "There's no distinction between us, but how canthey tell us apart?";
		npctalk "Silk : There's no distinction between us, but how canthey tell us apart?";
		next;
		mes "[Silk]";
		mes "Do I smell...? Sniff, sniff.";
		npctalk "Silk : Do I smell...? Sniff, sniff.";
		next;
		mes "[Silk]";
		mes "By the way... Today's quota is finally over half.";
		npctalk "Silk : By the way... Today's quota is finally over half.";
		next;
		mes "[Silk]";
		mes "This is all thanks to your help... Thank you so much.";
		npctalk "Silk : This is all thanks to your help... Thank you so much.";
		next;
		mes "[Silk]";
		mes "So let me call the Pitayas around here...";
		npctalk "Silk : So let me call the Pitayas around here...";
		close2;
		if ('lost_farm == 14) {
			'lost_farm = 15;
			disablenpc();
			donpcevent instance_npcname("Wooden Box#06") + "::OnStart";
		}
		end;
	}
	if ('lost_farm == 16) {
		mes "[Silk]";
		mes "Sigh...";
		npctalk "Silk : Sigh...";
		next;
		mes "[Silk]";
		mes "According to Luina's instructions, what's left now is...";
		npctalk "Silk : According to Luina's instructions, what's left now is...";
		next;
		mes "[Silk]";
		mes "Only Boss Meow...";
		npctalk "Silk : Only Boss Meow...";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Boss Meow?";
		unittalk getcharid(3), "" + strcharinfo(0) + " : Boss Meow?";
		next;
		mes "[Silk]";
		mes "If the condition of being cute is biting, then boss meow would be cutest and better at biting as much as the others...";
		npctalk "Silk : If the condition of being cute is biting, then boss meow would be cutest and better at biting as much as the others..";
		next;
		mes "[Silk]";
		mes "...will bite well...?";
		npctalk "Silk : ...it will bite well...?";
		next;
		mes "[Silk]";
		mes "To enjoy it's cuteness, I'm ready to give it not only arms and legs but also my colleagues...!";
		npctalk "Silk : To enjoy it's cuteness, I'm ready to give it not only arms and legs but also my colleagues...!";
		next;
		mes "[Silk]";
		mes "How about it... Dear guest?";
		npctalk "Silk : How about it... Dear guest?";
		next;
		mes "[Silk]";
		mes "Shall we go?";
		npctalk "Silk : Shall we go?";
		close2;
		if ('lost_farm == 16) {
			'lost_farm = 17;
			sleep 3000;
			npctalk "Silk : The rose garden is where Boss Meow usually sleeps, is on the second floor.";
			sleep 3000;
			npctalk "Silk : Let's see, Luina's record... I need to wake up a Big Meow. To get there...";
			sleep 3000;
			npctalk "Silk : ...so, two Big Meow... Boss Meow and Big Meow have a hierarchy, so they have a specific location for napping before mealtime...";
			sleep 3000;
			npctalk "Silk: I guess we just have to soothe one to make them clear the way. Well, if you choose one side, I'll go and... I'll feed the other side...";
			sleep 3000;
			npctalk "Silk : That's okay, I have a good eyesight, so if you get there and give me a signal, I'll take care of it! Now, for the closest one, I'll show you the coordinates on the map...";
			enablenpc instance_npcname("#compass01");
			viewpointmap 'map_lost$,1,38,253,1,0xFFFF00;
			viewpointmap 'map_lost$,1,287,253,2,0xFFFF00;
		}
		end;
	}
	if ('lost_farm == 17) {
		mes "[Silk]";
		mes "You can choose one of the locations on the map and go.";
		viewpointmap 'map_lost$,1,38,253,1,0xFFFF00;
		viewpointmap 'map_lost$,1,287,253,2,0xFFFF00;
		close;
	}
	end;
}

1@lost,113,168,0	script(DISABLED)	#compass01	HIDDEN_WARP_NPC,30,30,{
	end;
OnTouch:
	disablenpc();
	viewpointmap 'map_lost$,1,38,253,1,0xFFFF00;
	viewpointmap 'map_lost$,1,287,253,2,0xFFFF00;
	end;
}

1@lost,106,160,3	script(DISABLED)	Wooden Box#06	4_WOODBOX,{
	npctalk "Silk : Save me!";
	end;
OnStart:
	enablenpc();
	sleep 1000;
	.@event$ = instance_npcname("Wooden Box#06") + "::OnMobDead";
	monster 'map_lost$,108,164,"Berry",20661,1, .@event$;
	monster 'map_lost$,107,169,"Rain",20660,1, .@event$;
	monster 'map_lost$,111,173,"Windy",20663,1, .@event$;
	monster 'map_lost$,115,173,"Poppie",20661,1, .@event$;
	monster 'map_lost$,119,169,"Lala",20662,1, .@event$;
	monster 'map_lost$,111,160,"Sasha",20664,1, .@event$;
	monster 'map_lost$,115,161,"Emerald",20660,1, .@event$;
	npctalk "Silk : I'm~~~";
	sleep 1000;
	npctalk "Silk : ...fine~~~~~";
	sleep 1000;
	npctalk "Silk : Well, I'm telling you~~~~~~~~ Ugh!";
	end;
OnMobDead:
	.@count = mobcount('map_lost$, instance_npcname("Wooden Box#06") + "::OnMobDead");
	if (.@count == 0) {
		'lost_farm = 16;
		disablenpc();
		enablenpc instance_npcname("Silk#06");
		npctalk "Silk : Sigh...", instance_npcname("Silk#06");
		end;
	}
	npctalk "Silk : There " + (.@count == 1 ? "is" : "are") + " " + .@count + " left!";
	end;
}


// traps left side
1@lost,38,257,3	script	Big Meow#01	MD_PITAYA_B,{
	mes "[Big Meow]";
	mes "Purr.";
	next;
	mes "-- Big meow is taking a nap. --";
	close;
}

1@lost,38,256,0	script	#cat01warp	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch:
	if ('lost_farm == 17) {
		'lost_farm = 18;
		npctalk "Big Meow : Grrrrrrr.", instance_npcname("Big Meow#01");
		disablenpc instance_npcname("Big Meow#01");
		disablenpc instance_npcname("#cat01warp");
		disablenpc instance_npcname("#compass01");
		disablenpc instance_npcname("Silk#06");

		enablenpc instance_npcname("banghae#101");
		enablenpc instance_npcname("banghae#102");
		enablenpc instance_npcname("banghae#103");
		enablenpc instance_npcname("banghae#104");
		enablenpc instance_npcname("banghae#105");
		donpcevent instance_npcname("Wooden Box#10") + "::OnStart";

		monster 'map_lost$,38,257,"Big Meow",20662,1, instance_npcname("Wooden Box#10") + "::OnMobDead";
		end;
	}
	npctalk "Big Meow : *Sneeze*";
	warp 'map_lost$,38,226;
	end;
}

1@lost,38,265,0	script(DISABLED)	banghae#101	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	disablenpc();
	'banghae[0] = 1;
	.@event$ = instance_npcname("Wooden Box#10") + "::OnMobDead";
	monster 'map_lost$,39,269,"Pearl",20663,1, .@event$;
	monster 'map_lost$,37,269,"Sapphire",20662,1, .@event$;
	monster 'map_lost$,36,264,"Ruby",20660,1, .@event$;
	monster 'map_lost$,38,268,"Diamond",20661,1, .@event$;
	monster 'map_lost$,36,269,"Emerald",20664,1, .@event$;
	end;
}

1@lost,38,296,0	script(DISABLED)	banghae#102	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	disablenpc();
	'banghae[1] = 1;
	.@event$ = instance_npcname("Wooden Box#10") + "::OnMobDead";
	monster 'map_lost$,35,296,"Sardonyx",20660,1, .@event$;
	monster 'map_lost$,40,296,"Opal",20664,1, .@event$;
	monster 'map_lost$,36,294,"Topaz",20662,1, .@event$;
	monster 'map_lost$,38,299,"Zircon",20661,1, .@event$;
	monster 'map_lost$,34,298,"Amethyst",20663,1, .@event$;
	end;
}

1@lost,51,317,0	script(DISABLED)	banghae#103	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	disablenpc();
	'banghae[2] = 1;
	.@event$ = instance_npcname("Wooden Box#10") + "::OnMobDead";
	monster 'map_lost$,48,319,"Aquamarine",20662,1, .@event$;
	monster 'map_lost$,51,319,"Garnet",20660,1, .@event$;
	monster 'map_lost$,45,317,"Iolite",20663,1, .@event$;
	monster 'map_lost$,49,314,"Citrine",20661,1, .@event$;
	monster 'map_lost$,49,320,"Peridot",20664,1, .@event$;
	monster 'map_lost$,39,300,"Sardonyx",20660,1, .@event$;
	monster 'map_lost$,39,300,"Opal",20664,1, .@event$;
	monster 'map_lost$,39,300,"Topaz",20662,1, .@event$;
	monster 'map_lost$,39,300,"Zircon",20661,1, .@event$;
	monster 'map_lost$,39,300,"Amethyst",20663,1, .@event$;
	end;
}

1@lost,92,317,0	script(DISABLED)	banghae#104	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	disablenpc();
	'banghae[3] = 1;
	.@event$ = instance_npcname("Wooden Box#10") + "::OnMobDead";
	monster 'map_lost$,92,318,"Rutile",20660,1, .@event$;
	monster 'map_lost$,95,317,"Aragonite",20662,1, .@event$;
	monster 'map_lost$,91,316,"Amber",20661,1, .@event$;
	monster 'map_lost$,90,315,"Tanzanite",20662,1, .@event$;
	monster 'map_lost$,89,316,"Obsidian",20662,1, .@event$;
	end;
}

1@lost,135,317,0	script(DISABLED)	banghae#105	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	disablenpc();
	'banghae[4] = 1;
	.@event$ = instance_npcname("Wooden Box#10") + "::OnMobDead";
	monster 'map_lost$,139,317,"Onyx",20660,1, .@event$;
	monster 'map_lost$,139,318,"Tanzite",20663,1, .@event$;
	monster 'map_lost$,132,314,"Jasper",20660,1, .@event$;
	monster 'map_lost$,137,313,"Rodonite",20660,1, .@event$;
	monster 'map_lost$,133,319,"Jet",20662,1, .@event$;
	end;
}


// traps right side
1@lost,286,253,3	duplicate(Big Meow#01)	Big Meow#02	MD_PITAYA_Y

1@lost,287,253,0	script	#cat02warp	HIDDEN_WARP_NPC,4,4,{
	end;
OnTouch:
	if ('lost_farm == 17) {
		'lost_farm = 18;
		npctalk "Big Meow : Grrrrrrr.", instance_npcname("Big Meow#02");
		disablenpc instance_npcname("Big Meow#02");
		disablenpc instance_npcname("#cat02warp");
		disablenpc instance_npcname("#compass01");
		disablenpc instance_npcname("Silk#06");

		enablenpc instance_npcname("banghae#201");
		enablenpc instance_npcname("banghae#202");
		enablenpc instance_npcname("banghae#203");
		enablenpc instance_npcname("banghae#204");
		enablenpc instance_npcname("banghae#205");
		donpcevent instance_npcname("Wooden Box#10") + "::OnStart";

		monster 'map_lost$,286,253,"Big Meow",20661,1, instance_npcname("Wooden Box#10") + "::OnMobDead";
		end;
	}
	npctalk "Big Meow : *Sneeze*";
	warp 'map_lost$,287,226;
	end;
}

1@lost,286,267,0	script(DISABLED)	banghae#201	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	disablenpc();
	'banghae[0] = 1;
	.@event$ = instance_npcname("Wooden Box#10") + "::OnMobDead";
	monster 'map_lost$,283,265,"Pearl",20663,1, .@event$;
	monster 'map_lost$,287,267,"Sapphire",20662,1, .@event$;
	monster 'map_lost$,288,268,"Ruby",20660,1, .@event$;
	monster 'map_lost$,290,265,"Diamond",20661,1, .@event$;
	monster 'map_lost$,288,262,"Emerald",20664,1, .@event$;
	end;
}

1@lost,287,296,0	script(DISABLED)	banghae#202	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	disablenpc();
	'banghae[1] = 1;
	.@event$ = instance_npcname("Wooden Box#10") + "::OnMobDead";
	monster 'map_lost$,287,299,"Sardonyx",20660,1, .@event$;
	monster 'map_lost$,289,298,"Opal",20664,1, .@event$;
	monster 'map_lost$,284,295,"Topaz",20662,1, .@event$;
	monster 'map_lost$,290,291,"Zircon",20661,1, .@event$;
	monster 'map_lost$,287,293,"Amethyst",20663,1, .@event$;
	end;
}

1@lost,270,317,0	script(DISABLED)	banghae#203	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	disablenpc();
	'banghae[2] = 1;
	.@event$ = instance_npcname("Wooden Box#10") + "::OnMobDead";
	monster 'map_lost$,274,318,"Aquamarine",20662,1, .@event$;
	monster 'map_lost$,272,316,"Garnet",20660,1, .@event$;
	monster 'map_lost$,279,318,"Iolite",20663,1, .@event$;
	monster 'map_lost$,278,316,"Citrine",20661,1, .@event$;
	monster 'map_lost$,275,315,"Peridot",20664,1, .@event$;
	end;
}

1@lost,232,317,0	script(DISABLED)	banghae#204	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	disablenpc();
	'banghae[3] = 1;
	.@event$ = instance_npcname("Wooden Box#10") + "::OnMobDead";
	monster 'map_lost$,236,318,"Rutile",20660,1, .@event$;
	monster 'map_lost$,234,318,"Aragonite",20662,1, .@event$;
	monster 'map_lost$,241,316,"Amber",20661,1, .@event$;
	monster 'map_lost$,241,315,"Tanzanite",20662,1, .@event$;
	monster 'map_lost$,239,315,"Obsidian",20662,1, .@event$;
	end;
}

1@lost,195,317,0	script(DISABLED)	banghae#205	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	disablenpc();
	'banghae[4] = 1;
	.@event$ = instance_npcname("Wooden Box#10") + "::OnMobDead";
	monster 'map_lost$,201,317,"Onyx",20662,1, .@event$;
	monster 'map_lost$,199,315,"Tanzite",20663,1, .@event$;
	monster 'map_lost$,201,314,"Jasper",20660,1, .@event$;
	monster 'map_lost$,202,317,"Rodonite",20660,1, .@event$;
	monster 'map_lost$,202,318,"Jet",20662,1, .@event$;
	end;
}


// boss
1@lost,161,315,3	script(DISABLED)	Wooden Box#10	4_WOODBOX,{
	if ('lost_farm < 19) {
		npctalk "Silk : You must play with all the Pitayas on your way here.";
		end;
	}
	if (!is_party_leader()) {
		mes "[Silk]";
		mes "I'll talk to the leader of the guests!";
		mes "Please bring the leader here!";
		close;
	}
	if ('lost_farm == 19) {
		mes "[Silk]";
		mes ".... come this way.";
		npctalk "Silk : .... come this way.";
		next;
		mes "[Silk]";
		mes "Boss Meow...!";
		npctalk "Silk : Boss Meow...!";
		close2;
		disablenpc();
		enablenpc instance_npcname("Wooden Box#10-1");
		sleep 2000;
		if ('lost_farm == 19) {
			'lost_farm = 20;
			donpcevent instance_npcname("#1_lost_boss") + "::OnBossSummon";
		}
		end;
	}
	if ('lost_farm == 21) {
		mes "[Silk]";
		mes "Guest... Huh...";
		npctalk "Silk : Guest... Huh...";
		next;
		mes "[Silk]";
		mes "This is... it's not fear, it's more like resentment...";
		npctalk "Silk : This is... it's not fear, it's more like resentment...";
		next;
		mes "[Silk]";
		mes "We are all the same, but I can't do the same job as Luina...";
		npctalk "Silk : We are all the same, but I can't do the same job as Luina...";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Come out for now.";
		unittalk getcharid(3), "" + strcharinfo(0) + " : Come out for now.";
		close2;
		disablenpc();
		enablenpc instance_npcname("Silk#10");
		npctalk "Silk : Yah!", instance_npcname("Silk#10");
		end;
	}
	end;

OnStart:
	enablenpc();
	sleep 3000;
	mapannounce 'map_lost$, "Silk : Ahhhhhhhhhhhh! Save me!!",bc_yellow;
	sleep 3000;
	mapannounce 'map_lost$, "Silk : I was successful!!!!!!",bc_yellow;
	sleep 3000;
	mapannounce 'map_lost$, "Silk : I'll wait in front of the Boss Meow!",bc_yellow;
	end;

OnMobDead:
	if ('lost_farm != 18 || 'banghae[0] == 0 || 'banghae[1] == 0 || 'banghae[2] == 0 || 'banghae[3] == 0 || 'banghae[4] == 0)
		end;
	if (mobcount('map_lost$, instance_npcname("Wooden Box#10") + "::OnMobDead") == 0) {
		'lost_farm = 19;
		npctalk "Silk : Shh.";
	}
	end;
}

1@lost,161,315,3	script(DISABLED)	Wooden Box#10-1	4_WOODBOX,{
	switch (rand(1,3)) {
	case 1:
		npctalk "Silk : He-Help me~~~~!";
		break;
	case 2:
		npctalk "Silk : Ca-calm Boss Meow down~~~";
		break;
	case 3:
		npctalk "Silk : Here~~ You can have my arm~~";
		break;
	}
	end;
}

1@lost,161,315,3	script(DISABLED)	Silk#10	4_EP17_BASKET,{
	if (!is_party_leader() && 'lost_farm < 22) {
		mes "[Silk]";
		mes "I'll talk to the leader of the guests!";
		mes "Please bring the leader here!";
		close;
	}
	if ('lost_farm == 21) {
		mes "[Silk]";
		mes "The parts that make up each one are different, so what can we use this for...?";
		next;
		mes "[Silk]";
		mes "So this is the only way to harvest in the future...?";
		next;
		mes "[Silk]";
		mes "Well, I can't help it! Did the guests have fun?";
		next;
		mes "[" + strcharinfo(0) + "]";
		mes "Did you have fun?";
		unittalk getcharid(3), "" + strcharinfo(0) + " : Did you have fun?";
		next;
		mes "[Silk]";
		mes "Yes! It's over! Isn't work supposed to be fun when it's over?";
		next;
		mes "[Silk]";
		mes "If you give me the Pitaya tail you have collected, today's farm experience is over! Come on, let's go outside!";
		if ('lost_farm == 21)
			'lost_farm = 22;
		close;
	}
	if (isbegin_quest(8588) == 1) {
		if (checkweight(1000103,8) == 0) {	// (custom)
			mes "^008800Wait a sec!!";
			mes "You cannot receive any more items because you're carrying too many items. Please try again after you lighten up.^000000";
			close;
		}
		mes "[Silk]";
		mes "Let's see... How many did you collect?";
		next;
		setarray .@item[0],1000093,1000094,1000095,1000096,1000097;
		for ( .@i = 0; .@i < 5; ++.@i ) {
			if (countitem(.@item[.@i]) > 0) {
				.@count += countitem(.@item[.@i]);
				delitem .@item[.@i], countitem(.@item[.@i]);
			}
		}
		if (.@count >= 20)
			.@reward = 4;
		else
			.@reward = 2;
		if (countitem(1000098) > 0) {
			delitem 1000098, countitem(1000098);
			.@reward += 2;
		}
		mes "[Silk]";
		mes "The total is " + .@count + ".";
		mes "Thank you for your hard work!";
		erasequest 8588;
		getitem 1000103, .@reward;
		next;
	}
	mes "[Silk]";
	mes "So... do you want to go out?";
	next;
	if (select( "Go out.", "Don't go out." ) == 2) {
		mes "[Silk]";
		mes "Are you waiting for your colleagues?";
		mes "I'll wait for you, so please tell me when you want to go out~";
		close;
	}
	if (isbegin_quest(8589) == 0) {	// first time entering the instance
		mes "[Silk]";
		mes "Luina... I finished the extension report, please say something to the guest after this!";
		mes "I did a great job... *sob*";
		setquest 8589;
	}
	mes "See you next time!";
	close2;
	warp "ba_maison",308,202;
	end;
}


1@lost,1,1,0	script	#1_lost_boss	HIDDEN_WARP_NPC,{
	end;
OnBossSummon:
	monster 'map_lost$,167,318,"Boss Meow",20659,1, instance_npcname("#1_lost_boss") + "::OnBossKill";
	donpcevent instance_npcname("#1_lost_boss") + "::OnSlaveSummon";
	enablenpc instance_npcname("bossbang#301");
	enablenpc instance_npcname("bossbang#302");
	enablenpc instance_npcname("bossbang#401");
	enablenpc instance_npcname("bossbang#402");
	end;
OnBossKill:
	killmonster 'map_lost$, instance_npcname("#1_lost_boss") + "::OnBossKill";
	if ('lost_farm == 20)
		'lost_farm = 21;
	disablenpc instance_npcname("Wooden Box#10-1");
	disablenpc instance_npcname("bossbang#301");
	disablenpc instance_npcname("bossbang#302");
	disablenpc instance_npcname("bossbang#401");
	disablenpc instance_npcname("bossbang#402");
	enablenpc instance_npcname("Wooden Box#10");
	end;
OnSlaveSummon:
	// note: mobs not killed when the boss dies
	monster 'map_lost$,157,316,"Mora",20661,1;
	monster 'map_lost$,167,314,"Max",20664,1;
	monster 'map_lost$,166,319,"Cache",20664,1;
	sleep 3000;
	monster 'map_lost$,172,318,"Sammy",20655,1;
	monster 'map_lost$,172,325,"Lightning",20656,1;
	monster 'map_lost$,169,329,"Daisy",20657,1;
	monster 'map_lost$,156,329,"Rudolf",20658,1;
	monster 'map_lost$,155,318,"Happy",20654,1;
	sleep 3000;
	monster 'map_lost$,156,329,"Joy",20658,1;
	monster 'map_lost$,169,329,"Glory",20657,1;
	monster 'map_lost$,150,323,"King Eyes",20664,1;
	monster 'map_lost$,161,332,"Elizabeth",20656,1;
	sleep 6000;
	monster 'map_lost$,150,320,"Roro",20660,1;
	monster 'map_lost$,152,314,"Toto",20661,1;
	monster 'map_lost$,166,327,"Dough",20664,1;
	monster 'map_lost$,174,318,"Adonis",20660,1;
	monster 'map_lost$,172,313,"Coco",20662,1;
	end;
}

1@lost,135,317,0	script(DISABLED)	bossbang#301	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:	// note: mobs not killed when the boss dies
	monster 'map_lost$,135,319,"Onyx",20656,1;
	monster 'map_lost$,135,316,"Tanzanite","G_PITAYA_V",1;
	monster 'map_lost$,131,313,"Jasper","G_PITAYA_R",1;
	monster 'map_lost$,137,315,"Rhodonite","G_PITAYA_R",1;
	monster 'map_lost$,133,319,"Jet",20656,1;
	end;
}

1@lost,129,317,0	script(DISABLED)	bossbang#302	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	monster 'map_lost$,129,316,"Rutile","G_PITAYA_R",1;
	monster 'map_lost$,132,317,"Aragonite",20656,1;
	monster 'map_lost$,134,316,"Amber","G_PITAYA_Y",1;
	monster 'map_lost$,130,316,"Joysite",20656,1;
	monster 'map_lost$,131,316,"Obsidian",20656,1;
	end;
}

1@lost,195,317,0	script(DISABLED)	bossbang#401	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	monster 'map_lost$,197,313,"Onyx",20656,1;
	monster 'map_lost$,194,315,"Tanzanite","G_PITAYA_V",1;
	monster 'map_lost$,201,313,"Jasper","G_PITAYA_R",1;
	monster 'map_lost$,200,315,"Rhodonite","G_PITAYA_R",1;
	monster 'map_lost$,202,318,"Jet",20656,1;
	end;
}

1@lost,201,317,0	script(DISABLED)	bossbang#402	HIDDEN_WARP_NPC,5,5,{
	end;
OnTouch_:
	monster 'map_lost$,199,316,"Rutile","G_PITAYA_R",1;
	monster 'map_lost$,203,317,"Aragonite",20656,1;
	monster 'map_lost$,204,316,"Amber","G_PITAYA_Y",1;
	monster 'map_lost$,199,315,"Joysite",20656,1;
	monster 'map_lost$,193,315,"Obsidian",20656,1;
	end;
}
