// CVC 趨
//###########################################################################################
// GVG - 00:00 2004/06/27 
// BY Michael ңƷ  http//www.99nest.com
//###########################################################################################
//npc "gef_fild13" "" GUILD_FLAG 78 182 4 5 5
gef_fild13.gat,78,182,4	script	#g3-1	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	if (GetCharID(2) == @GIDg3) goto L_Member;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;
L_Member:
	mes "[ ɤ ]";
	mes "¸ҵ...";
	mes "Ҫص֮?";
	next;
	menu "صܻ ",L_Warp," ",-;
	close;
	end;
L_Warp:
	warp "gefg_cas03.gat",116,89;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gef_fild13" "" GUILD_FLAG 87 182 4 5 5
gef_fild13.gat,87,182,4	script	#g3-2	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	if (GetCharID(2) == @GIDg3) goto L_Member;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;
L_Member:
	mes "[ ɤ ]";
	mes "¸ҵ...";
	mes "Ҫص֮?";
	next;
	menu "صܻ ",L_Warp," ",-;
	close;
	end;
L_Warp:
	warp "gefg_cas03.gat",116,89;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gef_fild13" "" GUILD_FLAG 73 295 7 5 5
gef_fild13.gat,73,295,7	script	#g3-3	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	if (GetCharID(2) == @GIDg3) goto L_Member;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;
L_Member:
	mes "[ ɤ ]";
	mes "¸ҵ...";
	mes "Ҫص֮?";
	next;
	menu "صܻ ",L_Warp," ",-;
	close;
	end;
L_Warp:
	warp "gefg_cas03.gat",116,89;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gef_fild13" "" GUILD_FLAG 113 274 7 5 5
gef_fild13.gat,113,274,7	script	#g3-4	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	if (GetCharID(2) == @GIDg3) goto L_Member;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;
L_Member:
	mes "[ ɤ ]";
	mes "¸ҵ...";
	mes "Ҫص֮?";
	next;
	menu "صܻ ",L_Warp," ",-;
	close;
	end;
L_Warp:
	warp "gefg_cas03.gat",116,89;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gef_fild13" "" GUILD_FLAG 144 235 6 5 5
gef_fild13.gat,144,235,6	script	#g3-5	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	if (GetCharID(2) == @GIDg3) goto L_Member;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;
L_Member:
	mes "[ ɤ ]";
	mes "¸ҵ...";
	mes "Ҫص֮?";
	next;
	menu "صܻ ",L_Warp," ",-;
	close;
	end;
L_Warp:
	warp "gefg_cas03.gat",116,89;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gef_fild13" "" GUILD_FLAG 144 244 4 5 5
gef_fild13.gat,144,244,4	script	#g3-6	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	if (GetCharID(2) == @GIDg3) goto L_Member;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;
L_Member:
	mes "[ ɤ ]";
	mes "¸ҵ...";
	mes "Ҫص֮?";
	next;
	menu "صܻ ",L_Warp," ",-;
	close;
	end;
L_Warp:
	warp "gefg_cas03.gat",116,89;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gefg_cas03" "" GUILD_FLAG 122 220 6 5 5
gefg_cas03.gat,122,220,6	script	#g3-7	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gefg_cas03" "" GUILD_FLAG 122 229 6 5 5
gefg_cas03.gat,122,229,6	script	#g3-8	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gefg_cas03" "" GUILD_FLAG 91 257 7 5 5
gefg_cas03.gat,91,257,7	script	#g3-9	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gefg_cas03" "" GUILD_FLAG 52 276 7 5 5
gefg_cas03.gat,52,276,7	script	#g3-10	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gefg_cas03" "" GUILD_FLAG 56 164 4 5 5
gefg_cas03.gat,56,164,4	script	#g3-11	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gefg_cas03" "" GUILD_FLAG 65 164 4 5 5
gefg_cas03.gat,65,164,4	script	#g3-12	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gefg_cas03" "" GUILD_FLAG 37 214 1 5 5
gefg_cas03.gat,37,214,1	script	#g3-13	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}

//npc "gefg_cas03" "" GUILD_FLAG 34 208 1 5 5
gefg_cas03.gat,34,208,1	script	#g3-14	722,{
	set @GIDg3,getcastledata("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "   ﹫ΪûʽȨ";
	mes "   ";
	mes " ";
	mes "2. սʤģµĿ֮";
	mes "   ƻ";
	mes "   ";
	mes "   ֤";
	mes "   ܻȨ";
	close;
	end;
L_Guild:
	mes "       [ ¡   ]";
	mes " ";
	mes "1. ģ¡";
	mes "    ﱻ϶Ϊ ^ff0000" + GetGuildName(@GIDg3) + "^000000";
	mes "    ˽";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDg3) + "^000000 ";
	mes "    ^ff0000" + GetGuildMaster(@GIDg3) + "^000000  ˭";
	mes "    ";
	mes "    ĽԼ";
	close;
	end;

OnRecvCastleG03:
	FlagEmblem GetCastleData("gefg_cas03.gat",1);
	end;
}











//npc "gefg_cas03" " " HIDDEN_NPC 267 287 0 5 5
//gefg_cas03.gat,267,287,0	script		111,{
gefg_cas03.gat,275,289,0	script		111,{
	mes " ";
	mes "С Ҫ? ";
	next;
	menu "Ҫ ",L_Yes,"ҲҪ ",L_No;
L_Yes:
	warp "gefg_cas03.gat",106,24;
	end;
L_No:
	close;
	end;
}

