Possessor of a Precious Soul - 2
- ID
- 242
- Название
- Possessor of a Precious Soul - 2
- start_npcs_json
- [31742]
- npc_ids_json
- [27317,30738,30759,31742,31743,31744,31746,31747,31748,31751,31752]
- constants_json
- {"VIRGIL":31742,"KASSANDRA":31743,"OGMAR":31744,"MYSTERIOUS_KNIGHT":31751,"ANGEL_CORPSE":31752,"KALIS":30759,"MATILD":30738,"CORNERSTONE":31748,"FALLEN_UNICORN":31746,"PURE_UNICORN":31747,"RESTRAINER_OF_GLORY":27317,"VIRGIL_LETTER":7677,"GOLDEN_HAIR":7590,"SORCERY_INGREDIENT":7596,"ORB_OF_BINDING":7595,"CARADINE_LETTER":7678}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00242_PossessorOfAPreciousSoul2/Q00242_PossessorOfAPreciousSoul2.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 27317 | Restrainer of Glory | Нет | 70 |
| 30738 | Matild | Нет | 70 |
| 30759 | Kalis | Нет | 70 |
| 31742 | Virgil | Да | 70 |
| 31743 | Kassandra | Нет | 70 |
| 31744 | Ogmar | Нет | 70 |
| 31746 | Fallen Unicorn | Нет | 70 |
| 31747 | Pure White Unicorn | Нет | 70 |
| 31748 | Cornerstone of Restraining | Нет | 70 |
| 31751 | Mysterious Dark Knight | Нет | 70 |
| 31752 | Corpse of Angel | Нет | 70 |
Условия уровней: выражения из Java
if (!player.isSubClassActive() || (player.getLevel() < 60))
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, SORCERY_INGREDIENT, 1); giveItems(player, CARADINE_LETTER, 1); addExpAndSp(player, 455764, 0); giveItems(player, GOLDEN_HAIR, 1); giveItems(player, ORB_OF_BINDING, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30738-01.htm] Alchemist Matild: My mentor sent you for the Sight of One-Hundred Eyes, didn't she? Wait here, I'll get the materials. "I'll wait."
[30738-02.htm] Alchemist Matild: Thanks for waiting. Here you are! Please give my best regards to my mentor. I haven't seen her for over a year. Tell Witch Kalis I'm taking good care of her house!
[30738-03.htm] Alchemist Matild: Go ahead.
[30759-01.htm] Witch Kalis: I owe the Mysterious Dark Knight a favor, so I'll help you. I need to use the Sight of One-Hundred Eyes spell to find the owner of this hair. I'm missing some key ingredients, though. "Where can I find them?"
[30759-02.htm] Witch Kalis: Find my disciple Matild at my hut, in the forest east of the Ivory Tower in Oren. Tell her you need the materials for the Sight of One-Hundred Eyes spell.
[30759-03.htm] Witch Kalis: Find Matild to get the materials for the spell. Aren't you supposed to be in a hurry?
[30759-04.htm] Witch Kalis: Good work. Now wait a moment while I cast the spell... Wait
[30759-05.htm] Witch Kalis: I've found a very faint trace of the Lady of the Lake in the Valley of Saints. Her life force is weakening. You'd better hurry!
[30759-06.htm] Witch Kalis: Aren't you supposed to be in a hurry?
[31742-02.htm] Virgil: I can't find him. I hope nothing bad has happened. (This quest may only be undertaken by a sub-classed character of level 60 and above.)
[31742-03.htm] Virgil: Three nights ago Kassandra had another nightmare and woke up screaming. Now she doesn't respond to anyone and stares aimlessly. Since she trusts you, maybe she'll talk to you. Please help her get over this illness.
[31742-04.htm] Virgil: Please help my granddaughter.
[31742-05.htm] Virgil: Thank god nothing has happened to her. If Kassandra's nightmare foretells the future, someone must be in danger. We must help!
[31743-01.htm] Kassandra: I'm scared. What should I do? "Come on, get going!"
[31743-02.htm] Kassandra: But... the golden princess... the princess...! "What's happening to her? What did you see in your dream?"
[31743-03.htm] Kassandra: They had swords... so many... the princess is trying to escape, but she's caught... No! Don't hurt her! White feathers everywhere...! The princess is crying... she looks so sad... She is taken away! "Where to? What do you see around there? Please tell me!"
[31743-04.htm] Kassandra: Green... brown... strange-looking trees... "What else? Tell me everything."
[31743-05.htm] Kassandra: That's all I can see. Ask Uncle Ogmar, he used to travel a lot, maybe he would know where it is. Please help the princess!
[31743-06.htm] Kassandra: You must go see Uncle Ogmar. Hurry!
[31743-07.htm] Kassandra: Thank you! Grandpa Virgil, Uncle Ogmar! The princess is safe!
[31744-01.htm] Ogmar: Kassandra never had normal dreams. She may have the blood of a shaman in her veins. This nightmare must be a message. Please tell me about her dream. "Well, she described..."
[31744-02.htm] Ogmar: Tejakar Pa'agrio! That must be the Swamp of Screams. The valley between two tall peaks, that must be around the Gateway of Evil Spirits in the east of the swamp. Maybe we should look around there.
[31744-03.htm] Ogmar: Look for a clue on the path to the Gateway of Evil Spirits in the east of the swamp.
[31746-01.htm] Fallen Unicon: The Fallen Unicorn is surrounded by a strong force, making it impossible to get near it. The source of the force appears to be the four Cornerstones of Restraining laid down around the Fallen Unicorn.
[31746-02.htm] Fallen Unicorn: The unicorn staggers to its feet. The force field must be gone.
[31747-01.htm] Pure White Unicorn: [A familiar female voice] Thank you for your help... I'm too weak now to return to my original state, but don't worry. It's too dangerous for you to stay any longer. You must go back to Kassandra and her grandfather.
[31747-02.htm] Pure White Unicorn: [A familiar female voice] Hurry and return to the Dwarven girl, Kassandra.
[31748-01.htm] Cornerstone of Restraining: Looking closely, you see a hole to put in something like a bead. It looks like the orb in the hands of Restrainers of Glory, who keep the cave, is going to fit into the hole perfectly.
[31748-02.htm] Cornerstone of Restraining: You see a small hole. Insert the Orb of Binding into the hole.
[31748-03.htm] Cornerstone of Restraining: As soon as you put the orb in, the entire cornerstone is surrounded by bright light, and slowly disappears. You can save the unicorn if you make the remaining Cornerstones of Restraining disappear.
[31751-01.htm] Mysterious Dark Knight: You missed her, my friend! I came running when I sensed she was in danger, but she was already gone. The winged vermin wouldn't tell me where she was taken, so I had to use force! "Where do you think she is?"
[31751-02.htm] Mysterious Dark Knight: I don't know. It's hard to track these gangs. Maybe we can find a clue from the dead ones.
[31751-03.htm] Mysterious Dark Knight: Search the corpses, you're sure to find something.
[31751-04.htm] Mysterious Dark Knight: Hmmm...hair.... There is nothing I can do within my power, but that witch's sorcery may take care of this... Travel to southern Oren and seek out the Witch Kalis in the town. She is indebted to me for something that occurred long ago; if you tell her I sent you, she will not refuse to aid your quest. Kalis possesses the power to help you find where "she" has been taken. Go now! I will continue to investigate the matter here. May fate be merciful to you, young adventurer!
[31751-05.htm] Mysterious Dark Knight: Meet a witch named Kalis south of Oren. She owes me a favor, so she'll help us. She should be able to tell us where the person who lost that blonde hair is. Now, be on your way! I'll continue my research here. May capricious destiny have mercy on you, my young friend!
[31752-01.htm] Angel Corpse: Nothing unusual.
[31752-02.htm] Angel Corpse: A long, blonde hair was found. Could it be from a blonde woman?
Исходник условий и наград (Java)
/*
* Copyright (c) 2013 L2jMobius
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package quests.Q00242_PossessorOfAPreciousSoul2;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
public class Q00242_PossessorOfAPreciousSoul2 extends Quest
{
// NPCs
private static final int VIRGIL = 31742;
private static final int KASSANDRA = 31743;
private static final int OGMAR = 31744;
private static final int MYSTERIOUS_KNIGHT = 31751;
private static final int ANGEL_CORPSE = 31752;
private static final int KALIS = 30759;
private static final int MATILD = 30738;
private static final int CORNERSTONE = 31748;
private static final int FALLEN_UNICORN = 31746;
private static final int PURE_UNICORN = 31747;
// Monsters
private static final int RESTRAINER_OF_GLORY = 27317;
// Items
private static final int VIRGIL_LETTER = 7677;
private static final int GOLDEN_HAIR = 7590;
private static final int SORCERY_INGREDIENT = 7596;
private static final int ORB_OF_BINDING = 7595;
private static final int CARADINE_LETTER = 7678;
// Misc
private static boolean _unicorn = false;
public Q00242_PossessorOfAPreciousSoul2()
{
super(242, "Possessor of a Precious Soul - 2");
registerQuestItems(GOLDEN_HAIR, SORCERY_INGREDIENT, ORB_OF_BINDING);
addStartNpc(VIRGIL);
addTalkId(VIRGIL, KASSANDRA, OGMAR, MYSTERIOUS_KNIGHT, ANGEL_CORPSE, KALIS, MATILD, CORNERSTONE, FALLEN_UNICORN, PURE_UNICORN);
addKillId(RESTRAINER_OF_GLORY);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
switch (event)
{
case "31743-05.htm":
{
st.setCond(2, true);
break;
}
case "31744-02.htm":
{
st.setCond(3, true);
break;
}
case "31751-02.htm":
{
st.setCond(4, true);
st.set("angel", "0");
break;
}
case "30759-02.htm":
{
st.setCond(7, true);
break;
}
case "30759-05.htm":
{
if (hasQuestItems(player, SORCERY_INGREDIENT))
{
st.set("orb", "0");
st.set("cornerstone", "0");
st.setCond(9, true);
takeItems(player, GOLDEN_HAIR, 1);
takeItems(player, SORCERY_INGREDIENT, 1);
}
else
{
st.setCond(7);
htmltext = "30759-02.htm";
}
break;
}
case "30738-02.htm":
{
st.setCond(8, true);
giveItems(player, SORCERY_INGREDIENT, 1);
break;
}
case "31748-03.htm":
{
if (hasQuestItems(player, ORB_OF_BINDING))
{
npc.doDie(npc);
takeItems(player, ORB_OF_BINDING, 1);
int cornerstones = st.getInt("cornerstone");
cornerstones++;
if (cornerstones == 4)
{
st.unset("orb");
st.unset("cornerstone");
st.setCond(10, true);
}
else
{
st.set("cornerstone", Integer.toString(cornerstones));
}
}
else
{
htmltext = null;
}
break;
}
case "spu":
{
addSpawn(PURE_UNICORN, 85884, -76588, -3470, 0, false, 0);
return null;
}
case "dspu":
{
npc.getSpawn().stopRespawn();
npc.deleteMe();
startQuestTimer("sfu", 2000, null, player, false);
return null;
}
case "sfu":
{
final Npc unicorn = addSpawn(FALLEN_UNICORN, 85884, -76588, -3470, 0, false, 0);
unicorn.getSpawn().startRespawn();
return null;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
switch (st.getState())
{
case State.CREATED:
{
if (hasQuestItems(player, VIRGIL_LETTER))
{
if (!player.isSubClassActive() || (player.getLevel() < 60))
{
htmltext = "31742-02.htm";
}
else
{
st.startQuest();
takeItems(player, VIRGIL_LETTER, 1);
htmltext = "31742-03.htm";
}
}
break;
}
case State.STARTED:
{
if (!player.isSubClassActive())
{
break;
}
final int cond = st.getCond();
switch (npc.getId())
{
case VIRGIL:
{
if (cond == 1)
{
htmltext = "31742-04.htm";
}
else if (cond == 2)
{
htmltext = "31742-05.htm";
}
break;
}
case KASSANDRA:
{
if (cond == 1)
{
htmltext = "31743-01.htm";
}
else if (cond == 2)
{
htmltext = "31743-06.htm";
}
else if (cond == 11)
{
htmltext = "31743-07.htm";
giveItems(player, CARADINE_LETTER, 1);
addExpAndSp(player, 455764, 0);
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
st.exitQuest(false, true);
}
break;
}
case OGMAR:
{
if (cond == 2)
{
htmltext = "31744-01.htm";
}
else if (cond == 3)
{
htmltext = "31744-03.htm";
}
break;
}
case MYSTERIOUS_KNIGHT:
{
if (cond == 3)
{
htmltext = "31751-01.htm";
}
else if (cond == 4)
{
htmltext = "31751-03.htm";
}
else if (cond == 5)
{
if (hasQuestItems(player, GOLDEN_HAIR))
{
htmltext = "31751-04.htm";
st.setCond(6, true);
}
else
{
htmltext = "31751-03.htm";
st.setCond(4);
}
}
else if (cond == 6)
{
htmltext = "31751-05.htm";
}
break;
}
case ANGEL_CORPSE:
{
if (cond == 4)
{
npc.doDie(npc);
int hair = st.getInt("angel");
hair++;
if (hair == 4)
{
htmltext = "31752-02.htm";
st.unset("angel");
st.setCond(5, true);
giveItems(player, GOLDEN_HAIR, 1);
}
else
{
st.set("angel", Integer.toString(hair));
htmltext = "31752-01.htm";
}
}
else if (cond == 5)
{
htmltext = "31752-01.htm";
}
break;
}
case KALIS:
{
if (cond == 6)
{
htmltext = "30759-01.htm";
}
else if (cond == 7)
{
htmltext = "30759-03.htm";
}
else if (cond == 8)
{
if (hasQuestItems(player, SORCERY_INGREDIENT))
{
htmltext = "30759-04.htm";
}
else
{
htmltext = "30759-03.htm";
st.setCond(7);
}
}
else if (cond == 9)
{
htmltext = "30759-06.htm";
}
break;
}
case MATILD:
{
if (cond == 7)
{
htmltext = "30738-01.htm";
}
else if (cond == 8)
{
htmltext = "30738-03.htm";
}
break;
}
case CORNERSTONE:
{
if (cond == 9)
{
if (hasQuestItems(player, ORB_OF_BINDING))
{
htmltext = "31748-02.htm";
}
else
{
htmltext = "31748-01.htm";
}
}
break;
}
case FALLEN_UNICORN:
{
if (cond == 9)
{
htmltext = "31746-01.htm";
}
else if (cond == 10)
{
if (!_unicorn) // Global variable check to prevent multiple spawns
{
_unicorn = true;
npc.getSpawn().stopRespawn(); // Despawn fallen unicorn
npc.deleteMe();
startQuestTimer("spu", 3000, npc, player, false);
}
htmltext = "31746-02.htm";
}
break;
}
case PURE_UNICORN:
{
if (cond == 10)
{
st.setCond(11, true);
if (_unicorn) // Global variable check to prevent multiple spawns
{
_unicorn = false;
startQuestTimer("dspu", 3000, npc, player, false);
}
htmltext = "31747-01.htm";
}
else if (cond == 11)
{
htmltext = "31747-02.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isCond(9) || !player.isSubClassActive())
{
return;
}
int orbs = st.getInt("orb"); // check orbs internally, because player can use them before he gets them all
if (orbs < 4)
{
orbs++;
st.set("orb", Integer.toString(orbs));
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
giveItems(player, ORB_OF_BINDING, 1);
}
}
}