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,174 @@
/*
* 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 ai.npc;
import java.util.logging.Logger;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.holders.MinionHolder;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.network.NpcStringId;
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
import com.l2jserver.gameserver.network.serverpackets.SocialAction;
import com.l2jserver.gameserver.util.Broadcast;
/**
* Abstract NPC AI class for datapack based AIs.
* @author UnAfraid, Zoey76
*/
public abstract class AbstractNpcAI extends Quest
{
public final Logger _log = Logger.getLogger(getClass().getSimpleName());
public AbstractNpcAI(String name, String descr)
{
super(-1, name, descr);
}
/**
* Simple on first talk event handler.
*/
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return npc.getId() + ".html";
}
/**
* Registers the following events to the current script:<br>
* <ul>
* <li>ON_ATTACK</li>
* <li>ON_KILL</li>
* <li>ON_SPAWN</li>
* <li>ON_SPELL_FINISHED</li>
* <li>ON_SKILL_SEE</li>
* <li>ON_FACTION_CALL</li>
* <li>ON_AGGR_RANGE_ENTER</li>
* </ul>
* @param mobs
*/
public void registerMobs(int... mobs)
{
addAttackId(mobs);
addKillId(mobs);
addSpawnId(mobs);
addSpellFinishedId(mobs);
addSkillSeeId(mobs);
addAggroRangeEnterId(mobs);
addFactionCallId(mobs);
}
/**
* Broadcasts NpcSay packet to all known players with custom string.
* @param npc
* @param type
* @param text
*/
protected void broadcastNpcSay(L2Npc npc, int type, String text)
{
Broadcast.toKnownPlayers(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), text));
}
/**
* Broadcasts NpcSay packet to all known players with npc string id.
* @param npc
* @param type
* @param stringId
*/
protected void broadcastNpcSay(L2Npc npc, int type, NpcStringId stringId)
{
Broadcast.toKnownPlayers(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), stringId));
}
/**
* Broadcasts NpcSay packet to all known players with npc string id.
* @param npc
* @param type
* @param stringId
* @param parameters
*/
protected void broadcastNpcSay(L2Npc npc, int type, NpcStringId stringId, String... parameters)
{
final NpcSay say = new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), stringId);
if (parameters != null)
{
for (String parameter : parameters)
{
say.addStringParameter(parameter);
}
}
Broadcast.toKnownPlayers(npc, say);
}
/**
* Broadcasts NpcSay packet to all known players with custom string in specific radius.
* @param npc
* @param type
* @param text
* @param radius
*/
protected void broadcastNpcSay(L2Npc npc, int type, String text, int radius)
{
Broadcast.toKnownPlayersInRadius(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), text), radius);
}
/**
* Broadcasts NpcSay packet to all known players with npc string id in specific radius.
* @param npc
* @param type
* @param stringId
* @param radius
*/
protected void broadcastNpcSay(L2Npc npc, int type, NpcStringId stringId, int radius)
{
Broadcast.toKnownPlayersInRadius(npc, new NpcSay(npc.getObjectId(), type, npc.getTemplate().getDisplayId(), stringId), radius);
}
/**
* Broadcasts SocialAction packet to self and known players.
* @param character
* @param actionId
*/
protected void broadcastSocialAction(L2Character character, int actionId)
{
Broadcast.toSelfAndKnownPlayers(character, new SocialAction(character.getObjectId(), actionId));
}
/**
* Broadcasts SocialAction packet to self and known players in specific radius.
* @param character
* @param actionId
* @param radius
*/
protected void broadcastSocialAction(L2Character character, int actionId, int radius)
{
Broadcast.toSelfAndKnownPlayersInRadius(character, new SocialAction(character.getObjectId(), actionId), radius);
}
public void spawnMinions(final L2Npc npc, final String spawnName)
{
for (MinionHolder is : npc.getTemplate().getParameters().getMinionList(spawnName))
{
addMinion((L2MonsterInstance) npc, is.getId());
}
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Alarm System:<br>
As the alarm rings, a window for the passcode pops up. On the screen you see the number 120, which begins counting down. It looks like the alarm system will be activated in about 2 minutes unless the passcode is successfully entered.<br>
<a action="bypass -h Quest Alarm 2">Enter the passcode.</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Alarm System:<br>
The alarm is ringing loudly. You should leave here immediately.<br>
(Another person has already undertaken the quest.)
</body></html>

View File

@@ -0,0 +1,42 @@
<html><body>Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode :|<br>
########################<br>
The first number is...
<table border="0" border color="white" width="65" height="65">
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">1</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">2</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 3">3</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">4</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">5</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">6</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">7</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">8</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">9</a>
</td>
</tr>
</table>
</body></html>

View File

@@ -0,0 +1,42 @@
<html><body>Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode : *|<br>
########################<br>
The second number is...
<table border="0" border color="white" width="65" height="65">
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 4">1</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">2</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">3</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">4</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">5</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">6</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">7</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">8</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">9</a>
</td>
</tr>
</table>
</body></html>

View File

@@ -0,0 +1,42 @@
<html><body>Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode : **|<br>
########################<br>
The third number is...
<table border="0" border color="white" width="65" height="65">
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">1</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">2</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">3</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">4</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">5</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">6</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">7</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">8</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 5">9</a>
</td>
</tr>
</table>
</body></html>

View File

@@ -0,0 +1,43 @@
<html><body>
Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode : ***|<br>
########################<br>
The fourth number is...
<table border="0" border color="white" width="65" height="65">
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">1</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">2</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">3</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">4</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">5</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">6</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">7</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">8</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">9</a>
</td>
</tr>
</table>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode : ****<br>
########################<br>
Validation completed. Alarm has been disabled.
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode : ****<br>
########################<br>
Validation has failed. <br>
<br>
<a action="bypass -h Quest Alarm 2">Re-enter passcode.</a>
</body></html>

View File

@@ -0,0 +1,42 @@
<html><body>Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode :|<br>
########################<br>
The first number is...
<table border="0" border color="white" width="65" height="65">
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">1</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">2</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 3">3</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">4</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">5</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">6</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">7</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">8</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_04.html">9</a>
</td>
</tr>
</table>
</body></html>

View File

@@ -0,0 +1,43 @@
<html><body>Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode : *|<br>
########################<br>
The second number is...
<table border="0" border color="white" width="65" height="65">
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 4">1</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">2</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">3</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">4</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">5</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">6</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">7</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">8</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_06.html">9</a>
</td>
</tr>
</table>
</body></html>

View File

@@ -0,0 +1,41 @@
<html><body>Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode : **|<br>
########################<br>
The third number is...
<table border="0" border color="white" width="65" height="65">
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">1</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">2</a>
</td> <td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">3</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">4</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">5</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">6</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">7</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 32367-184_08.html">8</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 5">9</a>
</td>
</tr>
</table>
</body></html>

View File

@@ -0,0 +1,42 @@
<html><body>Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode : ***| <br>
########################<br>
The fourth number is...
<table border="0" border color="white" width="65" height="65">
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">1</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">2</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">3</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">4</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">5</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">6</a>
</td>
</tr>
<tr>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">7</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">8</a>
</td>
<td width="20" height="20" align="center">
<a action="bypass -h Quest Alarm 6">9</a>
</td>
</tr>
</table>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Alarm System:<br>
########################<br>
Enter the passcode for communication.<br>
Passcode : **** <br>
########################<br>
Validation completed. Alarm has been disabled.
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Alarm System:<br>
########################<br>
Enter passcode for communication.<br>
Passcode : **** <br>########################<br>
Validation has failed.<br>
<br>
<a action="bypass -h Quest Alarm 2">Re-enter passcode.</a>
</body></html>

View File

@@ -0,0 +1,359 @@
/*
* 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 ai.npc.Alarm;
import quests.Q00184_ArtOfPersuasion.Q00184_ArtOfPersuasion;
import quests.Q00185_NikolasCooperation.Q00185_NikolasCooperation;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.enums.QuestSound;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.network.NpcStringId;
import com.l2jserver.gameserver.network.clientpackets.Say2;
/**
* Alarm AI for quests Art of Persuasion (184) and Nikola's Cooperation (185).
* @author Zoey76
*/
public final class Alarm extends AbstractNpcAI
{
// NPC
private static final int ALARM = 32367;
// Misc
private static final int ART_OF_PERSUASION_ID = 184;
private static final int NIKOLAS_COOPERATION_ID = 185;
private Alarm()
{
super(Alarm.class.getSimpleName(), "ai/npc");
addStartNpc(ALARM);
addTalkId(ALARM);
addFirstTalkId(ALARM);
addSpawnId(ALARM);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
final L2PcInstance player0 = npc.getVariables().getObject("player0", L2PcInstance.class);
final L2Npc npc0 = npc.getVariables().getObject("npc0", L2Npc.class);
switch (event)
{
case "SELF_DESTRUCT_IN_60":
{
startQuestTimer("SELF_DESTRUCT_IN_30", 30000, npc, null);
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_60_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
break;
}
case "SELF_DESTRUCT_IN_30":
{
startQuestTimer("SELF_DESTRUCT_IN_10", 20000, npc, null);
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_30_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
break;
}
case "SELF_DESTRUCT_IN_10":
{
startQuestTimer("RECORDER_CRUSHED", 10000, npc, null);
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.THE_ALARM_WILL_SELF_DESTRUCT_IN_10_SECONDS_ENTER_PASSCODE_TO_OVERRIDE);
break;
}
case "RECORDER_CRUSHED":
{
if (npc0 != null)
{
if (npc0.getVariables().getBoolean("SPAWNED"))
{
npc0.getVariables().set("SPAWNED", false);
if (player0 != null)
{
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.RECORDER_CRUSHED);
if (verifyMemoState(player0, ART_OF_PERSUASION_ID, -1))
{
setMemoState(player0, ART_OF_PERSUASION_ID, 5);
}
else if (verifyMemoState(player0, NIKOLAS_COOPERATION_ID, -1))
{
setMemoState(player0, NIKOLAS_COOPERATION_ID, 5);
}
}
}
}
npc.deleteMe();
break;
}
case "32367-184_04.html":
case "32367-184_06.html":
case "32367-184_08.html":
{
htmltext = event;
break;
}
case "2":
{
if (player0 == player)
{
if (verifyMemoState(player, ART_OF_PERSUASION_ID, 3))
{
htmltext = "32367-184_02.html";
}
else if (verifyMemoState(player, NIKOLAS_COOPERATION_ID, 3))
{
htmltext = "32367-185_02.html";
}
}
break;
}
case "3":
{
if (verifyMemoState(player, ART_OF_PERSUASION_ID, 3))
{
setMemoStateEx(player, ART_OF_PERSUASION_ID, 1, 1);
htmltext = "32367-184_04.html";
}
else if (verifyMemoState(player, NIKOLAS_COOPERATION_ID, 3))
{
setMemoStateEx(player, NIKOLAS_COOPERATION_ID, 1, 1);
htmltext = "32367-185_04.html";
}
break;
}
case "4":
{
if (verifyMemoState(player, ART_OF_PERSUASION_ID, 3))
{
setMemoStateEx(player, ART_OF_PERSUASION_ID, 1, getMemoStateEx(player, ART_OF_PERSUASION_ID, 1) + 1);
htmltext = "32367-184_06.html";
}
else if (verifyMemoState(player, NIKOLAS_COOPERATION_ID, 3))
{
setMemoStateEx(player, NIKOLAS_COOPERATION_ID, 1, getMemoStateEx(player, NIKOLAS_COOPERATION_ID, 1) + 1);
htmltext = "32367-185_06.html";
}
break;
}
case "5":
{
if (verifyMemoState(player, ART_OF_PERSUASION_ID, 3))
{
setMemoStateEx(player, ART_OF_PERSUASION_ID, 1, getMemoStateEx(player, ART_OF_PERSUASION_ID, 1) + 1);
htmltext = "32367-184_08.html";
}
else if (verifyMemoState(player, NIKOLAS_COOPERATION_ID, 3))
{
setMemoStateEx(player, NIKOLAS_COOPERATION_ID, 1, getMemoStateEx(player, NIKOLAS_COOPERATION_ID, 1) + 1);
htmltext = "32367-185_08.html";
}
break;
}
case "6":
{
if (verifyMemoState(player, ART_OF_PERSUASION_ID, 3))
{
int i0 = getMemoStateEx(player, ART_OF_PERSUASION_ID, 1);
if (i0 >= 3)
{
if ((npc0 != null) && npc0.getVariables().getBoolean("SPAWNED"))
{
npc0.getVariables().set("SPAWNED", false);
}
npc.deleteMe();
setMemoState(player, ART_OF_PERSUASION_ID, 4);
htmltext = "32367-184_09.html";
}
else
{
setMemoStateEx(player, ART_OF_PERSUASION_ID, 1, 0);
htmltext = "32367-184_10.html";
}
}
else if (verifyMemoState(player, NIKOLAS_COOPERATION_ID, 3))
{
int i0 = getMemoStateEx(player, NIKOLAS_COOPERATION_ID, 1);
if (i0 >= 3)
{
if ((npc0 != null) && npc0.getVariables().getBoolean("SPAWNED"))
{
npc0.getVariables().set("SPAWNED", false);
}
npc.deleteMe();
setMemoState(player, NIKOLAS_COOPERATION_ID, 4);
htmltext = "32367-185_09.html";
}
else
{
setMemoStateEx(player, NIKOLAS_COOPERATION_ID, 1, 0);
htmltext = "32367-185_10.html";
}
}
break;
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance talker)
{
String htmltext = getNoQuestMsg(talker);
if (verifyMemoState(talker, ART_OF_PERSUASION_ID, 3) || verifyMemoState(talker, NIKOLAS_COOPERATION_ID, 3))
{
final L2PcInstance player = npc.getVariables().getObject("player0", L2PcInstance.class);
if (player == talker)
{
htmltext = "32367-01.html";
}
else
{
htmltext = "32367-02.html";
}
}
return htmltext;
}
@Override
public String onSpawn(L2Npc npc)
{
startQuestTimer("SELF_DESTRUCT_IN_60", 60000, npc, null);
broadcastNpcSay(npc, Say2.NPC_ALL, NpcStringId.INTRUDER_ALERT_THE_ALARM_WILL_SELF_DESTRUCT_IN_2_MINUTES);
final L2PcInstance player = npc.getVariables().getObject("player0", L2PcInstance.class);
if (player != null)
{
playSound(player, QuestSound.ITEMSOUND_SIREN);
}
return super.onSpawn(npc);
}
/**
* Verifies if the given player has the require memo state.
* @param player the player
* @param questId the quest ID
* @param memoState the memo state, if memo state is less than zero, only quest state is checked
* @return {@code true} if the player has the memo state, {@code false} otherwise
*/
private static final boolean verifyMemoState(L2PcInstance player, int questId, int memoState)
{
QuestState qs = null;
switch (questId)
{
case ART_OF_PERSUASION_ID:
{
qs = player.getQuestState(Q00184_ArtOfPersuasion.class.getSimpleName());
break;
}
case NIKOLAS_COOPERATION_ID:
{
qs = player.getQuestState(Q00185_NikolasCooperation.class.getSimpleName());
break;
}
}
return (qs != null) && ((memoState < 0) || qs.isMemoState(memoState));
}
/**
* Sets the memo state for the given player and quest.
* @param player the player
* @param questId the quest ID
* @param memoState the memo state
*/
private static final void setMemoState(L2PcInstance player, int questId, int memoState)
{
QuestState qs = null;
switch (questId)
{
case ART_OF_PERSUASION_ID:
{
qs = player.getQuestState(Q00184_ArtOfPersuasion.class.getSimpleName());
break;
}
case NIKOLAS_COOPERATION_ID:
{
qs = player.getQuestState(Q00185_NikolasCooperation.class.getSimpleName());
break;
}
}
if (qs != null)
{
qs.setMemoState(memoState);
}
}
/**
* Gets the memo state ex for the given player, quest and slot.
* @param player the player
* @param questId the quest ID
* @param slot the slot
* @return the memo state ex
*/
private static final int getMemoStateEx(L2PcInstance player, int questId, int slot)
{
QuestState qs = null;
switch (questId)
{
case ART_OF_PERSUASION_ID:
{
qs = player.getQuestState(Q00184_ArtOfPersuasion.class.getSimpleName());
break;
}
case NIKOLAS_COOPERATION_ID:
{
qs = player.getQuestState(Q00185_NikolasCooperation.class.getSimpleName());
break;
}
}
return (qs != null) ? qs.getMemoStateEx(slot) : -1;
}
/**
* Sets the memo state ex for the given player and quest.
* @param player the player
* @param questId the quest ID
* @param slot the slot
* @param memoStateEx the memo state ex
*/
private static final void setMemoStateEx(L2PcInstance player, int questId, int slot, int memoStateEx)
{
QuestState qs = null;
switch (questId)
{
case ART_OF_PERSUASION_ID:
{
qs = player.getQuestState(Q00184_ArtOfPersuasion.class.getSimpleName());
break;
}
case NIKOLAS_COOPERATION_ID:
{
qs = player.getQuestState(Q00185_NikolasCooperation.class.getSimpleName());
break;
}
}
if (qs != null)
{
qs.setMemoStateEx(slot, memoStateEx);
}
}
public static void main(String[] args)
{
new Alarm();
}
}

View File

@@ -0,0 +1,9 @@
<html><body>Trader Alexandria:<br><br>
Ah, you have excellent taste! This bracelet is truly unique. In fact, it is said that it contains an <font color="LEVEL">Agathion</font>. Quite a find, eh? Wondering if it is for sale? Of course it is -- that's why I'm here!<br>
Both this <font color="LEVEL">Little Angel Agathion Bracelet</font> and this <font color="LEVEL">Little Devil Agathion Bracelet</font> were discovered by another group of adventurers while exploring some ancient ruins. I am positive that they contain Agathions! Of course, no one knows for sure the power an Agathion possesses or how long it lasts. I have been reluctant to experiment on them because it's clear that some of the bracelets possess only limited magic power.<br>
Others have more, however. What you get depends on your luck, I'm afraid.<br>
To get either the angel or devil bracelet, you must bring me <font color="LEVEL">10 Fish Bones</font>, <font color="LEVEL">10 Fish Scales</font>, <font color="LEVEL">10 units of Fish Oil</font>, <font color="LEVEL">10 Fish Fins</font>, <font color="LEVEL">10 Fish Gems</font>, <font color="LEVEL">5 units of Whale Blubber</font>, and <font color="LEVEL">3,000,000 Adena</font>. I wish I could part with them in exchange for crystals as I normally would, but the adventurers who delivered the bracelets here insisted on these other items for payment.<br>
Even so, I still believe this is a reasonable price. After all, an Agathion isn't something you run across every day, eh? So, would you like to buy one?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Alexandria littleAngel">Purchase the Little Angel Agathion Bracelet</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Alexandria littleDevil">Purchase the Little Devil Agathion Bracelet</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Alexandria:<br>
Yes, I've checked the necessary items. Thank you for your hard work.<br>
I'm telling you ahead that I don't know for sure what kind of power each bracelet has. I only can tell you that the angel-engraved bracelet has an angel-type Agathion, and the devil-engraved one has a devil-type Agathion. You can find out the capability and magic power of each Agathion on your own.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Trader Alexandria:<br>
Yes, I checked the necessary items. It must have been difficult to obtain them all!<br>
I must warn you that I do not know for sure what kind of power posessed by each bracelet. I only can tell you that the Angel's Bracelet contains an angel-type Agathion, while the Devil's Bracelet contains a devil-type Agathion. You must discover the capability and magic power of each on your own.<br>
Here, please take this as an extra token of my appreciation for your business...<br>
(I have a strange feeling about that bracelet -- I hope this adventurer will simply take this and leave here immediately.)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Alexandria:<br>
Oh, you don't have the items required to buy either the Angel's Bracelet or the Devil's Bracelet. In order to obtain one, you must first bring me <font color="LEVEL">25 Big Red Nimble Fish</font>, <font color="LEVEL">50 Great Codrans</font>, and <font color="LEVEL">4 Memento Moris, 5 Earth Eggs, 5 Nonliving Nuclei, 3 Dragon Hearts</font>, and <font color="LEVEL">7,500,000 Adena</font>.
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Trader Alexandria:<br>
Welcome! Thank you so much for visiting our boutique. We sell precious and valuable things that you would never find anywhere else. We've also added some luxury accessories this time. Look around see if you can find anything you like.<br>
Ah! Now, you can use <font color="LEVEL">Adena</font> to pay for your goods.<br>
If you would like to purchase a weapon, please ask my husband.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 300984001">Purchase Armor</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 300984002">Purchase supplies</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Alexandria 30098-02.html">Purchase an Agathion Bracelet</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,147 @@
/*
* 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 ai.npc.Alexandria;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.holders.ItemHolder;
import com.l2jserver.gameserver.model.holders.QuestItemHolder;
/**
* Alexandria (Armor Merchant) AI.
* @author xban1x
*/
public final class Alexandria extends AbstractNpcAI
{
// NPC
private static final int ALEXANDRIA = 30098;
// Items
private static final ItemHolder[] REQUIRED_ITEMS = new ItemHolder[]
{
new ItemHolder(57, 3550000),
new ItemHolder(5094, 400),
new ItemHolder(6471, 200),
new ItemHolder(9814, 40),
new ItemHolder(9815, 30),
new ItemHolder(9816, 50),
new ItemHolder(9817, 50),
};
// Agathions
private static final QuestItemHolder[] LITTLE_DEVILS = new QuestItemHolder[]
{
new AdditionalQuestItemHolder(10321, 600, 1, 10408),
new QuestItemHolder(10322, 10),
new QuestItemHolder(10323, 10),
new QuestItemHolder(10324, 5),
new QuestItemHolder(10325, 5),
new QuestItemHolder(10326, 370),
};
private static final QuestItemHolder[] LITTLE_ANGELS = new QuestItemHolder[]
{
new AdditionalQuestItemHolder(10315, 600, 1, 10408),
new QuestItemHolder(10316, 10),
new QuestItemHolder(10317, 10),
new QuestItemHolder(10318, 5),
new QuestItemHolder(10319, 5),
new QuestItemHolder(10320, 370),
};
private static final Map<String, List<QuestItemHolder>> AGATHIONS = new HashMap<>();
static
{
AGATHIONS.put("littleAngel", Arrays.asList(LITTLE_ANGELS));
AGATHIONS.put("littleDevil", Arrays.asList(LITTLE_DEVILS));
}
private Alexandria()
{
super(Alexandria.class.getSimpleName(), "ai/npc");
addStartNpc(ALEXANDRIA);
addTalkId(ALEXANDRIA);
addFirstTalkId(ALEXANDRIA);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
if (event.equals("30098-02.html"))
{
htmltext = event;
}
else if (AGATHIONS.containsKey(event))
{
final int chance = getRandom(1000);
int chance2 = 0;
int chance3 = 0;
for (QuestItemHolder agathion : AGATHIONS.get(event))
{
chance3 += agathion.getChance();
if ((chance >= chance2) && (chance2 < chance3))
{
if (takeAllItems(player, REQUIRED_ITEMS))
{
giveItems(player, agathion);
htmltext = "30098-03.html";
if (agathion instanceof AdditionalQuestItemHolder)
{
giveItems(player, ((AdditionalQuestItemHolder) agathion).getAdditionalId(), 1);
htmltext = "30098-03a.html";
}
}
else
{
htmltext = "30098-04.html";
}
break;
}
chance2 += agathion.getChance();
}
}
return htmltext;
}
public static class AdditionalQuestItemHolder extends QuestItemHolder
{
private final int _additionalId;
public AdditionalQuestItemHolder(int id, int chance, long count, int additionalId)
{
super(id, chance, count);
_additionalId = additionalId;
}
public int getAdditionalId()
{
return _additionalId;
}
}
public static void main(String[] args)
{
new Alexandria();
}
}

View File

@@ -0,0 +1,10 @@
<html><body>Arena Manager:<br>
Way to go! Hooray! Hooray!!!<br>
(Be careful! CP/HP will not get recovered inside the fence.)<br><br>
<a action="bypass -h Quest ArenaManager CPrecovery">CP Recovery : 1,000 Adena</a><br>
<a action="bypass -h Quest ArenaManager HPrecovery">HP Recovery : 1,000 Adena</a><br><br>
<a action="bypass -h Quest ArenaManager Buff">Buff for Battle Ground : 2,000 Adena</a><br><br>
<a action="bypass -h npc_%objectId%_DepositP">Private Warehouse: Deposit an item.</a><br>
<a action="bypass -h npc_%objectId%_WithdrawP">Private Warehouse: Withdraw an item.</a><br><br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Arena Director:<br>
Play the game according to the rules! The loser should be silent! What? Unfair? Then, why don't you hold your tongue and give it another try!<br><br>
<a action="bypass -h Quest ArenaManager CPrecovery">CP Recovery : 1,000 Adena</a><br>
<a action="bypass -h Quest ArenaManager HPrecovery">HP Recovery : 1,000 Adena</a><br><br>
<a action="bypass -h Quest ArenaManager Buff">Buff for Battle Ground : 2,000 Adena</a><br><br>
<a action="bypass -h npc_%objectId%_DepositP">Private Warehouse: Deposit an item.</a><br>
<a action="bypass -h npc_%objectId%_WithdrawP">Private Warehouse: Withdraw an item.</a><br><br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>

View File

@@ -0,0 +1,141 @@
/*
* 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 ai.npc.ArenaManager;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
import com.l2jserver.gameserver.model.zone.ZoneId;
import com.l2jserver.gameserver.network.SystemMessageId;
/**
* Arena Manager AI.
* @author St3eT
*/
public class ArenaManager extends AbstractNpcAI
{
// NPCs
private static final int[] ARENA_MANAGER =
{
31226, // Arena Director (MDT)
31225, // Arena Manager (Coliseum)
};
// Skill
private static final SkillHolder[] BUFFS =
{
new SkillHolder(6805, 1), // Arena Empower
new SkillHolder(6806, 1), // Arena Acumen
new SkillHolder(6807, 1), // Arena Concentration
new SkillHolder(6808, 1), // Arena Might
new SkillHolder(6804, 1), // Arena Wind Walk
new SkillHolder(6812, 1), // Arena Berserker Spirit
};
private static final SkillHolder CP_RECOVERY = new SkillHolder(4380, 1); // Arena: CP Recovery
private static final SkillHolder HP_RECOVERY = new SkillHolder(6817, 1); // Arena HP Recovery
// Misc
private static final int CP_COST = 1000;
private static final int HP_COST = 1000;
private static final int BUFF_COST = 2000;
private ArenaManager()
{
super(ArenaManager.class.getSimpleName(), "ai/npc");
addStartNpc(ARENA_MANAGER);
addTalkId(ARENA_MANAGER);
addFirstTalkId(ARENA_MANAGER);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
switch (event)
{
case "CPrecovery":
{
if (player.getAdena() >= CP_COST)
{
takeItems(player, Inventory.ADENA_ID, CP_COST);
startQuestTimer("CPrecovery_delay", 2000, npc, player);
}
else
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA);
}
break;
}
case "CPrecovery_delay":
{
if ((player != null) && !player.isInsideZone(ZoneId.PVP))
{
npc.setTarget(player);
npc.doCast(CP_RECOVERY.getSkill());
}
break;
}
case "HPrecovery":
{
if (player.getAdena() >= HP_COST)
{
takeItems(player, Inventory.ADENA_ID, HP_COST);
startQuestTimer("HPrecovery_delay", 2000, npc, player);
}
else
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA);
}
break;
}
case "HPrecovery_delay":
{
if ((player != null) && !player.isInsideZone(ZoneId.PVP))
{
npc.setTarget(player);
npc.doCast(HP_RECOVERY.getSkill());
}
break;
}
case "Buff":
{
if (player.getAdena() >= BUFF_COST)
{
takeItems(player, Inventory.ADENA_ID, BUFF_COST);
npc.setTarget(player);
for (SkillHolder skill : BUFFS)
{
npc.doCast(skill.getSkill());
}
}
else
{
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA);
}
break;
}
}
return null;
}
public static void main(String[] args)
{
new ArenaManager();
}
}