//npc "gefg_cas03" " " HIDDEN_NPC 221 43 0 5 5
gefg_cas03.gat,221,43,0	script		111,{
	set @GIDg3,GetCastleData("gefg_cas03.gat",1);
	if (@GIDg3 > 0) goto L_Guild;
	mes " [  ] ";
	mes " ' ͨΪ ... ȥѰ·' ";
	close;
	end;
L_Guild:
	mes "[  ]";
	mes " ' ֻˣܽܿ鰡'";
	next;
	mes " ";
	mes "С Ҫ? ";
	next;
	menu "Ҫ ",L_Yes,"ҲҪ ",L_No;
L_Yes:
	if (GetCharID(2) != @GIDg3) goto L_NotMember;
	warp "gld_dun04.gat",268,251;
	end;
L_NotMember:
	mes " ";
	mes " ûзκ ";
	close;
	end;
L_No:
	close;
	end;
}



//npc "gefg_cas03" " ְԱ" 4_F_KAFRA1 116 89 5 5 5
gefg_cas03.gat,116,89,5	script	 ְԱ#gef3	117,{
//OnClick:
	cutin "kafra_01.bmp",2;
	set @GIDg3,GetCastleData("gefg_cas03.gat",1);
	if (@GIDg3 == GetCharID(2)) goto L_Member;
	mes "[ ְԱ]";
	mes "ǩԼרΪ^ff0000" + GetGuildName(@GIDg3) + "^000000 Ա ʹطĿְԱ в֮";
	cutin "kafra_01.bmp",255;
	close;
	end;
L_Member:
	mes " [ ְԱ]";
	mes "ӭ ^ff0000" + GetGuildName(@GIDg3) + "^000000 Ա ";
	mes "(޹˾) ԶڸλΪ";
	next;
	menu "ʹòֿ",L_M1,"ʹÿռƶ",L_M2,"ʹƳ ",L_M3,"",L_M4;
	L_M1:
		if (getskilllv(1) < 6) goto L_M1_A;
		mes "[ ְԱ]";
		mes "Ҫ򿪲ֿ";
		mes "ллʹá";
		cutin "kafra_01.bmp",255;
		openstorage;
		close;
		end;
		L_M1_A://Basic Skill < 6
			mes "[ ְԱ]";
			mes "ҪʹòֿĻ ѧ߼ܵȼҪ6ϲ";
			cutin "kafra_01.bmp",255;
			close;
			end;
	L_M2:
		mes "[ ְԱ]";
		mes "˵Ŀĵذ";
		next;
		menu "  -> 200 z",L_M2_M1," ȡ ",L_M2_M2;
		L_M2_M1:
			if (Zeny < 200) goto L_M2_M1_A;
			set Zeny,Zeny-200;
//			set kf_10_pit,kf_10_pit+2;
			warp "geffen.gat",113,103;
			end;
			L_M2_M1_A:
				mes "[ ְԱ]";
				mes "Ա/С ֧Ľ ȷ";
				cutin "kafra_01.bmp",255;
				close;
				end;
		L_M2_M2:
			cutin "kafra_01.bmp",255;
			close;
			end;
	L_M3:
		if ((Class != 5) && (Class != 10)) goto L_M3_A;
		if (checkcart != 0) goto L_M3_B;
		mes "[ ְԱ]";
		mes "Ƴʹ÷ 800  Ҫʹ?";
		next;
		menu "ʹ ",L_M3_M1,"ȡ ",L_M3_M2;
		L_M3_M1:
			if (Zeny < 800) goto L_M3_M1_A;
//			set kf_10_pit,kf_10_pit+8;
			set Zeny,Zeny-800;
			setcart;
			cutin "kafra_01.bmp",255;
			close;
			end;
			L_M3_M1_A:
				mes "[ ְԱ]";
				mes "˿ ֧Ľ Ƴʹ÷800 ";
				cutin "kafra_01.bmp",255;
				close;
				end;
		L_M3_M2:
			cutin "kafra_01.bmp",255;
			close;
			end;
		L_M3_A:
			mes "[ ְԱ]";
			mes "Բ Ƴ˺רõķ";
			cutin "kafra_01.bmp",255;
			close;
			end;
		L_M3_B:
			mes "[ ְԱ]";
			mes "˿ѾװƳ";
			cutin "kafra_01.bmp",255;
			close;
			end;
	L_M4:
		mes "[ ְԱ]";
		mes "ǿ(޹˾)ṩķ ϸҵ øλ˿ͰıʹãΪĿ";
		mes "лʹ (޹˾) ";
		cutin "kafra_01.bmp",255;
		close;	
		end;
OnInit:
	disablenpc " ְԱ#gef3";
	End;
}


//npc "gefg_cas03" "" 1_M_JOBTESTER 106 23 5 5 5
gefg_cas03.gat,106,23,5	script	#gef3	55,{
//OnClick:
	set @GIDg3,GetCastleData("gefg_cas03.gat",1);
	if (@GIDg3 == 0) goto L_Waiting;
	if (strcharinfo(0) != GetGuildMaster(@GIDg3)) goto L_Member;
	goto L_Castle;
	end;
// ------- ڵʱ------------------------------------------
L_Waiting:
	mes "[]";
	mes "  ҽҵ ڵȴҵ";
	mes "ʿ...һ˰ ...";
	close;
	end;
// -----------------------------------------------------------------------------
// --------ҵ ? -----------------------------------------------
L_Member:
	mes "[]";
	mes "ôв ֻԸ׷ҵ ^ff0000" + GetGuildMaster(@GIDg3) + "^000000 ! ໤ѽ! ϿЩļһǸ߰!";
	close;
	end;
//-----------------------------------------------------------------------------
L_Castle:
	mes "[]";
	mes "ӭ  ҵ^ff0000" + GetGuildMaster(@GIDg3) + "^000000/С...";
	mes "뾡ܷԸ ҽҳϵΪ";
	next;
