ZURSULUS L2

Millennium Love

ID
156
Название
Millennium Love
start_npcs_json
[30368]
npc_ids_json
[30368,30369]
constants_json
{"LILITH":30368,"BAENEDES":30369,"LILITH_LETTER":1022,"THEON_DIARY":1023}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00156_MillenniumLove/Q00156_MillenniumLove.java

NPC квеста

IDНазваниеСтарт квестаУровень
30368LilithДа70
30369BaenedesНет70

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

htmltext = (player.getLevel() < 15) ? "30368-00.htm" : "30368-01.htm";

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

giveItems(player, LILITH_LETTER, 1);
giveItems(player, THEON_DIARY, 1);
addExpAndSp(player, 3000, 0);
giveItems(player, 5250, 1);
addExpAndSp(player, 3000, 0);

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

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

[30368-00.htm] Lilith: Thank you. But I must tell you something in advance. Please don't feel insulted, I only say it out of concern for you. It may be a little dangerous for you to travel to the Gludio mainland. It is a land made barren during the war against the devil Beleth, and a dangerous place, where all kinds of monsters threaten the lives of innocent people. It may be even more dangerous now than a thousand years ago when Beleth existed. Of course, the lord of Gludio is conducting reconstruction projects, but the southern regions of Gludio are still barren plains. I have waited for more than a thousand years now, and it makes no difference to me to wait a few more years. There is no need to hurry. Whenever you are ready to leave for the Gludio mainland, come and seek me. (This quest may only be undertaken by a character of level 15 and above.) [30368-01.htm] Lilith: It has been over a hundred years since I came to this island. That is not a long time for us Elves, who live nearly eternal lives, but it is a long time for Humans. And it's been enough time for me to become fond of this island. This place is now home to me, but I sometimes think of the memories of my days in the Elven Forest. Perhaps it is because my health is not good lately, but sometimes old memories come back to sadden me. The memories of a parted lover, of a love forged a thousand years ago... Ask about her lover [30368-02.htm] Lilith: Long ago I was a high level Spellsinger, and my lover Theon was the best of the Temple Knights. One year in late fall, we began our love for each other, and while the buds on the trees grew and withered, then fell, and while this was repeated time and time again, our love grew even stronger. During these happy times, we were sent as envoys to the Human kingdom of Elmoreden to relay the will of the tetrarch. At that time, the devil Beleth continued to widen his territory with his evil powers in pursuit of world domination, and because of this, many people fell into distress and the world nearly came to an end. Eventually the Mystics of the Ivory Tower waged war against Beleth in order to stop him, and Theon and I aided the Human army in fighting against Beleth. But in the final battle, when the Ivory Tower Mystics used forbidden magic to trap Beleth, I was severely wounded. And when I woke up many months later, I learned that I had lost the lover whom I had loved more than my life. My friends told me that Theon had met a noble death, fighting against the undead armies to the very end in order to buy time for our allies to retreat. But the body was never found, and I could not accept the fact that he was dead. I would like to believe that he is alive somewhere under this sky. From then on, I have stayed on this island for a thousand years to honor the promise that Theon and I made long ago. I await the day when I can meet him again and return to our homeland together... Ask about the promise [30368-03.htm] Lilith: Before the beginning of the war against the devil Beleth, Theon and I made a promise to stay on Talking Island and teach the Humans the use of magic for harmony and preservation, so that there would never be another Beleth. If Theon is still alive, I am sure he will come to this island to honor our promise. It has been a thousand years since we parted, but I still hold on to the belief that someday he will come to this island, and I continue to wait to this day. Seasons change, and change again, and as the years pass by, my heart is filled with despair, but I have not abandoned hope yet. But a few days ago, I heard some glad news while dining with Sir Windawood. He says that he saw an Elven warrior in the village of Gludin fitting the description of Theon... My heart was racing when I heard that... If you are planning to travel to the mainland, could you go to the village of Gludin for me and check for news regarding Theon? Say you will do the favor [30368-04.htm] Lilith: The Gludio mainland is a very dangerous place, and it worries me a little even as I am asking you this favor. It is a land made barren during the war against the devil Beleth, and a dangerous place, where all kinds of monsters threaten the lives of innocent people. Of course, the lord of Gludio is conducting reconstruction projects, but the southern regions of Gludio are still barren plains. I have waited for more than a thousand years now, and it makes no difference to me to wait a few more years. There is no need to hurry. When you decide to leave this island and go to the Gludio mainland by ship, please go to the harbor village called Gludin and ask about an Elven warrior named Theon. And if ... this may be a small hope ... but if you meet Theon, please give him this letter. [30368-05.htm] Lilith: I see that you have not left the island yet. But there is no need to hurry. For us Elves, "waiting" may mean tens, even hundreds of years. When you go to Gludio, please stop by the harbor village called Gludin and ask the whereabouts of an Elven warrior named Theon. Please! [30368-06.htm] Lilith: I see ... Theon ... has gone back already to the arms of Eva. It's not that I did not think of such a thing ... but it is all right. There is no need to comfort me. I had hoped to see his face just once ... I just wanted to go near him and quietly call out his name ... Fate is such a cruel thing ... Making us meet and fall in love ... And to spend such a long time yearning for each other ... and finally separate us with death ... This ... This is Theon's diary? Thank you. I would like to be alone today and spend some time in quiet, reading this diary. I will never forget your good intentions. This is a small token of my gratitude. Please accept. [30369-01.htm] Master Baenedes: Theon ... Yes, I knew him well. He is the man who taught me how to use the sword and bow. A silent and stern person, but he was also a sensitive man who longed for his long lost lover. The woman he so missed ... is still alive ... the web of fate that the arachnes weave is sometimes cruelly twisted, I think. That two lovers longed for each other for all those years, with only a small distance between them ... Unfortunately, Theon returned to the arms of Eva a few years ago. I personally transported his body to the Elven Forest and buried him under the Mother Tree's roots. Ah, if only Lilith had written this letter just a little sooner ... While living in this small Human town, Theon wrote many beautiful poems and songs to pass the time while longing for his lover of a thousand years. I urged him to write down the poems and songs in a diary. Before he passed away, he entrusted me with his diary. Please ... deliver this diary to Lilith. Say you will do the favor Decline the request [30369-02.htm] Master Baenedes: Please deliver this diary to Lilith. I think that is the right thing for us to do, for the sake of Theon, who has returned to the arms of Eva. If only they had learned of each other's news sooner ... [30369-03.htm] Master Baenedes: I understand. I can't thank you enough for granting the wishes of Lilith and coming here. May you find your destiny here ... I will ask another person to deliver the diary. [30369-04.htm] Master Baenedes: You have not been able to find a ship returning to Talking Island yet? Please deliver Theon's diary to Lilith, whom I'm sure is anxiously awaiting any news.
Исходник условий и наград (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.Q00156_MillenniumLove;

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.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;

public class Q00156_MillenniumLove extends Quest
{
	// NPCs
	private static final int LILITH = 30368;
	private static final int BAENEDES = 30369;
	
	// Items
	private static final int LILITH_LETTER = 1022;
	private static final int THEON_DIARY = 1023;
	
	public Q00156_MillenniumLove()
	{
		super(156, "Millennium Love");
		registerQuestItems(LILITH_LETTER, THEON_DIARY);
		addStartNpc(LILITH);
		addTalkId(LILITH, BAENEDES);
	}
	
	@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;
		}
		
		switch (event)
		{
			case "30368-04.htm":
			{
				st.startQuest();
				giveItems(player, LILITH_LETTER, 1);
				break;
			}
			case "30369-02.htm":
			{
				st.setCond(2, true);
				takeItems(player, LILITH_LETTER, 1);
				giveItems(player, THEON_DIARY, 1);
				break;
			}
			case "30369-03.htm":
			{
				takeItems(player, LILITH_LETTER, 1);
				addExpAndSp(player, 3000, 0);
				st.exitQuest(false, true);
				break;
			}
		}
		
		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:
			{
				htmltext = (player.getLevel() < 15) ? "30368-00.htm" : "30368-01.htm";
				break;
			}
			case State.STARTED:
			{
				switch (npc.getId())
				{
					case LILITH:
					{
						if (hasQuestItems(player, LILITH_LETTER))
						{
							htmltext = "30368-05.htm";
						}
						else if (hasQuestItems(player, THEON_DIARY))
						{
							htmltext = "30368-06.htm";
							takeItems(player, THEON_DIARY, 1);
							giveItems(player, 5250, 1);
							addExpAndSp(player, 3000, 0);
							st.exitQuest(false, true);
						}
						break;
					}
					case BAENEDES:
					{
						if (hasQuestItems(player, LILITH_LETTER))
						{
							htmltext = "30369-01.htm";
						}
						else if (hasQuestItems(player, THEON_DIARY))
						{
							htmltext = "30369-04.htm";
						}
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
}