This commit is contained in:
MobiusDev
2016-10-20 23:40:28 +00:00
parent 7772f93f80
commit 93c43d7067
18458 changed files with 3262754 additions and 0 deletions

View File

@@ -0,0 +1,323 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.enums.InstanceReenterType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.L2Summon;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.entity.Instance;
import com.l2jmobius.gameserver.model.holders.InstanceReenterTimeHolder;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.skills.BuffInfo;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import ai.AbstractNpcAI;
/**
* Abstract class for Instances.
* @author FallenAngel
*/
public abstract class AbstractInstance extends AbstractNpcAI
{
public AbstractInstance(String name, String desc)
{
super(name, desc);
}
public AbstractInstance(String name)
{
super(name, "instances");
}
protected void enterInstance(L2PcInstance player, InstanceWorld instance, String template, int templateId)
{
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
if (world != null)
{
if (world.getTemplateId() == templateId)
{
onEnterInstance(player, world, false);
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
if (inst.isRemoveBuffEnabled())
{
handleRemoveBuffs(player, world);
}
return;
}
player.sendPacket(SystemMessageId.YOU_HAVE_ENTERED_ANOTHER_INSTANT_ZONE_THEREFORE_YOU_CANNOT_ENTER_CORRESPONDING_DUNGEON);
return;
}
if (checkConditions(player, templateId))
{
instance.setInstanceId(InstanceManager.getInstance().createDynamicInstance(template));
instance.setTemplateId(templateId);
instance.setStatus(0);
InstanceManager.getInstance().addWorld(instance);
onEnterInstance(player, instance, true);
final Instance inst = InstanceManager.getInstance().getInstance(instance.getInstanceId());
if (inst.getReenterType() == InstanceReenterType.ON_INSTANCE_ENTER)
{
handleReenterTime(instance);
}
if (inst.isRemoveBuffEnabled())
{
handleRemoveBuffs(instance);
}
if (Config.DEBUG_INSTANCES)
{
_log.info("Instance " + inst.getName() + " (" + instance.getTemplateId() + ") has been created by player " + player.getName());
}
}
}
protected void finishInstance(InstanceWorld world)
{
finishInstance(world, Config.INSTANCE_FINISH_TIME);
}
private void finishInstance(InstanceWorld world, int duration)
{
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
if (inst.getReenterType() == InstanceReenterType.ON_INSTANCE_FINISH)
{
handleReenterTime(world);
}
if (duration == 0)
{
InstanceManager.getInstance().destroyInstance(inst.getId());
}
else if (duration > 0)
{
inst.setDuration(duration);
inst.setEmptyDestroyTime(0);
}
}
protected void handleReenterTime(InstanceWorld world)
{
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
final List<InstanceReenterTimeHolder> reenterData = inst.getReenterData();
long time = -1;
for (InstanceReenterTimeHolder data : reenterData)
{
if (data.getTime() > 0)
{
time = System.currentTimeMillis() + data.getTime();
break;
}
final Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.AM_PM, data.getHour() >= 12 ? 1 : 0);
calendar.set(Calendar.HOUR, data.getHour());
calendar.set(Calendar.MINUTE, data.getMinute());
calendar.set(Calendar.SECOND, 0);
if (calendar.getTimeInMillis() <= System.currentTimeMillis())
{
calendar.add(Calendar.DAY_OF_MONTH, 1);
}
if (data.getDay() != null)
{
while (calendar.get(Calendar.DAY_OF_WEEK) != (data.getDay().getValue() + 1))
{
calendar.add(Calendar.DAY_OF_MONTH, 1);
}
}
if (time == -1)
{
time = calendar.getTimeInMillis();
}
else if (calendar.getTimeInMillis() < time)
{
time = calendar.getTimeInMillis();
}
}
if (time > 0)
{
setReenterTime(world, time);
}
}
private void handleRemoveBuffs(InstanceWorld world)
{
for (int objId : world.getAllowed())
{
final L2PcInstance player = L2World.getInstance().getPlayer(objId);
if (player != null)
{
handleRemoveBuffs(player, world);
}
}
}
protected abstract void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance);
protected boolean checkConditions(L2PcInstance player, int templateId)
{
return checkConditions(player);
}
protected boolean checkConditions(L2PcInstance player)
{
return true;
}
/**
* Spawns group of instance NPC's
* @param groupName the name of group from XML definition to spawn
* @param instanceId the instance ID
* @return list of spawned NPC's
*/
protected List<L2Npc> spawnGroup(String groupName, int instanceId)
{
return InstanceManager.getInstance().getInstance(instanceId).spawnGroup(groupName);
}
/**
* Sets reenter time for every player in the instance.
* @param world the instance
* @param time the time in milliseconds
*/
private void setReenterTime(InstanceWorld world, long time)
{
for (int objectId : world.getAllowed())
{
InstanceManager.getInstance().setInstanceTime(objectId, world.getTemplateId(), time);
final L2PcInstance player = L2World.getInstance().getPlayer(objectId);
if ((player != null) && player.isOnline())
{
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.INSTANT_ZONE_S1_S_ENTRY_HAS_BEEN_RESTRICTED_YOU_CAN_CHECK_THE_NEXT_POSSIBLE_ENTRY_TIME_BY_USING_THE_COMMAND_INSTANCEZONE).addString(InstanceManager.getInstance().getInstance(world.getInstanceId()).getName()));
}
}
if (Config.DEBUG_INSTANCES)
{
_log.info("Time restrictions has been set for player in instance ID: " + world.getInstanceId() + " (" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(time) + ")");
}
}
private void handleRemoveBuffs(L2PcInstance player, InstanceWorld world)
{
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
switch (inst.getRemoveBuffType())
{
case ALL:
{
player.stopAllEffectsExceptThoseThatLastThroughDeath();
final L2Summon pet = player.getPet();
if (pet != null)
{
pet.stopAllEffectsExceptThoseThatLastThroughDeath();
}
player.getServitors().values().forEach(L2Summon::stopAllEffectsExceptThoseThatLastThroughDeath);
break;
}
case WHITELIST:
{
for (BuffInfo info : player.getEffectList().getBuffs())
{
if (!inst.getBuffExceptionList().contains(info.getSkill().getId()))
{
info.getEffected().getEffectList().stopSkillEffects(true, info.getSkill());
}
}
for (L2Summon summon : player.getServitors().values())
{
for (BuffInfo info : summon.getEffectList().getBuffs())
{
if (!inst.getBuffExceptionList().contains(info.getSkill().getId()))
{
info.getEffected().getEffectList().stopSkillEffects(true, info.getSkill());
}
}
}
final L2Summon pet = player.getPet();
if (pet != null)
{
for (BuffInfo info : pet.getEffectList().getBuffs())
{
if (!inst.getBuffExceptionList().contains(info.getSkill().getId()))
{
info.getEffected().getEffectList().stopSkillEffects(true, info.getSkill());
}
}
}
break;
}
case BLACKLIST:
{
for (BuffInfo info : player.getEffectList().getBuffs())
{
if (inst.getBuffExceptionList().contains(info.getSkill().getId()))
{
info.getEffected().getEffectList().stopSkillEffects(true, info.getSkill());
}
}
for (L2Summon summon : player.getServitors().values())
{
for (BuffInfo info : summon.getEffectList().getBuffs())
{
if (inst.getBuffExceptionList().contains(info.getSkill().getId()))
{
info.getEffected().getEffectList().stopSkillEffects(true, info.getSkill());
}
}
}
final L2Summon pet = player.getPet();
if (pet != null)
{
for (BuffInfo info : pet.getEffectList().getBuffs())
{
if (inst.getBuffExceptionList().contains(info.getSkill().getId()))
{
info.getEffected().getEffectList().stopSkillEffects(true, info.getSkill());
}
}
}
break;
}
}
}
}

View File

@@ -0,0 +1,501 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.CavernOfThePirateCaptain;
import java.util.ArrayList;
import java.util.List;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.L2Party;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.PcCondOverride;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import instances.AbstractInstance;
/**
* Cavern Of The Pirate Captain (Day Dream) instance Zone.
* @author St3eT
*/
public final class CavernOfThePirateCaptain extends AbstractInstance
{
class CavernOfThePirateCaptainWorld extends InstanceWorld
{
final List<L2PcInstance> playersInside = new ArrayList<>();
L2Attackable _zaken;
long storeTime = 0;
boolean _is83;
int _zakenRoom;
int _blueFounded;
}
// NPCs
private static final int PATHFINDER = 32713; // Pathfinder Worker
private static final int ZAKEN_60 = 29176; // Zaken
private static final int ZAKEN_83 = 29181; // Zaken
private static final int CANDLE = 32705; // Zaken's Candle
private static final int DOLL_BLADER_60 = 29023; // Doll Blader
private static final int DOLL_BLADER_83 = 29182; // Doll Blader
private static final int VALE_MASTER_60 = 29024; // Veil Master
private static final int VALE_MASTER_83 = 29183; // Veil Master
private static final int PIRATES_ZOMBIE_60 = 29027; // Pirate Zombie
private static final int PIRATES_ZOMBIE_83 = 29185; // Pirate Zombie
private static final int PIRATES_ZOMBIE_CAPTAIN_60 = 29026; // Pirate Zombie Captain
private static final int PIRATES_ZOMBIE_CAPTAIN_83 = 29184; // Pirate Zombie Captain
// Items
private static final int VORPAL_RING = 15763; // Sealed Vorpal Ring
private static final int VORPAL_EARRING = 15764; // Sealed Vorpal Earring
// Locations
private static final Location[] ENTER_LOC =
{
new Location(52684, 219989, -3496),
new Location(52669, 219120, -3224),
new Location(52672, 219439, -3312),
};
private static final Location[] CANDLE_LOC =
{
// Floor 1
new Location(53313, 220133, -3498),
new Location(53313, 218079, -3498),
new Location(54240, 221045, -3498),
new Location(54325, 219095, -3498),
new Location(54240, 217155, -3498),
new Location(55257, 220028, -3498),
new Location(55257, 218172, -3498),
new Location(56280, 221045, -3498),
new Location(56195, 219095, -3498),
new Location(56280, 217155, -3498),
new Location(57215, 220133, -3498),
new Location(57215, 218079, -3498),
// Floor 2
new Location(53313, 220133, -3226),
new Location(53313, 218079, -3226),
new Location(54240, 221045, -3226),
new Location(54325, 219095, -3226),
new Location(54240, 217155, -3226),
new Location(55257, 220028, -3226),
new Location(55257, 218172, -3226),
new Location(56280, 221045, -3226),
new Location(56195, 219095, -3226),
new Location(56280, 217155, -3226),
new Location(57215, 220133, -3226),
new Location(57215, 218079, -3226),
// Floor 3
new Location(53313, 220133, -2954),
new Location(53313, 218079, -2954),
new Location(54240, 221045, -2954),
new Location(54325, 219095, -2954),
new Location(54240, 217155, -2954),
new Location(55257, 220028, -2954),
new Location(55257, 218172, -2954),
new Location(56280, 221045, -2954),
new Location(56195, 219095, -2954),
new Location(56280, 217155, -2954),
new Location(57215, 220133, -2954),
new Location(57215, 218079, -2954),
};
// Misc
private static final int MIN_LV_60 = 55;
private static final int MIN_LV_83 = 78;
private static final int PLAYERS_60_MIN = 9;
private static final int PLAYERS_60_MAX = 27;
private static final int PLAYERS_83_MIN = 9;
private static final int PLAYERS_83_MAX = 27;
private static final int TEMPLATE_ID_60 = 133;
private static final int TEMPLATE_ID_83 = 135;
//@formatter:off
private static final int[][] ROOM_DATA =
{
// Floor 1
{54240, 220133, -3498, 1, 3, 4, 6},
{54240, 218073, -3498, 2, 5, 4, 7},
{55265, 219095, -3498, 4, 9, 6, 7},
{56289, 220133, -3498, 8, 11, 6, 9},
{56289, 218073, -3498, 10, 12, 7, 9},
// Floor 2
{54240, 220133, -3226, 13, 15, 16, 18},
{54240, 218073, -3226, 14, 17, 16, 19},
{55265, 219095, -3226, 21, 16, 19, 18},
{56289, 220133, -3226, 20, 23, 21, 18},
{56289, 218073, -3226, 22, 24, 19, 21},
// Floor 3
{54240, 220133, -2954, 25, 27, 28, 30},
{54240, 218073, -2954, 26, 29, 28, 31},
{55265, 219095, -2954, 33, 28, 31, 30},
{56289, 220133, -2954, 32, 35, 30, 33},
{56289, 218073, -2954, 34, 36, 31, 33}
};
//@formatter:on
public CavernOfThePirateCaptain()
{
super(CavernOfThePirateCaptain.class.getSimpleName());
addStartNpc(PATHFINDER);
addTalkId(PATHFINDER);
addKillId(ZAKEN_60, ZAKEN_83);
addFirstTalkId(CANDLE);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
final CavernOfThePirateCaptainWorld curworld = (CavernOfThePirateCaptainWorld) world;
curworld._is83 = curworld.getTemplateId() == TEMPLATE_ID_83;
curworld.storeTime = System.currentTimeMillis();
if (!player.isInParty())
{
managePlayerEnter(player, curworld);
}
else if (player.getParty().isInCommandChannel())
{
for (L2PcInstance players : player.getParty().getCommandChannel().getMembers())
{
managePlayerEnter(players, curworld);
}
}
else
{
for (L2PcInstance players : player.getParty().getMembers())
{
managePlayerEnter(players, curworld);
}
}
manageNpcSpawn(curworld);
}
else
{
teleportPlayer(player, ENTER_LOC[getRandom(ENTER_LOC.length)], world.getInstanceId(), false);
}
}
private void managePlayerEnter(L2PcInstance player, CavernOfThePirateCaptainWorld world)
{
world.playersInside.add(player);
world.addAllowed(player.getObjectId());
teleportPlayer(player, ENTER_LOC[getRandom(ENTER_LOC.length)], world.getInstanceId(), false);
}
@Override
protected boolean checkConditions(L2PcInstance player, int templateId)
{
if (player.canOverrideCond(PcCondOverride.INSTANCE_CONDITIONS))
{
return true;
}
if (!player.isInParty())
{
broadcastSystemMessage(player, null, SystemMessageId.YOU_ARE_NOT_CURRENTLY_IN_A_PARTY_SO_YOU_CANNOT_ENTER, false);
return false;
}
final boolean is83 = templateId == TEMPLATE_ID_83;
final L2Party party = player.getParty();
final boolean isInCC = party.isInCommandChannel();
final List<L2PcInstance> members = isInCC ? party.getCommandChannel().getMembers() : party.getMembers();
final boolean isPartyLeader = isInCC ? party.getCommandChannel().isLeader(player) : party.isLeader(player);
if (!isPartyLeader)
{
broadcastSystemMessage(player, null, SystemMessageId.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER, false);
return false;
}
if ((members.size() < (is83 ? PLAYERS_83_MIN : PLAYERS_60_MIN)) || (members.size() > (is83 ? PLAYERS_83_MAX : PLAYERS_60_MAX)))
{
broadcastSystemMessage(player, null, SystemMessageId.YOU_CANNOT_ENTER_DUE_TO_THE_PARTY_HAVING_EXCEEDED_THE_LIMIT, false);
return false;
}
for (L2PcInstance groupMembers : members)
{
if (groupMembers.getLevel() < (is83 ? MIN_LV_83 : MIN_LV_60))
{
broadcastSystemMessage(player, groupMembers, SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY, true);
return false;
}
if (!player.isInsideRadius(groupMembers, 1000, true, true))
{
broadcastSystemMessage(player, groupMembers, SystemMessageId.C1_IS_IN_A_LOCATION_WHICH_CANNOT_BE_ENTERED_THEREFORE_IT_CANNOT_BE_PROCESSED, true);
return false;
}
if (System.currentTimeMillis() < InstanceManager.getInstance().getInstanceTime(groupMembers.getObjectId(), is83 ? TEMPLATE_ID_83 : TEMPLATE_ID_60))
{
broadcastSystemMessage(player, groupMembers, SystemMessageId.C1_MAY_NOT_RE_ENTER_YET, true);
return false;
}
}
return true;
}
private void broadcastSystemMessage(L2PcInstance player, L2PcInstance member, SystemMessageId msgId, boolean toGroup)
{
final SystemMessage sm = SystemMessage.getSystemMessage(msgId);
if (toGroup)
{
sm.addPcName(member);
if (player.getParty().isInCommandChannel())
{
player.getParty().getCommandChannel().broadcastPacket(sm);
}
else
{
player.getParty().broadcastPacket(sm);
}
}
else
{
player.broadcastPacket(sm);
}
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("enter60"))
{
enterInstance(player, new CavernOfThePirateCaptainWorld(), "CavernOfThePirateCaptainWorldDay60.xml", TEMPLATE_ID_60);
}
else if (event.equals("enter83"))
{
enterInstance(player, new CavernOfThePirateCaptainWorld(), "CavernOfThePirateCaptainWorldDay83.xml", TEMPLATE_ID_83);
}
else
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof CavernOfThePirateCaptainWorld)
{
final CavernOfThePirateCaptainWorld world = (CavernOfThePirateCaptainWorld) tmpworld;
switch (event)
{
case "BURN_BLUE":
{
if (npc.getDisplayEffect() == 0)
{
npc.setDisplayEffect(1); // Burning
startQuestTimer("BURN_BLUE2", 3000, npc, player);
if (world._blueFounded == 4)
{
startQuestTimer("SHOW_ZAKEN", 5000, npc, player);
}
}
break;
}
case "BURN_BLUE2":
{
if (npc.getDisplayEffect() == 1) // Burning
{
npc.setDisplayEffect(3); // Blue glow
}
break;
}
case "BURN_RED":
{
if (npc.getDisplayEffect() == 0)
{
npc.setDisplayEffect(1); // Burning
startQuestTimer("BURN_RED2", 3000, npc, player);
}
break;
}
case "BURN_RED2":
{
if (npc.getDisplayEffect() == 1) // Burning
{
final int room = getRoomByCandle(npc);
npc.setDisplayEffect(2); // Red glow
manageScreenMsg(world, NpcStringId.THE_CANDLES_CAN_LEAD_YOU_TO_ZAKEN_DESTROY_HIM);
spawnNpc(world._is83 ? DOLL_BLADER_83 : DOLL_BLADER_60, room, player, world);
spawnNpc(world._is83 ? VALE_MASTER_83 : VALE_MASTER_60, room, player, world);
spawnNpc(world._is83 ? PIRATES_ZOMBIE_83 : PIRATES_ZOMBIE_60, room, player, world);
spawnNpc(world._is83 ? PIRATES_ZOMBIE_CAPTAIN_83 : PIRATES_ZOMBIE_CAPTAIN_60, room, player, world);
}
break;
}
case "SHOW_ZAKEN":
{
if (world._is83)
{
manageScreenMsg(world, NpcStringId.WHO_DARES_AWAKEN_THE_MIGHTY_ZAKEN);
}
world._zaken.setInvisible(false);
world._zaken.setIsParalyzed(false);
spawnNpc(world._is83 ? DOLL_BLADER_83 : DOLL_BLADER_60, world._zakenRoom, player, world);
spawnNpc(world._is83 ? PIRATES_ZOMBIE_83 : PIRATES_ZOMBIE_60, world._zakenRoom, player, world);
spawnNpc(world._is83 ? PIRATES_ZOMBIE_CAPTAIN_83 : PIRATES_ZOMBIE_CAPTAIN_60, world._zakenRoom, player, world);
break;
}
}
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof CavernOfThePirateCaptainWorld)
{
final CavernOfThePirateCaptainWorld world = (CavernOfThePirateCaptainWorld) tmpworld;
if (npc.getId() == ZAKEN_83)
{
for (L2PcInstance playersInside : world.playersInside)
{
if ((playersInside != null) && (playersInside.getInstanceId() == world.getInstanceId()) && playersInside.isInsideRadius(npc, 1500, true, true))
{
final long time = System.currentTimeMillis() - world.storeTime;
if (time <= 300000) // 5 minutes
{
if (getRandomBoolean())
{
giveItems(playersInside, VORPAL_RING, 1);
}
}
else if (time <= 600000) // 10 minutes
{
if (getRandom(100) < 30)
{
giveItems(playersInside, VORPAL_EARRING, 1);
}
}
else if ((time <= 900000) && (getRandom(100) < 25)) // 15 minutes
{
giveItems(playersInside, VORPAL_RING, 1);
}
}
}
}
finishInstance(world);
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof CavernOfThePirateCaptainWorld)
{
final CavernOfThePirateCaptainWorld world = (CavernOfThePirateCaptainWorld) tmpworld;
final boolean isBlue = npc.getVariables().getInt("isBlue", 0) == 1;
if (npc.isScriptValue(0))
{
if (isBlue)
{
world._blueFounded++;
startQuestTimer("BURN_BLUE", 500, npc, player);
}
else
{
startQuestTimer("BURN_RED", 500, npc, player);
}
npc.setScriptValue(1);
}
}
return null;
}
private int getRoomByCandle(L2Npc npc)
{
final int candleId = npc.getVariables().getInt("candleId", 0);
for (int i = 0; i < 15; i++)
{
if ((ROOM_DATA[i][3] == candleId) || (ROOM_DATA[i][4] == candleId))
{
return i + 1;
}
}
if ((candleId == 6) || (candleId == 7))
{
return 3;
}
else if ((candleId == 18) || (candleId == 19))
{
return 8;
}
else if ((candleId == 30) || (candleId == 31))
{
return 13;
}
return 0;
}
private void manageScreenMsg(CavernOfThePirateCaptainWorld world, NpcStringId stringId)
{
for (L2PcInstance players : world.playersInside)
{
if ((players != null) && (players.getInstanceId() == world.getInstanceId()))
{
showOnScreenMsg(players, stringId, 5, 6000);
}
}
}
private L2Attackable spawnNpc(int npcId, int roomId, L2PcInstance player, CavernOfThePirateCaptainWorld world)
{
if ((player != null) && (npcId != ZAKEN_60) && (npcId != ZAKEN_83))
{
final L2Attackable mob = (L2Attackable) addSpawn(npcId, ROOM_DATA[roomId - 1][0] + getRandom(350), ROOM_DATA[roomId - 1][1] + getRandom(350), ROOM_DATA[roomId - 1][2], 0, false, 0, false, world.getInstanceId());
addAttackDesire(mob, player);
return mob;
}
return (L2Attackable) addSpawn(npcId, ROOM_DATA[roomId - 1][0], ROOM_DATA[roomId - 1][1], ROOM_DATA[roomId - 1][2], 0, false, 0, false, world.getInstanceId());
}
private void manageNpcSpawn(CavernOfThePirateCaptainWorld world)
{
final List<L2Npc> candles = new ArrayList<>();
world._zakenRoom = getRandom(1, 15);
for (int i = 0; i < 36; i++)
{
final L2Npc candle = addSpawn(CANDLE, CANDLE_LOC[i], false, 0, false, world.getInstanceId());
candle.getVariables().set("candleId", i + 1);
candles.add(candle);
}
for (int i = 3; i < 7; i++)
{
candles.get(ROOM_DATA[world._zakenRoom - 1][i] - 1).getVariables().set("isBlue", 1);
}
world._zaken = spawnNpc(world._is83 ? ZAKEN_83 : ZAKEN_60, world._zakenRoom, null, world);
world._zaken.setInvisible(true);
world._zaken.setIsParalyzed(true);
}
}