//	choose menu "鿴ܻ״" "Ͷҵչ" "Ͷʷ" "ü໤ " " /  ְֿԱ" "˷" "óܻ"
	menu "鿴ܻ״",L_M1,"Ͷҵչ",L_M2,"Ͷʷ",L_M3,"ü໤ ",L_M4," /  ְֿԱ",L_M5,"˷",L_M6;
// ---------鿴ܻ״---------------------------------------------------
	L_M1:
		mes "[]";
		mes "㱨ܻص״";
		mes "^0000ff ";
		mes "   ҵչ" + GetCastleData("gefg_cas03.gat",2) +  " ";
		if (GetCastleData("gefg_cas03.gat",4) > 0 ) mes "   - ڹȥһ֮ڣͶ " + GetCastleData("gefg_cas03.gat",4) + "  ";
		mes "   ڵķ" + GetCastleData("gefg_cas03.gat",3) +  " ";
		if (GetCastleData("gefg_cas03.gat",5) > 0 ) mes "   - ڹȥһ֮ڣͶ " + GetCastleData("gefg_cas03.gat",5) + "  ";
		mes "^000000 ";
		mes "";
		close;
		end;
// ---------Ͷҵչ
	L_M2:
		mes "[]";
		mes "ҵչȵĻ ڹƷӣΪԺĻܲͶʰ";
		mes " ";
		mes "ԭȵķʽһֻͶһ ึһǮĻ һͶ";
		set @TriggerE,GetCastleData("gefg_cas03.gat",4);
		set @Economy,GetCastleData("gefg_cas03.gat",2);
		if (@Economy >= 100) goto L_M2_A;
		if (@TriggerE > 1) goto L_M2_B;
		if (@TriggerE == 0) goto L_M2_C;
		goto L_M2_D;
		L_M2_A://economyOK == 0
			mes " ";
			mes "^ff0000Ϊ ܻصҵչȣѾֵ100% ˣԲҪͶ ˹ӵжߵĻ۰^000000";
			close;
			end;
		L_M2_B://economyOK == 1
			mes " ";
			mes "^ff0000Ѿڽ֮ͶΣٲͶ.^000000÷չȸϿڴŸӆ";
			close;
			end;
//		gold = AgitGet AGIT_E_FUND 
		L_M2_C://economyOK == 2
//һͶ
			if ((@Economy >= 0) && (@Economy <= 4)) set @gold,5000;
			if ((@Economy >= 5) && (@Economy <= 9)) set @gold,10000;
			if ((@Economy >= 10) && (@Economy <= 14)) set @gold,20000;
			if ((@Economy >= 15) && (@Economy <= 19)) set @gold,35000;
			if ((@Economy >= 20) && (@Economy <= 24)) set @gold,55000;
			if ((@Economy >= 25) && (@Economy <= 29)) set @gold,80000;
			if ((@Economy >= 30) && (@Economy <= 34)) set @gold,110000;
			if ((@Economy >= 35) && (@Economy <= 39)) set @gold,145000;
			if ((@Economy >= 40) && (@Economy <= 44)) set @gold,185000;
			if ((@Economy >= 45) && (@Economy <= 49)) set @gold,230000;
			if ((@Economy >= 50) && (@Economy <= 54)) set @gold,280000;
			if ((@Economy >= 55) && (@Economy <= 59)) set @gold,335000;
			if ((@Economy >= 60) && (@Economy <= 64)) set @gold,395000;
			if ((@Economy >= 65) && (@Economy <= 69)) set @gold,460000;
			if ((@Economy >= 70) && (@Economy <= 74)) set @gold,530000;
			if ((@Economy >= 75) && (@Economy <= 79)) set @gold,605000;
			if ((@Economy >= 80) && (@Economy <= 84)) set @gold,685000;
			if ((@Economy >= 85) && (@Economy <= 89)) set @gold,770000;
			if ((@Economy >= 90) && (@Economy <= 94)) set @gold,860000;
			if ((@Economy >= 95) && (@Economy <= 99)) set @gold,995000;
			mes " ";
			mes "ҪͶʽ ^ff0000" + @gold + "^000000  ҪͶ?";
			goto L_M2_Go;
		L_M2_D://economyOK == else
//ڶͶ
			if ((@Economy >= 0) && (@Economy <= 4)) set @gold,20000;
			if ((@Economy >= 5) && (@Economy <= 9)) set @gold,40000;
			if ((@Economy >= 10) && (@Economy <= 14)) set @gold,80000;
			if ((@Economy >= 15) && (@Economy <= 19)) set @gold,140000;
			if ((@Economy >= 20) && (@Economy <= 24)) set @gold,220000;
			if ((@Economy >= 25) && (@Economy <= 29)) set @gold,320000;
			if ((@Economy >= 30) && (@Economy <= 34)) set @gold,440000;
			if ((@Economy >= 35) && (@Economy <= 39)) set @gold,580000;
			if ((@Economy >= 40) && (@Economy <= 44)) set @gold,740000;
			if ((@Economy >= 45) && (@Economy <= 49)) set @gold,920000;
			if ((@Economy >= 50) && (@Economy <= 54)) set @gold,1120000;
			if ((@Economy >= 55) && (@Economy <= 59)) set @gold,1340000;
			if ((@Economy >= 60) && (@Economy <= 64)) set @gold,1580000;
			if ((@Economy >= 65) && (@Economy <= 69)) set @gold,1840000;
			if ((@Economy >= 70) && (@Economy <= 74)) set @gold,2120000;
			if ((@Economy >= 75) && (@Economy <= 79)) set @gold,2420000;
			if ((@Economy >= 80) && (@Economy <= 84)) set @gold,2740000;
			if ((@Economy >= 85) && (@Economy <= 89)) set @gold,3080000;
			if ((@Economy >= 90) && (@Economy <= 94)) set @gold,3440000;
			if ((@Economy >= 95) && (@Economy <= 99)) set @gold,3820000;
			mes " ";
			mes "ѾͶһ... ҪͶ? Ҫ׷^ff0000" + @gold + "^000000  ";
			goto L_M2_Go;
		L_M2_Go:
		next;
		menu "ҵչͶ",L_M2_Go_M1,"ȡ ",L_M2_Go_M2;
		L_M2_Go_M1:
			if (Zeny < @gold) goto L_M2_Go_M1_A;
			set Zeny,Zeny-@gold;
