Merged with released L2J-Unity files.

This commit is contained in:
mobiusdev
2016-06-12 01:34:09 +00:00
parent e003e87887
commit 635557f5da
18352 changed files with 3245113 additions and 2892959 deletions

View File

@@ -0,0 +1,5 @@
<html><body>Priest Cerenas:<br>
Ah, an adventurer! A powerful one, from what I can sense... though you still have much to learn.<br>
Are you curious, adventurer, what destiny has laid out for you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting 31281-02.htm">"Sure, if you call me powerful all the time."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Priest Cerenas:<br>
Are you certain? <font color="LEVEL">Sometimes visions of the future are not entirely welcome.</font><br>
You must not make this decision lightly.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting startQuest">"I am ready."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Priest Cerenas:<br>
I can read worry in your face.<br>
Was your portent a dark one?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting 31281-04.html">"It was... unclear. A woman asked something important of me, but I could not hear her voice."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Priest Cerenas:<br>
Yes, and the woman's face was not clear to you?<br>
Hmm. It is not my place to interpret your future. That is your task. But you do not have to toil alone at this. Shilen's rebirth has brought forth <font color="LEVEL">the One Who Eats Prophecies</font>.<br>
It carries the <font color="LEVEL">Novella Prophecy</font>. If you defeat it and bring that item to me, I can help you see into the shadows of your future.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting 31281-05.html">"I am ready."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Priest Cerenas:<br>
Now go to the <font color="LEVEL">Hot Springs</font> through a Gatekeeper.<br>
The <font color="LEVEL">One Who Eats Prophecies</font> is in the Hot Springs. Defeat the monster and retrieve <font color="LEVEL">Novella Prophecy Fragments</font> for me.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Priest Cerenas:<br>
What do you wait for?<br>
If you want clarification of your prophecy, bring me the <font color="LEVEL">Novella Prophecy</font> carried by <font color="LEVEL">the One Who Eats Prophecies</font>. You will find it in the <font color="LEVEL">Hot Springs</font>.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Priest Cerenas:<br>
Adventurer, you have the Novella Prophecy? And so quickly! You truly are remarkable... well, does this mean you are prepared to see the truth in your prophecy?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting movieQuest">"Yes, I am eager to see."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Priest Cerenas:<br>
Adventurer, your eyes... what did you see?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting 31281-09.html">"It was... It was the Goddess of Water."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Priest Cerenas:<br>
You mean Eva, the Goddess of Water? Hmm... You already have two powers and have developed them quite a bit... could it be...?<br>
Oh! Don't mind me, I just got carried away by my thoughts. Anyway, <font color="LEVEL">I will take you now to where Eva is.</font><br>
Eva's original body is not in this world. You will see her incarnation in the form of an avatar when you get there. Are you ready?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest EvasHiddenSpace enterInstance">"I am ready."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Priest Cerenas:<br>
You had best hurry, adventurer.<br>
<font color="LEVEL">Let me know when you are prepared</font> to answer the Goddess of Water's summons.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Priest Cerenas:<br>
Everything is in line. Are you prepared to go?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest EvasHiddenSpace enterInstance">"I am. Send me."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Priest Cerenas:<br>
You are learning, adventurer. I will pray for your illumination.<br>
(You have already completed this quest.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Priest Cerenas:<br>
The Goddess of Destruction has been resurrected. What good can a priest do?<br>
You must not belong to the Noblesse and be level 75 or above for this quest.)
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Eva's Avatar:<br>
You are the one I saw in my prophecy!<br>
I need your help. Please!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting 33686-02.html">"What kind of help do you need?"</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Eva's Avatar:<br>
You probably know that Shilen has been resurrected, but did you also know that Shilen was the Goddess of Water before she became a fallen goddess? When she became the Goddess of Destruction, the power of water came to me.<br>
However, since her resurrection, the waters have been getting increasingly contaminated due to the influence of her power.<br>
I should purify this contamination as the current Goddess of Water. However, I cannot reach all the tainted locations and need your help.<br>
Can you help me?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting 33686-03.html">"Sure. I'd like a challenge."</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Eva's Avatar:<br>
Thank you! A total of <font color="LEVEL">4 ingredients</font> are needed in order to make a weapon to purify the waters.<br>
First please bring us <font color="LEVEL">greenish hot spring water in the Hot Springs</font>. I will give you a bottle, so you can bring the water in there. If you go to the <font color="LEVEL">greenish hot spring</font> in the Hot Springs and <font color="LEVEL">double click this bottle</font>, water will fill the bottle.<br>
<font color="LEVEL">If you then bring the water back,</font>, I will be able to give you a summoning stone. <font color="LEVEL">Double click this summoning stone</font> to summon my subordinate, the <font color="LEVEL">Water Spirit Lanya</font>. Use this summoning stone, to receive missions from me.<br>
I will also give you a <font color="LEVEL">Scroll of Escape</font>, which can take you straight to the Hot Springs. But you should be careful -- you cannot receive it again if you lose it!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Eva's Avatar:<br>
Are you still here? <font color="LEVEL">Double click</font> the <font color="LEVEL">empty bottle</font> in the <font color="LEVEL">greenish hot spring</font> to fill the bottle!<br>
Remember, you should have a <font color="LEVEL">Scroll of Escape</font> which can take you directly to the Hot Springs. But you should be careful -- you cannot receive it again if you lose it!
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Eva's Avatar:<br>
Adventurer! You have brought all ingredients! Thank you so much! I was worried I'd never be able to purify the water!<br>
I'd like to repay you for your trouble, but the reward I give is not something that everyone can receive. The weak will be killed by my gift.<br>
I would like to test your spirit first.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting 33686-06.html">"Sure. Go ahead."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Eva's Avatar:<br>
Let me test the strength of your soul with a task. It is rumored that the frequent wars in Aden and Rune Castle have clouded those regions' natural aura. Here is a Helping Seed to help you purify those lands. Please return after planting the Helping Seed in <font color="LEVEL">the regions shrouded by green fog</font> near either <font color="LEVEL">Aden Castle</font> or <font color="LEVEL">Rune Castle</font>. You simply target the Helping Tree Summon Device in the midst of the green fog, and use the Helping Seed. It will grow into a Helping Tree.<br>
A Helping Tree will purify its surroundings and give you <font color="LEVEL">Ashes of Remnants</font>. Bring those to me.<br>
Oh, and I will give you a <font color="LEVEL">Scroll of Escape for either Aden or Rune Castle</font>. Don't lose it, for I will only give it once.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Eva's Avatar:<br>
You've brought the <font color="LEVEL">Ashes</font>! Thank you so much!<br>
In a world churning with Shilen's impending resurrection, you still continue to fight... wielder of two great powers, you fear no war nor death.<br>
You've passed my test, and can now receive my gift: the <font color="LEVEL">[Noblesse] rank</font>, along with the powers it grants.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eva's Spirit Lanya:<br>
You... are not yet worthy of this item or this task.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Eva's Spirit Lanya:<br>
Hi! I am Lanya, servant to Goddess Eva. Oh, you brought some water from the Hot Springs? Excellent. They say water from the Hot Springs is good for making weapons.<br>
Now, onto your next mission for Goddess Eva. Please get me the <font color="LEVEL">second material</font> for the weapon for purifying water. Are you ready?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting 33696-03.html">"I am ready."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eva's Spirit Lanya:<br>
The item you seek is <font color="LEVEL">hard leather</font>. The hides from <font color="LEVEL">Hot Springs Yeti, Hot Springs Bandersnatch, and Hot Springs Grendel</font> will do. <font color="LEVEL">10</font> wiil be sufficient.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Eva's Spirit Lanya:<br>
You? What do you wait upon? Go to the <font color="LEVEL">Hot Springs</font> and take 10 Hard Leather pelts from the Hot Springs Yeti, Hot Springs Bandersnatch, and Hot Springs Grendel.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Eva's Spirit Lanya:<br>
Oh, you brought Hard Leather! Thank you! But it's not over. Now I need the <font color="LEVEL">3rd material</font>, which is <font color="LEVEL">Fire Energy from the Forge of the Gods</font>.<br>
The Forge of the Gods is where the Fire Energy imbued with the power of the gods resides. I heard that Fire Energy can create very powerful weapons. Goddess Eva asked for it herself, so get moving!<br>
Now, now! Are you ready?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting 33696-06.html">"I'm as ready as can be."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Eva's Spirit Lanya:<br>
Delay no more! Find the <font color="LEVEL">Fire Flower</font> in the <font color="LEVEL">Forge of the Gods</font> and extract <font color="LEVEL">five units of Fire Energy</font>! <font color="LEVEL">Double-click the Trowel</font> when you have found the Flower.<br>
<font color="LEVEL">The Scroll of Escape</font> takes you to the Forge. Be careful with it; I will not replace it for you.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Eva's Spirit Lanya:<br>
Delay no more! Find the <font color="LEVEL">Fire Flower</font> in the <font color="LEVEL">Forge of the Gods</font> and extract <font color="LEVEL">five units of Fire Energy</font>! <font color="LEVEL">Double-click the Trowel</font> when you have found the Flower.<br>
The Scroll of Escape takes you to the Forge. Be careful with it; I will not replace it for you.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Eva's Spirit Lanya:<br>
Yes. This will be sufficient... But we are not done.<br>
The most important ingredient is <font color="LEVEL">Hard Fossil Containing Water Energy</font>. Without this, it is impossible to purify water energy.<br>
Are you prepared for the task?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10369_NoblesseSoulTesting 33696-09.html">"I'm as ready as can be."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Eva's Spirit Lanya:<br>
You can get <font color="LEVEL">Hard Fossils Containing Water Energy</font> on the <font color="LEVEL">Isle of Prayer</font> in the Innadril Territory. The isle is filled with Water Energy.<br>
You can get Hard Fossils Containing Water Energy by catching <font color="LEVEL">Seychelles, Naiads, Sonneratias, Castalias, Chrysocollas, and Pythias</font> on the Isle of Prayer.<br>
Bring <font color="LEVEL">10</font> of them or so. The isle is very far, so I'll give you a <font color="LEVEL">Scroll of Escape for teleporting to the Isle of Prayer</font>. Don't lose it, because you won't get another one!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Eva's Spirit Lanya:<br>
Do you not listen? Pray tell me you are not a fool... Creatures on the <font color="LEVEL">Isle of Prayer</font> are full of the <font color="LEVEL">Hard Fossil Containing Water Energy</font> that we need.<br>
The <font color="LEVEL">Muddy Coral, Krinaia, Seychelle, Naiad, Sonneratia, Castalia, Chrysocolla, and Pythia</font>--all carry what we need.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Eva's Spirit Lanya:<br>
All comes into place.<br>
Let me now put the Ingredients for the Water Purifying Weapon into a sack. Here. take this <font color="LEVEL">sack</font> to <font color="LEVEL">Eva's Avatar</font>.<br>
Ah, here is a scroll. With this scroll, you will be able to meet her sooner.<br>
I hope to see you again. Good-bye!
</body></html>

