//===== rAthena Script ======================================= 
//= Kafra Functions
//===== By: ================================================== 
//= rAthena Dev Team
//= Darlskies, Darkchild, Syrus22, Lupus, kobra_k88 (2.0)
//= L0ne_W0lf
//===== Current Version: ===================================== 
//= 6.7
//===== Compatible With: ===================================== 
//= rAthena SVN
//===== Description: =========================================
//= These functions handle save, storage, cart rental, teleport,
//= and Free Teleport/Warp/Rent Cart options for all Kafra NPCs.
//=
//= Kafra's will need a lot of work. The Welcome Message argument
//= may become obsolete, as most kafras have a slightly differing
//= Welcome message.
//===== Additional Comments: ================================= 
//= 1.1 Now using functions v2.1 Added Cart Rent for Classes: Whitesmith, Professor.
//=     Replaced checkoption(x) into checkcart(0) [Lupus] v2.1b Added Fix Kafra Pass Func [Kobra_k88]
//= 2.2 Final fix of the Kafra Pass Exploit! [Lupus] a -Izlude[4] fix
//= 2.2a Minor changes to function calls.  Using agruments. Added Guild options. [kobra_k88]
//= 2.2b This version uses arrays for the teleport option. Rearranged next statements to make menu transitions smoother. [kobra_k88]
//= 2.3 Removed SAVE from Niflheim. [Lupus]
//= 2.3 removed "fix" by HawkMoon RTFM and check supernovice.txt . There's a SPECIAL Kafra which gives CARTS to SN for a special proce. [Lupus]
//= 2.4 Added Baby Class Support (Baby Novice check) Removed annoying storage feature where u had to close dialog window to be able to use your storage [Lupus]
//= 2.5 Added Louyang official Kafra, fixes some Kafras, not letting you to Save your position [Lupus]
//= 2.6 Reverted Dungeons Kafras (they should offer only Storage). Added temp Ayothaya Kafra
//= 2.7 Added correct Ayothaya, Louyang & Amatsu Kafras. [Lupus]
//= 2.8 Fixed Amatsu Storage problems [Lupus] 2.9 Fixed spelling mistakes. [Nexon]
//= 3.0 Added special "not working teleport menu" for Einbroch Kafras [Lupus]
//= 3.1 Removed callfunc Is_####_Class in favor of baseClass [Silentdragon]
//= 3.2 Fixed an exploit [Lupus]
//= 4.0 Added Kafra storage password protection. [Lupus]
//=     to block Kafra Password, read comments at 350 line
//= 5.0 Fixed the close2;....close; end; lines. Who let them slip away? =/ [erKURITA]
//=     Also, the kafra upon warp was giving back the zeny. Removed. [erKURITA]
//= 5.1 Optimized a little, added no tele/save arg's [Evera]
//= 5.1a Temporary? Added F_ClearGarbage to clear unused/outdated variables [Lupus]
//= 5.2 By default commented out custom Guilds Kafra's "Guild Storage". [Lupus]
//= 5.3 uncommented Guild Storage. Confirmed kRO feature. [Lupus]
//= 5.4 added -Guide option (Kafra shows you nearest Guide) Work in progress. 
//=     Need all coords for all guides.. and somehow pass their coords to kafra.
//=     Removed universal Kafra Pass, added 3 new Kafra Tickets [Lupus]
//= 5.4b temporary moved "-Guide" from the 1st menu punct [Lupus]
//= 5.5 Added proper Niflheim welcome message.	[L0ne_W0lf]
//=     Cleaned up the menus a bit. Got rid of the proceeding "-" prefix.
//= 5.5b Missed a preceeding hyphen, which was screwing up teleporting. [L0ne_W0lf]
//= 5.6 Further dialog updates, added  dynamic costs for cart and storage use. [L0ne_W0lf]
//=     Updated some functions to handle Guild Kafras the way they should. 
//= 5.6a Corrected a few wrong names in the teleport function. [L0ne_W0lf]
//= 5.7 Correced end message no longer displaying, and the duplicate names [L0ne_W0lf]
//=     Thanks to Barron-Monster for pointing out the issues.
//= 5.8 Fixed another double name being shown when "saving" [L0ne_W0lf]
//= 5.9 Fixed the Kafra Welcome message for guilds. Thanks Barron-Monster. [L0ne_W0lf]
//= 6.0 Closed Kafra Password exploit in Cool Event Corp. Storages until we got a client/packet based password support.
//=     Added 2 args into F_SetKafCode to fit it in Cool Evnt Co. NPC [Lupus]
//= 6.1 Added menu for Turbo Track Kafra Staff. [L0ne_W0lf]
//= 6.2 Updated/Fixed warp cords. [Kisuka]
//= 6.3 #kafra_code is now stored as is. [brianluau]
//= 6.4 Removed unofficial Guide function. [Daegaladh]
//= 6.5 Optimized. [Joseph]
//= 6.6 Added Warp Points / View Points Function. [Joseph]
//= 6.7 Added Rune Knight Kafra. [Euphy]
//============================================================ 