//			AgitFunc AF_INVEST_E 0 0
			SetCastleData "gefg_cas03.gat",4,@TriggerE+1;
			SetCastleData "gefg_cas03.gat",2,@Economy+1;
			mes "[]";
			mes "˳Ͷ! ڴҪٵδ ĻչȻ ";
			close;
			end;
			L_M2_Go_M1_A:
				mes "[]";
				mes "ϧ ڴǮﲻͶʵĽ Ͷʧ";
				close;
				end;
		L_M2_Go_M2:
			mes "[]";
			mes "ҽķԸȥִ ҵ ... Ҫ̫ż ǻúܺ ";
			close;
			end;
// ---------Ͷ   ---------------------------------------------------
	L_M3:
		mes "[]";
		mes "߷Ļ ໤˺ͻ;öȻ ǵս òͶʰ";
		mes " ";
		mes "ԭȵķʽһֻͶһ ึһǮĻ һͶ";
		set @TriggerD,GetCastleData("gefg_cas03.gat",5);
		set @Deffence,GetCastleData("gefg_cas03.gat",3);
		if (@Deffence >= 100) goto L_M3_A;
		if (@TriggerD > 1) goto L_M3_B;
		if (@TriggerD == 0) goto L_M3_C;
		goto L_M3_D;
		L_M3_A://if defenseOK == 0
			mes " ";
			mes "^ff0000Ϊ ܻصҵչȣѾֵ100% ˣԲҪͶ ˹ӵжߵĻ۰^000000";
			close;
			end;
		L_M3_B://if defenseOK == 1
			mes " ";
			mes "^ff0000Ѿڽ֮ͶΣٲͶ.^000000÷չȸϿڴŸӆ";
			close;
			end;
//		gold = AgitGet AGIT_D_FUND 
		L_M3_C://if defenseOK == 2
//һͶ
			if ((@Deffence >= 0) && (@Deffence <= 4)) set @gold,10000;
			if ((@Deffence >= 5) && (@Deffence <= 9)) set @gold,20000;
			if ((@Deffence >= 10) && (@Deffence <= 14)) set @gold,40000;
			if ((@Deffence >= 15) && (@Deffence <= 19)) set @gold,70000;
			if ((@Deffence >= 20) && (@Deffence <= 24)) set @gold,110000;
			if ((@Deffence >= 25) && (@Deffence <= 29)) set @gold,160000;
			if ((@Deffence >= 30) && (@Deffence <= 34)) set @gold,220000;
			if ((@Deffence >= 35) && (@Deffence <= 39)) set @gold,290000;
			if ((@Deffence >= 40) && (@Deffence <= 44)) set @gold,370000;
			if ((@Deffence >= 45) && (@Deffence <= 49)) set @gold,460000;
			if ((@Deffence >= 50) && (@Deffence <= 54)) set @gold,560000;
			if ((@Deffence >= 55) && (@Deffence <= 59)) set @gold,670000;
			if ((@Deffence >= 60) && (@Deffence <= 64)) set @gold,790000;
			if ((@Deffence >= 65) && (@Deffence <= 69)) set @gold,920000;
			if ((@Deffence >= 70) && (@Deffence <= 74)) set @gold,1060000;
			if ((@Deffence >= 75) && (@Deffence <= 79)) set @gold,1210000;
			if ((@Deffence >= 80) && (@Deffence <= 84)) set @gold,1370000;
			if ((@Deffence >= 85) && (@Deffence <= 89)) set @gold,1540000;
			if ((@Deffence >= 90) && (@Deffence <= 94)) set @gold,1720000;
			if ((@Deffence >= 95) && (@Deffence <= 99)) set @gold,1910000;
			mes " ";
			mes "ҪͶʽ ^ff0000" + @gold + "^000000  ҪͶ?";
			goto L_M3_Go;
		L_M3_D://else
//ڶͶ
			if ((@Deffence >= 0) && (@Deffence <= 4)) set @gold,40000;
			if ((@Deffence >= 5) && (@Deffence <= 9)) set @gold,80000;
			if ((@Deffence >= 10) && (@Deffence <= 14)) set @gold,160000;
			if ((@Deffence >= 15) && (@Deffence <= 19)) set @gold,280000;
			if ((@Deffence >= 20) && (@Deffence <= 24)) set @gold,440000;
			if ((@Deffence >= 25) && (@Deffence <= 29)) set @gold,640000;
			if ((@Deffence >= 30) && (@Deffence <= 34)) set @gold,880000;
			if ((@Deffence >= 35) && (@Deffence <= 39)) set @gold,1160000;
			if ((@Deffence >= 40) && (@Deffence <= 44)) set @gold,1480000;
			if ((@Deffence >= 45) && (@Deffence <= 49)) set @gold,1840000;
			if ((@Deffence >= 50) && (@Deffence <= 54)) set @gold,2240000;
			if ((@Deffence >= 55) && (@Deffence <= 59)) set @gold,2680000;
			if ((@Deffence >= 60) && (@Deffence <= 64)) set @gold,3160000;
			if ((@Deffence >= 65) && (@Deffence <= 69)) set @gold,3680000;
			if ((@Deffence >= 70) && (@Deffence <= 74)) set @gold,4240000;
			if ((@Deffence >= 75) && (@Deffence <= 79)) set @gold,4840000;
			if ((@Deffence >= 80) && (@Deffence <= 84)) set @gold,5480000;
			if ((@Deffence >= 85) && (@Deffence <= 89)) set @gold,6160000;
			if ((@Deffence >= 90) && (@Deffence <= 94)) set @gold,6880000;
			if ((@Deffence >= 95) && (@Deffence <= 99)) set @gold,7640000;
			mes " ";
			mes "ѾͶһ... ҪͶ? Ҫ׷^ff0000" + @gold + "^000000  ";
			goto L_M3_Go;
		L_M3_Go:
		next;
		menu "Է Ͷ",L_M3_Go_M1,"ȡ",L_M3_Go_M2;
		L_M3_Go_M1:
			if (Zeny < @gold) goto L_M3_Go_M1_A;
			set Zeny,Zeny-@gold;
