// CVC ]w
//###########################################################################################
// GVG - 00:00 2004/06/27 
// BY Michael p  http//www.99nest.com
//###########################################################################################
//npc "prt_gld" "Xm" GUILD_FLAG 131 60 6 5 5
prt_gld.gat,131,60,6	script	JLƯS#p1-1	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	if (GetCharID(2) == @GIDp1) goto L_Member;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;
L_Member:
	mes "[ TGڭ ]";
	mes "iH...";
	mes "n^zWAa?";
	next;
	menu "^쯵Ka ",L_Warp," ",-;
	close;
	end;
L_Warp:
	warp "prtg_cas01.gat",96,173;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prt_gld" "Xm" GUILD_FLAG 138 68 6 5 5
prt_gld.gat,138,68,6	script	JLƯS#p1-2	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	if (GetCharID(2) == @GIDp1) goto L_Member;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;
L_Member:
	mes "[ TGڭ ]";
	mes "iH...";
	mes "n^zWAa?";
	next;
	menu "^쯵Ka ",L_Warp," ",-;
	close;
	end;
L_Warp:
	warp "prtg_cas01.gat",96,173;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prt_gld" "Xm" GUILD_FLAG 138 60 6 5 5
prt_gld.gat,138,60,6	script	JLƯS#p1-3	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	if (GetCharID(2) == @GIDp1) goto L_Member;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;
L_Member:
	mes "[ TGڭ ]";
	mes "iH...";
	mes "n^zWAa?";
	next;
	menu "^쯵Ka ",L_Warp," ",-;
	close;
	end;
L_Warp:
	warp "prtg_cas01.gat",96,173;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prt_gld" "Xm" GUILD_FLAG 135 60 6 5 5
prt_gld.gat,135,60,6	script	JLƯS#p1-4	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	if (GetCharID(2) == @GIDp1) goto L_Member;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;
L_Member:
	mes "[ TGڭ ]";
	mes "iH...";
	mes "n^zWAa?";
	next;
	menu "^쯵Ka ",L_Warp," ",-;
	close;
	end;
L_Warp:
	warp "prtg_cas01.gat",96,173;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prtg_cas01" "Xm" GUILD_FLAG 58 56 4 5 5
prtg_cas01.gat,58,56,4	script	JLƯS#p1-5	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prtg_cas01" "Xm" GUILD_FLAG 64 56 4 5 5
prtg_cas01.gat,64,56,4	script	JLƯS#p1-6	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prtg_cas01" "Xm" GUILD_FLAG 76 32 4 5 5
prtg_cas01.gat,76,32,4	script	JLƯS#p1-7	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prtg_cas01" "Xm" GUILD_FLAG 84 32 4 5 5
prtg_cas01.gat,84,32,4	script	JLƯS#p1-8	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prtg_cas01" "Xm" GUILD_FLAG 94 39 4 5 5
prtg_cas01.gat,94,39,4	script	JLƯS#p1-9	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prtg_cas01" "Xm" GUILD_FLAG 94 24 4 5 5
prtg_cas01.gat,94,24,4	script	JLƯS#p1-10	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prtg_cas01" "Xm" GUILD_FLAG 73 14 4 5 5
prtg_cas01.gat,73,14,4	script	JLƯS#p1-11	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prtg_cas01" "Xm" GUILD_FLAG 73 6 4 5 5
prtg_cas01.gat,73,6,4	script	JLƯS#p1-12	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prtg_cas01" "Xm" GUILD_FLAG 55 46 4 5 5
prtg_cas01.gat,55,46,4	script	JLƯS#p1-13	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}

//npc "prtg_cas01" "Xm" GUILD_FLAG 45 46 4 5 5
prtg_cas01.gat,45,46,4	script	JLƯS#p1-14	722,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "   o̤GASҦv";
	mes "   Xm";
	mes " ";
	mes "2. ԳӦubo̪AiȪ礧";
	mes "   }aRݪH";
	mes "   |礩";
	mes "   g{Ҫ";
	mes "   KaҦv";
	close;
	end;
L_Guild:
	mes "       [ wԤ  iO ]";
	mes " ";
	mes "1. ھڳo̪AwԤO";
	mes "    o̳Q{w ^ff0000" + GetGuildName(@GIDp1) + "^000000u|";
	mes "    p";
	mes " ";
	mes "2. ^ff0000" + GetGuildName(@GIDp1) + "^000000 u|DHO";
	mes "    ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 A L׬O";
	mes "    oƱN";
	mes "    ЧA|_zCAۤvWAa";
	close;
	end;

