ZURSULUS L2

Lidia's Heart

ID
23
Название
Lidia's Heart
start_npcs_json
[31328]
npc_ids_json
[31328,31386,31523,31524,31526,31530]
constants_json
{"INNOCENTIN":31328,"BROKEN_BOOKSHELF":31526,"GHOST_OF_VON_HELLMANN":31524,"TOMBSTONE":31523,"VIOLET":31386,"BOX":31530,"FOREST_OF_DEADMAN_MAP":7063,"SILVER_KEY":7149,"LIDIA_HAIRPIN":7148,"LIDIA_DIARY":7064,"SILVER_SPEAR":7150}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00023_LidiasHeart/Q00023_LidiasHeart.java

NPC квеста

IDНазваниеСтарт квестаУровень
31328InnocentinДа70
31386VioletНет70
31523TombstoneНет70
31524Ghost of von HellmannНет70
31526Broken BookshelfНет70
31530BoxНет70

Условия уровней: выражения из Java

if (player.getLevel() >= 64)

Выдача предметов, адены и опыта: выражения из Java

giveItems(player, FOREST_OF_DEADMAN_MAP, 1);
giveItems(player, SILVER_KEY, 1);
giveItems(player, LIDIA_HAIRPIN, 1);
giveItems(player, LIDIA_DIARY, 1);
giveItems(player, SILVER_KEY, 1);
giveItems(player, SILVER_SPEAR, 1);
giveAdena(player, 100000, true);

Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.

Тексты квеста

