//===== Hercules Script ======================================
//= Universal Rental NPC
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.2
//===== Description: =========================================
//= One-click automatic mount rentals.
//= Replaced 'close' with 'end' [Streusel]
//= Fixed 'close' issues. [Joseph]
//============================================================
//@unloadnpc Rental#g
//@loadnpc npc/valhalla/falcon.txt

office,124,38,6	script	Rental#g	8W_SOLDIER,{
	/* TODO: This can be optimized with just setmount(), as it can
		 auto-detect the proper mount for the class/skills. */
	if (hascashmount()) {
		message strcharinfo(PC_NAME),"You must first remove your mount.";
		end;
	} else if (!checkcart() && getskilllv(MC_PUSHCART)) {
		setcart;
	} else if (!checkfalcon() && getskilllv(HT_FALCON) && !checkwug()) {
		setfalcon;
	} else if (checkmount() != MOUNT_PECO && getskilllv(KN_RIDING)) {
		setmount; // Peco or Dragon
	} else {
		message strcharinfo(PC_NAME),"You do not meet requirements to rent.";
		end;
	}
	specialeffect(EF_TEIHIT3, AREA, playerattached());
	end;
}
