//===== rAthena Script =======================================
//= Treasure Hunter Quests
//===== By: ==================================================
//= Fredzilla
//===== Current Version: =====================================
//= 1.4
//===== Compatible With: =====================================
//= rAthena Project
//===== 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	62,{
	mes "[Guy]";
	mes "Welcome to the Treasure Hunters Guild "+strcharinfo(0)+".";
	next;
	if (On_Quest == 0) goto N_NewQuest;
	mes "[Guy]";
	mes "Look " +strcharinfo(0)+ ", 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;
	menu "No, never would I leave a quest!",-,"Yah I'm pathetic... Pay 2500z",N_PayZeny;
	mes "[Guy]";
	mes "Good well get back out there.";
	close;
N_PayZeny:
	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;
	set Zeny,Zeny-2500;
	//add time delay penalty. You can get another quest after 2 - 3 hours. [Lupus]
	set #THQ_DELAY, (GetTime(DT_YEAR)*12*31*24+GetTime(DT_MONTH)*31*24+GetTime(DT_DAYOFMONTH)*24+GetTime(DT_HOUR)+rand(2,3));
	mes "[Guy]";
	mes "Its sad to see someone give a quest up...";
	mes "Shame on you.";
	emotion ET_ANGER;
	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(DT_YEAR)*12*31*24 + GetTime(DT_MONTH)*31*24 + GetTime(DT_DAYOFMONTH)*24 + GetTime(DT_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 assign you a Quest?";
	next;
	menu "Yes I would like a Quest Please.",-,"Sorry Guy no time today.",N_NoTime;
	
	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 challenging then the rest, but have better rewards.";
	next;
	set #THQ_DELAY,(GetTime(DT_YEAR)*12*31*24+GetTime(DT_MONTH)*31*24+GetTime(DT_DAYOFMONTH)*24+GetTime(DT_HOUR) + 1); //you can get another quest after 1 hour [Lupus]
	emotion ET_BEST;
	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_NoTime:
	mes "[Guy]";
	mes "Alright maybe next time "+strcharinfo(0)+".";
	emotion ET_SCRATCH;
	close;

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

L_NoQuestsForYet:
	mes "[Guy]";
	mes "I'm afraid there aren't any Quests for you yet.";
	mes "Call in "+ (#THQ_DELAY - (GetTime(DT_YEAR)*12*31*24+GetTime(DT_MONTH)*31*24+GetTime(DT_DAYOFMONTH)*24+GetTime(DT_HOUR)) )+" hours later.";
	emotion ET_SORRY;
	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;
	menu "Lost Old Man.",-,"Master needs his Bow.",N_MasterBow,"The Hit List.",N_HitList,"^FF0000The Sad Widow.^000000",N_SadWidow;
	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 a lot 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.";
	set one_qset,1;
	goto L_QuestGiven;

N_MasterBow:
	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 1072,1; //Delivery_Box
	set one_qset,2;
	goto L_QuestGiven;

N_HitList:
	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 Lunatics^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 tomorrow. When you are done with that list you have just discard it, but you will NOT get another one!.";
	set one_qset,3;
	goto L_QuestGiven;

N_SadWidow:
	mes "^FF0000The Sad Widow^000000";
	mes "^FF0000*************^000000";
	mes "This is just another quest with possible well pay.";
	mes " ";
	mes "There is an old Widow in Prontera, she recently lost her husband due to a monster attack.She has requested a Guild member to come talk to her at the Prontera Graveyard.";
	set one_qset,4;
	goto L_QuestGiven;

///////Job list 2///////
N_JobList2:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	menu "The Strange Letter",-,"Jur for Jeramiah",N_JurJeramiah,"Bee Keepers Hunny",N_BeeHunny,"^FF0000The Wander Man^000000",N_WanderMan;

	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 Morocc. Knowing us we do not ask questions so you must take care of this delivery.";
	mes "The Woman is in located in Morocc and her name is Erika.";
	getitem 1072,1; //Delivery_Message
	set two_qset, 1;
	goto L_QuestGiven;

N_JurJeramiah:
	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; //Jeramiah's_Jur
	set two_qset,2;
	goto L_QuestGiven;

N_BeeHunny:
	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.";
	set two_qset,3;
	goto L_QuestGiven;

N_WanderMan:
	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 possible the letter she sent here sounded like someone was killing her.";
	set two_qset,4;
	goto L_QuestGiven;

///////Job list 3///////
N_JobList3:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	menu "Damn Pixies!",-,"Package Delivery",N_Delivery1,"Prontera Culvert",N_ProntCulvert,"^FF0000Trouble at the Coal Mine^000000",N_CoalMine;
	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 audience, I suggest you hurry.";
	set three_qset,1;
	goto L_QuestGiven;

N_Delivery1:
	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 1082,1; //Delivery_Box_
	set three_qset,2;
	goto L_QuestGiven;

N_ProntCulvert:
	mes "^FF0000Prontera Culvert^000000";
	mes "^FF0000----------------^000000";
	mes "The bugs,They are everywhere!.";
	mes " ";
	mes "The ^FF0000Prontera Culvert^000000 is out of control!Sign up as a volunteer to clean out some of the culvert.";
	next;
	mes "I know it seems like there is no stopping them but however many you kill does makes a difference. After you have signed up, inside the Culvert there will be a Knight that will give you a quest.";
	set three_qset,3;
	goto L_QuestGiven;

N_CoalMine:
	mes "^FF0000Trouble at the Coal Mine^000000";
	mes "^FF0000************************^000000";
	mes "The fun...err...trouble never stops in Rune-Midgarts.";
	mes " ";
	mes "Recently there was an accident 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.";
	set three_qset,4;
	goto L_QuestGiven;

///////Job list 4///////
N_JobList4:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	menu "Zombie Attack",-,"Mystic Wizard",N_MWizard,"Aww shoot!",N_Shoot,"^FF0000Emperium^000000",N_Emp;
	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.";
	set four_qset,1;
	goto L_QuestGiven;

N_MWizard:
	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; //Zed's_Staff
	set four_qset,2;
	goto L_QuestGiven;

N_Shoot:
	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 fountain^000000.";
	set four_qset,3;
	goto L_QuestGiven;

N_Emp:
	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.";
	set four_qset,4;
	goto L_QuestGiven;

///////Job list 5///////
N_JobList5:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	menu "Savage Land",-,"Pyramid's part 1",N_PyrPRT1,"Thinking first",N_Thinkfirst,"^FF0000The not so friendly ghost^000000",N_Ghost;
	mes "^FF0000Savage Land^000000";
	mes "^FF0000-----------^000000";
	mes "Easy for some very hard for others.";
	mes " ";
	mes "A man named Lithin wishes to give you a quest, you can find him north of Prontera inside of ^FF0000The Hidden Temple^000000";
	set five_qset,1;
	goto L_QuestGiven;

N_PyrPRT1:
	mes "^FF0000Pyramid's^000000";
	mes "^FF0000---------^000000";
	mes "Its funny cause no one knows how these were really made.";
	mes " ";
	mes "Apparently the Pyramids have are beginning 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.";
	set five_qset,2;
	goto L_QuestGiven;

N_Thinkfirst:
	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 744,1; //Bouquet
	set five_qset,3;
	goto L_QuestGiven;

N_Ghost:
	mes "^FF0000The not so friendly ghost^000000";
	mes "^FF0000*************************^000000";
	mes "Well no one ever said Casper was nice behind the scenes.";
	mes " ";
	mes "A wizard on the 3rd floor of Geffen tower wants to talk to you about the ancient ruins underneath the city.";
	set five_qset,4;
	goto L_QuestGiven;

///////Job list 6///////
N_JobList6:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	menu "Package for thieves",-,"Pyramid's part 2",N_PyrPRT2,"Special delivery",N_Delivery2,"^FF0000Geffenia^000000",N_Gef;
	mes "^FF0000Package for thieves^000000";
	mes "^FF0000------------------^000000";
	mes "How ironic.";
	mes " ";
	mes "Deliver this Box to the Thieves guild.";
	getitem 1083,1; //Delivery_Box__
	set six_qset,1;
	goto L_QuestGiven;

N_PyrPRT2:
	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.";
	set six_qset,2;
	goto L_QuestGiven;

N_Delivery2:
	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 1083,1; //Delivery_Box__
	set six_qset,3;
	goto L_QuestGiven;

N_Gef:
	mes "^FF0000Geffenia^000000";
	mes "^FF0000********^000000";
	mes "The little children of Geffen have been having strange nightmares.";
	mes " ";
	mes "We believe that the ruins underneath Geffen are causing this problem, talk to a Wizard named Zuuzuu inside Geffen Tower for your mission.";
	set six_qset,4;
	goto L_QuestGiven;

///////Job list 7///////
N_JobList7:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	menu "Apple Juice",-,"Delivery",N_Delivery3,"^FF0000Golden Thief Bug^000000",N_GTB,"^FF0000Evil Pirates^000000",N_EvilPirates;
	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.";
	set seven_qset,1;
	goto L_QuestGiven;

N_Delivery3:
	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 1082,1; //Delivery_Box_
	set seven_qset,2;
	goto L_QuestGiven;

N_GTB:
	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 bottom of the Culvert. Talk to a Knight inside the Culvert.";
	set seven_qset,3;
	goto L_QuestGiven;

N_EvilPirates:
	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 assassin 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.";
	set seven_qset,4;
	goto L_QuestGiven;

///////Job list 8///////
N_JobList8:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	menu "Banana Juice",-,"Another Delivery",N_Delivery4,"My lost beeds",N_LostBeeds,"^FF0000Baphomet!^000000",N_Bapho;
	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.";
	set eight_qset,1;
	goto L_QuestGiven;

N_Delivery4:
	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 Morocc named Klye.";
	getitem 1081,1; //Delivery_Box
	set eight_qset,2;
	goto L_QuestGiven;

N_Bapho:
	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.";
	set eight_qset,3;
	goto L_QuestGiven;

N_LostBeeds:
	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.";
	set eight_qset,4;
	goto L_QuestGiven;

///////Job list 9///////
N_JobList9:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	menu "Smelly Box",-,"Payon Cave",N_PayonC,"^FF0000Sohee's Everywhere!^000000",N_Sohee,"^FF0000Moonlight Flower^000000",N_Moonlight;
	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 1082,1; //Delivery_Box_
	set nine_qset,1;
	goto L_QuestGiven;

N_Sohee:
	mes "^FF0000Sohee's Everywhere!^000000";
	mes "^FF0000******************^000000" ;
	mes "Hmmm seems 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 somewhere in Payon.";
	set nine_qset,2;
	goto L_QuestGiven;

N_Moonlight:
	mes "^FF0000Moonlight Flower^000000";
	mes "^FF0000****************^000000" ;
	mes "Hmmm seems 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 regions of Payon Cave, We don't know much because no one ever seems to make it back alive.";
	set nine_qset,3;
	goto L_QuestGiven;

N_PayonC:
	mes "^FF0000Payon Cave^000000";
	mes "^FF0000----------^000000" ;
	mes "Hmmm seems 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.";
	set nine_qset,4;
	goto L_QuestGiven;

///////Job list 10///////
N_JobList10:
	mes "[Guy]";
	mes "Ok you have a couple quests that can be done here.";
	next;
	menu "The Blank Box",-,"^FF0000Eddga^000000",N_Eddga,"^FF0000Phreeoni^000000",N_Phreeoni,"^FF0000Maya^000000",N_Maya;

	mes "^FF0000The Blank Box^000000";
	mes "^FF0000-------------^000000";
	mes "Package to Morocc";
	mes " ";
	mes "There is nothing written on this box but a notice to deliver it to a man Kreg.";
	getitem 1082,1; //Delivery_Box_
	set ten_qset,1;
	goto L_QuestGiven;

N_Eddga:
	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.";
	set ten_qset,2;
	goto L_QuestGiven;

N_Phreeoni:
	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 doesn't look that tough but you would be surprised. Talk to a man named Caral outside of Ant Hell.";
	set ten_qset,3;
	goto L_QuestGiven;

N_Maya:
	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.";
	set ten_qset,4;
	goto L_QuestGiven;
}