View File

@@ -0,0 +1,636 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q10369_NoblesseSoulTesting;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.enums.Movie;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.instancemanager.QuestManager;
import com.l2jmobius.gameserver.model.L2Object;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.EvasHiddenSpace.EvasHiddenSpace;
/**
* Noblesse, Soul Testing (10369)
* @author Gladicek, St3eT
*/
public final class Q10369_NoblesseSoulTesting extends Quest
{
// NPCs
private static final int CERENAS = 31281;
private static final int ONE_WHO_EATS_PROPHECIES = 27482;
private static final int EVAS_AVATAR = 33686;
private static final int LANYA = 33696;
private static final int HELPING_TREE_SUMMON_DEVICE = 19293;
private static final int HELPING_TREE = 27486;
private static final int INVISIBLE_NPC_NOBLE = 27484;
private static final int INVISIBLE_NPC_NOBLE_2 = 27487;
private static final int FLAME_FLOWER = 33735;
// Items
private static final int SUMMONING_STONE = 34912;
private static final int NOVELLA_PROPHECY = 34886;
private static final int EMPTY_HOT_SPRINGS_WATER_BOTTLE = 34887;
private static final int HOT_SPRINGS_WATER_BOTTLE = 34888;
private static final int DURABLE_LEATHER = 34889;
private static final int TROWEL = 34890;
private static final int FIRE_ENERGY = 34891;
private static final int HARD_FOSSIL_CONTAINING_WATER_ENERGY = 34892;
private static final int SACK_CONTAINING_INGREDIENTS = 34913;
private static final int HELPING_SEED = 34961;
private static final int ASHES_OF_REMNANTS = 34962;
private static final int DIMENSIONAL_DIAMOND = 7562;
private static final int STEEL_COIN = 37045;
private static final int NOBLESSE_TIARA = 7694;
private static final int SOE_HOT_SPRINGS = 34978;
private static final int SOE_ADEN_CASTLE = 34981;
private static final int SOE_RUNE_CASTLE = 34982;
private static final int SOE_ISLE_OF_PRAYER = 34980;
private static final int SOE_FORGE_OF_GODS = 34979;
private static final int SOE_SECRET_ROOM = 39517;
// Skills
private static final SkillHolder EMPTY_WATER_SKILL = new SkillHolder(9443, 1);
private static final SkillHolder TROWEL_SKILL = new SkillHolder(9442, 1);
private static final SkillHolder HELPING_SEED_SKILL = new SkillHolder(9444, 1);
// TODO: Casting this skill on HELPING_TREE_SUMMON_DEVICE?? Or its AOE??
// private static final SkillHolder HELPING_TREE_CP_RECOVERY_RANGE = new SkillHolder(7103, 1);
private static final SkillHolder NOBLESSE_PRESENTATION = new SkillHolder(18176, 1);
// Locations
private static final Location HELPING_TREE_LOC_1 = new Location(148223, 14869, -1368, 23);
private static final Location HELPING_TREE_LOC_2 = new Location(22036, -49785, -1296, 23);
// Monsters
private static final int[] HOT_SPRINGS =
{
21320, // Hot Springs Yeti
21322, // Hot Springs Bandersnatch
21323, // Hot Springs Grendel
21314, // Hot Springs Bandersnatch
};
private static final int[] ISLE_OF_PRAYER =
{
22261, // Seychelles
22262, // Naiad
22263, // Sonneratia
22264, // Castalia
22265, // Chrysocolla
22266, // Pythia
};
// Misc
private static final int MIN_LEVEL = 75;
public Q10369_NoblesseSoulTesting()
{
super(10369);
addStartNpc(CERENAS);
addTalkId(CERENAS, EVAS_AVATAR, LANYA);
addKillId(ONE_WHO_EATS_PROPHECIES);
addKillId(HOT_SPRINGS);
addKillId(ISLE_OF_PRAYER);
addSeeCreatureId(INVISIBLE_NPC_NOBLE);
addSpawnId(INVISIBLE_NPC_NOBLE_2, FLAME_FLOWER, LANYA, HELPING_TREE);
addSkillSeeId(INVISIBLE_NPC_NOBLE, FLAME_FLOWER, HELPING_TREE_SUMMON_DEVICE);
addFirstTalkId(FLAME_FLOWER, HELPING_TREE_SUMMON_DEVICE, HELPING_TREE);
addCondMinLevel(MIN_LEVEL, "31281-13.htm");
addCondIsSubClassActive("");
registerQuestItems(SUMMONING_STONE, NOVELLA_PROPHECY, EMPTY_HOT_SPRINGS_WATER_BOTTLE, HOT_SPRINGS_WATER_BOTTLE, DURABLE_LEATHER, TROWEL, FIRE_ENERGY, HARD_FOSSIL_CONTAINING_WATER_ENERGY, HELPING_SEED, ASHES_OF_REMNANTS, SOE_HOT_SPRINGS, SOE_ADEN_CASTLE, SOE_RUNE_CASTLE, SOE_ISLE_OF_PRAYER, SOE_FORGE_OF_GODS, SOE_SECRET_ROOM);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (player == null)
{
return super.onAdvEvent(event, npc, player);
}
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "31281-02.htm":
{
htmltext = event;
break;
}
case "31281-04.html":
case "33686-02.html":
{
if (canProgress(player))
{
htmltext = event;
}
break;
}
case "31281-05.html":
{
if (canProgress(player) && qs.isCond(1))
{
qs.setCond(2, true);
htmltext = event;
}
break;
}
case "31281-09.html":
{
if (canProgress(player) && qs.isCond(4) && hasQuestItems(player, NOVELLA_PROPHECY))
{
takeItems(player, NOVELLA_PROPHECY, -1);
qs.setCond(5, true);
htmltext = event;
}
break;
}
case "33686-03.html":
{
if (canProgress(player) && qs.isCond(5))
{
giveItems(player, EMPTY_HOT_SPRINGS_WATER_BOTTLE, 1);
giveItems(player, SOE_HOT_SPRINGS, 1);
giveItems(player, SUMMONING_STONE, 1);
qs.setCond(6, true);
htmltext = event;
}
break;
}
case "33686-06.html":
{
if (canProgress(player) && qs.isCond(15))
{
takeItems(player, SACK_CONTAINING_INGREDIENTS, -1);
takeItems(player, SUMMONING_STONE, -1);
giveItems(player, HELPING_SEED, 1);
giveItems(player, getRandomBoolean() ? SOE_RUNE_CASTLE : SOE_ADEN_CASTLE, 1);
qs.setCond(16, true);
htmltext = event;
}
break;
}
case "33696-03.html":
{
if (canProgress(player) && qs.isCond(7))
{
qs.setCond(8, true);
takeItems(player, HOT_SPRINGS_WATER_BOTTLE, -1);
takeItems(player, EMPTY_HOT_SPRINGS_WATER_BOTTLE, -1);
htmltext = event;
}
break;
}
case "33696-06.html":
{
if (canProgress(player) && qs.isCond(9))
{
qs.setCond(10, true);
takeItems(player, DURABLE_LEATHER, -1);
giveItems(player, TROWEL, 1);
giveItems(player, SOE_FORGE_OF_GODS, 1);
htmltext = event;
}
break;
}
case "33696-09.html":
{
if (canProgress(player) && qs.isCond(11))
{
qs.setCond(12, true);
takeItems(player, FIRE_ENERGY, -1);
takeItems(player, TROWEL, 1);
giveItems(player, SOE_ISLE_OF_PRAYER, 1);
htmltext = event;
}
break;
}
case "startQuest":
{
if (canProgress(player))
{
qs.startQuest();
playMovie(player, Movie.SC_NOBLE_OPENING);
}
break;
}
case "movieQuest":
{
if (canProgress(player) && qs.isCond(3))
{
qs.setCond(4, true);
playMovie(player, Movie.SC_NOBLE_ENDING);
}
break;
}
case "bottle":
{
if (qs.isCond(5) && canProgress(player) && !hasQuestItems(player, EMPTY_HOT_SPRINGS_WATER_BOTTLE) && !hasQuestItems(player, HOT_SPRINGS_WATER_BOTTLE))
{
giveItems(player, EMPTY_HOT_SPRINGS_WATER_BOTTLE, 1);
}
else
{
htmltext = "33696-01.html";
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
switch (qs.getState())
{
case State.CREATED:
{
if (npc.getId() == CERENAS)
{
htmltext = "31281-01.htm";
}
break;
}
case State.STARTED:
{
if (canProgress(player))
{
switch (npc.getId())
{
case CERENAS:
{
switch (qs.getCond())
{
case 1:
htmltext = "31281-03.html";
break;
case 2:
htmltext = "31281-06.html";
break;
case 3:
htmltext = "31281-07.html";
break;
case 4:
htmltext = "31281-08.html";
break;
case 5:
htmltext = "31281-10.html";
break;
case 14:
if (!isSimulated)
{
final Quest instance = QuestManager.getInstance().getQuest(EvasHiddenSpace.class.getSimpleName());
if (instance != null)
{
instance.onAdvEvent("enterInstance", npc, player);
}
}
htmltext = null;
break;
case 17:
htmltext = "31281-11.html";
break;
}
break;
}
case EVAS_AVATAR:
{
switch (qs.getCond())
{
case 5:
htmltext = "33686-01.html";
break;
case 6:
htmltext = "33686-04.html";
break;
case 15:
htmltext = "33686-05.html";
break;
case 16:
htmltext = "33686-06.html";
break;
case 18:
if (!isSimulated)
{
player.doCast(NOBLESSE_PRESENTATION.getSkill());
showOnScreenMsg(player, NpcStringId.CONGRATULATIONS_YOU_ARE_NOW_A_NOBLESSE, ExShowScreenMessage.TOP_CENTER, 5000);
player.setNoble(true);
player.broadcastUserInfo();
giveItems(player, DIMENSIONAL_DIAMOND, 10);
giveItems(player, NOBLESSE_TIARA, 1);
takeItems(player, ASHES_OF_REMNANTS, -1);
giveItems(player, STEEL_COIN, 87);
addExpAndSp(player, 12_625_440, 0);
qs.exitQuest(false, true);
}
htmltext = "33686-07.html";
break;
}
break;
}
case LANYA:
{
switch (qs.getCond())
{
case 7:
htmltext = "33696-02.html";
break;
case 8:
htmltext = "33696-04.html";
break;
case 9:
htmltext = "33696-05.html";
break;
case 10:
htmltext = "33696-07.html";
break;
case 11:
htmltext = "33696-08.html";
break;
case 12:
htmltext = "33696-10.html";
break;
case 13:
if (!isSimulated)
{
qs.setCond(14, true);
takeItems(player, HARD_FOSSIL_CONTAINING_WATER_ENERGY, -1);
giveItems(player, SACK_CONTAINING_INGREDIENTS, 1);
giveItems(player, SOE_SECRET_ROOM, 1);
}
htmltext = "33696-11.html";
break;
}
break;
}
}
}
break;
}
case State.COMPLETED:
{
if (npc.getId() == CERENAS)
{
htmltext = "31281-12.html";
break;
}
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final L2PcInstance partyMember = getRandomPartyMember(killer);
final QuestState qs = getQuestState(partyMember, false);
if (canProgress(partyMember) && (qs != null) && qs.isStarted() && (partyMember.calculateDistance(npc, false, false) <= 1500))
{
switch (qs.getCond())
{
case 2:
{
if (npc.getId() == ONE_WHO_EATS_PROPHECIES)
{
giveItems(partyMember, NOVELLA_PROPHECY, 1);
qs.setCond(3, true);
}
break;
}
case 8:
{
if (CommonUtil.contains(HOT_SPRINGS, npc.getId()))
{
giveItems(partyMember, DURABLE_LEATHER, 1);
if (getQuestItemsCount(killer, DURABLE_LEATHER) >= 10)
{
{
qs.setCond(9, true);
showOnScreenMsg(partyMember, NpcStringId.CLICK_ON_THE_SUMMONING_STONE_TO_TALK_TO_LANYA_THE_WATER_SPIRIT, ExShowScreenMessage.TOP_CENTER, 5000);
}
}
else
{
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
}
case 12:
{
if (CommonUtil.contains(ISLE_OF_PRAYER, npc.getId()))
{
giveItems(partyMember, HARD_FOSSIL_CONTAINING_WATER_ENERGY, 1);
if (getQuestItemsCount(killer, HARD_FOSSIL_CONTAINING_WATER_ENERGY) >= 10)
{
qs.setCond(13, true);
showOnScreenMsg(partyMember, NpcStringId.CLICK_ON_THE_SUMMONING_STONE_TO_TALK_TO_LANYA_THE_WATER_SPIRIT, ExShowScreenMessage.TOP_CENTER, 5000);
}
else
{
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
{
if (creature.isPlayer())
{
final L2PcInstance player = creature.getActingPlayer();
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isStarted())
{
if (qs.isCond(6))
{
if (!hasQuestItems(player, HOT_SPRINGS_WATER_BOTTLE))
{
showOnScreenMsg(player, NpcStringId.OPEN_THE_ITEM_SCREEN_AND_DOUBLE_CLICK_THE_EMPTY_WATER_BOTTLE, ExShowScreenMessage.TOP_CENTER, 5000);
getTimers().addTimer("LOL", null, 5000, npc, player, event -> showOnScreenMsg(event.getPlayer(), NpcStringId.IF_YOU_DOUBLE_CLICK_THE_EMPTY_BOTTLE_IT_WILL_BECOME_FULL_OF_WATER, ExShowScreenMessage.TOP_CENTER, 5000));
}
}
else if (qs.isCond(16))
{
if (hasQuestItems(player, HELPING_SEED))
{
showOnScreenMsg(player, NpcStringId.IF_YOU_DOUBLE_CLICK_THE_HELPING_SEED_ITEM_A_TREE_OF_HELPING_WILL_BE_PLANTED, ExShowScreenMessage.TOP_CENTER, 5000);
}
}
}
}
return super.onSeeCreature(npc, creature, isSummon);
}
@Override
public String onSpawn(L2Npc npc)
{
switch (npc.getId())
{
case INVISIBLE_NPC_NOBLE_2:
{
final L2Character summoner = npc.getSummoner();
if (summoner != null)
{
final QuestState qs = getQuestState(summoner.getActingPlayer(), false);
if ((qs != null) && qs.isStarted() && qs.isCond(6) && hasQuestItems(summoner.getActingPlayer(), HOT_SPRINGS_WATER_BOTTLE))
{
qs.setCond(7, true);
}
}
break;
}
case LANYA:
{
final L2Character summoner = npc.getSummoner();
if (summoner != null)
{
final QuestState qs = getQuestState(summoner.getActingPlayer(), false);
if ((qs != null) && qs.isStarted())
{
npc.setTitle(summoner.getActingPlayer().getName());
npc.broadcastInfo();
}
}
break;
}
case FLAME_FLOWER:
case HELPING_TREE:
case HELPING_TREE_SUMMON_DEVICE:
{
npc.disableCoreAI(true);
npc.setUndying(true);
break;
}
}
return super.onSpawn(npc);
}
@Override
public String onSkillSee(L2Npc npc, L2PcInstance player, Skill skill, L2Object[] targets, boolean isSummon)
{
if (player != null)
{
switch (npc.getId())
{
case INVISIBLE_NPC_NOBLE:
{
if (skill == EMPTY_WATER_SKILL.getSkill())
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isStarted() && qs.isCond(6))
{
qs.setCond(7, true);
showOnScreenMsg(player, NpcStringId.CLICK_ON_THE_SUMMONING_STONE_TO_TALK_TO_LANYA_THE_WATER_SPIRIT, ExShowScreenMessage.TOP_CENTER, 5000);
}
}
break;
}
case FLAME_FLOWER:
{
if ((skill == TROWEL_SKILL.getSkill()) && (CommonUtil.contains(targets, npc)))
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isStarted() && qs.isCond(10))
{
giveItems(player, FIRE_ENERGY, 1);
if (getQuestItemsCount(player, FIRE_ENERGY) >= 5)
{
qs.setCond(11, true);
showOnScreenMsg(player, NpcStringId.CLICK_ON_THE_SUMMONING_STONE_TO_TALK_TO_LANYA_THE_WATER_SPIRIT, ExShowScreenMessage.TOP_CENTER, 5000);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
npc.doDie(player);
}
}
break;
}
case HELPING_TREE_SUMMON_DEVICE:
{
if ((skill == HELPING_SEED_SKILL.getSkill()) && (CommonUtil.contains(targets, npc)))
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isStarted() && qs.isCond(16))
{
qs.setCond(17, true);
giveItems(player, ASHES_OF_REMNANTS, 1);
if (npc.isInsideRadius(HELPING_TREE_LOC_1, 2000, false, false))
{
addSpawn(HELPING_TREE, HELPING_TREE_LOC_1, false, 300000);
}
else if (npc.isInsideRadius(HELPING_TREE_LOC_2, 2000, false, false))
{
addSpawn(HELPING_TREE, HELPING_TREE_LOC_2, false, 300000);
}
}
}
break;
}
}
}
return super.onSkillSee(npc, player, skill, targets, isSummon);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isStarted() && qs.isCond(10))
{
showOnScreenMsg(player, NpcStringId.CLICK_THE_FLAME_FLOWER_THEN_DOUBLE_CLICK_THE_TROWEL, ExShowScreenMessage.TOP_CENTER, 5000);
}
return super.onFirstTalk(npc, player);
}
public boolean canProgress(L2PcInstance player)
{
return ((player.getLevel() > MIN_LEVEL) && player.isSubClassActive());
}
}