//==================================
// [] The PlutoEA Project []
// http://opensvn.csie.org/PlutoEA
// ---------------------------------
// - PVP } -
//===================================
// PvPѻ
//===================================

alberta_in,22,146,4	script	PvPѻ#alb	84,{
	callfunc "F_PvPNarr", "alberta_in", 24, 143;
	end;
}
payon_in01,173,109,3	script	PvPѻ#pay	84,{
	callfunc "F_PvPNarr", "payon_in01", 169, 108;
	end;
}
prt_in,56,140,4	script	PvPѻ#prt	84,{
	callfunc "F_PvPNarr", "prt_in", 54, 137;
	end;
}
morocc_in,144,138,4	script	PvPѻ#moc	84,{
	callfunc "F_PvPNarr", "morocc_in", 141, 140;
	end;
}
geffen_in,67,63,4	script	PvPѻ#gef	84,{
	callfunc "F_PvPNarr", "geffen_in", 64, 60;
	end;
}


function	script	F_PvPNarr	{
	mes "[PVPѻ]";
	mes "An!";
	mes "ڬOPVP";
	mes "ѻ";
	mes "PVP ѻ!";
	next;
	switch (select("^3355ffPVPҦ^000000?:sPVPҦ?:PVPҦWhO?:sx{bm:")) {
	case 1:
		mes "[PVPѻ]";
		mes "PVPҦNO";
		mes "'Player VS Player Mode'";
		mes "²g..";
		mes "]NO@ئbQ@ɸ̡A";
		mes "ɨajԪSO԰";
		next;
		mes "[PVPѻ]";
		mes "²檺NOPLaҦ";
		mes "unVڨo^3355ffuH^000000@n";
		mes "@Nժ";
		mes "LK|";
		mes "޾ɧAiJPVPҦҷǳƪ";
		next;
		mes "[PVPѻ]";
		mes "ЧA@wnp";
		mes "]Цnnɨ԰ֽa";
		mes "niJPVPҦ";
		mes "aŭnF31ťHW";
		next;
		mes "[PVPѻ]";
		mes "֦ѥ[H";
		mes "iHNܤUCӼҦ䤤@";
		mes "NOLҦ";
		mes "ηȷȵUҦC";
		next;
		mes "[PVPѻ]";
		mes "bLҦC";
		mes "Whb";
		mes "O@˪";
		mes "]D|po";
		mes "gȤ]|lC";
		next;
		mes "[PVPѻ]";
		mes "мo@IA";
		mes "HקKoͪC";
		mes "ХJӦҼ{MAiJC";
		close;
	case 2:
		mes "[PVPѻ]";
		mes "zLڨǳo ' PVPuH ' ";
		mes "аOo";
		mes "ú500";
		mes "KiHPVPҦ";
		mes "ʫeC";
		next;
		mes "[PVPѻ]";
		mes "Ҧ";
		mes "ȷȵUҦM";
		mes "LҦ";
		mes "Ф@wp߿ܦۤvҦ";
		mes "o";
		mes "Ҧ";
		next;
		mes "[PVPѻ]";
		mes "UƦWѻ";
		mes "L̷|N31ťHWѥ[";
		mes "C10";
		mes "AӤ";
		next;
		mes "[PVPѻ]";
		mes "5PVPMΩжiѿ";
		mes "ܧAҷQhөж";
		mes "Kiʨ쨺";
		mes "qѻYWf";
		next;
		mes "[PVPѻ]";
		mes "iHDŪ";
		mes "HΦaϥbi楴H";
		mes "oIЧAn`N";
		next;
		mes "[PVPѻ]";
		mes "ѻYWf";
		mes "|X{iѥ[H/`Hơjo˪ƾ";
		next;
		mes "[PVPѻ]";
		mes "t@IЪ`N";
		mes "PVPMΦa";
		mes "OLk";
		mes "xsm";
		mes "Ъ`NHWoI";
		close;
	case 3:
		mes "[PVPѻ]";
		mes "iJPVPҦ";
		mes "ekU";
		mes "X{O";
		mes "Ӧa";
		mes "aۤvƦ / aϪaH";
		next;
		mes "[PVPѻ]";
		mes "۫H|AU";
		mes "bPVPҦg?";
		mes "ubPVPҦA";
		mes "oIn`N";
		mes "@}lC쪱ag?";
		next;
		mes "[PVPѻ]";
		mes "򥻤WO' 5 '";
		mes "b~YO";
		mes "ĹoӧQ";
		mes "iW[g 1";
		mes "YOѪ";
		next;
		mes "[PVPѻ]";
		mes "hg| 5";
		mes "pGg0HU";
		next;
		mes "[PVPѻ]";
		mes "h|QXPVPҦ";
		mes "o~ѻP";
		mes "OpGgj0";
		mes "oQ";
		mes "iHǥѦP";
		next;
		mes "[PVPѻ]";
		mes "^_OA~ѻPC";
		mes "o˧AFa";
		next;
		mes "[PVPѻ]";
		mes "Wh";
		mes "P~԰Wh";
		mes "O@˪";
		close;
	case 4:
		savepoint getarg(0),getarg(1),getarg(2);
		mes "[PVPѻ]";
		mes "wg\sxm";
		mes "D`P±zϥ";
		close;
	case 5:
		mes "[PVPѻ]";
		mes "oO@ݩ󪱮aPaj";
		mes "]O@";
		mes "a̦b԰ֽ쪺";
		mes "PVPҦ!";
		mes "ݦU";
		mes "ieӬD !";
		close;
	}
}

