//================= 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)  Samuray22
//= 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/>.
//=========================================================================
//= Hair Dyer
//================= Description ===========================================
//= Hair Dyer with standard palletes
//================= Current Version =======================================
//= 1.5
//=========================================================================

prt_in,243,168,4	script	Jovovich	4_F_02,{
	mes "[Hairdresser Jovovich]";
	mes "Welcome~!";
	mes "How may I help you?";
	next;
	mes "[Hairdresser Jovovich]";
	if (Sex == SEX_MALE) {
		mes "Oh, no! Your hair is damaged. It seems as if you may need professional treatment. Come sit over here, please. Come.";
	} else if (rand(20) > 11) {
		mes "Eh!? Oh my! Oh no no no no! Your hair is sooo damaged! It's not good if you leave your hair like this.";
		next;
		mes "[Hairdresser Jovovich]";
		mes "Would you let me treat your hair? Please?";
	} else {
		mes "Wow! Your hair would be perfect once it's dyed~ How about dying your hair for a change?";
	}
	next;
	while(1) {
		switch(select("Dye Hair", "Tips and Information", "Cancel")) {
		case 1:
			mes "[Hairdresser Jovovich]";
			mes "Yes yes, good choice~";
			mes "Well then, this is your chance for a make-over, your chance to blossom in beauty! Choose the color you would like.";
			next;
			while(1) {
				if (.@choose_success == 1) {
					mes "[Hairdresser Jovovich]";
					mes "What do you think? Did you want a different color?";
					next;
					if (select("Yes", "No") == 1) {
						mes "[Hairdresser Jovovich]";
						mes "Okay! Choose the color that you would like.";
						next;
					}
					else  {
						mes "[Hairdresser Jovovich]";
						mes "Hmm, I'm sort of disappointed. I wanted to do a better job. But I promise I'll do it better next time. Please come again~";
						close;
					}
				}

				while(1) {
					switch(select("Red, please.", "Yellow, please.", "Violet, please.", "Orange, please.", "Green, please.", "Blue, please.", "White, please.", "Black, please.", "Actually, I like my hair as it is.")) {
					case 1: .@headpalette = 8; break;
					case 2: .@headpalette = 1; break;
					case 3: .@headpalette = 2; break;
					case 4: .@headpalette = 3; break;
					case 5: .@headpalette = 4; break;
					case 6: .@headpalette = 5; break;
					case 7: .@headpalette = 6; break;
					case 8: .@headpalette = 7; break;
					case 9:
						if (.@choose_success != 0) {
							mes "[Hairdresser Jovovich]";
							mes "You must like your hair color~";
							close;
						}
						mes "[Hairdresser Jovovich]";
						mes "Eehh~? You're not going to dye your hair? I'm a little sad...";
						close;
					}

					if (.@headpalette == getlook(LOOK_HAIR_COLOR)) {
						mes "[Hairdresser Jovovich]";
						mes "Eh? But that's the hair color you already have. Please choose a different color.";
						next;
					}
					else {
						switch(.@headpalette) {
						case 1: callsub S_NoDye,976,"yellow"; break;
						case 2: callsub S_NoDye,978,"violet"; break;
						case 3: callsub S_NoDye,980,"orange"; break;
						case 4: callsub S_NoDye,979,"green"; break;
						case 5: callsub S_NoDye,981,"blue"; break;
						case 6: callsub S_NoDye,982,"white"; break;
						case 7: callsub S_NoDye,983,"black"; break;
						case 8: callsub S_NoDye,975,"red"; break;
						}
						if (Zeny < 1000) {
							mes "[Hairdresser Jovovich]";
							mes "The fee is 1000 zeny. Do you not have enough...?";
							close;
						}

						switch(.@headpalette) {
						case 1: delitem Lemon_Dyestuffs,1; break;
						case 2: delitem Cobaltblue_Dyestuffs,1; break; //Violet_Dyestuffs
						case 3: delitem Orange_Dyestuffs,1; break;
						case 4: delitem Darkgreen_Dyestuffs,1; break;
						case 5: delitem Violet_Dyestuffs,1; break; //Cobaltblue_Dyestuffs
						case 6: delitem White_Dyestuffs,1; break;
						case 7: delitem Black_Dyestuffs,1; break;
						case 8: delitem Scarlet_Dyestuffs,1; break;
						}
						Zeny -= 1000;
						setlook LOOK_HAIR_COLOR,.@headpalette;
						.@choose_success = 1;
						break;
					}

				}

			}

		case 2:
			mes "[Hairdresser Jovovich]";
			mes "When you're feeling down , when you get dumped, when you want to impress someone, or even when you just want to stand out...";
			next;
			mes "[Hairdresser Jovovich]";
			mes "For that special place and time, wouldn't you want a hairstyle of your very own? As long as you have the appropriate dyestuffs, I will make your hair look wonderful.";
			next;
			mes "[Hairdresser Jovovich]";
			mes "And try not to worry too much about the fee. Acquiring beauty is the same as acquiring everything. Hehe~";
			next;
			mes "[Hairdresser Jovovich]";
			mes "* Fees and Information *";
			mes "- 1 Dyestuffs item of the color of hair you want.";
			mes "- 1000 zeny fee.";
			break;

		case 3:
			mes "[Hairdresser Jovovich]";
			mes "Men or Women...";
			mes "Everyone has the right and obligation to be beautiful.";
			close;
		}

	}

S_NoDye:
	if (countitem(getarg(0)) == 0) {
		mes "[Hairdresser Jovovich]";
		mes "Eh?! But you need the item '"+getitemname(getarg(0))+"' to dye your hair "+getarg(1)+"...";
		close;
	}
	return;
}