View File

@@ -0,0 +1,621 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.ChambersOfDelusion;
import java.util.Calendar;
import java.util.concurrent.ScheduledFuture;
import java.util.logging.Level;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.L2Party;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.entity.Instance;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.Earthquake;
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
import com.l2jmobius.gameserver.util.Util;
import instances.AbstractInstance;
/**
* Chambers of Delusion superclass.
* @author GKR
*/
abstract class Chamber extends AbstractInstance
{
private class CDWorld extends InstanceWorld
{
int currentRoom;
final L2Party partyInside;
final ScheduledFuture<?> _banishTask;
private ScheduledFuture<?> _roomChangeTask;
CDWorld(L2Party party)
{
currentRoom = 0;
partyInside = party;
_banishTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new BanishTask(), 60000, 60000);
}
L2Party getPartyInside()
{
return partyInside;
}
void scheduleRoomChange(boolean bossRoom)
{
final Instance inst = InstanceManager.getInstance().getInstance(getInstanceId());
final long nextInterval = bossRoom ? 60000L : (ROOM_CHANGE_INTERVAL + getRandom(ROOM_CHANGE_RANDOM_TIME)) * 1000L;
// Schedule next room change only if remaining time is enough
if ((inst.getInstanceEndTime() - System.currentTimeMillis()) > nextInterval)
{
_roomChangeTask = ThreadPoolManager.getInstance().scheduleGeneral(new ChangeRoomTask(), nextInterval - 5000);
}
}
void stopBanishTask()
{
_banishTask.cancel(true);
}
void stopRoomChangeTask()
{
_roomChangeTask.cancel(true);
}
class BanishTask implements Runnable
{
@Override
public void run()
{
final Instance inst = InstanceManager.getInstance().getInstance(getInstanceId());
if ((inst == null) || ((inst.getInstanceEndTime() - System.currentTimeMillis()) < 60000))
{
_banishTask.cancel(false);
}
else
{
for (int objId : inst.getPlayers())
{
final L2PcInstance pl = L2World.getInstance().getPlayer(objId);
if ((pl != null) && pl.isOnline() && ((partyInside == null) || !pl.isInParty() || (partyInside != pl.getParty())))
{
exitInstance(pl);
}
}
}
}
}
class ChangeRoomTask implements Runnable
{
@Override
public void run()
{
try
{
earthQuake(CDWorld.this);
Thread.sleep(5000);
changeRoom(CDWorld.this);
}
catch (Exception e)
{
_log.log(Level.WARNING, getClass().getSimpleName() + " ChangeRoomTask exception : " + e.getMessage(), e);
}
}
}
}
// Items
private static final int ENRIA = 4042;
private static final int ASOFE = 4043;
private static final int THONS = 4044;
private static final int LEONARD = 9628;
private static final int DELUSION_MARK = 15311;
// NPCs
private final int ENTRANCE_GATEKEEPER;
private final int ROOM_GATEKEEPER_FIRST;
private final int ROOM_GATEKEEPER_LAST;
private final int AENKINEL;
private final int BOX;
// Skills
private static final SkillHolder SUCCESS_SKILL = new SkillHolder(5758, 1);
private static final SkillHolder FAIL_SKILL = new SkillHolder(5376, 4);
private static final int ROOM_CHANGE_INTERVAL = 480; // 8 min
private static final int ROOM_CHANGE_RANDOM_TIME = 120; // 2 min
// Instance restart time
private static final int RESET_HOUR = 6;
private static final int RESET_MIN = 30;
// Following values vary between scripts
private final int INSTANCEID;
private final String INSTANCE_TEMPLATE;
protected Location[] ROOM_ENTER_POINTS;
// Misc
private static final String RETURN = Chamber.class.getSimpleName() + "_return";
protected Chamber(String name, String descr, int instanceId, String instanceTemplateName, int entranceGKId, int roomGKFirstId, int roomGKLastId, int aenkinelId, int boxId)
{
super(name, descr);
INSTANCEID = instanceId;
INSTANCE_TEMPLATE = instanceTemplateName;
ENTRANCE_GATEKEEPER = entranceGKId;
ROOM_GATEKEEPER_FIRST = roomGKFirstId;
ROOM_GATEKEEPER_LAST = roomGKLastId;
AENKINEL = aenkinelId;
BOX = boxId;
addStartNpc(ENTRANCE_GATEKEEPER);
addTalkId(ENTRANCE_GATEKEEPER);
for (int i = ROOM_GATEKEEPER_FIRST; i <= ROOM_GATEKEEPER_LAST; i++)
{
addStartNpc(i);
addTalkId(i);
}
addKillId(AENKINEL);
addAttackId(BOX);
addSpellFinishedId(BOX);
addEventReceivedId(BOX);
}
private boolean isBigChamber()
{
return (INSTANCEID == 131) || (INSTANCEID == 132);
}
private boolean isBossRoom(CDWorld world)
{
return world.currentRoom == (ROOM_ENTER_POINTS.length - 1);
}
@Override
protected boolean checkConditions(L2PcInstance player)
{
final L2Party party = player.getParty();
if (party == null)
{
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_NOT_CURRENTLY_IN_A_PARTY_SO_YOU_CANNOT_ENTER));
return false;
}
if (party.getLeader() != player)
{
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ONLY_A_PARTY_LEADER_CAN_MAKE_THE_REQUEST_TO_ENTER));
return false;
}
for (L2PcInstance partyMember : party.getMembers())
{
if (partyMember.getLevel() < 80)
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY);
sm.addPcName(partyMember);
party.broadcastPacket(sm);
return false;
}
if (!Util.checkIfInRange(1000, player, partyMember, true))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_IN_A_LOCATION_WHICH_CANNOT_BE_ENTERED_THEREFORE_IT_CANNOT_BE_PROCESSED);
sm.addPcName(partyMember);
party.broadcastPacket(sm);
return false;
}
if (isBigChamber() && (System.currentTimeMillis() < InstanceManager.getInstance().getInstanceTime(partyMember.getObjectId(), INSTANCEID)))
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_MAY_NOT_RE_ENTER_YET);
sm.addPcName(partyMember);
party.broadcastPacket(sm);
return false;
}
}
return true;
}
private void markRestriction(InstanceWorld world)
{
if (world instanceof CDWorld)
{
final Calendar reenter = Calendar.getInstance();
final Calendar now = Calendar.getInstance();
reenter.set(Calendar.MINUTE, RESET_MIN);
reenter.set(Calendar.HOUR_OF_DAY, RESET_HOUR);
if (reenter.before(now))
{
reenter.add(Calendar.DAY_OF_WEEK, 1);
}
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.INSTANT_ZONE_S1_S_ENTRY_HAS_BEEN_RESTRICTED_YOU_CAN_CHECK_THE_NEXT_POSSIBLE_ENTRY_TIME_BY_USING_THE_COMMAND_INSTANCEZONE);
sm.addString(InstanceManager.getInstance().getInstanceIdName(world.getTemplateId()));
// set instance reenter time for all allowed players
for (int objectId : world.getAllowed())
{
final L2PcInstance player = L2World.getInstance().getPlayer(objectId);
if ((player != null) && player.isOnline())
{
InstanceManager.getInstance().setInstanceTime(objectId, world.getTemplateId(), reenter.getTimeInMillis());
player.sendPacket(sm);
}
}
}
}
void changeRoom(CDWorld world)
{
final L2Party party = world.getPartyInside();
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
if ((party == null) || (inst == null))
{
return;
}
int newRoom = world.currentRoom;
// Do nothing, if there are raid room of Square or Tower Chamber
if (isBigChamber() && isBossRoom(world))
{
return;
}
// Teleport to raid room 10 min or lesser before instance end time for Tower and Square Chambers
else if (isBigChamber() && ((inst.getInstanceEndTime() - System.currentTimeMillis()) < 600000))
{
newRoom = ROOM_ENTER_POINTS.length - 1;
}
// 10% chance for teleport to raid room if not here already for Northern, Southern, Western and Eastern Chambers
else if (!isBigChamber() && !isBossRoom(world) && (getRandom(100) < 10))
{
newRoom = ROOM_ENTER_POINTS.length - 1;
}
else
{
while (newRoom == world.currentRoom) // otherwise teleport to another room, except current
{
newRoom = getRandom(ROOM_ENTER_POINTS.length - 1);
}
}
for (L2PcInstance partyMember : party.getMembers())
{
if (world.getInstanceId() == partyMember.getInstanceId())
{
partyMember.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
teleportPlayer(partyMember, ROOM_ENTER_POINTS[newRoom], world.getInstanceId());
}
}
world.currentRoom = newRoom;
// Do not schedule room change for Square and Tower Chambers, if raid room is reached
if (isBigChamber() && isBossRoom(world))
{
inst.setDuration((int) ((inst.getInstanceEndTime() - System.currentTimeMillis()) + 1200000)); // Add 20 min to instance time if raid room is reached
for (L2Npc npc : inst.getNpcs())
{
if (npc.getId() == ROOM_GATEKEEPER_LAST)
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.MINUTES_ARE_ADDED_TO_THE_REMAINING_TIME_IN_THE_INSTANT_ZONE));
}
}
}
else
{
world.scheduleRoomChange(false);
}
}
private void enter(CDWorld world)
{
final L2Party party = world.getPartyInside();
if (party == null)
{
return;
}
for (L2PcInstance partyMember : party.getMembers())
{
if (hasQuestItems(partyMember, DELUSION_MARK))
{
takeItems(partyMember, DELUSION_MARK, -1);
}
if (party.isLeader(partyMember))
{
giveItems(partyMember, DELUSION_MARK, 1);
}
// Save location for teleport back into main hall
partyMember.getVariables().set(RETURN, Integer.toString(partyMember.getX()) + ";" + Integer.toString(partyMember.getY()) + ";" + Integer.toString(partyMember.getZ()));
partyMember.setInstanceId(world.getInstanceId());
world.addAllowed(partyMember.getObjectId());
}
changeRoom(world);
}
void earthQuake(CDWorld world)
{
final L2Party party = world.getPartyInside();
if (party == null)
{
return;
}
for (L2PcInstance partyMember : party.getMembers())
{
if (world.getInstanceId() == partyMember.getInstanceId())
{
partyMember.sendPacket(new Earthquake(partyMember.getX(), partyMember.getY(), partyMember.getZ(), 20, 10));
}
}
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
enter((CDWorld) world);
}
else
{
teleportPlayer(player, ROOM_ENTER_POINTS[((CDWorld) world).currentRoom], world.getInstanceId());
}
}
void exitInstance(L2PcInstance player)
{
if ((player == null) || !player.isOnline() || (player.getInstanceId() == 0))
{
return;
}
final Instance inst = InstanceManager.getInstance().getInstance(player.getInstanceId());
final Location ret = inst.getExitLoc();
final String return_point = player.getVariables().getString(RETURN, null);
if (return_point != null)
{
final String[] coords = return_point.split(";");
if (coords.length == 3)
{
try
{
ret.setLocation(new Location(Integer.parseInt(coords[0]), Integer.parseInt(coords[1]), Integer.parseInt(coords[2])));
}
catch (Exception e)
{
}
}
}
teleportPlayer(player, ret, 0);
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
if (world != null)
{
world.removeAllowed(player.getObjectId());
}
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = "";
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if ((player != null) && (tmpworld != null) && (tmpworld instanceof CDWorld) && (npc.getId() >= ROOM_GATEKEEPER_FIRST) && (npc.getId() <= ROOM_GATEKEEPER_LAST))
{
final CDWorld world = (CDWorld) tmpworld;
// Change room from dialog
if (event.equals("next_room"))
{
if (player.getParty() == null)
{
htmltext = getHtm(player.getHtmlPrefix(), "scripts/instances/ChambersOfDelusion/no_party.html");
}
else if (player.getParty().getLeaderObjectId() != player.getObjectId())
{
htmltext = getHtm(player.getHtmlPrefix(), "scripts/instances/ChambersOfDelusion/no_leader.html");
}
else if (hasQuestItems(player, DELUSION_MARK))
{
takeItems(player, DELUSION_MARK, 1);
world.stopRoomChangeTask();
changeRoom(world);
}
else
{
htmltext = getHtm(player.getHtmlPrefix(), "scripts/instances/ChambersOfDelusion/no_item.html");
}
}
else if (event.equals("go_out"))
{
if (player.getParty() == null)
{
htmltext = getHtm(player.getHtmlPrefix(), "scripts/instances/ChambersOfDelusion/no_party.html");
}
else if (player.getParty().getLeaderObjectId() != player.getObjectId())
{
htmltext = getHtm(player.getHtmlPrefix(), "scripts/instances/ChambersOfDelusion/no_leader.html");
}
else
{
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
world.stopRoomChangeTask();
world.stopBanishTask();
for (L2PcInstance partyMember : player.getParty().getMembers())
{
exitInstance(partyMember);
}
inst.setEmptyDestroyTime(0);
}
}
else if (event.equals("look_party") && (player.getParty() != null) && (player.getParty() == world.getPartyInside()))
{
teleportPlayer(player, ROOM_ENTER_POINTS[world.currentRoom], world.getInstanceId(), false);
}
}
return htmltext;
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isPet, Skill skill)
{
if (!npc.isBusy() && (npc.getCurrentHp() < (npc.getMaxHp() / 10)))
{
npc.setBusy(true);
if (getRandom(100) < 25) // 25% chance to reward
{
if (getRandom(100) < 33)
{
npc.dropItem(attacker, ENRIA, (int) (3 * Config.RATE_QUEST_DROP));
}
if (getRandom(100) < 50)
{
npc.dropItem(attacker, THONS, (int) (4 * Config.RATE_QUEST_DROP));
}
if (getRandom(100) < 50)
{
npc.dropItem(attacker, ASOFE, (int) (4 * Config.RATE_QUEST_DROP));
}
if (getRandom(100) < 16)
{
npc.dropItem(attacker, LEONARD, (int) (2 * Config.RATE_QUEST_DROP));
}
npc.broadcastEvent("SCE_LUCKY", 2000, null);
npc.doCast(SUCCESS_SKILL.getSkill());
}
else
{
npc.broadcastEvent("SCE_DREAM_FIRE_IN_THE_HOLE", 2000, null);
}
}
return super.onAttack(npc, attacker, damage, isPet, skill);
}
@Override
public String onEventReceived(String eventName, L2Npc sender, L2Npc receiver, L2Object reference)
{
switch (eventName)
{
case "SCE_LUCKY":
{
receiver.setBusy(true);
receiver.doCast(SUCCESS_SKILL.getSkill());
break;
}
case "SCE_DREAM_FIRE_IN_THE_HOLE":
{
receiver.setBusy(true);
receiver.doCast(FAIL_SKILL.getSkill());
break;
}
}
return null;
}
@Override
public String onKill(L2Npc npc, L2PcInstance player, boolean isPet)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof CDWorld)
{
final CDWorld world = (CDWorld) tmpworld;
final Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
if (isBigChamber())
{
markRestriction(world); // Set reenter restriction
if ((inst.getInstanceEndTime() - System.currentTimeMillis()) > 300000)
{
inst.setDuration(300000); // Finish instance in 5 minutes
}
}
else
{
world.stopRoomChangeTask();
world.scheduleRoomChange(true);
}
inst.spawnGroup("boxes");
}
return super.onKill(npc, player, isPet);
}
@Override
public String onSpellFinished(L2Npc npc, L2PcInstance player, Skill skill)
{
if ((npc.getId() == BOX) && ((skill.getId() == 5376) || (skill.getId() == 5758)) && !npc.isDead())
{
npc.doDie(player);
}
return super.onSpellFinished(npc, player, skill);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final int npcId = npc.getId();
QuestState qs = getQuestState(player, false);
if (qs == null)
{
qs = newQuestState(player);
}
if ((npcId == ENTRANCE_GATEKEEPER) && checkConditions(player))
{
enterInstance(player, new CDWorld(player.getParty()), INSTANCE_TEMPLATE, INSTANCEID);
}
return "";
}
}