OnRecvCastleP01:
	FlagEmblem GetCastleData("prtg_cas01.gat",1);
	end;
}











//npc "prtg_cas01" " " HIDDEN_NPC 7 205 0 5 5
//prtg_cas01.gat,7,205,0	script	@	111,{
prtg_cas01.gat,15,208,0	script	@	111,{
	mes " ";
	mes "pԱ AAnUԶ? ";
	next;
	menu "ڭn ",L_Yes,"ڤn ",L_No;
L_Yes:
	warp "prtg_cas01.gat",112,183;
	end;
L_No:
	close;
	end;
}

//npc "prtg_cas01" " " HIDDEN_NPC 94 200 0 5 5
prtg_cas01.gat,94,200,0	script	@	111,{
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 > 0) goto L_Guild;
	mes " [ TGn ] ";
	mes " ' qL禨i𪺥DH ... AhM䥦窺' ";
	close;
	end;
L_Guild:
	mes "[ TGn ]";
	mes " ' ui𪺥DHA~౵'";
	next;
	mes " ";
	mes "pԱ AAnUԶ? ";
	next;
	menu "ڭn ",L_Yes,"ڤn ",L_No;
L_Yes:
	if (GetCharID(2) != @GIDp1) goto L_NotMember;
	warp "gld_dun03.gat",28,251;
	end;
L_NotMember:
	mes " ";
	mes " SoͥƱ ";
	close;
	end;
L_No:
	close;
	end;
}



//npc "prtg_cas01" "d ¾" 4_F_KAFRA1 96 173 0 5 5
prtg_cas01.gat,96,173,0	script	d ¾#prt1	117,{
//OnClick:
	cutin "kafra_01.bmp",2;
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 == GetCharID(2)) goto L_Member;
	mes "[d ¾]";
	mes "ڤwñqM^ff0000" + GetGuildName(@GIDp1) + "^000000 |A AШϥΧڭ̨䥦a誺d¾ ApKBqШ";
	cutin "kafra_01.bmp",255;
	close;
	end;
L_Member:
	mes " [d ¾]";
	mes "w{ ^ff0000" + GetGuildName(@GIDp1) + "^000000 | ";
	mes "dԪA(q) AûbU쨭䬰zA";
	next;
	menu "ϥέܮwA",L_M1,"ϥΪŶʪA",L_M2,"ϥΤA ",L_M3,"",L_M4;
	L_M1:
		if (getskilllv(1) < 6) goto L_M1_A;
		mes "[d ¾]";
		mes "n}ܮwF";
		mes "±zϥΡC";
		cutin "kafra_01.bmp",255;
		openstorage;
		close;
		end;
		L_M1_A://Basic Skill < 6
			mes "[d ¾]";
			mes "Qnϥέܮw AǪ̧ޯ൥ŭn6HW~";
			cutin "kafra_01.bmp",255;
			close;
			end;
	L_M2:
		mes "[d ¾]";
		mes "лXتaa";
		next;
		menu "w  -> 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 "prontera.gat",278,211;
			end;
			L_M2_M1_A:
				mes "[d ¾]";
				mes "|/pj AAҤIB AЭsT{";
				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 "[d ¾]";
		mes "ϥζOO 800  AаݧAnϥζ?";
		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 "[d ¾]";
				mes "U AAҤIB AϥζOO800 ";
				cutin "kafra_01.bmp",255;
				close;
				end;
		L_M3_M2:
			cutin "kafra_01.bmp",255;
			close;
			end;
		L_M3_A:
			mes "[d ¾]";
			mes "藍_ AOӤHMKKAMΪA";
			cutin "kafra_01.bmp",255;
			close;
			end;
		L_M3_B:
			mes "[d ¾]";
			mes "UȧA{bwgA˳ƤF";
			cutin "kafra_01.bmp",255;
			close;
			end;
	L_M4:
		mes "[d ¾]";
		mes "ڭ̥dԪA(q)|ѧ󧹬A AMY檺~Ⱥ޲z AUUȦw߫KQϥΡA̤jؼ";
		mes "P§Aϥ AdԪA(q) ";
		cutin "kafra_01.bmp",255;
		close;	
		end;
OnInit:
	disablenpc "d ¾#prt1";
	End;
}