//== Lighthalzen ===========================================
lhz_in02,100,134,3	script	Hair Dyer#lich	4_F_EINWOMAN,{
	mes "[Rossa]";
	if (Sex == SEX_MALE) {
		mes "Welcome, come in~";
		mes "Oh, I see that you take";
		mes "much better care of your";
		mes "hair than those other boys.";
		mes "Now would you like to dye";
		mes "your hair another color?";
	}
	else {
		mes "Oh, wow~ Where did";
		mes "you get your hair styled?";
		mes "I love it! But... It would";
		mes "be even more beautiful if";
		mes "you dyed your hair. What";
		mes "do you think about that?";
	}
	while (.@choose_success != 2) {
		next;
		switch(select("Dye Hair", "Coloring Information", "Cancel")) {
		case 1:
			mes "[Rossa]";
			mes "Ho ho ho ho~";
			mes "So which color would";
			mes "you like to try? Something";
			mes "vivid or dark? Sexy or cute?";
			next;
			while (.@choose_success != 2) {
				if (.@choose_success == 1) {
					mes "[Rossa]";
					mes "Ooh, I like this color!";
					mes "But would you like to";
					mes "try a different one?";
					next;
					switch(select("Yes", "No")) {
					case 1:
						mes "[Rossa]";
						mes "Please select";
						mes "another color~";
						next;
						break;
					case 2:
						mes "[Rossa]";
						mes "An excellent choice~";
						mes "Alright then, thank you";
						mes "for using my service and";
						mes "I hope you come by again!";
						close2;
						.@choose_success = 2;
						break;
					}
				}
				while (.@choose_success != 2) {
					switch(select("Red, please.", "Yellow, please.", "Purple, please.", "Orange, please.", "Green, please.", "Blue, please.", "White, please.", "Dark Brown, please.", "I like my hair color.")) {
					case 1:
						.@headpalette = 8;
						break;
					case 2:
						.@headpalette = 1;
						break;
					case 3:
						.@headpalette = 2;
						break;
					case 4:
						.@headpalette = 3;
						break;
					case 5:
						.@headpalette = 4;
						break;
					case 6:
						.@headpalette = 5;
						break;
					case 7:
						.@headpalette = 6;
						break;
					case 8:
						.@headpalette = 7;
						break;
					case 9:
						if (.@choose_success != 0) {
							mes "[Rossa]";
							mes "Are you sure?";
							mes "Alright then, you";
							mes "know what's best for";
							mes "your beauty and to tell";
							mes "the truth, I agree with you~";
							close2;
							.@choose_success = 2;
						}
						else {
							mes "[Rossa]";
							mes "Oh, I see. Still, I can't";
							mes "help but feel so disappointed.";
							mes "You'd look so good if you dyed";
							mes "your hair a different color~";
							close2;
							.@choose_success = 2;
						}
						break;
					}
					if (getlook(LOOK_HAIR_COLOR) == .@headpalette) {
						mes "[Rossa]";
						mes "Hmm, your hair color";
						mes "is still fine, so there's";
						mes "no need to dye it the same";
						mes "color again, if that's what";
						mes "you're worried about.";
						next;
					}
					else {
						if ((.@headpalette == 8) && (countitem(Scarlet_Dyestuffs) == 0)) {
							mes "[Rossa]";
							mes "Oh, I'm sorry dear,";
							mes "but I can't dye your";
							mes "hair if you didn't bring";
							mes "Scarlet Dyestuffs with you...";
							close2;
							.@choose_success = 2;
							break;
						}
						else if ((.@headpalette == 1) && (countitem(Lemon_Dyestuffs) == 0)) {
							mes "[Rossa]";
							mes "Oh, I'm sorry dear,";
							mes "but I can't dye your";
							mes "hair if you didn't bring";
							mes "Lemon Dyestuffs with you...";
							close2;
							.@choose_success = 2;
							break;
						}
						else if ((.@headpalette == 2) && (countitem(Violet_Dyestuffs) == 0)) {
							mes "[Rossa]";
							mes "Oh, I'm sorry dear,";
							mes "but I can't dye your";
							mes "hair if you didn't bring";
							mes "Violet Dyestuffs with you...";
							close2;
							.@choose_success = 2;
							break;
						}
						else if ((.@headpalette == 3) && (countitem(Orange_Dyestuffs) == 0)) {
							mes "[Rossa]";
							mes "Oh, I'm sorry dear,";
							mes "but I can't dye your";
							mes "hair if you didn't bring";
							mes "Orange Dyestuffs with you...";
							close2;
							.@choose_success = 2;
							break;
						}
						else if ((.@headpalette == 4) && (countitem(Darkgreen_Dyestuffs) == 0)) {
							mes "[Rossa]";
							mes "Oh, I'm sorry dear,";
							mes "but I can't dye your";
							mes "hair if you didn't bring";
							mes "Darkgreen Dyestuffs";
							mes "with you. Would you come";
							mes "back after you get some?";
							close2;
							.@choose_success = 2;
							break;
						}
						else if ((.@headpalette == 5) && (countitem(Cobaltblue_Dyestuffs) == 0)) {
							mes "[Rossa]";
							mes "Oh, I'm sorry dear,";
							mes "but I can't dye your";
							mes "hair if you didn't bring";
							mes "Cobaltblue Dyestuffs";
							mes "with you. Would you come";
							mes "back after you get some?";
							close2;
							.@choose_success = 2;
							break;
						}
						else if ((.@headpalette == 6) && (countitem(White_Dyestuffs) == 0)) {
							mes "[Rossa]";
							mes "Oh, I'm sorry dear,";
							mes "but I can't dye your";
							mes "hair if you didn't bring";
							mes "White Dyestuffs with you...";
							close2;
							.@choose_success = 2;
							break;
						}
						else if ((.@headpalette == 7) && (countitem(Black_Dyestuffs) == 0)) {
							mes "[Rossa]";
							mes "Oh, I'm sorry dear,";
							mes "but I can't dye your";
							mes "hair if you didn't bring";
							mes "Black Dyestuffs with you...";
							close2;
							.@choose_success = 2;
							break;
						}
						if (Zeny < 1000) {
							mes "[Rossa]";
							mes "Oh, I'm so sorry dear,";
							mes "but my service fee is";
							mes "1,000 zeny. Did you forget";
							mes "to bring your money with you?";
							close2;
							.@choose_success = 2;
							break;
						}
						if (.@headpalette == 8) delitem Scarlet_Dyestuffs,1;
						else if (.@headpalette == 1) delitem Lemon_Dyestuffs,1;
						else if (.@headpalette == 2) delitem Violet_Dyestuffs,1;
						else if (.@headpalette == 3) delitem Orange_Dyestuffs,1;
						else if (.@headpalette == 4) delitem Darkgreen_Dyestuffs,1;
						else if (.@headpalette == 5) delitem Cobaltblue_Dyestuffs,1;
						else if (.@headpalette == 6) delitem White_Dyestuffs,1;
						else if (.@headpalette == 7) delitem Black_Dyestuffs,1;
						Zeny -= 1000;
						setlook LOOK_HAIR_COLOR,.@headpalette;
						.@choose_success = 1;
						break;
					}
				}
			}
			break;
		case 2:
			mes "[Rossa]";
			mes "When you're feeling";
			mes "down, when you just want";
			mes "to look nice for the one you";
			mes "love, or when you just want";
			mes "a different look, why don't";
			mes "you dye your hair?";
			next;
			mes "[Rossa]";
			mes "All you need is one";
			mes "Dyestuffs item of the";
			mes "color that you want to";
			mes "dye your hair, as well as";
			mes "a 1,000 zeny service fee.";
			mes "I'm here for your beauty needs~";
			break;
		case 3:
			mes "[Rossa]";
			mes "You know, when you";
			mes "put some effort into";
			mes "your appearance, you'll";
			mes "not only look better, but";
			mes "you'll feel better about";
			mes "yourself. Makes sense, right?";
			close;
		}
	}
	close;
}