View File

@@ -0,0 +1,51 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.ChambersOfDelusion;
import com.l2jmobius.gameserver.model.Location;
/**
* Chamber of Delusion East.
* @author GKR
*/
public final class ChamberOfDelusionEast extends Chamber
{
// NPCs
private static final int ENTRANCE_GATEKEEPER = 32658;
private static final int ROOM_GATEKEEPER_FIRST = 32664;
private static final int ROOM_GATEKEEPER_LAST = 32668;
private static final int AENKINEL = 25690;
private static final int BOX = 18838;
// Misc
private static final Location[] ENTER_POINTS = new Location[]
{
new Location(-122368, -218972, -6720),
new Location(-122352, -218044, -6720),
new Location(-122368, -220220, -6720),
new Location(-121440, -218444, -6720),
new Location(-121424, -220124, -6720), // Raid room
};
private static final int INSTANCEID = 127;
private static final String INSTANCE_TEMPLATE = "ChamberOfDelusionEast.xml";
public ChamberOfDelusionEast()
{
super(ChamberOfDelusionEast.class.getSimpleName(), "instances", INSTANCEID, INSTANCE_TEMPLATE, ENTRANCE_GATEKEEPER, ROOM_GATEKEEPER_FIRST, ROOM_GATEKEEPER_LAST, AENKINEL, BOX);
ROOM_ENTER_POINTS = ENTER_POINTS;
}
}

View File

@@ -0,0 +1,51 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.ChambersOfDelusion;
import com.l2jmobius.gameserver.model.Location;
/**
* Chamber of Delusion North.
* @author GKR
*/
public final class ChamberOfDelusionNorth extends Chamber
{
// NPC's
private static final int ENTRANCE_GATEKEEPER = 32661;
private static final int ROOM_GATEKEEPER_FIRST = 32679;
private static final int ROOM_GATEKEEPER_LAST = 32683;
private static final int AENKINEL = 25693;
private static final int BOX = 18838;
// Misc
private static final Location[] ENTER_POINTS = new Location[]
{
new Location(-108976, -207772, -6720),
new Location(-108976, -206972, -6720),
new Location(-108960, -209164, -6720),
new Location(-108048, -207340, -6720),
new Location(-108048, -209020, -6720), // Raid room
};
private static final int INSTANCEID = 130; // this is the client number
private static final String INSTANCE_TEMPLATE = "ChamberOfDelusionNorth.xml";
public ChamberOfDelusionNorth()
{
super(ChamberOfDelusionNorth.class.getSimpleName(), "instances", INSTANCEID, INSTANCE_TEMPLATE, ENTRANCE_GATEKEEPER, ROOM_GATEKEEPER_FIRST, ROOM_GATEKEEPER_LAST, AENKINEL, BOX);
ROOM_ENTER_POINTS = ENTER_POINTS;
}
}

View File

@@ -0,0 +1,51 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.ChambersOfDelusion;
import com.l2jmobius.gameserver.model.Location;
/**
* Chamber of Delusion South.
* @author GKR
*/
public final class ChamberOfDelusionSouth extends Chamber
{
// NPC's
private static final int ENTRANCE_GATEKEEPER = 32660;
private static final int ROOM_GATEKEEPER_FIRST = 32674;
private static final int ROOM_GATEKEEPER_LAST = 32678;
private static final int AENKINEL = 25692;
private static final int BOX = 18838;
// Misc
private static final Location[] ENTER_POINTS = new Location[]
{
new Location(-122368, -207820, -6720),
new Location(-122368, -206940, -6720),
new Location(-122368, -209116, -6720),
new Location(-121456, -207356, -6720),
new Location(-121440, -209004, -6720), // Raid room
};
private static final int INSTANCEID = 129; // this is the client number
private static final String INSTANCE_TEMPLATE = "ChamberOfDelusionSouth.xml";
public ChamberOfDelusionSouth()
{
super(ChamberOfDelusionSouth.class.getSimpleName(), "instances", INSTANCEID, INSTANCE_TEMPLATE, ENTRANCE_GATEKEEPER, ROOM_GATEKEEPER_FIRST, ROOM_GATEKEEPER_LAST, AENKINEL, BOX);
ROOM_ENTER_POINTS = ENTER_POINTS;
}
}

View File

@@ -0,0 +1,55 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.ChambersOfDelusion;
import com.l2jmobius.gameserver.model.Location;
/**
* Chamber of Delusion Square.
* @author GKR
*/
public final class ChamberOfDelusionSquare extends Chamber
{
// NPC's
private static final int ENTRANCE_GATEKEEPER = 32662;
private static final int ROOM_GATEKEEPER_FIRST = 32684;
private static final int ROOM_GATEKEEPER_LAST = 32692;
private static final int AENKINEL = 25694;
private static final int BOX = 18820;
// Misc
private static final Location[] ENTER_POINTS = new Location[]
{
new Location(-122368, -153388, -6688),
new Location(-122368, -152524, -6688),
new Location(-120480, -155116, -6688),
new Location(-120480, -154236, -6688),
new Location(-121440, -151212, -6688),
new Location(-120464, -152908, -6688),
new Location(-122368, -154700, -6688),
new Location(-121440, -152908, -6688),
new Location(-121440, -154572, -6688), // Raid room
};
private static final int INSTANCEID = 131;
private static final String INSTANCE_TEMPLATE = "ChamberOfDelusionSquare.xml";
public ChamberOfDelusionSquare()
{
super(ChamberOfDelusionSquare.class.getSimpleName(), "instances", INSTANCEID, INSTANCE_TEMPLATE, ENTRANCE_GATEKEEPER, ROOM_GATEKEEPER_FIRST, ROOM_GATEKEEPER_LAST, AENKINEL, BOX);
ROOM_ENTER_POINTS = ENTER_POINTS;
}
}

View File

@@ -0,0 +1,55 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.ChambersOfDelusion;
import com.l2jmobius.gameserver.model.Location;
/**
* Chamber of Delusion Tower.
* @author GKR
*/
public final class ChamberOfDelusionTower extends Chamber
{
// NPC's
private static final int ENTRANCE_GATEKEEPER = 32663;
private static final int ROOM_GATEKEEPER_FIRST = 32693;
private static final int ROOM_GATEKEEPER_LAST = 32701;
private static final int AENKINEL = 25695;
private static final int BOX = 18823;
// Misc
private static final Location[] ENTER_POINTS = new Location[]
{
new Location(-108976, -153372, -6688),
new Location(-108960, -152524, -6688),
new Location(-107088, -155052, -6688),
new Location(-107104, -154236, -6688),
new Location(-108048, -151244, -6688),
new Location(-107088, -152956, -6688),
new Location(-108992, -154604, -6688),
new Location(-108032, -152892, -6688),
new Location(-108048, -154572, -6688), // Raid room
};
private static final int INSTANCEID = 132; // this is the client number
private static final String INSTANCE_TEMPLATE = "ChamberOfDelusionTower.xml";
public ChamberOfDelusionTower()
{
super(ChamberOfDelusionTower.class.getSimpleName(), "instances", INSTANCEID, INSTANCE_TEMPLATE, ENTRANCE_GATEKEEPER, ROOM_GATEKEEPER_FIRST, ROOM_GATEKEEPER_LAST, AENKINEL, BOX);
ROOM_ENTER_POINTS = ENTER_POINTS;
}
}

View File

@@ -0,0 +1,51 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.ChambersOfDelusion;
import com.l2jmobius.gameserver.model.Location;
/**
* Chamber of Delusion West.
* @author GKR
*/
public final class ChamberOfDelusionWest extends Chamber
{
// NPC's
private static final int ENTRANCE_GATEKEEPER = 32659;
private static final int ROOM_GATEKEEPER_FIRST = 32669;
private static final int ROOM_GATEKEEPER_LAST = 32673;
private static final int AENKINEL = 25691;
private static final int BOX = 18838;
// Misc
private static final Location[] ENTER_POINTS = new Location[]
{
new Location(-108960, -218892, -6720),
new Location(-108976, -218028, -6720),
new Location(-108960, -220204, -6720),
new Location(-108032, -218428, -6720),
new Location(-108032, -220140, -6720), // Raid room
};
private static final int INSTANCEID = 128; // this is the client number
private static final String INSTANCE_TEMPLATE = "ChamberOfDelusionWest.xml";
public ChamberOfDelusionWest()
{
super(ChamberOfDelusionWest.class.getSimpleName(), "instances", INSTANCEID, INSTANCE_TEMPLATE, ENTRANCE_GATEKEEPER, ROOM_GATEKEEPER_FIRST, ROOM_GATEKEEPER_LAST, AENKINEL, BOX);
ROOM_ENTER_POINTS = ENTER_POINTS;
}
}

View File

@@ -0,0 +1,3 @@
<html><body>Manager:<br>
You have already used an opportunity. There are no more.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Manager:<br>
You're not a party leader. Please bring the party leader here.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Manager:<br>
You're not a member of a party. Please join one quickly.
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Oracle Guide:<br>
Brilliant five-colored light shines forth from an aquamarine sphere. You hear a loud, dear voice:<br>
Welcome, you who have accomplished the test of the Oracle. Your contributions have led to the downfall of the Demon Balor.<br>
I am the last child of the Oracle, whose mission it is to escort you safely to the place where Parme is being kept. She is still under an evil influence, but the object you carry has the power to heal her.<br>
If you are ready to meet the priests of the Water Dragon, give me your hand.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CrystalCaverns TeleportParme">Go to meet Parme.</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Oracle Guide:<br>
Baylor is dead!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CrystalCaverns TeleportOut">Let me out!</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>[You feel a chill and hear a voice...]<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CrystalCaverns CoralGarden">Run Coral Garden.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest CrystalCaverns EmeraldSteam">Run Emerald Square/Steam Corridor</Button>
</body></html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
<html><body>Oracle Guide:<br>
I can't speak with you, while bleeding.
</body></html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
<html><body>Emperor Shunaiman:<br>
Shilen's forces gain ground with each passing day.<br>
We were stumbling backwards, but now... now I am staring down into a great chasm. What am I to do?<br>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Emperor's Guard Leon:<br>
Thank you saving Emperor Shunaiman from this crisis! <br>May the blessin's of Einhasad always go with you.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Emperor's Guard Leon:<br>
Einhasad's blessin's, friend!<br>S'not everyone who gets to go time-travelin' to go and save the old Emperor, eh? Must be made of tougher stuff than us lot... probably the food.<br>Anyways, I understand you're lookin' to get back to your time?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest DisciplesNecropolisPast">"That's right."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Disciple's Gatekeeper:<br>
You are now at the place where Shunaiman Emperor's Seal Device is installed. You hear the sounds of Anakim and Lilith grappling violently from within.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest DisciplesNecropolisPast">Open the door.</Button>
</body></html>

View File

