//================= Hercules Script =======================================
//=       _   _                     _
//=      | | | |                   | |
//=      | |_| | ___ _ __ ___ _   _| | ___  ___
//=      |  _  |/ _ \ '__/ __| | | | |/ _ \/ __|
//=      | | | |  __/ | | (__| |_| | |  __/\__ \
//=      \_| |_/\___|_|  \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2012-2015  Hercules Dev Team
//= Copyright (C)  Euphy
//= Copyright (C)  SinSloth
//= Copyright (C)  Samuray22
//= Copyright (C)  Evera
//= Copyright (C)  Silent
//= Copyright (C)  Lupus
//= Copyright (C)  L0ne_W0lf
//= Copyright (C)  kobra_k88
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
//= the Free Software Foundation, either version 3 of the License, or
//= (at your option) any later version.
//=
//= This program is distributed in the hope that it will be useful,
//= but WITHOUT ANY WARRANTY; without even the implied warranty of
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//= GNU General Public License for more details.
//=
//= You should have received a copy of the GNU General Public License
//= along with this program.  If not, see <http://www.gnu.org/licenses/>.
//=========================================================================
//= Quest NPCs related to Prontera
//================= Description ===========================================
//= Collection of Prontera-based quests.
//= - Culvert Access
//= - Ph.D Hat Quest
//= - Gaebolg Family Curse
//================= Current Version =======================================
//= 2.9
//================= Variables Used ========================================
//= Culvert Access:
//= - MISC_QUEST (bit 8)
//= Ph.D Hat Quest:
//= - n/a
//= Gaebolg Family Curse:
//= - prt_curse (max 61)
//=========================================================================

//== Prontera Culvert :: prt_npc ===========================
prt_in,88,105,2	script	Recruiter	8W_SOLDIER,{
	if (MISC_QUEST & 8) {
		mes "[Recruiter]";
		mes "Ah...";
		mes "I know those eyes.";
		mes "Full of compassion";
		mes "...and courage.";
		next;
		mes "[Recruiter]";
		mes "Of course you're a volunteer for campaign to reclaim the Prontera Culvert. Would you let me warp you there?";
		next;
		if (select("Warp to Culvert Entrance.", "Quit.") == 1) {
			warp "prt_fild05",274,208;
			end;
		}
		close;
	}
	mes "[Recruiter]";
	mes "Ah, let me inform you that the Capital Defense Headquarter of the Rune-Midgarts Kingdom has now decided to recruit a punitive force due to the Prontera Culvert's situation.";
	next;
	switch(select("Volunteer.", "Situation...?", "Quit.")) {
	case 1:
		callsub S_Volunteer;
		mes "[Recruiter]";
		mes "Are you ready, hero?";
		mes "I will now warp you";
		mes "to the Culvert.";
		next;
		warp "prt_fild05",274,208;
		end;
	case 2:
		mes "[Recruiter]";
		mes "Haven't you heard...?";
		mes "The Prontera Culvert is infested with all kinds of filthy vermin!";
		next;
		mes "[Recruiter]";
		mes "Due to the serious risk of water contamination, and the safety of Rune-Midgardians, the Culvert has been quarantined by royal decree.";
		next;
		mes "[Recruiter]";
		mes "Needless to say, this has caused shortages in the water supply in our kingdom. Indeed, such a crisis in these dark times...";
		next;
		mes "[Recruiter]";
		mes "Our people";
		mes "thirst for water...";
		mes "But they thirst";
		mes "even more...";
		mes "For a hero!";
		next;
		mes "[Recruiter]";
		mes "Will you stand idly as the children of Rune-Midgarts suffer from parched throats and shed tears of dryness?! Would you bury our children?!";
		next;
		mes "[Recruiter]";
		mes "Warriors! Rune-Midgarts is calling you! Cleanse this land's pestilence and cast out the vermin in the Culvert! Only you... Can make a difference.";
		next;
		if (select("Volunteer.", "Quit.") == 1) {
			callsub S_Volunteer;
			mes "[Recruiter]";
			mes "Adventurer...";
			mes "I will now warp you";
			mes "to the Prontera Culvert.";
			next;
			warp "prt_fild05",274,208;
			end;
		}
		mes "[Recruiter]";
		mes "Hmpf. Well. The next time you take a drink of water, just remember that an average of nine and a half children just died... ^990000Of thirst^000000.";
		close;

	case 3:
		close;
	}

S_Volunteer:
	MISC_QUEST |= 8;
	mes "[Recruiter]";
	mes "Your registration...";
	mes "is now complete.";
	next;
	mes "[Recruiter]";
	mes "I would like to thank you for volunteering to do your part for our great kingdom. Here, take these provisions for your battles against the forces of darkness.";
	next;
	mes "[Recruiter]";
	mes "3 Red Potions, 1 Milk,";
	mes "and 1 Orange Potion";
	mes "...to give you hope.";
	getitem Red_Potion,3;
	getitem Milk,1;
	getitem Orange_Potion,1;
	next;
	return;
}

