From ded86c99d9dc0673da34f82b9b9bd1c5e9610371 Mon Sep 17 00:00:00 2001
From: mobius <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Sat, 21 Feb 2015 22:33:08 +0000
Subject: [PATCH] Quest The Secret Ingredients (10745). Contributed by
Neanrakyr.
---
.../game/data/instances/KaraphonHabitat.xml | 17 ++
.../scripts/instances/InstanceLoader.java | 2 +
.../KaraphonHabitat/KaraphonHabitat.java | 91 ++++++++
.../Q10745_TheSecretIngredients/33933-01.html | 5 +
.../Q10745_TheSecretIngredients/33933-02.html | 4 +
.../Q10745_TheSecretIngredients/33954-01.htm | 4 +
.../Q10745_TheSecretIngredients/33954-02.html | 6 +
.../Q10745_TheSecretIngredients/33954-03.html | 6 +
.../Q10745_TheSecretIngredients/33954-04.html | 5 +
.../Q10745_TheSecretIngredients/34002.html | 5 +
.../Q10745_TheSecretIngredients.java | 219 ++++++++++++++++++
.../scripts/quests/QuestMasterHandler.java | 4 +-
.../dist/game/data/stats/npcs/23400-23500.xml | 160 ++++++++++---
13 files changed, 501 insertions(+), 27 deletions(-)
create mode 100644 trunk/dist/game/data/instances/KaraphonHabitat.xml
create mode 100644 trunk/dist/game/data/scripts/instances/KaraphonHabitat/KaraphonHabitat.java
create mode 100644 trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33933-01.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33933-02.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-01.htm
create mode 100644 trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-02.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-03.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-04.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/34002.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/Q10745_TheSecretIngredients.java
diff --git a/trunk/dist/game/data/instances/KaraphonHabitat.xml b/trunk/dist/game/data/instances/KaraphonHabitat.xml
new file mode 100644
index 0000000000..59569b6cd6
--- /dev/null
+++ b/trunk/dist/game/data/instances/KaraphonHabitat.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 b7d1759961..db1b6158d6 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.KaraphonHabitat.KaraphonHabitat;
import instances.LabyrinthOfBelis.LabyrinthOfBelis;
import instances.LibraryOfSages.LibraryOfSages;
import instances.MithrilMine.MithrilMine;
@@ -87,6 +88,7 @@ public final class InstanceLoader
JiniaGuildHideout3.class,
JiniaGuildHideout4.class,
Kamaloka.class,
+ KaraphonHabitat.class,
LabyrinthOfBelis.class,
LibraryOfSages.class,
MithrilMine.class,
diff --git a/trunk/dist/game/data/scripts/instances/KaraphonHabitat/KaraphonHabitat.java b/trunk/dist/game/data/scripts/instances/KaraphonHabitat/KaraphonHabitat.java
new file mode 100644
index 0000000000..53dd060ade
--- /dev/null
+++ b/trunk/dist/game/data/scripts/instances/KaraphonHabitat/KaraphonHabitat.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2004-2015 L2J Mobius DataPack
+ *
+ * This file is part of L2J Mobius DataPack.
+ *
+ * L2J Mobius 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 Mobius 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.KaraphonHabitat;
+
+import instances.AbstractInstance;
+
+import quests.Q10745_TheSecretIngredients.Q10745_TheSecretIngredients;
+
+import com.l2jserver.gameserver.instancemanager.InstanceManager;
+import com.l2jserver.gameserver.model.Location;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
+import com.l2jserver.gameserver.model.quest.QuestState;
+
+/**
+ * @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;
+
+ protected class KHWorld extends InstanceWorld
+ {
+ }
+
+ @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);
+ world.removeAllowed(player.getObjectId());
+ teleportPlayer(player, EXIT_LOC, 0);
+ }
+
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ public KaraphonHabitat()
+ {
+ super(KaraphonHabitat.class.getSimpleName());
+ addStartNpc(DOLKIN);
+ addTalkId(DOLKIN, DOLKIN_INSTANCE);
+ }
+
+ @Override
+ public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
+ {
+ if (firstEntrance)
+ {
+ world.addAllowed(player.getObjectId());
+ }
+ teleportPlayer(player, START_LOC, world.getInstanceId());
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33933-01.html b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33933-01.html
new file mode 100644
index 0000000000..681382e1aa
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33933-01.html
@@ -0,0 +1,5 @@
+
Karla:
+I can tell you came from the Whispering Woods. How do I know? Um, I can feel Karaphon's power inside you.
+Haha, just kidding. There was a leaf stuck on you, that's all. You are quite guillible, aren't you? Anyway, what brings you here?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33933-02.html b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33933-02.html
new file mode 100644
index 0000000000..2a42c0e798
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33933-02.html
@@ -0,0 +1,4 @@
+Karla:
+Ah... Dolkin, that old dwarf again!
+He's always taking advantage of nice kids like you. You brought his report, right? I will pay you for your troubles. Give me report.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-01.htm b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-01.htm
new file mode 100644
index 0000000000..98376149d7
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-01.htm
@@ -0,0 +1,4 @@
+Maestro Dolkin:
+Want to hear some good news? There is a very interesting creature living deep within the Whispering Woods. It looks like the Treant, but it's got a special characteristic all its own. How about it? Aren't you curious? If you help me, of course I'll give you something good in return!
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-02.html b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-02.html
new file mode 100644
index 0000000000..fd0afc2b9d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-02.html
@@ -0,0 +1,6 @@
+Maestro Dolkin:
+The creature in question is called Karaphon! Its leaves are like scales, making them very tough.
+The truth is, a Treant's leaves are also very good, but they can't compare to the leaves of a Karaphon.
+Bring me back its leaves and I'll give you something just as good. Will you go?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-03.html b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-03.html
new file mode 100644
index 0000000000..a41722e5ad
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-03.html
@@ -0,0 +1,6 @@
+Maestro Dolkin:
+Oh, you've managed to come back in one piece!
+No no, don't look at me like that. I'm just relieved that you came back safely. I wasn't worried, if that's what you're thinking. Hm Hm.
+But, there is still something you need to do for me. I can continue to do research here thanks to Karla, and she asks that I create a strong armor for a fox in return..
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-04.html b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-04.html
new file mode 100644
index 0000000000..a21dec2bd4
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/33954-04.html
@@ -0,0 +1,5 @@
+Maestro Dolkin:
+Hey, you wanna do me a favor? I need to get Karla the monthly progress update on my research. Why don't you stop by and drop it off for me?
+It's research about fox armor. She's been looking for one ever since her fox died that day. She doesn't like to talk about it, but you can tell it eats away at her.
+Well, run along now! She'll see to it that you don't walk away empty-handed.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/34002.html b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/34002.html
new file mode 100644
index 0000000000..5b5a9ae2d2
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/34002.html
@@ -0,0 +1,5 @@
+Maestro Dolkin:
+You're better than I thought!
+Shall we step outside ?
+
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/Q10745_TheSecretIngredients.java b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/Q10745_TheSecretIngredients.java
new file mode 100644
index 0000000000..8c63de3c89
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q10745_TheSecretIngredients/Q10745_TheSecretIngredients.java
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 2004-2015 L2J Mobius DataPack
+ *
+ * This file is part of L2J Mobius DataPack.
+ *
+ * L2J Mobius 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 Mobius 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 quests.Q10745_TheSecretIngredients;
+
+import com.l2jserver.gameserver.enums.Race;
+import com.l2jserver.gameserver.model.Location;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.holders.ItemHolder;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.network.NpcStringId;
+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
+
+/**
+ * @author Neanrakyr
+ */
+public class Q10745_TheSecretIngredients extends Quest
+{
+ // Npcs
+ private static final int DOLKIN = 33954;
+ private static final int DOLKIN_INSTANCE = 34002;
+ private static final int KARLA = 33933;
+
+ // Monsters
+ private static final int KARAPHON = 23459;
+ private static final int KEEN_HONEYBEE = 23460;
+ private static final int KEEN_GROWLER = 23461;
+
+ // Locations
+ private static final Location DOLKIN_INSTANCE_SPAWN = new Location(-82407, 246018, -14158);
+
+ // Items
+ private static final ItemHolder SECRET_INGREDIENTS = new ItemHolder(39533, 1);
+ private static final ItemHolder DOLKIN_REPORT = new ItemHolder(39534, 1);
+ private static final ItemHolder FAERON_SUPPORT_BOX = new ItemHolder(40262, 1);
+ private static final ItemHolder FAERON_SUPPORT_BOX_MAGE = new ItemHolder(40263, 1);
+
+ // Level Condition
+ private static final int MIN_LEVEL = 17;
+ private static final int MAX_LEVEL = 25;
+
+ public Q10745_TheSecretIngredients()
+ {
+ super(10745, Q10745_TheSecretIngredients.class.getSimpleName(), "The Secret Ingredients");
+ addStartNpc(DOLKIN);
+ addTalkId(DOLKIN, DOLKIN_INSTANCE, KARLA);
+ addKillId(KARAPHON, KEEN_HONEYBEE, KEEN_GROWLER);
+ registerQuestItems(SECRET_INGREDIENTS.getId(), DOLKIN_REPORT.getId());
+ addCondLevel(MIN_LEVEL, MAX_LEVEL, "fixme.html");
+ addCondRace(Race.ERTHEIA, "fixme.html");
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, false);
+ if (qs == null)
+ {
+ return null;
+ }
+
+ String htmltext = null;
+ switch (event)
+ {
+ case "33954-02.html":
+ {
+ qs.startQuest();
+ htmltext = event;
+ break;
+ }
+
+ case "33954-04.html":
+ {
+ if (qs.isCond(2))
+ {
+ qs.setCond(3);
+ takeItem(player, SECRET_INGREDIENTS);
+ giveItems(player, DOLKIN_REPORT);
+ htmltext = event;
+ }
+ break;
+ }
+
+ case "33933-02.html":
+ {
+ if (qs.isCond(3))
+ {
+ giveAdena(player, 48000, true);
+ addExpAndSp(player, 241076, 5);
+ if (player.isMageClass())
+ {
+ giveItems(player, FAERON_SUPPORT_BOX_MAGE);
+ }
+ else
+ {
+ giveItems(player, FAERON_SUPPORT_BOX);
+ }
+ showOnScreenMsg(player, NpcStringId.CHECK_YOUR_EQUIPMENT_IN_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500);
+ qs.exitQuest(false, true);
+ htmltext = event;
+ }
+ break;
+ }
+
+ case "spawn_dolkin":
+ {
+ showOnScreenMsg(player, NpcStringId.TALK_TO_DOLKIN_AND_LEAVE_THE_KARAPHON_HABITAT, ExShowScreenMessage.TOP_CENTER, 4500);
+ addSpawn(DOLKIN_INSTANCE, DOLKIN_INSTANCE_SPAWN, false, 0, false, player.getInstanceId());
+ break;
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = getQuestState(player, true);
+ String htmltext = getNoQuestMsg(player);
+
+ if (qs.isCompleted())
+ {
+ htmltext = getAlreadyCompletedMsg(player);
+ }
+
+ switch (npc.getId())
+ {
+ case DOLKIN:
+ {
+ if (qs.isCreated())
+ {
+ htmltext = "33954-01.htm";
+ }
+ else if (qs.isCond(2))
+ {
+ htmltext = "33954-03.html";
+ }
+ break;
+ }
+ case KARLA:
+ {
+ switch (qs.getCond())
+ {
+ case 3:
+ {
+ htmltext = "33933-01.html";
+ break;
+ }
+ }
+ }
+ case DOLKIN_INSTANCE:
+ {
+ switch (qs.getCond())
+ {
+ case 2:
+ {
+ htmltext = "34002.html";
+ break;
+ }
+ }
+ }
+ }
+ return htmltext;
+ }
+
+ @Override
+ public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
+ {
+ final QuestState qs = getQuestState(killer, false);
+
+ if ((qs != null) && qs.isCond(1))
+ {
+ switch (npc.getId())
+ {
+ case KARAPHON:
+ {
+ qs.set("KARAPHON", 1);
+ break;
+ }
+ case KEEN_HONEYBEE:
+ {
+ qs.set("KEEN_HONEYBEE", 1);
+ break;
+ }
+ case KEEN_GROWLER:
+ {
+ qs.set("KEEN_GROWLER", 1);
+ break;
+ }
+ }
+
+ if ((qs.get("KARAPHON") != null) && (qs.get("KEEN_HONEYBEE") != null) && (qs.get("KEEN_GROWLER") != null))
+ {
+ giveItems(killer, SECRET_INGREDIENTS);
+ qs.setCond(2, true);
+ startQuestTimer("spawn_dolkin", 5000, npc, killer);
+ }
+ }
+
+ return super.onKill(npc, killer, isSummon);
+ }
+}
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
index b7188e4a4e..63b8b62822 100644
--- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
+++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
@@ -208,6 +208,7 @@ import quests.Q10741_ADraughtForTheCold.Q10741_ADraughtForTheCold;
import quests.Q10742_AFurryFriend.Q10742_AFurryFriend;
import quests.Q10743_StrangeFungus.Q10743_StrangeFungus;
import quests.Q10744_StrongerThanSteel.Q10744_StrongerThanSteel;
+import quests.Q10745_TheSecretIngredients.Q10745_TheSecretIngredients;
/**
* @author NosBit
@@ -404,7 +405,8 @@ public class QuestMasterHandler
Q10741_ADraughtForTheCold.class,
Q10742_AFurryFriend.class,
Q10743_StrangeFungus.class,
- Q10744_StrongerThanSteel.class
+ Q10744_StrongerThanSteel.class,
+ Q10745_TheSecretIngredients.class
};
public static void main(String[] args)
diff --git a/trunk/dist/game/data/stats/npcs/23400-23500.xml b/trunk/dist/game/data/stats/npcs/23400-23500.xml
index 6505509710..bbed2a559c 100644
--- a/trunk/dist/game/data/stats/npcs/23400-23500.xml
+++ b/trunk/dist/game/data/stats/npcs/23400-23500.xml
@@ -1403,52 +1403,160 @@
-
+
+
+
+
+
+ HUMANFEMALE
-
-
+
+
+
+
+
+
+
+
+ 370
-
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HUMAN
+ MALE
+
+
+
+
+
+
+
+
+
+
+
+
+ 370
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+ HUMAN
- FEMALE
-
-
+ MALE
+
+
+
+
+
+
+
+
+ 370
-
-
-
-
-
-
-
-
- HUMAN
- FEMALE
-
-
-
-
-
-
-
-
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+