//==================================
// [] The PlutoEA Project []
// http://opensvn.csie.org/PlutoEA
// ---------------------------------
// - 𫰾Զ} } - 
//===================================
// G1.9
//===================================
// YQDp]w𫰾Զ}ҮɶAШdoc\woe_time_explanation.txt
// ̭ WoE Start/Stop times
//======================================

-	script	Agit_Event	-1,{
	end;

OnClock2100:	//}lɶ PGB
OnClock2300:	//ɶ

OnAgitInit:
	// }lɶˬd
	if( (gettime(4)==2) && (gettime(3)>=21 && gettime(3)<23) ||
	(gettime(4)==5) && (gettime(3)>=21 && gettime(3)<23) ) {
		if (!agitcheck()) {
			AgitStart;
			callsub S_DisplayOwners;
		}
		end;
	}

	// ɶˬd
	if ( (gettime(4)==2) && (gettime(3)==23) ||
	(gettime(4)==5) && (gettime(3)>=21 && gettime(3)<23)) {
		if (agitcheck()) {
			AgitEnd;
			callsub S_DisplayOwners;
		}
		end;
	}
	end;

S_DisplayOwners:
	setarray .@maps$[0],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05";
	setarray .@maps$[5],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05";
	setarray .@maps$[10],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05";
	setarray .@maps$[15],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05";
	for( set .@i, 0; .@i <= 19; set .@i, .@i+1 ) {
		if (GetCastleData(.@maps$[.@i],1)) {
			Announce "Ka [" + GetCastleName(.@maps$[.@i]) + "]Q [" + GetGuildName(GetCastleData(.@maps$[.@i],1)) + "] u|F",bc_all;
		}
		else {
			Announce "Ka [" + GetCastleName(.@maps$[.@i]) + "]Q [] u|F",bc_all;
		}
	}
	end;
}