@@ -0,0 +1,472 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.DisciplesNecropolisPast;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
import com.l2jmobius.gameserver.util.Util;
import instances.AbstractInstance;
import quests.Q00196_SevenSignsSealOfTheEmperor.Q00196_SevenSignsSealOfTheEmperor;
/**
* Disciple's Necropolis Past instance zone.
* @author Adry_85
*/
public final class DisciplesNecropolisPast extends AbstractInstance
{
// NPCs
private static final int SEAL_DEVICE = 27384;
private static final int PROMISE_OF_MAMMON = 32585;
private static final int SHUNAIMAN = 32586;
private static final int LEON = 32587;
private static final int DISCIPLES_GATEKEEPER = 32657;
private static final int LILITH = 32715;
private static final int LILITHS_STEWARD = 32716;
private static final int LILITHS_ELITE = 32717;
private static final int ANAKIM = 32718;
private static final int ANAKIMS_GUARDIAN = 32719;
private static final int ANAKIMS_GUARD = 32720;
private static final int ANAKIMS_EXECUTOR = 32721;
private static final int LILIM_BUTCHER = 27371;
private static final int LILIM_MAGUS = 27372;
private static final int LILIM_KNIGHT_ERRANT = 27373;
private static final int SHILENS_EVIL_THOUGHTS1 = 27374;
private static final int SHILENS_EVIL_THOUGHTS2 = 27375;
private static final int LILIM_KNIGHT = 27376;
private static final int LILIM_SLAYER = 27377;
private static final int LILIM_GREAT_MAGUS = 27378;
private static final int LILIM_GUARD_KNIGHT = 27379;
// Items
private static final int SACRED_SWORD_OF_EINHASAD = 15310;
private static final int SEAL_OF_BINDING = 13846;
// Skills
private static final SkillHolder SEAL_ISOLATION = new SkillHolder(5980, 3);
private static final Map<Integer, SkillHolder> SKILLS = new HashMap<>();
static
{
SKILLS.put(32715, new SkillHolder(6187, 1)); // Presentation - Lilith Battle
SKILLS.put(32716, new SkillHolder(6188, 1)); // Presentation - Lilith's Steward Battle1
SKILLS.put(32717, new SkillHolder(6190, 1)); // Presentation - Lilith's Bodyguards Battle1
SKILLS.put(32718, new SkillHolder(6191, 1)); // Presentation - Anakim Battle
SKILLS.put(32719, new SkillHolder(6192, 1)); // Presentation - Anakim's Guardian Battle1
SKILLS.put(32720, new SkillHolder(6194, 1)); // Presentation - Anakim's Guard Battle
SKILLS.put(32721, new SkillHolder(6195, 1)); // Presentation - Anakim's Executor Battle
}
// Locations
private static final Location ENTER = new Location(-89554, 216078, -7488, 0, 0);
private static final Location EXIT = new Location(171895, -17501, -4903, 0, 0);
// NpcStringId
private static final NpcStringId[] LILITH_SHOUT =
{
NpcStringId.HOW_DARE_YOU_TRY_TO_CONTEND_AGAINST_ME_IN_STRENGTH_RIDICULOUS,
NpcStringId.ANAKIM_IN_THE_NAME_OF_GREAT_SHILEN_I_WILL_CUT_YOUR_THROAT,
NpcStringId.YOU_CANNOT_BE_THE_MATCH_OF_LILITH_I_LL_TEACH_YOU_A_LESSON
};
// Misc
private static final int TEMPLATE_ID = 112;
private static final int DOOR_1 = 17240102;
private static final int DOOR_2 = 17240104;
private static final int DOOR_3 = 17240106;
private static final int DOOR_4 = 17240108;
private static final int DOOR_5 = 17240110;
private static final int DISCIPLES_NECROPOLIS_DOOR = 17240111;
private static final Map<Integer, Location> LILITH_SPAWN = new HashMap<>();
private static final Map<Integer, Location> ANAKIM_SPAWN = new HashMap<>();
static
{
LILITH_SPAWN.put(LILITH, new Location(-83175, 217021, -7504, 49151));
LILITH_SPAWN.put(LILITHS_STEWARD, new Location(-83327, 216938, -7492, 50768));
LILITH_SPAWN.put(LILITHS_ELITE, new Location(-83003, 216909, -7492, 4827));
ANAKIM_SPAWN.put(ANAKIM, new Location(-83179, 216479, -7504, 16384));
ANAKIM_SPAWN.put(ANAKIMS_GUARDIAN, new Location(-83321, 216507, -7492, 16166));
ANAKIM_SPAWN.put(ANAKIMS_GUARD, new Location(-83086, 216519, -7495, 15910));
ANAKIM_SPAWN.put(ANAKIMS_EXECUTOR, new Location(-83031, 216604, -7492, 17071));
}
class DNPWorld extends InstanceWorld
{
final List<L2Npc> anakimGroup = new ArrayList<>();
final List<L2Npc> lilithGroup = new ArrayList<>();
int countKill = 0;
}
public DisciplesNecropolisPast()
{
super(DisciplesNecropolisPast.class.getSimpleName());
addAttackId(SEAL_DEVICE);
addFirstTalkId(SHUNAIMAN, LEON, DISCIPLES_GATEKEEPER);
addKillId(LILIM_BUTCHER, LILIM_MAGUS, LILIM_KNIGHT_ERRANT, LILIM_KNIGHT, SHILENS_EVIL_THOUGHTS1, SHILENS_EVIL_THOUGHTS2, LILIM_SLAYER, LILIM_GREAT_MAGUS, LILIM_GUARD_KNIGHT);
addAggroRangeEnterId(LILIM_BUTCHER, LILIM_MAGUS, LILIM_KNIGHT_ERRANT, LILIM_KNIGHT, SHILENS_EVIL_THOUGHTS1, SHILENS_EVIL_THOUGHTS2, LILIM_SLAYER, LILIM_GREAT_MAGUS, LILIM_GUARD_KNIGHT);
addSpawnId(SEAL_DEVICE);
addStartNpc(PROMISE_OF_MAMMON);
addTalkId(PROMISE_OF_MAMMON, SHUNAIMAN, LEON, DISCIPLES_GATEKEEPER);
}
private void spawnNPC(DNPWorld world)
{
for (Map.Entry<Integer, Location> entry : LILITH_SPAWN.entrySet())
{
final L2Npc npc = addSpawn(entry.getKey(), entry.getValue(), false, 0, false, world.getInstanceId());
world.lilithGroup.add(npc);
}
for (Map.Entry<Integer, Location> entry : ANAKIM_SPAWN.entrySet())
{
final L2Npc enpc = addSpawn(entry.getKey(), entry.getValue(), false, 0, false, world.getInstanceId());
world.anakimGroup.add(enpc);
}
}
private synchronized void checkDoors(L2Npc npc, DNPWorld world)
{
world.countKill++;
switch (world.countKill)
{
case 4:
{
openDoor(DOOR_1, world.getInstanceId());
break;
}
case 10:
{
openDoor(DOOR_2, world.getInstanceId());
break;
}
case 18:
{
openDoor(DOOR_3, world.getInstanceId());
break;
}
case 28:
{
openDoor(DOOR_4, world.getInstanceId());
break;
}
case 40:
{
openDoor(DOOR_5, world.getInstanceId());
break;
}
}
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
spawnNPC((DNPWorld) world);
world.addAllowed(player.getObjectId());
}
teleportPlayer(player, ENTER, world.getInstanceId());
}
private void makeCast(L2Npc npc, List<L2Npc> targets)
{
npc.setTarget(targets.get(getRandom(targets.size())));
if (SKILLS.containsKey(npc.getId()))
{
npc.doCast(SKILLS.get(npc.getId()).getSkill());
}
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof DNPWorld)
{
final DNPWorld world = (DNPWorld) tmpworld;
switch (event)
{
case "FINISH":
{
if (getQuestItemsCount(player, SEAL_OF_BINDING) >= 4)
{
player.showQuestMovie(13);
startQuestTimer("TELEPORT", 27000, null, player);
}
break;
}
case "TELEPORT":
{
player.teleToLocation(ENTER, 0);
break;
}
case "FIGHT":
{
for (L2Npc caster : world.anakimGroup)
{
if ((caster != null) && !caster.isCastingNow())
{
makeCast(caster, world.lilithGroup);
}
if ((caster != null) && (caster.getId() == ANAKIM))
{
if (caster.isScriptValue(0))
{
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.YOU_SUCH_A_FOOL_THE_VICTORY_OVER_THIS_WAR_BELONGS_TO_SHILEN));
caster.setScriptValue(1);
}
else if (getRandom(100) < 10)
{
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), LILITH_SHOUT[getRandom(3)]));
}
}
}
for (L2Npc caster : world.lilithGroup)
{
if ((caster != null) && !caster.isCastingNow())
{
makeCast(caster, world.anakimGroup);
}
if ((caster != null) && (caster.getId() == 32715))
{
if (caster.isScriptValue(0))
{
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.FOR_THE_ETERNITY_OF_EINHASAD));
if (Util.checkIfInRange(2000, caster, player, true))
{
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.MY_POWER_S_WEAKENING_HURRY_AND_TURN_ON_THE_SEALING_DEVICE));
}
caster.setScriptValue(1);
}
else if (getRandom(100) < 10)
{
switch (getRandom(3))
{
case 0:
{
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.DEAR_SHILLIEN_S_OFFSPRINGS_YOU_ARE_NOT_CAPABLE_OF_CONFRONTING_US));
if (Util.checkIfInRange(2000, caster, player, true))
{
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.ALL_4_SEALING_DEVICES_MUST_BE_TURNED_ON));
}
break;
}
case 1:
{
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.I_LL_SHOW_YOU_THE_REAL_POWER_OF_EINHASAD));
if (Util.checkIfInRange(2000, caster, player, true))
{
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.LILITH_ATTACK_IS_GETTING_STRONGER_GO_AHEAD_AND_TURN_IT_ON));
}
break;
}
case 2:
{
caster.broadcastPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_SHOUT, caster.getId(), NpcStringId.DEAR_MILITARY_FORCE_OF_LIGHT_GO_DESTROY_THE_OFFSPRINGS_OF_SHILLIEN));
if (Util.checkIfInRange(2000, caster, player, true))
{
player.sendPacket(new NpcSay(caster.getObjectId(), ChatType.NPC_WHISPER, caster.getId(), NpcStringId.DEAR_S1_GIVE_ME_MORE_STRENGTH).addStringParameter(player.getName()));
}
break;
}
}
}
}
startQuestTimer("FIGHT", 1000, null, player);
}
break;
}
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon)
{
switch (npc.getId())
{
case LILIM_BUTCHER:
case LILIM_GUARD_KNIGHT:
{
if (npc.isScriptValue(0))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THIS_PLACE_ONCE_BELONGED_TO_LORD_SHILEN));
npc.setScriptValue(1);
}
break;
}
case LILIM_MAGUS:
case LILIM_GREAT_MAGUS:
{
if (npc.isScriptValue(0))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.WHO_DARES_ENTER_THIS_PLACE));
npc.setScriptValue(1);
}
break;
}
case LILIM_KNIGHT_ERRANT:
case LILIM_KNIGHT:
{
if (npc.isScriptValue(0))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THOSE_WHO_ARE_AFRAID_SHOULD_GET_AWAY_AND_THOSE_WHO_ARE_BRAVE_SHOULD_FIGHT));
npc.setScriptValue(1);
}
break;
}
case LILIM_SLAYER:
{
if (npc.isScriptValue(0))
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_NOW));
npc.setScriptValue(1);
}
break;
}
}
return super.onAggroRangeEnter(npc, player, isSummon);
}
@Override
public String onAttack(L2Npc npc, L2PcInstance player, int damage, boolean isSummon)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof DNPWorld)
{
if (npc.isScriptValue(0) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.1)))
{
giveItems(player, SEAL_OF_BINDING, 1);
player.sendPacket(SystemMessageId.THE_SEALING_DEVICE_GLITTERS_AND_MOVES_ACTIVATION_COMPLETE_NORMALLY);
npc.setScriptValue(1);
startQuestTimer("FINISH", 1000, npc, player);
cancelQuestTimer("FIGHT", npc, player);
}
if (getRandom(100) < 50)
{
npc.doCast(SEAL_ISOLATION.getSkill());
}
}
return super.onAttack(npc, player, damage, isSummon);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return npc.getId() + ".htm";
}
@Override
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof DNPWorld)
{
checkDoors(npc, (DNPWorld) tmpworld);
}
switch (npc.getId())
{
case LILIM_MAGUS:
case LILIM_GREAT_MAGUS:
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LORD_SHILEN_SOME_DAY_YOU_WILL_ACCOMPLISH_THIS_MISSION));
break;
}
case LILIM_KNIGHT_ERRANT:
case LILIM_KNIGHT:
case LILIM_GUARD_KNIGHT:
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.WHY_ARE_YOU_GETTING_IN_OUR_WAY));
break;
}
case LILIM_SLAYER:
{
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.FOR_SHILEN));
break;
}
}
return super.onKill(npc, player, isSummon);
}
@Override
public final String onSpawn(L2Npc npc)
{
npc.setIsMortal(false);
return super.onSpawn(npc);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
final QuestState qs = talker.getQuestState(Q00196_SevenSignsSealOfTheEmperor.class.getSimpleName());
String htmltext = getNoQuestMsg(talker);
if (qs == null)
{
return htmltext;
}
switch (npc.getId())
{
case PROMISE_OF_MAMMON:
{
if (qs.isCond(3) || qs.isCond(4))
{
enterInstance(talker, new DNPWorld(), "DisciplesNecropolisPast.xml", TEMPLATE_ID);
return "";
}
break;
}
case LEON:
{
if (qs.getCond() >= 3)
{
takeItems(talker, SACRED_SWORD_OF_EINHASAD, -1);
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(talker);
world.removeAllowed(talker.getObjectId());
talker.teleToLocation(EXIT, 0);
htmltext = "32587-01.html";
}
break;
}
case DISCIPLES_GATEKEEPER:
{
if (qs.getCond() >= 3)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if (tmpworld instanceof DNPWorld)
{
final DNPWorld world = (DNPWorld) tmpworld;
openDoor(DISCIPLES_NECROPOLIS_DOOR, world.getInstanceId());
talker.showQuestMovie(12);
startQuestTimer("FIGHT", 1000, null, talker);
}
}
break;
}
}
return htmltext;
}
}

View File

@@ -0,0 +1,5 @@
<html><body>Abyssal Saintess Elcadia:<br>
Ugh. I'm already bored... How hard is it to find a competent adventurer?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ElcadiasTent">I like to go outside.</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Gruff-looking Man:<br>
I thought long and hard, but nothing comes to mind that you should be here for. Go back. Look around for something else that you should do now.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Gruff-looking Man:<br>
Maybe you should just leave now. Before you bother me...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest ElcadiasTent">I'm here on business.</Button>
</body></html>

View File

@@ -0,0 +1,100 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.ElcadiasTent;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import instances.AbstractInstance;
import quests.Q10292_SevenSignsGirlOfDoubt.Q10292_SevenSignsGirlOfDoubt;
import quests.Q10293_SevenSignsForbiddenBookOfTheElmoreAdenKingdom.Q10293_SevenSignsForbiddenBookOfTheElmoreAdenKingdom;
import quests.Q10294_SevenSignsToTheMonasteryOfSilence.Q10294_SevenSignsToTheMonasteryOfSilence;
import quests.Q10296_SevenSignsPowerOfTheSeal.Q10296_SevenSignsPowerOfTheSeal;
/**
* Elcadia's Tent instance zone.
* @author Adry_85
*/
public final class ElcadiasTent extends AbstractInstance
{
// NPCs
private static final int ELCADIA = 32784;
private static final int GRUFF_LOOKING_MAN = 32862;
// Locations
private static final Location START_LOC = new Location(89706, -238074, -9632, 0, 0);
private static final Location EXIT_LOC = new Location(43316, -87986, -2832, 0, 0);
// Misc
private static final int TEMPLATE_ID = 158;
class ETWorld extends InstanceWorld
{
}
public ElcadiasTent()
{
super(ElcadiasTent.class.getSimpleName());
addFirstTalkId(GRUFF_LOOKING_MAN, ELCADIA);
addStartNpc(GRUFF_LOOKING_MAN, ELCADIA);
addTalkId(GRUFF_LOOKING_MAN, ELCADIA);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
if (npc.getId() == GRUFF_LOOKING_MAN)
{
final QuestState GirlOfDoubt = talker.getQuestState(Q10292_SevenSignsGirlOfDoubt.class.getSimpleName());
final QuestState ForbiddenBook = talker.getQuestState(Q10293_SevenSignsForbiddenBookOfTheElmoreAdenKingdom.class.getSimpleName());
final QuestState Monastery = talker.getQuestState(Q10294_SevenSignsToTheMonasteryOfSilence.class.getSimpleName());
final QuestState PowerOfSeal = talker.getQuestState(Q10296_SevenSignsPowerOfTheSeal.class.getSimpleName());
if (((GirlOfDoubt != null) && GirlOfDoubt.isStarted()) //
|| ((GirlOfDoubt != null) && GirlOfDoubt.isCompleted() && (ForbiddenBook == null)) //
|| ((ForbiddenBook != null) && ForbiddenBook.isStarted()) //
|| ((ForbiddenBook != null) && ForbiddenBook.isCompleted() && (Monastery == null)) //
|| ((PowerOfSeal != null) && PowerOfSeal.isStarted()))
{
enterInstance(talker, new ETWorld(), "ElcadiasTent.xml", TEMPLATE_ID);
}
else
{
return "32862-01.html";
}
}
else
{
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(talker);
world.removeAllowed(talker.getObjectId());
talker.setInstanceId(0);
talker.teleToLocation(EXIT_LOC);
}
return super.onTalk(npc, talker);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
}
teleportPlayer(player, START_LOC, world.getInstanceId(), false);
}
}

View File

@@ -0,0 +1,90 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.FaeronTrainingGrounds1;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import quests.Q10735_ASpecialPower.Q10735_ASpecialPower;
/**
* Fearon Training Grounds Instance Zone.
* @author Sdw
*/
public final class FaeronTrainingGrounds1 extends AbstractInstance
{
// NPCs
private static final int AYANTHE = 33942;
private static final int AYANTHE_2 = 33944;
// Locations
private static final Location START_LOC = new Location(-74903, 240618, -3584);
private static final Location EXIT_LOC = new Location(-82088, 249880, -3392);
// Misc
private static final int TEMPLATE_ID = 251;
class FTGWorld extends InstanceWorld
{
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = player.getQuestState(Q10735_ASpecialPower.class.getSimpleName());
if (qs == null)
{
return null;
}
if (event.equals("enter_instance"))
{
enterInstance(player, new FTGWorld(), "FaeronTrainingGrounds1.xml", TEMPLATE_ID);
}
else if (event.equals("exit_instance"))
{
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
world.removeAllowed(player.getObjectId());
teleportPlayer(player, EXIT_LOC, 0);
}
return super.onAdvEvent(event, npc, player);
}
public FaeronTrainingGrounds1()
{
super(FaeronTrainingGrounds1.class.getSimpleName());
addStartNpc(AYANTHE, AYANTHE_2);
addTalkId(AYANTHE, AYANTHE_2);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
showOnScreenMsg(player, NpcStringId.TALK_TO_MAGISTER_AYANTHE, ExShowScreenMessage.TOP_CENTER, 4500);
}
teleportPlayer(player, START_LOC, world.getInstanceId());
}
}

View File