//			AgitFunc AF_INVEST_D 0 0                  
			SetCastleData "gefg_cas03.gat",5,@TriggerD+1;
			SetCastleData "gefg_cas03.gat",3,@Deffence+1;
			mes "[]";
			mes "˳Ͷ! ڴҪٵδ ĻȻ ";
			close;
			end;
			L_M3_Go_M1_A:
				mes "[]";
				mes "ϧ ڴǮﲻͶʵĽ Ͷʧ";
				close;
				end;
		L_M3_Go_M2:
			mes "[]";
			mes "ҽķԸȥִ ҵ ... Ҫ̫ż ǻúܺ ";
			close;
			end;
// --------- ໤---------------------------------------------------
	L_M4:
		mes "[]";
		mes "Ҫü໤? ໤˼Ϊܻصҳػ ";
		mes " ѡҪõļ໤";
		next;
//		if (GetCastleData("gefg_cas03.gat",3) >= 1200) menu " 1",L_M4_M1," 2",L_M4_M2," 1",L_M4_M3," 2",L_M4_M4," 3",L_M4_M5,"ʿ 1",L_M4_M6,"ʿ 2",L_M4_M7,"ʿ 3",L_M4_M8;
//		if (GetCastleData("gefg_cas03.gat",3) >= 600) menu " 1",L_M4_M1," 2",L_M4_M2," 1",L_M4_M3," 2",L_M4_M4," 3",L_M4_M5;
//		menu " 1",L_M4_M1," 2",L_M4_M2;
		set @GD1$,"  ໤";
		set @GD2$,"  ໤";
		set @GD3$," ʿ ໤";
		set @GD4$,"ڳ ʿ ໤";
		set @GD5$,"ڳ ʿ ໤";
		set @GD6$,"ڳ ʿ ໤";
		set @GD7$,"ڳ ʿ ໤";
		set @GD8$," ໤";
		if (GetCastleData("gefg_cas03.gat",10) > 0) set @GD1$,@GD1$+" -  (48 , 176)";
		if (GetCastleData("gefg_cas03.gat",10) == 0) set @GD1$,@GD1$+" - û";
		if (GetCastleData("gefg_cas03.gat",11) > 0) set @GD2$,@GD2$+" -  (113 , 214)";
		if (GetCastleData("gefg_cas03.gat",11) == 0) set @GD2$,@GD2$+" - û";
		if (GetCastleData("gefg_cas03.gat",12) > 0) set @GD3$,@GD3$+" -  (48 , 207)";
		if (GetCastleData("gefg_cas03.gat",12) == 0) set @GD3$,@GD3$+" - û";
		if (GetCastleData("gefg_cas03.gat",13) > 0) set @GD4$,@GD4$+" -  (157 , 62)";
		if (GetCastleData("gefg_cas03.gat",13) == 0) set @GD4$,@GD4$+" - û";
		if (GetCastleData("gefg_cas03.gat",14) > 0) set @GD5$,@GD5$+" -  (157 , 45)";
		if (GetCastleData("gefg_cas03.gat",14) == 0) set @GD5$,@GD5$+" - û";
		if (GetCastleData("gefg_cas03.gat",15) > 0) set @GD6$,@GD6$+" -  (243 , 41)";
		if (GetCastleData("gefg_cas03.gat",15) == 0) set @GD6$,@GD6$+" - û";
		if (GetCastleData("gefg_cas03.gat",16) > 0) set @GD7$,@GD7$+" -  (234 , 25)";
		if (GetCastleData("gefg_cas03.gat",16) == 0) set @GD7$,@GD7$+" - û";
		if (GetCastleData("gefg_cas03.gat",17) > 0) set @GD8$,@GD8$+" -  (238 , 160)";
		if (GetCastleData("gefg_cas03.gat",17) == 0) set @GD8$,@GD8$+" - û";
		menu @GD1$,L_M4_M1,@GD2$,L_M4_M2,@GD3$,L_M4_M3,@GD4$,L_M4_M4,@GD5$,L_M4_M5,@GD6$,L_M4_M6,@GD7$,L_M4_M7,@GD8$,L_M4_M8;
		L_M4_M1:
			set @GDnum,10;
			goto L_M4_MC;
		L_M4_M2:
			set @GDnum,11;
			goto L_M4_MC;
		L_M4_M3:
			set @GDnum,12;
			goto L_M4_MC;
		L_M4_M4:
			set @GDnum,13;
			goto L_M4_MC;
		L_M4_M5:
			set @GDnum,14;
			goto L_M4_MC;
		L_M4_M6:
			set @GDnum,15;
			goto L_M4_MC;
		L_M4_M7:
			set @GDnum,16;
			goto L_M4_MC;
		L_M4_M8:
			set @GDnum,17;
			goto L_M4_MC;
		L_M4_MC:
		mes "[]";
		mes "ȷҪѡļ໤? ʱҪ 10000 .";
		next;
		menu "Ҫ ",L_M4_MC_M1,"ȡ ",L_M4_MC_M2;
		L_M4_MC_M1:
