ZURSULUS L2

Secret Buried in the Swamp

ID
31
Название
Secret Buried in the Swamp
start_npcs_json
[31555]
npc_ids_json
[31555,31661,31662,31663,31664,31665]
constants_json
{"ABERCROMBIE":31555,"FORGOTTEN_MONUMENT_1":31661,"FORGOTTEN_MONUMENT_2":31662,"FORGOTTEN_MONUMENT_3":31663,"FORGOTTEN_MONUMENT_4":31664,"CORPSE_OF_DWARF":31665,"KRORIN_JOURNAL":7252}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00031_SecretBuriedInTheSwamp/Q00031_SecretBuriedInTheSwamp.java

NPC квеста

IDНазваниеСтарт квестаУровень
31555AbercrombieДа70
31661Forgotten MonumentНет70
31662Forgotten MonumentНет70
31663Forgotten MonumentНет70
31664Forgotten MonumentНет70
31665Corpse of DwarfНет70

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

htmltext = (player.getLevel() < 66) ? "31555-00a.htm" : "31555-00.htm";

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

giveItems(player, KRORIN_JOURNAL, 1);
giveAdena(player, 40000, true);
addExpAndSp(player, 130000, 0);

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

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

[31555-00.htm] Mercenary Supplier Abercrombie: The person we sent to investigate the ancient monument is missing. Can you help us find him? Yes. [31555-00a.htm] Mercenary Supplier Abercrombie: The Swamp of Screams is very dangerous. This is too difficult a mission for you. (This quest may only be undertaken by a character of level 66 and above.) [31555-01.htm] Mercenary Supplier Abercrombie: Rangers reported that Krorin went missing somewhere in the Swamp of Screams. Look for him there. If he is dead, find his diary. It might hold a clue about the ancient monuments hidden there. The swamp is a dangerous place, but i'm sure you can handle it. Good luck! [31555-02.htm] Mercenary Supplier Abercrombie: Rangers reported that Krorin went missing somewhere in the Swamp of Screams. Look for him there. If he is dead find his diary. It might hold a clue about the ancient monuments hidden there. The swamp is a dangerous place, but i'm sure you can handle it. Good luck! [31555-03.htm] Mercenary Supplier Abercrombie: He was a good guild member, he will be missed. Captain Pierce thinks this could be why the Golden Ram are here. Would you complete his research so his death is not in vain? "I'll help." [31555-04.htm] Mercenary Supplier Abercrombie: Krorin's diary tells of four ancient monuments scattered in the swamp. Priests of the Elmoreden Empire used them for astronomical observation. He must have found the first monument! I'll mark it on your Map. Deciphering the ancient hieroglyphs on it will lead you to the next one. [31555-05.htm] Mercenary Supplier Abercrombie: It would look very bad if you went missing too, so be careful. Watch for the Stakatos! [31555-06.htm] Mercenary Supplier Abercrombie: You've returned! Did you find the monuments? "I found all four." [31555-07.htm] Mercenary Supplier Abercrombie: Very good! With help like yours, we'd be done with this swamp in no time. So they are related to astronomy. Krorin would be proud of you. Please take this as a small token of my thanks, I'd have something better for you if I weren't stuck in this swamp! [31661-00.htm] Forgotten Monument: An ancient stone monument. Scrape away the mud and you'll find mysterious hieroglyphs and diagrams. Examine the markings closely [31661-01.htm] Forgotten Monument: All signs seem to reveal that the diagrams carved on the monument are a Map to the second monument, located somewhere in the Marshland. [31661-02.htm] Forgotten Monument: The diagrams are a Map to the second monument, somewhere in the swamp. [31662-00.htm] Forgotten Monument: An ancient monument made in the same style as the monument that was discovered first. You find hieroglyphic characters and diagrams inscribed on the surface after cleaning off the mud Analyze the diagrams [31662-01.htm] Forgotten Monument: The lines' intersection may be the location of the third monument. After comparing it to the Map, you've discovered its approximate location [31662-02.htm] Forgotten Monument: It seems to be a Map to a third monument, somewhere in the Swamp of Screams. [31663-00.htm] Forgotten Monument: Another ancient monument in the same style as the first. After cleaning it off, you discover hieroglyhps and diagrams inscribed on it Examine the markings [31663-00a.htm] Forgotten Monument: Much cleaner and better preserved than the previous monuments. It's covered in strange hieroglyphs and diagrams. Examine the markings closely [31663-01.htm] Forgotten Monument: The fourth monument seems to be in the most dangerous part of Swamp of Screams. [31663-02.htm] Forgotten Monument: Further analysis is futile. Only the discovery of the fourth monument remains. [31664-00.htm] Forgotten Monument: Like the previous monuments, an ancient Map is inscribed in the fourth monument. After cleaning it off you recognize the markings. Examine the markings closely [31664-01.htm] Forgotten Monument: The Map seems to indicate that the monuments in this area were built to track the moon. The four monuments indicate the positions of the moon on the fall and spring equinoxes, and the summer and winter solstices. There are no more forgotten monuments in this area. [31664-02.htm] Forgotten Monument: Further analysis is futile. [31665-00.htm] Corpse of Dwarf: The corpse of a male Dwarf, presumedly that of Researcher Krorin. Aparently he lost his life after being poisoned by a highly toxic substance he was exposed to in the swampland. Examine the corpse [31665-01.htm] Corpse of Dwarf: When you open the backpack that is still on the corpse, you find a waterproof lambskin-covered book. Various memos are written in it, and on one page you find a sloppily drawn Map that seems to be of the Swamp of Screams. Could this be the log mentioned by Mercenary Supplier Abercrombie? [31665-02.htm] Corpse of Dwarf: There's nothing else.
Исходник условий и наград (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.Q00031_SecretBuriedInTheSwamp;

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 Q00031_SecretBuriedInTheSwamp extends Quest
{
	// NPCs
	private static final int ABERCROMBIE = 31555;
	private static final int FORGOTTEN_MONUMENT_1 = 31661;
	private static final int FORGOTTEN_MONUMENT_2 = 31662;
	private static final int FORGOTTEN_MONUMENT_3 = 31663;
	private static final int FORGOTTEN_MONUMENT_4 = 31664;
	private static final int CORPSE_OF_DWARF = 31665;
	
	// Item
	private static final int KRORIN_JOURNAL = 7252;
	
	public Q00031_SecretBuriedInTheSwamp()
	{
		super(31, "Secret Buried in the Swamp");
		registerQuestItems(KRORIN_JOURNAL);
		addStartNpc(ABERCROMBIE);
		addTalkId(ABERCROMBIE, CORPSE_OF_DWARF, FORGOTTEN_MONUMENT_1, FORGOTTEN_MONUMENT_2, FORGOTTEN_MONUMENT_3, FORGOTTEN_MONUMENT_4);
	}
	
	@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 "31555-01.htm":
			{
				st.startQuest();
				break;
			}
			case "31665-01.htm":
			{
				st.setCond(2, true);
				giveItems(player, KRORIN_JOURNAL, 1);
				break;
			}
			case "31555-04.htm":
			{
				st.setCond(3, true);
				break;
			}
			case "31661-01.htm":
			{
				st.setCond(4, true);
				break;
			}
			case "31662-01.htm":
			{
				st.setCond(5, true);
				break;
			}
			case "31663-01.htm":
			{
				st.setCond(6, true);
				break;
			}
			case "31664-01.htm":
			{
				st.setCond(7, true);
				break;
			}
			case "31555-07.htm":
			{
				takeItems(player, KRORIN_JOURNAL, 1);
				giveAdena(player, 40000, true);
				addExpAndSp(player, 130000, 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() < 66) ? "31555-00a.htm" : "31555-00.htm";
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case ABERCROMBIE:
					{
						if (cond == 1)
						{
							htmltext = "31555-02.htm";
						}
						else if (cond == 2)
						{
							htmltext = "31555-03.htm";
						}
						else if ((cond > 2) && (cond < 7))
						{
							htmltext = "31555-05.htm";
						}
						else if (cond == 7)
						{
							htmltext = "31555-06.htm";
						}
						break;
					}
					case CORPSE_OF_DWARF:
					{
						if (cond == 1)
						{
							htmltext = "31665-00.htm";
						}
						else if (cond > 1)
						{
							htmltext = "31665-02.htm";
						}
						break;
					}
					case FORGOTTEN_MONUMENT_1:
					{
						if (cond == 3)
						{
							htmltext = "31661-00.htm";
						}
						else if (cond > 3)
						{
							htmltext = "31661-02.htm";
						}
						break;
					}
					case FORGOTTEN_MONUMENT_2:
					{
						if (cond == 4)
						{
							htmltext = "31662-00.htm";
						}
						else if (cond > 4)
						{
							htmltext = "31662-02.htm";
						}
						break;
					}
					case FORGOTTEN_MONUMENT_3:
					{
						if (cond == 5)
						{
							htmltext = "31663-00.htm";
						}
						else if (cond > 5)
						{
							htmltext = "31663-02.htm";
						}
						break;
					}
					case FORGOTTEN_MONUMENT_4:
					{
						if (cond == 6)
						{
							htmltext = "31664-00.htm";
						}
						else if (cond > 6)
						{
							htmltext = "31664-02.htm";
						}
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
}