//===== eAthena Script =======================================
//= War of Emperium - Geffen Guild Wars Events
//===== By: ==================================================
//= jAthena (1.0)
//= 1.1 by Akaru and ho|yAnge|
//===== Current Version: =====================================
//= 1.3
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
//= Event Triggers of Geffen Guild Wars
//===== Additional Comments: =================================
//= v1.2 Now using functions for OnAgitStart and OnAgitBreak. [kobra_k88]
//= 1.3 Added code for abandoning captured castles on /breakguild [Lupus]
//============================================================


// Castle 1 ================================================================
gefg_cas01.gat,198,182,0	script	Agit_G01	-1,{
OnInterIfInitOnce:
	GetCastleData "gefg_cas01.gat",0,"::OnRecvCastleG01";
	end;
OnRecvCastleG01:
	RequestGuildInfo GetCastleData("gefg_cas01.gat",1);
	end;
OnAgitStart:
	callfunc "F_AgitStart","gefg_cas01","G01",198,182;
	end;
OnAgitBreak:
	callfunc "F_AgitBreak","gefg_cas01","G01";
	end;
OnGuildBreak:
	callfunc "F_GuildBreak","gefg_cas01","G01";
	end;
OnAgitEliminate:
	MapRespawnGuildID "gefg_cas01.gat",GetCastleData("gefg_cas01.gat",1),6;
	Monster "gefg_cas01.gat",198,182,"EMPERIUM",1288,1,"Agit_G01::OnAgitBreak";
	end;
OnAgitEnd:
	callfunc "F_AgitEnd","gefg_cas01","G01";
	end;
}

// Castle 2 ================================================================
gefg_cas02.gat,176,178,0	script	Agit_G02	-1,{
OnInterIfInitOnce:
	GetCastleData "gefg_cas02.gat",0,"::OnRecvCastleG02";
	end;
OnRecvCastleG02:
	RequestGuildInfo GetCastleData("gefg_cas02.gat",1);
	end;
OnAgitStart:
	callfunc "F_AgitStart","gefg_cas02","G02",176,178;
	end;
OnAgitBreak:
	callfunc "F_AgitBreak","gefg_cas02","G02";
	end;
OnGuildBreak:
	callfunc "F_GuildBreak","gefg_cas02","G02";
	end;
OnAgitEliminate:
	MapRespawnGuildID "gefg_cas02.gat",GetCastleData("gefg_cas02.gat",1),6;
	Monster "gefg_cas02.gat",176,178,"EMPERIUM",1288,1,"Agit_G02::OnAgitBreak";
	end;
OnAgitEnd:
	callfunc "F_AgitEnd","gefg_cas02","G02";
	end;
}

// Castle 3 ================================================================
gefg_cas03.gat,245,167,0	script	Agit_G03	-1,{
OnInterIfInitOnce:
	GetCastleData "gefg_cas03.gat",0,"::OnRecvCastleG03";
	end;
OnRecvCastleG03:
	RequestGuildInfo GetCastleData("gefg_cas03.gat",1);
	end;
OnAgitStart:
	callfunc "F_AgitStart","gefg_cas03","G03",245,167;
	end;
OnAgitBreak:
	callfunc "F_AgitBreak","gefg_cas03","G03";
	end;
OnGuildBreak:
	callfunc "F_GuildBreak","gefg_cas03","G03";
	end;
OnAgitEliminate:
	MapRespawnGuildID "gefg_cas03.gat",GetCastleData("gefg_cas03.gat",1),6;
	Monster "gefg_cas03.gat",245,167,"EMPERIUM",1288,1,"Agit_G03::OnAgitBreak";
	end;
OnAgitEnd:
	callfunc "F_AgitEnd","gefg_cas03","G03";
	end;
}

// Castle 4 ================================================================
gefg_cas04.gat,174,178,0	script	Agit_G04	-1,{
OnInterIfInitOnce:
	GetCastleData "gefg_cas04.gat",0,"::OnRecvCastleG04";
	end;
OnRecvCastleG04:
	RequestGuildInfo GetCastleData("gefg_cas04.gat",1);
	end;
OnAgitStart:
	callfunc "F_AgitStart","gefg_cas04","G04",174,178;
	end;
OnAgitBreak:
	callfunc "F_AgitBreak","gefg_cas04","G04";
	end;
OnGuildBreak:
	callfunc "F_GuildBreak","gefg_cas04","G04";
	end;
OnAgitEliminate:
	MapRespawnGuildID "gefg_cas04.gat",GetCastleData("gefg_cas04.gat",1),6;
	Monster "gefg_cas04.gat",174,178,"EMPERIUM",1288,1,"Agit_G04::OnAgitBreak";
	end;
OnAgitEnd:
	callfunc "F_AgitEnd","gefg_cas04","G04";
	end;
}

// Castle 5 ================================================================
gefg_cas05.gat,194,184,0	script	Agit_G05	-1,{
OnInterIfInitOnce:
	GetCastleData "gefg_cas05.gat",0,"::OnRecvCastleG05";
	end;
OnRecvCastleG05:
	RequestGuildInfo GetCastleData("gefg_cas05.gat",1);
	end;
OnAgitStart:
	callfunc "F_AgitStart","gefg_cas05","G05",194,184;
	end;
OnAgitBreak:
	callfunc "F_AgitBreak","gefg_cas05","G05";
	end;
OnGuildBreak:
	callfunc "F_GuildBreak","gefg_cas05","G05";
	end;
OnAgitEliminate:
	MapRespawnGuildID "gefg_cas05.gat",GetCastleData("gefg_cas05.gat",1),6;
	Monster "gefg_cas05.gat",194,184,"EMPERIUM",1288,1,"Agit_G05::OnAgitBreak";
	end;
OnAgitEnd:
	callfunc "F_AgitEnd","gefg_cas05","G05";
	end;
}