View File

@@ -0,0 +1,10 @@
<html><body>Transformation Wizard Avant-Garde:<br>
I am Avant-Garde, the Transformation Wizard. I have long wandered through the land and only recently settled here.<br>
In fact, my young friend, I am not a wizard of the Ivory Tower. You look surprised! Heh. Think of me as a wanderer who acquired a special power quite by chance... My magic, however, requires some very specialized items.<br>
If you have acquired these unique items from the dark wizard in Hardin's Academy, then perhaps I can help you.<br>
<a action="bypass -h Quest AvantGarde 32323-02.html">Ask about transformation.</a><br>
<a action="bypass -h Quest AvantGarde LearnTransformationSkill">Learn transformation.</a><br>
<a action="bypass -h Quest AvantGarde BuyTransformationItems">Purchase items related to transformation.</a><br>
<a action="bypass -h Quest AvantGarde 32323-05a.html">Learn about subclass certification.</a><br>
<a action="bypass -h npc_%objectId%_Quest">Quest.</a>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Wizard of Trasformation Avant-Garde:<br>
What do you wish to know about transformation?<br>
<br>
<a action="bypass -h Quest AvantGarde 32323-02a.html">"What do I need to know about transformation?"</a><br>
<a action="bypass -h Quest AvantGarde 32323-02b.html">"What do I need to do to transform into another shape?"</a><br>
<a action="bypass -h Quest AvantGarde 32323-02c.html">"What do I need to know before transformation?"</a>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Transformation Wizard Avant-Garde:<br>
To learn the magic of transformation, you will need to receive special training.<br>
Find the Wizard of Darkness, who lives at Hardin's Academy. He will open the path to transformation.<br>
You must have reached at least <font color="LEVEL">level 50 </font> to embark on this path.<br>
You will also need a special seal. I do not know how you can obtain it, but without it transformation is impossible.<br>
<a action="bypass -h Quest AvantGarde 32323-02.html">Back.</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Transformation Wizard Avant-Garde:<br>
After you have been guided through the process of transformation by a wizard, you may transform yourself into another shape by bringing a transform sealbook to me.<br>
Know that it is no easy task to earn one. I have heard, however, that you may find one through the Marketeer of Mammon or the Adventure Guild.<br>
<a action="bypass -h Quest AvantGarde 32323-02.html">Back.</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Transformation Wizard Avant-Garde:<br>
You must remember that once you have been transformed, you must not go into <font color="LEVEL">deep water</font>. Once you have reverted to your original form, your soul will need time to recover -- you will not be able to transform again for some time. Understand?<br>
Other than that... Each individual soul contains its own <font color="LEVEL">unique character</font>. If you transform into something that matches that character, you may earn some benefits. Think of it as wearing a suit of clothes that fit you perfectly. Every race has its own respective "figure," so I advise you to do a little research about what kind of transformation would fit you best.<br>
<a action="bypass -h Quest AvantGarde 32323-02.html">Back.</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Transformation Wizard Avant-Garde:<br>
This is not a path for every one. It is meaningless for me to even teach you Transformation until you have proven your ability.<br>
Meet the great wizard who uses black magic, open the road of Transformation, and then return to me.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Transformation Wizard Avant-Garde:<br>
You must be able to transform in order to buy transformation-related goods.<br>
Find a great wizard who wields black magic and can open the path to transformation for you. Then you may return here.
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>Transformation Wizard Avant-Garde:<br>
If your subclass skill is above a certain level, you can transfer that power to your main class.<br>
Because this is a very dangerous mission, however, you must be certified in order to carry it out.<br>
If you were certified by your subclass master and have brought the certificate, I will transfer some of your subclass power to your main class.<br>
Be warned: this will inflict a serious shock to your soul. You must strengthen it in preparation for this rite.<br>
In order to learn certified subclass skills, you must first speak to Hardin and obtain the first sealbook. Hardin's Academy is in Dragon Valley.<br>
Do you wish to proceed?<br>
<a action="bypass -h Quest AvantGarde LearnSubClassSkill">Learn skills.</a><br>
<a action="bypass -h Quest AvantGarde 32323-06.html">Return.</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Transformation Wizard Avant-Garde:<br>
What do you wish to know about subclass certification?<br>
<a action="bypass -h Quest AvantGarde 32323-05.html">Learn skills of the certified subclass.</a><br>
<a action="bypass -h Quest AvantGarde 32323-05no.html">Certification removal.</a>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Transformation Wizard Avant-Garde:<br>
It is a tremendous endeavor to obtain subclass certification and learn the appropriate skills. Beyond the purely physical effort, the burden on your soul is beyond your imagination... It is almost a suicidal venture.<br>
However, the process can be undone. There is a special kind of herb that can be used to remove your previously chosen skills. The price of the herb, though, is approximately <font color="LEVEL">10 million Adena</font>... I have the herb here, so I can cancel the certification anytime once you have paid.<br>
If the certification is canceled, <font color="LEVEL">the current certification status and skills will vanish immediately -- poof!</font> Now then, do you really wish to cancel certification?<br>
<a action="bypass -h Quest AvantGarde CancelCertification">Cancel certification.</a><br>
<a action="bypass -h Quest AvantGarde 32323-06no.html">Return.</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Transformation Wizard Avant-Garde:<br>
If you want to give up, I cannot help you.<br>
To use the subclass power in the main class requires a great deal of power, after all.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Transformation Wizard Avant-Garde:<br>
An excellent decision, I think. In fact, it is very difficult to even get the herb. Since there's no one except that vicious Dark Wizard who lives in Dragon Valley who knows the technique, I didn't feel like it either...<br>
But isn't it a pity to throw away all of the skills for which you have already been certified?
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Transformation Wizard Avant-garde:<br>
A great deal of soul energy is needed to transfer subclass powers to the main class. Although you vanquished the Bridle of Soul by Mimir's Elixir, it is not so easy to practice it.<br>
To utilize the subclass power, you must be ritually cleansed by both the <font color="LEVEL">Dark Wizard and Mimir's Elixir</font>. Visit the Dark Wizard inside the Dragon Valley to obtain the magic power of transformation.<br>
Once you have learned the magic power of transformation, <font color="LEVEL">visit a subclass master</font> in order to certify your ability. Then come back to me on your main class.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Transformation Wizard Avant-Garde:<br>
To transfer the sub-class power, <font color="LEVEL">make your current class your main class and bring me either a certificate or a Scroll of Transformation</font>.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Transformation Wizard Avant-Garde:<br>
As I just told you, you need 10 million Adena.<br>
I don't see that much money on you...
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Transformation Wizard Avant-Garde:<br>
Then I have no choice...<br>
Your certifications are all canceled in exchange for <font color="LEVEL">10 million Adena</font>. However, that does not change the fact that you are very skilled. Why don't you find another master and obtain the certification you want?
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Transformation Wizard Avant-Garde:<br>
What are you going to cancel? You have neither certification nor the related skills.<br>
This herb is very rare -- unless you really need it, I would rather not use it.
</body></html>