prt_fild05,270,212,5	script	Culvert Guardian	8W_SOLDIER,{
	if (MISC_QUEST & 8) {
		mes "[Culvert Guardian]";
		mes "Ah, you're one of our volunteers. This is the entrance of the Prontera Culvert.";
		mes "Do you wish to";
		mes "go inside?";
		next;
		if (select("Sure.", "Quit.") == 1) {
			warp "prt_sewb1",131,247;
			end;
		}
		close;
	}
	mes "[Culvert Guardian]";
	mes "I'm sorry, but we can only allow volunteers for the Culvert Campaign to enter.";
	next;
	mes "[Culvert Guardian]";
	mes "If you'd like to volunteer, please visit the ^000077Culvert Registrar^000000 located in the 11 O'clock direction of Prontera.";
	close;
}

//== Ph.D Hat Quest :: npc_6cript ==========================
prt_in,39,100,2	script	Teacher	1_M_INNKEEPER,{
	if ((countitem(Illusion_Flower) > 0) && (countitem(Hinalle) > 0) && (countitem(Aloe) > 0) && (countitem(Ment) > 0)) {
		mes "[Teacher]";
		mes "Oh...";
		mes "Those Flowers in your hand are...";
		next;
		switch(select("Show Flowers", "Present Flowers", "Cancel")) {
		case 1:
			mes "[Teacher]";
			mes "Ah...";
			mes "Those are definitely the 4 kinds of Flowers I was looking for! Would you give them to me?";
			next;
			mes "[Teacher]";
			mes "If you would...";
			mes "I'll give you my precious item.";
			close;
		case 2:
			if ((countitem(Illusion_Flower) > 0) && (countitem(Hinalle) > 0) && (countitem(Aloe) > 0) && (countitem(Ment) > 0)) {
				delitem Illusion_Flower,1;
				delitem Hinalle,1;
				delitem Aloe,1;
				delitem Ment,1;
				getitem(Ph_D_Hat, 1);
				mes "[Teacher]";
				mes "I really really appreciate you what you've done for me. I'm truly grateful. I will give my precious item to you as promised.";
				next;
				mes "[Teacher]";
				mes "This is the Hat I've worn on my Graduation from my University. It reminds me of my happy school days. Please take this...";
				close;
			}
			else {
				mes "[Teacher]";
				mes "... Oh, I'm Sorry.";
				mes "But that's not what I'm looking for. Maybe you need to study flowers a little bit?";
				close;
			}
		}
	}
	else {
		mes "[Teacher]";
		mes "Don't you think...";
		mes "Flowers are pretty?";
		next;
		switch(select("Talk", "Quit")) {
		case 1:
			mes "[Teacher]";
			mes "When I was young,";
			mes "I had no friends and";
			mes "studied all the time.";
			next;
			mes "[Teacher]";
			mes "Sometimes I regret what I did when I was younger, but it's not a big deal now. Through hard study, I finished entire educational courses earlier than all the other students.";
			next;
			mes "[Teacher]";
			mes "However...";
			mes "I was sad and sometimes lonely. Whenever the studying got too hard, I needed someone who would listen to me. Finally, one day, I met my best friend.";
			next;
			mes "[Teacher]";
			mes "When I saw a Pretty Flower blooming in the abandoned Garden, I realized It was my friend which shared my fate.";
			next;
			mes "[Teacher]";
			mes "Although it is a Common and Normal Flower to others, she gave me the reason to study again. I could achieve my goals because of her.";
			next;
			mes "[Teacher]";
			mes "So recently...";
			mes "I am trying to pay her back. Now I am studying Flowers, and plan to over the whole world with them.";
			next;
			mes "[Teacher]";
			mes "To accomplish my work...";
			mes "I need bunches of flowers. But for someone who rarely goes outside, it is really hard to find all the flowers I need.";
			next;
			mes "[Teacher]";
			mes "I need 1 ^3355FFIllusion Flower^000000 ,1 ^3355FFHinalle^000000,1 ^3355FFAloe^000000 and 1 ^3355FFMent^000000. If you can bring them to me, I'd give you my treasure...";
			close;
		case 2:
			mes "[Teacher]";
			mes "One of these days I will cover this whole world with Flowers.";
			close;
		}
	}
}

