//==================================
// [ڤ] The PlutoEA Project []
// http://opensvn.csie.org/PlutoEA
// ---------------------------------
// - PVP ű -
//===================================
// PvP˵Ա
//===================================
alberta_in.gat,22,146,4	script	PvP˵Ա#alb	84,{
	callfunc "F_PvPNarr", "alberta_in.gat", 24, 143;
	end;
}
payon_in01.gat,173,109,3	script	PvP˵Ա#pay	84,{
	callfunc "F_PvPNarr", "payon_in01.gat", 169, 108;
	end;
}
prt_in.gat,56,140,4	script	PvP˵Ա#prt	84,{
	callfunc "F_PvPNarr", "prt_in.gat", 54, 137;
	end;
}
morocc_in.gat,144,138,4	script	PvP˵Ա#moc	84,{
	callfunc "F_PvPNarr", "morocc_in.gat", 141, 140;
	end;
}
geffen_in.gat,67,63,4	script	PvP˵Ա#gef	84,{
	callfunc "F_PvPNarr", "geffen_in.gat", 64, 60;
	end;
}


function	script	F_PvPNarr	{
	mes "[PVP˵Ա]";
	mes "!";
	mes "ǵPVP";
	mes "˵";
	mes "PVP ˵Ա!";
	next;
	switch (select("^3355ffPVPģʽ^000000?","ʲôPVPģʽ?","PVPģʽĹʲô?","洢λ","Ի")) {
	case 1:
		mes "[PVP˵Ա]";
		mes "PVPģʽ";
		mes "'Player VS Player Mode'";
		mes "ļд..";
		mes "Ҳһڼ";
		mes "Ҽսرս";
		next;
		mes "[PVP˵Ա]";
		mes "򵥵˵Ҵ򶷵ģʽ";
		mes "ֻҪλ^3355ff^000000˵һ";
		mes "ʾԸⳢԵĻ";
		mes "";
		mes "ΪPVPģʽ׼Ĵ򶷳";
		next;
		mes "[PVP˵Ա]";
		mes "һҪС";
		mes "ҲúսȤ";
		mes "ҪPVPģʽ";
		mes "ҵȼҪﵽ31";
		next;
		mes "[PVP˵Ա]";
		mes "ӵвμʸԺ";
		mes "ѡģʽеһ";
		mes "Ǿģʽ";
		mes "ģʽ";
		next;
		mes "[PVP˵Ա]";
		mes "ģʽеϷ";
		mes "ʵս";
		mes "һ";
		mes "˵߻е";
		mes "ֵҲʧ";
		next;
		mes "[PVP˵Ա]";
		mes "֪һ㣬";
		mes "Աִⷢ";
		mes "ϸٽ롣";
		close;
	case 2:
		mes "[PVP˵Ա]";
		mes "͸λ ' PVP ' ";
		mes "ǵ";
		mes "ɽ500";
		mes "PVPģʽĴ򶷳";
		mes "ƶǰ";
		next;
		mes "[PVP˵Ա]";
		mes "ģʽΪ";
		mes "ģʽ";
		mes "ģʽ";
		mes "һСѡԼģʽ";
		mes "";
		mes "ģʽĴ򶷳";
		next;
		mes "[PVP˵Ա]";
		mes "˵Ա";
		mes "ǻὫ31ϵĲμ";
		mes "ÿ10ȼ";
		mes "ϸ";
		next;
		mes "[PVP˵Ա]";
		mes "5PVPר÷ɹѡ";
		mes "ѡȥǸ";
		mes "ƶ";
		mes "ӽ˵ԱͷϵĴ";
		next;
		mes "[PVP˵Ա]";
		mes "֪ȼ";
		mes "Լ˵ͼڽд򶷵";
		mes "Ҫע";
		next;
		mes "[PVP˵Ա]";
		mes "˵ԱͷϵĴ";
		mes "֡μ/";
		next;
		mes "[PVP˵Ա]";
		mes "һע";
		mes "PVPרõͼ";
		mes "޷";
		mes "λõ";
		mes "ע";
		close;
	case 3:
		mes "[PVP˵Ա]";
		mes "PVPģʽ";
		mes "½";
		mes "ֵ";
		mes "õͼ";
		mes "Լ / ͼ";
		next;
		mes "[PVP˵Ա]";
		mes "Żа";
		mes "PVPģʽеľ?";
		mes "ֻPVPģʽ";
		mes "Ҫע";
		mes "һʼÿλҵľ?";
		next;
		mes "[PVP˵Ա]";
		mes "϶' 5 '";
		mes ";";
		mes "ӮʤĻ";
		mes "Ӿ 1";
		mes "ʧܵĻ";
		next;
		mes "[PVP˵Ա]";
		mes " 5";
		mes "0";
		next;
		mes "[PVP˵Ա]";
		mes "ᱻ߳PVPģʽ";
		mes "ü";
		mes "0";
		mes "ȴɱĻ";
		mes "Խͬ";
		next;
		mes "[PVP˵Ա]";
		mes "ظϷ";
		mes "㶮˰";
		next;
		mes "[PVP˵Ա]";
		mes "򶷵Ĺ";
		mes "սĹ";
		mes "һ";
		close;
	case 4:
		savepoint getarg(0),getarg(1),getarg(2);
		mes "[PVP˵Ա]";
		mes "Ѿɹ洢λ";
		mes "ǳлʹ";
		close;
	case 5:
		mes "[PVP˵Ա]";
		mes "һҼĴս";
		mes "Ҳһ";
		mes "սҵȤ";
		mes "PVPģʽ!";
		mes "ڴλ";
		mes "ǰս !";
		close;
	}
}

