//===== Hercules Script ======================================
//= Treasure Hunter Quests
//===== By: ==================================================
//= Fredzilla
//===== Current Version: =====================================
//= 1.4
//===== Description: =========================================
//= Start for Treasure hunter quests
//===== Additional Comments: =================================
//= Event_THQS - Used to check if you have already registered
//= #Treasure_Token - used to keep track of tokens
//= 1.0 - Straight conversionof Aegis NPC file
//= 1.1 Added time penalty to prevent get quests to often [Lupus]
//= 1.2 Fixed not working penalty, added anti-cheat [Lupus]
//= 1.3 Changed some bad RGB Codes. (bugreport:211) [Samuray22]
//= 1.4 Fixed typos. (bugreport:2607) [Kisuka]
//============================================================

yuno_in01,112,151,6	script	Quest Manager	1_M_SIZ,{
	mes "[Guy]";
	mes "Welcome to the Treasure Hunters Guild "+strcharinfo(PC_NAME)+".";
	next;
	if (On_Quest == 0) goto N_NewQuest;
	mes "[Guy]";
	mes "Look " +strcharinfo(PC_NAME)+ ", you can only 1 quest at a time, you should finish the quest unless you have given up.";
	mes "Giving up will cost you ^FF00002500z^000000.";
	next;
	if (select("No, never would I leave a quest!", "Yah I'm pathetic... Pay 2500z") == 1) {
		mes("[Guy]");
		mes("Good well get back out there.");
		close();
	}
	if (Zeny < 2500) goto N_ZenyFail;
	set one_qset, 0;
	set two_qset, 0;
	set three_qset, 0;
	set four_qset, 0;
	set five_qset, 0;
	set six_qset, 0;
	set seven_qset, 0;
	set eight_qset, 0;
	set nine_qset, 0;
	set ten_qset, 0;
	set On_Quest, 0;
	Zeny -= 2500;
	//add time delay penalty. You can get another quest after 2 - 3 hours. [Lupus]
	set #THQ_DELAY, (gettime(GETTIME_YEAR)*12*31*24+gettime(GETTIME_MONTH)*31*24+gettime(GETTIME_DAYOFMONTH)*24+gettime(GETTIME_HOUR)+rand(2,3));
	mes "[Guy]";
	mes "Its sad to see someone give a quest up...";
	mes "Shame on you.";
	emotion 7;
	close;

N_ZenyFail:
	mes "[Guy]";
	mes "Thats sad you don't even have ^FF00002500z^000000.";
	close;

N_NewQuest:
	if (Event_THQS == 0) goto N_Signup;
	//checking if time penalty is over [Lupus]
	if (#THQ_DELAY > (gettime(GETTIME_YEAR)*12*31*24 + gettime(GETTIME_MONTH)*31*24 + gettime(GETTIME_DAYOFMONTH)*24 + gettime(GETTIME_HOUR)) ) goto L_NoQuestsForYet;
	mes "[Guy]";
	mes "Ahh welcome fellow Treasure Hunter.";
	mes "You currently have ^FF0000"+#Treasure_Token+"^000000 treasure tokens!!!";
	mes "Would you like me to asign you a Quest?";
	next;
	if (select("Yes I would like a Quest Please.", "Sorry Guy no time today.") == 2) {
		mes("[Guy]");
		mes("Alright maybe next time.");
		emotion(e_hmm);
		close;
	}

	mes "[Guy]";
	mes "Ok lets see what quest we can give you today.";
	mes "The quest names in ^FF0000This Colour^000000 mean that they are more challanging then the rest, but have better rewards.";
	next;
	set #THQ_DELAY,(gettime(GETTIME_YEAR)*12*31*24+gettime(GETTIME_MONTH)*31*24+gettime(GETTIME_DAYOFMONTH)*24+gettime(GETTIME_HOUR) + 1); //you can get another quest after 1 hour [Lupus]
	emotion 21;
	if(@treasure_job==0) set @treasure_job,rand(1,10); //doesn't allow cheaters to pick any quest they want
	if(@treasure_job==2) goto N_JobList2;
	if(@treasure_job==3) goto N_JobList3;
	if(@treasure_job==4) goto N_JobList4;
	if(@treasure_job==5) goto N_JobList5;
	if(@treasure_job==6) goto N_JobList6;
	if(@treasure_job==7) goto N_JobList7;
	if(@treasure_job==8) goto N_JobList8;
	if(@treasure_job==9) goto N_JobList9;
	if(@treasure_job==10) goto N_JobList10;
	goto N_JobList1; //if(@treasure_job==1)

N_Signup:
	mes "[Guy]";
	mes "I'm afraid you must sign up for the guild before you can go on a quest!";
	emotion 17;
	close;

L_NoQuestsForYet:
	mes "[Guy]";
	mes "I'm afraid there aren't any Quests for you yet.";
	mes "Call in "+ (#THQ_DELAY - (gettime(GETTIME_YEAR)*12*31*24+gettime(GETTIME_MONTH)*31*24+gettime(GETTIME_DAYOFMONTH)*24+gettime(GETTIME_HOUR)) )+" hours later.";
	emotion 17;
	close;

L_QuestGiven:
	set On_Quest,1;
	set @treasure_job,0; //next time u get random quest
	close;

///////Job list 1///////
N_JobList1:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	switch (select("Lost Old Man.", "Master needs his Bow.", "The Hit List.", "^FF0000The Sad Widow.^000000")) {
	case 1:
		mes("[Guy]");
		mes("^FF0000Lost Old Man^000000");
		mes("^FF0000------------^000000");
		mes("This is an easy and low payed quest.");
		mes(" ");
		mes("A wife came in asking us to find his husband, she seems to come in alot asking us to find him over and over again.");
		next();
		mes("[Guy]");
		mes("But he always seems to be around the same place so there isn't much looking involved,check the mountains 1 west and 1 north of prontera.");
		one_qset = 1;
		break;
	case 2:
		mes("[Guy]");
		mes("^FF0000Master needs his Bow^000000");
		mes("^FF0000--------------------^000000");
		mes("This is just a package delivery run, no big deal or anything.");
		mes(" ");
		mes("Take this to an archer in the Archer Village outside of Payon.");
		getitem(Delivery_Message, 1); //Delivery_Box
		one_qset = 2;
		break;
	case 3:
		mes("[Guy]");
		mes("^FF0000The Hit List^000000");
		mes("^FF0000------------^000000");
		mes("In this quest you get to see some action.");
		mes(" ");
		mes("There has been a farmer that keeps having all his crops eaten by ^FF0000Thief Bugs, Porings, and Lunitics^000000 here is a lost of what I need you to do. He is waiting East of Prontera.");
		next();
		mes("[Guy]");
		mes("Ok go to the east and bash those little bastards like there is no tommorow. When you are done with that list you have just discard it, but you will NOT get another one!.");
		one_qset = 3;
		break;
	case 4:
		mes("^FF0000The Sad Widow^000000");
		mes("^FF0000*************^000000");
		mes("This is just another quest with possable well pay.");
		mes(" ");
		mes("There is an old Widow in pontera, she recently lost her husband due to a monster attack.She has requested a Guild member to come talk to her at the Pontera Graveyard.");
		one_qset = 4;
		break;
	}
	goto(L_QuestGiven);

///////Job list 2///////
N_JobList2:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	switch (select("The Strange Letter", "Jur for Jeramiah", "Bee Keepers Hunny", "^FF0000The Wander Man^000000")) {
	case 1:
		mes("^FF0000The Strange Letter^000000");
		mes("^FF0000------------------^000000");
		mes("I do not know much about this quest.");
		mes(" ");
		mes("A strange man came in here yesterday and asked me to deliver this ^FF0000Strange Letter^000000 to some woman in Morroc. Knowing us we do not ask questions so you must take care of this delivery.");
		mes("The Woman is in located in Morroc and her name is Erika.");
		getitem(Delivery_Message, 1);
		two_qset = 1;
		break;
	case 2:
		mes("^FF0000Jur for Jeramiah^000000");
		mes("^FF0000----------------^000000");
		mes("Standard delivery quest.");
		mes(" ");
		mes("Jeramiah ordered a Special Jur from our weapon shop.Your Job is to deliver it to him in the Assasin Temple.");
		getitem(1998, 1);
		two_qset = 2;
		break;
	case 3:
		mes("^FF0000Bee Keepers Hunny^000000");
		mes("^FF0000-----------------^000000");
		mes("Strange man in the marsh need your help.");
		mes(" ");
		mes("There is a strange man in the forest in ^FF00001 south and 1 west^000000 of Prontera, he need your help with something.");
		two_qset = 3;
		break;
	case 4:
		mes("^FF0000The Wander Man^000000");
		mes("^FF0000**************^000000");
		mes("There is a woman in Payon that is in desperate for aid.");
		mes(" ");
		mes("There is a woman in Payon named Molly please get to her as soon as possable the letter she sent here sounded like someone was killing her.");
		two_qset = 4;
		break;
	}
	goto(L_QuestGiven);

///////Job list 3///////
N_JobList3:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	switch (select("Damn Pixies!", "Package Delivery", "Prontera Culvert", "^FF0000Trouble at the Coal Mine^000000")) {
	case 1:
		mes("^FF0000Damn Pixies!^000000");
		mes("^FF0000------------^000000");
		mes("Have you ever been to Hell?");
		mes(" ");
		mes("A man outside of ^FF0000Ant Hell^000000 has requested your audiance, I suggest you hurry.");
		three_qset = 1;
		break;
	case 2:
		mes("^FF0000Package Delivery^000000");
		mes("^FF0000----------------^000000");
		mes("Standard drop off quest.");
		mes(" ");
		mes("In this quest you need to deliver a mystery box to someone names ^FF0000Flank at the bridge between Aldebaran and Juno^000000.");
		getitem(Merchant_Box_2, 1); //Delivery_Box_
		three_qset = 2;
		break;
	case 3:
		mes("^FF0000Prontera Culvert^000000");
		mes("^FF0000----------------^000000");
		mes("The bugs,They are everywere!.");
		mes(" ");
		mes("The ^FF0000Prontera Culvert^000000 is out of control!Sign up as a volenteer to clean out some of the culvert.");
		next();
		mes("I know it seems like there is no stoping them but however many you kill does makes a differance. After you have signed up, inside the Culvert there will be a Knight that will give you a quest.");
		three_qset = 3;
		break;
	case 4:
		mes("^FF0000Trouble at the Coal Mine^000000");
		mes("^FF0000************************^000000");
		mes("The fun...err...trouble never stops in Rune Midgar.");
		mes(" ");
		mes("Recently there was an acident at the coal mines. There was a huge chasm that released some undead Evil Druids.");
		next();
		mes("The Evil Druids started to turn all the workers into the undead. We do not know why, but we do not want to find out, contact a man named Rudolfo outside the Coal Mines.");
		three_qset = 4;
		break;
	}
	goto(L_QuestGiven);

///////Job list 4///////
N_JobList4:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	switch (select("Zombie Attack", "Mystic Wizard", "Aww shoot!", "^FF0000Emperium^000000")) {
	case 1:
		mes("^FF0000Zombie Attack^000000");
		mes("^FF0000-------------^000000");
		mes("The undead have invaded Payon Cave!");
		mes(" ");
		mes("I remember when Payon Cave used to be a safe place to visit, but now undead Zombies have infested the cave! Please contact ^FF0000Flora outside on Payon Cave^000000 and aid her.");
		four_qset = 1;
		break;
	case 2:
		mes("^FF0000Mystic Wizard^000000");
		mes("^FF0000-------------^000000");
		mes("Proto-type of a Staff must be delivered to Zed the Wizard.");
		mes(" ");
		mes("Zed the Wizard has requested to try out a new un-named proto-type staff. It will be your job to deliver this to him. Zed tend to stay within the general area of Juno.");
		getitem(1999, 1);
		four_qset = 2;
		break;
	case 3:
		mes("^FF0000Aww shoot!^000000");
		mes("^FF0000----------^000000");
		mes("A little girl is in trouble.");
		mes(" ");
		mes("There is a little girl in trouble, her name is Dassy and she is ^FF0000east of the prontera fountan^000000.");
		four_qset = 3;
		break;
	case 4:
		mes("^FF0000Emperium^000000");
		mes("^FF0000********^000000");
		mes("This is a strange quest that I know little about.");
		mes(" ");
		mes("Someone in ^FF0000Prontera Guild Hall^000000 has requested to see one of our members, his name is Czhore.");
		four_qset = 4;
		break;
	}
	goto(L_QuestGiven);

///////Job list 5///////
N_JobList5:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	switch (select("Savage Land", "Pyramid's part 1", "Thinking first", "^FF0000The not so friendly ghost^000000")) {
	case 1:
		mes("^FF0000Savage Land^000000");
		mes("^FF0000-----------^000000");
		mes("Easy for some very hard for others.");
		mes(" ");
		mes("A man named Lithin wish's to give you a quest, you can find him north of prontera inside of ^FF0000The Hidden Temple^000000");
		five_qset = 1;
		break;
	case 2:
		mes("^FF0000Pyramid's^000000");
		mes("^FF0000---------^000000");
		mes("Its funny cause no one knows how these were really made.");
		mes(" ");
		mes("Aperently the Pyramids have are beganing to be infested with undead activity,outside the pyramids a man will be waiting for you. He did no give us his name but he asked for you to hurry.");
		five_qset = 2;
		break;
	case 3:
		mes("^FF0000Thinking first^000000");
		mes("^FF0000--------------^000000");
		mes("This sounds like another one of those ditzy girl quests...");
		mes(" ");
		mes("Dazzy the local blond around Geffen has asked for you to deliver her these flowers. I don't know why someone would send flowers to herself...");
		getitem(Bunch_Of_Flowers, 1); //Bouquet
		five_qset = 3;
		break;
	case 4:
		mes("^FF0000The not so friendly ghost^000000");
		mes("^FF0000*************************^000000");
		mes("Well no one ever said Casper was nice behind the sceens.");
		mes(" ");
		mes("A wizard on the 3rd floor of geffen tower want's to talk to you about the anchient ruins underneath the city.");
		five_qset = 4;
		break;
	}
	goto(L_QuestGiven);

///////Job list 6///////
N_JobList6:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	switch (select("Package for thiefs", "Pyramid's part 2", "Special delivery", "^FF0000Geffenia^000000")) {
	case 1:
		mes("^FF0000Package for thiefs^000000");
		mes("^FF0000------------------^000000");
		mes("How ironic.");
		mes(" ");
		mes("Deliver this Box to the Thiefs guild.");
		getitem(Merchant_Box_3, 1); //Delivery_Box__
		six_qset = 1;
		break;
	case 2:
		mes("^FF0000Pyramid's part 2^000000");
		mes("^FF0000----------------^000000");
		mes("More undead action in this triangle!");
		mes(" ");
		mes("Talk to a man outside the entrance of the pyramids, he seems to have another quest for you.");
		six_qset = 2;
		break;
	case 3:
		mes("^FF0000Special delivery^000000");
		mes("^FF0000----------------^000000");
		mes("Well most of what we do is run packages, this is no different from other's.");
		mes(" ");
		mes("Take this box, DO NOT OPEN IT! To a little girl in Lutie named Chirach she should be around santa.");
		getitem(Merchant_Box_3, 1); //Delivery_Box__
		six_qset = 3;
		break;
	case 4:
		mes("^FF0000Geffenia^000000");
		mes("^FF0000********^000000");
		mes("The little children of Geffen have been haveing strange nightmares.");
		mes(" ");
		mes("We belive that the ruins underneath geffen are causeing this problem, talk to a Wizard named Zuuzuu inside Geffen Tower for your mission.");
		six_qset = 4;
		break;
	}
	goto(L_QuestGiven);

///////Job list 7///////
N_JobList7:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	switch (select("Apple Juice", "Delivery", "^FF0000Golden Thief Bug^000000", "^FF0000Evil Pirates^000000")) {
	case 1:
		mes("^FF0000Apple Juice^000000");
		mes("^FF0000-----------^000000");
		mes("Can't say no to some good apple juice.");
		mes(" ");
		mes("There is a little girl up in prontera Square a bit north from the fountain, go talk to her.");
		seven_qset = 1;
		break;
	case 2:
		mes("^FF0000Delivery^000000");
		mes("^FF0000--------^000000");
		mes("So many packages so little time.");
		mes(" ");
		mes("Take this box to a man in Alberta named Charles.");
		getitem(Merchant_Box_2, 1); //Delivery_Box_
		seven_qset = 2;
		break;
	case 3:
		mes("^FF0000Golden Thief Bug^000000");
		mes("^FF0000****************^000000");
		mes("The prontera Culvert has never been the same...");
		mes(" ");
		mes("Well there have been reports of a Golden Thief Bug running around the bottem on the Culvert. Talk to a Knight inside the Culvert.");
		seven_qset = 3;
		break;
	case 4:
		mes("^FF0000Evil Pirates^000000");
		mes("^FF0000************^000000");
		mes("A ghost ship has washed up on shore on an island outside of Izlude.");
		mes(" ");
		mes("A female assasin has a quest for you, she is waiting outside the Ghost Ship.There have been reports of evil undead pirates lurking around inside the ship.");
		seven_qset = 4;
		break;
	}
	goto(L_QuestGiven);

///////Job list 8///////
N_JobList8:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	switch (select("Banana Juice", "Another Delivery", "^FF0000Baphomet!^000000", "My lost beeds")) {
	case 1:
		mes("^FF0000Banana Juice^000000");
		mes("^FF0000------------^000000");
		mes("Sound gross to some good to others.");
		mes(" ");
		mes("There is a little girl up in prontera Square a bit north from the fountain, go talk to her.");
		eight_qset = 1;
		break;
	case 2:
		mes("^FF0000Another Delivery^000000");
		mes("^FF0000----------------^000000");
		mes("Well yah box delivering is in high demand,lots of lazy people.");
		mes(" ");
		mes("Take this package to a man in Morroc named Klye.");
		getitem(Merchant_Box_1, 1); //Delivery_Box
		eight_qset = 2;
		break;
	case 3:
		mes("^FF0000Baphomet!^000000");
		mes("^FF0000*********^000000");
		mes("Hidden in the Temple he watches and guards.");
		mes(" ");
		mes("Rumor has it that a Goat Man is lurking in the Hidden Temple, There is also a man in the Hidden Temple names Zack that needs you help with this Goat Man known as Baphomet.");
		eight_qset = 3;
		break;
	case 4:
		mes("^FF0000My lost Beeds^000000");
		mes("^FF0000-------------^000000");
		mes("Oh great I smell stupidity...");
		mes(" ");
		mes("A little girl in Payon wants to talk to you, her name is Flower, What a stupid name,Hahaha.");
		eight_qset = 4;
		break;
	}
	goto(L_QuestGiven);

///////Job list 9///////
N_JobList9:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	switch (select("Smelly Box", "^FF0000Sohee's Everywere!^000000", "^FF0000Moonlight Flower^000000", "Payon Cave")) {
	case 1:
		mes("^FF0000Smelly Box^000000");
		mes("^FF0000----------^000000");
		mes("Oh god please get this out of here fast.");
		mes(" ");
		mes("Oh man smells like someone died in here.Take this to the Magic School in Geffen and hurry,ahh the smell its burning my eye's!!!");
		getitem(Merchant_Box_2, 1); //Delivery_Box_
		nine_qset = 1;
		break;
	case 2:
		mes("^FF0000Sohee's Everywere!^000000");
		mes("^FF0000******************^000000" );
		mes("Hmmm seem's a man named Jack wants to speak to you in the Archer Guild House.");
		mes(" ");
		mes("Well what we know about Payon is that a while ago there was a freak fire that burnt down the old school.");
		next;
		mes("The strange thing about what happened was that the children inside did not seem to die from the flames.");
		mes("Speak to the little school girl somewere in Payon.");
		nine_qset = 2;
		break;
	case 3:
		mes("^FF0000Moonlight Flower^000000");
		mes("^FF0000****************^000000" );
		mes("Hmmm seem's a man named Jack wants to speak to you in the Archer Guild House.");
		mes(" ");
		mes("Well I don't know much about this, it has to do with the deepest reagions of Payon Cave, We don't know much because no one ever seems to make it back alive.");
		nine_qset = 3;
		break;
	case 4:
		mes("^FF0000Payon Cave^000000");
		mes("^FF0000----------^000000" );
		mes("Hmmm seem's a man named Jack wants to speak to you in the Archer Guild House.");
		mes(" ");
		mes("The farther we go into the cave the stranger it gets.");
		nine_qset = 4;
		break;
	}
	goto(L_QuestGiven);

///////Job list 10///////
N_JobList10:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	switch (select("The Blank Box", "^FF0000Eddga^000000", "^FF0000Phreeoni^000000", "^FF0000Maya^000000")) {
	case 1:
		mes("^FF0000The Blank Box^000000");
		mes("^FF0000-------------^000000");
		mes("Package to Morroc");
		mes(" ");
		mes("There is nothing writen on this box but a notice to deliver it to a man Kreg.");
		getitem(Merchant_Box_2, 1); //Delivery_Box_
		ten_qset = 1;
		break;
	case 2:
		mes("^FF0000Eddga^000000");
		mes("^FF0000*****^000000");
		mes("Tony the Tiger is on crack and destroying the forest.");
		mes(" ");
		mes("Talk to a man outside the 'Hidden' Hunter Guild, He needs your help.");
		ten_qset = 2;
		break;
	case 3:
		mes("^FF0000Phreeoni^000000");
		mes("^FF0000********^000000");
		mes("He is big and Pink and you run and hide!");
		mes(" ");
		mes("This guy just poped into some hole one day, He dosent look that tough but you would be supprised. Talk to a man named Caral outside of Ant Hell.");
		ten_qset = 3;
		break;
	case 4:
		mes("^FF0000Maya^000000");
		mes("^FF0000****^000000");
		mes("Something scary!");
		mes(" ");
		mes("This half naked freak need an army to take down, now its your job, good luck. Meet a girl named Jeni outside of the back entrance to Ant Hell.");
		ten_qset = 4;
		break;
	}
	goto(L_QuestGiven);
}