View File

@@ -0,0 +1,338 @@
package ai.npc.AvantGarde;
import java.util.List;
import ai.npc.AbstractNpcAI;
import com.l2jserver.Config;
import com.l2jserver.gameserver.datatables.MultisellData;
import com.l2jserver.gameserver.datatables.SkillData;
import com.l2jserver.gameserver.datatables.SkillTreesData;
import com.l2jserver.gameserver.instancemanager.QuestManager;
import com.l2jserver.gameserver.model.L2SkillLearn;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.base.AcquireSkillType;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.skills.Skill;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.clientpackets.RequestAcquireSkill;
import com.l2jserver.gameserver.network.serverpackets.ExAcquirableSkillListByClass;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
import com.l2jserver.gameserver.util.Util;
import custom.Validators.SubClassSkills;
/**
* Avant-Garde AI.<br>
* Sub-Class Certification system, skill learning and certification canceling.<br>
* Transformation skill learning and transformation scroll sell.
* @author Zoey76
*/
public class AvantGarde extends AbstractNpcAI
{
// NPC
private static final int AVANT_GARDE = 32323;
// Items
// @formatter:off
private static final int[] ITEMS =
{
10280, 10281, 10282, 10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10612
};
// @formatter:on
// Misc
private static final String[] QUEST_VAR_NAMES =
{
"EmergentAbility65-",
"EmergentAbility70-",
"ClassAbility75-",
"ClassAbility80-"
};
public AvantGarde()
{
super(AvantGarde.class.getSimpleName(), "ai/npc");
addStartNpc(AVANT_GARDE);
addTalkId(AVANT_GARDE);
addFirstTalkId(AVANT_GARDE);
addAcquireSkillId(AVANT_GARDE);
}
@Override
public String onAcquireSkill(L2Npc npc, L2PcInstance player, Skill skill, AcquireSkillType type)
{
switch (type)
{
case TRANSFORM:
{
showTransformSkillList(player);
break;
}
case SUBCLASS:
{
showSubClassSkillList(player);
break;
}
}
return null;
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
switch (event)
{
case "32323-02.html":
case "32323-02a.html":
case "32323-02b.html":
case "32323-02c.html":
case "32323-05.html":
case "32323-05a.html":
case "32323-05no.html":
case "32323-06.html":
case "32323-06no.html":
{
htmltext = event;
break;
}
case "LearnTransformationSkill":
{
if (RequestAcquireSkill.canTransform(player))
{
showTransformSkillList(player);
}
else
{
htmltext = "32323-03.html";
}
break;
}
case "BuyTransformationItems":
{
if (RequestAcquireSkill.canTransform(player))
{
MultisellData.getInstance().separateAndSend(32323001, player, npc, false);
}
else
{
htmltext = "32323-04.html";
}
break;
}
case "LearnSubClassSkill":
{
if (!RequestAcquireSkill.canTransform(player))
{
htmltext = "32323-04.html";
}
if (player.isSubClassActive())
{
htmltext = "32323-08.html";
}
else
{
boolean hasItems = false;
for (int id : ITEMS)
{
if (player.getInventory().getItemByItemId(id) != null)
{
hasItems = true;
break;
}
}
if (hasItems)
{
showSubClassSkillList(player);
}
else
{
htmltext = "32323-08.html";
}
}
break;
}
case "CancelCertification":
{
if (player.getSubClasses().size() == 0)
{
htmltext = "32323-07.html";
}
else if (player.isSubClassActive())
{
htmltext = "32323-08.html";
}
else if (player.getAdena() < Config.FEE_DELETE_SUBCLASS_SKILLS)
{
htmltext = "32323-08no.html";
}
else
{
QuestState st = player.getQuestState(SubClassSkills.class.getSimpleName());
if (st == null)
{
st = QuestManager.getInstance().getQuest(SubClassSkills.class.getSimpleName()).newQuestState(player);
}
int activeCertifications = 0;
for (String varName : QUEST_VAR_NAMES)
{
for (int i = 1; i <= Config.MAX_SUBCLASS; i++)
{
String qvar = st.getGlobalQuestVar(varName + i);
if (!qvar.isEmpty() && (qvar.endsWith(";") || !qvar.equals("0")))
{
activeCertifications++;
}
}
}
if (activeCertifications == 0)
{
htmltext = "32323-10no.html";
}
else
{
for (String varName : QUEST_VAR_NAMES)
{
for (int i = 1; i <= Config.MAX_SUBCLASS; i++)
{
final String qvarName = varName + i;
final String qvar = st.getGlobalQuestVar(qvarName);
if (qvar.endsWith(";"))
{
final String skillIdVar = qvar.replace(";", "");
if (Util.isDigit(skillIdVar))
{
int skillId = Integer.parseInt(skillIdVar);
final Skill sk = SkillData.getInstance().getSkill(skillId, 1);
if (sk != null)
{
player.removeSkill(sk);
st.saveGlobalQuestVar(qvarName, "0");
}
}
else
{
_log.warning("Invalid Sub-Class Skill Id: " + skillIdVar + " for player " + player.getName() + "!");
}
}
else if (!qvar.isEmpty() && !qvar.equals("0"))
{
if (Util.isDigit(qvar))
{
final int itemObjId = Integer.parseInt(qvar);
L2ItemInstance itemInstance = player.getInventory().getItemByObjectId(itemObjId);
if (itemInstance != null)
{
player.destroyItem("CancelCertification", itemObjId, 1, player, false);
}
else
{
itemInstance = player.getWarehouse().getItemByObjectId(itemObjId);
if (itemInstance != null)
{
_log.warning("Somehow " + player.getName() + " put a certification book into warehouse!");
player.getWarehouse().destroyItem("CancelCertification", itemInstance, 1, player, false);
}
else
{
_log.warning("Somehow " + player.getName() + " deleted a certification book!");
}
}
st.saveGlobalQuestVar(qvarName, "0");
}
else
{
_log.warning("Invalid item object Id: " + qvar + " for player " + player.getName() + "!");
}
}
}
}
player.reduceAdena("Cleanse", Config.FEE_DELETE_SUBCLASS_SKILLS, npc, true);
htmltext = "32323-09no.html";
player.sendSkillList();
}
// Let's consume all certification books, even those not present in database.
for (int itemId : ITEMS)
{
L2ItemInstance item = player.getInventory().getItemByItemId(itemId);
if (item != null)
{
_log.warning(getClass().getName() + ": player " + player + " had 'extra' certification skill books while cancelling sub-class certifications!");
player.destroyItem("CancelCertificationExtraBooks", item, npc, false);
}
}
}
break;
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "32323-01.html";
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
return "32323-01.html";
}
/**
* Display the Sub-Class Skill list to the player.
* @param player the player
*/
public static void showSubClassSkillList(L2PcInstance player)
{
final List<L2SkillLearn> subClassSkills = SkillTreesData.getInstance().getAvailableSubClassSkills(player);
if (subClassSkills.isEmpty())
{
player.sendPacket(SystemMessageId.THERE_ARE_NO_OTHER_SKILLS_TO_LEARN);
}
else
{
player.sendPacket(new ExAcquirableSkillListByClass(subClassSkills, AcquireSkillType.TRANSFORM));
}
}
/**
* This displays Transformation Skill List to the player.
* @param player the active character.
*/
public static void showTransformSkillList(L2PcInstance player)
{
final List<L2SkillLearn> skills = SkillTreesData.getInstance().getAvailableTransformSkills(player);
if (skills.isEmpty())
{
final int minlevel = SkillTreesData.getInstance().getMinLevelForNewSkill(player, SkillTreesData.getInstance().getTransformSkillTree());
if (minlevel > 0)
{
// No more skills to learn, come back when you level.
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_DO_NOT_HAVE_ANY_FURTHER_SKILLS_TO_LEARN_COME_BACK_WHEN_YOU_HAVE_REACHED_LEVEL_S1);
sm.addInt(minlevel);
player.sendPacket(sm);
}
else
{
player.sendPacket(SystemMessageId.THERE_ARE_NO_OTHER_SKILLS_TO_LEARN);
}
}
else
{
player.sendPacket(new ExAcquirableSkillListByClass(skills, AcquireSkillType.TRANSFORM));
}
}
public static void main(String[] args)
{
new AvantGarde();
}
}

View File

@@ -0,0 +1,6 @@
<html><body>Black Judge:<br>
Death leaves a scar which all must bear.<br>
Do you wish it to be healed completely?<br>
Ah, I perceive that you have long been apart from this world. I am strangely heartened by your return. I will heal this wound and remove death's scar.<br>
<a action="bypass -h Quest BlackJudge remove_dp">Remove 1 level of Death Penalty (3600 Adena).</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Black Judge:<br>
Death leaves a scar which all must bear.<br>
Do you wish it to be healed completely?<br>
You have only recently begun your journey in this world, and your youth touches me. I will heal this wound and remove death's scar.<br>
<a action="bypass -h Quest BlackJudge remove_dp">Remove 1 level of Death Penalty (8640 Adena)</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Black Judge:<br>
Death leaves a scar which all must bear.<br>
Do you wish it to be healed completely?<br>
You have only begun to learn the world, and your innocence touches me. I will heal this wound and remove death's scar.<br>
<a action="bypass -h Quest BlackJudge remove_dp">Remove 1 level of Death Penalty (25200 Adena).</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Black Judge:<br>
Death leaves a scar which all must bear.<br>
Do you wish it to be healed completely?<br>
As I see you are a true adventurer, I will heal this wound and remove death's scar.<br>
<a action="bypass -h Quest BlackJudge remove_dp">Remove 1 level of Death Penalty (50400 Adena).</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Black Judge:<br>
Death leaves a scar which all must bear.<br>
Do you wish it to be healed completely?<br>
Great adventurer, I will heal this wound and remove death's scar.<br>
<a action="bypass -h Quest BlackJudge remove_dp">Remove 1 level of Death Penalty (86400 Adena)</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Black Judge:<br>
Death leaves a scar which all must bear.<br>
Do you wish it to be healed completely?<br>
Because you walk the hero's path, I will heal this wound and remove death's scar.<br>
<a action="bypass -h Quest BlackJudge remove_dp">Remove 1 level of Death Penalty (144000 Adena).</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Black Judge:<br>
The wound you have received from death's touch is too deep to be healed for the money you have to give me. Find more money if you wish death's mark to be fully removed from you.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Black Judge:<br>
You have no more death wounds that require healing.<br>
Go forth and fight, both for this world and your own glory.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Black Judge:<br>
I came to this land to save those poor souls who are contaminated by sin. We black judges do not divide good and evil by light and darkness. We help instead those with strong wills and noble souls -- whether or not they wish our help. Come, sinners, come to us . . .<br>
<a action="bypass -h Quest BlackJudge remove_info">Remove Death Penalties.</a><br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>

View File

@@ -0,0 +1,118 @@
/*
* 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 ai.npc.BlackJudge;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.datatables.SkillData;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
import com.l2jserver.gameserver.model.skills.BuffInfo;
import com.l2jserver.gameserver.model.skills.CommonSkill;
import com.l2jserver.gameserver.model.skills.Skill;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
/**
* Black Judge AI.
* @author St3eT
*/
public class BlackJudge extends AbstractNpcAI
{
// NPC
private static final int BLACK_JUDGE = 30981;
// Misc
// @formatter:off
private static final int[] COSTS =
{
3600, 8640, 25200, 50400, 86400, 144000
};
// @formatter:on
private BlackJudge()
{
super(BlackJudge.class.getSimpleName(), "ai/npc");
addStartNpc(BLACK_JUDGE);
addTalkId(BLACK_JUDGE);
addFirstTalkId(BLACK_JUDGE);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
final int level = ((player.getExpertiseLevel() < 5) ? player.getExpertiseLevel() : 5);
switch (event)
{
case "remove_info":
{
htmltext = "30981-0" + (level + 1) + ".html";
break;
}
case "remove_dp":
{
if (player.getShilensBreathDebuffLevel() > 0)
{
int cost = COSTS[level];
if (player.getAdena() >= cost)
{
takeItems(player, Inventory.ADENA_ID, cost);
final int nextLv = player.getShilensBreathDebuffLevel() - 1;
if (nextLv > 0)
{
final Skill skill = SkillData.getInstance().getSkill(CommonSkill.SHILENS_BREATH.getId(), nextLv);
if (skill != null)
{
skill.applyEffects(player, player);
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_VE_BEEN_AFFLICTED_BY_SHILEN_S_BREATH_LEVEL_S1).addInt(nextLv));
}
}
else
{
final BuffInfo buff = player.getEffectList().getBuffInfoBySkillId(CommonSkill.SHILENS_BREATH.getId());
if (buff != null)
{
player.getEffectList().remove(true, buff);
}
player.sendPacket(SystemMessageId.SHILEN_S_BREATH_HAS_BEEN_PURIFIED);
}
}
else
{
htmltext = "30981-07.html";
}
}
else
{
htmltext = "30981-08.html";
}
break;
}
}
return htmltext;
}
public static void main(String[] args)
{
new BlackJudge();
}
}

