//================= 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)  L0ne_W0lf
//=
//= 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/>.
//=========================================================================
//= Hypnotist
//================= Description ===========================================
//= Permenent first class, base level 40 and under skill resetter.
//= First Class characters and expanded classes only.
//= Baby Classes and First Class trans can't use this service.
//================= Current Version =======================================
//= 1.0
//=========================================================================

office,125,38,5	script	Skill Reset#2	4_M_OLDFRIAR,{
	if (BaseLevel < 40) {
		mes "[Hypnotist]";
		mes "Greetings, adventurer.";
		mes "I'm a member of the Hypnotist";
		mes "Academy sent here to this office";
		mes "to provide Skill Reset services";
		mes "to certain First Class characters for a really good price: free!";
		next;
		mes "[Hypnotist]";
		mes "Although I offer unlimited";
		mes "skill resets for now, I have";
		mes "two conditions that must be";
		mes "fulfilled. First, you must be";
		mes "lower than ^FF0000Base Level 40^000000.";
		next;
		mes "[Hypnotist]";
		mes "Second, you must be a";
		mes "^FF0000Swordman, Acolyte, Mage,";
		mes "Thief, Archer, Merchant^000000";
		mes "Job character to qualify.";
		mes "Now, do you have any questions?";
		next;
		switch(select("Skill Reset?", "I want a Skill Reset", "Nothing")) {

		case 1:
			mes "[Hypnotist]";
			mes "Skill Resets allow adventuers";
			mes "to redistribute their Skill";
			mes "Points if they are unhappy";
			mes "with their current skills.";
			next;
			mes "[Hypnotist]";
			mes "Before proceeding with";
			mes "a Skill Reset, you must";
			mes "reduce all of the weight";
			mes "of all carried items on your";
			mes "character to 0. You can put";
			mes "extra items in Kafra Storage.";
			next;
			mes "[Hypnotist]";
			mes "Ah, it's also important";
			mes "to remove your ^FF0000Pushcart^000000";
			mes "if you have one equipped.";
			mes "Otherwise, hypnosis won't";
			mes "work, or will backfire...";
			close;

		case 2:
			mes "[Hypnotist]";
			mes "Are you sure that you";
			mes "want to proceed with";
			mes "my ^FF0000Skill Reset^000000 service?";
			next;
			if (select("Yes", "Cancel") == 1) {
				if (BaseLevel > 40) {
					mes "[Hypnotist]";
					mes "I'm sorry, but characters";
					mes "with Base Levels higher";
					mes "than 40 are ineligible for the";
					mes "Skill Reset service I provide.";
					close;
				}
				if ((Class > 0 && Class < 7 && Upper == 0) || (Class == Job_Gunslinger) || (Class == Job_Ninja) || (Class == Job_Taekwon)) {
					if (checkcart()) {
						mes "[Hypnotist]";
						mes "Oh! Please remove your";
						mes "Pushcart before proceeding";
						mes "with the Skill Reset service.";
						mes "Thanks for cooperating~";
						close;
					}
					mes "[Hypnotist]";
					mes "Thank you for using";
					mes "my Skill Redistribution";
					mes "services. Oh, and best";
					mes "of luck to you on your";
					mes "travels, adventurer.";
					resetskill;
					close;
				}
				mes "[Hypnotist]";
				mes "I'm sorry, but your";
				mes "Job Class doesn't qualify";
				mes "for the Skill Reset service";
				mes "that I provide. I can only";
				mes "offer Skill Resets to the";
				mes "following Jobs...";
				next;
				mes "[Hypnotist]";
				mes "^FF0000Swordman, Acolyte,";
				mes "Mage, Thief, Archer,";
				mes "Merchant, Taekwon";
				mes "Boy, Taekwon Girl, Gunslinger and Ninja^000000.";
				close;
			}
			mes "[Hypnotist]";
			mes "Thank you, and good";
			mes "luck on your adventures.";
			mes "Please travel in safety~";
			close;

		case 3:
			mes "[Hypnotist]";
			mes "Thank you, and good";
			mes "luck on your adventures.";
			mes "Please travel in safety~";
			close;
		}
	
	} else {
		mes "[Hypnotist]";
		mes "Sorry, you did not qualify for a free skill reset but you can avail for both STAT and SKILL reset for ^FF335520,000 Credit Points^000000.";
		mes "Do you wish to proceed?.";
		next;
		if (select("No, thanks", "Yes, reset my STAT and SKILL") == 2) {
			if(callfunc("F_CheckCredit"))< 20000 {	
				mes "[Hypnotist]";
				mes "Sorry, you don't have enough Credit Points.";
				close;
			}
			if (checkcart() || checkfalcon() || checkmount()) {
				mes "[Hypnotist]";
				mes "Oh! Please remove your ^FF3355PUSHCART^000000, ^FF3355PECOPECO^000000 or ^FF3355FALCON^000000 before proceeding with the SKILL RESET.";
				close;
			}
			callfunc "F_UpdateCredit",-20000;
			logmes "CREDIT: -20000 RESET";
			mes "[Hypnotist]";
			mes "There you go!";
			specialeffect(EF_ANGEL, AREA, playerattached());
			specialeffect(EF_TRUESIGHT, AREA, playerattached());
			sc_end SC_ALL;
			resetstatus;
			resetskill;
			close;
		}
		mes "[Hypnotist]";
		mes "Ok, comeback when you are ready";
		close;			
	}
}