//=== Main Function ========================================================
//=   arg(0): Used to determine which welcome message to show.
//=   arg(1): Used to determine which menu to display.
//=   arg(2): Used to determine if the info menu is shown in F_KafInfo.
//=   arg(3): Cost to use Storage
//=   arg(4): Cost to Rent a Pushcart
//==========================================================================
function	script	F_Kafra	{
	callfunc "F_ClearGarbage"; // Clear outdated, unused variables
	// Display Kafra Welcome Message
	switch(getarg(0)){
		default:
		case 0:
			// Default message (obsolete)
			mes "[Ա]";
			mes "---------------------------";
			mes "ӭ";
			mes ".";
			mes "ķ";
			mes "Զ.ʲô԰?";
			break;
		case 1:
			// Niflheim specific message
			mes "[Ա]";
			mes "^666666W-weeeelc-c-come";
			mes "to th-the K-kaaafrrrra";
			mes "C-coorpoor-r-ratioooonn...^000000";
			break;
		case 2:
			// Guild Castle Kafra message
			set @GID,getcharid(2);
			mes "[Ա]";
	 		mes "ӭ. ^ff0000" + GetGuildName(@GID) + "^000000 Ա.";
			mes "ĿԴȥκȥĵط.";
			break;
		case 3:
			// Amatsu specific message (obsolete)
			mes "[Ա]";
			mes "ԣһңԶоǵĻֻǹ۹?";
			mes ", ΪʲôͣƬ?";
			mes "г";
			mes "ĳҰζ.";
			break;		
		case 4:
			// Louyang and Ayothaya specific message (obsolete)
			mes "[Ա]";
			mes "ĿԱ";
			mes ", δ";
			mes "뿪.";
			break;		
		case 5:
			// NPC has it's own welcome message. (Display nothing)
			break;
	}
	next;
	while (1) {
		deletearray @K_Menu0$[0],getarraysize(@K_Menu0$);
		if (getarg(0) == 2) {
			// Guild Kafra Menu override (free Teleport, free Storage, Free Cart)
			setarray @K_Menu0$[0],"- ʹòֿ","- ʹùֿ","- Ƴ޷","- ʹôͷ","- ȡ";
		} else {
			switch(getarg(1)){
				// Save and Storage only
				case 1:	setarray @K_Menu0$[0],"- 洢","- ʹòֿ","- ȡ"; break;
				// Storage only
				case 2:	setarray @K_Menu0$[0],"- ʹòֿ","- ȡ"; break;
				// No Teleport (Common)
				case 3: setarray @K_Menu0$[0],"- 洢","- ʹòֿ","- Ƴ޷","- ѯ鱨Ϣ","- ȡ"; break;
				// Case 4 is Einbroch no tele message.
				// No save, or teleport. (Common)
				case 5:	setarray @K_Menu0$[0],"- ʹòֿ","- Ƴ޷","- ѯ鱨Ϣ","- ȡ"; break;
				// Storage and Check Other Information only.
				case 6:	setarray @K_Menu0$[0],"- ʹòֿ","- ѯ鱨Ϣ","- ȡ"; break;
				// Save, Storage, and Pushcart only (Kafra Warehouse)
				case 7:	setarray @K_Menu0$[0],"- 洢","- ʹòֿ","- Ƴ޷","- ȡ"; break;
				// Save, Storage, Other Check information. (Turbo track)
				case 8: setarray @K_Menu0$[0],"- 洢","- ʹòֿ","- ѯ鱨Ϣ","- ȡ"; break;
				// No Save (Rune Knight)
				case 9: setarray @K_Menu0$[0],"- ʹòֿ","- Ƴ޷","- ʹôͷ","- ѯ鱨Ϣ","- ȡ"; break;
				// Storage, Save, and Pushcart (Dewata, reorder of case 7)
				case 10: setarray @K_Menu0$[0],"- ʹòֿ","- 洢","- Ƴ޷","- ȡ"; break;
				// Default message (obsolete)
				default: setarray @K_Menu0$[0],"- 洢","- ʹòֿ","- ʹôͷ","- Ƴ޷","- ѯ鱨Ϣ","- ȡ"; break;
			}
		}
		set .@menu$,"";
		for (set .@i, 0; .@i < getarraysize(@K_Menu0$); set .@i, .@i + 1)
			set .@menu$, .@menu$ + @K_Menu0$[.@i] + ":";	
		set .@j, select (.@menu$) - 1;
		if (@K_Menu0$[.@j] == "- 洢") {
			return;
		} else if (@K_Menu0$[.@j] == "- ʹòֿ") {
			// Do not charge for Guild Storage
			if(getarg(0) == 2) 
				callfunc "F_KafStor",2,0,0;
			else 
				callfunc "F_KafStor",0,getarg(3),getarg(0);
			next;
		} else if (@K_Menu0$[.@j] == "- ʹôͷ") {
			// Display Einbroch "ûдͷ" notice.
			if(getarg(1) != 4) callfunc "F_KafTele",getarg(0);
			else {
				mes "[Ա]";
				mes "---------------------------";
				mes "Ϊ ^FF0000";
				mes "ݴЭ^000000, ";
				mes "޷";
				mes "ṩͷ㷢ȷ½̹.";
				next;
				mes "[Ա]";
				mes "";
				mes "ͧ";
				mes "л";
				mes "֧.";
			}
			next;
		} else if (@K_Menu0$[.@j] == "- Ƴ޷") {
			if(callfunc("F_KafCart",getarg(0),getarg(4)) == 1) 
				next;
		} else if (@K_Menu0$[.@j] == "- ѯ鱨Ϣ") {
			callfunc "F_KafInfo",getarg(2);
			next;
		} else if (@K_Menu0$[.@j] == "- ȡ"){
			callfunc "F_KafEnd",getarg(0),0;
			end;
		} else if (@K_Menu0$[.@j] == "- 򿪹ֿ") {
			callfunc "F_KafStor",1,0;
			next;
		}
	}
}

