This commit is contained in:
mobius
2015-01-01 20:02:50 +00:00
parent eeae660458
commit a6a3718849
17894 changed files with 2818932 additions and 0 deletions

View File

@@ -0,0 +1,153 @@
/*
* Copyright (C) 2004-2014 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package conquerablehalls.flagwar.BanditStronghold;
import java.util.Collection;
import com.l2jserver.gameserver.instancemanager.ZoneManager;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.zone.type.L2ResidenceHallTeleportZone;
import conquerablehalls.flagwar.FlagWar;
/**
* @author BiggBoss
*/
public final class BanditStronghold extends FlagWar
{
static
{
ROYAL_FLAG = 35422;
FLAG_RED = 35423;
FLAG_YELLOW = 35424;
FLAG_GREEN = 35425;
FLAG_BLUE = 35426;
FLAG_PURPLE = 35427;
ALLY_1 = 35428;
ALLY_2 = 35429;
ALLY_3 = 35430;
ALLY_4 = 35431;
ALLY_5 = 35432;
TELEPORT_1 = 35560;
MESSENGER = 35437;
OUTTER_DOORS_TO_OPEN[0] = 22170001;
OUTTER_DOORS_TO_OPEN[1] = 22170002;
INNER_DOORS_TO_OPEN[0] = 22170003;
INNER_DOORS_TO_OPEN[1] = 22170004;
FLAG_COORDS[0] = new Location(83699, -17468, -1774, 19048);
FLAG_COORDS[1] = new Location(82053, -17060, -1784, 5432);
FLAG_COORDS[2] = new Location(82142, -15528, -1799, 58792);
FLAG_COORDS[3] = new Location(83544, -15266, -1770, 44976);
FLAG_COORDS[4] = new Location(84609, -16041, -1769, 35816);
FLAG_COORDS[5] = new Location(81981, -15708, -1858, 60392);
FLAG_COORDS[6] = new Location(84375, -17060, -1860, 27712);
Collection<L2ResidenceHallTeleportZone> zoneList = ZoneManager.getInstance().getAllZones(L2ResidenceHallTeleportZone.class);
for (L2ResidenceHallTeleportZone teleZone : zoneList)
{
if (teleZone.getResidenceId() != BANDIT_STRONGHOLD)
{
continue;
}
int id = teleZone.getResidenceZoneId();
if ((id < 0) || (id >= 6))
{
continue;
}
TELE_ZONES[id] = teleZone;
}
QUEST_REWARD = 5009;
CENTER = new Location(82882, -16280, -1894, 0);
}
private BanditStronghold()
{
super(BanditStronghold.class.getSimpleName(), BANDIT_STRONGHOLD);
}
@Override
public String getFlagHtml(int flag)
{
String result = null;
switch (flag)
{
case 35423:
result = "messenger_flag1.htm";
break;
case 35424:
result = "messenger_flag2.htm";
break;
case 35425:
result = "messenger_flag3.htm";
break;
case 35426:
result = "messenger_flag4.htm";
break;
case 35427:
result = "messenger_flag5.htm";
break;
}
return result;
}
@Override
public String getAllyHtml(int ally)
{
String result = null;
switch (ally)
{
case 35428:
result = "messenger_ally1result.htm";
break;
case 35429:
result = "messenger_ally2result.htm";
break;
case 35430:
result = "messenger_ally3result.htm";
break;
case 35431:
result = "messenger_ally4result.htm";
break;
case 35432:
result = "messenger_ally5result.htm";
break;
}
return result;
}
public static void main(String[] args)
{
new BanditStronghold();
}
}

View File

@@ -0,0 +1,5 @@
<html><body>
Ol mahum berserkers live for the most appalling aspects of war. An alliance with them would be quite useful to you. They are superior examples of their kind, but their enthusiasm for battle often prevents their proper healing after injury. They are a challenge to handle but are worth the effort.<br>
<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
<a action="bypass -h Quest BanditStrongHold select_clan_npc 35428">Form an alliance.</a>
</body></html>

View File

@@ -0,0 +1,2 @@
<html><body>
Ol mahum berserkers live for the most appalling aspects of war. An alliance with them would be quite useful to you. They are superior examples of their kind, but their enthusiasm for battle often prevents their proper healing after injury. They are a challenge to handle but are worth the effort.

View File

@@ -0,0 +1,5 @@
<html><body>
The ol mahum patrol may not appear to be anything special, but he is a slippery foe. I have never seen one captured by a knight!<br>
<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
<a action="bypass -h Quest BanditStrongHold select_clan_npc 35429">Form an alliance.</a>
</body></html>

View File

@@ -0,0 +1,2 @@
<html><body>
The ol mahum patrol may not appear to be anything special, but he is a slippery foe. I have never seen one captured by a knight!

View File

@@ -0,0 +1,5 @@
<html><body>
The ol mahum prefects possess a powerful magic. They have been known to burn their enemies alive! Ah, yes, the infamous Aura Burn! They are also masters of their staffs, and are strong enough to withstand attack by swords or clubs. Their only weakness is a susceptibility to magic spells...<br>
<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
<a action="bypass -h Quest BanditStrongHold select_clan_npc 35430">Form an alliance.</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
The ol mahum prefects possess a powerful magic. They have been known to burn their enemies alive! Ah, yes, the infamous Aura Burn! They are also masters of their staffs, and are strong enough to withstand attack by swords or clubs. Their only weakness is a susceptibility to magic spells...
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Let me tell you what my opinion is regarding the Oel Mahum Clerics... Ah, even Oel Mahums have a god they worship. It is not the same god called Ein... something that you guys believe in. But, having a god for themselves won't change their natural temperament, will it? They would rather kill than eat. Whenever they get into a fight, they fret themselves to death while trying to blow their enemies' heads off. If an oel mahum feels threatened he will not hesitate to run away and heal himself.... They are the kind of people who always leave a bad taste in your mouth.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>
Ol mahum thieves are amusing little fellows. Shorter than the average ol mahum, they are exceptionally lithe. If they think they have the advantage, they will attack a target. But if they feel threatened they will evade direct conflict with the enemy while using a unique method to bind his legs.<br>
<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
<a action="bypass -h Quest BanditStrongHold select_clan_npc 35432">Form an alliance.</a>
</body></html>