//			npcStatus = AgitNpcGet no AN_VISIBLE
//			skLevel = AgitGet AGIT_GUARDIAN_SKILL
//------Ἴ û ໤˵о?-----------------
			set @Guardian_Skill,getgdskilllv(@GIDg3,GD_GUARDIANRESEARCH);
			if (@Guardian_Skill == 0) goto L_M4_MC_M1_A;
			if (GetCastleData("gefg_cas03.gat",@GDnum) != 0) goto L_M4_MC_M1_B;
			if (Zeny < 10000) goto L_M4_MC_M1_C;
			set Zeny,Zeny-10000;
//			AgitNpcSet no AN_VISIBLE 1
			setcastledata "gefg_cas03.gat",@GDnum,1;
			mes "[]";
			mes "ü໤ ڿʼѾˣܻصǿ׳Ҿ";
			close;
			end;
			L_M4_MC_M1_A:
				mes "[]";
				mes " йü໤˵о֪ʶ ȫȻ֪ Ҫۻü໤֪ʶĻ ҪѧϰἼе^ff0000໤о^000000. ҪȻ ໤ʧ";
				close;
				end;
			L_M4_MC_M1_B:
				mes "[]";
				mes "... Ǽ໤Ѿõļ໤ˣ";
				close;
				end;
			L_M4_MC_M1_C:
				mes "[]";
				mes "ü໤˵ʽ㰡 ܱǸ... ü໤ʧ";
				close;
				end;
		L_M4_MC_M2:
			mes "[]";
			mes "ѾķԸ еʽϿԣĻһҪü໤ˣǽϺõķ";
			close;
			end;
//ְֿԱ   / 
	L_M5:
//		npcStatus = AgitNpcGet AGIT_NPC_CONTAINER AN_VISIBLE 
		if (GetCastleData("gefg_cas03.gat",9) == 1) goto L_M5_A;
		goto L_M5_B;
		L_M5_A://if npcStatus == 1
			mes "[]";
			mes "Ѿ ÿְԱ״̬... ҪͿְԱ ?";
			next;
			menu "Ҫ ",L_M5_A_M1,"ȡ ",L_M5_A_M2;
			L_M5_A_M1:
				cutin "kafra_01.bmp",2;
				mes "[ õ ְԱ ]";
				mes "ȥôĵĹ... Ҫҽ?... ˷ٸһλ...ٿһκ ...";
				next;
				menu "Ҫ ",L_M5_A_M1_M1,"ȡ ",L_M5_A_M1_M2;
				L_M5_A_M1_M1:
					mes "[ õ  ְԱ ]";
					mes "۰! ̫! ô ~";
					next;
					cutin "kafra_01.bmp",255;
//					AgitNpcSet AGIT_NPC_CONTAINER AN_VISIBLE 0
					disablenpc " ְԱ#gef3";
					setcastledata "gefg_cas03.gat",9,0;
					mes "[]";
					mes "....";
					mes "ѾѿְԱ...  ʲôط?";
					close;
					end;
				L_M5_A_M1_M2:
					mes "[ õ  ְԱ ]";
					mes "һŬ... лл ";
					close;
					end;
			L_M5_A_M2:
				mes "[]";
				mes "ҿְԱǳŬĹ ΪԱ룬ͼ";
				close;
				end;
		L_M5_B://else()
			mes "[]";
			mes "Ϳܹ˾Լ Ҫܻ ÿְԱ ?";
			mes "^ff0000 ҪõĻҪ 10000... ";
			next;
			menu "Ҫ ",L_M5_B_M1,"ȡ ",L_M5_B_M2;
			L_M5_B_M1:
//				skLevel = AgitGet AGIT_KAFRA_SKILL
// -----Ἴ кͿԼļ? --------------------
				set @Kafra_Skill,getgdskilllv(@GIDg3,GD_KAFRACONTACT);
				if (@Kafra_Skill == 0) goto L_M5_B_M1_A;
				if (Zeny < 10000) goto L_M5_B_M1_B;
				set Zeny,Zeny-10000;
//				AgitNpcSet AGIT_NPC_CONTAINER AN_VISIBLE 1
//				AgitFunc AF_SET_PAY_TIME 0 0
				enablenpc " ְԱ#gef3";
				setcastledata "gefg_cas03.gat",9,1;
				mes "[]";
				mes "ɹĺͿܹ˾ԼˣѾÿְԱ";
				next;
				cutin "kafra_01.bmp",2;
				mes "[ õ ְԱ ]";
				mes " ܹ˾ĿְԱ";
				mes "Ҳùմ۵ һŬĹ";
				next;
				cutin "kafra_01.bmp",255;
				mes "[]";
				mes "õĿְԱ һµԼڼ һºɽ";
				mes "ڿʼԱǵͻļ ";
				close;
				end;
				L_M5_B_M1_A:
					mes "[]";
					mes " ûܹ˾Լ״ԻܹÿְԱ Ҫܹ˾ǩԼĻ ѧṤἼ ^ff0000ͿԼ^000000 ļܰ";
					close;
					end;
				L_M5_B_M1_B://if v[VAR_MONEY] <  10000
					mes "[]";
					mes "ܱǸ... ڹĴ ĽԹÿְԱʧ .";
					close;
					end;
			L_M5_B_M2:
				mes "[]";
				mes "ѾķԸ ҲҪΪĻԱ룬չÿְԱΪϲ߰";
				close;
				end;
	L_M6:
		mes "[]";
		mes "ҪƷڻģƷ?";
		mes "ǸطΪǵˣרĵط... ֮⣬˶Ŷ";
		next;
		menu "Ҫ˵ķ",L_M6_M1,"ȡ",L_M6_M2;
		L_M6_M1:
			mes "[]";
			mes "ҽΪͨ ";
			mes "ʱ򣬰ܰť ";
			next;
			warp "gefg_cas03.gat",275,289;
			end;
		L_M6_M2:
			mes "[]";
			mes "Ʒһֻһ . . .   ûмʱߵĻһξͲܽ";
			mes "˵Ϊǹķչʱȥȡ";
			close;
			end;