//===================================
// PvPuH
//===================================
-	script	uH::PvPdoor	-1,{
	mes "[uH]";
	mes "ܰAA";
	mes "ڬOz}PVP";
	mes "' PVP uH";
	mes "PVPҦ";
	mes "ЧAhV䨺ѻ";
	mes "߰!";
	next;
	switch ( select("e^ff3355PVP LҦ^000000 :e^3355FFPVP ȷȵUҦ^000000 :e^3355FFPVP QҦ^000000 :")) {
	case 1:
		mes "[uH]";
		mes "ثewϥ ";
		mes "PVPLҦF.";
		mes "z@NPVP ";
		mes "ЧQηȷȵUҦa.";
		close;

	case 2:
		mes "[uH]";
		mes "ѥ[OO500 Zeny znʨ";
		mes "ȷȵUҦ";
		mes "ʨPVP?";
		next;
		switch( select(":")) {
		case 1:
			if(Zeny<500 || BaseLevel<31) {
			mes "[uH]";
			mes "藍_!";
			mes "z Zeny  AΪ";
			mes "zŤ31";
			close;
			}
			set Zeny,Zeny-500;
			warp "pvp_y_room",51,23;
			end;
		case 2:
		break;
		}
	case 3:
		mes "[uH]";
		mes "w{";
		mes "AbT{@U";
		mes "ASɨΪ[nܡH";
		next;
		mes "[uH]";
		mes "..... c? SܡH";
		mes "ܩpAov޳O";
		mes "uaӰɨΪ[骺H";
		mes "~iӪC";
	close;

	case 4:
		mes "[uH]";
		mes "oO@ݩ󪱮aPaj";
		mes "]O@";
		mes "a̦b԰ֽ쪺";
		mes "PVPҦ!";
		mes "ݦU";
		mes "ieӬD !";
		close;
	}
}

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

//===================================
// PvPݭ
//===================================
// ȷȵUҦ Lŭ
pvp_y_room,86,85,4	script	ݭ#1	105,{
	callfunc "F_PvPRoom", "y_8",0,255;
OnInit:
	waitingroom "L", 0;
	end;
}

// LҦ Lŭ
pvp_n_room,86,85,4	script	ݭ	105,{
	callfunc "F_PvPRoom", "n_8",0,255;
OnInit:
	waitingroom "L", 0;
	end;
}

function	script	F_PvPRoom	{

	if(BaseLevel < 31) {
		mes "[ݭ]";
		mes "ܤ֭nLV31HW~iiJ";
	}
	set @menu,select(	"wԁ@[" +getmapusers("pvp_y_8-1")+ " / 128]",
				"̴|o@[" +getmapusers("pvp_y_8-2")+ " / 128]",
				"@[" +getmapusers("pvp_y_8-3")+ " / 128]",
				"㺸@[" +getmapusers("pvp_y_8-4")+ " / 128]",
				"ùJ@[" 	+getmapusers("pvp_y_8-5")+ " / 128]",
				"");
	if(@menu==6) {
		close;
	}

	if(getmapusers("pvp_y_8-"+@menu+"") >= 128) {
		mes "[ݭ]";
		mes "HƨF";
		return;
	}
	warp "pvp_y_8-"+@menu+"",0,0;	end;
	close;

OnInit:
	waitingroom "L",0;
	end;
}