View File

@@ -0,0 +1,2 @@
<html><body>
Ol mahum thieves are amusing little fellows. Shorter than the average ol mahum, they are exceptionally lithe. If they think they have the advantage, they will attack a target. But if they feel threatened they will evade direct conflict with the enemy while using a unique strategy to bind his legs.

View File

@@ -0,0 +1,8 @@
<html><body>
This siege requires that you ally with an ol mahum warrior for battle. All five of these have good reputations. Now choose!<br>
<a action="bypass -h Quest BanditStrongHold messenger_ally1choose.htm">ol mahum berserker</a><br>
<a action="bypass -h Quest BanditStrongHold messenger_ally2choose.htm">ol mahum patrol </a><br>
<a action="bypass -h Quest BanditStrongHold messenger_ally3choose.htm">ol mahum prefect</a><br>
<a action="bypass -h Quest BanditStrongHold messenger_ally4choose.htm">ol mahum cleric</a><br>
<a action="bypass -h Quest BanditStrongHold messenger_ally5choose.htm">ol mahum thief</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
You are too late! Five clans have already registered. Better luck next time!
</body></html>

View File

@@ -0,0 +1,2 @@
<html><body>
Haven't you learned anything? Surely you don't think you can just walk away from our agreement! See you on the battlefield!

View File

@@ -0,0 +1,3 @@
<html><body>
Ah, yes! Here is your registration! You are all set. Don't be late!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
What was the name of your clan again? What is this? You are not even registered for this siege! Do you think that you are above the rules? Or perhaps you are just an idiot!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Oops, sorry, but your clan is already fully manned. 18 have already been registered! You are a privateer, aren't you?
</body></html>

View File

@@ -0,0 +1,2 @@
<html><body>
Oh, sir, a master such as yourself need not prove himself! Leave such matters to the youngsters! Enjoy the show!

View File

@@ -0,0 +1,3 @@
<html><body>
It is very important that you understand that our team fights under the red flag. We will rally there and start the battle! Don't forget!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
It is very important that you understand that our team fights under the yellow flag. We will rally there and start the battle! Don't forget!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Our team fights under the green flag. We will rally there and start the battle! Don't forget!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
It is very important that you understand that our team fights under the blue flag. We will rally there and start the battle! Don't forget!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
It is very important that you understand that our team fights under the purple flag. We will rally there and start the battle! Don't forget!
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>
I'm just here to make sure the siege comes off without a hitch. I'll try to stay out of the way. Knock yourselves out!<br>
<a action="bypass -h Quest BanditStrongHold register_clan wQuest">Register a clan (must be a clan leader)</a><br>
<a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select a Clan NPC (must be a clan leader)</a><br>
<a action="bypass -h Quest BanditStrongHold view_clan_npc">View a Clan NPC (any clan member)</a><br>
<a action="bypass -h Quest BanditStrongHold register_member">Register as a clan member. (Any clan member)</a><br><br>
<a action="bypass -h npc_%objectId%_Quest Q00504_CompetitionForTheBanditStronghold">Quest</a>
</body></html>

View File

@@ -0,0 +1,2 @@
<html><body>
Your clan leader has not yet chosen who he will ally himself with! Go and tell him that his decision is required!

View File

@@ -0,0 +1,3 @@
<html><body>
You must be a clan member to register one. Your business is elsewhere! Go to it!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>
So you want to register for free, eh? There is a way... You can take a test if you can't afford the fee...<br>
<a action="bypass -h npc_%objectId%_Quest Q00504_CompetitionfortheBanditStronghold">"I want to take the test."</a>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Messenger:<br>
What do you want from me? I don't like that strangers can walk around on this land as they like.<br>
Whew~, but the stronghold is under the rule of <font color="00FFFF">%clanName%</font>clans at present...<br>
<a action="bypass -h npc_%objectId%_Quest Q00504_CompetitionfortheBanditStronghold">Clan Hall War Registration Qualification Test</a><br>
<a action="bypass -h Quest BanditStronghold register_clan">Register for Clan Hall War</a><br>
<a action="bypass -h Quest BanditStronghold view_attacker_list">View Clans Participating in Tournaments</a>
</body></html>

View File

@@ -0,0 +1,2 @@
<html><body>
What's that, you want to register without qualifying? Well, maybe we can work something out... 200,000 adena might get this conversation started...<br>

View File

@@ -0,0 +1,4 @@
<html><body>
What a nerve! And not even a clan leader! When someone tries something like that in the ol mahum troops we eat him for dinner!<br>
(This option is only available to a clan leader.)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
You clan leader is dithering on his selection of allies! Go and tell him to hurry up and decide!
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>Messenger:<br>
If you're having second thoughts, now's the time to back out.<br>
The following Clans are participating in preliminaries:<br>
=== Clans Registered for the Preliminary Contest ===<br>
1. <FONT color=00ffff>%clan1%</FONT> (Number of Participants : <FONT color=00ffff>%clanMem1%</FONT>)<br>
2. <FONT color=00ffff>%clan2%</FONT> (Number of Participants : <FONT color=00ffff>%clanMem2%</FONT>)<br>
3. <FONT color=00ffff>%clan3%</FONT> (Number of Participants : <FONT color=00ffff>%clanMem3%</FONT>)<br>
4. <FONT color=00ffff>%clan4%</FONT> (Number of Participants : <FONT color=00ffff>%clanMem4%</FONT>)<br>
5. <FONT color=00ffff>%clan5%</FONT> (Number of Participants : <FONT color=00ffff>%clanMem5%</FONT>)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
You are too late, registration is over. Maybe next time you should get here earlier!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Messenger:<br>
I thought I made it clear that registration does not begin until one hour before the next siege at %nextSiege%.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
You will be teleporter to the battlefield in 30 seconds.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
You cannot get teleported to the battlefield yet!
</body></html>

