//==============================================
// PVPa
// NXg & ץ by FPE (2006.7.16)
// Jathena++ ׾¡Ghttp://www.foxofice.net/bbs
//----------------------------------------------

function	script	MFJA_pvp_fun03	{
	if(BaseLevel<getarg(0) || BaseLevel>getarg(1))
	{
		mes "[PVP ݭ]";
		mes "藍_C";
		mes "";
		mes "uŦb" + getarg(0) + "" + getarg(1) + "a";
		mes "~JC";
		close;
		end;
	}

	switch(select("wԡ@[" + getmapusers(getarg(2)) + " / 128]",
				  "̴|o@[" + getmapusers(getarg(3)) + " / 128]",
				  "p@[" + getmapusers(getarg(4)) + " / 128]",
				  "㺸@[" + getmapusers(getarg(5)) + " / 128]",
				  "ùJ@[" + getmapusers(getarg(6)) + " / 128]",
				  ""))
	{
	case 1:
		if(getmapusers(getarg(2))>=128) break;
		warp getarg(2),0,0;
		end;
		break;
	case 2:
		if(getmapusers(getarg(3))>=128) break;
		warp getarg(3),0,0;
		end;
		break;
	case 3:
		if(getmapusers(getarg(4))>=128) break;
		warp getarg(4),0,0;
		end;
		break;
	case 4:
		if(getmapusers(getarg(5))>=128) break;
		warp getarg(5),0,0;
		end;
		break;
	case 5:
		if(getmapusers(getarg(6))>=128) break;
		warp getarg(6),0,0;
		end;
		break;
	case 6:
		close;
		end;
		break;
	}
	mes "[PVP ݭ]";
	mes "藍_AFC";
	close;
	end;
}

pvp_y_room.gat,30,85,4	script	ݭ::pvpy1r	780,{
	callfunc "MFJA_pvp_fun03",31,40,"pvp_y_1-1.gat","pvp_y_1-2.gat","pvp_y_1-3.gat","pvp_y_1-4.gat","pvp_y_1-5.gat";
OnInit:
	waitingroom "LV 31 ~ LV 40",0;
	end;
}

pvp_y_room.gat,38,85,4	script	ݭ::pvpy2r	780,{
	callfunc "MFJA_pvp_fun03",41,50,"pvp_y_2-1.gat","pvp_y_2-2.gat","pvp_y_2-3.gat","pvp_y_2-4.gat","pvp_y_2-5.gat";
OnInit:
	waitingroom "LV 40 ~ LV 50",0;
	end;
}

pvp_y_room.gat,46,85,4	script	ݭ::pvpy3r	780,{
	callfunc "MFJA_pvp_fun03",51,60,"pvp_y_3-1.gat","pvp_y_3-2.gat","pvp_y_3-3.gat","pvp_y_3-4.gat","pvp_y_3-5.gat";
OnInit:
	waitingroom "LV 51 ~ LV 60",0;
	end;
}
pvp_y_room.gat,54,85,4	script	ݭ::pvpy4r	780,{
	callfunc "MFJA_pvp_fun03",61,70,"pvp_y_4-1.gat","pvp_y_4-2.gat","pvp_y_4-3.gat","pvp_y_4-4.gat","pvp_y_4-5.gat";
OnInit:
	waitingroom "LV 61 ~ LV 70",0;
	end;
}
pvp_y_room.gat,62,85,4	script	ݭ::pvpy5r	780,{
	callfunc "MFJA_pvp_fun03",71,80,"pvp_y_5-1.gat","pvp_y_5-2.gat","pvp_y_5-3.gat","pvp_y_5-4.gat","pvp_y_5-5.gat";
OnInit:
	waitingroom "LV 71 ~ LV 80",0;
	end;
}

pvp_y_room.gat,70,85,4	script	ݭ::pvpy6r	780,{
	callfunc "MFJA_pvp_fun03",81,90,"pvp_y_6-1.gat","pvp_y_6-2.gat","pvp_y_6-3.gat","pvp_y_6-4.gat","pvp_y_6-5.gat";
OnInit:
	waitingroom "LV 81 ~ LV 90",0;
	end;
}

pvp_y_room.gat,78,85,4	script	ݭ::pvpy7r	780,{
	callfunc "MFJA_pvp_fun03",91,255,"pvp_y_7-1.gat","pvp_y_7-2.gat","pvp_y_7-3.gat","pvp_y_7-4.gat","pvp_y_7-5.gat";
OnInit:
	waitingroom "LV 91 ~",0;
	end;
}

pvp_y_room.gat,86,85,4	script	ݭ::pvpy8r	780,{
	callfunc "MFJA_pvp_fun03",1,255,"pvp_y_8-1.gat","pvp_y_8-2.gat","pvp_y_8-3.gat","pvp_y_8-4.gat","pvp_y_8-5.gat";
OnInit:
	waitingroom "L",0;
	end;
}