//===================================================
// Storage Function
//===================================================
function	script	F_KafStor	{
	// Unable to access Guild Storage (Busy)
	if(getarg(0) == 1){
		if(guildopenstorage()){
			mes "[Ա]";
			mes "Բ𣬹һλԱʹùֿ";
			mes ". ȴһλԱ.";
			close2;
			cutin "", 255;
			end;
		}
		cutin "", 255;
		close;
	}
	// Unable to access Normal Storage (Insufficient Basic Skills)
	if(basicskillcheck() && getskilllv("NV_BASIC") < 6){
		mes "[Ա]";
		// Niflheim Specific Message
		if (getarg(2) == 1) {
			mes "^666666ԡԡԲ,";
			mes "һ";
			mes "... 衭Ҫ";
			mes "ְҵܵȼ l-ȼ 6...^000000";
			return;
		}
		mes "Բ, ";
		mes "Ҫְҵ";
		mes "ܵȼ 6";
		mes "ʹòֿ.";
		return;
	}
	// Accessing Normal Storage (Skipped if accessing Storage from Guild castle)
	if(getarg(0) != 2){
		// Consume "ֿʹȯ" if available.
		if(countitem(7059)) delitem 7059,1;
		else {
			if(Zeny<getarg(1)){
				mes "[Ա]";
				// Niflheim Specific Message
				if (getarg(2) == 1) {
					percentheal -50,-50;
					mes "^666666zeny...";
					mes "Ҫzeny...!";
					mes "Ҫ 150... zeny...";
					mes "Ergh! T-taking bl-blood~!^000000";
					return;
				}
				// Standard Message
				mes "Բ,";
				mes "û㹻 zeny ȥʹ";
				mes "ֿ. ";
				mes "ֿʹ÷Ҫ "+getarg(1)+" zeny.";
				return;
			}
			set Zeny, Zeny-getarg(1);
			set RESRVPTS, RESRVPTS + (getarg(1)/5);
		}
	}

	// Surpress the "End" message if in guild castle.
	if (getarg(0) != 2) {
		// Niflheim specific Message
		if (getarg(2) == 1) {
			percentheal 0,-10;
			mes "[Ա]";
			for (set .@i, 0; .@i < 5; set .@i, .@i + 1)
				mes "^666666л.. ... ʹ...^000000";
		}
		// Normal message
		else {
			mes "[Ա]";
			mes "Ҵ";
			mes "Ĳֿ.";
			mes "лʹ";
			mes ".";
		}
	}
	callfunc("F_CheckKafCode");	//check your storage password, if set
	close2;
	openstorage;
	cutin "", 255;
	end;
}