View File

@@ -0,0 +1,928 @@
/*
* Copyright (C) 2004-2014 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package conquerablehalls.flagwar;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.l2jserver.L2DatabaseFactory;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.ai.CtrlIntention;
import com.l2jserver.gameserver.ai.L2SpecialSiegeGuardAI;
import com.l2jserver.gameserver.datatables.ClanTable;
import com.l2jserver.gameserver.datatables.NpcData;
import com.l2jserver.gameserver.model.L2Clan;
import com.l2jserver.gameserver.model.L2ClanMember;
import com.l2jserver.gameserver.model.L2SiegeClan;
import com.l2jserver.gameserver.model.L2SiegeClan.SiegeClanType;
import com.l2jserver.gameserver.model.L2Spawn;
import com.l2jserver.gameserver.model.L2World;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.TeleportWhereType;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate;
import com.l2jserver.gameserver.model.entity.Siegable;
import com.l2jserver.gameserver.model.entity.clanhall.ClanHallSiegeEngine;
import com.l2jserver.gameserver.model.entity.clanhall.SiegeStatus;
import com.l2jserver.gameserver.model.zone.type.L2ResidenceHallTeleportZone;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
import com.l2jserver.gameserver.util.Broadcast;
/**
* @author BiggBoss
*/
public abstract class FlagWar extends ClanHallSiegeEngine
{
private static final String SQL_LOAD_ATTACKERS = "SELECT * FROM siegable_hall_flagwar_attackers WHERE hall_id = ?";
private static final String SQL_SAVE_ATTACKER = "INSERT INTO siegable_hall_flagwar_attackers_members VALUES (?,?,?)";
private static final String SQL_LOAD_MEMEBERS = "SELECT object_id FROM siegable_hall_flagwar_attackers_members WHERE clan_id = ?";
private static final String SQL_SAVE_CLAN = "INSERT INTO siegable_hall_flagwar_attackers VALUES(?,?,?,?)";
private static final String SQL_SAVE_NPC = "UPDATE siegable_hall_flagwar_attackers SET npc = ? WHERE clan_id = ?";
private static final String SQL_CLEAR_CLAN = "DELETE FROM siegable_hall_flagwar_attackers WHERE hall_id = ?";
private static final String SQL_CLEAR_CLAN_ATTACKERS = "DELETE FROM siegable_hall_flagwar_attackers_members WHERE hall_id = ?";
protected static int ROYAL_FLAG;
protected static int FLAG_RED;
protected static int FLAG_YELLOW;
protected static int FLAG_GREEN;
protected static int FLAG_BLUE;
protected static int FLAG_PURPLE;
protected static int ALLY_1;
protected static int ALLY_2;
protected static int ALLY_3;
protected static int ALLY_4;
protected static int ALLY_5;
protected static int TELEPORT_1;
protected static int MESSENGER;
protected static int[] OUTTER_DOORS_TO_OPEN = new int[2];
protected static int[] INNER_DOORS_TO_OPEN = new int[2];
protected static Location[] FLAG_COORDS = new Location[7];
protected static L2ResidenceHallTeleportZone[] TELE_ZONES = new L2ResidenceHallTeleportZone[6];
protected static int QUEST_REWARD;
protected static Location CENTER;
protected Map<Integer, ClanData> _data = new HashMap<>(6);
protected L2Clan _winner;
private boolean _firstPhase;
public FlagWar(String name, int hallId)
{
super(name, "conquerablehalls/flagwar", hallId);
addStartNpc(MESSENGER);
addFirstTalkId(MESSENGER);
addTalkId(MESSENGER);
for (int i = 0; i < 6; i++)
{
addFirstTalkId(TELEPORT_1 + i);
}
addKillId(ALLY_1);
addKillId(ALLY_2);
addKillId(ALLY_3);
addKillId(ALLY_4);
addKillId(ALLY_5);
addSpawnId(ALLY_1);
addSpawnId(ALLY_2);
addSpawnId(ALLY_3);
addSpawnId(ALLY_4);
addSpawnId(ALLY_5);
// If siege ends w/ more than 1 flag alive, winner is old owner
_winner = ClanTable.getInstance().getClan(_hall.getOwnerId());
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
String html = null;
if (npc.getId() == MESSENGER)
{
if (!checkIsAttacker(player.getClan()))
{
L2Clan clan = ClanTable.getInstance().getClan(_hall.getOwnerId());
String content = getHtm(player.getHtmlPrefix(), "messenger_initial.htm");
content = content.replaceAll("%clanName%", (clan == null) ? "no owner" : clan.getName());
content = content.replaceAll("%objectId%", String.valueOf(npc.getObjectId()));
html = content;
}
else
{
html = "messenger_initial.htm";
}
}
else
{
int index = npc.getId() - TELEPORT_1;
if ((index == 0) && _firstPhase)
{
html = "teleporter_notyet.htm";
}
else
{
TELE_ZONES[index].checkTeleporTask();
html = "teleporter.htm";
}
}
return html;
}
@Override
public synchronized String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String html = event;
L2Clan clan = player.getClan();
if (event.startsWith("register_clan")) // Register the clan for the siege
{
if (!_hall.isRegistering())
{
if (_hall.isInSiege())
{
html = "messenger_registrationpassed.htm";
}
else
{
sendRegistrationPageDate(player);
return null;
}
}
else if ((clan == null) || !player.isClanLeader())
{
html = "messenger_notclannotleader.htm";
}
else if (getAttackers().size() >= 5)
{
html = "messenger_attackersqueuefull.htm";
}
else if (checkIsAttacker(clan))
{
html = "messenger_clanalreadyregistered.htm";
}
else if (_hall.getOwnerId() == clan.getId())
{
html = "messenger_curownermessage.htm";
}
else
{
String[] arg = event.split(" ");
if (arg.length >= 2)
{
// Register passing the quest
if (arg[1].equals("wQuest"))
{
if (player.destroyItemByItemId(_hall.getName() + " Siege", QUEST_REWARD, 1, npc, false)) // Quest passed
{
registerClan(clan);
html = getFlagHtml(_data.get(clan.getId()).flag);
}
else
{
html = "messenger_noquest.htm";
}
}
// Register paying the fee
else if (arg[1].equals("wFee") && canPayRegistration())
{
if (player.reduceAdena(getName() + " Siege", 200000, npc, false)) // Fee payed
{
registerClan(clan);
html = getFlagHtml(_data.get(clan.getId()).flag);
}
else
{
html = "messenger_nomoney.htm";
}
}
}
}
}
// Select the flag to defend
else if (event.startsWith("select_clan_npc"))
{
if (!player.isClanLeader())
{
html = "messenger_onlyleaderselectally.htm";
}
else if (!_data.containsKey(clan.getId()))
{
html = "messenger_clannotregistered.htm";
}
else
{
String[] var = event.split(" ");
if (var.length >= 2)
{
int id = 0;
try
{
id = Integer.parseInt(var[1]);
}
catch (Exception e)
{
_log.warning(getName() + "->select_clan_npc->Wrong mahum warrior id: " + var[1]);
}
if ((id > 0) && ((html = getAllyHtml(id)) != null))
{
_data.get(clan.getId()).npc = id;
saveNpc(id, clan.getId());
}
}
else
{
_log.warning(getName() + " Siege: Not enough parameters to save clan npc for clan: " + clan.getName());
}
}
}
// View (and change ? ) the current selected mahum warrior
else if (event.startsWith("view_clan_npc"))
{
ClanData cd = null;
if (clan == null)
{
html = "messenger_clannotregistered.htm";
}
else if ((cd = _data.get(clan.getId())) == null)
{
html = "messenger_notclannotleader.htm";
}
else if (cd.npc == 0)
{
html = "messenger_leaderdidnotchooseyet.htm";
}
else
{
html = getAllyHtml(cd.npc);
}
}
// Register a clan member for the fight
else if (event.equals("register_member"))
{
if (clan == null)
{
html = "messenger_clannotregistered.htm";
}
else if (!_hall.isRegistering())
{
html = "messenger_registrationpassed.htm";
}
else if (!_data.containsKey(clan.getId()))
{
html = "messenger_notclannotleader.htm";
}
else if (_data.get(clan.getId()).players.size() >= 18)
{
html = "messenger_clanqueuefull.htm";
}
else
{
ClanData data = _data.get(clan.getId());
data.players.add(player.getObjectId());
saveMember(clan.getId(), player.getObjectId());
if (data.npc == 0)
{
html = "messenger_leaderdidnotchooseyet.htm";
}
else
{
html = "messenger_clanregistered.htm";
}
}
}
// Show cur attacker list
else if (event.equals("view_attacker_list"))
{
if (_hall.isRegistering())
{
sendRegistrationPageDate(player);
}
else
{
html = getHtm(player.getHtmlPrefix(), "messenger_registeredclans.htm");
int i = 0;
for (Entry<Integer, ClanData> clanData : _data.entrySet())
{
L2Clan attacker = ClanTable.getInstance().getClan(clanData.getKey());
if (attacker == null)
{
continue;
}
html = html.replaceAll("%clan" + i + "%", clan.getName());
html = html.replaceAll("%clanMem" + i + "%", String.valueOf(clanData.getValue().players.size()));
i++;
}
if (_data.size() < 5)
{
for (int c = _data.size(); c < 5; c++)
{
html = html.replaceAll("%clan" + c + "%", "Empty pos. ");
html = html.replaceAll("%clanMem" + c + "%", "Empty pos. ");
}
}
}
}
return html;
}
@Override
public synchronized String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
if (_hall.isInSiege())
{
final int npcId = npc.getId();
for (int keys : _data.keySet())
{
if (_data.get(keys).npc == npcId)
{
removeParticipant(keys, true);
}
}
synchronized (this)
{
// TODO: Zoey76: previous bad implementation.
// Converting map.keySet() to List and map.values() to List doesn't ensure that
// first element in the key's List correspond to the first element in the values' List
// That's the reason that values aren't copied to a List, instead using _data.get(clanIds.get(0))
final List<Integer> clanIds = new ArrayList<>(_data.keySet());
if (_firstPhase)
{
// Siege ends if just 1 flag is alive
// Hall was free before battle or owner didn't set the ally npc
if (((clanIds.size() == 1) && (_hall.getOwnerId() <= 0)) || (_data.get(clanIds.get(0)).npc == 0))
{
_missionAccomplished = true;
// _winner = ClanTable.getInstance().getClan(_data.keySet()[0]);
// removeParticipant(_data.keySet()[0], false);
cancelSiegeTask();
endSiege();
}
else if ((_data.size() == 2) && (_hall.getOwnerId() > 0)) // Hall has defender (owner)
{
cancelSiegeTask(); // No time limit now
_firstPhase = false;
_hall.getSiegeZone().setIsActive(false);
for (int doorId : INNER_DOORS_TO_OPEN)
{
_hall.openCloseDoor(doorId, true);
}
for (ClanData data : _data.values())
{
doUnSpawns(data);
}
ThreadPoolManager.getInstance().scheduleGeneral(() ->
{
for (int doorId : INNER_DOORS_TO_OPEN)
{
_hall.openCloseDoor(doorId, false);
}
for (Entry<Integer, ClanData> e : _data.entrySet())
{
doSpawns(e.getKey(), e.getValue());
}
_hall.getSiegeZone().setIsActive(true);
}, 300000);
}
}
else
{
_missionAccomplished = true;
_winner = ClanTable.getInstance().getClan(clanIds.get(0));
removeParticipant(clanIds.get(0), false);
endSiege();
}
}
}
return null;
}
@Override
public String onSpawn(L2Npc npc)
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, CENTER);
return null;
}
@Override
public L2Clan getWinner()
{
return _winner;
}
@Override
public void prepareOwner()
{
if (_hall.getOwnerId() > 0)
{
registerClan(ClanTable.getInstance().getClan(_hall.getOwnerId()));
}
_hall.banishForeigners();
SystemMessage msg = SystemMessage.getSystemMessage(SystemMessageId.THE_REGISTRATION_TERM_FOR_S1_HAS_ENDED);
msg.addString(getName());
Broadcast.toAllOnlinePlayers(msg);
_hall.updateSiegeStatus(SiegeStatus.WAITING_BATTLE);
_siegeTask = ThreadPoolManager.getInstance().scheduleGeneral(new SiegeStarts(), 3600000);
}
@Override
public void startSiege()
{
if (getAttackers().size() < 2)
{
onSiegeEnds();
getAttackers().clear();
_hall.updateNextSiege();
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_SIEGE_OF_S1_HAS_BEEN_CANCELED_DUE_TO_LACK_OF_INTEREST);
sm.addString(_hall.getName());
Broadcast.toAllOnlinePlayers(sm);
return;
}
// Open doors for challengers
for (int door : OUTTER_DOORS_TO_OPEN)
{
_hall.openCloseDoor(door, true);
}
// Teleport owner inside
if (_hall.getOwnerId() > 0)
{
L2Clan owner = ClanTable.getInstance().getClan(_hall.getOwnerId());
final Location loc = _hall.getZone().getSpawns().get(0); // Owner restart point
for (L2ClanMember pc : owner.getMembers())
{
if (pc != null)
{
final L2PcInstance player = pc.getPlayerInstance();
if ((player != null) && player.isOnline())
{
player.teleToLocation(loc, false);
}
}
}
}
// Schedule open doors closement and siege start in 2 minutes
ThreadPoolManager.getInstance().scheduleGeneral(new CloseOutterDoorsTask(FlagWar.super), 300000);
}
/**
* Runnable class to schedule doors closing and siege start.
* @author Zoey76
*/
protected class CloseOutterDoorsTask implements Runnable
{
private final Siegable _siegable;
protected CloseOutterDoorsTask(Siegable clanHallSiege)
{
_siegable = clanHallSiege;
}
@Override
public void run()
{
for (int door : OUTTER_DOORS_TO_OPEN)
{
_hall.openCloseDoor(door, false);
}
_hall.getZone().banishNonSiegeParticipants();
_siegable.startSiege();
}
}
@Override
public void onSiegeStarts()
{
for (Entry<Integer, ClanData> clan : _data.entrySet())
{
// Spawns challengers flags and npcs
try
{
ClanData data = clan.getValue();
doSpawns(clan.getKey(), data);
fillPlayerList(data);
}
catch (Exception e)
{
endSiege();
_log.warning(getName() + ": Problems in siege initialization!");
e.printStackTrace();
}
}
}
@Override
public void endSiege()
{
if (_hall.getOwnerId() > 0)
{
L2Clan clan = ClanTable.getInstance().getClan(_hall.getOwnerId());
clan.setHideoutId(0);
_hall.free();
}
super.endSiege();
}
@Override
public void onSiegeEnds()
{
if (_data.size() > 0)
{
for (int clanId : _data.keySet())
{
if (_hall.getOwnerId() == clanId)
{
removeParticipant(clanId, false);
}
else
{
removeParticipant(clanId, true);
}
}
}
clearTables();
}
@Override
public final Location getInnerSpawnLoc(final L2PcInstance player)
{
Location loc = null;
if (player.getClanId() == _hall.getOwnerId())
{
loc = _hall.getZone().getSpawns().get(0);
}
else
{
ClanData cd = _data.get(player.getClanId());
if (cd != null)
{
int index = cd.flag - FLAG_RED;
if ((index >= 0) && (index <= 4))
{
loc = _hall.getZone().getChallengerSpawns().get(index);
}
else
{
throw new ArrayIndexOutOfBoundsException();
}
}
}
return loc;
}
@Override
public final boolean canPlantFlag()
{
return false;
}
@Override
public final boolean doorIsAutoAttackable()
{
return false;
}
void doSpawns(int clanId, ClanData data)
{
try
{
L2NpcTemplate mahumTemplate = NpcData.getInstance().getTemplate(data.npc);
L2NpcTemplate flagTemplate = NpcData.getInstance().getTemplate(data.flag);
if (flagTemplate == null)
{
_log.warning(getName() + ": Flag L2NpcTemplate[" + data.flag + "] does not exist!");
throw new NullPointerException();
}
else if (mahumTemplate == null)
{
_log.warning(getName() + ": Ally L2NpcTemplate[" + data.npc + "] does not exist!");
throw new NullPointerException();
}
int index = 0;
if (_firstPhase)
{
index = data.flag - FLAG_RED;
}
else
{
index = clanId == _hall.getOwnerId() ? 5 : 6;
}
Location loc = FLAG_COORDS[index];
data.flagInstance = new L2Spawn(flagTemplate);
data.flagInstance.setLocation(loc);
data.flagInstance.setRespawnDelay(10000);
data.flagInstance.setAmount(1);
data.flagInstance.init();
data.warrior = new L2Spawn(mahumTemplate);
data.warrior.setLocation(loc);
data.warrior.setRespawnDelay(10000);
data.warrior.setAmount(1);
data.warrior.init();
((L2SpecialSiegeGuardAI) data.warrior.getLastSpawn().getAI()).getAlly().addAll(data.players);
}
catch (Exception e)
{
_log.warning(getName() + ": Couldnt make clan spawns: " + e.getMessage());
e.printStackTrace();
}
}
private void fillPlayerList(ClanData data)
{
for (int objId : data.players)
{
L2PcInstance plr = L2World.getInstance().getPlayer(objId);
if (plr != null)
{
data.playersInstance.add(plr);
}
}
}
private void registerClan(L2Clan clan)
{
final int clanId = clan.getId();
L2SiegeClan sc = new L2SiegeClan(clanId, SiegeClanType.ATTACKER);
getAttackers().put(clanId, sc);
ClanData data = new ClanData();
data.flag = ROYAL_FLAG + _data.size();
data.players.add(clan.getLeaderId());
_data.put(clanId, data);
saveClan(clanId, data.flag);
saveMember(clanId, clan.getLeaderId());
}
private final void doUnSpawns(ClanData data)
{
if (data.flagInstance != null)
{
data.flagInstance.stopRespawn();
data.flagInstance.getLastSpawn().deleteMe();
}
if (data.warrior != null)
{
data.warrior.stopRespawn();
data.warrior.getLastSpawn().deleteMe();
}
}
private final void removeParticipant(int clanId, boolean teleport)
{
ClanData dat = _data.remove(clanId);
if (dat != null)
{
// Destroy clan flag
if (dat.flagInstance != null)
{
dat.flagInstance.stopRespawn();
if (dat.flagInstance.getLastSpawn() != null)
{
dat.flagInstance.getLastSpawn().deleteMe();
}
}
if (dat.warrior != null)
{
// Destroy clan warrior
dat.warrior.stopRespawn();
if (dat.warrior.getLastSpawn() != null)
{
dat.warrior.getLastSpawn().deleteMe();
}
}
dat.players.clear();
if (teleport)
{
// Teleport players outside
for (L2PcInstance pc : dat.playersInstance)
{
if (pc != null)
{
pc.teleToLocation(TeleportWhereType.TOWN);
}
}
}
dat.playersInstance.clear();
}
}
public boolean canPayRegistration()
{
return true;
}
private void sendRegistrationPageDate(L2PcInstance player)
{
final NpcHtmlMessage msg = new NpcHtmlMessage();
msg.setHtml(getHtm(player.getHtmlPrefix(), "siege_date.htm"));
msg.replace("%nextSiege%", _hall.getSiegeDate().getTime().toString());
player.sendPacket(msg);
}
public abstract String getFlagHtml(int flag);
public abstract String getAllyHtml(int ally);
@Override
public final void loadAttackers()
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
{
PreparedStatement statement = con.prepareStatement(SQL_LOAD_ATTACKERS);
statement.setInt(1, _hall.getId());
ResultSet rset = statement.executeQuery();
while (rset.next())
{
final int clanId = rset.getInt("clan_id");
if (ClanTable.getInstance().getClan(clanId) == null)
{
_log.warning(getName() + ": Loaded an unexistent clan as attacker! Clan ID: " + clanId);
continue;
}
ClanData data = new ClanData();
data.flag = rset.getInt("flag");
data.npc = rset.getInt("npc");
_data.put(clanId, data);
loadAttackerMembers(clanId);
}
rset.close();
statement.close();
}
catch (Exception e)
{
_log.warning(getName() + ".loadAttackers()->" + e.getMessage());
e.printStackTrace();
}
}
private final void loadAttackerMembers(int clanId)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
{
ArrayList<Integer> listInstance = _data.get(clanId).players;
if (listInstance == null)
{
_log.warning(getName() + ": Tried to load unregistered clan with ID " + clanId);
return;
}
PreparedStatement statement = con.prepareStatement(SQL_LOAD_MEMEBERS);
statement.setInt(1, clanId);
ResultSet rset = statement.executeQuery();
while (rset.next())
{
listInstance.add(rset.getInt("object_id"));
}
rset.close();
statement.close();
}
catch (Exception e)
{
_log.warning(getName() + ".loadAttackerMembers()->" + e.getMessage());
e.printStackTrace();
}
}
private final void saveClan(int clanId, int flag)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
{
PreparedStatement statement = con.prepareStatement(SQL_SAVE_CLAN);
statement.setInt(1, _hall.getId());
statement.setInt(2, flag);
statement.setInt(3, 0);
statement.setInt(4, clanId);
statement.execute();
statement.close();
}
catch (Exception e)
{
_log.warning(getName() + ".saveClan()->" + e.getMessage());
e.printStackTrace();
}
}
private final void saveNpc(int npc, int clanId)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
{
PreparedStatement statement = con.prepareStatement(SQL_SAVE_NPC);
statement.setInt(1, npc);
statement.setInt(2, clanId);
statement.execute();
statement.close();
}
catch (Exception e)
{
_log.warning(getName() + ".saveNpc()->" + e.getMessage());
e.printStackTrace();
}
}
private final void saveMember(int clanId, int objectId)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
{
PreparedStatement statement = con.prepareStatement(SQL_SAVE_ATTACKER);
statement.setInt(1, _hall.getId());
statement.setInt(2, clanId);
statement.setInt(3, objectId);
statement.execute();
statement.close();
}
catch (Exception e)
{
_log.warning(getName() + ".saveMember()->" + e.getMessage());
e.printStackTrace();
}
}
private void clearTables()
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
{
PreparedStatement stat1 = con.prepareStatement(SQL_CLEAR_CLAN);
stat1.setInt(1, _hall.getId());
stat1.execute();
stat1.close();
PreparedStatement stat2 = con.prepareStatement(SQL_CLEAR_CLAN_ATTACKERS);
stat2.setInt(1, _hall.getId());
stat2.execute();
stat2.close();
}
catch (Exception e)
{
_log.warning(getName() + ".clearTables()->" + e.getMessage());
}
}
class ClanData
{
int flag = 0;
int npc = 0;
ArrayList<Integer> players = new ArrayList<>(18);
ArrayList<L2PcInstance> playersInstance = new ArrayList<>(18);
L2Spawn warrior = null;
L2Spawn flagInstance = null;
}
}