//===================================
// PvP
//===================================
-	script	::PvPdoor	-1,{
	mes "[]";
	mes "ܸΪ";
	mes "ΪPVP򶷳֮";
	mes "' PVP ";
	mes "йPVPģʽ˵";
	mes "ȥԱλ˵Ա";
	mes "ѯ!";
	next;
	switch ( select("ǰ^ff3355PVP ģʽ^000000 򶷳","ǰ^3355FFPVP ģʽ^000000 򶷳","ǰ^3355FFPVP ģʽ^000000 򶷳","Ի")) {
	case 1:
		mes "[]";
		mes "Ŀǰֹͣʹ ";
		mes "PVPģʽ.";
		mes "ԸPVPĻ ";
		mes "ģʽ.";
		close;

	case 2:
		mes "[]";
		mes "μӷ500 Zeny Ҫƶ";
		mes "ģʽ";
		mes "ƶPVP򶷳?";
		next;
		switch( select("ƶ","ȡ")) {
		case 1:
			if(Zeny<500 || BaseLevel<31) {
			mes "[]";
			mes "Բ!";
			mes " Zeny  ";
			mes "ĵȼ31";
			close;
			}
			set Zeny,Zeny-500;
			warp "pvp_y_room",51,23;
			end;
		case 2:
		break;
		}
	case 3:
		mes "[]";
		mes "ӭ١";
		mes "ȷһ";
		mes "ûвȯ߹ȯ";
		next;
		mes "[]";
		mes "..... ? û";
		mes "ܱǸ";
		mes "ֻдȯ߹ȯ";
		mes "ܽġ";
	close;

	case 4:
		mes "[]";
		mes "һҼĴս";
		mes "Ҳһ";
		mes "սҵȤ";
		mes "PVPģʽ!";
		mes "ڴλ";
		mes "ǰս !";
		close;
	}
}

alberta_in.gat,26,146,4	duplicate(PvPdoor)	#alb	83
geffen_in.gat,63,63,4	duplicate(PvPdoor)	#gef	83
morocc_in.gat,144,142,4	duplicate(PvPdoor)	#moc	83
payon_in01.gat,140,53,4	duplicate(PvPdoor)	#pay	83
prt_in.gat,52,140,4	duplicate(PvPdoor)	#prt	83

//===================================
// PvPӴԱ
//===================================
// ģʽ ޵ȼ
pvp_y_room.gat,86,85,4	script	򶷳ӴԱ#1	105,{
	callfunc "F_PvPRoom", "y_8",0,255;
OnInit:
	waitingroom "", 0;
	end;
}

// ģʽ ޵ȼ
pvp_n_room.gat,86,85,4	script	򶷳ӴԱ	105,{
	callfunc "F_PvPRoom", "n_8",0,255;
OnInit:
	waitingroom "", 0;
	end;
}

function	script	F_PvPRoom	{

	if(BaseLevel < 31) {
		mes "[򶷳ӴԱ]";
		mes "ҪLV31ϲſɽ";
	}
	set @menu,select(	"¡?[" +getmapusers("pvp_y_8-1.gat")+ " / 128]",
				"˹³?[" +getmapusers("pvp_y_8-2.gat")+ " / 128]",
				"?[" +getmapusers("pvp_y_8-3.gat")+ " / 128]",
				"?[" +getmapusers("pvp_y_8-4.gat")+ " / 128]",
				"޿?[" 	+getmapusers("pvp_y_8-5.gat")+ " / 128]",
				"ȡ");
	if(@menu==6) {
		close;
	}

	if(getmapusers("pvp_y_8-"+@menu+"") >= 128) {
		mes "[򶷳ӴԱ]";
		mes "Ｋ";
		return;
	}
	warp "pvp_y_8-"+@menu+"",0,0;	end;
	close;

OnInit:
	waitingroom "",0;
	end;
}