@@ -0,0 +1,90 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.FaeronTrainingGrounds2;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import quests.Q10736_ASpecialPower.Q10736_ASpecialPower;
/**
* Fearon Training Grounds Instance Zone.
* @author Sdw
*/
public final class FaeronTrainingGrounds2 extends AbstractInstance
{
// NPCs
private static final int KATALIN = 33943;
private static final int KATALIN_2 = 33945;
// Locations
private static final Location START_LOC = new Location(-74903, 240618, -3584);
private static final Location EXIT_LOC = new Location(-82088, 249880, -3392);
// Misc
private static final int TEMPLATE_ID = 252;
class FTGWorld extends InstanceWorld
{
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = player.getQuestState(Q10736_ASpecialPower.class.getSimpleName());
if (qs == null)
{
return null;
}
if (event.equals("enter_instance"))
{
enterInstance(player, new FTGWorld(), "FaeronTrainingGrounds2.xml", TEMPLATE_ID);
}
else if (event.equals("exit_instance"))
{
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
world.removeAllowed(player.getObjectId());
teleportPlayer(player, EXIT_LOC, 0);
}
return super.onAdvEvent(event, npc, player);
}
public FaeronTrainingGrounds2()
{
super(FaeronTrainingGrounds2.class.getSimpleName());
addStartNpc(KATALIN, KATALIN_2);
addTalkId(KATALIN, KATALIN_2);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
showOnScreenMsg(player, NpcStringId.TALK_TO_MASTER_KATALIN, ExShowScreenMessage.TOP_CENTER, 4500);
}
teleportPlayer(player, START_LOC, world.getInstanceId());
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
<html><body>Kain Van Halter:<br>
You're Ertheia. Child of the wind. Why would you try to kill Giselle all the way out here?<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance 33979-02.html">"I didn't know that it was Giselle. She attacked first!"</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Kain Van Halter:<br>
That's not a good reason. The fact that you came all the way here alone is suspicious.<br>
You were after Giselle's life in the first place!<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance 33979-03.html">"I have Queen Navari's Mark."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Kain Van Halter:<br>
The Queen of Ertheia sent you?<br>
All right, then. Since Giselle became very aggressive after becoming a vampire, I will take your word on your dispute.<br>
But what brings you all the way here? Why were you looking for Giselle? I can't imagine Ertheia having business with her.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance 33979-04.html">"I was looking for you."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Kain Van Halter:<br>
Me?<br>
What do you want with a wanderer like me? And I don't see why I should even help you. You tried to harm my sister! Good thing I stopped by to check on her.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance 33979-05.html">"It's about the Prophecy Machine."</button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Kain Van Halter:<br>
Prophecy Machine?<br>What about the Prophecy Machine?<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance 33979-06.html">"Here, take a look."</button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Kain Van Halter:<br>
<center><font color="LEVEL">A red river flows...hard frost upon the earth...<br1>
One of half-noble blood,<br1>descending with the winds to deliver from...<br1>
When joined by one...<br1>The path will open to the Grail.</font></center><br1>
So why are you showing me this?<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance 33979-07.html">"I know that you're interested in the Grail."</button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Kain Van Halter:<br>
I see. Did Karla tell you? So she still remembers me mentioning the Grail that day.<br>
Check this out first.<br><Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance 33979-08.html">"This?"</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Kain Van Halter:<br>
Surprised? I found it while passing Goddard Territory.<br>
This looks similar to the Prophecy Machine that you showed me. It's probably a part of the whole.<br>
And about what's written on your machine... I think I know what it's saying.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance 33979-09.html">"Do tell."</button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Kain Van Halter:<br>
<font color="LEVEL">A red river flows...Hm. I think I can see where this is going.</font><br>
It's talking about this continent. A red river flows...hard frost upon the earth. You see, <font color="LEVEL">Elmore</font> rules over a cold part of the land, which it once shared with Aden as Elmoreden. Now the whole continent is swarming with Shilen's bloody works.<br>
But this part is surprising. When joined by one...the path will open to the Grail. Truly?<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance 33979-10.html">"Who is this one?"</button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Kain Van Halter:<br>
<font color="LEVEL">One of half-noble blood...</font><br>
Ha! Even the prophecy of Ertheia describes me so, huh? Well, it's right. My mother was a commoner. A tragic farce, to be loved by the king! So here I am, a prince only in name. And descending with the winds to deliver from...yes, that is me. I happened to save Faeron once. <font color="LEVEL">Kain</font> is your man!<br>
The <font color="LEVEL">Grail</font>...if it's the same <font color="LEVEL">Grail</font>, then...anyway, you can read the rest of the prophecy with the fragment that I found, right?<br>
Take it. Your village needs it more than I.<br>Hmm? Wait...<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance 33979-11.html">"What?"</button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Kain Van Halter:<br>
Who is that person standing there?
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Kain Van Halter:<br>
You trespass on the land of death. Who are you?<br1>
No matter. You threatened Giselle with harm, and you will answer to me!<br>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h Quest FortressOfTheDeadInstance">Quest</button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mysterious Wizard:<br>
I was just worried about you.<br>I guess I was worried that a small Ertheia was led by the souls of the dead to somewhere. <br>
But it seems I picked the wrong time.<br><Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance exit_instance">"What do you mean?"</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Mysterious Wizard:<br>
It seems nothing happened.<br>
Did you find the person you were looking for?<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest FortressOfTheDeadInstance">Why did you come here?"</button>
</body></html>

View File

@@ -0,0 +1,232 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.FortressOfTheDeadInstance;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import quests.Q10752_WindsOfFateAPromise.Q10752_WindsOfFateAPromise;
/**
* Fortress of The Dead Instance Zone.
* @author Gigi
*/
public final class FortressOfTheDeadInstance extends AbstractInstance
{
// NPCs
private static final int KAIN_VAN_HALTER = 33979;
private static final int MYSTERIOUS_WIZARD_2 = 33980;
// Monsters
private static final int VON_HELLMANN = 19566;
private static final int VAMPIRIC_SOLDIER = 19567;
// Locations
private static final Location START_LOC = new Location(57972, -28955, 568);
private static final Location EXIT_LOC = new Location(52084, -51317, -3096);
// Misc
private static final int TEMPLATE_ID = 254;
private static final int KAINS_PROPHECY_MACHINE_FRAGMENT = 39538;
private static final int VAMPIRIC_SOLDIER_KILL = 4;
private static final int VON_HELLMANN_KILL = 1;
class FTODWorld extends InstanceWorld
{
}
public FortressOfTheDeadInstance()
{
super(FortressOfTheDeadInstance.class.getSimpleName());
addTalkId(KAIN_VAN_HALTER, MYSTERIOUS_WIZARD_2);
addFirstTalkId(KAIN_VAN_HALTER, MYSTERIOUS_WIZARD_2);
addKillId(VAMPIRIC_SOLDIER, VON_HELLMANN);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = player.getQuestState(Q10752_WindsOfFateAPromise.class.getSimpleName());
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "33979-02.html":
case "33979-03.html":
case "33979-04.html":
case "33979-05.html":
case "33979-06.html":
case "33979-07.html":
case "33979-08.html":
case "33979-09.html":
case "33979-10.html":
{
htmltext = event;
break;
}
case "33979-11.html":
{
if (tmpworld instanceof FTODWorld)
{
final FTODWorld world = (FTODWorld) tmpworld;
showOnScreenMsg(player, NpcStringId.TALK_TO_THE_MYSTERIOUS_WIZARD, ExShowScreenMessage.TOP_CENTER, 10000);
L2Npc wizard = addSpawn(MYSTERIOUS_WIZARD_2, npc.getX() + getRandom(-50, 50), npc.getY() + getRandom(-50, 50), npc.getZ(), npc.getHeading(), true, 60000, false, world.getInstanceId());
wizard.setTitle(player.getName());
wizard.setIsRunning(false);
wizard.broadcastInfo();
npc.deleteMe();
}
htmltext = event;
break;
}
case "exit_instance":
{
npc.deleteMe();
player.showQuestMovie(111);
giveItems(player, KAINS_PROPHECY_MACHINE_FRAGMENT, 1);
qs.setCond(9, true);
startQuestTimer("TELEPORT", 27000, npc, player);
break;
}
case "enter_instance":
{
enterInstance(player, new FTODWorld(), "FortressOfTheDead.xml", TEMPLATE_ID);
qs.set(Integer.toString(VAMPIRIC_SOLDIER), 0);
break;
}
case "SPAWN_HELLMANN":
{
if (tmpworld instanceof FTODWorld)
{
final FTODWorld world = (FTODWorld) tmpworld;
L2Npc hellmann = addSpawn(VON_HELLMANN, 57963, -28676, 568, 49980, false, 300000, false, world.getInstanceId());
addAttackDesire(hellmann, player);
}
break;
}
case "SPAWN_KAIN_VAN_HALTER":
{
if (tmpworld instanceof FTODWorld)
{
final FTODWorld world = (FTODWorld) tmpworld;
addSpawn(KAIN_VAN_HALTER, 57963, -28676, 568, 49980, false, 300000, false, world.getInstanceId());
}
break;
}
case "TELEPORT":
{
tmpworld.removeAllowed(player.getObjectId());
teleportPlayer(player, EXIT_LOC, 0);
break;
}
}
return htmltext;
}
@Override
public final String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
switch (npc.getId())
{
case KAIN_VAN_HALTER:
{
htmltext = "33979-01.html";
break;
}
case MYSTERIOUS_WIZARD_2:
{
htmltext = "33980-01.html";
break;
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return npc.getId() + ".htm";
}
@Override
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
{
final QuestState qs = player.getQuestState(Q10752_WindsOfFateAPromise.class.getSimpleName());
if ((qs != null) && (qs.isCond(8)))
{
switch (npc.getId())
{
case VAMPIRIC_SOLDIER:
{
int kills = qs.getInt(Integer.toString(VAMPIRIC_SOLDIER));
if (kills < VAMPIRIC_SOLDIER_KILL)
{
kills++;
qs.set(Integer.toString(VAMPIRIC_SOLDIER), kills);
}
break;
}
case VON_HELLMANN:
{
int kills = qs.getInt(Integer.toString(VON_HELLMANN));
if (kills < VON_HELLMANN_KILL)
{
kills++;
qs.set(Integer.toString(VON_HELLMANN), kills);
}
break;
}
}
final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
log.addNpc(VAMPIRIC_SOLDIER, qs.getInt(Integer.toString(VAMPIRIC_SOLDIER)));
log.addNpc(VON_HELLMANN, qs.getInt(Integer.toString(VON_HELLMANN)));
if (qs.getInt(Integer.toString(VAMPIRIC_SOLDIER)) >= VAMPIRIC_SOLDIER_KILL)
{
qs.unset(Integer.toString(VAMPIRIC_SOLDIER));
startQuestTimer("SPAWN_HELLMANN", 8000, npc, player);
}
if (qs.getInt(Integer.toString(VON_HELLMANN)) >= VON_HELLMANN_KILL)
{
npc.deleteMe();
qs.unset(Integer.toString(VON_HELLMANN));
player.showQuestMovie(110);
startQuestTimer("SPAWN_KAIN_VAN_HALTER", 5000, npc, player);
}
}
return super.onKill(npc, player, isSummon);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
}
teleportPlayer(player, START_LOC, world.getInstanceId());
}
}

View File

@@ -0,0 +1,6 @@
<html>
<head></head>
<body>Seal Control Device:<br>
This device controls the seals imprisoning the soul of Hermuncus.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest HarnakUndergroundRuins activate_seal">Release the seal.</Button></body>
</html>

View File