// óܻ
//~	L_M7:
//~	mes "[]";
//~	mes "!!";
//~	mes "˵ҪѪܻ?!";
//~	mes "ҪĻЩѪʲô!";
//~	mes "ǿǰ! !!";
//~	next;
//~	menu "óܻ",L_M7_M1,"ȡ",L_M7_M2;
//~	L_M7_M1:
//~		mes "[]";
//~		mes "!!˼а !!";
//~		mes "ڼѪ!! 뵽Щ㲻!!";
//~		next;
//~		menu "ȡ",L_M7_M1_M1,"óܻ",L_M7_M2_M2;
//~		L_M7_M1_M1:
//~			mes "[]";
//~			mes "Ҿ֪ !!";
//~			mes "י  ʱǿЦһβҪֻ";
//~			close;
//~			end;
//~		L_M7_M1_M2:
//~			mes "[]";
//~			mes "!!.....";
//~			mes "...... ..... ......";
//~//			AgitSet AGIT_GUILD 0 
//~			close;
//~			setcastledata "gefg_cas03.gat",1,0;
//~			setcastledata "gefg_cas03.gat",2,0;
//~			setcastledata "gefg_cas03.gat",3,0;
//~			setcastledata "gefg_cas03.gat",4,0;
//~			setcastledata "gefg_cas03.gat",5,0;
//~			setcastledata "gefg_cas03.gat",6,0;
//~			setcastledata "gefg_cas03.gat",7,0;
//~			setcastledata "gefg_cas03.gat",8,0;
//~			setcastledata "gefg_cas03.gat",9,0;
//~			setcastledata "gefg_cas03.gat",10,0;
//~			setcastledata "gefg_cas03.gat",11,0;
//~			setcastledata "gefg_cas03.gat",12,0;
//~			setcastledata "gefg_cas03.gat",13,0;
//~			setcastledata "gefg_cas03.gat",14,0;
//~			setcastledata "gefg_cas03.gat",15,0;
//~			setcastledata "gefg_cas03.gat",16,0;
//~			setcastledata "gefg_cas03.gat",17,0;
//~			Announce "ܻ[" + GetCastleName("gefg_cas03.gat") + "][" + GetGuildName(@GIDg3) + "]",0;
//~			MapRespawnGuildID "gefg_cas03.gat",GetCastleData("gefg_cas03.gat",1),7;
//~			end;
//~	L_M7_M2:
//~		mes "[]";
//~		mes "Ҿ֪ !!";
//~		mes "י  ʱǿЦһβҪֻ";
//~		close;
//~		end;

OnClock0000://ÿͶ2ֵ
	SetCastleData "gefg_cas03.gat",4,0;
	SetCastleData "gefg_cas03.gat",5,0;
	end;

OnAgitStart:
	disablenpc " ְԱ#gef3";
	End;
OnRecvCastleG03:
	if ($@vMap_AgitFlag_G03 >= 1) end;
OnAgitEnd:
	if (getcastledata("gefg_cas03.gat",9) != 0) enablenpc " ְԱ#gef3";
	End;
}