View File

@@ -0,0 +1,6 @@
<html><body>Black Marketeer of Mammon:<br>
<font color="LEVEL">[Exchange Ancient Adena for Adena]</font><br>
Enter the amount of Ancient Adena you wish to exchange.<br>
<td align=left><edit var="data1" width=100></td>
<button value="Exchange" action="bypass -h Quest BlackMarketeerOfMammon exchange $data1" back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF" width=80 height=27>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><head><body>Black Marketeer of Mammon:<br>
<font color="FF0000">[Exchange failure]</font><br>
You've entered an invalid value. Please input a correct amount.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest BlackMarketeerOfMammon 31092-01.html">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><head><body>Black Marketeer of Mammon:<br>
<font color="FF0000">[Exchange failure]</font><br>
You don't have enough of the item that you're trying to exchange.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest BlackMarketeerOfMammon 31092-01.html">Back</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Black Marketeer of Mammon:<br>
<FONT color="LEVEL">[Exchange success]</FONT><br>
Thank you! There you go! Are you satisfied now? Or do you want to exchange something else?<br>
<Button ALIGN=LEFT ICON="RETURN" action="Quest BlackMarketeerOfMammon 31092-01.html">Back</Button>
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>Black Marketeer of Mammon:<br>
The Lords of Dawn and the Revolutionary Troops of Dusk use <font color="LEVEL">Ancient Adena</font> as their currency, following in the old empire's tradition.<br>
Tradition and customs are important but they are so old... If you were to go to the market with that money in this day and age, you couldn't buy a thing.<br>
Do you have any ancient adena that you don't know what to do with? If you do, I'll exchange them for adena.<br>
Also, if your weapon has a special ability that you do not want, I can remove that, too. I dont't know why you would want to take off a special ability that's been bestowed on your weapon, but we'll do anything for adena.<br>
I have also obtained some rare goods, so stop by some time - these items aren't easy to obtain!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest BlackMarketeerOfMammon 31092-01.html">"I want to exchange Ancient Adena for Adena."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 310922002">"Can I trade black market goods?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 310922001">"I want to remove special abilities from my weapon."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,94 @@
/*
* 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 ai.npc.BlackMarketeerOfMammon;
import java.util.StringTokenizer;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
import com.l2jserver.gameserver.util.Util;
/**
* Black Marketeer of Mammon AI.
* @author St3eT
*/
public final class BlackMarketeerOfMammon extends AbstractNpcAI
{
// NPC
private static final int BLACK_MARKETEER = 31092;
private BlackMarketeerOfMammon()
{
super(BlackMarketeerOfMammon.class.getSimpleName(), "ai/npc");
addStartNpc(BLACK_MARKETEER);
addTalkId(BLACK_MARKETEER);
addFirstTalkId(BLACK_MARKETEER);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("31092-01.html"))
{
return event;
}
else if (event.startsWith("exchange"))
{
final StringTokenizer st = new StringTokenizer(event, " ");
event = st.nextToken();
if (!st.hasMoreElements())
{
return "31092-02.html";
}
final String value = st.nextToken();
if (!Util.isDigit(value))
{
return "31092-02.html";
}
final long count = Integer.parseInt(value);
final long AAcount = player.getAncientAdena();
if (count < 1)
{
return "31092-02.html";
}
if (count > AAcount)
{
return "31092-03.html";
}
takeItems(player, Inventory.ANCIENT_ADENA_ID, count);
giveAdena(player, count, false);
return "31092-04.html";
}
return super.onAdvEvent(event, npc, player);
}
public static void main(String[] args)
{
new BlackMarketeerOfMammon();
}
}

