Spirit of Mirrors
- ID
- 104
- Название
- Spirit of Mirrors
- start_npcs_json
- [30017]
- npc_ids_json
- [30017,30041,30043,30045]
- constants_json
- {"GALLINT":30017,"ARNOLD":30041,"JOHNSTONE":30043,"KENYOS":30045,"GALLINS_OAK_WAND":748,"WAND_SPIRITBOUND_1":1135,"WAND_SPIRITBOUND_2":1136,"WAND_SPIRITBOUND_3":1137,"SPIRITSHOT_NO_GRADE":2509,"SOULSHOT_NO_GRADE":1835,"WAND_OF_ADEPT":747,"SPIRITSHOT_FOR_BEGINNERS":5790,"SOULSHOT_FOR_BEGINNERS":5789,"LESSER_HEALING_POT":1060,"ECHO_BATTLE":4412,"ECHO_LOVE":4413,"ECHO_SOLITUDE":4414,"ECHO_FEAST":4415,"ECHO_CELEBRATION":4416}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00104_SpiritOfMirrors/Q00104_SpiritOfMirrors.java
NPC квеста
Условия уровней: выражения из Java
else if (player.getLevel() < 10)
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, GALLINS_OAK_WAND, 1); giveItems(player, GALLINS_OAK_WAND, 1); giveItems(player, GALLINS_OAK_WAND, 1); giveItems(player, WAND_OF_ADEPT, 1); rewardItems(player, LESSER_HEALING_POT, 100); giveItems(player, SPIRITSHOT_NO_GRADE, 500); giveItems(player, SOULSHOT_NO_GRADE, 1000); giveItems(player, SPIRITSHOT_FOR_BEGINNERS, 3000); giveItems(player, SOULSHOT_FOR_BEGINNERS, 7000); giveItems(player, ECHO_BATTLE, 10); giveItems(player, ECHO_LOVE, 10); giveItems(player, ECHO_SOLITUDE, 10); giveItems(player, ECHO_FEAST, 10); giveItems(player, ECHO_CELEBRATION, 10); giveItems(player, WAND_SPIRITBOUND_1, 1); giveItems(player, WAND_SPIRITBOUND_2, 1); giveItems(player, WAND_SPIRITBOUND_3, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30017-00.htm] Grand Magister Gallint: Young traveler of an alien race, how did you chance to journey to this remote island? I'm sure the Human world must seem fascinating to your eyes. I do wish I could speak with you longer, but unfortunately I have pressing matters to attend to, and cannot spend my time in idle conversation. When we both have more time, won't you tell me about your homeland? (This quest may only be undertaken by a Human character.)
[30017-01.htm] Grand Magister Gallint: I don't know why, but the magic defense field that I erected around the school of magic disappeared a few days ago. I have restored most of the shields, but I am worried that the spirits that were kept within the school for research have escaped to the outside. If some spirits have escaped, I may have to ask you to go and capture them ... (This quest may only be undertaken by a character of level 10 and above.)
[30017-02.htm] Grand Magister Gallint: Recently I have been studying the Spirit of Mirrors. This spirit does not have a set form and reflects the form of others, like a mirror. The name Spirit of Mirrors comes from that trait. I think that the magical creature called the doppelganger may also be an evolved form of the Spirit of Mirrors. But there has been a problem! I don't know why, but the magic defense field that I built around the School of Magic disappeared a few days ago. Three of the spirits of mirrors kept in my research lab escaped during that time. I need to recapture the escaped spirits before they harm anyone, but my priority is in examining the shields around the magic school. So, please help me. Do you think you can find the spirits of mirrors for me? If you help, I will give you the wand of the adept as a reward. It is a very useful weapon for those walking the path of a mage. Say you will help
[30017-03.htm] Grand Magister Gallint: Thank you. Fortunately, I think the spirits have gone into the woods rather than to the village. Things may become complicated if a Spirit of Mirrors encounters a dangerous beast and changes into its identical form, so they must be caught as soon as possible. To capture the Spirit of Mirrors, you need this oak wand. Weaken the spirit by attacking it with sword or magic, then deliver the finishing blow with this oak wand, and you will be able to seal the spirit within the wand. I will give you three enchanted wands, one for each spirit that has escaped. The village guards may have found some helpful evidence during their patrol. It may be a good idea to stop by the village and speak to the guards.
[30017-04.htm] Grand Magister Gallint: Go and capture all three escaped spirits of mirrors. Don't forget! You can only capture them using the oak wands I gave you. You might get some leads on the spirits of mirrors by speaking to the guards of the village.
[30017-05.htm] Grand Magister Gallint: So you have captured all the escaped spirits! Thank you! In the meantime, I have reconstructed all of the magic barriers around the school, and the spirits will not escape again. I will give you this as a reward for your work. It may not look like much, but it is a helpful item which brings out the inner magic potential of the user. As Einhovant has always said, true power comes from within.
[30041-01.htm] Guard Arnold: Yesterday afternoon, as I was guarding the students of the magic school while they gathered materials near the falls, a great toad crawled by. I wasn't paying much attention to it, but all of a sudden, that great toad turned into an Orc warrior! I was startled and about to draw my sword, but I guess he felt threatened, escaping beyond the falls. I rubbed my eyes and asked the magister from the magic school what was going on, and he had also clearly seen the toad turn into an Orc warrior. I have no idea what happened.
[30043-01.htm] Guard Johnstone: A few days ago, while patrolling the northern parts of the island, I encountered a werewolf near a farm. I drew my bow and chased after him, but all of a sudden, his body started to waver, and he turned into a great toad! Do you think there are some werewolves that know how to perform strange magic?
[30045-01.htm] Guard Kenyos: Last night, while patrolling the outskirts, I saw an Orc transforming into a werewolf! I thought I may have been seeing things, because I was so tired, but I asked the other guards and they all say that they saw the same thing!
Исходник условий и наград (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.Q00104_SpiritOfMirrors;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.entity.actor.enums.creature.Race;
import org.l2jmobius.gameserver.entity.itemcontainer.Inventory;
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.mechanics.variables.PlayerVariables;
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
public class Q00104_SpiritOfMirrors extends Quest
{
// NPCs
private static final int GALLINT = 30017;
private static final int ARNOLD = 30041;
private static final int JOHNSTONE = 30043;
private static final int KENYOS = 30045;
// Items
private static final int GALLINS_OAK_WAND = 748;
private static final int WAND_SPIRITBOUND_1 = 1135;
private static final int WAND_SPIRITBOUND_2 = 1136;
private static final int WAND_SPIRITBOUND_3 = 1137;
// Rewards
private static final int SPIRITSHOT_NO_GRADE = 2509;
private static final int SOULSHOT_NO_GRADE = 1835;
private static final int WAND_OF_ADEPT = 747;
private static final int SPIRITSHOT_FOR_BEGINNERS = 5790;
private static final int SOULSHOT_FOR_BEGINNERS = 5789;
private static final int LESSER_HEALING_POT = 1060;
private static final int ECHO_BATTLE = 4412;
private static final int ECHO_LOVE = 4413;
private static final int ECHO_SOLITUDE = 4414;
private static final int ECHO_FEAST = 4415;
private static final int ECHO_CELEBRATION = 4416;
public Q00104_SpiritOfMirrors()
{
super(104, "Spirit of Mirrors");
registerQuestItems(GALLINS_OAK_WAND, WAND_SPIRITBOUND_1, WAND_SPIRITBOUND_2, WAND_SPIRITBOUND_3);
addStartNpc(GALLINT);
addTalkId(GALLINT, ARNOLD, JOHNSTONE, KENYOS);
addKillId(27003, 27004, 27005);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
final String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
if (event.equals("30017-03.htm"))
{
st.startQuest();
giveItems(player, GALLINS_OAK_WAND, 1);
giveItems(player, GALLINS_OAK_WAND, 1);
giveItems(player, GALLINS_OAK_WAND, 1);
}
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 (player.getRace() != Race.HUMAN)
{
htmltext = "30017-00.htm";
}
else if (player.getLevel() < 10)
{
htmltext = "30017-01.htm";
}
else
{
htmltext = "30017-02.htm";
}
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case GALLINT:
{
if ((cond == 1) || (cond == 2))
{
htmltext = "30017-04.htm";
}
else if (cond == 3)
{
htmltext = "30017-05.htm";
takeItems(player, WAND_SPIRITBOUND_1, -1);
takeItems(player, WAND_SPIRITBOUND_2, -1);
takeItems(player, WAND_SPIRITBOUND_3, -1);
giveItems(player, WAND_OF_ADEPT, 1);
rewardItems(player, LESSER_HEALING_POT, 100);
if (player.isMageClass())
{
giveItems(player, SPIRITSHOT_NO_GRADE, 500);
}
else
{
giveItems(player, SOULSHOT_NO_GRADE, 1000);
}
// Give newbie reward if player is eligible
if (player.isNewbie())
{
int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEWBIE_SHOTS_RECEIVED, 0);
if (newPlayerRewardsReceived < 2)
{
st.showQuestionMark(26);
if (player.isMageClass())
{
st.playTutorialVoice("tutorial_voice_027");
giveItems(player, SPIRITSHOT_FOR_BEGINNERS, 3000);
player.getVariables().set(PlayerVariables.NEWBIE_SHOTS_RECEIVED, ++newPlayerRewardsReceived);
}
else
{
st.playTutorialVoice("tutorial_voice_026");
giveItems(player, SOULSHOT_FOR_BEGINNERS, 7000);
player.getVariables().set(PlayerVariables.NEWBIE_SHOTS_RECEIVED, ++newPlayerRewardsReceived);
}
}
}
giveItems(player, ECHO_BATTLE, 10);
giveItems(player, ECHO_LOVE, 10);
giveItems(player, ECHO_SOLITUDE, 10);
giveItems(player, ECHO_FEAST, 10);
giveItems(player, ECHO_CELEBRATION, 10);
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
st.exitQuest(false, true);
}
break;
}
case KENYOS:
case JOHNSTONE:
case ARNOLD:
{
htmltext = npc.getId() + "-01.htm";
if (cond == 1)
{
st.setCond(2, true);
}
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.isStarted())
{
return;
}
if (player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) == GALLINS_OAK_WAND)
{
switch (npc.getId())
{
case 27003:
if (!hasQuestItems(player, WAND_SPIRITBOUND_1))
{
takeItems(player, GALLINS_OAK_WAND, 1);
giveItems(player, WAND_SPIRITBOUND_1, 1);
if (hasQuestItems(player, WAND_SPIRITBOUND_2, WAND_SPIRITBOUND_3))
{
st.setCond(3, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
case 27004:
if (!hasQuestItems(player, WAND_SPIRITBOUND_2))
{
takeItems(player, GALLINS_OAK_WAND, 1);
giveItems(player, WAND_SPIRITBOUND_2, 1);
if (hasQuestItems(player, WAND_SPIRITBOUND_1, WAND_SPIRITBOUND_3))
{
st.setCond(3, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
case 27005:
if (!hasQuestItems(player, WAND_SPIRITBOUND_3))
{
takeItems(player, GALLINS_OAK_WAND, 1);
giveItems(player, WAND_SPIRITBOUND_3, 1);
if (hasQuestItems(player, WAND_SPIRITBOUND_1, WAND_SPIRITBOUND_2))
{
st.setCond(3, true);
}
else
{
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
break;
}
}
}
}