ZURSULUS L2

Mimir's Elixir

ID
235
Название
Mimir's Elixir
start_npcs_json
[30721]
npc_ids_json
[30718,30721,31149]
constants_json
{"JOAN":30718,"LADD":30721,"MIXING_URN":31149,"STAR_OF_DESTINY":5011,"PURE_SILVER":6320,"TRUE_GOLD":6321,"SAGE_STONE":6322,"BLOOD_FIRE":6318,"MIMIR_ELIXIR":6319,"MAGISTER_MIXING_STONE":5905,"SCROLL_ENCHANT_WEAPON_A":729}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00235_MimirsElixir/Q00235_MimirsElixir.java

NPC квеста

IDНазваниеСтарт квестаУровень
30718JoanНет70
30721LaddДа70
31149Alchemist's Mixing UrnНет70

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

if (player.getLevel() < 75)

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

giveItems(player, MAGISTER_MIXING_STONE, 1);
giveItems(player, SCROLL_ENCHANT_WEAPON_A, 1);
giveItems(player, MIMIR_ELIXIR, 1);
giveItems(player, TRUE_GOLD, 1);
giveItems(player, SAGE_STONE, 1);
giveItems(player, BLOOD_FIRE, 1);

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

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

[30718-01.htm] Magister Joan: What's the world coming to? Magister Ladd, asking for help? He wants True Gold, eh? I'll wager he's restarted his research into Mimir's Elixir! He swore he'd given it up! He gave all of his True Gold to me, and said he wouldn't need it again! And now you've come, asking for it back! I suppose he thought I would just keep it for him? Ha! I used it up long ago! If he really needs it, I can make more. But it won't be easy... "What's the problem?" [30718-02.htm] Magister Joan: Have you heard of the Sage's Stone? It's a crystal that one must make in order to be recognized as a mage. The manufacturing process actually changes the basic properties of matter, and is fundamental in all magical research. The reason I'm telling you this is... To manufacture True Gold, I must have a Sage's Stone. And you see, I had one, but... It's a long story... Uh, there was an explosion of sorts... it occurred during an experiment. Anyway, I don't have it anymore. Would you get one for me? If you'll get me a Sage's Stone, I'll make True Gold for you. "I will help you." [30718-03.htm] Magister Joan: Very good! You shall leave immediately for the Silent Valley! I want you to deal with the chimera piece. You'll find many other creatures there, but they're all shadows of the same being. Though only one holds the Sage's Stone, there's really no way of telling which one it is. Just keep killing chimera pieces until you find it. Thank you. Now get going! [30718-04.htm] Magister Joan: Did you get the Sage's Stone? I can't make True Gold without the Sage's Stone, remember. Go immediately to the Silent Valley and kill the chimera pieces that you encounter. One of them will have the Sage's Stone. [30718-05.htm] Magister Joan: You've brought me the Sage's Stone! Good job! This precious little stone is the motivating force of my magic! I feel as though a part of my own flesh has been returned to me... I shall make your True Gold right away. I'll blend these reagents, heat it up, use the Sage's Stone... Now we must wait. Would you like some advice while we're waiting? "Yes, please!" [30718-06.htm] Magister Joan: ... Mimir's Elixir can teach you things that you would otherwise never learn in this dimension. This can be a very dangerous knowledge, and some even say that it goes against the will of the gods. At the time of the creation, the gods bestowed physical skills and magic upon the races in differing ratios. Dwarves have weaker magical skills but have outstanding dexterity and intelligence. Orcs have amazing strength and battle skills, but no connection with servitors. There are similar trade-offs among all the races. It's the first law of nature and the will of the gods that we all have limits. The natural order is violated if we carelessly exceed them. Your new strength may cost you more than you realize. Consider your options carefully. I've said enough already. Ladd is waiting... Run along... Don't forget what I've said... [30721-01.htm] Magister Ladd: Have we met? I've had my head buried in books for so long, I have no memory left for faces! Was there something you wanted to say to me? What brings you to the Ivory Tower of Oren? "Tell me about Mimir's Elixir." [30721-01a.htm] Magister Ladd: Not long ago, a stranger visited me asking about the research that I performed long ago. He seemed very familiar to me... Who was that?... He got me thinking about things I haven't thought about in years... I remember thinking how the research was really dangerous, and I stopped doing it because I feared the effect it could have on our true essence... But the stranger said... "Soon, a traveler carrying a Star of Destiny will come to see you. It is he who shall take control in the future era of chaos. He must learn how to escape the shackles of fate forced on him by the gods. Ladd, you must tell him how..." (This quest may only be undertaken by a character possessing a Star of Destiny.) [30721-01b.htm] Magister Ladd: Long ago, I studied potions. The magic of the giants, secrets of the gods... That was the stuff of my research. But such knowledge is not for mere mortals such as us... I sealed that research and put it out of my mind for a long time. However, recently, I've been thinking... If some hero was to come along that didn't fear the wrath of the gods... If I happened to meet such a hero, I think I might just be willing to restart my research! (This quest may only be undertaken by a character of level 75 and above.) [30721-02.htm] Magister Ladd: Recently a stranger came to see me. He wore black armor and seemed other-worldly. He was accompanied by a young, blonde girl. He said... "Soon, a traveler carrying a Star of Destiny will visit you and ask about Mimir's Elixir. It is he who will take control in the future era of chaos. Ladd, you must tell him how to break the shackles placed upon him by the gods." You are the one of whom he spoke! Are you a hero? Do you feel like one? You don't have to answer that. It will become obvious in time. Come to think of it, why was the blonde girl shaking her head? Do you think you could create Mimir's Elixir? I think you could. But whether or not you could endure life after drinking it... That is another story. Finding your own fate is sometimes harder than swimming with armor on. "Finding my own fate?" [30721-03.htm] Magister Ladd: Ah, yes! Mimir's Elixir! This powerful potion was developed by Mimir, the greatest mage in the era of the giants... It is the source of life itself, used by the gods when they created the five races. This elixir emboldened the giants, giving them the power to create life itself and thus threatening the supremacy of the gods! Luckily for us, our dreams are more restrained than those of the giants... I sacrificed my youth to create this reagent. My research was the most important thing in the world to me! "But you gave it up!?" [30721-04.htm] Magister Ladd: Now that I think back on it... I must have been the fear... I am a devoted Elf, seeking enlightenment from the goddess Shilen. My search inadvertently brought me into direct conflict with the gods! I'm no hero, but it became a driving force in my life to discover the source and true nature of magic. I wanted no more. I could have chosen the path of destruction, following the likes of Baium and Beleth, but did not. There are but two types of heroes, and given the choice, I chose enlightenment. "Two types of heroes? What is the other type?" [30721-05.htm] Magister Ladd: Some heroes reject destiny, and some have it thrust upon them... For instance, Raul, the Unification King, was chosen by the Goddess of the Lake, and there was Emperor Shunaiman, who received power from Einhasad... Don't you agree that they were chosen by the gods? Those who are chosen have no use for Mimir's Elixir. But the Star of Destiny... that's another story... Do you want to make Mimir's Elixir? How about it? Can you handle the power? "Yes." [30721-06.htm] Magister Ladd: Those two people rekindled my long-dormant interest in research. When I was young and fearless, I didn't hesitate to take the chances necessary to gather ingredients... But time has mellowed my fervor. I've come to appreciate the simpler things in life. Would you gather the ingredients I need to make the elixir? First I must have Pure Silver. Go and find Merchant Wesley beneath the Ivory Tower. He will teach you the basics of manufacturing reagents and using a mixing urn. Make some Pure Silver by combining Lunargent and Quicksilver in equal amounts. Wesley doesn't know this formula, so remember it well... [30721-07.htm] Magister Ladd: You haven't found Quicksilver yet? If you aren't serious about this, it certainly doesn't matter to me... I already told you how to make Pure Silver! Go find Merchant Wesley under Ivory Tower. He will teach you how to use the mixing urn. [30721-08.htm] Magister Ladd: Wonderful! You have brought some extremely Pure Silver... Such a simple, yet magical substance. You're obviously committed to your mission. All of these things coming together can't be a coincidence... The Star of Destiny, Mimir's Elixir... And those two strangers asking around about me... There can be only one explanation: My role in life is to make Mimir's Elixir for you... All of my work up to now has been preparing me just for this mission. "So, is this all you need to make the elixir?" [30721-09.htm] Magister Ladd: Certainly not! How can you make something from only one ingredient? Are you kidding? We must also have True Gold, of course. But I'm afraid it won't be easy to find. When I gave up my studies many years ago, I gave what I had left to Magister Joan along with the recipe for making the elixir. I wonder if she's still got it? Well, it wouldn't hurt to ask her. [30721-10.htm] Magister Ladd: To create Mimir's Elixir I must have True Gold. True Gold and Pure Silver are required to create the elixir. Go and see Magister Joan in this tower and ask her for my True Gold. [30721-11.htm] Magister Ladd: Wonderful! You've brought pure gold! Now comes the hard part... What always stopped my research was the fact that the mixing of True Gold and Pure Silver cannot be accomplished with ordinary fire. It always loses its purity. But recently I received a hint to the solution from a man wearing black armor... He had been following my research, and doing quite a bit on his own... But as I said, my only role is to help you. "How do you mix the elixir?" [30721-12.htm] Magister Ladd: Go to the Lair of Antharas and kill the bloody guardians. For your efforts you will get Blood Fire, the flame of purgatory that burns in their bodies. This is what we will need to mix True Gold and Pure Silver. Use this mixing stone in conjunction with the mixing urn under the Ivory Tower to combine the three ingredients. Set the temperature to #3 Phoenix. Mimir's Elixir will be born from that flame. [30721-13.htm] Magister Ladd: Obtain Blood Fire by killing bloody guardians in the Lair of Antharas. Once you get the Blood Fire, create Mimir's Elixir using the mixing urn under the Ivory Tower. Combine Pure Silver and True Gold, using Blood Fire as a catalyst. Set the temperature to #3 Phoenix... Once you've made the elixir, bring it to me. I'll show you how to use it. [30721-14.htm] Magister Ladd: You've done it! This is the legendary elixir discovered by the giant, Mimir. How to use it? Simple enough... Drink up! Honestly, I just wanted you to do it here so I could see what happens to you... Before you drink, I should tell you... While you were at Lair of Antharas, the man in black armor came back. He asked me to give you this letter. It seems to be written in the language of the ancient Ferios empire. Who could read something like this? I can only think of a few... But hey, what do you know? One of them is me! "Translate the letter for me, please." [30721-15.htm] Magister Ladd: OK, then... Um. "Break the chains of race and class, and be truly free. Dance to the rhythm of nature, Rejoice in the beauty of the stars. Don't worry about tomorrow, Enjoy small victories and learn in baby steps. Remember, life is an illusion." These words fit you well. OK, drink Mimir's Elixir. It will be the catalyst and your mind the ingredient. Your spirit is the fire that melds these together. Your body and mind will be reformed by the elixir. Are you ready? Drink the elixir. [30721-16.htm] Magister Ladd: ... .... .... Can you feel it? I'm curious.... Tell me, what do you feel? Maybe it hasn't taken effect yet... But trust me, you'll never be the same... You must go to a grand master, Grand Magister, warehouse chief or prefect and ask about a class transfer. Thus you can escape your fate that was planned by the gods and pursue your own dreams. To commemorate this day when you took your destiny into your own hands, please accept this small gift. It is time for us to part. I'll be watching your progress. Will you save the world from the coming chaos or will you hasten its destruction? That is now up to you. [31149-01.htm] Mixing Urn: There is a small niche on the side of the urn. Insert a Magister's Mixing Stone into the niche. [31149-02.htm] Mixing Urn: The urn starts glowing faintly. Select the first ingredient: Pure Silver [31149-03.htm] Mixing Urn: You've placed Pure Silver into the urn. Next step. [31149-04.htm] Mixing Urn: The urn starts to shake and emit a bright light. Select the second ingredient: True Gold [31149-05.htm] Mixing Urn: You've placed True Gold into the urn. Next step. [31149-06.htm] Mixing Urn: The urn emits a dazzling light and begins to shake violently. Select the catalyst ingredient: Blood Fire [31149-07.htm] Mixing Urn: Select the mixing temperature: #1 - Salamander #2 - Efrit #3 - Phoenix [31149-fail.htm] Mixing Urn: The urn goes silent and dark. Mixing failed! Try mixing again. [31149-havent.htm] Mixing Urn: You don't have enough ingredient. [31149-success.htm] Mixing Urn: Mixing successful! Mimir's Elixir was produced.
Исходник условий и наград (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.Q00235_MimirsElixir;

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.serverpackets.MagicSkillUse;
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;

public class Q00235_MimirsElixir extends Quest
{
	// NPCs
	private static final int JOAN = 30718;
	private static final int LADD = 30721;
	private static final int MIXING_URN = 31149;
	
	// Items
	private static final int STAR_OF_DESTINY = 5011;
	private static final int PURE_SILVER = 6320;
	private static final int TRUE_GOLD = 6321;
	private static final int SAGE_STONE = 6322;
	private static final int BLOOD_FIRE = 6318;
	private static final int MIMIR_ELIXIR = 6319;
	private static final int MAGISTER_MIXING_STONE = 5905;
	
	// Reward
	private static final int SCROLL_ENCHANT_WEAPON_A = 729;
	
	public Q00235_MimirsElixir()
	{
		super(235, "Mimir's Elixir");
		registerQuestItems(PURE_SILVER, TRUE_GOLD, SAGE_STONE, BLOOD_FIRE, MAGISTER_MIXING_STONE, MIMIR_ELIXIR);
		addStartNpc(LADD);
		addTalkId(LADD, JOAN, MIXING_URN);
		addKillId(20965, 21090);
	}
	
	@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 "30721-06.htm":
			{
				st.startQuest();
				break;
			}
			case "30721-12.htm":
			{
				if (hasQuestItems(player, TRUE_GOLD))
				{
					st.setCond(6, true);
					giveItems(player, MAGISTER_MIXING_STONE, 1);
				}
				break;
			}
			case "30721-16.htm":
			{
				if (hasQuestItems(player, MIMIR_ELIXIR))
				{
					player.broadcastPacket(new MagicSkillUse(player, player, 4339, 1, 1, 1));
					takeItems(player, MAGISTER_MIXING_STONE, -1);
					takeItems(player, MIMIR_ELIXIR, -1);
					takeItems(player, STAR_OF_DESTINY, -1);
					giveItems(player, SCROLL_ENCHANT_WEAPON_A, 1);
					player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
					st.exitQuest(false, true);
				}
				break;
			}
			case "30718-03.htm":
			{
				st.setCond(3, true);
				break;
			}
			case "31149-02.htm":
			{
				if (!hasQuestItems(player, MAGISTER_MIXING_STONE))
				{
					htmltext = "31149-havent.htm";
				}
				break;
			}
			case "31149-03.htm":
			{
				if (!hasQuestItems(player, MAGISTER_MIXING_STONE, PURE_SILVER))
				{
					htmltext = "31149-havent.htm";
				}
				break;
			}
			case "31149-05.htm":
			{
				if (!hasQuestItems(player, MAGISTER_MIXING_STONE, PURE_SILVER, TRUE_GOLD))
				{
					htmltext = "31149-havent.htm";
				}
				break;
			}
			case "31149-07.htm":
			{
				if (!hasQuestItems(player, MAGISTER_MIXING_STONE, PURE_SILVER, TRUE_GOLD, BLOOD_FIRE))
				{
					htmltext = "31149-havent.htm";
				}
				break;
			}
			case "31149-success.htm":
			{
				if (hasQuestItems(player, MAGISTER_MIXING_STONE, PURE_SILVER, TRUE_GOLD, BLOOD_FIRE))
				{
					st.setCond(8, true);
					takeItems(player, PURE_SILVER, -1);
					takeItems(player, TRUE_GOLD, -1);
					takeItems(player, BLOOD_FIRE, -1);
					giveItems(player, MIMIR_ELIXIR, 1);
				}
				else
				{
					htmltext = "31149-havent.htm";
				}
				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:
			{
				if (player.getLevel() < 75)
				{
					htmltext = "30721-01b.htm";
				}
				else if (!hasQuestItems(player, STAR_OF_DESTINY))
				{
					htmltext = "30721-01a.htm";
				}
				else
				{
					htmltext = "30721-01.htm";
				}
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case LADD:
					{
						if (cond == 1)
						{
							if (hasQuestItems(player, PURE_SILVER))
							{
								htmltext = "30721-08.htm";
								st.setCond(2, true);
							}
							else
							{
								htmltext = "30721-07.htm";
							}
						}
						else if (cond < 5)
						{
							htmltext = "30721-10.htm";
						}
						else if ((cond == 5) && hasQuestItems(player, TRUE_GOLD))
						{
							htmltext = "30721-11.htm";
						}
						else if ((cond == 6) || (cond == 7))
						{
							htmltext = "30721-13.htm";
						}
						else if ((cond == 8) && hasQuestItems(player, MIMIR_ELIXIR))
						{
							htmltext = "30721-14.htm";
						}
						break;
					}
					case JOAN:
					{
						if (cond == 2)
						{
							htmltext = "30718-01.htm";
						}
						else if (cond == 3)
						{
							htmltext = "30718-04.htm";
						}
						else if ((cond == 4) && hasQuestItems(player, SAGE_STONE))
						{
							htmltext = "30718-05.htm";
							st.setCond(5, true);
							takeItems(player, SAGE_STONE, -1);
							giveItems(player, TRUE_GOLD, 1);
						}
						else if (cond > 4)
						{
							htmltext = "30718-06.htm";
						}
						break;
					}
					// The urn gives the same first htm. Bypasses' events will do all the job.
					case MIXING_URN:
					{
						htmltext = "31149-01.htm";
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isPet)
	{
		final QuestState st = getQuestState(player, false);
		if ((st == null) || !st.isStarted())
		{
			return;
		}
		
		switch (npc.getId())
		{
			case 20965:
			{
				if (st.isCond(3) && (getRandom(10) < 2))
				{
					giveItems(player, SAGE_STONE, 1);
					st.setCond(4, true);
				}
				break;
			}
			case 21090:
			{
				if (st.isCond(6) && (getRandom(10) < 2))
				{
					giveItems(player, BLOOD_FIRE, 1);
					st.setCond(7, true);
				}
				break;
			}
		}
	}
}