View File

@@ -0,0 +1,178 @@
/*
* 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 ai.npc.CastleAmbassador;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.model.L2Object;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.entity.Castle;
import com.l2jserver.gameserver.model.entity.Fort;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
/**
* Castle Ambassador AI.
* @author St3eT
*/
public final class CastleAmbassador extends AbstractNpcAI
{
// NPCs
// @formatter:off
private static final int[] CASTLE_AMBASSADOR =
{
36393, 36394, 36437, 36435, // Gludio
36395, 36436, 36439, 36441, // Dion
36396, 36440, 36444, 36449, 36451, // Giran
36397, 36438, 36442, 36443, 36446, // Oren
36398, 36399, 36445, 36448, // Aden
36400, 36450, // Innadril
36401, 36447, 36453, // Goddard
36433, 36452, 36454, // Rune
36434, 36455, // Schuttgart
};
// @formatter:on
private CastleAmbassador()
{
super(CastleAmbassador.class.getSimpleName(), "ai/npc");
addStartNpc(CASTLE_AMBASSADOR);
addTalkId(CASTLE_AMBASSADOR);
addFirstTalkId(CASTLE_AMBASSADOR);
addEventReceivedId(CASTLE_AMBASSADOR);
addSpawnId(CASTLE_AMBASSADOR);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (npc != null)
{
final Fort fortresss = npc.getFort();
String htmltext = null;
switch (event)
{
case "signed":
{
if (fortresss.getFortState() == 0)
{
fortresss.setFortState(2, fortresss.getCastleIdByAmbassador(npc.getId()));
cancelQuestTimer("DESPAWN", npc, null);
startQuestTimer("DESPAWN", 3000, npc, null);
htmltext = "ambassador-05.html";
}
else if (fortresss.getFortState() == 1)
{
htmltext = "ambassador-04.html";
}
break;
}
case "rejected":
{
if (fortresss.getFortState() == 0)
{
fortresss.setFortState(1, fortresss.getCastleIdByAmbassador(npc.getId()));
cancelQuestTimer("DESPAWN", npc, null);
startQuestTimer("DESPAWN", 3000, npc, null);
htmltext = "ambassador-02.html";
}
else if (fortresss.getFortState() == 2)
{
htmltext = "ambassador-02.html";
}
break;
}
case "DESPAWN":
{
if (fortresss.getFortState() == 0)
{
fortresss.setFortState(1, fortresss.getCastleIdByAmbassador(npc.getId()));
}
cancelQuestTimer("DESPAWN", npc, null);
npc.broadcastEvent("DESPAWN", 1000, null);
npc.deleteMe();
break;
}
}
if (htmltext != null)
{
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
packet.setHtml(getHtm(player.getHtmlPrefix(), htmltext));
packet.replace("%castleName%", String.valueOf(fortresss.getCastleByAmbassador(npc.getId()).getName()));
player.sendPacket(packet);
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onEventReceived(String eventName, L2Npc sender, L2Npc receiver, L2Object reference)
{
if (receiver != null)
{
receiver.deleteMe();
}
return super.onEventReceived(eventName, sender, receiver, reference);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
final Fort fortresss = npc.getFort();
final int fortOwner = fortresss.getOwnerClan() == null ? 0 : fortresss.getOwnerClan().getId();
String htmltext = null;
if (player.isClanLeader() && (player.getClan() != null) && (player.getClanId() == fortOwner))
{
htmltext = (fortresss.isBorderFortress()) ? "ambassador-01.html" : "ambassador.html";
}
else
{
htmltext = "ambassador-03.html";
}
final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
packet.setHtml(getHtm(player.getHtmlPrefix(), htmltext));
packet.replace("%castleName%", String.valueOf(fortresss.getCastleByAmbassador(npc.getId()).getName()));
player.sendPacket(packet);
return null;
}
@Override
public String onSpawn(L2Npc npc)
{
final Castle castle = npc.getFort().getCastleByAmbassador(npc.getId());
if (castle.getOwnerId() == 0)
{
npc.deleteMe();
}
else
{
startQuestTimer("DESPAWN", 3600000, npc, null);
}
return super.onSpawn(npc);
}
public static void main(String[] args)
{
new CastleAmbassador();
}
}

View File

@@ -0,0 +1,8 @@
<html><body>Ambassador of %castleName%:<br>
My master is the great ruler of %castleName% Castle. The message I am commanded to relay to you, the new possessor of this fortress, is: "Protect this territory from our enemies!"<br>
If you do not have the strength to protect this place, my master inquires whether you would care to use our clan's strength to develop your skills.<br>
<br>
<center>
<a action="bypass -h Quest CastleAmbassador rejected">"We decline. We will walk our own path."</a>
</center>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Ambassador of %castleName%:<br>
Hmm... I see that negotiations have been broken off. I must cease for now.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Ambassador of %castleName%:<br>
Impudent pup! The letter I hold may only be seen by your leader.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Ambassador of %castleName%:<br>
You have already rejected my lord's offer. Why have you now changed your mind?
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Ambassador of %castleName%:<br>
You have signed the contract. I am sure that my lord will be pleased.
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Ambassador of %castleName%:<br>
My master is the ruler of %castleName% Castle, renowned throughout the world for his wisdom and strength. To you who have gained possession of this fortress, he sends these words: "Prove your loyalty to the castle with this contract!"<br>
Unless you do so, my lord will know that your loyalty is suspect. Make your decision!<br>
<br>
<center>
<a action="bypass -h Quest CastleAmbassador signed">"Very well, I will sign the contract."</a><br>
<a action="bypass -h Quest CastleAmbassador rejected">"I need no help from people like you!"</a>
</center>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Blacksmith:<br>
Hello!<br>
We Dwarves of the Blacksmith Guild have refined our skills in order to create a greater variety of crops for our Lord.<br>
What can I do for you?<br><br>
<center>
<a action="bypass -h Quest CastleBlacksmith 35098-02.html">Manufacture a crop.</a>
</center>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>
Sure, no problem! Bring the ingredients needed and I'll create an item for you.<br>
<center>
<a action="bypass -h npc_%objectId%_multisell 350980001">Choose an item.</a>
</center>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Blacksmith:<br>
My goodness! What brings you here?<br>
We Dwarves of the Blacksmith Guild have refined our skills in order to create a greater variety of crops for our Lord.<br>
What can I do for you?<br><br>
<center>
<a action="bypass -h Quest CastleBlacksmith 35140-02.html">Manufacture a crop.</a>
</center>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>
Sure, no problem! If you bring me the ingredients I need, I'll get right on it!<br>
<center>
<a action="bypass -h npc_%objectId%_multisell 350980002">Choose an item.</a>
</center>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Blacksmith:<br>
Greetings! Is there anything I can do for you today?<br>
<center>
<a action="bypass -h Quest CastleBlacksmith 35182-02.html">Manufacture a crop.</a>
</center>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>
Certainly! If you bring me the ingredients I need I'll make it for you.<br>
What would you like?<br>
<center>
<a action="bypass -h npc_%objectId%_multisell 350980003">View the list.</a>
</center>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Blacksmith:<br>
Greetings!<br>
We Dwarves of the Blacksmith Guild have refined our skills in order to create a greater variety of crops for our Lord.<br>
What can I do for you?<br><br>
<center>
<a action="bypass -h Quest CastleBlacksmith 35224-02.html">Manufacture a crop.</a>
</center>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>
Certainly, I'd be glad to make an item for you! Bring me the ingredients I need and I'll make it immediately.<br>
<center>
<a action="bypass -h npc_%objectId%_multisell 350980004">View the list.</a>
</center>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Blacksmith:<br>
My goodness! What brings you here?<br>
We Dwarves of the Blacksmith Guild have refined our skills in order to create a greater variety of crops for our Lord.<br>
What can I do for you?<br><br>
<center>
<a action="bypass -h Quest CastleBlacksmith 35272-02.html">Manufacture a crop.</a>
</center>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>
Sure, just bring the ingredients I need and I'll make it for you right away.<br>
What would you like?<br>
<center>
<a action="bypass -h npc_%objectId%_multisell 350980005">Choose Item</a>
</center>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Blacksmith:<br>
My goodness! What brings you here?<br>
We Dwarves of the Blacksmith Guild have refined our skills in order to create a greater variety of crops for our Lord.<br>
What can I do for you?<br><br>
<center>
<a action="bypass -h Quest CastleBlacksmith 35314-02.html">Manufacture a crop.</a>
</center>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>
Certainly, I'd be glad to make an item for you! Bring me the ingredients I need and I'll make it immediately.<br>
<center>
<a action="bypass -h npc_%objectId%_multisell 350980006">View the list.</a>
</center>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Blacksmith:<br>
What brings you here?<br>
Our Blacksmiths Guild has learned a new technique, so we can use more diverse crops.<br>
Our Dwarven dexterity is truly unequaled!<br>
If you want something made, just give us the order!<br><br>
<center>
<a action="bypass -h Quest CastleBlacksmith 35361-02.html">Crop Processing</a>
</center>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>
If you provide the materials, it won't take anytime! What do you want made?<br>
<center>
<a action="bypass -h npc_%objectId%_multisell 350980007">See the list</a>
</center>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Blacksmith:<br>
What brings you to this shabby place?<br>
I've learned a new skill from our Blacksmith Guild. Now I can make what you want with various crops, my Lord!<br>
Our Dwarves are truly gifted with their hands. Ha! Oops! Pardon me, my Lord!<br>
If you want me to make something, just say the word!<br><br>
<center>
<a action="bypass -h Quest CastleBlacksmith 35507-02.html">Crop Manufacturing</a>
</center>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>
Of course! Give me the materials I need and I'll make anything you want at once!<br>
What do you want?<br>
<center>
<a action="bypass -h npc_%objectId%_multisell 350980008">Examine the List</a>
</center>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Blacksmith:<br>
What brings you to this shabby place?<br>
By the way, I've learned a new skill from our Blacksmith Guild! Now I use a wider variety of crops to make the items you need, my Lord.<br>
Our Dwarves are truly gifted with their hands.. Ha! Oops! Pardon me, my Lord.<br>
If you want me to make something for you, just ask.<br><br>
<center>
<a action="bypass -h Quest CastleBlacksmith 35553-02.html">Crop Manufacturing</a>
</center>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>
Of course! Bring me the materials I need and I'll make anything you want at once!<br>
What do you want?<br>
<center>
<a action="bypass -h npc_%objectId%_multisell 350980009">Examine the list</a>
</center>
</body></html>

View File

@@ -0,0 +1,77 @@
/*
* 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 ai.npc.CastleBlacksmith;
import ai.npc.AbstractNpcAI;
import com.l2jserver.gameserver.model.ClanPrivilege;
import com.l2jserver.gameserver.model.PcCondOverride;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
/**
* Castle Blacksmith AI.
* @author malyelfik
*/
public final class CastleBlacksmith extends AbstractNpcAI
{
// Blacksmith IDs
private static final int[] NPCS =
{
35098, // Blacksmith (Gludio)
35140, // Blacksmith (Dion)
35182, // Blacksmith (Giran)
35224, // Blacksmith (Oren)
35272, // Blacksmith (Aden)
35314, // Blacksmith (Innadril)
35361, // Blacksmith (Goddard)
35507, // Blacksmith (Rune)
35553, // Blacksmith (Schuttgart)
};
private CastleBlacksmith()
{
super(CastleBlacksmith.class.getSimpleName(), "ai/npc");
addStartNpc(NPCS);
addTalkId(NPCS);
addFirstTalkId(NPCS);
}
private boolean hasRights(L2PcInstance player, L2Npc npc)
{
return player.canOverrideCond(PcCondOverride.CASTLE_CONDITIONS) || npc.isMyLord(player) || ((player.getClanId() == npc.getCastle().getOwnerId()) && player.hasClanPrivilege(ClanPrivilege.CS_MANOR_ADMIN));
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
return (event.equalsIgnoreCase(npc.getId() + "-02.html") && hasRights(player, npc)) ? event : null;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return (hasRights(player, npc)) ? npc.getId() + "-01.html" : "no.html";
}
public static void main(String[] args)
{
new CastleBlacksmith();
}
}

View File

@@ -0,0 +1,3 @@
<html><body>Blacksmith:<br>
Leave me alone! I'm very busy!
</body></html>

View File

@@ -0,0 +1,48 @@
<html><body>
<center>
<table width=270>
<tr>
<td width=40></td>
<td width=95>Outer gate</td>
<td width=35><a action="bypass -h Quest CastleChamberlain operate_door 1 19210001 19210002">Open</a></td>
<td width=10> / </td>
<td width=50><a action="bypass -h Quest CastleChamberlain operate_door 0 19210001 19210002">Close</a></td>
<td width=40></td>
</tr>
<tr>
<td height=5></td>
</tr>
<tr>
<td></td>
<td>Inner gate</td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 1 19210005 19210006">Open</a></td>
<td> / </td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 0 19210005 19210006">Close</a></td>
<td></td>
</tr>
<tr>
<td height=5></td>
</tr>
<tr>
<td></td>
<td>Mooring place</td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 1 19210008">Open</a></td>
<td> / </td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 0 19210008">Close</a></td>
<td></td>
</tr>
<tr>
<td height=5></td>
</tr>
<tr>
<td></td>
<td>All gates</td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 1 19210001 19210002 19210005 19210006 19210008">Open</a></td>
<td> / </td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 0 19210001 19210002 19210005 19210006 19210008">Close</a></td>
<td></td>
</tr>
</table><br><br>
<a action="bypass -h Quest CastleChamberlain chamberlain-01.html">Go back</a>
</center>
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>
Reinforce castle gates:<br>
Strengthens gates and walls. Since it significantly enhances the durability of castle gates and castle walls, it is a good measure against the incursion of enemy troops into the castle.<br>
<center>
<a action="bypass -h Quest CastleChamberlain manage_doors 1 19210001 19210002">Reinforce outer castle gate.</a><br>
<a action="bypass -h Quest CastleChamberlain manage_doors 2 19210005 19210006">Reinforce inner castle gate.</a><br>
<a action="bypass -h Quest CastleChamberlain manage_doors 3 19210003 19210004">Reinforce castle walls.</a><br>
<a action="bypass -h Quest CastleChamberlain chamberlain-01.html">Back</a>
</center>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>&$556;<br><br>
<a action="bypass -h Quest CastleChamberlain goto 13000" msg="811;Front of the Gludio Castle">Front of the Gludio Castle</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13001" msg="811;Gludio Town Square">Gludio Town Square</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13002" msg="811;Front of the Shanty Fortress">Front of the Shanty Fortress</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13003" msg="811;Front of the Southern Fortress">Front of the Southern Fortress</a><br1>
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>&$556;<br><br>
<a action="bypass -h Quest CastleChamberlain goto 13000" msg="811;Front of the Gludio Castle">Front of the Gludio Castle</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13001" msg="811;Gludio Town Square">Gludio Town Square</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13002" msg="811;Front of the Shanty Fortress">Front of the Shanty Fortress</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13003" msg="811;Front of the Southern Fortress">Front of the Southern Fortress</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13004" msg="811;Ruins of Agony">Ruins of Agony - 500</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13005" msg="811;Ruins of Despair">Ruins of Despair - 500</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13006" msg="811;The Ant Nest">The Ant Nest - 500</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13007" msg="811;Windawood Manor">Windawood Manor - 500</a><br1>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body><br>
Activate the traps located in the interior of the island. Once activated, the flames do not distinguish friend from foe. Used properly, the trap is a very effective deterrent to invasion. Of course, it costs a fortune!<br><br>
<center>
<a action="bypass -h Quest CastleChamberlain manage_trap 0">Activate the trap near the entrance of the inner castle.</a><br>
<a action="bypass -h Quest CastleChamberlain manage_trap 1">Activate the trap behind the garden in the inner castle.</a><br><br>
<a action="bypass -h Quest CastleChamberlain chamberlain-01.html">Back</a>
</center>
</body></html>

View File

@@ -0,0 +1,48 @@
<html><body>
<center>
<table width=270>
<tr>
<td width=40></td>
<td width=95>Outer gate</td>
<td width=35><a action="bypass -h Quest CastleChamberlain operate_door 1 20220001 20220002">Open</a></td>
<td width=10> / </td>
<td width=50><a action="bypass -h Quest CastleChamberlain operate_door 0 20220001 20220002">Close</a></td>
<td width=40></td>
</tr>
<tr>
<td height=5></td>
</tr>
<tr>
<td></td>
<td>Inner gate</td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 1 20220005 20220006">Open</a></td>
<td> / </td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 0 20220005 20220006">Close</a></td>
<td></td>
</tr>
<tr>
<td height=5></td>
</tr>
<tr>
<td></td>
<td>Mooring place</td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 1 20220008">Open</a></td>
<td> / </td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 0 20220008">Close</a></td>
<td></td>
</tr>
<tr>
<td height=5></td>
</tr>
<tr>
<td></td>
<td>All gates</td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 1 20220001 20220002 20220005 20220006 20220008">Open</a></td>
<td> / </td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 0 20220001 20220002 20220005 20220006 20220008">Close</a></td>
<td></td>
</tr>
</table><br><br>
<a action="bypass -h Quest CastleChamberlain chamberlain-01.html">Go back</a>
</center>
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>
Reinforce castle gates:<br>
Strengthens gates and walls. Since it significantly enhances the durability of castle gates and castle walls, it is a good measure against the incursion of enemy troops into the castle.<br>
<center>
<a action="bypass -h Quest CastleChamberlain manage_doors 1 20220001 20220002">Reinforce outer castle gate.</a><br>
<a action="bypass -h Quest CastleChamberlain manage_doors 2 20220005 20220006">Reinforce inner castle gate.</a><br>
<a action="bypass -h Quest CastleChamberlain manage_doors 3 20220003 20220004">Reinforce castle walls.</a><br>
<a action="bypass -h Quest CastleChamberlain chamberlain-01.html">Back</a>
</center>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>&$556;<br><br>
<a action="bypass -h Quest CastleChamberlain goto 13008" msg="811;Front Of Dion Castle">Front Of Dion Castle</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13009" msg="811;Dion Town Square">Dion Town Square</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13010" msg="811;Front of the Hive Fortress">Front of the Hive Fortress</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13011" msg="811;Entrance to Floran Village">Entrance to Floran Village</a><br1>
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>&$556;<br><br>
<a action="bypass -h Quest CastleChamberlain goto 13008" msg="811;Front Of Dion Castle">Front Of Dion Castle</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13009" msg="811;Dion Town Square">Dion Town Square</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13010" msg="811;Front of the Hive Fortress">Front of the Hive Fortress</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13011" msg="811;Entrance to Floran Village">Entrance to Floran Village</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13012" msg="811;Cruma Marshlands">Cruma Marshlands - 500</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13013" msg="811;Fortress of Resistance">Fortress of Resistance - 500</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13014" msg="811;Plains of Dion">Plains of Dion - 500</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13015" msg="811;Tanor Canyon">Tanor Canyon - 500</a><br1>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body><br>
Activate the traps located in the interior of the island. Once activated, the flames do not distinguish friend from foe. Used properly, the trap is a very effective deterrent to invasion. Of course, it costs a fortune!<br><br>
<center>
<a action="bypass -h Quest CastleChamberlain manage_trap 0">Activate the trap near the entrance of the inner castle.</a><br>
<a action="bypass -h Quest CastleChamberlain manage_trap 1">Activate the trap behind the garden in the inner castle.</a><br><br>
<a action="bypass -h Quest CastleChamberlain chamberlain-01.html">Back</a>
</center>
</body></html>

View File

@@ -0,0 +1,48 @@
<html><body>
<center>
<table width=270>
<tr>
<td width=40></td>
<td width=95>Outer gate</td>
<td width=35><a action="bypass -h Quest CastleChamberlain operate_door 1 23220001 23220002">Open</a></td>
<td width=10> / </td>
<td width=50><a action="bypass -h Quest CastleChamberlain operate_door 0 23220001 23220002">Close</a></td>
<td width=40></td>
</tr>
<tr>
<td height=5></td>
</tr>
<tr>
<td></td>
<td>Inner gate</td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 1 23220005 23220006">Open</a></td>
<td> / </td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 0 23220005 23220006">Close</a></td>
<td></td>
</tr>
<tr>
<td height=5></td>
</tr>
<tr>
<td></td>
<td>Mooring place</td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 1 23220008">Open</a></td>
<td> / </td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 0 23220008">Close</a></td>
<td></td>
</tr>
<tr>
<td height=5></td>
</tr>
<tr>
<td></td>
<td>All gates</td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 1 23220001 23220002 23220005 23220006 23220008">Open</a></td>
<td> / </td>
<td><a action="bypass -h Quest CastleChamberlain operate_door 0 23220001 23220002 23220005 23220006 23220008">Close</a></td>
<td></td>
</tr>
</table><br><br>
<a action="bypass -h Quest CastleChamberlain chamberlain-01.html">Go back</a>
</center>
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>
Reinforce castle gates:<br>
Strengthens gates and walls. Since it significantly enhances the durability of castle gates and castle walls, it is a good measure against the incursion of enemy troops into the castle.<br>
<center>
<a action="bypass -h Quest CastleChamberlain manage_doors 1 23220001 23220002">Reinforce outer castle gate.</a><br>
<a action="bypass -h Quest CastleChamberlain manage_doors 2 23220005 23220006">Reinforce inner castle gate.</a><br>
<a action="bypass -h Quest CastleChamberlain manage_doors 3 23220003 23220004">Reinforce castle walls.</a><br>
<a action="bypass -h Quest CastleChamberlain chamberlain-01.html">Back</a>
</center>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>&$556;<br><br>
<a action="bypass -h Quest CastleChamberlain goto 13016" msg="811;Front Of Giran Castle">Front Of Giran Castle</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13017" msg="811;Giran Town Square">Giran Town Square</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13018" msg="811;Front of the Valley Fortress">Front of the Valley Fortress</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13019" msg="811;Giran Harbor">Giran Harbor</a><br1>
</body></html>

View File

@@ -0,0 +1,10 @@
<html><body>&$556;<br><br>
<a action="bypass -h Quest CastleChamberlain goto 13016" msg="811;Front Of Giran Castle">Front Of Giran Castle</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13017" msg="811;Giran Town Square">Giran Town Square</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13018" msg="811;Front of the Valley Fortress">Front of the Valley Fortress</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13019" msg="811;Giran Harbor">Giran Harbor</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13020" msg="811;Breka's Stronghold">Breka's Stronghold - 500</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13021" msg="811;Devil's Isle">Devil's Isle - 500</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13022" msg="811;Dragon Valley">Dragon Valley - 500</a><br1>
<a action="bypass -h Quest CastleChamberlain goto 13023" msg="811;Tanor Canyon">Tanor Canyon - 500</a><br1>
</body></html>

Some files were not shown because too many files have changed in this diff Show More