//npc "prtg_cas01" "ŵܨ" 1_M_JOBTESTER 112 181 0 5 5
prtg_cas01.gat,112,181,0	script	ŵܨ#prt1	55,{
//OnClick:
	set @GIDp1,GetCastleData("prtg_cas01.gat",1);
	if (@GIDp1 == 0) goto L_Waiting;
	if (strcharinfo(0) != GetGuildMaster(@GIDp1)) goto L_Member;
	goto L_Castle;
	end;
// -------u|DH bɭ------------------------------------------
L_Waiting:
	mes "[޲zHŵܨ]";
	mes "  ڱN̾ڧڪRB AbݧڪDH";
	mes "ih...@UARBa ...";
	close;
	end;
// -----------------------------------------------------------------------------
// --------Oڪ u|DH? -----------------------------------------------
L_Member:
	mes "[޲zHŵܨ]";
	mes "ާA̫¯٧ Aڥu@NlHڪDH ^ff0000" + GetGuildMaster(@GIDp1) + "^000000 ! @HA̦b̧r! ֧oǵLzå̻a!";
	close;
	end;
//-----------------------------------------------------------------------------
L_Castle:
	mes "[޲zHŵܨ]";
	mes "w{ A ڪDH^ff0000" + GetGuildMaster(@GIDp1) + "^000000/pj...";
	mes "оާhJ AڱNۦaA";
	next;
//	choose menu "dݯKap" "ӷ~oi" "꨾m" "]m@H " " / Ѷ ܮw¾" "iJDHж" "XKa"
	menu "dݯKap",L_M1,"ӷ~oi",L_M2,"꨾m",L_M3,"]m@H ",L_M4," / Ѷ ܮw¾",L_M5,"iJDHж",L_M6;
// ---------dݯKap---------------------------------------------------
	L_M1:
		mes "[޲zHŵܨ]";
		mes "{bVAiKap";
		mes "^0000ff ";
		mes "   {bӷ~oi׬O" + GetCastleData("prtg_cas01.gat",2) +  " ";
		if (GetCastleData("prtg_cas01.gat",4) > 0 ) mes "   - bLh@ѤAF " + GetCastleData("prtg_cas01.gat",4) + "  ";
		mes "   {bm׬O" + GetCastleData("prtg_cas01.gat",3) +  " ";
		if (GetCastleData("prtg_cas01.gat",5) > 0 ) mes "   - bLh@ѤAF " + GetCastleData("prtg_cas01.gat",5) + "  ";
		mes "^000000 ";
		mes "i";
		close;
		end;
