ZURSULUS L2

The Other Side of Truth

ID
115
Название
The Other Side of Truth
start_npcs_json
[32020]
npc_ids_json
[32018,32019,32020,32021,32022,32077,32078,32079]
constants_json
{"MISA":32018,"SUSPICIOUS":32019,"RAFFORTY":32020,"SCULPTURE1":32021,"KIERRE":32022,"SCULPTURE2":32077,"SCULPTURE3":32078,"SCULPTURE4":32079,"LETTER":8079,"LETTER2":8080,"TABLET":8081,"REPORT":8082}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00115_TheOtherSideOfTruth/Q00115_TheOtherSideOfTruth.java

NPC квеста

IDНазваниеСтарт квестаУровень
32018MisaНет70
32019Suspicious ManНет70
32020RaffortyДа70
32021Ice SculptureНет70
32022KierreНет70
32077Ice SculptureНет70
32078Ice SculptureНет70
32079Ice SculptureНет70

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

if (qs.getPlayer().getLevel() >= 53)

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

giveAdena(player, 115673, true);
addExpAndSp(player, 493595, 40442);
giveItems(player, REPORT, 1);
giveItems(player, TABLET, 1);
giveItems(player, LETTER2, 1);
giveAdena(player, 60044, true);
giveItems(player, LETTER, 1);
giveItems(player, TABLET, 1);
giveItems(player, TABLET, 1);
giveItems(player, TABLET, 1);
giveItems(player, TABLET, 1);

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

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

