//===== eAthena Script ======================================= 
//= Ninja Job Quest
//===== By: ================================================== 
//= Legionaire, Kisuka
//===== Current Version: ===================================== 
//= 1.6
//===== Compatible With: ===================================== 
//= eAthena SVN
//===== Description: ========================================= 
//= Ninja Job Change Quest
//===== Additional Comments: ================================= 
//= 1.1 Optimized, updated, checked [Lupus]
//= 1.2 Added Akagi [Playtester]
//= 1.3 Updated dialogs to official ones and optimized [SinSloth]
//= 1.4 Fixed a minor bug [SinSloth]
//= 1.5 Updated to match AEGIS script and Added Quest Log commands. [Kisuka]
//= 1.6 Fixed AEGIS amatsu warp typo. [Kisuka]
//============================================================ 

alberta,30,65,3	script	Akagi	730,{
	if (Class == Job_Novice) {
		if (JobLevel == 10) {
			mes "[Akagi]";
			mes "Hmmm...";
			mes "You must have come,";
			mes "sensing that someone";
			mes "is waiting for you here.";
			mes "Tell me, do you seek";
			mes "the path of patience?";
			next;
			if(select("No:Yes") == 1) {
				mes "[Akagi]";
				mes "I see.";
				mes "To each his own,";
				mes "I suppose. Take";
				mes "care of yourself.";
				close;
			}
			mes "[Akagi]";
			mes "Very well.";
			mes "Then, let me";
			mes "set you on that";
			mes "path right away...";
			close2;
			switch(rand(3)) {
				case 1:
					warp "amatsu",170,229;
					end;
				case 2:
					warp "amatsu",216,188;
					end;
				default:
					warp "amatsu",178,176;
					end;
			}
		}else{
			mes "[Akagi]";
			mes "Hm? I cannot be";
			mes "of any service to";
			mes "you until you grow";
			mes "a little stronger...";
			close;
		}
	}else{
		mes "[Akagi]";
		mes "Hmm...";
		mes "You and I...";
		mes "We are fairly equal in";
		mes "terms of combat ability.";
		mes "Perhaps we can spar";
		mes "together sometime.";
		close;
	}
}

