//===== rAthena Script =======================================
//= Eden Group Quests - Mission [56 - 70]
//===== By: ==================================================
//= L0ne_W0lf
//===== Current Version: =====================================
//= 1.7
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Repetable Quests for Players between Baselevel 56 - 70.
//===== Additional Comments: =================================
//= 1.0 First Version.
//= 1.1 Some little optimization here and there. [Masao]
//= 1.2 Added checkquest confirmation for -1. [Euphy]
//= 1.3 Fixed Puppet Master's Agony Quest (12217 -> 3259). [Joseph]
//= 1.4 Fixed invalid check (Magic Wand Quest). [Joseph]
//= 1.5 Optimized, based on code by Zopokx. [Euphy]
//= 1.6 Added support to Para_Team_Mark_ in Eden Group. [Ragno]
//= 1.7 Added use of F_HasEdenGroupMark function. [Ragno]
//============================================================

moc_para01,42,38,3	script	Mission [56 - 70]	857,{
	if (!callfunc("F_HasEdenGroupMark")) {
		mes "To get these missions, I need to Join the Eden Group first. I must find Secretary Lime Evenor and become a member.";
		close;
	}
	mes "Here is the list of various adventures for level 56~70 adventurers.";
	next;
	mes "Lots of missions such as a Monster Hunting, Delivery Goods, Finding People.";
	next;
	switch(select("Mission Numbers 1~5:Mission Numbers 6~10:Mission Numbers 11~15")) {
	case 1:
		switch(select("What is this Bandage?:Dangerous Alligators.:That wasn't a mermaid...:My country is calling me!")) {
			case 1: callsub L_HuntingQuest,3250,15000,5000,930,30;
			case 2: callsub L_HuntingQuest,3251,16000,6000;
			case 3: callsub L_HuntingQuest,3252,17000,8000;
			case 4: callsub L_Quest,3254,18000,8000,7043,10,1056,30;
		}
	case 2:
		switch(select("Hunt Wild Boar:Preparing the Summer:A Woman's Grudge:Special ingredients:Puppet Master's Agony")) {
			case 1: callsub L_HuntingQuest,3255,16000,7000;
			case 2: callsub L_Quest,3256,15000,5000,918,30;
			case 3: callsub L_HuntingQuest,3257,17000,8000;
			case 4: callsub L_Quest,3258,16000,7000,7198,40;
			case 5: callsub L_HuntingQuest,3259,17000,7000,1060,30;
		}
	case 3:
		switch(select("Tiresome Flies:Dangerous Munak:Make the World green:Magic Wand")) {
			case 1: callsub L_HuntingQuest,3260,16000,6000;
			case 2: callsub L_HuntingQuest,3261,16000,7000;
			case 3: callsub L_Quest,3262,17000,7000,1032,40;
			case 4: callsub L_Quest,3263,18000,8000,1021,30,7150,30;
		}
	}
	end;

L_Quest:
	.@quest_id = getarg(0);
	if (checkquest(.@quest_id) == -1) {
		callsub L_Details, .@quest_id;
		next;
		mes "Would you like to accept this mission?";
		next;
		if(select("Accept the mission.:Do not accept the mission.") == 1) {
			if (BaseLevel < 55 || BaseLevel > 70) {
				mes "These missions are not fit for my level. I should look for other missions.";
				close;
			}
			setquest .@quest_id;
			mes "I have successfully accepted the mission. I have to come back and confirm my work after I complete the mission.";
			next;
			mes "This mission doesn't have time limits.";
		}
		close;
	}
	if (getargcount() > 5) {
		if (countitem(getarg(5)) < getarg(6))
			set .@items,1; //incomplete
		else
			set .@items,2; //complete
	}
	if (checkquest(.@quest_id) < 2 && (countitem(getarg(3)) < getarg(4) || .@items == 1)) {
		mes "You have an on-going mission. Would you like to check the details?";
		next;
		if(select("Check the details.:Cancel.") == 1)
			callsub L_Details, .@quest_id;
		close;
	} else {
		mes "I have done pretty well for the mission. Should I report it now?";
		next;
		if(select("Report the mission.:Do not report it yet.") == 1) {
			delitem getarg(3),getarg(4);
			if (.@items)
				delitem getarg(5),getarg(6);
			getexp getarg(1),getarg(2);
			erasequest .@quest_id;
			mes "You have completed the mission. Get rewards.";
		}
		close;
	}
	end;

L_HuntingQuest:
	.@quest_id = getarg(0);
	if (checkquest(.@quest_id) == -1) {
		callsub L_Details, .@quest_id;
		next;
		mes "Would you like to accept this mission?";
		next;
		if(select("Accept the mission.:Do not accept the mission.") == 1) {
			if (BaseLevel < 55 || BaseLevel > 70) {
				mes "These missions are not fit for my level. I should look for other missions.";
				close;
			}
			setquest .@quest_id;
			mes "I have successfully accepted the mission. I have to come back and confirm my work after I complete the mission.";
			next;
			mes "This mission doesn't have time limits.";
		}
		close;
	}
	if (getargcount() > 3) {
		if (countitem(getarg(3)) < getarg(4))
			set .@items,1; //incomplete
		else
			set .@items,2; //complete
	}
	if (checkquest(.@quest_id,HUNTING) < 2 || .@items == 1) {
		mes "You have an on-going mission. Would you like to check the details?";
		next;
		if(select("Check the details.:Cancel.") == 1)
			callsub L_Details, .@quest_id;
		close;
	} else if (checkquest(.@quest_id,HUNTING) == 2) {
		mes "I have done pretty well for the mission. Should I report it now?";
		next;
		if(select("Report the mission.:Do not report it yet.") == 1) {
			if (.@items)
				delitem getarg(3),getarg(4);
			getexp getarg(1),getarg(2);
			erasequest .@quest_id;
			mes "You have completed the mission. Get rewards.";
		}
		close;
	}
	end;

L_Details:
	switch(getarg(0)) {
	case 3250:
		mes "This mission is assigned by the Rekenber corporation from Lighthalzen. Below are the details.";
		next;
		mes "Rekenber corporation is about to launch a new project called 'Green Medical Center'. For the first product of the project, we are preparing well-being Bandages.";
		next;
		mes "Regarding the project, we need to research monster's reactions when they are wrapped with Rotten Bandages.";
		next;
		mes "If you are interested, please hunt 30 Mummies and bring 30 Rotten Bandages. You can find them in the Pyramid West of Morocc.";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "- Rekenber corporation chief director 'Julie E Delph' -";
		break;
	case 3251:
		mes "This mission is assigned by the Comodo cooperative society. Below are the details.";
		next;
		mes "Alligators have gone wild these days, they attack women and drunken people who hang out near the beach.";
		next;
		mes "This is a very shameful situation for us, the most wonderful vacation spot in Rune-Midgarts.";
		next;
		mes "So, it would be very helpful if you hunt 30 Alligators to clean out this situation.";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		break;
	case 3252:
		mes "This mission is assigned by an unknown client from Izlude.";
		next;
		mes "I have admired the beach of Izlude, ever since I was born.";
		next;
		mes "When I was young, I found a mysterious creature in the Izlude dungeon, I had never seen something like that before...";
		next;
		mes "I instantly thought it was a mermaid. I was so supprised, I have studied about mermaids in whole my life.";
		next;
		mes "But, as I studied harder, I found that the creature was not a mermaid... yes, It wasn't beautiful at all like other mermaids...";
		next;
		mes "I finally tracked down the fact that it was a Merman, not a Mermaid!";
		next;
		mes "Merman... I have wasted my life studying this monster! So please hunt 30 Mermans to make me feel better.";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "-- Izlude 'The Lost dream mermaid' --";
		break;
	case 3254:
		mes "This mission is assigned by the government officer of the Rune-Midgarts Kingdom.";
		next;
		mes "To prevent a flood in Prontera, we decided to build a huge dam to regulate the water supply.";
		next;
		mes "But, we are shorthanded on supplies and we need to collect Fine Sand and Grit.";
		next;
		mes "So, we would like to ask for help. People, please bring us 10 Fine Sand and 30 Grit each so we can build the dam.";
		next;
		mes "You can get those materials from Sand Man, I wish you good luck!";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "-- Government officer of the Rune-Midgarts Kingdom, Dufre Kent --";
		break;
	case 3255:
		mes "This mission is assigned by the Payon town hall.";
		next;
		mes "Wild animals are always annoyances to farmers.";
		next;
		mes "They attack our farm and ruin whole crops!! We can't stand it anymore!";
		next;
		mes "So, we would like to ask for the help from brave adventurers.";
		next;
		mes "Please, hunt 30 Savages to save our crops!";
		next;
		mes "You can easily find those monsters around our town and field.";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "-- Payon town hall members --";
		break;
	case 3256:
		mes "This mission is assigned by the Morocc blacksmith Aragham.";
		next;
		mes "Hello~~~~, Adventurers! This is Aragham, the hottest blacksmith in Morocc!";
		next;
		mes "Anyway, I have a son named Aragam Junior, the cute one. Haha.";
		next;
		mes "He will be attending summer camp this summer, but he doesn't know how to swim.";
		next;
		mes "I want to teach him, but as you know I am a blacksmith, a far cry from swimming! Hehe.";
		next;
		mes "But, I figured that if I make swim fins, it will be great for his confidence~!";
		next;
		mes "To make it, I need 30 Sticky Webfoots from a Roda Frog. Can you bring them to me?";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "PS. Do not compare me with Hollgrehenn or Antonio!!!!";
		next;
		mes "-- The hottest blacksmith, Morocc blacksmith Aragham --";
		break;
	case 3257:
		mes "This mission is assigned by an inventor Dorian from Izlude.";
		next;
		mes "Have you heard the story that if women have a grudge on their mind, it will bring natural disasters.";
		next;
		mes "Wow, so guys must watch out for those sensitive women! Make sure they don't have any grudges on you.";
		next;
		mes "Women can bring strange phenomenons with them!";
		next;
		mes "I am so intrigued with that story that I'm trying to prove that it can be true.";
		next;
		mes "So I need to make women upset! Haha, I know what a mean idea, right?";
		next;
		mes "But this is seriously just for studying... So please hunt 30 Sohee's who seems to be revived from victimized souls.";
		next;
		mes "So I can keep observing the case.";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "-- Elegance inventor Dorian --";
		break;
	case 3258:
		mes "This mission is assigned by Wallah from Payon.";
		next;
		mes "Hello, adventurer. How are you? How is your health?";
		next;
		mes "I am a pharmacist and I am having a hard time getting special ingredients lately.";
		next;
		mes "Because I am a little sensitive girl, how can I possibly get those things by myself.";
		next;
		mes "So, please help me. Just bring 40 Huge Leafs to me, that will be enough to complete my special medicine!";
		next;
		mes "Please bring it as soon as possible, people need my medicine.";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "-- Wallah --";
		break;
	case 3259:
		mes "This mission is assigned by puppet master Woonute from Geffen.";
		next;
		mes "You know being a puppet master is kind of a hard job to satisfy people.";
		next;
		mes "People can search and see so many different things on their own thesedays.";
		next;
		mes "Their expectations are getting high, I can't satisfy them anymore.";
		next;
		mes "But if I can make new toy concepts, like living toys, it will be ground breaking.";
		next;
		mes "I heard that there are live dolls called Marionettes. Can you hunt 30 Marionettes for me? And also bring 30 Golden Hair, those will be great materials for the new toys.";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "-- Puppet Master Woonute --";
		break;
	case 3260:
		mes "This mission is assigned by an exterminator from Prontera.";
		next;
		mes "As the weather gets warmer, insects multiply more and more. It is already out of control.";
		next;
		mes "People in Prontera cannot sleep because of all the bugs in their house.";
		next;
		mes "So, please help us, hunt 30 Hunter Flies. Then the flies can be reduced slowly.";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "-- The Prontera exterminator --";
		break;
	case 3261:
		mes "This mission is assigned by Cheese Dongja from Payon.";
		next;
		mes "Have you heard about Munak?";
		next;
		mes "The ugly monster Munak is threatening people in Payon.";
		next;
		mes "So we need brave adventurers like you!";
		next;
		mes "Please hunt 30 Munaks then Payon will be in peace.";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "- Payon Cheese Dongja -";
		break;
	case 3262:
		mes "This mission is assigned by a gem dealer, Ibraham from Morocc.";
		next;
		mes "A small beautiful flower in the barren desert... What an incredible scene it would be!";
		next;
		mes "Planting flowers can make the world green and it will be so pretty everywhere.";
		next;
		mes "I plan to plant strong flowers in the Morocc desert so the soil gets better.";
		next;
		mes "I need 40 Maneater Blossom from Flora, I know Maneater Blossom is an ugly flower, but still it is a plant.";
		next;
		mes "I hope you can hunt Flora and get me 40 Maneater Blossoms. You are making the world green! Be proud!";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "-- Morocc Ibraham --";
		break;
	case 3263:
		mes "This mission is assigned by the Payon blacksmith Antonio.";
		next;
		mes "Magic wand! Have you heard about it? It is an incredible wand!";
		next;
		mes "If you say the magic words and swing the wand, it will make your wishes come true.";
		next;
		mes "So, I decided to make it by myself. Then I will be rich and powerful~! Haha!!";
		next;
		mes "To make the wand, I need some special materials.";
		next;
		mes "Please bring me 30 Dokebi Horns and 30 Bamboo Cut. If you do so, I will lend you my magic wand once. Haha, good deal?";
		next;
		mes "Please confirm it to us after you complete the mission, then we will give you proper rewards.";
		next;
		mes "-- Payon blacksmith Antonio --";
		break;
	}
	return;
}