// ---------ӷ~oi
	L_M2:
		mes "[޲zHŵܨ]";
		mes "ӷ~oiת Abu|̥Ͳ~ƶq|W[AFH۷QܡAण";
		mes " ";
		mes "ӭ覡A@ѥu@ AphI@I A@ѥiH⦸";
		set @TriggerE,GetCastleData("prtg_cas01.gat",4);
		set @Economy,GetCastleData("prtg_cas01.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]ѩ AKaӷ~oiסAwgO̰100% FAҥHݭn ADHGuAO֦W㪺z^000000";
			close;
			end;
		L_M2_B://economyOK == 1
			mes " ";
			mes "^ff0000iOAwgAbѤF⦸AAF.^000000oi׻֤WɡAݵ۴IQlo";
			close;
			end;
//		gold = AgitGet AGIT_E_FUND 
		L_M2_C://economyOK == 2
//Ĥ@һݪB
			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 "{bݭnBO ^ff0000" + @gold + "^000000  AаݧAn?";
			goto L_M2_Go;
		L_M2_D://economyOK == else
//ĤGһݪB
			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 "{bAwgF@... ٭nA? ٻݭnl[^ff0000" + @gold + "^000000  ";
			goto L_M2_Go;
		L_M2_Go:
		next;
		menu "ӷ~oiק",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 "prtg_cas01.gat",4,@TriggerE+1;
			SetCastleData "prtg_cas01.gat",2,@Economy+1;
			mes "[޲zHŵܨ]";
			mes "QaF! ݵۧڭ̩n{ AѪܵoi׷|W ";
			close;
			end;
			L_M2_Go_M1_A:
				mes "[޲zHŵܨ]";
				mes "DHui Au|xWAF쨬HꪺB AҥHꥢѤF";
				close;
				end;
		L_M2_Go_M2:
			mes "[޲zHŵܨ]";
			mes "ڱN̷ӧAhJh AOڪDH ... nӵ۫ Aڭ̷|oܦn ";
			close;
			end;
// --------- m  ---------------------------------------------------
	L_M3:
		mes "[޲zHŵܨ]";
		mes "mO A@HMRݪ@[׷|W[ AҼ{쩹᪺Ԫ Ao";
		mes " ";
		mes "ӭ覡A@ѥu@ AphI@I A@ѥiH⦸";
		set @TriggerD,GetCastleData("prtg_cas01.gat",5);
		set @Deffence,GetCastleData("prtg_cas01.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]ѩ AKaӷ~oiסAwgO̰100% FAҥHݭn ADHGuAO֦W㪺z^000000";
			close;
			end;
		L_M3_B://if defenseOK == 1
			mes " ";
			mes "^ff0000iOAwgAbѤF⦸AAF.^000000oi׻֤WɡAݵ۴IQlo";
			close;
			end;
//		gold = AgitGet AGIT_D_FUND 
		L_M3_C://if defenseOK == 2
//Ĥ@һݪB
			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 "{bݭnBO ^ff0000" + @gold + "^000000  AаݧAn?";
			goto L_M3_Go;
		L_M3_D://else
//ĤGһݪB
			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 "{bAwgF@... ٭nA? ٻݭnl[^ff0000" + @gold + "^000000  ";
			goto L_M3_Go;
		L_M3_Go:
		next;
		menu "慨m ",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 "prtg_cas01.gat",5,@TriggerD+1;
			SetCastleData "prtg_cas01.gat",3,@Deffence+1;
			mes "[޲zHŵܨ]";
			mes "QaF! ݵۧڭ̩n{ AѪܨm׷|W ";
			close;
			end;
			L_M3_Go_M1_A:
				mes "[޲zHŵܨ]";
				mes "DHui Au|xWAF쨬HꪺB AҥHꥢѤF";
				close;
				end;
		L_M3_Go_M2:
			mes "[޲zHŵܨ]";
			mes "ڱN̷ӧAhJh AOڪDH ... nӵ۫ Aڭ̷|oܦn ";
			close;
			end;
// ---------]m @H---------------------------------------------------
	L_M4:
		mes "[޲zHŵܨ]";
		mes "аݧAn]m@H? @HYNAڭ̯Kaۦu@ ";
		mes " пܭn]m@H";
		next;
//		if (GetCastleData("prtg_cas01.gat",3) >= 1200) menu "çL 1",L_M4_M1,"çL 2",L_M4_M2,"}b 1",L_M4_M3,"}b 2",L_M4_M4,"}b 3",L_M4_M5,"Mh 1",L_M4_M6,"Mh 2",L_M4_M7,"Mh 3",L_M4_M8;
//		if (GetCastleData("prtg_cas01.gat",3) >= 600) menu "çL 1",L_M4_M1,"çL 2",L_M4_M2,"}b 1",L_M4_M3,"}b 2",L_M4_M4,"}b 3",L_M4_M5;
//		menu "çL 1",L_M4_M1,"çL 2",L_M4_M2;
		set @GD1$," hL @H";
		set @GD2$," hL @H";
		set @GD3$," hL @H";
		set @GD4$,"~ }b @H";
		set @GD5$,"~ }b @H";
		set @GD6$," Mh  @H";
		set @GD7$," Mh  @H";
		set @GD8$," Mh  @H";
		if (GetCastleData("prtg_cas01.gat",10) > 0) set @GD1$,@GD1$+" - w]m (182 , 68)";
		if (GetCastleData("prtg_cas01.gat",10) == 0) set @GD1$,@GD1$+" - S]m";
		if (GetCastleData("prtg_cas01.gat",11) > 0) set @GD2$,@GD2$+" - w]m (182 , 116)";
		if (GetCastleData("prtg_cas01.gat",11) == 0) set @GD2$,@GD2$+" - S]m";
		if (GetCastleData("prtg_cas01.gat",12) > 0) set @GD3$,@GD3$+" - w]m (153 , 86)";
		if (GetCastleData("prtg_cas01.gat",12) == 0) set @GD3$,@GD3$+" - S]m";
		if (GetCastleData("prtg_cas01.gat",13) > 0) set @GD4$,@GD4$+" - w]m (59 , 28)";
		if (GetCastleData("prtg_cas01.gat",13) == 0) set @GD4$,@GD4$+" - S]m";
		if (GetCastleData("prtg_cas01.gat",14) > 0) set @GD5$,@GD5$+" - w]m (50 , 36)";
		if (GetCastleData("prtg_cas01.gat",14) == 0) set @GD5$,@GD5$+" - S]m";
		if (GetCastleData("prtg_cas01.gat",15) > 0) set @GD6$,@GD6$+" - w]m (184 , 183)";
		if (GetCastleData("prtg_cas01.gat",15) == 0) set @GD6$,@GD6$+" - S]m";
		if (GetCastleData("prtg_cas01.gat",16) > 0) set @GD7$,@GD7$+" - w]m (196 , 189)";
		if (GetCastleData("prtg_cas01.gat",16) == 0) set @GD7$,@GD7$+" - S]m";
		if (GetCastleData("prtg_cas01.gat",17) > 0) set @GD8$,@GD8$+" - w]m (107 , 179)";
		if (GetCastleData("prtg_cas01.gat",17) == 0) set @GD8$,@GD8$+" - S]m";
		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 "[޲zHŵܨ]";
		mes "Twn]mwܪ@H? ]mɻݭn 10000 .";
		next;
		menu "n]m ",L_M4_MC_M1," ",L_M4_MC_M2;
		L_M4_MC_M1:
//			npcStatus = AgitNpcGet no AN_VISIBLE
//			skLevel = AgitGet AGIT_GUARDIAN_SKILL
//------u|ޯ ASs@ A@HsO?-----------------
			set @Guardian_Skill,getgdskilllv(@GIDp1,GD_GUARDIANRESEARCH);
			if (@Guardian_Skill == 0) goto L_M4_MC_M1_A;
			if (GetCastleData("prtg_cas01.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 "prtg_cas01.gat",@GDnum,1;
			mes "[޲zHŵܨ]";
			mes "]m@HF A{b}lwgFAO@ڭ̯KajڭxF";
			close;
			end;
			L_M4_MC_M1_A:
				mes "[޲zHŵܨ]";
				mes "DH A]m@Hs Aڭ̥M AQnֿn]m@HѪ Anǲߤu|ޯत^ff0000@Hs@s^000000. nMNO A@H]m";
				close;
				end;
			L_M4_MC_M1_B:
				mes "[޲zHŵܨ]";
				mes "DH... @HwgODH]m@HFAA]mF";
				close;
				end;
			L_M4_MC_M1_C:
				mes "[޲zHŵܨ]";
				mes "]m@H Aܩp... ]m@HѤF";
				close;
				end;
		L_M4_MC_M2:
			mes "[޲zHŵܨ]";
			mes "ڤwgӧAhJF ApIWeΪܡA@wn]m@HAOn";
			close;
			end;
//ܮw¾   / Ѷ
	L_M5:
//		npcStatus = AgitNpcGet AGIT_NPC_CONTAINER AN_VISIBLE 
		if (GetCastleData("prtg_cas01.gat",9) == 1) goto L_M5_A;
		goto L_M5_B;
		L_M5_A://if npcStatus == 1
			mes "[޲zHŵܨ]";
			mes "{bwgO AΥd¾Ao... AnѶd¾ ?";
			next;
			menu "nѶ ",L_M5_A_M1," ",L_M5_A_M2;
			L_M5_A_M1:
				cutin "kafra_01.bmp",2;
				mes "[ Ϊ d¾ ]";
				mes "LhڨΤߪu@F... AunڸѶ?... ХDHo̤jqA@|...ЧAAҼ{@n ...";
				next;
				menu "nѶ ",L_M5_A_M1_M1," ",L_M5_A_M1_M2;
				L_M5_A_M1_M1:
					mes "[ Ϊ  d¾ ]";
					mes "z! ӹLF! iHo˰ ~";
					next;
					cutin "kafra_01.bmp",255;
//					AgitNpcSet AGIT_NPC_CONTAINER AN_VISIBLE 0
					disablenpc "d ¾#prt1";
					setcastledata "prtg_cas01.gat",9,0;
					mes "[޲zHŵܨ]";
					mes "....";
					mes "wgd¾ѶF... L A٦a褣N?";
					close;
					end;
				L_M5_A_M1_M2:
					mes "[ Ϊ  d¾ ]";
					mes "ڷ|VO...  ";
					close;
					end;
			L_M5_A_M2:
				mes "[޲zHŵܨ]";
				mes "̧ڬݡAd¾D`VOu@ AF䥦|̵۷QAN~dۦoa";
				close;
				end;
		L_M5_B://else()
			mes "[޲zHŵܨ]";
			mes "Md`qq AQnbKa̭ AΥd¾ ?";
			mes "^ff0000 QnΪܡAݭn 10000... ";
			next;
			menu "n ",L_M5_B_M1," ",L_M5_B_M2;
			L_M5_B_M1:
//				skLevel = AgitGet AGIT_KAFRA_SKILL
// -----u|ޯ AMdԭqޯ? --------------------
				set @Kafra_Skill,getgdskilllv(@GIDp1,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 "d ¾#prt1";
				setcastledata "prtg_cas01.gat",9,1;
				mes "[޲zHŵܨ]";
				mes "\Md`qqFAAwgΥd¾F";
				next;
				cutin "kafra_01.bmp",2;
				mes "[ Ϊ d¾ ]";
				mes "zn AڬO`qӪd¾";
				mes "ڤ|u|WAgWI AҥHڷ|VOu@";
				next;
				cutin "kafra_01.bmp",255;
				mes "[޲zHŵܨ]";
				mes "Ϊd¾ A@Ӥ몺 ALF@ӤAbúB";
				mes "{b}lA|̪ҷ|CCF ";
				close;
				end;
				L_M5_B_M1_A:
					mes "[޲zHŵܨ]";
					mes "DH Ap٨Sd`qqpAҥH٤๵Υd¾ ApQnd`qñq AǷ|u|ޯत ^ff0000Mdԭq^000000 ޯa";
					close;
					end;
				L_M5_B_M1_B://if v[VAR_MONEY] <  10000
					mes "[޲zHŵܨ]";
					mes "ܩp... {bu|̪xW AһݪBAҥHΥd¾ .";
					close;
					end;
			L_M5_B_M2:
				mes "[޲zHŵܨ]";
				mes "ڤwgӧAhJF AL]nFW|۷QA鹵Υd¾W";
				close;
				end;
	L_M6:
		mes "[޲zHŵܨ]";
		mes "nڭ̥Ͳ~ynAuQ~ж?";
		mes "ӦaOFڭ̪DHAMݩAa... FA~A䥦HӤJ";
		next;
		menu "niJDHж",L_M6_M1,"",L_M6_M2;
		L_M6_M1:
			mes "[޲zHŵܨ]";
			mes "ڱNAAȨ쯵KqD̡Aиڨ ";
			mes "^ӪɭԡAUKsYi ";
			next;
			warp "prtg_cas01.gat",15,209;
			end;
		L_M6_M2:
			mes "[޲zHŵܨ]";
			mes "Ͳ~@ѥuͲ@ . . .   pSYɦܡAU@NiӤF";
			mes "ҥHFڭ̤u|oiAɶqIɶh";
			close;
			end;
// XKa
//~	L_M7:
//~	mes "[޲zHŵܨ]";
//~	mes "DH!!";
//~	mes "AunAڭ̥A崫ӪKa?!";
//~	mes "punܡAboǤlHӡAڭ̩ҬyA쩳NqO!";
//~	mes "ЦAҼ{Ҽ{a! DH!!";
//~	next;
//~	menu "XKa",L_M7_M1,"",L_M7_M2;
//~	L_M7_M1:
//~		mes "[޲zHŵܨ]";
//~		mes "DH!!ФTӫ ADH!!";
//~		mes "oҬy!! Q쨺묹Ao˰!!";
//~		next;
//~		menu "",L_M7_M1_M1,"XKa",L_M7_M2_M2;
//~		L_M7_M1_M1:
//~			mes "[޲zHŵܨ]";
//~			mes "ڴNDA|o˰ ADH!!";
//~			mes "UAF  AYɬO}AЧAU@noظ";
//~			close;
//~			end;
//~		L_M7_M1_M2:
//~			mes "[޲zHŵܨ]";
//~			mes "DH!!.....";
//~			mes "......D .....DH ......";
//~//			AgitSet AGIT_GUILD 0 
//~			close;
//~			setcastledata "prtg_cas01.gat",1,0;
//~			setcastledata "prtg_cas01.gat",2,0;
//~			setcastledata "prtg_cas01.gat",3,0;
//~			setcastledata "prtg_cas01.gat",4,0;
//~			setcastledata "prtg_cas01.gat",5,0;
//~			setcastledata "prtg_cas01.gat",6,0;
//~			setcastledata "prtg_cas01.gat",7,0;
//~			setcastledata "prtg_cas01.gat",8,0;
//~			setcastledata "prtg_cas01.gat",9,0;
//~			setcastledata "prtg_cas01.gat",10,0;
//~			setcastledata "prtg_cas01.gat",11,0;
//~			setcastledata "prtg_cas01.gat",12,0;
//~			setcastledata "prtg_cas01.gat",13,0;
//~			setcastledata "prtg_cas01.gat",14,0;
//~			setcastledata "prtg_cas01.gat",15,0;
//~			setcastledata "prtg_cas01.gat",16,0;
//~			setcastledata "prtg_cas01.gat",17,0;
//~			Announce "Ka[" + GetCastleName("prtg_cas01.gat") + "]Q[" + GetGuildName(@GIDp1) + "]u|XF",0;
//~			MapRespawnGuildID "prtg_cas01.gat",GetCastleData("prtg_cas01.gat",1),7;
//~			end;
//~	L_M7_M2:
//~		mes "[޲zHŵܨ]";
//~		mes "ڴNDA|o˰ ADH!!";
//~		mes "UAF  AYɬO}AЧAU@noظ";
//~		close;
//~		end;

OnClock0000://sPCѯ2Iƭ
	SetCastleData "prtg_cas01.gat",4,0;
	SetCastleData "prtg_cas01.gat",5,0;
	end;

OnAgitStart:
	disablenpc "d ¾#prt1";
	End;
OnRecvCastleP01:
	if ($@vMap_AgitFlag_P01 >= 1) end;
OnAgitEnd:
	if (getcastledata("prtg_cas01.gat",9) != 0) enablenpc "d ¾#prt1";
	End;
}

prtg_cas01.gat,1,1,1	script	GDprt01	-1,{
OnAgitStart:
//OnRecvCastleP01:
// u|̪ŵLHɡAiHl]HIW.
	if (GetCastleData("prtg_cas01.gat",1) == 0) goto L_Mob;
	if (GetCastleData("prtg_cas01.gat",1) != 0) goto L_Guardian;
	end;

L_Mob:
	areamonster "prtg_cas01.gat",0,0,300,300,"FCh",1163,15;
	areamonster "prtg_cas01.gat",0,0,300,300,"dQ",1132,10;
	areamonster "prtg_cas01.gat",0,0,300,300,"`WMh",1219,5;
	areamonster "prtg_cas01.gat",0,0,300,300,"{Mh",1268,5;
	areamonster "prtg_cas01.gat",0,0,300,300,"BMh",1251,1;
	areamonster "prtg_cas01.gat",0,0,300,300,"d",1252,1;
	areamonster "prtg_cas01.gat",0,0,300,300,"F}b",1276,5;
	areamonster "prtg_cas01.gat",0,0,300,300,"l~",1259,2;
	areamonster "prtg_cas01.gat",0,0,300,300,"ͬ",1283,2;
	areamonster "prtg_cas01.gat",0,0,300,300,"RRk",1275,1;
	areamonster "prtg_cas01.gat",0,0,300,300,"㴵]k",1200,1;
	monster "prtg_cas01.gat",197,197,"{Mh",1268,1;
	monster "prtg_cas01.gat",197,197,"BMh",1251,1;
	monster "prtg_cas01.gat",197,197,"d",1252,1;
	monster "prtg_cas01.gat",197,197,"`WMh",1219,2;
	monster "prtg_cas01.gat",197,197,"F}b",1276,5;
	end;

L_Guardian:
	if (GetCastleData("prtg_cas01.gat",10) != 0) monster "prtg_cas01.gat",182,68," hL @H",1287,1,"GDprt01::OnGD1Dead";
	if (GetCastleData("prtg_cas01.gat",11) != 0) monster "prtg_cas01.gat",182,116," hL @H",1287,1,"GDprt01::OnGD2Dead";
	if (GetCastleData("prtg_cas01.gat",12) != 0) monster "prtg_cas01.gat",153,86," hL @H",1287,1,"GDprt01::OnGD3Dead";
	if (GetCastleData("prtg_cas01.gat",13) != 0) monster "prtg_cas01.gat",59,28,"~ }b @H",1285,1,"GDprt01::OnGD4Dead";
	if (GetCastleData("prtg_cas01.gat",14) != 0) monster "prtg_cas01.gat",50,36,"~ }b @H",1285,1,"GDprt01::OnGD5Dead";
	if (GetCastleData("prtg_cas01.gat",15) != 0) monster "prtg_cas01.gat",184,183," Mh  @H",1286,1,"GDprt01::OnGD6Dead";
	if (GetCastleData("prtg_cas01.gat",16) != 0) monster "prtg_cas01.gat",196,189," Mh  @H",1286,1,"GDprt01::OnGD7Dead";
	if (GetCastleData("prtg_cas01.gat",17) != 0) monster "prtg_cas01.gat",107,179," Mh  @H",1286,1,"GDprt01::OnGD8Dead";
	end;

OnGD1Dead:
	setcastledata "prtg_cas01.gat",10,0;
//	MapAnnounce "prtg_cas01.gat","u|u@̡yԤhz01 Q}aF",17;
//	set @Deffence,GetCastleData("prtg_cas01.gat",3);
//	if (@Deffence < 100) End;
//	set @Deffence,@Deffence-100;
//	SetCastleData "prtg_cas01.gat",3,@Deffence;
	end;

OnGD2Dead:
	SetCastleData "prtg_cas01.gat",11,0;
//	MapAnnounce "prtg_cas01.gat","u|u@̡yԤhz02 Q}aF, mפU",17;
	end;

OnGD3Dead:
	SetCastleData "prtg_cas01.gat",12,0;
//	MapAnnounce "prtg_cas01.gat","u|u@̡y}bz01 Q}aF, mפU",17;
	end;

OnGD4Dead:
	SetCastleData "prtg_cas01.gat",13,0;
//	MapAnnounce "prtg_cas01.gat","u|u@̡y}bz02 Q}aF, mפU",17;
	end;

OnGD5Dead:
	SetCastleData "prtg_cas01.gat",14,0;
//	MapAnnounce "prtg_cas01.gat","u|u@̡y}bz03 Q}aF, mפU",17;
	end;

OnGD6Dead:
	SetCastleData "prtg_cas01.gat",15,0;
//	MapAnnounce "prtg_cas01.gat","u|u@̡yMhz01 Q}aF, mפU",17;
	end;

OnGD7Dead:
	SetCastleData "prtg_cas01.gat",16,0;
//	MapAnnounce "prtg_cas01.gat","u|u@̡yMhz02 Q}aF, mפU",17;
	end;

OnGD8Dead:
	SetCastleData "prtg_cas01.gat",17,0;
//	MapAnnounce "prtg_cas01.gat","u|u@̡yMhz03 Q}aF, mפU",17;
	end;

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

prtg_cas01.gat,15,209,0	script	DHЪ_c#prt1	-1,{
OnClock0010:
	killmonster "prtg_cas01.gat","T_Box_P01";
	end;
OnClock0030:
	if (GetCastleData("prtg_cas01.gat",1) == 0) end;
	set $@vMap_Economy_P01,GetCastleData("prtg_cas01.gat",2);
	//Basic T_Box
	monster "prtg_cas01.gat",10,209,"_c",rand(1354,1355),1,"T_Box_P01";
	monster "prtg_cas01.gat",11,209,"_c",rand(1354,1355),1,"T_Box_P01";
	monster "prtg_cas01.gat",11,208,"_c",rand(1354,1355),1,"T_Box_P01";
	monster "prtg_cas01.gat",10,208,"_c",rand(1354,1355),1,"T_Box_P01";
	//Economy T_Box
	if ($@vMap_Economy_P01 >=  5) monster "prtg_cas01.gat",8,211,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 10) monster "prtg_cas01.gat",9,211,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 15) monster "prtg_cas01.gat",10,211,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 20) monster "prtg_cas01.gat",11,211,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 25) monster "prtg_cas01.gat",12,211,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 30) monster "prtg_cas01.gat",13,211,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 35) monster "prtg_cas01.gat",13,210,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 40) monster "prtg_cas01.gat",13,209,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 45) monster "prtg_cas01.gat",13,208,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 50) monster "prtg_cas01.gat",13,207,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 55) monster "prtg_cas01.gat",13,206,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 60) monster "prtg_cas01.gat",12,206,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 65) monster "prtg_cas01.gat",11,206,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 70) monster "prtg_cas01.gat",10,206,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 75) monster "prtg_cas01.gat",9,206,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 80) monster "prtg_cas01.gat",8,206,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 85) monster "prtg_cas01.gat",8,205,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 90) monster "prtg_cas01.gat",8,204,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >= 95) monster "prtg_cas01.gat",8,203,"_c",rand(1354,1355),1,"T_Box_P01";
	if ($@vMap_Economy_P01 >  99) monster "prtg_cas01.gat",8,202,"_c",rand(1354,1355),1,"T_Box_P01";
	end;

}