[31328-00.htm] Innocentin: This is something you can get started on immediately! There's a vast conspiracy afoot in Rune Castle Town and the Forest of the Dead! The roots of this conspiracy lie in that forest, and you should seek the truth there. (This quest may only be undertaken by a character of level 64 and above who has completed the Hidden Truth and Tragedy of Hellmann Forest quests.) [31328-00a.htm] Innocentin: You look tired, my friend! Why don't you take a break, improve your ability and then come back! This next mission is much more challenging than the last one... (This quest may only be undertaken by a character of level 64 and above who has completed Tragedy of Hellmann Forest quest.) [31328-01.htm] Innocentin: You've been a great help to me in the past, and I'd like to thank you again for bringing me that report! There's one more thing... Could you help me out again? "OK, whatever." [31328-02.htm] Innocentin: Here's the Map and key he left behind. Take them and find out what he was searching for. "Tell me more about the Map and key." [31328-03.htm] Innocentin: He probably drew this Map while exploring the Forest of the Dead. As for the key... I'm not sure. The only clue I've found is the Silver Spear engraved upon it. "Tell me more about the Silver Spear." [31328-05.htm] Innocentin: According to a custom from the Elmoreden period, a Silver Spear was the symbol of the family responsible for guarding the royal family. An ancient proverb says, "A jeweled scepter for the mighty King of Elmore and two Silver Spears for his protectors". I'll wager that somewhere is a lock that matches this key... "Who holds the spear now?" [31328-06.htm] Innocentin: Today's silver spears are dedicated to the people who worked hard to suppress the rebellion. One is for the protectors of the royal family, who captured and punished the rebels, and one is for those who fought against the undead and captured the demon's followers... and it will therefore be a dedication that upholds the false accusations against our former priests. The one responsible for all this is staying at the temple in Rune Castle Town. Please don't ask any more questions. Just take the records that he left behind, and find out where that key fits. [31328-07.htm] Innocentin: You must find the lock that matches that key! It would probably be in the possession of a family worthy of the spear! [31328-08.htm] Innocentin: So, did you find anything? "Here is the diary and the hairpin." [31328-09.htm] Innocentin: Please! Put those things away...Please! I'm sorry, but the power of darkness contained in them is overpowering! I can't even look at them... How about you? Are you okay? "I'm fine." [31328-10.htm] Innocentin: Really? Have you read it? "Yes, I read it." "No, I haven't read it." [31328-11.htm] Innocentin: Read it and come back to me... I have many questions! [31328-12.htm] Innocentin: Then answer me... What is it? "Lidia's Diary." "Alfred's Diary." [31328-13.htm] Innocentin: Have you read the document? "Yes, I read it." No, I didn't read it." [31328-14.htm] Innocentin: Then answer me... What is it? "Lidia's Diary." "Alfred's Diary." [31328-15.htm] Innocentin: Lidia's Diary? Lidia was dear Alfred's precious daughter... They led an idyllic life, until that tragic day... Does her diary cover the period after she became lord of the forest? "Yes, it does." "No, it doesn't." [31328-16.htm] Innocentin: What did you learn from the diary? "Lidia was bitten by a vampire." "Lidia signed some sort of Contract." [31328-17.htm] Innocentin: A Contract?! I'll bet that rascal Nidrah was behind this! Was he involved? "Yes, he forced her to sign the Contract." "Lidia approached Nidrah." "Nidrah wasn't involved." "As I said before, Lidia was bitten by a vampire! Don't you get it?" [31328-18.htm] Innocentin: Oh really? Then let me ask you one more question. Have you ever heard the expression "Owner of a Moon Face Flower"? "It's the Lord of the Forest of the Dead." "It's Lidia von Hellmann." [31328-19.htm] Innocentin: Ah ha! Then that hairpin must belong to Lidia! Now I remember it! She used to wear it in her hair! Sigh... She was so beautiful then... Thank you for your help! I suppose our business is done now, but your journey continues... I'll always be here for you if you have any questions. [31328-20.htm] The moment the words leave your lips, you feel an electric current shoot through your head, buzzing like 5000 wyverns in flight! Deep within your heart wells an emotion, small but growing more intense by the moment... It's remorse! Lidia must have been angered by your answer! [31328-21.htm] Innocentin: I don't think your journey's over yet. Someone close to her wants to see you. He'll show you the path that leads to your next adventure. [31386-01.htm] Violet: Oh, the key? That's right! That's the key that Duke Adolph von Hellmann asked me to keep for him! That was a very long time ago! He told me that it guards the highest honor his family received from the King! But I can't go there. I can't leave this village. Go towards the northern part of the village. You'll find a box near the center of the Forest of the Dead. This key opens the padlock on the box. Bring me the object you find inside the box. [31386-02.htm] Violet: I can't go there. I can't leave this village! Go towards the northern part of the village, you'll find a box near the center of the Forest of the Dead. This key opens the padlock on the box. Bring me the object you find inside the box. [31386-03.htm] Violet: This is the very Silver Spear that King Astaire Van Halter bestowed upon Duke Adolph! It's the treasured heirloom of the Hellmann family! The lord will be overjoyed! The long lost honor of his family name is restored, and it's all because of you! Thank you. Please accept this small token of our gratitude! I only wish that we could have you over to the castle and give you a more formal recognition... I probably have to express our gratitude to the lord through another person, not me. Please talk with the village people. [31386-04.htm] Violet: Find someone among the villagers to express your gratitude to the lord. Have you visited Dorian yet? [31523-01.htm] Tombstone: One jeweled scepter for the King and two Silver Spears for the von Hellmann family who protects him. Wait a while. [31523-02.htm] Tombstone: After a while, a white ghost appears. [31523-03.htm] Tombstone: The ghost was beside you all along! [31523-04.htm] Tombstone: There is a tablet engraved with familiar characters. Dig Recall the ghost [31523-05.htm] Tombstone: There is a tablet engraved with familiar characters. It appears that something else has been crudely etched into the tablet. [31523-06.htm] Tombstone: You find a key engraved with a silver spear. [31524-01.htm] Ghost of von Hellmann: Who has summoned me here? Why can't I sleep? "Let me tell you about Lidia von Hellmann." [31524-02.htm] Ghost of von Hellmann: Oh, the horror! The von Hellmann's are dead and Lidia is a demon? Her curse upon this land is depriving me of my rest! "It's the truth." [31524-03.htm] Ghost of von Hellmann: How did she become the Lord of the Dead? "Here's her diary." [31524-04.htm] Ghost of von Hellmann: This concerns Lidia's Diary? Is that right? Oh, I see! Dear traveler! For whatever little time I have left, I'll read this diary and go over the past again and again in my mind! Traveler, I shall reward you well for this diary! Dig underneath this tombstone and you will find my key! Take that key to the Chamberlain of the Hellmann family! You'll find him in the village hidden in the middle of this forest! [31524-05.htm] Ghost of von Hellmann: Dig underneath this tombstone and you will find my key. Take that key to the Chamberlain of the Hellmann family! You'll find him in the village hidden in the middle of this forest! [31524-06.htm] Ghost of von Hellmann: Take the key to von Hellmann's page, He's in the hidden village in the center of the forest. [31526-00.htm] Broken Bookshelf: The chest is secured with a padlock which bears the mark of the Hellmann family. Use a Silver Spear key [31526-01.htm] Broken Bookshelf: The chest opens with a creak. Inside, you find an old hairpin and a book tied with a leather string. Examine the hairpin. Examine the book. [31526-02.htm] Broken Bookshelf: The chest opens with a creak. Inside, you find an old hairpin and a book tied with a leather string. Examine the hairpin. Examine the book. [31526-03.htm] Broken Bookshelf: The hairpin is a type once used by aristocratic ladies. It's engraved with the image of a Moon Face Flower, and was probably used by a unattached young lady. "I wonder what that design means?" [31526-04.htm] Broken Bookshelf: According to legend, the Moon Face Flower only blooms on moonlit nights. It's very shy, and shows its face only to its future husband. This legend made it quite popular among young, single, aristocratic ladies. I wonder who might have owned this one? Take the hairpin. [31526-05.htm] Broken Bookshelf: You took the hairpin. Check the bookshelf. You may find something else. [31526-06.htm] Broken Bookshelf: In the locker where you found the hairpin, you also find a book tied with a leather string. Examine the book. [31526-07.htm] Broken Bookshelf: A book tied with a leather string. It's tied very tight, and doesn't seem like it could easily be cut. Try to cut the string. [31526-08.htm] Broken Bookshelf: When you cut the string, it falls to the floor and you hear a faint sigh. Shall you read the book? Read the book. [31526-09.htm] Broken Bookshelf: "Month of Shilen, 15th day. Lately, Father spends all his days with Nidrah! He doesn't take care of the manor like he should. What makes him so angry? What's this?! "It's Lidia's Diary!" [31526-10.htm] Broken Bookshelf: It's a journal that belonged to Lidia von Hellmann. It probably has a lot of useful information in it! Pick up the journal. [31526-11.htm] Broken Bookshelf: You've found Lidia's Diary! Check the bookshelf again. You may find something else. [31526-12.htm] Broken Bookshelf: In the chest where you found the book, you also find a hairpin shaped like a Moon Face Flower. Examine the hairpin. [31526-13.htm] Broken Bookshelf: The locker is empty. [31530-01.htm] Box: It's an antique box with the von Hellmann family seal on the lock. Use the Silver Spear key. [31530-02.htm] Box: The box opens. [31530-03.htm] Box: It's empty.
Исходник условий и наград (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.Q00023_LidiasHeart;

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.enums.ChatType;

import quests.Q00022_TragedyInVonHellmannForest.Q00022_TragedyInVonHellmannForest;

public class Q00023_LidiasHeart extends Quest
{
	// NPCs
	private static final int INNOCENTIN = 31328;
	private static final int BROKEN_BOOKSHELF = 31526;
	private static final int GHOST_OF_VON_HELLMANN = 31524;
	private static final int TOMBSTONE = 31523;
	private static final int VIOLET = 31386;
	private static final int BOX = 31530;
	
	// NPC instance
	private Npc _ghost = null;
	
	// Items
	private static final int FOREST_OF_DEADMAN_MAP = 7063;
	private static final int SILVER_KEY = 7149;
	private static final int LIDIA_HAIRPIN = 7148;
	private static final int LIDIA_DIARY = 7064;
	private static final int SILVER_SPEAR = 7150;
	
	public Q00023_LidiasHeart()
	{
		super(23, "Lidia's Heart");
		
		registerQuestItems(FOREST_OF_DEADMAN_MAP, SILVER_KEY, LIDIA_DIARY, SILVER_SPEAR);
		
		addStartNpc(INNOCENTIN);
		addTalkId(INNOCENTIN, BROKEN_BOOKSHELF, GHOST_OF_VON_HELLMANN, VIOLET, BOX, TOMBSTONE);
	}
	
	@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 "31328-02.htm":
			{
				st.startQuest();
				giveItems(player, FOREST_OF_DEADMAN_MAP, 1);
				giveItems(player, SILVER_KEY, 1);
				break;
			}
			case "31328-06.htm":
			{
				st.setCond(2, true);
				break;
			}
			case "31526-05.htm":
			{
				if (!hasQuestItems(player, LIDIA_HAIRPIN))
				{
					giveItems(player, LIDIA_HAIRPIN, 1);
					if (hasQuestItems(player, LIDIA_DIARY))
					{
						st.setCond(4, true);
					}
					else
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
				}
				break;
			}
			case "31526-11.htm":
			{
				if (!hasQuestItems(player, LIDIA_DIARY))
				{
					giveItems(player, LIDIA_DIARY, 1);
					if (hasQuestItems(player, LIDIA_HAIRPIN))
					{
						st.setCond(4, true);
					}
					else
					{
						playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
					}
				}
				break;
			}
			case "31328-11.htm":
			{
				if (st.getCond() < 5)
				{
					st.setCond(5, true);
				}
				break;
			}
			case "31328-19.htm":
			{
				st.setCond(6, true);
				break;
			}
			case "31524-04.htm":
			{
				st.setCond(7, true);
				takeItems(player, LIDIA_DIARY, 1);
				break;
			}
			case "31523-02.htm":
			{
				if (_ghost == null)
				{
					_ghost = addSpawn(31524, 51432, -54570, -3136, 0, false, 60000);
					_ghost.broadcastSay(ChatType.GENERAL, "Who awoke me?");
					startQuestTimer("ghost_cleanup", 58000, null, player, false);
				}
				break;
			}
			case "31523-05.htm":
			{
				// Don't launch twice the same task...
				if (getQuestTimer("tomb_digger", null, player) == null)
				{
					startQuestTimer("tomb_digger", 10000, null, player, false);
				}
				break;
			}
			case "tomb_digger":
			{
				htmltext = "31523-06.htm";
				st.setCond(8, true);
				giveItems(player, SILVER_KEY, 1);
				break;
			}
			case "31530-02.htm":
			{
				st.setCond(10, true);
				takeItems(player, SILVER_KEY, 1);
				giveItems(player, SILVER_SPEAR, 1);
				break;
			}
			case "ghost_cleanup":
			{
				_ghost = null;
				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:
			{
				final QuestState st2 = player.getQuestState(Q00022_TragedyInVonHellmannForest.class.getSimpleName());
				if ((st2 != null) && st2.isCompleted())
				{
					if (player.getLevel() >= 64)
					{
						htmltext = "31328-01.htm";
					}
					else
					{
						htmltext = "31328-00a.htm";
					}
				}
				else
				{
					htmltext = "31328-00.htm";
				}
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case INNOCENTIN:
					{
						if (cond == 1)
						{
							htmltext = "31328-03.htm";
						}
						else if (cond == 2)
						{
							htmltext = "31328-07.htm";
						}
						else if (cond == 4)
						{
							htmltext = "31328-08.htm";
						}
						else if (cond == 5)
						{
							htmltext = "31328-10.htm";
						}
						else if (cond > 5)
						{
							htmltext = "31328-21.htm";
						}
						break;
					}
					case BROKEN_BOOKSHELF:
					{
						if (cond == 2)
						{
							htmltext = "31526-00.htm";
							st.setCond(3, true);
						}
						else if (cond == 3)
						{
							if (!hasQuestItems(player, LIDIA_DIARY))
							{
								htmltext = (!hasQuestItems(player, LIDIA_HAIRPIN)) ? "31526-02.htm" : "31526-06.htm";
							}
							else if (!hasQuestItems(player, LIDIA_HAIRPIN))
							{
								htmltext = "31526-12.htm";
							}
						}
						else if (cond > 3)
						{
							htmltext = "31526-13.htm";
						}
						break;
					}
					case GHOST_OF_VON_HELLMANN:
					{
						if (cond == 6)
						{
							htmltext = "31524-01.htm";
						}
						else if (cond > 6)
						{
							htmltext = "31524-05.htm";
						}
						break;
					}
					case TOMBSTONE:
					{
						if (cond == 6)
						{
							htmltext = (_ghost == null) ? "31523-01.htm" : "31523-03.htm";
						}
						else if (cond == 7)
						{
							htmltext = "31523-04.htm";
						}
						else if (cond > 7)
						{
							htmltext = "31523-06.htm";
						}
						break;
					}
					case VIOLET:
					{
						if (cond == 8)
						{
							htmltext = "31386-01.htm";
							st.setCond(9, true);
						}
						else if (cond == 9)
						{
							htmltext = "31386-02.htm";
						}
						else if (cond == 10)
						{
							if (hasQuestItems(player, SILVER_SPEAR))
							{
								htmltext = "31386-03.htm";
								takeItems(player, SILVER_SPEAR, 1);
								giveAdena(player, 100000, true);
								st.exitQuest(false, true);
							}
							else
							{
								htmltext = "31386-02.htm";
								st.setCond(9);
							}
						}
						break;
					}
					case BOX:
					{
						if (cond == 9)
						{
							htmltext = "31530-01.htm";
						}
						else if (cond == 10)
						{
							htmltext = "31530-03.htm";
						}
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				if (npc.getId() == VIOLET)
				{
					htmltext = "31386-04.htm";
				}
				else
				{
					htmltext = getAlreadyCompletedMsg(player);
				}
				break;
			}
		}
		
		return htmltext;
	}
}