From e926a21220aa3aff2cb8c8c2d8ffe638df6f15c5 Mon Sep 17 00:00:00 2001
From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Wed, 9 Dec 2015 16:15:28 +0000
Subject: [PATCH] Initial Kartia commit.
---
trunk/dist/game/data/html/default/33647-1.htm | 9 -
trunk/dist/game/data/html/default/33647.htm | 8 -
...asLabyrinthIncarnationOfGluttonyKalios.xml | 281 +++++++
...yrinthIncarnationOfGluttonyKaliosParty.xml | 281 +++++++
...tiasLabyrinthIncarnationOfGreedZellaka.xml | 281 +++++++
...abyrinthIncarnationOfGreedZellakaParty.xml | 281 +++++++
...sLabyrinthIncarnationOfJealousyPelline.xml | 281 +++++++
...rinthIncarnationOfJealousyPellineParty.xml | 281 +++++++
.../scripts/instances/InstanceLoader.java | 2 +
.../instances/KartiasLabyrinth/33608-1.htm | 3 +
.../instances/KartiasLabyrinth/33608-2.htm | 7 +
.../instances/KartiasLabyrinth/33608.htm | 7 +
.../instances/KartiasLabyrinth/33610.htm | 4 +
.../instances/KartiasLabyrinth/33612.htm | 3 +
.../instances/KartiasLabyrinth/33614.htm | 3 +
.../instances/KartiasLabyrinth/33616.htm | 3 +
.../instances/KartiasLabyrinth/33647-1.htm | 9 +
.../instances/KartiasLabyrinth}/33647-2.htm | 4 +-
.../instances/KartiasLabyrinth}/33647-3.htm | 6 +-
.../instances/KartiasLabyrinth}/33647-4.htm | 2 +-
.../instances/KartiasLabyrinth/33647-5.htm | 3 +
.../instances/KartiasLabyrinth/33647-6.htm | 3 +
.../instances/KartiasLabyrinth/33647-7.htm | 3 +
.../instances/KartiasLabyrinth/33647-8.htm | 3 +
.../instances/KartiasLabyrinth/33647.htm | 8 +
.../KartiasLabyrinth/AI/Fighter.java | 123 +++
.../instances/KartiasLabyrinth/AI/Healer.java | 131 +++
.../KartiasLabyrinth/KartiasLabyrinth.java | 767 ++++++++++++++++++
.../dist/game/data/stats/npcs/19200-19299.xml | 76 +-
.../dist/game/data/stats/npcs/33600-33699.xml | 47 +-
.../dist/game/data/stats/npcs/33700-33799.xml | 8 +-
31 files changed, 2852 insertions(+), 76 deletions(-)
delete mode 100644 trunk/dist/game/data/html/default/33647-1.htm
delete mode 100644 trunk/dist/game/data/html/default/33647.htm
create mode 100644 trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGluttonyKalios.xml
create mode 100644 trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGluttonyKaliosParty.xml
create mode 100644 trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGreedZellaka.xml
create mode 100644 trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGreedZellakaParty.xml
create mode 100644 trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfJealousyPelline.xml
create mode 100644 trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfJealousyPellineParty.xml
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608-1.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608-2.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33610.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33612.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33614.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33616.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-1.htm
rename trunk/dist/game/data/{html/default => scripts/instances/KartiasLabyrinth}/33647-2.htm (76%)
rename trunk/dist/game/data/{html/default => scripts/instances/KartiasLabyrinth}/33647-3.htm (57%)
rename trunk/dist/game/data/{html/default => scripts/instances/KartiasLabyrinth}/33647-4.htm (74%)
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-5.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-6.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-7.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-8.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647.htm
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/AI/Fighter.java
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/AI/Healer.java
create mode 100644 trunk/dist/game/data/scripts/instances/KartiasLabyrinth/KartiasLabyrinth.java
diff --git a/trunk/dist/game/data/html/default/33647-1.htm b/trunk/dist/game/data/html/default/33647-1.htm
deleted file mode 100644
index e435560a11..0000000000
--- a/trunk/dist/game/data/html/default/33647-1.htm
+++ /dev/null
@@ -1,9 +0,0 @@
-
Kartia Researcher:
-If you'll accept the challenge, you have to tell me where to send you. So where?
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/trunk/dist/game/data/html/default/33647.htm b/trunk/dist/game/data/html/default/33647.htm
deleted file mode 100644
index 2811c768c7..0000000000
--- a/trunk/dist/game/data/html/default/33647.htm
+++ /dev/null
@@ -1,8 +0,0 @@
-Kartia Researcher:
-Don't waste my time! I'm a researcher sent directly by the Kingdom of Aden after all.
-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.
-
-
-
-
-
\ No newline at end of file
diff --git a/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGluttonyKalios.xml b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGluttonyKalios.xml
new file mode 100644
index 0000000000..44a30313c3
--- /dev/null
+++ b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGluttonyKalios.xml
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGluttonyKaliosParty.xml b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGluttonyKaliosParty.xml
new file mode 100644
index 0000000000..0e29b4154b
--- /dev/null
+++ b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGluttonyKaliosParty.xml
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGreedZellaka.xml b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGreedZellaka.xml
new file mode 100644
index 0000000000..b4f05ef9a9
--- /dev/null
+++ b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGreedZellaka.xml
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGreedZellakaParty.xml b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGreedZellakaParty.xml
new file mode 100644
index 0000000000..9979335ef3
--- /dev/null
+++ b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfGreedZellakaParty.xml
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfJealousyPelline.xml b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfJealousyPelline.xml
new file mode 100644
index 0000000000..8c8c3619e7
--- /dev/null
+++ b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfJealousyPelline.xml
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfJealousyPellineParty.xml b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfJealousyPellineParty.xml
new file mode 100644
index 0000000000..0dc1417d6f
--- /dev/null
+++ b/trunk/dist/game/data/instances/KartiasLabyrinthIncarnationOfJealousyPellineParty.xml
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/InstanceLoader.java b/trunk/dist/game/data/scripts/instances/InstanceLoader.java
index 7f8cfb73ca..cfcc2e94eb 100644
--- a/trunk/dist/game/data/scripts/instances/InstanceLoader.java
+++ b/trunk/dist/game/data/scripts/instances/InstanceLoader.java
@@ -42,6 +42,7 @@ 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;
@@ -90,6 +91,7 @@ public final class InstanceLoader
JiniaGuildHideout4.class,
Kamaloka.class,
KaraphonHabitat.class,
+ KartiasLabyrinth.class,
LabyrinthOfBelis.class,
LibraryOfSages.class,
MithrilMine.class,
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608-1.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608-1.htm
new file mode 100644
index 0000000000..5f3f33ecd8
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608-1.htm
@@ -0,0 +1,3 @@
+Adolph:
+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.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608-2.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608-2.htm
new file mode 100644
index 0000000000..f89e1e1fd0
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608-2.htm
@@ -0,0 +1,7 @@
+Adolph:
+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.
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608.htm
new file mode 100644
index 0000000000..6e9379ee8e
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33608.htm
@@ -0,0 +1,7 @@
+Adolph:
+Hey, you look familiar. Have we met?
+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.
+Are you prepared to fight?
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33610.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33610.htm
new file mode 100644
index 0000000000..6d2cadd5f7
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33610.htm
@@ -0,0 +1,4 @@
+Barton:
+Always procrastinating... Why doesn't the Captain attack?
+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?
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33612.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33612.htm
new file mode 100644
index 0000000000..49f3503a58
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33612.htm
@@ -0,0 +1,3 @@
+Hayuk:
+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.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33614.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33614.htm
new file mode 100644
index 0000000000..3a8fdf7b30
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33614.htm
@@ -0,0 +1,3 @@
+Eliyah:
+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?
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33616.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33616.htm
new file mode 100644
index 0000000000..1a933edd52
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33616.htm
@@ -0,0 +1,3 @@
+Elise:
+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.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-1.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-1.htm
new file mode 100644
index 0000000000..64a6a78ee6
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-1.htm
@@ -0,0 +1,9 @@
+Kartia Researcher:
+If you'll accept the challenge, you have to tell me where to send you. So where?
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/html/default/33647-2.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-2.htm
similarity index 76%
rename from trunk/dist/game/data/html/default/33647-2.htm
rename to trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-2.htm
index 48f111ed55..b611253aa7 100644
--- a/trunk/dist/game/data/html/default/33647-2.htm
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-2.htm
@@ -1,6 +1,6 @@
-Kartia Researcher:
+Kartia Researcher:
You've heard of Dimensional Rifts, I'm assuming. How outside of the physical world we inhabit there are still other dimensions?
Of course the dimensions were kept apart to keep them from interfering with one another.
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.
-
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/html/default/33647-3.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-3.htm
similarity index 57%
rename from trunk/dist/game/data/html/default/33647-3.htm
rename to trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-3.htm
index 40e9b1a802..a971e8bb1e 100644
--- a/trunk/dist/game/data/html/default/33647-3.htm
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-3.htm
@@ -1,7 +1,7 @@
-Kartia Researcher:
+Kartia Researcher:
Don't waste my time! I'm a researcher sent directly by the Kingdom of Aden after all.
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.
-
-
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/html/default/33647-4.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-4.htm
similarity index 74%
rename from trunk/dist/game/data/html/default/33647-4.htm
rename to trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-4.htm
index d9b4a011e1..871b05de3d 100644
--- a/trunk/dist/game/data/html/default/33647-4.htm
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-4.htm
@@ -2,5 +2,5 @@
My, you don't know anything about the history of Kartia's Labyrinth, do you?
But I can see you're curious about its history.
Well, if you bring me something they left behind, I will probably be able to give you some information. A cronicle, perhaps?
-
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-5.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-5.htm
new file mode 100644
index 0000000000..d3afed7372
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-5.htm
@@ -0,0 +1,3 @@
+Kartia Researcher:
+Good luck with your journey, and please be careful!
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-6.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-6.htm
new file mode 100644
index 0000000000..717d4241e1
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-6.htm
@@ -0,0 +1,3 @@
+Kartia Researcher:
+You must not overstep your abilities. Please choose a location that suits your level.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-7.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-7.htm
new file mode 100644
index 0000000000..ff033588c9
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-7.htm
@@ -0,0 +1,3 @@
+Kartia Researcher:
+The party leader must ask me while you are in a party.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-8.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-8.htm
new file mode 100644
index 0000000000..4c65fb76a3
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647-8.htm
@@ -0,0 +1,3 @@
+Kartia Researcher:
+I think there is a problem with the Dimensional Rift. Come back later when I've sorted it out.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647.htm b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647.htm
new file mode 100644
index 0000000000..f1b9dd7533
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/33647.htm
@@ -0,0 +1,8 @@
+Kartia Researcher:
+Don't waste my time! I'm a researcher sent directly by the Kingdom of Aden after all.
+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.
+
+
+
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/AI/Fighter.java b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/AI/Fighter.java
new file mode 100644
index 0000000000..9ea70df461
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/AI/Fighter.java
@@ -0,0 +1,123 @@
+/*
+ * 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.KartiasLabyrinth.AI;
+
+import com.l2jserver.gameserver.ThreadPoolManager;
+import com.l2jserver.gameserver.ai.CtrlIntention;
+import com.l2jserver.gameserver.model.Location;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.actor.instance.L2QuestGuardInstance;
+import com.l2jserver.gameserver.model.skills.Skill;
+import com.l2jserver.gameserver.util.Util;
+import com.l2jserver.util.Rnd;
+
+/**
+ * @author Mobius
+ */
+public final class Fighter implements Runnable
+{
+ private L2PcInstance _player;
+ private final L2QuestGuardInstance _guard;
+ private int _followRange = 150;
+
+ public Fighter(L2PcInstance player, L2QuestGuardInstance guard)
+ {
+ _player = player;
+ _guard = guard;
+ _guard.setIsRunning(true);
+ if (_guard.getSpawn() != null)
+ {
+ _guard.setSpawn(null);
+ }
+ }
+
+ public void setPlayer(L2PcInstance player)
+ {
+ _player = player;
+ }
+
+ public void setFollowRange(int range)
+ {
+ _followRange = range;
+ }
+
+ @Override
+ public void run()
+ {
+ // Schedule new task only when necessary.
+ if ((_guard == null) || _guard.isDead() || (_player == null))
+ {
+ return;
+ }
+ ThreadPoolManager.getInstance().scheduleGeneral(new Fighter(_player, _guard), _guard.isInCombat() ? 1000 : 3000);
+
+ // Guard is occupied. Use skills logic.
+ if (_guard.isInCombat())
+ {
+ if ((_guard.getTarget() != null) && _guard.getTarget().isMonster() && ((L2Character) _guard.getTarget()).isAlikeDead())
+ {
+ for (Skill skill : _guard.getSkills().values())
+ {
+ if (skill.isBad() && (skill.getCoolTime() <= 0) && !_guard.isCastingNow() && (_guard.calculateDistance(_guard.getTarget(), false, false) < skill.getCastRange()))
+ {
+ _guard.setHeading(Util.calculateHeadingFrom(_guard, _guard.getTarget()));
+ skill.activateSkill(_guard, _guard.getTarget());
+ break;
+ }
+ }
+ }
+ return; // Guard is occupied, no need to proceed.
+ }
+
+ // Assist combat logic.
+ if (_player.isInCombat() && (_player.getTarget() != null) && _player.getTarget().isMonster() && !_player.getTarget().isInvul() //
+ && ((L2Character) _player.getTarget()).isInCombat() && !((L2Character) _player.getTarget()).isAlikeDead())
+ {
+ if (_guard.calculateDistance(_player.getTarget(), false, false) > 50)
+ {
+ _guard.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, _player.getTarget().getLocation());
+ }
+ else if (_guard.getTarget() != _player.getTarget())
+ {
+ _guard.addDamageHate((L2Character) _player.getTarget(), 0, 1000);
+ }
+ }
+
+ // Try to kill nearby monsters logic.
+ for (L2Character ch : _guard.getKnownList().getKnownCharacters())
+ {
+ if (ch.isMonster() && !ch.isInvul() && !ch.isAlikeDead())
+ {
+ _guard.addDamageHate(ch, 0, 1000);
+ break;
+ }
+ }
+
+ // Out of combat follow logic.
+ if (!_guard.isInCombat())
+ {
+ final int moveToLocX = _player.getLocation().getX() + Rnd.get((_followRange * -1), _followRange);
+ final int moveToLocY = _player.getLocation().getY() + Rnd.get((_followRange * -1), _followRange);
+ final int moveToLocZ = _player.getLocation().getZ();
+ final Location moveToLocation = new Location(moveToLocX, moveToLocY, moveToLocZ);
+ _guard.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, moveToLocation);
+ }
+ }
+}
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/AI/Healer.java b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/AI/Healer.java
new file mode 100644
index 0000000000..617f04d1af
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/AI/Healer.java
@@ -0,0 +1,131 @@
+/*
+ * 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.KartiasLabyrinth.AI;
+
+import com.l2jserver.gameserver.ThreadPoolManager;
+import com.l2jserver.gameserver.ai.CtrlIntention;
+import com.l2jserver.gameserver.model.Location;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.actor.instance.L2QuestGuardInstance;
+import com.l2jserver.gameserver.model.skills.Skill;
+import com.l2jserver.gameserver.util.Util;
+import com.l2jserver.util.Rnd;
+
+/**
+ * @author Mobius
+ */
+public final class Healer implements Runnable
+{
+ private L2PcInstance _player;
+ private final L2QuestGuardInstance _guard;
+ private int _followRange = 200;
+
+ public Healer(L2PcInstance player, L2QuestGuardInstance guard)
+ {
+ _player = player;
+ _guard = guard;
+ _guard.setIsRunning(true);
+ if (_guard.getSpawn() != null)
+ {
+ _guard.setSpawn(null);
+ }
+ }
+
+ public void setPlayer(L2PcInstance player)
+ {
+ _player = player;
+ }
+
+ public void setFollowRange(int range)
+ {
+ _followRange = range;
+ }
+
+ @Override
+ public void run()
+ {
+ // Schedule new task only when necessary.
+ if ((_guard == null) || _guard.isDead() || (_player == null))
+ {
+ return;
+ }
+ ThreadPoolManager.getInstance().scheduleGeneral(new Healer(_player, _guard), _guard.isInCombat() ? 1000 : 3000);
+
+ // Guard is occupied. Use skills logic.
+ if (_guard.isInCombat())
+ {
+ L2PcInstance targetPlayer = null;
+ for (L2Character ch : _guard.getKnownList().getKnownCharacters())
+ {
+ if (ch.isPlayer() && !ch.isAlikeDead())
+ {
+ targetPlayer = (L2PcInstance) ch;
+ break;
+ }
+ }
+ for (Skill skill : _guard.getSkills().values())
+ {
+ if ((targetPlayer != null) && !targetPlayer.isAlikeDead() //
+ && !skill.isBad() && !_guard.isCastingNow() && (_guard.calculateDistance(targetPlayer, false, false) < skill.getCastRange()))
+ {
+ _guard.setHeading(Util.calculateHeadingFrom(_guard, targetPlayer));
+ _guard.setTarget(targetPlayer);
+ skill.activateSkill(_guard, targetPlayer);
+ break;
+ }
+ }
+ return; // Guard is occupied, no need to proceed.
+ }
+
+ // Assist combat logic.
+ if (_player.isInCombat() && (_player.getTarget() != null) && _player.getTarget().isMonster() && !_player.getTarget().isInvul() //
+ && ((L2Character) _player.getTarget()).isInCombat() && !((L2Character) _player.getTarget()).isAlikeDead())
+ {
+ if (_guard.calculateDistance(_player.getTarget(), false, false) > 50)
+ {
+ _guard.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, _player.getTarget().getLocation());
+ }
+ else if (_guard.getTarget() != _player.getTarget())
+ {
+ _guard.addDamageHate((L2Character) _player.getTarget(), 0, 1000);
+ }
+ }
+
+ // Try to kill nearby monsters logic.
+ for (L2Character ch : _guard.getKnownList().getKnownCharacters())
+ {
+ if (ch.isMonster() && !ch.isInvul() && !ch.isAlikeDead())
+ {
+ _guard.addDamageHate(ch, 0, 1000);
+ break;
+ }
+ }
+
+ // Out of combat follow logic.
+ if (!_guard.isInCombat())
+ {
+ final int moveToLocX = _player.getLocation().getX() + Rnd.get((_followRange * -1), _followRange);
+ final int moveToLocY = _player.getLocation().getY() + Rnd.get((_followRange * -1), _followRange);
+ final int moveToLocZ = _player.getLocation().getZ();
+ final Location moveToLocation = new Location(moveToLocX, moveToLocY, moveToLocZ);
+ _guard.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, moveToLocation);
+ }
+ }
+}
diff --git a/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/KartiasLabyrinth.java b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/KartiasLabyrinth.java
new file mode 100644
index 0000000000..71b509af00
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KartiasLabyrinth/KartiasLabyrinth.java
@@ -0,0 +1,767 @@
+/*
+ * 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.KartiasLabyrinth;
+
+import instances.AbstractInstance;
+import instances.KartiasLabyrinth.AI.Fighter;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import com.l2jserver.Config;
+import com.l2jserver.gameserver.ThreadPoolManager;
+import com.l2jserver.gameserver.instancemanager.InstanceManager;
+import com.l2jserver.gameserver.model.Location;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+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.skills.AbnormalVisualEffect;
+import com.l2jserver.gameserver.network.NpcStringId;
+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
+import com.l2jserver.gameserver.util.Util;
+
+/**
+ * Kartia's Labyrinth
+ * @author Mobius
+ */
+public final class KartiasLabyrinth extends AbstractInstance
+{
+ // NPCs
+ private static final int RESEARCHER = 33647;
+ private static final int ADOLPH = 33608;
+ private static final int BARTON = 33610;
+ private static final int HAYUK = 33612;
+ private static final int ELIYAH = 33614;
+ private static final int ELISE = 33616;
+ private static final int ADOLPH_88 = 33609;
+ private static final int BARTON_88 = 33611;
+ private static final int HAYUK_88 = 33613;
+ private static final int ELIYAH_88 = 33615;
+ private static final int ELISE_88 = 33617;
+ private static final int ADOLPH_93 = 33620;
+ private static final int BARTON_93 = 33622;
+ private static final int HAYUK_93 = 33624;
+ private static final int ELIYAH_93 = 33626;
+ private static final int ELISE_93 = 33628;
+ private static final int ADOLPH_98 = 33631;
+ private static final int BARTON_98 = 33633;
+ private static final int HAYUK_98 = 33635;
+ private static final int ELIYAH_98 = 33637;
+ private static final int ELISE_98 = 33639;
+ private static final List BOSSES = new ArrayList<>();
+ static
+ {
+ BOSSES.add(19253);
+ BOSSES.add(19254);
+ BOSSES.add(19255);
+ BOSSES.add(25882);
+ BOSSES.add(25883);
+ BOSSES.add(25884);
+ }
+ private static final List MONSTERS = new ArrayList<>();
+ static
+ {
+ MONSTERS.add(19220);
+ MONSTERS.add(19221);
+ MONSTERS.add(19222);
+ MONSTERS.add(19223);
+ MONSTERS.add(19224);
+ MONSTERS.add(19225);
+ MONSTERS.add(19226);
+ MONSTERS.add(19227);
+ MONSTERS.add(19228);
+ MONSTERS.add(19229);
+ MONSTERS.add(19230);
+ MONSTERS.add(19231);
+ MONSTERS.add(19232);
+ MONSTERS.add(19233);
+ MONSTERS.add(19234);
+ MONSTERS.add(19235);
+ MONSTERS.add(19236);
+ MONSTERS.add(19237);
+ }
+ // Locations
+ private static final Location START_LOC = new Location(-107481, -10435, -12064);
+ private static final Location VANGUARD_SPAWN_LOC = new Location(-109032, -10440, -11949, 32800);
+ // Misc
+ private static final int DOOR_1 = 16170002;
+ private static final int DOOR_2 = 16170003;
+ private static final int SOLO_85_TEMPLATE_ID = 205;
+ private static final int SOLO_90_TEMPLATE_ID = 206;
+ private static final int SOLO_95_TEMPLATE_ID = 207;
+ private static final int PARTY_85_TEMPLATE_ID = 208;
+ private static final int PARTY_90_TEMPLATE_ID = 209;
+ private static final int PARTY_95_TEMPLATE_ID = 210;
+ private static final int MIN_LVL_85 = 85;
+ private static final int MIN_LVL_90 = 90;
+ private static final int MIN_LVL_95 = 95;
+ private static final int MAX_LVL_85 = 89;
+ private static final int MAX_LVL_90 = 94;
+ private static final int MAX_LVL_95 = 99;
+ private static final String KARTIA_ENTRY_VAR = "Last_Kartia_entry";
+
+ protected class KartiaWorld extends InstanceWorld
+ {
+ L2QuestGuardInstance adolph = null;
+ L2QuestGuardInstance barton = null;
+ L2QuestGuardInstance hayuk = null;
+ L2QuestGuardInstance eliyah = null;
+ L2QuestGuardInstance elise = null;
+ List savedSpawns = new CopyOnWriteArrayList<>();
+ }
+
+ public KartiasLabyrinth()
+ {
+ super(KartiasLabyrinth.class.getSimpleName());
+ addStartNpc(RESEARCHER, ADOLPH);
+ addFirstTalkId(RESEARCHER, ADOLPH, BARTON, HAYUK, ELIYAH, ELISE);
+ addTalkId(RESEARCHER, ADOLPH, BARTON, HAYUK, ELIYAH, ELISE);
+ addKillId(MONSTERS);
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ String htmltext = null;
+ switch (event)
+ {
+ case "33608-1.htm":
+ case "33608-2.htm":
+ case "33647-1.htm":
+ case "33647-2.htm":
+ case "33647-3.htm":
+ case "33647-4.htm":
+ {
+ htmltext = event;
+ break;
+ }
+ case "request_zellaka_solo":
+ {
+ if (!checkConditions(player, SOLO_85_TEMPLATE_ID))
+ {
+ htmltext = "33647-8.htm";
+ }
+ else if ((player.getLevel() >= MIN_LVL_85) && (player.getLevel() <= MAX_LVL_85))
+ {
+ enterInstance(player, new KartiaWorld(), "KartiasLabyrinthIncarnationOfGreedZellaka.xml", SOLO_85_TEMPLATE_ID);
+ htmltext = "33647-5.htm";
+ }
+ else
+ {
+ htmltext = "33647-6.htm";
+ }
+ break;
+ }
+ case "request_pelline_solo":
+ {
+ if (!checkConditions(player, SOLO_90_TEMPLATE_ID))
+ {
+ htmltext = "33647-8.htm";
+ }
+ else if ((player.getLevel() >= MIN_LVL_90) && (player.getLevel() <= MAX_LVL_90))
+ {
+ enterInstance(player, new KartiaWorld(), "KartiasLabyrinthIncarnationOfJealousyPelline.xml", SOLO_90_TEMPLATE_ID);
+ htmltext = "33647-5.htm";
+ }
+ else
+ {
+ htmltext = "33647-6.htm";
+ }
+ break;
+ }
+ case "request_kalios_solo":
+ {
+ if (!checkConditions(player, SOLO_95_TEMPLATE_ID))
+ {
+ htmltext = "33647-8.htm";
+ }
+ else if ((player.getLevel() >= MIN_LVL_95) && (player.getLevel() <= MAX_LVL_95))
+ {
+ enterInstance(player, new KartiaWorld(), "KartiasLabyrinthIncarnationOfGluttonyKalios.xml", SOLO_95_TEMPLATE_ID);
+ htmltext = "33647-5.htm";
+ }
+ else
+ {
+ htmltext = "33647-6.htm";
+ }
+ break;
+ }
+ case "request_zellaka_party":
+ {
+ if ((player.getParty() == null) || (!player.getParty().isLeader(player)))
+ {
+ htmltext = "33647-7.htm";
+ }
+ else
+ {
+ for (L2PcInstance member : player.getParty().getMembers())
+ {
+ if (!checkConditions(member, PARTY_85_TEMPLATE_ID) || (member.getLevel() < MIN_LVL_85) || (member.getLevel() > MAX_LVL_85) || (Util.calculateDistance(player, member, false, false) > 500))
+ {
+ return "33647-8.htm";
+ }
+ }
+ final KartiaWorld world = new KartiaWorld();
+ for (L2PcInstance member : player.getParty().getMembers())
+ {
+ enterInstance(member, world, "KartiasLabyrinthIncarnationOfGreedZellakaParty.xml", PARTY_85_TEMPLATE_ID);
+ }
+ htmltext = "33647-5.htm";
+ }
+ break;
+ }
+ case "request_pelline_party":
+ {
+ if ((player.getParty() == null) || (!player.getParty().isLeader(player)))
+ {
+ htmltext = "33647-7.htm";
+ }
+ else
+ {
+ for (L2PcInstance member : player.getParty().getMembers())
+ {
+ if (!checkConditions(member, PARTY_90_TEMPLATE_ID) || (member.getLevel() < MIN_LVL_90) || (member.getLevel() > MAX_LVL_90) || (Util.calculateDistance(player, member, false, false) > 500))
+ {
+ return "33647-8.htm";
+ }
+ }
+ final KartiaWorld world = new KartiaWorld();
+ for (L2PcInstance member : player.getParty().getMembers())
+ {
+ enterInstance(member, world, "KartiasLabyrinthIncarnationOfJealousyPellineParty.xml", PARTY_90_TEMPLATE_ID);
+ }
+ htmltext = "33647-5.htm";
+ }
+ break;
+ }
+ case "request_kalios_party":
+ {
+ if ((player.getParty() == null) || (!player.getParty().isLeader(player)))
+ {
+ htmltext = "33647-7.htm";
+ }
+ else
+ {
+ for (L2PcInstance member : player.getParty().getMembers())
+ {
+ if (!checkConditions(member, PARTY_95_TEMPLATE_ID) || (member.getLevel() < MIN_LVL_95) || (member.getLevel() > MAX_LVL_95) || (Util.calculateDistance(player, member, false, false) > 500))
+ {
+ return "33647-8.htm";
+ }
+ }
+ final KartiaWorld world = new KartiaWorld();
+ for (L2PcInstance member : player.getParty().getMembers())
+ {
+ enterInstance(member, world, "KartiasLabyrinthIncarnationOfGluttonyKaliosParty.xml", PARTY_95_TEMPLATE_ID);
+ }
+ htmltext = "33647-5.htm";
+ }
+ break;
+ }
+ case "remove_barton":
+ {
+ htmltext = removeVanguard(player, BARTON);
+ break;
+ }
+ case "remove_hayuk":
+ {
+ htmltext = removeVanguard(player, HAYUK);
+ break;
+ }
+ case "remove_eliyah":
+ {
+ htmltext = removeVanguard(player, ELIYAH);
+ break;
+ }
+ case "remove_elise":
+ {
+ htmltext = removeVanguard(player, ELISE);
+ break;
+ }
+ case "checkStatus":
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
+ if ((world == null) || !(world instanceof KartiaWorld) || (world.getStatus() > 28))
+ {
+ cancelQuestTimers("checkStatus");
+ return null;
+ }
+ // Remove monsters killed by guards.
+ for (L2Npc spawn : ((KartiaWorld) world).savedSpawns)
+ {
+ if (spawn.isDead())
+ {
+ ((KartiaWorld) world).savedSpawns.remove(spawn);
+ }
+ }
+ // Act according to world status.
+ switch (world.getStatus())
+ {
+ case 2:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave2", world.getInstanceId()));
+ }
+ break;
+ }
+ case 3:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave3", world.getInstanceId()));
+ }
+ break;
+ }
+ case 4:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave4", world.getInstanceId()));
+ }
+ break;
+ }
+ case 5:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave5", world.getInstanceId()));
+ }
+ break;
+ }
+ case 6:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave6", world.getInstanceId()));
+ }
+ break;
+ }
+ case 7:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave7", world.getInstanceId()));
+ }
+ break;
+ }
+ case 8:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave8", world.getInstanceId()));
+ }
+ break;
+ }
+ case 9:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave9", world.getInstanceId()));
+ }
+ break;
+ }
+ case 10:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave10", world.getInstanceId()));
+ }
+ break;
+ }
+ case 11:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave11", world.getInstanceId()));
+ }
+ break;
+ }
+ case 12:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave12", world.getInstanceId()));
+ }
+ break;
+ }
+ case 13:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave13", world.getInstanceId()));
+ }
+ break;
+ }
+ case 14:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave14", world.getInstanceId()));
+ }
+ break;
+ }
+ case 15:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave15", world.getInstanceId()));
+ }
+ break;
+ }
+ case 16:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave16", world.getInstanceId()));
+ }
+ break;
+ }
+ case 17:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave17", world.getInstanceId()));
+ }
+ break;
+ }
+ case 18:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave18", world.getInstanceId()));
+ }
+ break;
+ }
+ case 19:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave19", world.getInstanceId()));
+ broadcastScreenMessage(player, NpcStringId.STAGE_2);
+ openDoor(DOOR_1, world.getInstanceId());
+ }
+ break;
+ }
+ case 20:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave20", world.getInstanceId()));
+ broadcastScreenMessage(player, NpcStringId.STAGE_3);
+ openDoor(DOOR_2, world.getInstanceId());
+ }
+ break;
+ }
+ case 21:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave21", world.getInstanceId()));
+ }
+ break;
+ }
+ case 22:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave22", world.getInstanceId()));
+ }
+ break;
+ }
+ case 23:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave23", world.getInstanceId()));
+ }
+ break;
+ }
+ case 24:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave24", world.getInstanceId()));
+ }
+ break;
+ }
+ case 25:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave25", world.getInstanceId()));
+ }
+ break;
+ }
+ case 26:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ world.incStatus();
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave26", world.getInstanceId()));
+ for (L2Npc monster : ((KartiaWorld) world).savedSpawns)
+ {
+ if (BOSSES.contains(monster.getId()))
+ {
+ monster.startAbnormalVisualEffect(AbnormalVisualEffect.FLESH_STONE);
+ monster.setIsImmobilized(true);
+ monster.setIsInvul(true);
+ monster.broadcastInfo();
+ break;
+ }
+ }
+ }
+ break;
+ }
+ case 27:
+ {
+ if (((KartiaWorld) world).savedSpawns.size() == 1)
+ {
+ world.incStatus();
+ final L2Character boss = ((KartiaWorld) world).savedSpawns.get(0);
+ boss.stopAbnormalVisualEffect(AbnormalVisualEffect.FLESH_STONE);
+ boss.setIsImmobilized(false);
+ boss.setIsInvul(false);
+ boss.broadcastInfo();
+ }
+ break;
+ }
+ case 28:
+ {
+ if (((KartiaWorld) world).savedSpawns.isEmpty())
+ {
+ // 5 minute exit timer.
+ InstanceManager.getInstance().getInstance(world.getInstanceId()).setDuration(Config.INSTANCE_FINISH_TIME);
+ InstanceManager.getInstance().getInstance(world.getInstanceId()).setEmptyDestroyTime(0);
+ // Stop quest timer.
+ world.incStatus();
+ }
+ break;
+ }
+ }
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onFirstTalk(L2Npc npc, L2PcInstance player)
+ {
+ return npc.getId() + ".htm";
+ }
+
+ @Override
+ public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(killer);
+ if ((world == null) || !(world instanceof KartiaWorld))
+ {
+ return null;
+ }
+ ((KartiaWorld) world).savedSpawns.remove(npc);
+ return super.onKill(npc, killer, isSummon);
+ }
+
+ @Override
+ public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
+ {
+ player.getVariables().set(KARTIA_ENTRY_VAR, System.currentTimeMillis());
+ world.addAllowed(player.getObjectId());
+ teleportPlayer(player, START_LOC, world.getInstanceId(), false);
+ }
+
+ @Override
+ protected boolean checkConditions(L2PcInstance player)
+ {
+ final long lastEntry = player.getVariables().getLong(KARTIA_ENTRY_VAR, 0);
+ Calendar entryResetTime = Calendar.getInstance();
+ entryResetTime.set(Calendar.HOUR, 6);
+ entryResetTime.set(Calendar.MINUTE, 30);
+ entryResetTime.set(Calendar.AM_PM, Calendar.AM);
+ if (lastEntry < entryResetTime.getTimeInMillis())
+ {
+ return true;
+ }
+ return false;
+ }
+
+ private String removeVanguard(L2PcInstance player, int removedNpcId)
+ {
+ final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
+ if ((world == null) || !(world instanceof KartiaWorld) || (world.getStatus() > 0))
+ {
+ return null;
+ }
+ world.setStatus(1);
+ switch (world.getTemplateId())
+ {
+ case SOLO_85_TEMPLATE_ID:
+ case PARTY_85_TEMPLATE_ID:
+ {
+ if (removedNpcId != BARTON)
+ {
+ ((KartiaWorld) world).barton = (L2QuestGuardInstance) addSpawn(BARTON_88, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ if (removedNpcId != HAYUK)
+ {
+ ((KartiaWorld) world).hayuk = (L2QuestGuardInstance) addSpawn(HAYUK_88, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ if (removedNpcId != ELIYAH)
+ {
+ ((KartiaWorld) world).eliyah = (L2QuestGuardInstance) addSpawn(ELIYAH_88, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ if (removedNpcId != ELISE)
+ {
+ ((KartiaWorld) world).elise = (L2QuestGuardInstance) addSpawn(ELISE_88, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ ((KartiaWorld) world).adolph = (L2QuestGuardInstance) addSpawn(ADOLPH_88, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ break;
+ }
+ case SOLO_90_TEMPLATE_ID:
+ case PARTY_90_TEMPLATE_ID:
+ {
+ if (removedNpcId != BARTON)
+ {
+ ((KartiaWorld) world).barton = (L2QuestGuardInstance) addSpawn(BARTON_93, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ if (removedNpcId != HAYUK)
+ {
+ ((KartiaWorld) world).hayuk = (L2QuestGuardInstance) addSpawn(HAYUK_93, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ if (removedNpcId != ELIYAH)
+ {
+ ((KartiaWorld) world).eliyah = (L2QuestGuardInstance) addSpawn(ELIYAH_93, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ if (removedNpcId != ELISE)
+ {
+ ((KartiaWorld) world).elise = (L2QuestGuardInstance) addSpawn(ELISE_93, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ ((KartiaWorld) world).adolph = (L2QuestGuardInstance) addSpawn(ADOLPH_93, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ break;
+ }
+ case SOLO_95_TEMPLATE_ID:
+ case PARTY_95_TEMPLATE_ID:
+ {
+ if (removedNpcId != BARTON)
+ {
+ ((KartiaWorld) world).barton = (L2QuestGuardInstance) addSpawn(BARTON_98, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ if (removedNpcId != HAYUK)
+ {
+ ((KartiaWorld) world).hayuk = (L2QuestGuardInstance) addSpawn(HAYUK_98, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ if (removedNpcId != ELIYAH)
+ {
+ ((KartiaWorld) world).eliyah = (L2QuestGuardInstance) addSpawn(ELIYAH_98, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ if (removedNpcId != ELISE)
+ {
+ ((KartiaWorld) world).elise = (L2QuestGuardInstance) addSpawn(ELISE_98, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ }
+ ((KartiaWorld) world).adolph = (L2QuestGuardInstance) addSpawn(ADOLPH_98, VANGUARD_SPAWN_LOC, true, 0, false, world.getInstanceId());
+ break;
+ }
+ }
+ // Start combat.
+ world.incStatus();
+ if (player.getParty() != null)
+ {
+ for (L2PcInstance member : player.getParty().getMembers())
+ {
+ member.teleToLocation(VANGUARD_SPAWN_LOC, true);
+ }
+ }
+ else
+ {
+ player.teleToLocation(VANGUARD_SPAWN_LOC, true);
+ }
+ if (((KartiaWorld) world).adolph != null)
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new Fighter(player, ((KartiaWorld) world).adolph), 1000);
+ }
+ if (((KartiaWorld) world).barton != null)
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new Fighter(player, ((KartiaWorld) world).barton), 1000);
+ }
+ if (((KartiaWorld) world).hayuk != null)
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new Fighter(player, ((KartiaWorld) world).hayuk), 1000);
+ }
+ if (((KartiaWorld) world).eliyah != null)
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new Fighter(player, ((KartiaWorld) world).eliyah), 1000);
+ }
+ if (((KartiaWorld) world).elise != null)
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new Fighter(player, ((KartiaWorld) world).elise), 1000);
+ }
+ ((KartiaWorld) world).savedSpawns.addAll(spawnGroup("wave1", world.getInstanceId()));
+ startQuestTimer("checkStatus", 5000, null, player, true);
+ broadcastScreenMessage(player, NpcStringId.STAGE_1);
+ return "33608-1.htm";
+ }
+
+ private void broadcastScreenMessage(L2PcInstance player, NpcStringId stringId)
+ {
+ if (player.getParty() != null)
+ {
+ for (L2PcInstance member : player.getParty().getMembers())
+ {
+ if (member == null)
+ {
+ continue;
+ }
+ member.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 5000, false, null, stringId, null));
+ }
+ }
+ else
+ {
+ player.sendPacket(new ExShowScreenMessage(2, -1, 2, 0, 0, 0, 0, true, 5000, false, null, stringId, null));
+ }
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/stats/npcs/19200-19299.xml b/trunk/dist/game/data/stats/npcs/19200-19299.xml
index 9f92564bff..058ffe8632 100644
--- a/trunk/dist/game/data/stats/npcs/19200-19299.xml
+++ b/trunk/dist/game/data/stats/npcs/19200-19299.xml
@@ -527,11 +527,12 @@
-
-
+
+
+
UNDEAD
-
-
+
+
@@ -543,7 +544,7 @@
333
-
+
@@ -555,11 +556,12 @@
-
-
+
+
UNDEAD
-
-
+
+
+
@@ -571,10 +573,12 @@
333
-
+
+
+
@@ -583,11 +587,11 @@
-
+
UNDEAD
-
-
+
+
@@ -599,10 +603,12 @@
333
-
+
+
+
@@ -610,7 +616,7 @@
-
+
DEMONIC
@@ -626,7 +632,7 @@
333
-
+
@@ -639,7 +645,7 @@
-
+
DEMONIC
@@ -655,7 +661,7 @@
333
-
+
@@ -668,7 +674,7 @@
-
+
UNDEAD
@@ -684,7 +690,7 @@
333
-
+
@@ -698,7 +704,7 @@
-
+
DRAGON
@@ -714,7 +720,7 @@
333
-
+
@@ -727,7 +733,7 @@
-
+
DRAGON
@@ -743,7 +749,7 @@
333
-
+
@@ -756,7 +762,7 @@
-
+
DRAGON
@@ -772,7 +778,7 @@
333
-
+
@@ -1458,11 +1464,12 @@
-
-
+
+
DEMONIC
-
-
+
+
+
@@ -1498,11 +1505,12 @@
-
-
+
+
DEMONIC
-
-
+
+
+
diff --git a/trunk/dist/game/data/stats/npcs/33600-33699.xml b/trunk/dist/game/data/stats/npcs/33600-33699.xml
index 4296c7b09c..14c9bca351 100644
--- a/trunk/dist/game/data/stats/npcs/33600-33699.xml
+++ b/trunk/dist/game/data/stats/npcs/33600-33699.xml
@@ -179,6 +179,7 @@
HUMAN
+
@@ -201,9 +202,10 @@
-
+
HUMAN
+
@@ -235,6 +237,7 @@
ORC
+
@@ -257,9 +260,10 @@
-
+
ORC
+
@@ -290,6 +294,7 @@
ELF
+
@@ -312,9 +317,10 @@
-
+
ELF
+
@@ -367,7 +373,7 @@
-
+
HUMAN
@@ -397,6 +403,7 @@
HUMAN
+
@@ -419,9 +426,10 @@
-
+
HUMAN
+
@@ -500,9 +508,10 @@
-
+
HUMAN
+
@@ -556,9 +565,10 @@
-
+
ORC
+
@@ -611,9 +621,10 @@
-
+
ELF
+
@@ -666,7 +677,7 @@
-
+
HUMAN
@@ -718,9 +729,10 @@
-
+
HUMAN
+
@@ -799,9 +811,10 @@
-
+
HUMAN
+
@@ -855,9 +868,10 @@
-
+
ORC
+
@@ -910,9 +924,10 @@
-
+
ELF
+
@@ -965,7 +980,7 @@
-
+
HUMAN
@@ -1017,9 +1032,10 @@
-
+
HUMAN
+
@@ -1101,6 +1117,7 @@
ETC
+
diff --git a/trunk/dist/game/data/stats/npcs/33700-33799.xml b/trunk/dist/game/data/stats/npcs/33700-33799.xml
index a1c70a54dc..31f03a9d1d 100644
--- a/trunk/dist/game/data/stats/npcs/33700-33799.xml
+++ b/trunk/dist/game/data/stats/npcs/33700-33799.xml
@@ -2375,7 +2375,7 @@
-
+
ETC
@@ -2391,13 +2391,13 @@
500
-
+
-
+
ETC
@@ -2413,7 +2413,7 @@
500
-
+