ZURSULUS L2

Make Formal Wear

ID
37
Название
Make Formal Wear
start_npcs_json
[30842]
npc_ids_json
[30842,31520,31521,31627]
constants_json
{"ALEXIS":30842,"LEIKAR":31520,"JEREMY":31521,"MIST":31627,"MYSTERIOUS_CLOTH":7076,"JEWEL_BOX":7077,"SEWING_KIT":7078,"DRESS_SHOES_BOX":7113,"SIGNET_RING":7164,"ICE_WINE":7160,"BOX_OF_COOKIES":7159,"FORMAL_WEAR":6408}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00037_MakeFormalWear/Q00037_MakeFormalWear.java

NPC квеста

IDНазваниеСтарт квестаУровень
30842AlexisДа70
31520LeikarНет70
31521JeremyНет70
31627MistНет70

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

htmltext = (player.getLevel() < 60) ? "30842-0a.htm" : "30842-0.htm";

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

giveItems(player, SIGNET_RING, 1);
giveItems(player, ICE_WINE, 1);
giveItems(player, BOX_OF_COOKIES, 1);
giveItems(player, FORMAL_WEAR, 1);

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

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

[30842-0.htm] Trader Alexis: Welcome. What are you looking for? I'm sorry, but I can't do formal wear. Meet Leikar in Aden Castle Town, she can help you. Quest [30842-0a.htm] Trader Alexis: Welcome. What can I help you with? I'm sorry, but you must grow a little before you can wear Formal Wear. (This quest may only be undertaken by a character of level 60 and above.) [30842-1.htm] Trader Alexis: She's a maid in Aden Castle Town. Quite good with her hands. All of her clothes are hand made and of excellent quality. Tell her I sent you. [30842-2.htm] Trader Alexis: Ask Leikar, she's the best at Formal Wear around here. [31520-0.htm] Maid Leikar: Hello! What can I do for you? Formal wear? I'm sorry, but I need to run an errand now. I'll be gone for quite a while... Don't make that face! Hmm... I have an idea! Will you help me? I need to run an errand that will take a while. If you do it for me, I'll start the preparations for your formal wear. What's the errand? [31520-1.htm] Maid Leikar: Ha! You look happier now! I need you to take this signet ring to Chef Jeremy at the hot spring resort and pick up the cookies I ordered. I'd really appreciate it if you'd do this for me. [31520-1a.htm] Maid Leikar: You haven't left yet? Speak with Chef Jeremy at the hot springs resort and bring back the cookies I ordered! [31520-2.htm] Maid Leikar: Ah, the cookies I requested! Great! It wasn't too hard, was it? It didnt't seem to give you much trouble. I've asked several people to find the materials to make the formal wear I promised you, but I haven't heard back from them yet. If I don't get them soon, I may not make it on time. Would you go on my behalf and find out the status of my orders? What do I need to do? [31520-3.htm] Maid Leikar: I asked Blacksmith Ferris in Aden Castle Town to make a sewing kit for me, and I asked Jeweler Ellie of Giran Castle Town for some gemstones. I also asked Radia of Giran Castle Town to make me some fabric. None of them has contacted me yet. Would you go see them and bring back the materials? Meanwhile, I'll take these cookies to the castle. [31520-3a.htm] Maid Leikar: Have you forgotten whom you need to visit? Pick up a Sewing kit from Blacksmith Ferris of Aden Castle Town, gemstones from Jeweler Ellie of Giran Castle Town and the fabric from Radia of Giran Castle Town. Hurry back! [31520-4.htm] Maid Leikar: Oh, you're wonderful! You brought all the items I requested! That was quite a journey you made! Please give me the materials. You can take a rest under the tree over there! We don't have much time left, so I'll get started right away By the way, do you happen to have the dress shoes with you? Oh no! I don't! [31520-5.htm] Maid Leikar: If you don't have the shoes, while I'm making the formal wear, go to Trader Woodley and ask him to make the shoes. If the formal wear and the shoes don't match, that would be tragic, don't you agree? Now, hurry to Mr. Woodley! [31520-5a.htm] Maid Leikar: Did you go see Mr. Woodley? Without the shoes, no matter how pretty the Formal Wear I make is, it will be totally useless. Go to Trader Woodley and ask him to make you a pair of shoes. Hurry! [31520-6.htm] Maid Leikar: I'm just about finished with the formal wear. Would you give me the dress shoes? I'll compare them with the formal wear. Here they are! [31520-7.htm] Maid Leikar: Yes? Just a second! ...... Voila! It's done! Would you please try it on? Well, I guess since you would need to get naked, you should try it on at home! Ha! I used your exact measurements, so I'm not worried about the fit. Well, I hope you have a wonderful wedding! Let me know how it turns out! Bye! [31521-0.htm] Chef Jeremy: What brings you here? Can't you see how busy I am? You're here for the cookies? Let me see the stamp of the person who ordered it. Ah, you're here for Leikar! You're early! They're not ready yet. Don't rush me. I've got and idea, why don't you help me? They'll be ready much quicker... What can I do to help? [31521-1.htm] Chef Jeremy: I just got an order for a cool bottle of wine from Information Broker Mist at the hot springs resort. If you'll take it to him, i'll bake some cookies for you. Is that a deal or what? Hurry! I'll have some fresh, hot cookies waiting for you! [31521-1a.htm] Chef Jeremy: Haven't you left yet? You'd better get that cool wine to Information Broker Mist right away! [31521-2.htm] Chef Jeremy: Thank you! What did Mist say when you gave him the wine? Was he upset because it was so late? "He didn't seem upset to me." [31521-3.htm] Chef Jeremy: What a relief! Very well, as promised, here are your cookies. I sealed the box very tight to keep them fresh. Handle it carefully so that you don't break them, and give my regards to Leikar! [31521-3a.htm] Chef Jeremy: Did you pack the cookies I made for you? Although they're sealed quite securely, they won't stay fresh forever! Take them to Leikar quickly, before they go stale! [31627-0.htm] Information Broker Mist: Do you have the wine I ordered ? "Here's the wine." [31627-1.htm] Information Broker Mist: It's not cold anymore! You look like a newbie. Next time, try harder. Tell Jeremy I got the wine and thank him. [31627-2.htm] Information Broker Mist: Why are you back? Don't bother me! Speak with Jeremy!
Исходник условий и наград (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.Q00037_MakeFormalWear;

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 Q00037_MakeFormalWear extends Quest
{
	// NPCs
	private static final int ALEXIS = 30842;
	private static final int LEIKAR = 31520;
	private static final int JEREMY = 31521;
	private static final int MIST = 31627;
	
	// Items
	private static final int MYSTERIOUS_CLOTH = 7076;
	private static final int JEWEL_BOX = 7077;
	private static final int SEWING_KIT = 7078;
	private static final int DRESS_SHOES_BOX = 7113;
	private static final int SIGNET_RING = 7164;
	private static final int ICE_WINE = 7160;
	private static final int BOX_OF_COOKIES = 7159;
	
	// Reward
	private static final int FORMAL_WEAR = 6408;
	
	public Q00037_MakeFormalWear()
	{
		super(37, "Make Formal Wear");
		registerQuestItems(SIGNET_RING, ICE_WINE, BOX_OF_COOKIES);
		addStartNpc(ALEXIS);
		addTalkId(ALEXIS, LEIKAR, JEREMY, MIST);
	}
	
	@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 "30842-1.htm":
			{
				st.startQuest();
				break;
			}
			case "31520-1.htm":
			{
				st.setCond(2, true);
				giveItems(player, SIGNET_RING, 1);
				break;
			}
			case "31521-1.htm":
			{
				st.setCond(3, true);
				takeItems(player, SIGNET_RING, 1);
				giveItems(player, ICE_WINE, 1);
				break;
			}
			case "31627-1.htm":
			{
				st.setCond(4, true);
				takeItems(player, ICE_WINE, 1);
				break;
			}
			case "31521-3.htm":
			{
				st.setCond(5, true);
				giveItems(player, BOX_OF_COOKIES, 1);
				break;
			}
			case "31520-3.htm":
			{
				st.setCond(6, true);
				takeItems(player, BOX_OF_COOKIES, 1);
				break;
			}
			case "31520-5.htm":
			{
				st.setCond(7, true);
				takeItems(player, JEWEL_BOX, 1);
				takeItems(player, MYSTERIOUS_CLOTH, 1);
				takeItems(player, SEWING_KIT, 1);
				break;
			}
			case "31520-7.htm":
			{
				takeItems(player, DRESS_SHOES_BOX, 1);
				giveItems(player, FORMAL_WEAR, 1);
				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() < 60) ? "30842-0a.htm" : "30842-0.htm";
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case ALEXIS:
					{
						if (cond == 1)
						{
							htmltext = "30842-2.htm";
						}
						break;
					}
					case LEIKAR:
					{
						if (cond == 1)
						{
							htmltext = "31520-0.htm";
						}
						else if (cond == 2)
						{
							htmltext = "31520-1a.htm";
						}
						else if ((cond == 5) || (cond == 6))
						{
							if (hasQuestItems(player, MYSTERIOUS_CLOTH, JEWEL_BOX, SEWING_KIT))
							{
								htmltext = "31520-4.htm";
							}
							else if (hasQuestItems(player, BOX_OF_COOKIES))
							{
								htmltext = "31520-2.htm";
							}
							else
							{
								htmltext = "31520-3a.htm";
							}
						}
						else if (cond == 7)
						{
							htmltext = (hasQuestItems(player, DRESS_SHOES_BOX)) ? "31520-6.htm" : "31520-5a.htm";
						}
						break;
					}
					case JEREMY:
					{
						if (hasQuestItems(player, SIGNET_RING))
						{
							htmltext = "31521-0.htm";
						}
						else if (cond == 3)
						{
							htmltext = "31521-1a.htm";
						}
						else if (cond == 4)
						{
							htmltext = "31521-2.htm";
						}
						else if (cond > 4)
						{
							htmltext = "31521-3a.htm";
						}
						break;
					}
					case MIST:
					{
						if (cond == 3)
						{
							htmltext = "31627-0.htm";
						}
						else if (cond > 3)
						{
							htmltext = "31627-2.htm";
						}
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
}