@@ -0,0 +1,824 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.HarnakUndergroundRuins;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.CategoryType;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExSendUIEvent;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jmobius.gameserver.util.Util;
import instances.AbstractInstance;
/**
* Harnak Underground Ruins Instance Zone.
* @author Sdw
*/
public final class HarnakUndergroundRuins extends AbstractInstance
{
// NPCs
private static final int HADEL = 33344;
private static final int KRAKIA_BATHUS = 27437;
private static final int KRAKIA_CARCASS = 27438;
private static final int KRAKIA_LOTUS = 27439;
private static final int RAKZAN = 27440;
private static final int WEISS_KHAN = 27441;
private static final int BAMONTI = 27442;
private static final int SEKNUS = 27443;
private static final int WEISS_ELE = 27454;
private static final int HARNAKS_WRAITH = 27445;
private static final int SEAL_CONTROL_DEVICE = 33548;
private static final int POWER_SOURCE = 33501;
private static final int[] POWER_SOURCES =
{
33501,
33556,
33557
};
// Locations
private static final Location START_LOC = new Location(-107910, 205828, -10872);
private static final Location NPC_ROOM1_LOC = new Location(-107930, 206328, -10872);
private static final Location EXIT_LOC = new Location(-114962, 226564, -2864);
// Skills
private static final SkillHolder RELEASE_OF_POWER = new SkillHolder(14625, 1);
private static final SkillHolder MAXIMUM_DEFENSE = new SkillHolder(14700, 1);
private static final SkillHolder LIGHT_HEAL = new SkillHolder(14736, 1);
private static final SkillHolder ULTIMATE_BUFF = new SkillHolder(4318, 1);
// Misc
private static final int TEMPLATE_ID = 195;
private static final int ZONE_ROOM_2 = 200032;
private static final int ZONE_ROOM_3 = 200033;
private static final int LAST_ROOM_OPENING = 46;
private static final int SUCCES_ENDING = 47;
private static final int FAILED_ENDING = 48;
private static final int DOOR_ONE = 16240100;
private static final int DOOR_TWO = 16240102;
class HuRWorld extends InstanceWorld
{
int wave = 0;
int currentNpc = 0;
int waveNpcId = 0;
int maximalDefenseCounter = 0;
int timerCount = 0;
int enabledSeal = 0;
final Set<L2Npc> spawnedNpc = Collections.newSetFromMap(new ConcurrentHashMap<L2Npc, Boolean>());
boolean openingPlayed = false;
boolean harnakMessage1 = false;
boolean harnakMessage2 = false;
boolean harnakMessage3 = false;
}
public HarnakUndergroundRuins()
{
super(HarnakUndergroundRuins.class.getSimpleName());
registerMobs(KRAKIA_BATHUS, KRAKIA_CARCASS, KRAKIA_LOTUS, RAKZAN, WEISS_KHAN, BAMONTI, SEKNUS, WEISS_ELE, HARNAKS_WRAITH);
addSeeCreatureId(POWER_SOURCES);
addEnterZoneId(ZONE_ROOM_2, ZONE_ROOM_3);
addFirstTalkId(SEAL_CONTROL_DEVICE);
addTalkId(HADEL);
addStartNpc(HADEL);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final String htmltext = null;
switch (event)
{
case "enter_instance":
{
enterInstance(player, new HuRWorld(), "HarnakUndergroundRuins.xml", TEMPLATE_ID);
break;
}
case "message1":
{
showOnScreenMsg(player, NpcStringId.AN_INTRUDER_INTERESTING, ExShowScreenMessage.TOP_CENTER, 5000);
break;
}
case "message2":
{
showOnScreenMsg(player, NpcStringId.PROVE_YOUR_WORTH, ExShowScreenMessage.TOP_CENTER, 5000);
break;
}
case "message3":
{
showOnScreenMsg(player, NpcStringId.ONLY_THOSE_STRONG_ENOUGH_SHALL_PROCEED, ExShowScreenMessage.TOP_CENTER, 5000);
break;
}
case "message4":
{
showOnScreenMsg(player, NpcStringId.THOUGH_SMALL_THIS_POWER_WILL_HELP_YOU_GREATLY, ExShowScreenMessage.TOP_CENTER, 5000);
break;
}
case "message5":
{
showOnScreenMsg(player, NpcStringId.ARE_YOU_STRONG_OR_WEAK_OF_THE_LIGHT_OR_DARKNESS, ExShowScreenMessage.TOP_CENTER, 5000);
break;
}
case "message6":
{
showOnScreenMsg(player, NpcStringId.ONLY_THOSE_OF_LIGHT_MAY_PASS_OTHERS_MUST_PROVE_THEIR_STRENGTH, ExShowScreenMessage.TOP_CENTER, 5000);
break;
}
case "razkan_say":
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.COME_ATTACK_ME_IF_YOU_DARE);
break;
}
case "bathus_say":
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.IT_S_THE_END_FOR_YOU_TRAITOR);
break;
}
case "bamonti_say":
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_WANT_TO_HEAR_YOU_CRY);
break;
}
case "carcass_say":
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_WANT_TO_HEAR_YOU_CRY);
break;
}
case "khan_say":
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.YOU_LL_HAVE_TO_KILL_US_FIRST);
break;
}
case "seknus_say":
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.LETS_SEE_WHAT_YOU_ARE_MADE_OF);
break;
}
case "lotus_say":
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.REPENT_AND_YOUR_DEATH_WILL_BE_QUICK);
break;
}
case "ele_say":
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.DIE_TRAITOR);
break;
}
case "spawn_npc1":
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
final List<L2Npc> spawnedNpcs = spawnGroup("first_room", world.getInstanceId());
world.spawnedNpc.addAll(spawnedNpcs);
final L2Npc razkan = spawnedNpcs.stream().filter(n -> n.getId() == RAKZAN).findFirst().orElse(null);
if (razkan != null)
{
world.currentNpc = RAKZAN;
razkan.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
broadcastNpcSay(razkan, ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_AGAINST_THE_WILL_OF_LIGHT);
startQuestTimer("razkan_say", 1600, razkan, player);
}
world.setStatus(1);
}
break;
}
case "spawn_npc2":
{
openDoor(DOOR_ONE, player.getInstanceId());
spawnGroup("power_sources", player.getInstanceId());
break;
}
case "spawn_npc3":
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
world.incStatus();
final List<L2Npc> spawnedNpcs = spawnGroup("third_room", world.getInstanceId());
final L2Npc powerSource = spawnedNpcs.stream().filter(n -> n.getId() == POWER_SOURCE).findFirst().orElse(null);
if (powerSource != null)
{
powerSource.setTarget(player);
startQuestTimer("cast_light_heal", 3000, powerSource, player);
}
}
break;
}
case "show_movie_opening":
{
player.showQuestMovie(LAST_ROOM_OPENING);
startQuestTimer("spawn_npc3", 29950, npc, player);
break;
}
case "spawn_wave1":
{
int npcId = 0;
if (player.isInCategory(CategoryType.SIGEL_CANDIDATE))
{
npcId = RAKZAN;
}
else if (player.isInCategory(CategoryType.TYRR_CANDIDATE))
{
npcId = KRAKIA_BATHUS;
}
else if (player.isInCategory(CategoryType.OTHELL_CANDIDATE))
{
npcId = BAMONTI;
}
else if (player.isInCategory(CategoryType.YUL_CANDIDATE))
{
npcId = KRAKIA_CARCASS;
}
else if (player.isInCategory(CategoryType.FEOH_CANDIDATE))
{
npcId = WEISS_KHAN;
}
else if (player.isInCategory(CategoryType.ISS_CANDIDATE))
{
npcId = SEKNUS;
}
else if (player.isInCategory(CategoryType.WYNN_CANDIDATE))
{
npcId = KRAKIA_LOTUS;
}
else if (player.isInCategory(CategoryType.AEORE_CANDIDATE))
{
npcId = WEISS_ELE;
}
if (npcId > 0)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
final List<L2Npc> spawnedNpcs = spawnGroup("second_room_wave_1_" + npcId, world.getInstanceId());
world.spawnedNpc.addAll(spawnedNpcs);
world.waveNpcId = npcId;
for (L2Npc spawnedNpc : spawnedNpcs)
{
addAttackDesire(spawnedNpc, player);
}
world.wave++;
}
}
break;
}
case "spawn_wave2":
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
final List<L2Npc> spawnedNpcs = spawnGroup("second_room_wave_2_" + world.waveNpcId, world.getInstanceId());
world.spawnedNpc.addAll(spawnedNpcs);
for (L2Npc spawnedNpc : spawnedNpcs)
{
addAttackDesire(spawnedNpc, player);
}
world.wave++;
}
break;
}
case "spawn_wave3":
{
showOnScreenMsg(player, NpcStringId.I_MUST_GO_HELP_SOME_MORE, ExShowScreenMessage.TOP_CENTER, 5000);
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
final List<L2Npc> spawnedNpcs = spawnGroup("second_room_wave_3_" + world.waveNpcId, world.getInstanceId());
world.spawnedNpc.addAll(spawnedNpcs);
for (L2Npc spawnedNpc : spawnedNpcs)
{
addAttackDesire(spawnedNpc, player);
}
final List<L2Npc> powersources = spawnGroup("power_source", world.getInstanceId());
for (L2Npc powersource : powersources)
{
powersource.setTarget(player);
startQuestTimer("cast_defense_maximum", 1, powersource, player);
}
world.wave++;
}
break;
}
case "cast_defense_maximum":
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
if (npc.calculateDistance(player, true, false) < MAXIMUM_DEFENSE.getSkill().getCastRange())
{
npc.doCast(MAXIMUM_DEFENSE.getSkill());
world.maximalDefenseCounter++;
if (world.maximalDefenseCounter < 3)
{
startQuestTimer("cast_defense_maximum", 60000, npc, player);
}
else
{
npc.deleteMe();
}
}
else
{
startQuestTimer("cast_defense_maximum", 1, npc, player);
}
}
break;
}
case "cast_light_heal":
{
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
if ((npc != null) && (world != null) && (world.isStatus(3) || world.isStatus(4)))
{
if (npc.calculateDistance(player, true, false) < LIGHT_HEAL.getSkill().getCastRange())
{
npc.doCast(LIGHT_HEAL.getSkill());
}
startQuestTimer("cast_light_heal", 3000, npc, player);
}
break;
}
case "fail_instance":
{
InstanceManager.getInstance().getInstance(player.getInstanceId()).removeSpawnedNpcs();
player.showQuestMovie(FAILED_ENDING);
startQuestTimer("exit", 13500, npc, player);
break;
}
case "exit":
{
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
world.removeAllowed(player.getObjectId());
teleportPlayer(player, EXIT_LOC, 0);
break;
}
case "spawn_npc4":
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
List<L2Npc> spawnedNpcs = spawnGroup("third_room_" + world.waveNpcId, world.getInstanceId());
for (L2Npc spawnedNpc : spawnedNpcs)
{
addAttackDesire(spawnedNpc, player);
}
spawnedNpcs = spawnGroup("seal", world.getInstanceId());
for (L2Npc spawnedNpc : spawnedNpcs)
{
broadcastNpcSay(spawnedNpc, ChatType.NPC_GENERAL, NpcStringId.DISABLE_DEVICE_WILL_GO_OUT_OF_CONTROL_IN_1_MINUTE);
startQuestTimer("seal_say", 10000, spawnedNpc, player);
}
}
break;
}
case "activate_seal":
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
if (npc.getScriptValue() == 0)
{
npc.setScriptValue(1);
world.enabledSeal++;
if (world.enabledSeal == 2)
{
cancelQuestTimer("fail_instance", null, player);
InstanceManager.getInstance().getInstance(world.getInstanceId()).removeSpawnedNpcs();
player.showQuestMovie(SUCCES_ENDING);
startQuestTimer("spawn_hermuncus", 25050, npc, player);
}
}
}
break;
}
case "seal_say":
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
switch (world.timerCount)
{
case 0:
{
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING41);
break;
}
case 1:
{
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING42);
break;
}
case 2:
{
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING43);
break;
}
case 3:
{
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING44);
break;
}
case 4:
{
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS_ARE_REMAINING45);
break;
}
case 5:
{
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS);
break;
}
case 6:
{
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS2);
break;
}
case 7:
{
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS3);
break;
}
case 8:
{
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECONDS4);
break;
}
case 9:
{
broadcastNpcSay(npc, ChatType.NPC_SHOUT, NpcStringId.SECOND);
break;
}
}
if (world.timerCount <= 4)
{
startQuestTimer("seal_say", 10000, npc, player);
}
else if ((world.timerCount > 4) && (world.timerCount <= 9))
{
startQuestTimer("seal_say", 1000, npc, player);
}
world.timerCount++;
}
break;
}
case "spawn_hermuncus":
{
spawnGroup("hermuncus", player.getInstanceId());
break;
}
case "cast_release_power":
{
npc.setTarget(player);
npc.doCast(RELEASE_OF_POWER.getSkill());
break;
}
case "whisper_to_player":
{
showOnScreenMsg(player, NpcStringId.I_HERMUNCUS_GIVE_MY_POWER_TO_THOSE_WHO_FIGHT_FOR_ME, ExShowScreenMessage.TOP_CENTER, 5000);
broadcastNpcSay(npc, ChatType.WHISPER, NpcStringId.RECEIVE_THIS_POWER_FORM_THE_ANCIENT_GIANT);
broadcastNpcSay(npc, ChatType.WHISPER, NpcStringId.USE_THIS_NEW_POWER_WHEN_THE_TIME_IS_RIGHT);
startQuestTimer("message4", 3000, npc, player);
}
}
return htmltext;
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
startQuestTimer("fail_instance", 1260000, null, player);
startQuestTimer("message1", 2500, null, player);
startQuestTimer("message2", 5000, null, player);
startQuestTimer("message3", 8500, null, player);
startQuestTimer("spawn_npc1", 10000, null, player);
}
world.addAllowed(player.getObjectId());
teleportPlayer(player, START_LOC, world.getInstanceId());
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(killer);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
if (world.isStatus(0))
{
world.spawnedNpc.remove(npc);
if (world.spawnedNpc.isEmpty())
{
startQuestTimer("spawn_npc2", 100, npc, killer);
world.setStatus(2);
}
}
else if (world.isStatus(1))
{
world.spawnedNpc.remove(npc);
switch (npc.getId())
{
case RAKZAN:
{
final L2Npc bathius = world.spawnedNpc.stream().filter(n -> n.getId() == KRAKIA_BATHUS).findFirst().orElse(null);
if (bathius != null)
{
bathius.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
broadcastNpcSay(bathius, ChatType.NPC_GENERAL, NpcStringId.ARE_YOU_PLANNING_TO_BETRAY_THE_GODS_AND_FOLLOW_A_GIANT);
startQuestTimer("bathus_say", 2600, bathius, killer);
world.currentNpc = KRAKIA_BATHUS;
}
break;
}
case KRAKIA_BATHUS:
{
final L2Npc bamonti = world.spawnedNpc.stream().filter(n -> n.getId() == BAMONTI).findFirst().orElse(null);
if (bamonti != null)
{
bamonti.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
broadcastNpcSay(bamonti, ChatType.NPC_GENERAL, NpcStringId.HAHA);
startQuestTimer("bamonti_say", 2600, bamonti, killer);
world.currentNpc = BAMONTI;
}
break;
}
case BAMONTI:
{
final L2Npc carcass = world.spawnedNpc.stream().filter(n -> n.getId() == KRAKIA_CARCASS).findFirst().orElse(null);
if (carcass != null)
{
carcass.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
broadcastNpcSay(carcass, ChatType.NPC_GENERAL, NpcStringId.HAHA);
startQuestTimer("carcass_say", 2600, carcass, killer);
world.currentNpc = KRAKIA_CARCASS;
}
break;
}
case KRAKIA_CARCASS:
{
final L2Npc khan = world.spawnedNpc.stream().filter(n -> n.getId() == WEISS_KHAN).findFirst().orElse(null);
if (khan != null)
{
khan.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
broadcastNpcSay(khan, ChatType.NPC_GENERAL, NpcStringId.YOU_WILL_NOT_FREE_HERMUNCUS);
startQuestTimer("khan_say", 2600, khan, killer);
world.currentNpc = WEISS_KHAN;
}
break;
}
case WEISS_KHAN:
{
final L2Npc seknus = world.spawnedNpc.stream().filter(n -> n.getId() == SEKNUS).findFirst().orElse(null);
if (seknus != null)
{
seknus.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
broadcastNpcSay(seknus, ChatType.NPC_GENERAL, NpcStringId.MORTAL);
startQuestTimer("seknus_say", 2600, seknus, killer);
world.currentNpc = SEKNUS;
}
break;
}
case SEKNUS:
{
final L2Npc lotus = world.spawnedNpc.stream().filter(n -> n.getId() == KRAKIA_LOTUS).findFirst().orElse(null);
if (lotus != null)
{
lotus.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
broadcastNpcSay(lotus, ChatType.NPC_GENERAL, NpcStringId.TRYING_TO_FREE_HERMUNCUS);
startQuestTimer("lotus_say", 2600, lotus, killer);
world.currentNpc = KRAKIA_LOTUS;
}
break;
}
case KRAKIA_LOTUS:
{
final L2Npc ele = world.spawnedNpc.stream().filter(n -> n.getId() == WEISS_ELE).findFirst().orElse(null);
if (ele != null)
{
ele.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, NPC_ROOM1_LOC);
broadcastNpcSay(ele, ChatType.NPC_GENERAL, NpcStringId.YOU_WILL_NEVER_BREAK_THE_SEAL);
startQuestTimer("ele_say", 2600, ele, killer);
world.currentNpc = WEISS_ELE;
}
break;
}
case WEISS_ELE:
{
startQuestTimer("spawn_npc2", 100, npc, killer);
break;
}
}
}
else if (world.isStatus(2))
{
world.spawnedNpc.remove(npc);
if (world.spawnedNpc.isEmpty())
{
switch (world.wave)
{
case 1:
{
startQuestTimer("spawn_wave2", 100, npc, killer);
break;
}
case 2:
{
startQuestTimer("spawn_wave3", 100, npc, killer);
break;
}
case 3:
{
openDoor(DOOR_TWO, world.getInstanceId());
break;
}
}
}
}
else if (npc.getId() == HARNAKS_WRAITH)
{
cancelQuestTimer("fail_instance", null, killer);
InstanceManager.getInstance().getInstance(world.getInstanceId()).removeSpawnedNpcs();
killer.showQuestMovie(SUCCES_ENDING);
startQuestTimer("spawn_hermuncus", 25050, npc, killer);
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onAttack(L2Npc npc, L2PcInstance player, int damage, boolean isSummon)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
if (world.isStatus(1))
{
switch (npc.getId())
{
case RAKZAN:
case KRAKIA_BATHUS:
case BAMONTI:
case KRAKIA_CARCASS:
case WEISS_KHAN:
case SEKNUS:
case KRAKIA_LOTUS:
case WEISS_ELE:
{
if (npc.getId() != world.currentNpc)
{
for (L2Npc livingNpc : world.spawnedNpc)
{
addAttackDesire(livingNpc, player);
}
}
break;
}
}
}
else if (world.isStatus(2))
{
switch (npc.getId())
{
case RAKZAN:
case KRAKIA_BATHUS:
case BAMONTI:
case KRAKIA_CARCASS:
case WEISS_KHAN:
case SEKNUS:
case KRAKIA_LOTUS:
{
if (((npc.getCurrentHp() / npc.getMaxHp()) * 100) < 80)
{
npc.doCast(ULTIMATE_BUFF.getSkill());
}
break;
}
}
}
else if (world.isStatus(3) && (npc.getId() == HARNAKS_WRAITH))
{
if (!world.harnakMessage1 && (((npc.getCurrentHp() / npc.getMaxHp()) * 100) > 80))
{
showOnScreenMsg(player, NpcStringId.FREE_ME_FROM_THIS_BINDING_OF_LIGHT, ExShowScreenMessage.TOP_CENTER, 5000);
world.harnakMessage1 = true;
}
else if (!world.harnakMessage2 && (((npc.getCurrentHp() / npc.getMaxHp()) * 100) <= 80))
{
showOnScreenMsg(player, NpcStringId.DESTROY_THE_GHOST_OF_HARNAK_THIS_CORRUPTED_CREATURE, ExShowScreenMessage.TOP_CENTER, 5000);
world.harnakMessage2 = true;
}
else if (!world.harnakMessage3 && (((npc.getCurrentHp() / npc.getMaxHp()) * 100) <= 60))
{
showOnScreenMsg(player, NpcStringId.FREE_ME_AND_I_PROMISE_YOU_THE_POWER_OF_GIANTS, ExShowScreenMessage.TOP_CENTER, 5000);
world.harnakMessage3 = true;
}
else if (((npc.getCurrentHp() / npc.getMaxHp()) * 100) <= 50)
{
world.incStatus();
player.sendPacket(new ExSendUIEvent(player, false, false, 60, 0, NpcStringId.REMAINING_TIME));
showOnScreenMsg(player, NpcStringId.NO_THE_SEAL_CONTROLS_HAVE_BEEN_EXPOSED_GUARDS_PROTECT_THE_SEAL_CONTROLS, ExShowScreenMessage.TOP_CENTER, 10000);
startQuestTimer("spawn_npc4", 1, npc, player);
cancelQuestTimer("fail_instance", null, player);
startQuestTimer("fail_instance", 60000, null, player);
}
}
}
return super.onAttack(npc, player, damage, isSummon);
}
@Override
public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
{
if (Util.contains(POWER_SOURCES, npc.getId()) && creature.isPlayer())
{
startQuestTimer("cast_release_power", 2000, npc, creature.getActingPlayer());
if (npc.getId() == POWER_SOURCE)
{
startQuestTimer("whisper_to_player", 2000, npc, creature.getActingPlayer());
}
}
return super.onSeeCreature(npc, creature, isSummon);
}
@Override
public String onEnterZone(L2Character character, L2ZoneType zone)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(character.getActingPlayer());
if (tmpworld instanceof HuRWorld)
{
final HuRWorld world = (HuRWorld) tmpworld;
switch (zone.getId())
{
case ZONE_ROOM_2:
{
if (character.isPlayer() && world.isStatus(1))
{
world.incStatus();
startQuestTimer("message2", 100, null, character.getActingPlayer());
startQuestTimer("message5", 2600, null, character.getActingPlayer());
startQuestTimer("message6", 5100, null, character.getActingPlayer());
startQuestTimer("spawn_wave1", 5100, null, character.getActingPlayer());
}
break;
}
case ZONE_ROOM_3:
{
if (character.isPlayer() && !world.openingPlayed)
{
startQuestTimer("show_movie_opening", 100, null, character.getActingPlayer());
world.openingPlayed = true;
}
break;
}
}
}
return super.onEnterZone(character, zone);
}
}

View File

@@ -0,0 +1,3 @@
<html><body>Priest Wood:<br>
Spare no detail when you recount your story! The smallest unturned stone can still hide the greatest of treasures!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Priestess Jeina:<br>
May Einhasad's blessing go with you....
</body></html>

View File

@@ -0,0 +1,84 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.HideoutOfTheDawn;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import instances.AbstractInstance;
/**
* Hideout of the Dawn instance zone.
* @author Adry_85
*/
public final class HideoutOfTheDawn extends AbstractInstance
{
// NPCs
private static final int WOOD = 32593;
private static final int JAINA = 32617;
// Location
private static final Location WOOD_LOC = new Location(-23758, -8959, -5384, 0, 0);
private static final Location JAINA_LOC = new Location(147072, 23743, -1984, 0);
// Misc
private static final int TEMPLATE_ID = 113;
class HotDWorld extends InstanceWorld
{
}
public HideoutOfTheDawn()
{
super(HideoutOfTheDawn.class.getSimpleName());
addStartNpc(WOOD);
addTalkId(WOOD, JAINA);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
switch (npc.getId())
{
case WOOD:
{
enterInstance(talker, new HotDWorld(), "HideoutOfTheDawn.xml", TEMPLATE_ID);
return "32593-01.htm";
}
case JAINA:
{
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(talker);
world.removeAllowed(talker.getObjectId());
talker.setInstanceId(0);
talker.teleToLocation(JAINA_LOC);
return "32617-01.htm";
}
}
return super.onTalk(npc, talker);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
}
teleportPlayer(player, WOOD_LOC, world.getInstanceId(), false);
}
}

View File