View File

@@ -0,0 +1,159 @@
/*
* Copyright (C) 2004-2014 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package conquerablehalls.flagwar.WildBeastReserve;
import java.util.Collection;
import com.l2jserver.gameserver.instancemanager.ZoneManager;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.zone.type.L2ResidenceHallTeleportZone;
import conquerablehalls.flagwar.FlagWar;
/**
* @author BiggBoss
*/
public final class WildBeastReserve extends FlagWar
{
static
{
ROYAL_FLAG = 35606;
FLAG_RED = 35607; // White flag
FLAG_YELLOW = 35608; // Red flag
FLAG_GREEN = 35609; // Blue flag
FLAG_BLUE = 35610; // Green flag
FLAG_PURPLE = 35611; // Black flag
ALLY_1 = 35618;
ALLY_2 = 35619;
ALLY_3 = 35620;
ALLY_4 = 35621;
ALLY_5 = 35622;
TELEPORT_1 = 35612;
MESSENGER = 35627;
FLAG_COORDS[0] = new Location(56963, -92211, -1303, 60611);
FLAG_COORDS[1] = new Location(58090, -91641, -1303, 47274);
FLAG_COORDS[2] = new Location(58908, -92556, -1303, 34450);
FLAG_COORDS[3] = new Location(58336, -93600, -1303, 21100);
FLAG_COORDS[4] = new Location(57152, -93360, -1303, 8400);
FLAG_COORDS[5] = new Location(59116, -93251, -1302, 31000);
FLAG_COORDS[6] = new Location(56432, -92864, -1303, 64000);
OUTTER_DOORS_TO_OPEN[0] = 21150003;
OUTTER_DOORS_TO_OPEN[1] = 21150004;
INNER_DOORS_TO_OPEN[0] = 21150001;
INNER_DOORS_TO_OPEN[1] = 21150002;
Collection<L2ResidenceHallTeleportZone> zoneList = ZoneManager.getInstance().getAllZones(L2ResidenceHallTeleportZone.class);
for (L2ResidenceHallTeleportZone teleZone : zoneList)
{
if (teleZone.getResidenceId() != BEAST_FARM)
{
continue;
}
int id = teleZone.getResidenceZoneId();
if ((id < 0) || (id >= 6))
{
continue;
}
TELE_ZONES[id] = teleZone;
}
QUEST_REWARD = 0;
CENTER = new Location(57762, -92696, -1359, 0);
}
private WildBeastReserve()
{
super(WildBeastReserve.class.getSimpleName(), BEAST_FARM);
}
@Override
public String getFlagHtml(int flag)
{
String result = null;
switch (flag)
{
case 35607:
result = "messenger_flag1.htm";
break;
case 35608:
result = "messenger_flag2.htm";
break;
case 35609:
result = "messenger_flag3.htm";
break;
case 35610:
result = "messenger_flag4.htm";
break;
case 35611:
result = "messenger_flag5.htm";
break;
}
return result;
}
@Override
public String getAllyHtml(int ally)
{
String result = null;
switch (ally)
{
case 35618:
result = "messenger_ally1result.htm";
break;
case 35619:
result = "messenger_ally2result.htm";
break;
case 35620:
result = "messenger_ally3result.htm";
break;
case 35621:
result = "messenger_ally4result.htm";
break;
case 35622:
result = "messenger_ally5result.htm";
break;
}
return result;
}
@Override
public boolean canPayRegistration()
{
return false;
}
public static void main(String[] args)
{
new WildBeastReserve();
}
}