que_ng,30,65,3	script	Cougar#nq	730,{
	if (Upper == 2) {
		mes "[Cougar]";
		mes "I... I've never";
		mes "seen a baby as";
		mes "powerful as you!";
		mes "G-get away, you";
		mes "freak of nature!";
		close;
	}
	if (Class == Job_Novice) {
		if (JobLevel < 10) {
			mes "[Cougar]";
			mes "Hm? Have you come to";
			mes "learn how to be a Ninja?";
			mes "You're not quite experienced";
			mes "enough yet, so come back";
			mes "after you're more familiar";
			mes "with fighting monsters.";
			close;
		}
		if (NINJ_Q == 0) {
			mes "["+strcharinfo(0)+"]";
			mes "Excuse me.";
			mes "H-hello?";
			next;
			mes "[Cougar]";
			mes "...............................";
			mes "How did you do that?";
			next;
			mes "["+strcharinfo(0)+"]";
			mes "Do what? I didn't";
			mes "do anything, I don't think...";
			next;
			mes "[Cougar]";
			mes "H-How are you able to";
			mes "see me? I'm supposed to";
			mes "be invisible to the naked eye.";
			mes "Ah, now I get it. Wildcat Joe";
			mes "must have sent you to kill me! I won't fall for your tricks! Die!";
			next;
			mes "["+strcharinfo(0)+"]";
			mes "W-wait! I-I don't even";
			mes "know who Wildcat Joe is!";
			mes "Calm down, there's no";
			mes "need to get violent!";
			next;
			mes "[Cougar]";
			mes "What...?";
			mes "How did you dodge";
			mes "all of my attacks?";
			mes "You've got some talent,";
			mes "I'll give you that.";
			next;
			mes "["+strcharinfo(0)+"]";
			mes "...............................";
			mes "I came here hoping";
			mes "to change my job";
			mes "to a Ninja.";
			next;
			mes "[Cougar]";
			mes "...Oh. Is that all?";
			mes "Hmm, you've got great";
			mes "potential, but I can't help";
			mes "you now. I've got too many";
			mes "enemies, and I can't let my";
			mes "guard down for even a second.";
			next;
			mes "[Cougar]";
			mes "That Wildcat Joe is";
			mes "completely ruthless...!";
			mes "He could strike at any time!";
			mes "He'll do anything to achieve";
			mes "victory over his enemies!";
			next;
			mes "[Cougar]";
			mes "Wait, wait, I just";
			mes "thought of something.";
			mes "Maybe you can help me out.";
			mes "Do what I ask, and I'll teach";
			mes "you a few of my skills if you";
			mes "really want to be a Ninja.";
			next;
			if(select("Sure.:No, thanks.") == 2) {
				mes "[Cougar]";
				mes "Hm? Well, alright.";
				mes "Still, I don't see";
				mes "why we can't help";
				mes "each other in this";
				mes "little predicament...";
				close;	
			}
			mes "[Cougar]";
			mes "Great! Now, I wanted to";
			mes "ask Wildcat Joe if he'd";
			mes "agree to a temporary truce.";
			mes "I'm aware that both of us";
			mes "are out of weapons, so we";
			mes "should get well equipped first.";
			next;
			mes "[Cougar]";
			mes "Please take this letter,";
			mes "and deliver it to Wildcat";
			mes "Joe in Einbroch. He's a master";
			mes "of disguise, so keep a careful";
			mes "eye out for him. Ah, and look";
			mes "for him in a high place.";
			next;
			mes "[Cougar]";
			mes "Yeah, Wildcat Joe";
			mes "always did have a thing";
			mes "for hiding in high places.";
			mes "Anyway, after you give him";
			mes "the letter, come back and";
			mes "let me know his answer.";
			set NINJ_Q,1;
			setquest 6015;
			close;
		}
		else if(NINJ_Q == 1) {
			mes "[Cougar]";
			mes "Even if this task";
			mes "isn't that urgent,";
			mes "please hurry over to";
			mes "Einbroch and deliver";
			mes "my letter to Wildcat Joe.";
			close;
		}
		else if(NINJ_Q == 2) {
			mes "[Cougar]";
			mes "Did you deliver that";
			mes "letter to Wildcat Joe?";
			mes "I still need to know his";
			mes "response to my proposal";
			mes "for a truce. Anyway, see";
			mes "if you can needle him for it.";
			close;
		}
		else if(NINJ_Q == 3) {
			mes "[Cougar]";
			mes "Ah, you've returned.";
			mes "So did Wildcat Joe send";
			mes "you back here with his";
			mes "response? Great, great,";
			mes "please let me read it.";
			next;
			mes "[Cougar]";
			mes "What...?! How could he";
			mes "reject my proposal for";
			mes "a truce?! This can only";
			mes "mean that he's made another";
			mes "Kunai. Nuts! I have to catch";
			mes "up to him, or I'm a goner!";
			next;
			mes "[Cougar]";
			mes "Listen, you've got to help";
			mes "me out again! I need you to";
			mes "gather some materials so that";
			mes "I can craft my own Kunai to fight Wildcat Joe. Then, I'll go ahead";
			mes "and change your job to a Ninja.";
			next;
			mes "[Cougar]";
			mes "All you need";
			mes "to bring me is";
			mes "^3355FF5 Cyfars^000000 and";
			mes "^3355FF1 Phracon^000000.";
			mes "Please get those";
			mes "as quickly as you can!";
			next;
			mes "["+strcharinfo(0)+"]";
			mes "Huh? That's funny,";
			mes "Wildcat Joe actually";
			mes "asked me to gather";
			mes "those same materials.";
			next;
			mes "[Cougar]";
			mes "Curses! Then that means...";
			mes "You actually helped Joe";
			mes "in crafting his Kunai! No!";
			mes "I should have thought about";
			mes "that earlier! Well, it's too";
			mes "late now. Just h-hurry it up!";
			set NINJ_Q,4;
			changequest 6017,6018;
			close;
		}
		else if(NINJ_Q == 4) {
			if (countitem(7053) < 5 || countitem(1010) < 1) {
				mes "[Cougar]";
				mes "Hurry and bring";
				mes "^3355FF5 Cyfars^000000 and";
				mes "^3355FF1 Phracon^000000 to me,";
				mes "so that I can craft";
				mes "my own Kunai to use";
				mes "against Wildcat Joe!";
				close;
			}
			if (Skillpoint != 0) {
				mes "[Cougar]";
				mes "Whoa, whoa...";
				mes "You still have some";
				mes "leftover Skill Points.";
				mes "You'd better spend all";
				mes "of them before you";
				mes "change jobs, right?";
				close;
			}
			mes "[Cougar]";
			mes "Ah, you're back with";
			mes "everything that I need.";
			mes "You've come earlier than";
			mes "I expected, eh? Great,";
			mes "as promised, I'll turn";
			mes "you into a Ninja.";
			next;
			mes "[Cougar]";
			mes "Let me formally introduce";
			mes "myself. I am High Ninja Cougar";
			mes "in the Touga Ninja Corps, and";
			mes "I'm in charge of the search";
			mes "party to find Sir Kazma.";
			next;
			mes "[Cougar]";
			mes "Sir Kazma is the chief";
			mes "of my village, but he's";
			mes "run away. This has resulted";
			mes "in an internal conflict within";
			mes "the Ninja Corps. Things are";
			mes "pretty unstable right now...";
			next;
			mes "[Cougar]";
			mes "I initially didn't want to";
			mes "accept you as a Ninja because";
			mes "of this complicated situation.";
			mes "However, you've proven that";
			mes "you're truly worthy of joining";
			mes "the Ninja ranks.";
			next;
			mes "[Cougar]";
			mes "According to his letter, even";
			mes "Joe thinks highly of you. Just";
			mes "remember that, as a Ninja, your";
			mes "mission is your highest priority. But don't let mission objectives";
			mes "supercede your conscience.";
			next;
			mes "[Cougar]";
			mes "''Secrecy above all else.''";
			mes "To keep our secrets in the";
			mes "shadows, you can only buy";
			mes "or sell Ninja weapons with";
			mes "authorized dealers. Please";
			mes "keep that in mind.";
			next;
			mes "[Cougar]";
			mes "As of today, you are";
			mes "now a proud member of the";
			mes "Touga Ninja Corps. Be as";
			mes "agile as the wind, and as";
			mes "quiet as the falling shadows.";
			callfunc "Job_Change",Job_Ninja;
			set NINJ_Q,5;
			getitem 13010,1;	// Asura
			completequest 6018;
			close;
		}
		else {
			mes "[Cougar]";
			mes "How have you been?";
			mes "Train hard: you want";
			mes "to be able to vanish";
			mes "without a trace. If you";
			mes "can do that, you'll get";
			mes "the respect of any Ninja~";
			close;
		}
	}else{
		if (Class == Job_Ninja) {
			mes "[Cougar]";
			mes "How have you been?";
			mes "Train hard: you want";
			mes "to be able to vanish";
			mes "without a trace. If you";
			mes "can do that, you'll get";
			mes "the respect of any Ninja~";
			close;
		}else{
			mes "[Cougar]";
			mes "What...?";
			mes "How were you able";
			mes "to find me hidden";
			mes "in the shadows?!";
			mes "You must be more than";
			mes "a common adventurer, eh?";
			close;
		}
	}
}