//===================================================
// Teleport Function
//===================================================
function	script	F_KafTele	{
	mes "[Ա]";
	mes "ѡ";
	mes "Ŀĵ.";
	next;
	set .@menu$, "";
	for (set .@i, 0; .@i <= 6; set .@i, .@i + 1)
		set .@menu$, .@menu$ + @wrpC$[.@i] + ":";
	set .@j, select (.@menu$) - 1;
	if (@wrpC$[.@j] == "- ȡ") return;
	// Consume "ͷʹȯ" if available.
	// Do not consume if in Guild castle
	if(countitem(7060) > 0 && getarg(0) != 2) delitem 7060,1;
	else {
		if (Zeny<@wrpP[.@j]){
			mes "[Ա]";
			mes "Բ, û";
			mes "㹻 zeny ʹ";
			mes "ͷ. ͷķҪ";
			mes "   "+@wrpD$[.@j]+" is "+@wrpP[.@j]+" zeny.";
			close2;
			cutin "", 255;
			end;
		}
		set Zeny, Zeny - @wrpP[.@j];
		set RESRVPTS, RESRVPTS + (@wrpP[.@j]/16);
	}
	cutin "", 255;
	if (@wrpD$[.@j] == "") warp "aldebaran",168,112;
	else if (@wrpD$[.@j] == "") warp "alberta", 117, 56;
	else if (@wrpD$[.@j] == "ħ") warp "comodo", 209, 143;
	else if (@wrpD$[.@j] == "ħ˹") warp "cmd_fild07", 127, 134;
	else if (@wrpD$[.@j] == "") warp "geffen", 120, 39;
	else if (@wrpD$[.@j] == "˹³") { if (checkre(0)) warp "izlude", 128, 98; else warp "izlude", 91, 105; }
	else if (@wrpD$[.@j] == "ŵ") warp "yuno", 158, 125;
	else if (@wrpD$[.@j] == "¶֮") warp "mjolnir_02", 99, 351;
	else if (@wrpD$[.@j] == "޿") warp "morocc", 156, 46;
	else if (@wrpD$[.@j] == "˶Ѩ") warp "gef_fild10", 52, 326;
	else if (@wrpD$[.@j] == "") warp "payon", 161, 58;
	else if (@wrpD$[.@j] == "¡") warp "prontera", 116, 72;
	else if (@wrpD$[.@j] == "") warp "umbala", 100, 154;
	end;
}