@@ -0,0 +1,204 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.IceQueensCastle;
import com.l2jmobius.gameserver.ai.CtrlIntention;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Attackable;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.SystemMessageId;
import instances.AbstractInstance;
import quests.Q10285_MeetingSirra.Q10285_MeetingSirra;
/**
* Ice Queen's Castle instance zone.
* @author Adry_85
*/
public final class IceQueensCastle extends AbstractInstance
{
// NPCs
private static final int FREYA = 18847;
private static final int BATTALION_LEADER = 18848;
private static final int LEGIONNAIRE = 18849;
private static final int MERCENARY_ARCHER = 18926;
private static final int ARCHERY_KNIGHT = 22767;
private static final int JINIA = 32781;
// Locations
private static final Location START_LOC = new Location(114000, -112357, -11200, 0, 0);
private static final Location EXIT_LOC = new Location(113883, -108777, -848, 0, 0);
private static final Location FREYA_LOC = new Location(114730, -114805, -11200, 50, 0);
// Skill
private static SkillHolder ETHERNAL_BLIZZARD = new SkillHolder(6276, 1);
// Misc
private static final int TEMPLATE_ID = 137;
private static final int ICE_QUEEN_DOOR = 23140101;
private static final int MIN_LV = 82;
class IQCWorld extends InstanceWorld
{
L2PcInstance player = null;
}
public IceQueensCastle()
{
super(IceQueensCastle.class.getSimpleName());
addStartNpc(JINIA);
addTalkId(JINIA);
addSeeCreatureId(BATTALION_LEADER, LEGIONNAIRE, MERCENARY_ARCHER);
addSpawnId(FREYA);
addSpellFinishedId(FREYA);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
switch (event)
{
case "ATTACK_KNIGHT":
{
for (L2Character character : npc.getKnownList().getKnownCharacters())
{
if ((character.getId() == ARCHERY_KNIGHT) && !character.isDead() && !((L2Attackable) character).isDecayed())
{
addAttackDesire(npc, character, 99999);
}
}
startQuestTimer("ATTACK_KNIGHT", 3000, npc, null);
break;
}
case "TIMER_MOVING":
{
if (npc != null)
{
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, FREYA_LOC);
}
break;
}
case "TIMER_BLIZZARD":
{
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.I_CAN_NO_LONGER_STAND_BY);
npc.stopMove(null);
npc.setTarget(player);
npc.doCast(ETHERNAL_BLIZZARD.getSkill());
break;
}
case "TIMER_SCENE_21":
{
if (npc != null)
{
player.showQuestMovie(21);
npc.deleteMe();
startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player);
}
break;
}
case "TIMER_PC_LEAVE":
{
final QuestState qs = player.getQuestState(Q10285_MeetingSirra.class.getSimpleName());
if (qs != null)
{
qs.setMemoState(3);
qs.setCond(10, true);
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
world.removeAllowed(player.getObjectId());
player.setInstanceId(0);
player.teleToLocation(EXIT_LOC, 0);
}
break;
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
{
if (creature.isPlayer() && npc.isScriptValue(0))
{
for (L2Character character : npc.getKnownList().getKnownCharacters())
{
if ((character.getId() == ARCHERY_KNIGHT) && !character.isDead() && !((L2Attackable) character).isDecayed())
{
addAttackDesire(npc, character, 99999);
npc.setScriptValue(1);
startQuestTimer("ATTACK_KNIGHT", 5000, npc, null);
}
}
broadcastNpcSay(npc, ChatType.NPC_GENERAL, NpcStringId.S1_MAY_THE_PROTECTION_OF_THE_GODS_BE_UPON_YOU, creature.getName());
}
return super.onSeeCreature(npc, creature, isSummon);
}
@Override
public final String onSpawn(L2Npc npc)
{
startQuestTimer("TIMER_MOVING", 60000, npc, null);
startQuestTimer("TIMER_BLIZZARD", 180000, npc, null);
return super.onSpawn(npc);
}
@Override
public String onSpellFinished(L2Npc npc, L2PcInstance player, Skill skill)
{
final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId());
if ((tmpworld instanceof IQCWorld) && (skill == ETHERNAL_BLIZZARD.getSkill()) && (((IQCWorld) tmpworld).player != null))
{
startQuestTimer("TIMER_SCENE_21", 1000, npc, ((IQCWorld) tmpworld).player);
}
return super.onSpellFinished(npc, player, skill);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
enterInstance(talker, new IQCWorld(), "IceQueensCastle.xml", TEMPLATE_ID);
return super.onTalk(npc, talker);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
((IQCWorld) world).player = player;
openDoor(ICE_QUEEN_DOOR, world.getInstanceId());
}
teleportPlayer(player, START_LOC, world.getInstanceId(), false);
}
@Override
protected boolean checkConditions(L2PcInstance player)
{
if (player.getLevel() < MIN_LV)
{
player.sendPacket(SystemMessageId.C1_S_LEVEL_DOES_NOT_CORRESPOND_TO_THE_REQUIREMENTS_FOR_ENTRY);
return false;
}
return true;
}
}

View File

@@ -0,0 +1,3 @@
<html><body>Kegor:<br>
I'd entrust your associate with this mission, but..
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Kegor:<br>
Without you, we would have failed. I can't thank you enough.<br>
Freya's last breath will flutter against your blade, I can feel it!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleBattle killFreya">Rest in peace!</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IceQueensCastleBattle 18851-01.html">Can I have a second with you?</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Aden Vanguard Captain Adolph:<br>
As Shilen grows in power, more monsters will emerge from here. We can't just let this happen without fighting back!<br>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h Quest IncubatorOfEvil">Quest</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Aden Vanguard Captain Adolph:<br>
You've caught me resting after a particularly tough battle. So, you're the soldier Orven has sent? Good! You can help my squad with that never-ending stream of monsters. Got any questions?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IncubatorOfEvil 33170-3.htm">"I'm ready."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Aden Vanguard Captain Adolph:<br>
See my subordinates there? They are elite veterans who have known many victories. Two of them will wait here, while you, me, and the other two enter the enemy base.<br>
Go and talk to my squad and pick out two you'd like to have at your side.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Officer Barton:<br>
Not to brag, but a star soldier such as myself can make the difference between winning and losing.<br>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h Quest IncubatorOfEvil 33170-5.htm">Quest</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Aden Vanguard Captain Adolph:<br>
I see you've chosen strong allies.<br1>
This battle will be fierce, and if you see me go down, do not hesitate to run. We can't afford to lose any more people, and if that happens, you will need time to regroup.<br1>Now, I hope you're ready to take this fight to the enemy, because we're going into their base.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IncubatorOfEvil start_battle">"I'm ready."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Priest Alice:<br>
Even the strongest soldier will fall if they cannot be healed in battle. My healing power will lead us to victory.<br>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h Quest IncubatorOfEvil">Quest</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Priest Alice:<br>
Do you need my help? I can heal, and provide support in combat.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IncubatorOfEvil select_alice">Select</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Officer Barton:<br>
Not to brag, but a star soldier such as myself can make the difference between winning and losing.<br>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h Quest IncubatorOfEvil">Quest</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Officer Barton:<br>
You need my help? Well, you look like a capable sort. I need someone like you to watch my back.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IncubatorOfEvil select_barton">Select</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sniper Hayuk:<br>
If you can defeat your enemy before they get close, you can annihilate their forces without incurring any damage to your own team. Heh! That there is what's called strategy!<br>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h Quest IncubatorOfEvil">Quest</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Sniper Hayuk:<br>
Do you need my help? Of course! I will cover your back! You can trust me.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IncubatorOfEvil select_hayuk">"Yes, I could use some help."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Magus Eliyah:<br>
The Ivory Tower's magic is much too powerful for these monsters. We have no need to skulk on the sidelines!<br>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h Quest IncubatorOfEvil">Quest</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Magus Eliyah:<br>
You need my help? Well, if you protect me from the monsters, I suppose I can help.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest IncubatorOfEvil select_eliyah">Select</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Van Archer:<br>
We're the strong, the proud, the vanguard of Aden! We're accepting applications... we really could use a second trombone for the marching band.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Van Infantry:<br>
We're the strong, the proud, the vanguard of Aden! We're accepting applications... we really could use a second trombone for the marching band.
</body></html>

View File

@@ -0,0 +1,674 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.IncubatorOfEvil;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ai.npc.FighterAI;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.actor.instance.L2QuestGuardInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
import quests.Q10341_DayOfDestinyHumansFate.Q10341_DayOfDestinyHumansFate;
import quests.Q10342_DayOfDestinyElvenFate.Q10342_DayOfDestinyElvenFate;
import quests.Q10343_DayOfDestinyDarkElfsFate.Q10343_DayOfDestinyDarkElfsFate;
import quests.Q10344_DayOfDestinyOrcsFate.Q10344_DayOfDestinyOrcsFate;
import quests.Q10345_DayOfDestinyDwarfsFate.Q10345_DayOfDestinyDwarfsFate;
import quests.Q10346_DayOfDestinyKamaelsFate.Q10346_DayOfDestinyKamaelsFate;
/**
* Incubator of Evil Instance Zone.
* @author Mobius
*/
public final class IncubatorOfEvil extends AbstractInstance
{
// NPCs
private static final int ADOLPH = 33170;
private static final int ALICE = 33171;
private static final int BARTON = 33172;
private static final int HAYUK = 33173;
private static final int ELIYAH = 33174;
private static final int ARCHER = 33414;
private static final int INFANTRY = 33415;
// Monsters
private static final int FINAL_BOSS = 27425;
private static final List<Integer> MONSTERS = new ArrayList<>();
static
{
MONSTERS.add(27430);
MONSTERS.add(27431);
MONSTERS.add(27432);
MONSTERS.add(27433);
MONSTERS.add(27434);
}
// Rewards
private static final int SOE = 736;
// Locations
private static final Location START_LOC = new Location(56180, -172898, -7952);
private static final Location FIGHT_LOC = new Location(56177, -175627, -7952);
// Misc
private static final int TEMPLATE_ID = 185;
class IOEWorld extends InstanceWorld
{
L2QuestGuardInstance adolph = null;
L2QuestGuardInstance alice = null;
L2QuestGuardInstance barton = null;
L2QuestGuardInstance hayuk = null;
L2QuestGuardInstance eliyah = null;
int selectionCount = 0;
final List<L2Npc> savedSpawns = new CopyOnWriteArrayList<>();
}
public IncubatorOfEvil()
{
super(IncubatorOfEvil.class.getSimpleName());
addStartNpc(ADOLPH);
addTalkId(ADOLPH, BARTON, HAYUK, ELIYAH, ALICE);
addFirstTalkId(ADOLPH, BARTON, HAYUK, ELIYAH, ALICE, ARCHER, INFANTRY);
addKillId(MONSTERS);
addKillId(FINAL_BOSS);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("enter_instance"))
{
final QuestState qs = getPlayerQuestState(player);
if ((qs == null) || (qs.getCond() < 4) || qs.isCond(13))
{
return null;
}
qs.setCond(5, true);
enterInstance(player, new IOEWorld(), "IncubatorOfEvil.xml", TEMPLATE_ID);
return null;
}
final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player);
if ((tmpworld == null) || !(tmpworld instanceof IOEWorld))
{
return null;
}
final IOEWorld world = (IOEWorld) tmpworld;
String htmltext = null;
switch (event)
{
case "33170-5.htm":
{
htmltext = event;
break;
}
case "33170-3.htm":
{
final QuestState qs = getPlayerQuestState(player);
if ((qs != null) && qs.isCond(5))
{
qs.setCond(6, true);
htmltext = event;
}
break;
}
case "select_alice":
{
htmltext = addVanguard(player, ALICE);
break;
}
case "select_barton":
{
htmltext = addVanguard(player, BARTON);
break;
}
case "select_hayuk":
{
htmltext = addVanguard(player, HAYUK);
break;
}
case "select_eliyah":
{
htmltext = addVanguard(player, ELIYAH);
break;
}
case "start_battle":
{
if (world.selectionCount == 2)
{
final QuestState qs = getPlayerQuestState(player);
if ((qs != null) && qs.isCond(7))
{
world.setStatus(1);
qs.setCond(8, true);
teleportPlayer(player, FIGHT_LOC, world.getInstanceId(), false);
if (world.adolph != null)
{
ThreadPoolManager.getInstance().scheduleGeneral(new FighterAI(player, world.adolph), 1000);
}
if (world.alice != null)
{
ThreadPoolManager.getInstance().scheduleGeneral(new FighterAI(player, world.alice), 1000);
}
if (world.barton != null)
{
ThreadPoolManager.getInstance().scheduleGeneral(new FighterAI(player, world.barton), 1000);
}
if (world.hayuk != null)
{
ThreadPoolManager.getInstance().scheduleGeneral(new FighterAI(player, world.hayuk), 1000);
}
if (world.eliyah != null)
{
ThreadPoolManager.getInstance().scheduleGeneral(new FighterAI(player, world.eliyah), 1000);
}
final List<L2Npc> archers = spawnGroup("archers", world.getInstanceId());
for (L2Npc spawn : archers)
{
ThreadPoolManager.getInstance().scheduleGeneral(new FighterAI(player, ((L2QuestGuardInstance) spawn)), 1000);
}
final List<L2Npc> infantry = spawnGroup("infantry", world.getInstanceId());
for (L2Npc spawn : infantry)
{
ThreadPoolManager.getInstance().scheduleGeneral(new FighterAI(player, ((L2QuestGuardInstance) spawn)), 1000);
}
world.savedSpawns.addAll(spawnGroup("wave1", world.getInstanceId()));
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
startQuestTimer("checkStatus", 5000, null, player, true);
}
}
break;
}
case "checkStatus":
{
// Check if finished.
if (world.getStatus() > 13)
{
final QuestState qs = getPlayerQuestState(player);
if (qs != null)
{
rewardItems(player, SOE, 1);
qs.setCond(13, true);
}
// 5 minute exit timer.
InstanceManager.getInstance().getInstance(world.getInstanceId()).setDuration(Config.INSTANCE_FINISH_TIME);
InstanceManager.getInstance().getInstance(world.getInstanceId()).setEmptyDestroyTime(0);
// Stop quest timer.
cancelQuestTimers("checkStatus");
return null;
}
// Remove monsters killed by guards.
for (L2Npc spawn : world.savedSpawns)
{
if (spawn.isDead())
{
world.savedSpawns.remove(spawn);
if (spawn.getId() == FINAL_BOSS)
{
for (L2Npc monster : world.savedSpawns)
{
monster.deleteMe();
}
world.incStatus();
}
}
}
// Act according to world status.
switch (world.getStatus())
{
case 1:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave2", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 2:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave3", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 3:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave4", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 4:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave5", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 5:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave6", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 6:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave7", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 7:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave8", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 8:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave9", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 9:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave10", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 10:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave11", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 11:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave12", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 12:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
world.savedSpawns.addAll(spawnGroup("wave13", world.getInstanceId()));
showScreenMessage(player, NpcStringId.CREATURES_RESURRECTED_DEFEND_YOURSELF);
for (L2Npc spawn : world.savedSpawns)
{
addAttackDesire(spawn, player);
}
}
break;
}
case 13:
{
if (world.savedSpawns.isEmpty())
{
world.incStatus();
}
break;
}
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getPlayerQuestState(player);
if (qs == null)
{
return null;
}
String htmltext = getNoQuestMsg(player);
switch (npc.getId())
{
case ADOLPH:
{
switch (qs.getCond())
{
case 5:
{
htmltext = "33170-2.htm";
break;
}
case 6:
{
htmltext = "33170-3.htm";
break;
}
}
break;
}
case ALICE:
case BARTON:
case HAYUK:
case ELIYAH:
{
switch (qs.getCond())
{
case 6:
{
htmltext = npc.getId() + "-2.htm";
break;
}
}
break;
}
}
return htmltext;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getPlayerQuestState(player);
if (qs == null)
{
return null;
}
switch (npc.getId())
{
case ADOLPH:
{
switch (qs.getCond())
{
case 4:
case 5:
case 6:
{
return "33170-1.htm";
}
case 7:
{
return "33170-4.htm";
}
}
break;
}
case ALICE:
case BARTON:
case HAYUK:
case ELIYAH:
{
switch (qs.getCond())
{
case 4:
case 5:
case 6:
{
return npc.getId() + "-1.htm";
}
// case 8: ?
}
break;
}
case ARCHER:
case INFANTRY:
{
return npc.getId() + "-1.htm";
}
}
return null;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(killer);
if ((world == null) || !(world instanceof IOEWorld))
{
return null;
}
((IOEWorld) world).savedSpawns.remove(npc);
if (npc.getId() == FINAL_BOSS)
{
for (L2Npc monster : ((IOEWorld) world).savedSpawns)
{
monster.deleteMe();
}
((IOEWorld) world).incStatus();
}
return super.onKill(npc, killer, isSummon);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.setStatus(0);
world.addAllowed(player.getObjectId());
}
teleportPlayer(player, START_LOC, world.getInstanceId());
}
private QuestState getPlayerQuestState(L2PcInstance player)
{
QuestState qs = null;
switch (player.getRace())
{
case HUMAN:
{
qs = player.getQuestState(Q10341_DayOfDestinyHumansFate.class.getSimpleName());
break;
}
case ELF:
{
qs = player.getQuestState(Q10342_DayOfDestinyElvenFate.class.getSimpleName());
break;
}
case DARK_ELF:
{
qs = player.getQuestState(Q10343_DayOfDestinyDarkElfsFate.class.getSimpleName());
break;
}
case ORC:
{
qs = player.getQuestState(Q10344_DayOfDestinyOrcsFate.class.getSimpleName());
break;
}
case DWARF:
{
qs = player.getQuestState(Q10345_DayOfDestinyDwarfsFate.class.getSimpleName());
break;
}
case KAMAEL:
{
qs = player.getQuestState(Q10346_DayOfDestinyKamaelsFate.class.getSimpleName());
break;
}
}
return qs;
}
private String addVanguard(L2PcInstance player, int addedNpcId)
{
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
if ((world == null) || !(world instanceof IOEWorld) || (world.getStatus() > 1) //
|| (player.getTarget() == null) || !player.getTarget().isNpc() || (((L2Npc) player.getTarget()).getId() != addedNpcId))
{
return null;
}
switch (addedNpcId)
{
case ALICE:
{
((L2Character) player.getTarget()).deleteMe();
((IOEWorld) world).selectionCount++;
((IOEWorld) world).alice = (L2QuestGuardInstance) addSpawn(ALICE, FIGHT_LOC, true, 0, false, world.getInstanceId());
break;
}
case BARTON:
{
((L2Character) player.getTarget()).deleteMe();
((IOEWorld) world).selectionCount++;
((IOEWorld) world).barton = (L2QuestGuardInstance) addSpawn(BARTON, FIGHT_LOC, true, 0, false, world.getInstanceId());
break;
}
case HAYUK:
{
((L2Character) player.getTarget()).deleteMe();
((IOEWorld) world).selectionCount++;
((IOEWorld) world).hayuk = (L2QuestGuardInstance) addSpawn(HAYUK, FIGHT_LOC, true, 0, false, world.getInstanceId());
break;
}
case ELIYAH:
{
((L2Character) player.getTarget()).deleteMe();
((IOEWorld) world).selectionCount++;
((IOEWorld) world).eliyah = (L2QuestGuardInstance) addSpawn(ELIYAH, FIGHT_LOC, true, 0, false, world.getInstanceId());
break;
}
}
if (((IOEWorld) world).selectionCount == 2)
{
((IOEWorld) world).adolph = (L2QuestGuardInstance) addSpawn(ADOLPH, FIGHT_LOC, true, 0, false, world.getInstanceId());
final QuestState qs = getPlayerQuestState(player);
if ((qs != null) && qs.isCond(6))
{
qs.setCond(7, true);
}
// Remove remaining vanguards.
for (L2Character ch : player.getKnownList().getKnownCharactersInRadius(500))
{
if (ch.isNpc() && (((L2Npc) ch).getId() != ADOLPH))
{
ch.deleteMe();
}
}
}
return null;
}
private void showScreenMessage(L2PcInstance player, NpcStringId stringId)
{
player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 10000, false, null, stringId, null));
}
}

View File

