Sebion:
+It's taking my injuries so long to heal. I don't think I could move if I tried.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/instances/LabyrinthOfBelis.xml b/trunk/dist/game/data/instances/LabyrinthOfBelis.xml
new file mode 100644
index 0000000000..dd7bcfa597
--- /dev/null
+++ b/trunk/dist/game/data/instances/LabyrinthOfBelis.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/ai/npc/AdventurersGuide/AdventurersGuide.java b/trunk/dist/game/data/scripts/ai/npc/AdventurersGuide/AdventurersGuide.java
index 5859279bb4..0f428e3c17 100644
--- a/trunk/dist/game/data/scripts/ai/npc/AdventurersGuide/AdventurersGuide.java
+++ b/trunk/dist/game/data/scripts/ai/npc/AdventurersGuide/AdventurersGuide.java
@@ -31,8 +31,12 @@ import com.l2jserver.gameserver.model.skills.Skill;
*/
public final class AdventurersGuide extends AbstractNpcAI
{
- // NPC
- private static final int ADVENTURERS_GUIDE = 32327;
+ // NPCs
+ private static final int[] ADVENTURERS_GUIDE =
+ {
+ 32327,
+ 33454, // Newbie Helper
+ };
// Skills
private static final SkillHolder BLESS_PROTECTION = new SkillHolder(5182, 1); // Blessing of Protection
private static final SkillHolder KNIGHT = new SkillHolder(15648, 1); // Knight's Harmony (Adventurer)
diff --git a/trunk/dist/game/data/scripts/instances/InstanceLoader.java b/trunk/dist/game/data/scripts/instances/InstanceLoader.java
index 02d3dc8ad6..b7d1759961 100644
--- a/trunk/dist/game/data/scripts/instances/InstanceLoader.java
+++ b/trunk/dist/game/data/scripts/instances/InstanceLoader.java
@@ -41,6 +41,7 @@ import instances.JiniaGuildHideout2.JiniaGuildHideout2;
import instances.JiniaGuildHideout3.JiniaGuildHideout3;
import instances.JiniaGuildHideout4.JiniaGuildHideout4;
import instances.Kamaloka.Kamaloka;
+import instances.LabyrinthOfBelis.LabyrinthOfBelis;
import instances.LibraryOfSages.LibraryOfSages;
import instances.MithrilMine.MithrilMine;
import instances.MonasteryOfSilence1.MonasteryOfSilence1;
@@ -86,6 +87,7 @@ public final class InstanceLoader
JiniaGuildHideout3.class,
JiniaGuildHideout4.class,
Kamaloka.class,
+ LabyrinthOfBelis.class,
LibraryOfSages.class,
MithrilMine.class,
MonasteryOfSilence1.class,
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-01.html b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-01.html
new file mode 100644
index 0000000000..94345d3024
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-01.html
@@ -0,0 +1,7 @@
+Terian:
+Lakcis spoke of you.
+I am Terian, and I have come to help you through the Labyrinth of Belis.
+Now, when we open this door, enemies win rush toward us. We must defeat them and go on to the next room.
+Ready?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-02.html b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-02.html
new file mode 100644
index 0000000000..38a1a16d65
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-02.html
@@ -0,0 +1,7 @@
+Terian:
+You're better than you look!
+Now, this is the second room. I've already checked the place out, and I think they did something to the device in the middle of the room.
+If we activate it, I'm sure the door will open.
+Ready?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-03.html b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-03.html
new file mode 100644
index 0000000000..394e3329a4
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-03.html
@@ -0,0 +1,8 @@
+Terian:
+We reached the final room! Excellent!
+This will be the most difficult challenge, and will test us both to our limits.
+There is a powerful current flowing through this room, which you cannot pass. I can, but only with special equipment, and even then, I can only last a little while.
+I want you to watch over me while I destroy the circuit breaker, ok? As soon as I start, enemies will come pouring in, so keep them off me!
+Ready?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-04.html b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-04.html
new file mode 100644
index 0000000000..d4b31b4b68
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-04.html
@@ -0,0 +1,6 @@
+Terian:
+Alright!
+One door left, and I have no idea what's behind it. Good luck, friend.
+Are you ready?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-05.html b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-05.html
new file mode 100644
index 0000000000..fae2cc9816
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-05.html
@@ -0,0 +1,6 @@
+Terian:
+What happened?
+Someone scary has been resurrected. Let's go back to town! I'll move you.
+Are you ready?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-06.html b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-06.html
new file mode 100644
index 0000000000..d78bbd0fb5
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/19155-06.html
@@ -0,0 +1,3 @@
+Terian:
+Focus on the battle. We'll talk later.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33215-01.html b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33215-01.html
new file mode 100644
index 0000000000..c53bc636cd
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33215-01.html
@@ -0,0 +1,5 @@
+Belis Verification System:
+To open the door to the next room, you will need to insert Belis' Mark in order to confirm authorization.
+3 Marks of Belis Required.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33215-02.html b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33215-02.html
new file mode 100644
index 0000000000..00720af63d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33215-02.html
@@ -0,0 +1,3 @@
+Belis Verification System:
+All necessary Belis' Marks entered. Electric current device activating...
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33215-03.html b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33215-03.html
new file mode 100644
index 0000000000..fe01100e23
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33215-03.html
@@ -0,0 +1,3 @@
+Belis Verification System:
+3 Belis' Mark required.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33216-01.html b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33216-01.html
new file mode 100644
index 0000000000..7d51be995c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/33216-01.html
@@ -0,0 +1,3 @@
+Electricity Generator:
+-Intrusion Alert-
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/LabyrinthOfBelis.java b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/LabyrinthOfBelis.java
new file mode 100644
index 0000000000..467eb9dc22
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/LabyrinthOfBelis.java
@@ -0,0 +1,510 @@
+/*
+ * Copyright (C) 2004-2015 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package instances.LabyrinthOfBelis;
+
+import instances.AbstractInstance;
+
+import java.util.List;
+
+import quests.Q10331_StartOfFate.Q10331_StartOfFate;
+
+import com.l2jserver.gameserver.ai.CtrlIntention;
+import com.l2jserver.gameserver.enums.ChatType;
+import com.l2jserver.gameserver.instancemanager.InstanceManager;
+import com.l2jserver.gameserver.instancemanager.ZoneManager;
+import com.l2jserver.gameserver.model.Location;
+import com.l2jserver.gameserver.model.actor.L2Attackable;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.actor.instance.L2QuestGuardInstance;
+import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.zone.L2ZoneType;
+import com.l2jserver.gameserver.network.NpcStringId;
+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
+
+/**
+ * Labyrinth of Belis Instance Zone.
+ * @author Mobius
+ */
+public final class LabyrinthOfBelis extends AbstractInstance
+{
+ // Npcs
+ private static final int OFFICER = 19155;
+ private static final int NEMERTESS = 22984;
+ private static final int EMBRYO_HANDYMAN = 22997;
+ private static final int EMBRYO_OPERATIVE = 22998;
+ private static final int VERIFICATION_SYSTEM = 33215;
+ private static final int ELECTRICITY_GENERATOR = 33216;
+ private static L2QuestGuardInstance terian;
+ private static L2Npc generator;
+ private List savedSpawns;
+ // Items
+ private static final int SARIL_NECKLACE = 17580;
+ private static final int BELIS_MARK = 17615;
+ // Locations
+ private static final Location TERIAN_SPAWN_LOC = new Location(-119063, 211160, -8592, 32000);
+ private static final Location TERIAN_ROOM_2_CORIDOR = new Location(-117996, 211484, -8596);
+ private static final Location TERIAN_ROOM_2_WAIT_LOC = new Location(-117041, 212521, -8592);
+ private static final Location TERIAN_ROOM_3_CORIDOR = new Location(-116818, 213281, -8596);
+ private static final Location TERIAN_ROOM_3_WAIT_LOC = new Location(-117873, 214233, -8592);
+ private static final Location TERIAN_ROOM_3_INSIDE = new Location(-118248, 214676, -8590);
+ private static final Location TERIAN_ROOM_3_MONSTER_SPAWN = new Location(-116669, 213220, -8594);
+ private static final Location TERIAN_ROOM_4_CORIDOR = new Location(-119180, 214033, -8592);
+ private static final Location TERIAN_ROOM_4_WAIT_LOC = new Location(-119153, 213732, -8595);
+ private static final Location TERIAN_ROOM_4_INSIDE = new Location(-118336, 212973, -8680);
+ private static final Location GENERATOR_SPAWN_LOC = new Location(-118253, 214706, -8584, 57541);
+ private static final Location NEMERTESS_SPAWN_LOC = new Location(-118336, 212973, -8680);
+ private static final Location START_LOC = new Location(-119942, 211142, -8591);
+ private static final Location EXIT_LOC = new Location(-111733, 231790, -3168);
+ // Misc
+ private static final int TEMPLATE_ID = 178;
+ private static final int DOOR_1 = 16240001;
+ private static final int DOOR_2 = 16240002;
+ private static final int DOOR_3 = 16240003;
+ private static final int DOOR_4 = 16240004;
+ private static final int DOOR_5 = 16240005;
+ private static final int DOOR_6 = 16240006;
+ private static final int DOOR_7 = 16240007;
+ private static final int DOOR_8 = 16240008;
+ private static final int DAMAGE_ZONE_ID = 10331;
+ private boolean assistPlayer = false;
+
+ protected class LOBWorld extends InstanceWorld
+ {
+ }
+
+ public LabyrinthOfBelis()
+ {
+ super(LabyrinthOfBelis.class.getSimpleName());
+ addStartNpc(OFFICER);
+ addFirstTalkId(OFFICER, VERIFICATION_SYSTEM, ELECTRICITY_GENERATOR);
+ addKillId(EMBRYO_OPERATIVE, EMBRYO_HANDYMAN, NEMERTESS);
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = player.getQuestState(Q10331_StartOfFate.class.getSimpleName());
+ if (qs == null)
+ {
+ return null;
+ }
+
+ switch (event)
+ {
+ case "enter_instance":
+ {
+ enterInstance(player, new LOBWorld(), "LabyrinthOfBelis.xml", TEMPLATE_ID);
+ break;
+ }
+ case "officer_wait_1":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+ if (world.getStatus() == 1)
+ {
+ showOnScreenMsg(player, NpcStringId.LET_ME_KNOW_WHEN_YOU_RE_ALL_READY, ExShowScreenMessage.TOP_CENTER, 4000);
+ broadcastNpcSay(terian, ChatType.NPC_GENERAL, NpcStringId.LET_ME_KNOW_WHEN_YOU_RE_ALL_READY, 1000);
+ startQuestTimer("officer_wait_1", 5000, terian, player);
+ }
+ break;
+ }
+ case "room_1":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+ openDoor(DOOR_2, player.getInstanceId());
+ world.setStatus(3);
+ assistPlayer = true;
+ startQuestTimer("assist_player", 3000, terian, player);
+ return null;
+ }
+ case "assist_player":
+ {
+ if (assistPlayer)
+ {
+ terian.setIsRunning(true);
+ if (player.isInCombat() && (player.getTarget() != null) && player.getTarget().isMonster() && !((L2MonsterInstance) player.getTarget()).isAlikeDead())
+ {
+ if (terian.calculateDistance(player.getTarget(), false, false) > 50)
+ {
+ terian.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, player.getTarget().getLocation());
+ }
+ else if (terian.getTarget() != player.getTarget())
+ {
+ terian.addDamageHate((L2Character) player.getTarget(), 0, 1000);
+ }
+ }
+ else
+ {
+ terian.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
+ }
+ startQuestTimer("assist_player", 1000, terian, player);
+ }
+ break;
+ }
+ case "officer_goto_2":
+ {
+ if (terian.calculateDistance(TERIAN_ROOM_2_CORIDOR, false, false) > 10)
+ {
+ terian.setIsRunning(true);
+ terian.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, TERIAN_ROOM_2_CORIDOR);
+ startQuestTimer("officer_goto_2", 1000, terian, player);
+ }
+ else
+ {
+ startQuestTimer("officer_wait_2", 1000, terian, player);
+ }
+ break;
+ }
+ case "officer_wait_2":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+ if (terian.calculateDistance(TERIAN_ROOM_2_WAIT_LOC, false, false) > 10)
+ {
+ terian.setIsRunning(true);
+ terian.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, TERIAN_ROOM_2_WAIT_LOC);
+ startQuestTimer("officer_wait_2", 1000, terian, player);
+ }
+ else
+ {
+ terian.setHeading(terian.getHeading() + 32500);
+ terian.broadcastInfo();
+ broadcastNpcSay(terian, ChatType.NPC_GENERAL, NpcStringId.HEY_YOU_RE_NOT_ALL_BAD_LET_ME_KNOW_WHEN_YOU_RE_READY, 1000);
+ world.setStatus(4);
+ }
+ break;
+ }
+ case "room_2":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+ world.setStatus(5);
+ openDoor(DOOR_4, player.getInstanceId());
+ showOnScreenMsg(player, NpcStringId.MARK_OF_BELIS_CAN_BE_ACQUIRED_FROM_ENEMIES_NUSE_THEM_IN_THE_BELIS_VERIFICATION_SYSTEM, ExShowScreenMessage.TOP_CENTER, 5000);
+ assistPlayer = true;
+ startQuestTimer("assist_player", 3000, terian, player);
+ return null;
+ }
+ case "insert_belis_marks":
+ {
+ if (getQuestItemsCount(player, BELIS_MARK) > 2)
+ {
+ takeItems(player, BELIS_MARK, 3);
+ openDoor(DOOR_5, player.getInstanceId());
+ assistPlayer = false;
+ broadcastNpcSay(terian, ChatType.NPC_GENERAL, NpcStringId.COME_ON_ONTO_THE_NEXT_PLACE, 1000);
+ startQuestTimer("officer_goto_3", 5000, terian, player);
+ return "33215-02.html";
+ }
+ return "33215-03.html";
+ }
+ case "officer_goto_3":
+ {
+ if (terian.calculateDistance(TERIAN_ROOM_3_CORIDOR, false, false) > 10)
+ {
+ terian.setIsRunning(true);
+ terian.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, TERIAN_ROOM_3_CORIDOR);
+ startQuestTimer("officer_goto_3", 1000, terian, player);
+ }
+ else
+ {
+ startQuestTimer("officer_wait_3", 1000, terian, player);
+ }
+ break;
+ }
+ case "officer_wait_3":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+ if (terian.calculateDistance(TERIAN_ROOM_3_WAIT_LOC, false, false) > 10)
+ {
+ terian.setIsRunning(true);
+ terian.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, TERIAN_ROOM_3_WAIT_LOC);
+ startQuestTimer("officer_wait_3", 1000, terian, player);
+ }
+ else
+ {
+ terian.setHeading(terian.getHeading() + 32500);
+ terian.broadcastInfo();
+ broadcastNpcSay(terian, ChatType.NPC_GENERAL, NpcStringId.READY_LET_ME_KNOW, 1000);
+ world.setStatus(6);
+ }
+ break;
+ }
+ case "room_3":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+ world.setStatus(7);
+ generator.setState(1);
+ final L2ZoneType dmgZone = ZoneManager.getInstance().getZoneById(DAMAGE_ZONE_ID);
+ if (dmgZone != null)
+ {
+ dmgZone.setEnabled(true);
+ }
+ openDoor(DOOR_6, player.getInstanceId());
+ terian.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, TERIAN_ROOM_3_INSIDE);
+ broadcastNpcSay(terian, ChatType.NPC_GENERAL, NpcStringId.DON_T_COME_BACK_HERE, 1000);
+ startQuestTimer("room_3_spawns", 10000, terian, player);
+ return null;
+ }
+ case "room_3_spawns":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+
+ showOnScreenMsg(player, NpcStringId.BEHIND_YOU_THE_ENEMY_IS_AMBUSHING_YOU, ExShowScreenMessage.TOP_CENTER, 4000);
+ broadcastNpcSay(terian, ChatType.NPC_GENERAL, NpcStringId.DON_T_COME_BACK_HERE, 1000);
+ // TODO:
+ /*
+ * if (getRandomBoolean()) { showOnScreenMsg(player, NpcStringId.IF_TERAIN_DIES_THE_MISSION_WILL_FAIL, ExShowScreenMessage.TOP_CENTER, 4000); }
+ */
+
+ final L2Npc invader;
+ if (getRandomBoolean())
+ {
+ invader = addSpawn(EMBRYO_HANDYMAN, TERIAN_ROOM_3_MONSTER_SPAWN, false, 0, true, world.getInstanceId());
+ }
+ else
+ {
+ invader = addSpawn(EMBRYO_OPERATIVE, TERIAN_ROOM_3_MONSTER_SPAWN, false, 0, true, world.getInstanceId());
+ }
+ invader.setSpawn(null);
+ ((L2Attackable) invader).addDamageHate(terian, 0, 1000);
+ invader.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, TERIAN_ROOM_3_INSIDE);
+ invader.setRunning();
+
+ if (world.getStatus() < 12)
+ {
+ startQuestTimer("room_3_spawns", 12000, terian, player);
+ }
+ else
+ {
+ final L2ZoneType dmgZone = ZoneManager.getInstance().getZoneById(DAMAGE_ZONE_ID);
+ if (dmgZone != null)
+ {
+ dmgZone.setEnabled(false);
+ }
+ if (generator != null)
+ {
+ generator.deleteMe();
+ }
+ openDoor(DOOR_7, player.getInstanceId());
+ showOnScreenMsg(player, NpcStringId.ELECTRONIC_DEVICE_HAS_BEEN_DESTROYED, ExShowScreenMessage.TOP_CENTER, 4000);
+ broadcastNpcSay(terian, ChatType.NPC_GENERAL, NpcStringId.DEVICE_DESTROYED_LET_S_GO_ONTO_THE_NEXT, 1000);
+ startQuestTimer("officer_goto_4", 1000, terian, player);
+ }
+ break;
+ }
+ case "officer_goto_4":
+ {
+ if (terian.calculateDistance(TERIAN_ROOM_4_CORIDOR, false, false) > 10)
+ {
+ terian.setIsRunning(true);
+ terian.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, TERIAN_ROOM_4_CORIDOR);
+ startQuestTimer("officer_goto_4", 1000, terian, player);
+ }
+ else
+ {
+ startQuestTimer("officer_wait_4", 1000, terian, player);
+ }
+ break;
+ }
+ case "officer_wait_4":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+ if (terian.calculateDistance(TERIAN_ROOM_4_WAIT_LOC, false, false) > 10)
+ {
+ terian.setIsRunning(true);
+ terian.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, TERIAN_ROOM_4_WAIT_LOC);
+ startQuestTimer("officer_wait_4", 1000, terian, player);
+ }
+ else
+ {
+ terian.setHeading(terian.getHeading() + 32500);
+ terian.broadcastInfo();
+ broadcastNpcSay(terian, ChatType.NPC_GENERAL, NpcStringId.SOMETHING_OMINOUS_IN_THERE_I_HOPE_YOU_RE_REALLY_READY_FOR_THIS_LET_ME_KNOW, 1000);
+ world.setStatus(13);
+ }
+ break;
+ }
+ case "room_4":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+ world.setStatus(14);
+ player.showQuestMovie(43);
+ openDoor(DOOR_8, player.getInstanceId());
+ startQuestTimer("spawn_boss", 47000, terian, player);
+ break;
+ }
+ case "spawn_boss":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+ addSpawn(NEMERTESS, NEMERTESS_SPAWN_LOC, false, 0, false, world.getInstanceId());
+ break;
+ }
+ case "exit_instance":
+ {
+ if (terian != null)
+ {
+ terian.deleteMe();
+ }
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(player.getInstanceId());
+ world.removeAllowed(player.getObjectId());
+ teleportPlayer(player, EXIT_LOC, 0);
+ break;
+ }
+ }
+
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public String onFirstTalk(L2Npc npc, L2PcInstance player)
+ {
+ if (npc.getId() == OFFICER)
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(npc.getInstanceId());
+ switch (world.getStatus())
+ {
+ case 1:
+ {
+ world.incStatus();
+ return "19155-01.html";
+ }
+ case 2:
+ {
+ return "19155-01.html";
+ }
+ case 4:
+ {
+ return "19155-02.html";
+ }
+ case 6:
+ {
+ return "19155-03.html";
+ }
+ case 13:
+ {
+ return "19155-04.html";
+ }
+ case 15:
+ {
+ return "19155-05.html";
+ }
+ default:
+ {
+ return "19155-06.html";
+ }
+ }
+ }
+ else if (npc.getId() == VERIFICATION_SYSTEM)
+ {
+ return "33215-01.html";
+ }
+ else if (npc.getId() == ELECTRICITY_GENERATOR)
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(npc.getInstanceId());
+ if (world.getStatus() < 12)
+ {
+ return "33216-01.html";
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getWorld(npc.getInstanceId());
+ if (world instanceof LOBWorld)
+ {
+ switch (npc.getId())
+ {
+ case EMBRYO_OPERATIVE:
+ {
+ if ((world.getStatus() > 6) && (world.getStatus() < 12))
+ {
+ world.incStatus();
+ }
+ else
+ {
+ savedSpawns.remove(0);
+ if ((world.getStatus() == 3) && savedSpawns.isEmpty())
+ {
+ assistPlayer = false;
+ openDoor(DOOR_3, npc.getInstanceId());
+ broadcastNpcSay(terian, ChatType.NPC_GENERAL, NpcStringId.ALL_RIGHT_LET_S_MOVE_OUT, 1000);
+ startQuestTimer("officer_goto_2", 100, terian, killer);
+ }
+ }
+ break;
+ }
+ case EMBRYO_HANDYMAN:
+ {
+ if ((world.getStatus() > 6) && (world.getStatus() < 12))
+ {
+ world.incStatus();
+ }
+ else
+ {
+ if (getRandomBoolean())
+ {
+ npc.dropItem(killer, BELIS_MARK, 1);
+ }
+ }
+ break;
+ }
+ case NEMERTESS:
+ {
+ world.incStatus();
+ npc.deleteMe();
+ killer.showQuestMovie(44);
+ terian.setIsRunning(true);
+ terian.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, TERIAN_ROOM_4_INSIDE);
+ final QuestState qs = killer.getQuestState(Q10331_StartOfFate.class.getSimpleName());
+ if (qs == null)
+ {
+ return null;
+ }
+ giveItems(killer, SARIL_NECKLACE, 1);
+ qs.setCond(5);
+ break;
+ }
+ }
+ }
+
+ return super.onKill(npc, killer, isSummon);
+ }
+
+ @Override
+ public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
+ {
+ if (firstEntrance)
+ {
+ world.setStatus(1);
+ world.addAllowed(player.getObjectId());
+ terian = (L2QuestGuardInstance) addSpawn(OFFICER, TERIAN_SPAWN_LOC, false, 0, false, world.getInstanceId());
+ terian.setSpawn(null);
+ savedSpawns = spawnGroup("room_1", world.getInstanceId());
+ generator = addSpawn(ELECTRICITY_GENERATOR, GENERATOR_SPAWN_LOC, false, 0, false, world.getInstanceId());
+ openDoor(DOOR_1, world.getInstanceId());
+ startQuestTimer("officer_wait_1", 5000, terian, player);
+ }
+ teleportPlayer(player, START_LOC, world.getInstanceId());
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-01.htm b/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-01.htm
new file mode 100644
index 0000000000..d8c8f4fa13
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-01.htm
@@ -0,0 +1,5 @@
+Grand Master Valfar:
+Considering your skills, I don't believe you're ready to take on missions outside the own yet. However, I would like to awaken your potential so as to accelerate your path to the wider world.
+If you're interested, I have a task for you.
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-02.htm b/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-02.htm
new file mode 100644
index 0000000000..b785ef5e27
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-02.htm
@@ -0,0 +1,5 @@
+Grand Master Valfar:
+As you know, the Talking Island changed a great deal after the sky island fell, and the monsters on it awoke. Now it is more dangerous outside of the town than ever before, especially so in and around the giants' relics. We sent a team there to research the site, but I've started to fear for their lives.
+This is a big ask, but I would like you to go there and find the team. If you complete the mission, I'll transfer your class. What do you say?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-03.htm b/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-03.htm
new file mode 100644
index 0000000000..f56a9e6ad1
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-03.htm
@@ -0,0 +1,4 @@
+Grand Master Valfar:
+Lakcis is at the entrance of the Ruins of Ye Sagira. Help him with his relic research. Dusty work, but interesting.
+Oh, you can get there by talking to Gatekeeper Milia.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-04.html b/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-04.html
new file mode 100644
index 0000000000..f56a9e6ad1
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-04.html
@@ -0,0 +1,4 @@
+Grand Master Valfar:
+Lakcis is at the entrance of the Ruins of Ye Sagira. Help him with his relic research. Dusty work, but interesting.
+Oh, you can get there by talking to Gatekeeper Milia.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-05.html b/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-05.html
new file mode 100644
index 0000000000..7a39b877c4
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10331_StartOfFate/32146-05.html
@@ -0,0 +1,8 @@
+Grand Master Valfar:
+Are you ready to change to your new class?
+