View File

@@ -0,0 +1,5 @@
<html><body>
As you probably guessed, Cougars are known for their bite! They're also much stronger than other beasts... They're worth taming, but if they get hungry, watch out! They fight tirelessly, with no thought to their own safety, or even survival! They require a very special type of handler...<br>
<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">"I want to choose another NPC."</a><br>
<a action="bypass -h Quest WildBeastReserve selet_npc 35618">"I want to form an alliance."</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Cougars are literally fighting machines, who only know how to rip, twist, destroy and kill! If you form an alliance with them, you'll have a mighty war machine at your disposal! They're far stronger than any other beast! But beware... They're so crazy that they stop at nothing! They'll go after the next enemy even when they're gravely injured! They're quite a challenge to handle...
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>
Buffaloes may seem slow, but they can run faster than the fastest bull! They're huge and resilient beasts...<br>
<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">"I want to choose another NPC."</a><br>
<a action="bypass -h Quest WildBeastReserve select_npc 35619">"I want to form an alliance."</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Buffaloes may appear to possess no special abilities, but they are great at running away! I assume you've witnessed these huge beasts stamping on the ground to make their enemies freeze on the spot? I've never seen that trick work on a Buffalo!
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>
Kookaburras are quite rare. They possess unusually long legs and brilliantly-colored feathers... They peck the enemy with their beaks and use a mysterious and extremely powerful magic. They don't respond well to beatings. The only reason I was able to capture them is their susceptibility to magic.<br>
<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">"I want to choose another NPC."</a><br>
<a action="bypass -h Quest WildBeastReserve 35620">"I want to form an alliance."</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Kookaburras... How to describe them...? They're truly magical beasts! They burn their enemy with supernatural powers! What's it called?... Aura Burn, maybe? Occasionally, they'll peck at their enemy with their beaks! They're strong enough to withstand sword and stick attacks. One drawback, though... they're surprisingly susceptible to magic...
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>
Baby Buffalos are among the most fearsome beasts. It prefers fighting to food, and lives to break an enemy's head in battle. When it finds itself in danger, it retreats and heals itself with magic... But I must admit, it's not a very attractive beast.<br>
<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">"I want to choose another NPC."</a><br>
<a action="bypass -h Quest WildBeastReserve select_npc 35621">"I want to form an alliance."</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
As for Baby Buffalos... They're truly the king of beasts, though certainly not the most attractive! They actually prefer fighting to food! They're capable of retreating from battle when injured to heal themselves...
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>
Baby Cougars may look cute, but they have sharp claws and are deadly fast! They're almost impossible to hit, and they have the unique ability to ensnare the enemy's legs on the rare occasion that they find themselves at a disadvantage in battle.<br>
<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">"I want to choose another NPC."</a><br>
<a action="bypass -h Quest WildBeastReserve select_npc 35622">"I want to form an alliance."</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Ah, the Baby Cougars... They may look cute, but they're as fast as lightning with their sharp claws! They're hard to hit, and have a unique ability to restrain the enemy's movements when they find themselves at a disadvantage in battle.
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>
During the coming war, your Clan must ally with one of the following five most vicious types of wild beasts:<br>
<a action="bypass -h Quest WildBeastReserve messenger_ally1choose.htm">Frenzied Cougar</a><br>
<a action="bypass -h Quest WildBeastReserve messenger_ally2choose.htm">Frenzied Buffalo</a><br>
<a action="bypass -h Quest WildBeastReserve messenger_ally3choose.htm">Frenzied Kookaburra</a><br>
<a action="bypass -h Quest WildBeastReserve messenger_ally4choose.htm">Frenzied Baby Buffalo</a><br>
<a action="bypass -h Quest WildBeastReserve messenger_ally5choose.htm">Frenzied Baby Cougar</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
All five clans have already registered for this Clan Hall Battle. You're too late! Next time, get here earlier!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>
You don't remember what you did in the previous battle? Surely you don't intend to break the alliance... Or do you?<br>
Confirm it yourself on the battlefield!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Have you forgotten so soon? You're already registered! If you have the time, you should read a book called "How to Tame Beasts".
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Humm... What did you say your clan name was? Well... Hey! You're not even registered for this Clan Hall Battle! You must follow the proper procedure! Get your act together!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Your clan is no longer accepting new members. All 18 clan members have been registered! You must be a common soldier.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Registration was successful! Make sure you're not late for the Clan Hall Battle!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
There's no need for you to go through the preliminaries designed for common soldiers, master! Enjoy the fights, sir!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
We'll rendezvous in front of our yellow team banner before the battle! Don't forget!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
We'll rendezvous in front of our red team banner before the battle! Don't forget!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
We'll rendezvous in front of our blue team banner before the battle! Don't forget!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
We'll rendezvous in front of our green team banner before the battle! Don't forget!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
We'll rendezvous in front of our purple team banner before the battle! Don't forget!
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>
Are you ready? Remember, these are wild animals! Don't let them bite you! It won't be easy!<br>
<a action="bypass -h Quest WildBeastReserve register_clan">Clan Register (Leader)</a><br>
<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">Choose Clan NPC (Leader)</a><br>
<a action="bypass -h Quest WildBeastReserve view_clan_npc">See Clan NPC (Member)</a><br>
<a action="bypass -h Quest WildBeastReserver register_member">Clan Member Register (Member)</a><br><br>
<a action="bypass -h npc_%objectId%_Quest 655_AGrandPlanforTamingWildBeasts">Quest</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Your Clan Leader hasn't decided which beast to tame. He must be taking his time...
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Messenger:<br>
What brings you to this place? I can't be responsible for your safety here!<br>
Unless, that is, you're a member of the <font color=00ffff><?my_pledge_name?></font> Clan in charge of the farm.<br>
<a action="bypass -h npc_%objectId%_Quest 655_AGrandPlanforTamingWildBeasts">Qualification Test for Clan Hall Battle Registration</a><br>
<a action="bypass -h Quest WildBeastReserve register_clan">Register for Clan Hall Battle</a><br>
<a action="bypass -h Quest WildBeastReserve view_attacker_list">Clans Participating in the Preliminaries</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Before you can register for the Clan Hall Battle, you must learn to tame beasts. Come back when you're ready.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
Only Clan Leaders may register their clans. Scram!
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Messenger:<br>
The following Clans have applied for entry to the preliminary contest. This would be a good time to study their strategies.<br><br>
=== Clans Registered for the Preliminary Contest ===
<br>1. <font color=00ffff>%clan1%</font> (Number of Participants : <font color=00ffff>%clanMem1%</font>)
<br>2. <font color=00ffff>%clan2%</font> (Number of Participants : <font color=00ffff>%clanMem1%</font>)
<br>3. <font color=00ffff>%clan3%</font> (Number of Participants : <font color=00ffff>%clanMem1%</font>)
<br>4. <font color=00ffff>%clan4%</font> (Number of Participants : <font color=00ffff>%clanMem1%</font>)
<br>5. <font color=00ffff>%clan5%</font> (Number of Participants : <font color=00ffff>%clanMem1%</font>)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
The deadline for registration has passed! Get here earlier next time!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Messenger:<br>
Registration begins an hour before the Clan Hall War.<br>
As far as I know, the next Clan Hall War is around %nextSiege%. Check back then.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
You will be teleporter to the battlefield in 30 seconds.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>
You cannot get teleported to the battlefield yet!
</body></html>