@@ -0,0 +1,128 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances;
import java.util.logging.Level;
import java.util.logging.Logger;
import instances.CavernOfThePirateCaptain.CavernOfThePirateCaptain;
import instances.ChambersOfDelusion.ChamberOfDelusionEast;
import instances.ChambersOfDelusion.ChamberOfDelusionNorth;
import instances.ChambersOfDelusion.ChamberOfDelusionSouth;
import instances.ChambersOfDelusion.ChamberOfDelusionSquare;
import instances.ChambersOfDelusion.ChamberOfDelusionTower;
import instances.ChambersOfDelusion.ChamberOfDelusionWest;
import instances.CrystalCaverns.CrystalCaverns;
import instances.DarkCloudMansion.DarkCloudMansion;
import instances.DisciplesNecropolisPast.DisciplesNecropolisPast;
import instances.ElcadiasTent.ElcadiasTent;
import instances.FaeronTrainingGrounds1.FaeronTrainingGrounds1;
import instances.FaeronTrainingGrounds2.FaeronTrainingGrounds2;
import instances.FinalEmperialTomb.FinalEmperialTomb;
import instances.FortressOfTheDeadInstance.FortressOfTheDeadInstance;
import instances.HarnakUndergroundRuins.HarnakUndergroundRuins;
import instances.HideoutOfTheDawn.HideoutOfTheDawn;
import instances.IceQueensCastle.IceQueensCastle;
import instances.IceQueensCastleBattle.IceQueensCastleBattle;
import instances.IncubatorOfEvil.IncubatorOfEvil;
import instances.JiniaGuildHideout1.JiniaGuildHideout1;
import instances.JiniaGuildHideout2.JiniaGuildHideout2;
import instances.JiniaGuildHideout3.JiniaGuildHideout3;
import instances.JiniaGuildHideout4.JiniaGuildHideout4;
import instances.Kamaloka.Kamaloka;
import instances.KaraphonHabitat.KaraphonHabitat;
import instances.KartiasLabyrinth.KartiasLabyrinth;
import instances.LabyrinthOfBelis.LabyrinthOfBelis;
import instances.LibraryOfSages.LibraryOfSages;
import instances.MithrilMine.MithrilMine;
import instances.MonasteryOfSilence1.MonasteryOfSilence1;
import instances.MonasteryOfSilence2.MonasteryOfSilence2;
import instances.MuseumDungeon.MuseumDungeon;
import instances.NightmareKamaloka.NightmareKamaloka;
import instances.NornilsGarden.NornilsGarden;
import instances.PailakaDevilsLegacy.PailakaDevilsLegacy;
import instances.PailakaSongOfIceAndFire.PailakaSongOfIceAndFire;
import instances.SanctumOftheLordsOfDawn.SanctumOftheLordsOfDawn;
import instances.TalkingIsland.TalkingIsland;
/**
* Instance class-loader.
* @author FallenAngel
*/
final class InstanceLoader
{
private static final Logger _log = Logger.getLogger(InstanceLoader.class.getName());
private static final Class<?>[] SCRIPTS =
{
CavernOfThePirateCaptain.class,
CrystalCaverns.class,
DarkCloudMansion.class,
DisciplesNecropolisPast.class,
ElcadiasTent.class,
FaeronTrainingGrounds1.class,
FaeronTrainingGrounds2.class,
FinalEmperialTomb.class,
FortressOfTheDeadInstance.class,
HarnakUndergroundRuins.class,
HideoutOfTheDawn.class,
ChamberOfDelusionEast.class,
ChamberOfDelusionNorth.class,
ChamberOfDelusionSouth.class,
ChamberOfDelusionSquare.class,
ChamberOfDelusionTower.class,
ChamberOfDelusionWest.class,
IceQueensCastle.class,
IceQueensCastleBattle.class,
IncubatorOfEvil.class,
JiniaGuildHideout1.class,
JiniaGuildHideout2.class,
JiniaGuildHideout3.class,
JiniaGuildHideout4.class,
Kamaloka.class,
KaraphonHabitat.class,
KartiasLabyrinth.class,
LabyrinthOfBelis.class,
LibraryOfSages.class,
MithrilMine.class,
MonasteryOfSilence1.class,
MonasteryOfSilence2.class,
MuseumDungeon.class,
NightmareKamaloka.class,
NornilsGarden.class,
PailakaDevilsLegacy.class,
PailakaSongOfIceAndFire.class,
SanctumOftheLordsOfDawn.class,
TalkingIsland.class,
};
public static void main(String[] args)
{
_log.info(InstanceLoader.class.getSimpleName() + ": Loading Instances scripts.");
for (Class<?> script : SCRIPTS)
{
try
{
script.newInstance();
}
catch (Exception e)
{
_log.log(Level.SEVERE, InstanceLoader.class.getSimpleName() + ": Failed loading " + script.getSimpleName() + ":", e);
}
}
}
}

View File

@@ -0,0 +1,73 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.JiniaGuildHideout1;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import instances.AbstractInstance;
import quests.Q10284_AcquisitionOfDivineSword.Q10284_AcquisitionOfDivineSword;
/**
* Jinia Guild Hideout instance zone.
* @author Adry_85
*/
public final class JiniaGuildHideout1 extends AbstractInstance
{
// NPC
private static final int RAFFORTY = 32020;
// Location
private static final Location START_LOC = new Location(-23530, -8963, -5413);
// Misc
private static final int TEMPLATE_ID = 140;
class JGH1World extends InstanceWorld
{
}
public JiniaGuildHideout1()
{
super(JiniaGuildHideout1.class.getSimpleName());
addStartNpc(RAFFORTY);
addTalkId(RAFFORTY);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
final QuestState qs = talker.getQuestState(Q10284_AcquisitionOfDivineSword.class.getSimpleName());
if ((qs != null) && qs.isCond(1))
{
enterInstance(talker, new JGH1World(), "JiniaGuildHideout1.xml", TEMPLATE_ID);
qs.setCond(2, true);
}
return super.onTalk(npc, talker);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
}
teleportPlayer(player, START_LOC, world.getInstanceId(), false);
}
}

View File

@@ -0,0 +1,73 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.JiniaGuildHideout2;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import instances.AbstractInstance;
import quests.Q10285_MeetingSirra.Q10285_MeetingSirra;
/**
* Jinia Guild Hideout instance zone.
* @author Adry_85
*/
public final class JiniaGuildHideout2 extends AbstractInstance
{
// NPC
private static final int RAFFORTY = 32020;
// Location
private static final Location START_LOC = new Location(-23530, -8963, -5413, 0, 0);
// Misc
private static final int TEMPLATE_ID = 141;
class JGH2World extends InstanceWorld
{
}
public JiniaGuildHideout2()
{
super(JiniaGuildHideout2.class.getSimpleName());
addStartNpc(RAFFORTY);
addTalkId(RAFFORTY);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
final QuestState qs = talker.getQuestState(Q10285_MeetingSirra.class.getSimpleName());
if ((qs != null) && qs.isMemoState(1))
{
enterInstance(talker, new JGH2World(), "JiniaGuildHideout2.xml", TEMPLATE_ID);
qs.setCond(2, true);
}
return super.onTalk(npc, talker);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
}
teleportPlayer(player, START_LOC, world.getInstanceId(), false);
}
}

View File

@@ -0,0 +1,73 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.JiniaGuildHideout3;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import instances.AbstractInstance;
import quests.Q10286_ReunionWithSirra.Q10286_ReunionWithSirra;
/**
* Jinia Guild Hideout instance zone.
* @author Adry_85
*/
public final class JiniaGuildHideout3 extends AbstractInstance
{
// NPC
private static final int RAFFORTY = 32020;
// Location
private static final Location START_LOC = new Location(-23530, -8963, -5413, 0, 0);
// Misc
private static final int TEMPLATE_ID = 145;
class JGH3World extends InstanceWorld
{
}
public JiniaGuildHideout3()
{
super(JiniaGuildHideout3.class.getSimpleName());
addStartNpc(RAFFORTY);
addTalkId(RAFFORTY);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
final QuestState qs = talker.getQuestState(Q10286_ReunionWithSirra.class.getSimpleName());
if ((qs != null) && qs.isMemoState(1))
{
enterInstance(talker, new JGH3World(), "JiniaGuildHideout3.xml", TEMPLATE_ID);
qs.setCond(2, true);
}
return super.onTalk(npc, talker);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
}
teleportPlayer(player, START_LOC, world.getInstanceId(), false);
}
}

View File

@@ -0,0 +1,73 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.JiniaGuildHideout4;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import instances.AbstractInstance;
import quests.Q10287_StoryOfThoseLeft.Q10287_StoryOfThoseLeft;
/**
* Jinia Guild Hideout instance zone.
* @author Adry_85
*/
public final class JiniaGuildHideout4 extends AbstractInstance
{
// NPC
private static final int RAFFORTY = 32020;
// Location
private static final Location START_LOC = new Location(-23530, -8963, -5413, 0, 0);
// Misc
private static final int TEMPLATE_ID = 146;
class JGH4World extends InstanceWorld
{
}
public JiniaGuildHideout4()
{
super(JiniaGuildHideout4.class.getSimpleName());
addStartNpc(RAFFORTY);
addTalkId(RAFFORTY);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
final QuestState qs = talker.getQuestState(Q10287_StoryOfThoseLeft.class.getSimpleName());
if ((qs != null) && qs.isMemoState(1))
{
enterInstance(talker, new JGH4World(), "JiniaGuildHideout4.xml", TEMPLATE_ID);
qs.setCond(2, true);
}
return super.onTalk(npc, talker);
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
}
teleportPlayer(player, START_LOC, world.getInstanceId(), false);
}
}

View File

@@ -0,0 +1,7 @@
<html><body>Captain Lucas:<br>
What? You want to enter Kamaloka?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 3">"I want to enter Kamaloka (Hall of the Abyss) (Lv. 33)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 4">"I want to enter Kamaloka (Hall of the Abyss) (Lv. 36)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka">"I want to enter Near Kamaloka (Hall of the Abyss) (Lv. 36) (250 PC points required)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 5">"I want to enter Kamaloka (Labyrinth of the Abyss) (Lv. 39)."</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Captain Mouen:<br>
What? You want to enter Kamaloka?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 9">"I want to enter Kamaloka (Hall of the Abyss) (Lv. 53)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 10">"I want to enter Kamaloka (Hall of the Abyss) (Lv. 56)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka">"I want to enter Near Kamaloka (Hall of the Abyss) (Lv. 56) (250 PC points required)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 11">"I want to enter Kamaloka (Labyrinth of the Abyss) (Lv. 59)."</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Captain Bathis:<br>
What? You want to enter Kamaloka?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bbypass -h Quest Kamaloka 0">"I want to enter Kamaloka (Hall of the Abyss) (Lv. 23)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 1">"I want to enter Kamaloka (Hall of the Abyss) (Lv. 26)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka">"I want to enter Near Kamaloka (Hall of the Abyss) (Lv. 26) (250 PC points required)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 2">"I want to enter Kamaloka (Labyrinth of the Abyss) (Lv. 29)."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Captain Gosta:<br>
What? You want to enter Kamaloka?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 6">Enter Kamaloka, Hall of the Abyss (level 43).</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 7">Enter Kamaloka, Hall of the Abyss (level 46).</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 8">Enter Kamaloka, Labyrinth of the Abyss (level 49).</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Captain Mathias:<br>
Are you trying to enter Kamaloka?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 15">"I want to enter Kamaloka (Hall of the Abyss) (Lv. 73)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 16">"I want to enter Kamaloka (Labyrinth of the Abyss) (Lv. 78)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 17">"I want to enter Near Kamaloka (Labyrinth of the Abyss) (Lv. 81)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 18">"I want to enter Kamaloka (Labyrinth of the Abyss) (Lv. 83)."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Captain Vishotsky:<br>
Hmm? Do you wish to enter Kamaloka? Know that by doing so, you will be risking your life!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 12">Enter Kamaloka, Hall of the Abyss (level 63).</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 13">Enter Kamaloka, Hall of the Abyss (level 66).</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Kamaloka 14">Enter Kamaloka, Labyrinth of the Abyss (level 69).</Button>
</body></html>

View File

@@ -0,0 +1 @@
<html><body>Gatekeeper:<br>You are not a party leader.</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Gatekeeper:<br>
Would you like to leave Kamaloka - Labyrinth of the Abyss?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest Kamaloka">Leave</Button>
</body></html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
<html><body>Maestro Dolkin:<br>
You're better than I thought!<br>
Shall we step outside ?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KaraphonHabitat exit_instance">"Let's go then."</button>
</body></html>

View File

@@ -0,0 +1,97 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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 instances.KaraphonHabitat;
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.instancezone.InstanceWorld;
import com.l2jmobius.gameserver.model.quest.QuestState;
import instances.AbstractInstance;
import quests.Q10745_TheSecretIngredients.Q10745_TheSecretIngredients;
/**
* @author Neanrakyr
*/
public class KaraphonHabitat extends AbstractInstance
{
// NPCs
private static final int DOLKIN = 33954;
private static final int DOLKIN_INSTANCE = 34002;
// Locations
private static final Location START_LOC = new Location(-82250, 246406, -14152);
private static final Location EXIT_LOC = new Location(-88240, 237450, -2880);
// Instance
private static final int TEMPLATE_ID = 253;
class KHWorld extends InstanceWorld
{
}
public KaraphonHabitat()
{
super(KaraphonHabitat.class.getSimpleName());
addFirstTalkId(DOLKIN_INSTANCE);
addStartNpc(DOLKIN, DOLKIN_INSTANCE);
addTalkId(DOLKIN, DOLKIN_INSTANCE);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = player.getQuestState(Q10745_TheSecretIngredients.class.getSimpleName());
if (qs == null)
{
return null;
}
if (event.equals("enter_instance"))
{
enterInstance(player, new KHWorld(), "KaraphonHabitat.xml", TEMPLATE_ID);
}
else if (event.equals("exit_instance"))
{
final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
if (!(world instanceof KHWorld))
{
return null;
}
world.removeAllowed(player.getObjectId());
teleportPlayer(player, EXIT_LOC, 0);
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return "34002.html";
}
@Override
public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
{
if (firstEntrance)
{
world.addAllowed(player.getObjectId());
}
teleportPlayer(player, START_LOC, world.getInstanceId());
}
}

View File

@@ -0,0 +1,3 @@
<html><body>Adolph:<br>
Many of our vanguards have been taken prisoner by the demons. We must rescue them, and crush the devils that rule this labyrinth. Let's go.
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Adolph:<br>
Now that you're here, we need to send someone to notify our country of our status. We will send one of our agents to carry the message to the Kingdom. Please pick who will serve as the messenger. Once you've selected an agent to send, the rest of us, myself included, will attack. The attack commences as soon as you've made your choice.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth remove_barton">"Send Barton." (Warrior)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth remove_hayuk">"Send Hayuk." (Archer)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth remove_eliyah">"Send Eliyah." (Summoner)</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth remove_elise">"Send Elice." (Healer)</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Adolph:<br>
Hey, you look familiar. Have we met?<br1>
Guess it doesn't matter. We're on the cusp of a crucial battle here. The devils of Shilen are breaking into our dimension, calling for our deaths.<br1>
Are you prepared to fight?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth 33608-1.htm">"What happened in Kartia's Labyrinth?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth 33608-2.htm">"Yes, I am ready now."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Barton:<br>
Always procrastinating... Why doesn't the Captain attack?<br1>
What? Me? As you can see, I am Tyrr Warrior Barton, best warrior in the Aden Kingdom. You weren't going to fight without me, were you?
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Hayuk:<br>
Unlike my colleague Barton, who is not the sharpest tool in the shed, I prefer to engage in smart combat. It would be a mistake to think that I am weaker than him.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eliyah:<br>
Hayuk acts smart, but he is nothing compared to me. My guardian spirits cannot stand their master being in danger, and they attack accordingly. You must fight numbers with numbers, don't you think?
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Elise:<br>
I am Priestess Elise. I will heal your wounds and support your efforts. Do not underestimate my importance in battle, or you may wind up healing your own foolish self.
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Kartia Researcher:<br>
If you'll accept the challenge, you have to tell me where to send you. So where?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_zellaka_solo">Kartia's Labyrinth Lv. 85 Solo</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_pelline_solo">Kartia's Labyrinth Lv. 90 Solo</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_kalios_solo">Kartia's Labyrinth Lv. 95 Solo</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_zellaka_party">Kartia's Labyrinth Lv. 85 Party</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_pelline_party">Kartia's Labyrinth Lv. 90 Party</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth request_kalios_party">Kartia's Labyrinth Lv. 95 Party</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Kartia Researcher:<br>
You've heard of Dimensional Rifts, I'm assuming. How outside of the physical world we inhabit there are still other dimensions?<br>
Of course the dimensions were kept apart to keep them from interfering with one another.<br>
Ever since Shilen's rising however the balance has been completely thrown off. As for Kartia's Labyrinth, we've discovered that she built it specifically as a stronghold amongst the dimensional rifts, guarded by three hand-picked demons.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest KartiasLabyrinth 33647-3.htm">"I see."</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Kartia Researcher:<br>
Don't waste my time! I'm a researcher sent directly by the Kingdom of Aden after all.<br>
The monsters that crossed space and time to Kartia's Labyrinth are part of Shilen's plot to infiltrate the whole of Aden. Our goal is to stop them, but we're only researchers. We need heroes.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth 33647-1.htm">Challenge Kartia's Labyrinth</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest KartiasLabyrinth 33647-2.htm">"What's Kartia's Labyrinth?"</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Kartia Researcher:<br>
My, you don't know anything about the history of Kartia's Labyrinth, do you?<br>
But I can see you're curious about its history.<br>
Well, if you bring me something they left behind, I will probably be able to give you some information. A cronicle, perhaps?<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest KartiasLabyrinth 33647-3.htm">Quest</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Kartia Researcher:<br>
Good luck with your journey, and please be careful!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Kartia Researcher:<br>
You must not overstep your abilities. Please choose a location that suits your level.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Kartia Researcher:<br>
The party leader must ask me while you are in a party.
</body></html>

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