[32018-01.htm] Misa: Do you have anything to say to me? What? Rafforty sent you? Well, he doesn't want to see me, I guarantee you that! .... Would you give this letter to Rafforty? I need him to read it immediately! But please, do not read it yourself! This is none of your business! Oh, Rafforty... [32018-02.htm] Misa: You're still here? It's quite cold! You should go at once! Please give this letter to Rafforty. [32018-03.htm] Misa: Why are you here again? I don't have anything to say to you. "This letter is from Rafforty." [32018-04.htm] Misa: Oh! You're going to work with us! Welcome aboard! I'll tell you what I just found out. We lost touch with a large party of our Guild members who had been dispatched to investigate the recent activities of the Ice Queen. We recently got lucky and found out where they might be... It seems that the Ice Queen put a curse on them and turned them into ice sculptures! I think we should find out if there are any remnants of their investigation. The ice sculptures can be found on the plains north of the entrance of the Ice Queen's castle. Please, help us! [32018-05.htm] Misa: We accidently found out where the lost Guild members might be! They were turned into ice sculptures! Do you think you could go and see if there are any remnants of their investigation? You can find the ice sculptures on the plains north of the entrance of the Ice Queen's castle. Please, help us! [32020-00.htm] Rafforty: You definitely shouldn't wander around here in your condition. I don't want another corpse to deal with. (Characters must have achieved at least level 53 to undertake this quest.) [32020-01.htm] Rafforty: Have you recovered your strength? You certainly look a lot better. Would you like to go for a walk? Walk down the road to the lake, meet a person and come back. "Who am I supposed to meet?" [32020-02.htm] Rafforty: I want you to meet a woman! Why are you blushing? You know how it is... I just can't refuse her! So I want you to go there to refuse for me! That's it! It should be easy for you since you haven't met her before. Follow the road to the northwest until you get to Frost Lake and meet a woman named Misa there. I promised to meet her at night, so go after dark. Thank you so much for doing this for me! [32020-03.htm] Rafforty: What are you still doing here? Don't keep her waiting too long! Your task will be over once you've met her at Frost Lake and come back. Be careful! Don't fool around and get yourself hurt! [32020-04.htm] Rafforty: Didn't she say to give me the letter? Then give it to me! Hmm.. Are you sure you didn't open it? The seal looks broken... "Are you doubting me?" "I'm sorry, my curiosity got the better of me." [32020-05.htm] Rafforty: Hey, don't be so touchy! I was just asking! I'm sorry if I hurt your feelings. It's hard to trust anyone these days, you know? "Why did you ask me to do this?" "No big deal." [32020-06.htm] Rafforty: Hmmm.. It's just wrong to read someone else's mail! I didn't think you'd do such a thing... I'm really disappointed in you! I'm through talking to you! Get out as soon as you've recovered! [32020-07.htm] Rafforty: Well, I'll just come out with it then! What kind of relationship do you have with Queen Freya? "Who's Queen Freya?" "Certainly you don't think I'm involved with her?" [32020-07a.htm] Rafforty: Thank you for understanding. Oh, yes! Don't let my accent fool you! I'm Rafforty, from the Zinnia Guild! I actually tested you a while back, and you're not involved with Queen Freya. I'd like to ask for a favor... Or would you like to hear about the current situation? "The Zinnia Guild...?" "Who's Queen Freya?" "What can I do for you?" [32020-08.htm] Rafforty: You don't know about Queen Freya? She rules this whole area! You must not be related to Freya if you don't even know who she is! I'm sorry I didn't trust you! The situation here has just gotten to the point... Well, I'll just come out with it... Would you like to join the Zinnia Guild? I can tell you more about us if you want... "Tell me about the Zinnia Guild." "Tell me about Queen Freya." "What can I do for you?" [32020-08a.htm] Rafforty: Well, honestly, you're acting kind of shifty! We obviously don't trust each other, so let's just end it now. Please get out as soon as you're recovered. [32020-09.htm] Rafforty: We of the Zinnia Guild maintain the Order of Canna Knights that guarded Queen Freya before she became the Ice Queen. We've long sought a way to restore her to her original self. But as the sacrifices of our guild members have increased, we must now look to the outside for help. "Tell me about Queen Freya." "What can I do for you?" [32020-10.htm] Rafforty: The Ice Queen Freya rules this territory. She was not always like this... One day she just changed into a cruel, ice-cold person! You'd do well to avoid her! "Tell me about the Zinnia Guild." "What can I do for you?" [32020-11.htm] Rafforty: You were thinking about something else... I'll say it again. Would you like to work with the Zinnia Guild? You have nothing to lose! If it is difficult for you to decide, perhaps you have some questions? "Tell me about the Zinnia Guild." "Tell me about Queen Freya." "What exactly am I going to do?" [32020-12.htm] Rafforty: Our guild's goal is to restore Queen Freya to her original self. Misa, who you met a while ago, is also a guild member. I'd like you to investigate the information we've collected so far. Hmmmm....? I have a meeting, would you please come back later? [32020-13.htm] Rafforty: I've heard that Misa has some very good information! You've already met her, so you shouldn't have any trouble finding her again. Would you check and see if it's true? She never comes out during the day, you'll need to meet her at night at Frost Lake. Give this letter to her, she'll take it from there. [32020-14.htm] Rafforty: You haven't left yet? Go see Misa at Frost Lake tonight and check the information. I'll rely on your judgment. [32020-15.htm] Rafforty: Thank you! So, you've found the whereabouts of Kierre? What an accomplishment! My guild will be overjoyed! Your hard work has really paid off! Did you find anything useful when you found Kierre? "Here's a piece of the report." [32020-16.htm] Rafforty: It appears to be one of our cryptograms... But it's very old! It will take some time to decrypt it... Would you mind coming back later? [32020-17.htm] Rafforty: Good timing! We've decrypted the report, and it was very interesting! It says that we still need some Tablet Fragments to obtain the information. Did you happen to see any Tablet Fragments during your investigation? "Here's the Tablet Fragment." "No, but I'll look for it." [32020-18.htm] Rafforty: Ah.... Yes, this is it. I must start an investigation at once! Thank you for your help. Please accept this reward. It's not much, but it is a token of our appreciation for your hard work. [32020-19.htm] Rafforty: What am I supposed to do when you show me empty hands like that? It seems you've seen something like a Tablet Fragment... Would you please look for it? [32020-20.htm] Rafforty: Please try to find the Tablet Fragment. [32022-01.htm] I've found something on the ice sculpture: it seems to be holding a piece of paper in its hand. Take the piece of paper and read it. [32022-02.htm] ( "%$&@#$, ~!@@#$%#@ @#@ @$^&*@! @#$..." This report is written in an unknown language. It must be a code of some kind... I should show it to Rafforty. [32022-03.htm] I shall go back to Rafforty and report what I've found. [Sculpture-01.htm] I checked out the sculpture and the surrounding area, and found nothing. I'll broaden my search. [Sculpture-02.htm] I've already searched this area. I'll look somewhere else. [Sculpture-03.htm] I thought there was nothing there, but... I think there's something under the sculpture. What is it? Pick it up. Ignore it. [Sculpture-04.htm] Finally I have the fragment! Unfortunately, the Ice Queen has discovered what I've been doing. Kierre's whereabouts have at last been discovered. It seems that Freya keeps him in her territory, but it's a place far away from the haunts of men, southwest of the Labyrinth... Finding him is our last hope. [Sculpture-05.htm] Whatever it is, I doubt it's useful to me... I'll search some other sculptures now. [Sculpture-06.htm] Is there something here? Yes, I think I see something written under the sculpture. Check the ground. [Sculpture-07.htm] This was the fragment that I passed up. Let's take it back to Rafforty. [Sculpture-08.htm] (There's nothing left to be done here. Let's take the fragment to Rafforty.)
Исходник условий и наград (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.Q00115_TheOtherSideOfTruth;

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;
import org.l2jmobius.gameserver.network.enums.ChatType;

/**
 * @author Mobius
 * @note Based on python script
 */
public class Q00115_TheOtherSideOfTruth extends Quest
{
	// NPCs
	private static final int MISA = 32018;
	private static final int SUSPICIOUS = 32019;
	private static final int RAFFORTY = 32020;
	private static final int SCULPTURE1 = 32021;
	private static final int KIERRE = 32022;
	private static final int SCULPTURE2 = 32077;
	private static final int SCULPTURE3 = 32078;
	private static final int SCULPTURE4 = 32079;
	
	// Items
	private static final int LETTER = 8079;
	private static final int LETTER2 = 8080;
	private static final int TABLET = 8081;
	private static final int REPORT = 8082;
	
	public Q00115_TheOtherSideOfTruth()
	{
		super(115, "The Other Side of Truth");
		addStartNpc(RAFFORTY);
		addTalkId(RAFFORTY, MISA, SCULPTURE1, SCULPTURE2, SCULPTURE3, SCULPTURE4, KIERRE);
		registerQuestItems(LETTER, LETTER2, TABLET, REPORT);
	}
	
	@Override
	public String onEvent(String event, Npc npc, Player player)
	{
		String htmltext = event;
		final QuestState qs = player.getQuestState(getName());
		if (qs == null)
		{
			return htmltext;
		}
		
		switch (event)
		{
			case "32018-04.htm":
			{
				qs.setCond(7, true);
				takeItems(player, LETTER2, 1);
				break;
			}
			case "32020-02.htm":
			{
				qs.startQuest();
				break;
			}
			case "32020-05.htm":
			{
				qs.setCond(3, true);
				takeItems(player, LETTER, 1);
				break;
			}
			case "32020-06.htm":
			case "32020-08a.htm":
			{
				qs.exitQuest(true, true);
				break;
			}
			case "32020-08.htm":
			case "32020-07a.htm":
			{
				qs.setCond(4, true);
				break;
			}
			case "32020-12.htm":
			{
				qs.setCond(5, true);
				break;
			}
			case "32020-16.htm":
			{
				qs.setCond(10, true);
				takeItems(player, REPORT, 1);
				break;
			}
			case "32020-18.htm":
			{
				if (getQuestItemsCount(player, TABLET) == 0)
				{
					qs.setCond(11, true);
					htmltext = "32020-19.htm";
				}
				else
				{
					qs.exitQuest(false, true);
					giveAdena(player, 115673, true);
					addExpAndSp(player, 493595, 40442);
				}
				break;
			}
			case "32020-19.htm":
			{
				qs.setCond(11, true);
				break;
			}
			case "32022-02.htm":
			{
				qs.setCond(9, true);
				final Npc man = addSpawn(SUSPICIOUS, 104562, -107598, -3688, 0, false, 4000);
				man.broadcastSay(ChatType.GENERAL, "We meet again.");
				startQuestTimer("2", 3700, man, player);
				giveItems(player, REPORT, 1);
				break;
			}
			case "Sculpture-04.htm":
			{
				qs.set("talk", "1");
				htmltext = "Sculpture-05.htm";
				qs.set(String.valueOf(npc.getId()), "1");
				break;
			}
			case "Sculpture-04a.htm":
			{
				qs.setCond(8, true);
				final Npc man = addSpawn(SUSPICIOUS, 117890, -126478, -2584, 0, false, 4000);
				man.broadcastSay(ChatType.GENERAL, "This looks like the right place...");
				startQuestTimer("1", 3700, man, player);
				htmltext = "Sculpture-04.htm";
				if ((qs.getInt(String.valueOf(SCULPTURE1)) == 0) && (qs.getInt(String.valueOf(SCULPTURE2)) == 0))
				{
					giveItems(player, TABLET, 1);
				}
				break;
			}
			case "Sculpture-05.htm":
			{
				qs.set(String.valueOf(npc.getId()), "1");
				break;
			}
			case "1":
			{
				npc.broadcastSay(ChatType.GENERAL, "I see someone. Is this fate?");
				break;
			}
			case "2":
			{
				npc.broadcastSay(ChatType.GENERAL, "Don't bother trying to find out more about me. Follow your own destiny.");
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public String onTalk(Npc npc, Player player)
	{
		final QuestState qs = getQuestState(player, true);
		String htmltext = getNoQuestMsg(player);
		
		final int state = qs.getState();
		final int npcId = npc.getId();
		final int cond = qs.getCond();
		if (state == State.COMPLETED)
		{
			htmltext = getAlreadyCompletedMsg(player);
		}
		else if (npcId == RAFFORTY)
		{
			if (state == State.CREATED)
			{
				if (qs.getPlayer().getLevel() >= 53)
				{
					htmltext = "32020-01.htm";
				}
				else
				{
					htmltext = "32020-00.htm";
					qs.exitQuest(true);
				}
			}
			else if (cond == 1)
			{
				htmltext = "32020-03.htm";
			}
			else if (cond == 2)
			{
				htmltext = "32020-04.htm";
			}
			else if (cond == 3)
			{
				htmltext = "32020-05.htm";
			}
			else if (cond == 4)
			{
				htmltext = "32020-11.htm";
			}
			else if (cond == 5)
			{
				htmltext = "32020-13.htm";
				giveItems(player, LETTER2, 1);
				qs.setCond(6, true);
			}
			else if (cond == 6)
			{
				htmltext = "32020-14.htm";
			}
			else if (cond == 9)
			{
				htmltext = "32020-15.htm";
			}
			else if (cond == 10)
			{
				htmltext = "32020-17.htm";
			}
			else if (cond == 11)
			{
				htmltext = "32020-20.htm";
			}
			else if (cond == 12)
			{
				htmltext = "32020-18.htm";
				qs.exitQuest(false, true);
				giveAdena(player, 60044, true);
			}
		}
		else if (npcId == MISA)
		{
			if (cond == 1)
			{
				htmltext = "32018-01.htm";
				giveItems(player, LETTER, 1);
				qs.setCond(2, true);
			}
			else if (cond == 2)
			{
				htmltext = "32018-02.htm";
			}
			else if (cond == 6)
			{
				htmltext = "32018-03.htm";
			}
			else if (cond == 7)
			{
				htmltext = "32018-05.htm";
			}
		}
		else if (npcId == SCULPTURE1)
		{
			if (cond == 7)
			{
				if (qs.getInt(String.valueOf(npcId)) == 1)
				{
					htmltext = "Sculpture-02.htm";
				}
				else if (qs.getInt("talk") == 1)
				{
					htmltext = "Sculpture-06.htm";
				}
				else
				{
					htmltext = "Sculpture-03.htm";
				}
			}
			else if (cond == 8)
			{
				htmltext = "Sculpture-04.htm";
			}
			else if (cond == 11)
			{
				giveItems(player, TABLET, 1);
				qs.setCond(12, true);
				htmltext = "Sculpture-07.htm";
			}
			else if (cond == 12)
			{
				htmltext = "Sculpture-08.htm";
			}
		}
		else if (npcId == SCULPTURE2)
		{
			if (cond == 7)
			{
				if (qs.getInt(String.valueOf(npcId)) == 1)
				{
					htmltext = "Sculpture-02.htm";
				}
				else if (qs.getInt("talk") == 1)
				{
					htmltext = "Sculpture-06.htm";
				}
				else
				{
					htmltext = "Sculpture-03.htm";
				}
			}
			else if (cond == 8)
			{
				htmltext = "Sculpture-04.htm";
			}
			else if (cond == 11)
			{
				giveItems(player, TABLET, 1);
				qs.setCond(12, true);
				htmltext = "Sculpture-07.htm";
			}
			else if (cond == 12)
			{
				htmltext = "Sculpture-08.htm";
			}
		}
		else if (npcId == SCULPTURE3)
		{
			if (cond == 7)
			{
				if (qs.getInt(String.valueOf(npcId)) == 1)
				{
					htmltext = "Sculpture-02.htm";
				}
				else
				{
					htmltext = "Sculpture-01.htm";
					qs.set(String.valueOf(npcId), "1");
				}
			}
			else if (cond == 8)
			{
				htmltext = "Sculpture-04.htm";
			}
			else if (cond == 11)
			{
				giveItems(player, TABLET, 1);
				qs.setCond(12, true);
				htmltext = "Sculpture-07.htm";
			}
			else if (cond == 12)
			{
				htmltext = "Sculpture-08.htm";
			}
		}
		else if (npcId == SCULPTURE4)
		{
			if (cond == 7)
			{
				if (qs.getInt(String.valueOf(npcId)) == 1)
				{
					htmltext = "Sculpture-02.htm";
				}
				else
				{
					htmltext = "Sculpture-01.htm";
					qs.set(String.valueOf(npcId), "1");
				}
			}
			else if (cond == 8)
			{
				htmltext = "Sculpture-04.htm";
			}
			else if (cond == 11)
			{
				giveItems(player, TABLET, 1);
				qs.setCond(12, true);
				htmltext = "Sculpture-07.htm";
			}
			else if (cond == 12)
			{
				htmltext = "Sculpture-08.htm";
			}
		}
		else if (npcId == KIERRE)
		{
			if (cond == 8)
			{
				htmltext = "32022-01.htm";
			}
			else if (cond == 9)
			{
				htmltext = "32022-03.htm";
			}
		}
		
		return htmltext;
	}
}