gefg_cas03.gat,1,1,1	script	GDgef03	-1,{
OnAgitStart:
//OnRecvCastleG03:
// ʱٻħԲ.
	if (GetCastleData("gefg_cas03.gat",1) == 0) goto L_Mob;
	if (GetCastleData("gefg_cas03.gat",1) != 0) goto L_Guardian;
	end;

L_Mob:
	areamonster "gefg_cas03.gat",0,0,300,300,"",1117,10;
	areamonster "gefg_cas03.gat",0,0,300,300,"ħʦ",1263,11;
	areamonster "gefg_cas03.gat",0,0,300,300,"",1102,10;
	areamonster "gefg_cas03.gat",0,0,300,300,"Ϲ",1130,10;
	areamonster "gefg_cas03.gat",0,0,300,300,"ſ",1140,20;
	areamonster "gefg_cas03.gat",0,0,300,300,"齣ʿ",1163,9;
	areamonster "gefg_cas03.gat",0,0,300,300,"˿Ů",1275,1;
	areamonster "gefg_cas03.gat",0,0,300,300,"Ԩʿ",1219,1;
	areamonster "gefg_cas03.gat",0,0,300,300,"ҹè",1150,1;
	areamonster "gefg_cas03.gat",0,0,300,300,"Ƥ",1159,1;
	monster "gefg_cas03.gat",244,166,"߱",1203,1;
	monster "gefg_cas03.gat",244,166,"Ӣ",1087,1;
	monster "gefg_cas03.gat",244,166,"սʿ",1213,10;
	monster "gefg_cas03.gat",244,166,"˹",1189,10;
	end;

L_Guardian:
	if (GetCastleData("gefg_cas03.gat",10) != 0) monster "gefg_cas03.gat",48,176,"  ໤",1285,1,"GDgef03::OnGD1Dead";
	if (GetCastleData("gefg_cas03.gat",11) != 0) monster "gefg_cas03.gat",113,214,"  ໤",1285,1,"GDgef03::OnGD2Dead";
	if (GetCastleData("gefg_cas03.gat",12) != 0) monster "gefg_cas03.gat",48,207," ʿ ໤",1287,1,"GDgef03::OnGD3Dead";
	if (GetCastleData("gefg_cas03.gat",13) != 0) monster "gefg_cas03.gat",157,62,"ڳ ʿ ໤",1287,1,"GDgef03::OnGD4Dead";
	if (GetCastleData("gefg_cas03.gat",14) != 0) monster "gefg_cas03.gat",157,45,"ڳ ʿ ໤",1286,1,"GDgef03::OnGD5Dead";
	if (GetCastleData("gefg_cas03.gat",15) != 0) monster "gefg_cas03.gat",243,41,"ڳ ʿ ໤",1287,1,"GDgef03::OnGD6Dead";
	if (GetCastleData("gefg_cas03.gat",16) != 0) monster "gefg_cas03.gat",234,25,"ڳ ʿ ໤",1286,1,"GDgef03::OnGD7Dead";
	if (GetCastleData("gefg_cas03.gat",17) != 0) monster "gefg_cas03.gat",238,160," ໤",1286,1,"GDgef03::OnGD8Dead";
	end;

OnGD1Dead:
	setcastledata "gefg_cas03.gat",10,0;
//	MapAnnounce "gefg_cas03.gat","ػߡսʿ01 ƻ",17;
//	set @Deffence,GetCastleData("gefg_cas03.gat",3);
//	if (@Deffence < 100) End;
//	set @Deffence,@Deffence-100;
//	SetCastleData "gefg_cas03.gat",3,@Deffence;
	end;

OnGD2Dead:
	SetCastleData "gefg_cas03.gat",11,0;
//	MapAnnounce "gefg_cas03.gat","ػߡսʿ02 ƻ, ½",17;
	end;

OnGD3Dead:
	SetCastleData "gefg_cas03.gat",12,0;
//	MapAnnounce "gefg_cas03.gat","ػߡ֡01 ƻ, ½",17;
	end;

OnGD4Dead:
	SetCastleData "gefg_cas03.gat",13,0;
//	MapAnnounce "gefg_cas03.gat","ػߡ֡02 ƻ, ½",17;
	end;

OnGD5Dead:
	SetCastleData "gefg_cas03.gat",14,0;
//	MapAnnounce "gefg_cas03.gat","ػߡ֡03 ƻ, ½",17;
	end;

OnGD6Dead:
	SetCastleData "gefg_cas03.gat",15,0;
//	MapAnnounce "gefg_cas03.gat","ػߡʿ01 ƻ, ½",17;
	end;

OnGD7Dead:
	SetCastleData "gefg_cas03.gat",16,0;
//	MapAnnounce "gefg_cas03.gat","ػߡʿ02 ƻ, ½",17;
	end;

OnGD8Dead:
	SetCastleData "gefg_cas03.gat",17,0;
//	MapAnnounce "gefg_cas03.gat","ػߡʿ03 ƻ, ½",17;
	end;

OnAgitEnd:
	KillMonster "gefg_cas03.gat","GDgef03::OnGD1Dead";
	KillMonster "gefg_cas03.gat","GDgef03::OnGD2Dead";
	KillMonster "gefg_cas03.gat","GDgef03::OnGD3Dead";
	KillMonster "gefg_cas03.gat","GDgef03::OnGD4Dead";
	KillMonster "gefg_cas03.gat","GDgef03::OnGD5Dead";
	KillMonster "gefg_cas03.gat","GDgef03::OnGD6Dead";
	KillMonster "gefg_cas03.gat","GDgef03::OnGD7Dead";
	KillMonster "gefg_cas03.gat","GDgef03::OnGD8Dead";
	end;
}

gefg_cas03.gat,275,289,0	script	˷ı#gef3	-1,{
OnClock0010:
	killmonster "gefg_cas03.gat","T_Box_G03";
	end;
OnClock0030:
	if (GetCastleData("gefg_cas03.gat",1) == 0) end;
	set $@vMap_Economy_G03,GetCastleData("gefg_cas03.gat",2);
	//Basic T_Box
	monster "gefg_cas03.gat",269,291,"",rand(1338,1339),1,"T_Box_G03";
	monster "gefg_cas03.gat",270,291,"",rand(1338,1339),1,"T_Box_G03";
	monster "gefg_cas03.gat",270,290,"",rand(1338,1339),1,"T_Box_G03";
	monster "gefg_cas03.gat",269,290,"",rand(1338,1339),1,"T_Box_G03";
	//Economy T_Box
	if ($@vMap_Economy_G03 >=  5) monster "gefg_cas03.gat",267,293,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 10) monster "gefg_cas03.gat",268,293,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 15) monster "gefg_cas03.gat",269,293,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 20) monster "gefg_cas03.gat",270,293,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 25) monster "gefg_cas03.gat",271,293,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 30) monster "gefg_cas03.gat",272,293,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 35) monster "gefg_cas03.gat",272,292,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 40) monster "gefg_cas03.gat",272,291,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 45) monster "gefg_cas03.gat",272,290,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 50) monster "gefg_cas03.gat",272,289,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 55) monster "gefg_cas03.gat",272,288,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 60) monster "gefg_cas03.gat",271,288,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 65) monster "gefg_cas03.gat",270,288,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 70) monster "gefg_cas03.gat",269,288,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 75) monster "gefg_cas03.gat",268,288,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 80) monster "gefg_cas03.gat",267,288,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 85) monster "gefg_cas03.gat",267,289,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 90) monster "gefg_cas03.gat",267,290,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >= 95) monster "gefg_cas03.gat",267,291,"",rand(1338,1339),1,"T_Box_G03";
	if ($@vMap_Economy_G03 >  99) monster "gefg_cas03.gat",267,292,"",rand(1338,1339),1,"T_Box_G03";
	end;

}