Possessor of a Precious Soul - 3
- ID
- 246
- Название
- Possessor of a Precious Soul - 3
- start_npcs_json
- [31740]
- npc_ids_json
- [21541,21544,25325,30721,31740,31741]
- constants_json
- {"CARADINE":31740,"OSSIAN":31741,"LADD":30721,"CARADINE_LETTER_2":7678,"WATERBINDER":7591,"EVERGREEN":7592,"RAIN_SONG":7593,"RELIC_BOX":7594,"CARADINE_LETTER_3":7679,"PILGRIM_OF_SPLENDOR":21541,"JUDGE_OF_SPLENDOR":21544,"BARAKIEL":25325}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00246_PossessorOfAPreciousSoul3/Q00246_PossessorOfAPreciousSoul3.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 21541 | Pilgrim of Splendor | Нет | 63 |
| 21544 | Judge of Splendor | Нет | 67 |
| 25325 | Flame of Splendor Barakiel | Нет | 70 |
| 30721 | Ladd | Нет | 70 |
| 31740 | Caradine | Да | 70 |
| 31741 | Ossian | Нет | 70 |
Условия уровней: выражения из Java
if (!player.isSubClassActive() || (player.getLevel() < 65))
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, RELIC_BOX, 1); giveItems(player, CARADINE_LETTER_3, 1); addExpAndSp(player, 719843, 0); giveItems(member, RAIN_SONG, 1); giveItems(player, RAIN_SONG, 1); giveItems(player, neklaceOrRing, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30721-01.htm] Magister Ladd: You came back with the three relics! Good job. We should hurry, you never know when our enemies might attack. "Here's the box."
[30721-02.htm] Magister Ladd: I have successfully removed the Soultrap spells on Waterbinder, Evergreen and Rain Song. Now I will send them where they belong. I have no doubt that your destiny will be great. Caradine left a letter for you.
[31740-01.htm] Caradine: Welcome back! I heard what happened. Thank you on behalf of the group! I never imagined that there would be such resistance to our work! We're probably safe now, but the Lady of the Lake hasn't completely recovered yet. She still needs some more rest. Could you please help us some more? "I'll help you."
[31740-02.htm] Caradine: Welcome back! I heard what happened. Thank you on behalf of the group! I never imagined that there would be such resistance to our work! The battle has just begun! You'd better find a safe place to hide for a while! (This quest may only be undertaken by a sub-classed character of level 65 and above who has completed Possessor of a Precious Soul - 2 quest.)
[31740-04.htm] Caradine: Oh, wonderful! We really need the help! Ask Ossian over there, he'll tell you exactly what we need.
[31740-05.htm] Caradine: Ask Ossian, he'll tell you.
[31741-01.htm] Ossian: You've seen the Lady of the Lake in person. She's not an ordinary Human. She can't appear in her original state in this world, so she used magic to place her essence into three objects. She isn't able to recover her strength without them, and they were stolen during the attack. You must help us recover them! "I'll help."
[31741-02.htm] Ossian: We have learnt that two of the three items that contain her power, the Waterbinder ring and the Evergreen necklace, can be found in the Valley of Saints. The Pilgrims of Splendor possess the Waterbinder, and the Judges of Splendor possess the Evergreen. Please immediately go to the Valley of Saints and bring back the ring and the necklace. You're the only one who can do this. Then, I will entrust you with this task.
[31741-03.htm] Ossian: Find the ring called Waterbinder and the necklace Evergreen, they hold her strength. Pilgrims of Splendor and Judges of Splendor in the Valley of Saints robbed them.
[31741-04.htm] Ossian: You got them! Your soul is truly holy. Unfortunately, they still have the Soultrap spell on them, and she's too weak to break it. "What should I do?"
[31741-05.htm] Ossian: Her staff, Rain Song, holds the most power of the three objects. With it, she'll be able to break the Soultrap spell on the others. Her greatest foe, the Flame of Splendor, Archangel Barakiel, is guarding the staff. To get the staff, you must conquer him!
[31741-06.htm] Ossian: Unless you recover Rain Song and bring it back, you cannot break the bound Soultrap spell. It's very important that you bring back Rain Song!
[31741-07.htm] Ossian: Rain Song! You've defeated Barakiel. You've proven your worth. I have discovered that a colleague of mine may be able to break the Soultrap spell. Get the objects to him and he will attempt it. "I'll take them in person."
[31741-08.htm] Ossian: I hope you can come along, you never know when they'll attack again. Magister Ladd in the Ivory Tower is the Mage who can liberate the three relics in this box. Bring them to him! Hurry, his enemies are on our heels.
[31741-09.htm] Ossian: There's no time to lose! Hurry up and take the box containing the three sacred relics to Magister Ladd in the Ivory Tower.
Исходник условий и наград (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.Q00246_PossessorOfAPreciousSoul3;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.config.PlayerConfig;
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;
public class Q00246_PossessorOfAPreciousSoul3 extends Quest
{
// NPCs
private static final int CARADINE = 31740;
private static final int OSSIAN = 31741;
private static final int LADD = 30721;
// Items
private static final int CARADINE_LETTER_2 = 7678;
private static final int WATERBINDER = 7591;
private static final int EVERGREEN = 7592;
private static final int RAIN_SONG = 7593;
private static final int RELIC_BOX = 7594;
private static final int CARADINE_LETTER_3 = 7679;
// Mobs
private static final int PILGRIM_OF_SPLENDOR = 21541;
private static final int JUDGE_OF_SPLENDOR = 21544;
private static final int BARAKIEL = 25325;
public Q00246_PossessorOfAPreciousSoul3()
{
super(246, "Possessor of a Precious Soul - 3");
_questItemIds = new int[]
{
WATERBINDER,
EVERGREEN,
RAIN_SONG,
RELIC_BOX
};
addStartNpc(CARADINE);
addTalkId(CARADINE, OSSIAN, LADD);
addKillId(PILGRIM_OF_SPLENDOR, JUDGE_OF_SPLENDOR, BARAKIEL);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = player.getQuestState(getName());
if (st == null)
{
return htmltext;
}
// Caradine
if (event.equalsIgnoreCase("31740-04.htm"))
{
st.startQuest();
takeItems(player, CARADINE_LETTER_2, 1);
}
// Ossian
else if (event.equalsIgnoreCase("31741-02.htm"))
{
st.setCond(2);
}
else if (event.equalsIgnoreCase("31741-05.htm"))
{
if (hasQuestItems(player, WATERBINDER) && hasQuestItems(player, EVERGREEN))
{
st.setCond(4);
takeItems(player, WATERBINDER, 1);
takeItems(player, EVERGREEN, 1);
}
else
{
htmltext = null;
}
}
else if (event.equalsIgnoreCase("31741-08.htm"))
{
if (hasQuestItems(player, RAIN_SONG))
{
st.setCond(6);
takeItems(player, RAIN_SONG, 1);
giveItems(player, RELIC_BOX, 1);
}
else
{
htmltext = null;
}
}
// Ladd
else if (event.equalsIgnoreCase("30721-02.htm"))
{
if (hasQuestItems(player, RELIC_BOX))
{
takeItems(player, RELIC_BOX, 1);
giveItems(player, CARADINE_LETTER_3, 1);
addExpAndSp(player, 719843, 0);
st.exitQuest(false);
}
else
{
htmltext = null;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
final QuestState st = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (st.getState())
{
case State.CREATED:
{
if (hasQuestItems(player, CARADINE_LETTER_2))
{
if (!player.isSubClassActive() || (player.getLevel() < 65))
{
htmltext = "31740-02.htm";
st.exitQuest(true);
}
else
{
htmltext = "31740-01.htm";
}
}
break;
}
case State.STARTED:
{
if (!player.isSubClassActive())
{
break;
}
switch (npc.getId())
{
case CARADINE:
{
if (st.isCond(1))
{
htmltext = "31740-05.htm";
}
break;
}
case OSSIAN:
{
switch (st.getCond())
{
case 1:
{
htmltext = "31741-01.htm";
break;
}
case 2:
{
htmltext = "31741-03.htm";
break;
}
case 3:
{
if (hasQuestItems(player, WATERBINDER) && hasQuestItems(player, EVERGREEN))
{
htmltext = "31741-04.htm";
}
break;
}
case 4:
{
htmltext = "31741-06.htm";
break;
}
case 5:
{
if (hasQuestItems(player, RAIN_SONG))
{
htmltext = "31741-07.htm";
}
break;
}
case 6:
{
htmltext = "31741-09.htm";
break;
}
}
break;
}
case LADD:
{
if (st.isCond(6) && hasQuestItems(player, RELIC_BOX))
{
htmltext = "30721-01.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isSummon)
{
final int npcId = npc.getId();
if (npcId == BARAKIEL)
{
QuestState pst;
if ((player.getParty() != null) && !player.getParty().getMembers().isEmpty())
{
for (Player member : player.getParty().getMembers())
{
if (member.calculateDistance3D(npc) > PlayerConfig.ALT_PARTY_RANGE)
{
continue;
}
pst = member.getQuestState(getName());
if ((pst != null) && pst.isCond(4) && !hasQuestItems(member, RAIN_SONG))
{
giveItems(member, RAIN_SONG, 1);
pst.setCond(5, true);
}
}
}
else
{
pst = player.getQuestState(getName());
if ((pst != null) && pst.isCond(4) && !hasQuestItems(player, RAIN_SONG))
{
giveItems(player, RAIN_SONG, 1);
pst.setCond(5, true);
}
}
}
else
{
if (!player.isSubClassActive())
{
return;
}
final QuestState st = player.getQuestState(getName());
if ((st != null) && !st.isCond(2))
{
return;
}
if (Rnd.get(10) < 2)
{
final int neklaceOrRing = (npcId == PILGRIM_OF_SPLENDOR) ? WATERBINDER : EVERGREEN;
if ((st != null) && !hasQuestItems(player, neklaceOrRing))
{
giveItems(player, neklaceOrRing, 1);
if (!hasQuestItems(player, (npcId == PILGRIM_OF_SPLENDOR) ? EVERGREEN : WATERBINDER))
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
st.setCond(3, true);
}
}
}
}
}
}