//---------------------------------------------------------------------------------------

function	script	MFJA_pvp_fun04	{
	if(BaseLevel<getarg(0) || BaseLevel>getarg(1))
	{
		mes "[PVP ݭ]";
		mes "藍_C";
		mes "";
		mes "uŦb" + getarg(0) + "" + getarg(1) + "a";
		mes "~JC";
		close;
		end;
	}

	switch(select("Tv ж@[" + getmapusers(getarg(2)) + " / 64]",
				  "pFw ж@[" + getmapusers(getarg(3)) + " / 32]",
				  "|qD ж@[" + getmapusers(getarg(4)) + " / 32]",
				  "ϤQr ж@[" + getmapusers(getarg(5)) + " / 32]",
				  "ùL ж@[" + getmapusers(getarg(6)) + " / 32]",
				  ""))
	{
	case 1:
		if(getmapusers(getarg(2))>=64) break;
		warp getarg(2),0,0;
		end;
		break;
	case 2:
		if(getmapusers(getarg(3))>=32) break;
		warp getarg(3),0,0;
		end;
		break;
	case 3:
		if(getmapusers(getarg(4))>=32) break;
		warp getarg(4),0,0;
		end;
		break;
	case 4:
		if(getmapusers(getarg(5))>=32) break;
		warp getarg(5),0,0;
		end;
		break;
	case 5:
		if(getmapusers(getarg(6))>=32) break;
		warp getarg(6),0,0;
		end;
		break;
	case 6:
		close;
		end;
		break;
	}
	mes "[PVP ݭ]";
	mes "藍_AFC";
	close;
	end;
}

pvp_n_room.gat,30,85,4	script	ݭ::pvpn1r	780,{
	callfunc "MFJA_pvp_fun04",31,40,"pvp_n_1-1.gat","pvp_n_1-2.gat","pvp_n_1-3.gat","pvp_n_1-4.gat","pvp_n_1-5.gat";
OnInit:
	waitingroom "LV 31 ~ LV 40",0;
	end;
}

pvp_n_room.gat,38,85,4	script	ݭ::pvpn2r	780,{
	callfunc "MFJA_pvp_fun04",41,50,"pvp_n_2-1.gat","pvp_n_2-2.gat","pvp_n_2-3.gat","pvp_n_2-4.gat","pvp_n_2-5.gat";
OnInit:
	waitingroom "LV 41 ~ LV 50",0;
	end;
}

pvp_n_room.gat,46,85,4	script	ݭ::pvpn3r	780,{
	callfunc "MFJA_pvp_fun04",51,60,"pvp_n_3-1.gat","pvp_n_3-2.gat","pvp_n_3-3.gat","pvp_n_3-4.gat","pvp_n_3-5.gat";
OnInit:
	waitingroom "LV 51 ~ LV 60",0;
	end;
}

pvp_n_room.gat,54,85,4	script	ݭ::pvpn4r	780,{
	callfunc "MFJA_pvp_fun04",61,70,"pvp_n_4-1.gat","pvp_n_4-2.gat","pvp_n_4-3.gat","pvp_n_4-4.gat","pvp_n_4-5.gat";
OnInit:
	waitingroom "LV 61 ~ LV 70",0;
	end;
}

pvp_n_room.gat,62,85,4	script	ݭ::pvpn5r	780,{
	callfunc "MFJA_pvp_fun04",71,80,"pvp_n_5-1.gat","pvp_n_5-2.gat","pvp_n_5-3.gat","pvp_n_5-4.gat","pvp_n_5-5.gat";
OnInit:
	waitingroom "LV 71 ~ LV 80",0;
	end;
}

pvp_n_room.gat,70,85,4	script	ݭ::pvpn6r	780,{
	callfunc "MFJA_pvp_fun04",81,90,"pvp_n_6-1.gat","pvp_n_6-2.gat","pvp_n_6-3.gat","pvp_n_6-4.gat","pvp_n_6-5.gat";
OnInit:
	waitingroom "LV 81 ~ LV 90",0;
	end;
}

pvp_n_room.gat,78,85,4	script	ݭ::pvpn7r	780,{
	callfunc "MFJA_pvp_fun04",91,255,"pvp_n_7-1.gat","pvp_n_7-2.gat","pvp_n_7-3.gat","pvp_n_7-4.gat","pvp_n_7-5.gat";
OnInit:
	waitingroom "LV 91 ~",0;
	end;
}

pvp_n_room.gat,86,85,4	script	ݭ::pvpn8r	780,{
	callfunc "MFJA_pvp_fun04",1,255,"pvp_n_8-1.gat","pvp_n_8-2.gat","pvp_n_8-3.gat","pvp_n_8-4.gat","pvp_n_8-5.gat";
OnInit:
	waitingroom "L",0;
	end;
}