//===================================================
// Cart Function
//===================================================
function	script	F_KafCart	{
	// Ensure that the class wanting to rent a pushcart is a merchant
	if(BaseClass != Job_Merchant){
		mes "[Ա]";
		mes "Բ, ";
		mes "Ƴ޷";
		mes "ֻŸϵְҵ,";
		mes ", ʿ.";
		mes "ͳߵ.";
		return 1;
	}
	// Make sure the invoking character does not have a cart already
	else if(checkcart() == 1){
		mes "[Ա]";
		mes "Ѿӵ";
		mes "һƳ.";
		mes "ҵ, ǲ";
		mes "ͬһʱ";
		mes "޸ĸ˿.";
		return 1;
	}
	// Consume "Ƴʹȯ" if available.
	// Do not consume if in Guild castle.
	if(countitem(7061) > 0 && getarg(0) != 2) delitem 7061,1;
	else {
		mes "[Ա]";
		mes "Ƴ, ķҪ.";
		mes ""+getarg(1)+" zeny. ";
		mes "һƳ?";
		next;
		if (select("- һƳ.:- ȡ") == 2) return 0;
			if(Zeny<getarg(1)){
				mes "[Ա]";
				mes "Բ, ";
				mes "û㹻";
				mes "zeny ȥ֧Ƴ";
				mes "Ҫ "+getarg(1)+" zeny.";
				return 1;
			}
			set Zeny,Zeny-getarg(1);
			set RESRVPTS, RESRVPTS + 48;
	}
	setcart;
	return 1;
}

//===================================================
// Special Reserve Points Function
//===================================================
function	script	F_KafInfo	{
	// Uncomment next line to block Kafra Storage Protection
	//	set .@block, 1;
		setarray .@m$, "- ѯر׼","- ֿ","- ְԱֲλ","- ȡ";
		if (getarg(0) == 2) deletearray .@m$[1],2; // Rune Knight
		else if (.@block) deletearray .@m$[1],1;
	while (1) {
		set .@j, select(implode(.@m$,":")) - 1;
		if (.@m$[.@j] == "- ѯر׼") {
			mes "[Ա]";
			mes "ǿ...";
			mes strcharinfo(0) + "...";
			mes ", ܹ";
			mes RESRVPTS+ " ر׼.";
			next;
			mes "[Ա]";
			mes "Щ";
			mes "ر׼ ";
			mes "ڰĿҪ칫ȡ.";
			mes "ʹǵķ񣬿ǵĽƻĺô.";
			next;
			if(getarg(0) == 1) return;
		} else if (.@m$[.@j] == "- ְԱֲλ") {
			for (set .@i, 0; .@i <= 3; set .@i, .@i + 1)
				viewpoint 1,@viewpX[.@i],@viewpY[.@i],(.@i+1),0xFF00FF;
			next;
			for (set .@i, 0; .@i <= 3; set .@i, .@i + 1)
				viewpoint 2,@viewpX[.@i],@viewpY[.@i],(.@i+1),0xFF00FF;
		} else if (.@m$[.@j] == "- ֿ") {
			callfunc("F_SetKafCode","[Ա]","");
		} else {
			return;
		}
	}
}

