//===== Hercules Script ======================================
//= Job Master
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.4
//===== Description: =========================================
//= A fully functional job changer.
//===== Additional Comments: =================================
//= 1.1 Fixed reset on Baby job change. [Euphy]
//= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support. [Euphy]
//= 1.3 Kagerou/Oboro added. [Euphy]
//= 1.4 Improved legibility (renamed variables, replaced
//      numbers with constants; Changed syntax to match
//      Hercules standards; Fixed status point exploit upon
//      Baby Novice job change. [Haru]
//============================================================

office,173,131,6	script	Job Master	2_F_MAGICMASTER,{
	function colour;
	if (!countitem(Invitation_Letter)){
		mes("[ "+CStr("Guild Migration Assistant","GREEN")+" ]");
		mes("What are you doing here? I don't have business with you.");
		close();
	}
	menu implode(.job_name$, ":"), -;
	.@index = @menu - 1;
	switch(select("Confirm - ["+ colour("008800", .job_name$[.@index]) +"]:Change selection:"+ colour("FF0000", "End session"))) {
	case 1:
		jobchange (.trans ? .job_id_t[.@index] : .job_id[.@index]);
		resetskill;
					
					/*-----------------------------------------------------
					Job Change Settings
					-----------------------------------------------------*/
					BaseLevel = 99;	// Max base level
					JobLevel = 50;		// Max job level
					
					skill NV_BASIC, 9, 0;	// Level 9 Basic Skill
					SkillPoint = 98;	// 49 First, 49 2nd
					/*---------------------------------------------------*/
				
		close;
				
	case 2:
		break;
		
	case 3:
		close;
	}

	/*-----------------------------------------------------
	Function: colour()
	-------------------------------------------------------
	Description: Colours the defined string.
	-------------------------------------------------------
	Usage:
	colour("<colour hex>", "<string>");
	-----------------------------------------------------*/
	function colour {
		return "^"+ getarg(0) + getarg(1) +"^000000";
	}
	
	
	/*-----------------------------------------------------
	Configuration
	-----------------------------------------------------*/
	OnInit:
		.trans = 0;	// Transcend? 0 = no, 1 = yes (default: 1)
		
		// Job names
		setarray .job_name$[0],	"Knight", "Priest", "Wizard", "Blacksmith", "Hunter", "Assassin",
								"Crusader", "Monk", "Sage", "Rogue", "Alchemist", "Bard/Dancer";
		
		// Job IDs
		setarray .job_id[0],	Job_Knight, Job_Priest, Job_Wizard, Job_Blacksmith, Job_Hunter, Job_Assassin,
								Job_Crusader, Job_Monk, Job_Sage, Job_Rogue, Job_Alchemist, Job_Bard;
		
		end;
	

}