einbroch,184,194,3	script	Suspicious Man#nq	 	881,{
	if (NINJ_Q == 1) {
		mes "[Suspicious Man]";
		mes "I've traveled to many";
		mes "countries, but I've never";
		mes "been on a building as high";
		mes "as Einbroch Tower. All the";
		mes "buildings in my hometown";
		mes "are tiny in comparison...";
		next;
		mes "["+strcharinfo(0)+"]";
		mes "Oh, are you from";
		mes "Amatsu? I'm looking";
		mes "for someone named";
		mes "Wildcat Joe from there.";
		next;
		mes "[Suspicious Man]";
		mes "...No. No, I'm actually";
		mes "from Izlude, and I'm only";
		mes "here in Einbroch for some";
		mes "minerals. Tell me, why are";
		mes "you looking for this Wildcat Joe?";
		next;
		mes "["+strcharinfo(0)+"]";
		mes "Well, I need to deliver";
		mes "this letter to him and";
		mes "get his response so that";
		mes "I can become a Ninja.";
		next;
		mes "[Suspicious Man]";
		mes "Really? Now that I think";
		mes "about it, I do think that I've";
		mes "run once or twice into him";
		mes "in this town. Though, he prefers to be called ''Red Leopard Joe,''";
		mes "instead of ''Wildcat Joe.''";
		next;
		mes "["+strcharinfo(0)+"]";
		mes "I really want to help you";
		mes "find him, but first I need";
		mes "to find the minerals that";
		mes "I'm looking for. If you don't";
		mes "mind, would you help me?";
		mes "Then I can help you find Joe.";
		next;
		if(select("Don't worry, I'll find him alone.:Sure, I'll help you.") == 1) {
			mes "[Suspicious Man]";
			mes "You sure about that...?";
			mes "Red Leopard Joe is a true";
			mes "master of disguise. You'll";
			mes "need all the help you can";
			mes "get to find him...";
			close;
		}
		mes "[Suspicious Man]";
		mes "Great, I'm glad to";
		mes "hear that. Please";
		mes "help me find";
		mes "^3355FF5 Cyfars^000000 and";
		mes "^3355FF1 Phracon^000000.";
		set NINJ_Q,2;
		changequest 6015,6016;
		close;
	}
	else if(NINJ_Q == 2) {
		if (countitem(7053) < 5 || countitem(1010) < 1) {
			mes "[Suspicious Man]";
			mes "Please bring";
			mes "^3355FF5 Cyfars^000000 and";
			mes "^3355FF1 Phracon^000000 to me as";
			mes "soon as you can. Then,";
			mes "I can help you find";
			mes "Red Leopard Joe.";
			close;	
		}
		mes "[Suspicious Man]";
		mes "Good, good. You've";
		mes "brought the minerals...";
		mes "Now, it's my turn to";
		mes "help you now. Here,";
		mes "let me see that letter.";
		next;
		mes "["+strcharinfo(0)+"]";
		mes "?????!!";
		next;
		mes "[Suspicious Man]";
		mes "Why? Didn't you bring Cougar's letter for me?";
		next;
		mes "["+strcharinfo(0)+"]";
		mes "Are you...";
		mes "Are you Wildcat Joe?";
		next;
		mes "[Suspicious Man]";
		mes "...Yes, but I prefer to";
		mes "be called Red Leopard Joe.";
		mes "Cougar sent you to me, right?";
		mes "He's the only one who calls";
		mes "me that. So you want to be";
		mes "a Ninja, eh? Hmm, alright.";
		next;
		mes "[Red Leopard Joe]";
		mes "If you want to be a Ninja,";
		mes "you should always be careful";
		mes "of what you see and what you trust. Don't forget that if your";
		mes "secrets are ever discovered, then you're finished as a Ninja.";
		next;
		mes "[Red Leopard Joe]";
		mes "Remember to move";
		mes "quickly, and to always";
		mes "vanish without a trace.";
		mes "To remain hidden in the";
		mes "shadows is really our";
		mes "ultimate power.";
		next;
		mes "["+strcharinfo(0)+"]";
		mes "I see...";
		mes "...........";
		next;
		mes "[Red Leopard Joe]";
		mes "For now, let me read";
		mes "this letter. Let's see...";
		mes "Hm. I thought that Cougar";
		mes "would want to challenge me";
		mes "again, but he actually wants";
		mes "a temporary truce? Hah!";
		next;
		mes "[Red Leopard Joe]";
		mes "Thanks to your help,";
		mes "I now have the minerals";
		mes "I need to construct a Kunai!";
		mes "Hahaha! I won't agree to a truce when I have the advantage!";
		next;
		mes "[Red Leopard Joe]";
		mes "Anyway, let me write my";
		mes "response to him. I'll also";
		mes "give you my recommendation...";
		mes "I think you'll make a very fine";
		mes "Ninja, even if I did trick you";
		mes "just earlier. Heh heh heh!";
		next;
		mes "["+strcharinfo(0)+"]";
		mes "......";
		mes ".........";
		mes "............";
		next;
		mes "[Red Leopard Joe]";
		mes "Here you go.";
		mes "Please bring this";
		mes "letter to Cougar.";
		mes "It'll take a while to";
		mes "return to Amatsu, so let";
		mes "me send you there directly...";
		delitem 1010,1;	// Phracon
		delitem 7053,5;	// Cyfar
		set NINJ_Q,3;
		changequest 6016,6017;
		close2;
		warp "amatsu",113,127;
		end;
	}
	else if(NINJ_Q == 3) {
		mes "[Red Leopard Joe]";
		mes "Eh? I'm not sure what";
		mes "happened, but it seems";
		mes "that you haven't delivered";
		mes "my response to Cougar yet.";
		mes "Shall I directly send you";
		mes "to Amatsu right now?";
		next;
		if(select("No, thanks.:Yes, please.") == 1) {
			mes "[Red Leopard Joe]";
			mes "Alright. Well, I was";
			mes "just trying to save";
			mes "you some time.";
			close;
		}
		mes "[Red Leopard Joe]";
		mes "Okay, then.";
		mes "Goodbye for now.";
		close2;
		warp "amatsu",113,127;
		end;
	}
	else if(NINJ_Q == 4) {
		mes "[Red Leopard Joe]";
		mes "Cougar asked you to";
		mes "gather some materials";
		mes "too? Oh well, I suppose";
		mes "that I can't blame him.";
		mes "Besides, I should be able";
		mes "to beat him in a fair fight~";
		close;
	}
	else if(NINJ_Q == 5 && Class == Job_Ninja) {
		mes "[Red Leopard Joe]";
		mes "Oh, you're a Ninja~";
		mes "I hope you continue to";
		mes "train yourself and master";
		mes "all the Ninja skills that";
		mes "you can. Always remember";
		mes "to blend into the shadows.";
		close;
	}
	else {
		mes "[Tourist]";
		mes "I've traveled to many";
		mes "countries, but I've never";
		mes "been on a building as high";
		mes "as Einbroch Tower. All the";
		mes "buildings in my hometown";
		mes "are tiny in comparison...";
		close;
	}
}