// === End Function ==================================================
//  arg(0): used to determine what message to display.
//  arg(1): used to determine if save message is displayed.
//  arg(2): used to display the name of the area you're saving in.
//===================================================================
function	script	F_KafEnd	{
	mes "[Ա]";
	if(getarg(1)==1) {	
		// Save
		mes "ص";
		mes "ڱ";
		mes getarg(2)+".";
		mes "лʹ";
		mes ".";
	} else if(getarg(0)==0 || getarg(0)==5) {	
		// Generic End
		mes "ǿ,";
		mes "һֱŬΪṩõķ.ϣðյҪı׼.";
	} else if(getarg(0)==1) {
		// Niflheim End
		percentheal 0,- 25;
		mes "^666666Ա";
		mes "һֱ";
		mes "~^000000";
	}
	close2;
	cutin "", 255;
	end;
}

//===================================================
// Check Storage Password Function
//===================================================
function	script	F_CheckKafCode	{
	if(!#kafra_code) return;
	mes "Ĳֿ:";
	set @code_,0;
	input @code_;
	if(@code_ != #kafra_code) {
		dispbottom ".";
		close2;
		cutin "",255;
		end;
	}
	set @kafcode_try,0;
	set @code_,0;
	return;
}

// === Set / Change / Clear Storage Password Function ===
// getarg(0): NPC Name
// getarg(1): Company Name
//=======================================================
function	script	F_SetKafCode	{
	mes getarg(0);
	if(#kafra_code) {
		mes "Ĳֿ뱣.ڻʲô?";
		next;
		switch (select("- ޸ -> 5000z:- ɾֿ -> 1000z:- ȡ")) {
			Case 1:
				mes getarg(0);
				mes ",  ^0000FF^000000.";
				set @code,callfunc("F_EntKafCode");
				if(!@code || @code != #kafra_code) {
					mes ". ޷޸룬².";
					emotion e_hmm;
					break;
				}
				next;
				callsub S_SET,getarg(0),getarg(1);
				break;
			Case 2:
				mes getarg(0);
				mes "Ĳֿ.";
				set @code,callfunc("F_EntKafCode");
				if(!@code) {
					mes "δɾ.";
					emotion e_hmm;
					break;
				}
				next;
				mes getarg(0);
				if(Zeny < 1000) {
					mes "û㹻zeny.";
					emotion e_cash;
					break;
				}
				set Zeny,Zeny-1000;
				if(@code == #kafra_code) {
					set #kafra_code,0;
					mes "ѳɹľ.";
					mes "лʹ "+getarg(1)+".";
					emotion e_thx;
				} else {
					mes ". ǲ黹 1000z.";
					mes "ȷ룬һ.";
					emotion e_sry;
				}
				break;
			Case 3:
				break;
		}
	} else {
		mes getarg(1)+" Ժؽһµķ:";
		mes "ΪĲֿ뱣.";
		next;
		switch (select("- 趨һ -> 5000z:- ȡ")) {
			Case 1: callsub S_SET,getarg(0),getarg(1); break;
			Case 2: break;		
		}
	}
	close2;
	cutin "",255;
	end;

S_SET:
	mes getarg(0);
	mes " ^FF0000^000000 Էֹֿⱻ.";
	set @code,callfunc("F_EntKafCode");
	if(!@code) {
		mes "ûиı.";
		emotion e_hmm;
		return;
	}
	next;
	mes getarg(0);
	if(Zeny < 5000) {
		mes "û㹻Zeny.";
		emotion e_cash;
		return;
	}
	set Zeny,Zeny-5000;
	set #kafra_code,@code;
	mes "ѾӵһĲֿ.";
	mes "лʹ "+getarg(1)+".";
	emotion e_thx;
	return;
}

//===================================================
// Basic Password Validation Function
//===================================================
function	script	F_EntKafCode	{
	mes "һ1000~10000000֮:";
	set @code_,0;
	set @kafcode_try,@kafcode_try+1;
	if(@kafcode_try>10) {
		set @kafcode_try,0;
		logmes "ƽ: Էϲֿ.";
	}
	if(input(@code_) == 1) {
		mes "̫.";
		return 0;
	}
	if(@code_<1000) {
		mes "̫.";
		return 0;
	}
	return @code_;
}

//===================================================
// Warp Points / View Points Function
//===================================================
function	script	F_KafSet	{
	cleararray @wrpC$[0],"",getarraysize(@wrpC$);
	cleararray @wrpD$[0],"",getarraysize(@wrpD$);
	cleararray @wrpP$[0],"",getarraysize(@wrpP$);
	cleararray @viewpX[0],"",getarraysize(@viewpX);
	cleararray @viewpY[0],"",getarraysize(@viewpY);
	if (strnpcinfo(4) == "prontera") {
		setarray @wrpD$[0], "˹³", "", "", "޿", "˶Ѩ", "";
		setarray @wrpP[0], 600, 1200, 1200, 1200, 1200, 1800;
		setarray @viewpX[0], 151, 29, 282, 152;
		setarray @viewpY[0], 29, 207, 200, 326;
	} else if (strnpcinfo(4) == "alberta") {
		setarray @wrpP[0], 1200, 1800, 1800;
		setarray @wrpD$[0], "", "޿", "¡";
		setarray @viewpX[0], 28, 113, 0, 0;
		setarray @viewpY[0], 229, 60, 0, 0;
	} else if (strnpcinfo(4) == "aldebaran") {
		setarray @wrpP[0], 1200, 1200, 1800, 1700;
		setarray @wrpD$[0], "", "ŵ" , "˹³", "֮";
	} else if (strnpcinfo(4) == "comodo" ) {
		setarray @wrpD$[0], "޿", "ħ˹", "";
		setarray @wrpP[0], 1800, 1200, 1800;
	} else if (strnpcinfo(4) == "cmd_fild07") {
		setarray @wrpD$[0], "ħ", "޿";
		setarray @wrpP[0], 1200, 1200;
	} else if (strnpcinfo(4) == "geffen") {
		setarray @wrpD$[0], "¡", "", "˶Ѩ", "֮";
		setarray @wrpP[0], 1200, 1200, 1200, 1700;
		setarray @viewpX[0], 120, 203;
		setarray @viewpY[0], 62, 123;
	} else if (strnpcinfo(4) == "izlude") {
		setarray @wrpD$[0], "", "", "޿", "";
		setarray @wrpP[0], 1200, 1200, 1200, 1800;
	} else if (strnpcinfo(4) == "morocc") {
		setarray @wrpD$[0], "¡", "", "", "ħ", "ħ˹";
		setarray @wrpP[0], 1200, 1200, 1800, 1800, 1200;
		setarray @viewpX[0], 156, 163, 28, 292;
		setarray @viewpY[0], 97, 260, 167, 211;
	} else if (strnpcinfo(4) == "umbala") {
		setarray @wrpD$[0], "ħ";
		setarray @wrpP[0], 1800;
	} else if (strnpcinfo(4) == "payon") {
		setarray @wrpD$[0], "¡", "", "޿";
		setarray @wrpP[0], 1200, 1200, 1200;
	} else if (strnpcinfo(4) == "yuno") {
		setarray @wrpD$[0], "";
		setarray @wrpP[0], 1200;
		setarray @viewpX[0], 328, 278, 153, 0;
		setarray @viewpY[0], 108, 221, 187, 0;
	} else if (strnpcinfo(4) == "job3_rune01") {
		setarray @wrpD$[0], "˹³", "", "", "޿", "";
		setarray @wrpP[0], 600, 1200, 1200, 1200, 1800;
	}
	for (set .@i, 0; .@i < getarraysize(@wrpD$); set .@i, .@i + 1)
		setd "@wrpC$["+.@i+"]",getd("@wrpD$["+.@i+"]")+" -> "+getd("@wrpP["+.@i+"]");
	setd "@wrpC$["+getarraysize(@wrpC$)+"]","- ȡ";
	return;
}