ZURSULUS L2

Spirit of Craftsman

ID
103
Название
Spirit of Craftsman
start_npcs_json
[30307]
npc_ids_json
[30132,30144,30307]
constants_json
{"KARROD":30307,"CECKTINON":30132,"HARNE":30144,"KARROD_LETTER":968,"CECKTINON_VOUCHER_1":969,"CECKTINON_VOUCHER_2":970,"SOUL_CATCHER":971,"PRESERVING_OIL":972,"ZOMBIE_HEAD":973,"STEELBENDER_HEAD":974,"BONE_FRAGMENT":1107,"SPIRITSHOT_NO_GRADE":2509,"SOULSHOT_NO_GRADE":1835,"BLOODSABER":975,"SPIRITSHOT_FOR_BEGINNERS":5790,"SOULSHOT_FOR_BEGINNERS":5789,"LESSER_HEALING_POT":1060,"ECHO_BATTLE":4412,"ECHO_LOVE":4413,"ECHO_SOLITUDE":4414,"ECHO_FEAST":4415,"ECHO_CELEBRATION":4416}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00103_SpiritOfCraftsman/Q00103_SpiritOfCraftsman.java

NPC квеста

IDНазваниеСтарт квестаУровень
30132CecktinonНет70
30144HarneНет70
30307KarrodДа70

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

else if (player.getLevel() < 11)

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

giveItems(player, KARROD_LETTER, 1);
giveItems(player, BLOODSABER, 1);
rewardItems(player, LESSER_HEALING_POT, 100);
giveItems(player, SPIRITSHOT_NO_GRADE, 500);
giveItems(player, SOULSHOT_NO_GRADE, 1000);
giveItems(player, SPIRITSHOT_FOR_BEGINNERS, 3000);
giveItems(player, SOULSHOT_FOR_BEGINNERS, 7000);
giveItems(player, ECHO_BATTLE, 10);
giveItems(player, ECHO_LOVE, 10);
giveItems(player, ECHO_SOLITUDE, 10);
giveItems(player, ECHO_FEAST, 10);
giveItems(player, ECHO_CELEBRATION, 10);
giveItems(player, CECKTINON_VOUCHER_1, 1);
giveItems(player, PRESERVING_OIL, 1);
giveItems(player, STEELBENDER_HEAD, 1);
giveItems(player, CECKTINON_VOUCHER_2, 1);
giveItems(player, SOUL_CATCHER, 1);
giveItems(player, ZOMBIE_HEAD, 1);

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

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

[30132-01.htm] Abyssal Celebrant Cecktinon: A letter for me from Blacksmith Karrod ...? Hmm, what use does he have for the soul of a Dwarf slave who is already dead ... Whatever the reason may be, I cannot refuse my friend's request. It has been less than ten years since Steelbender died, and I don't think it would be difficult to call his spirit up from the kingdom of Shilen. This Well of Souls in the middle of the temple is connected to the kingdom of the dead, where Shilen rules. Shall we call it, say, a sort of mirror that lets us see into the kingdom of death? We abyssal celebrants call upon the spirits of our ancestors to seek their advice, or enemy generals that have been killed on the battlefield to learn their secrets, through this well of souls. But to call upon a spirit of the dead from the well of souls and capture it in this world, something called a Soul Catcher is required. Sadly, I don't have a Soul Catcher with me, but you should be able to obtain one by going to Magister Harne in the village. I purchase all of my materials for spell casting or rituals from Harne. I will write you a Letter of Introduction, so go to Magister Harne and ask about the Soul Catcher. [30132-02.htm] Abyssal Celebrant Cecktinon: You haven't sought out Magister Harne yet? Go and show her the letter of introduction I wrote you, and ask about the Soul Catcher. We must have a Soul Catcher to proceed with the ritual summoning of Steelbender's spirit. [30132-03.htm] Abyssal Celebrant Cecktinon: You have brought me the Soul Catcher. Now I can start the ritual calling upon the dead Dwarf's spirit. Did you say the slave's name was Roberto Steelbender? While I am preparing for this ritual, there is one thing that you can do for me. It seems that Karrod has a lot to ask this Dwarven slave, so shouldn't we make it a little easier for them to talk? There are many zombies in the swamp area. Go and bring me the head of a zombie. Make sure it is not too decayed or mangled. When you have obtained the zombie's head, rub this oil on it so that it does not rot, then bring the head to me. [30132-04.htm] Abyssal Celebrant Cecktinon: If you keep interrupting me, it will interfere with my ritual. Go to the swamp and bring me the head of a zombie. I need an intact head that is not decayed or mangled. [30132-05.htm] Abyssal Celebrant Cecktinon: This Zombie Head is in excellent condition. The chin area moves well, and all the teeth are still intact. This will do. ... I command you in the name of the abyss which rules over death. I hereby seal you to this spirit of power ... I have just transferred Steelbender's spirit, trapped in the Soul Catcher, into the head of the zombie and sealed it within. That should let him answer Karrod's questions. Please deliver this head to Blacksmith Karrod. We have applied a preservation oil on the zombie's head, but the effects do not last very long. After a few days, the head will decay and the spirit trapped within will escape back to the kingdom of the dead, so tell Karrod to finish his business with Steelbender before then. [30132-06.htm] Abyssal Celebrant Cecktinon: You haven't gone to the village yet? Go and deliver the head that holds the trapped spirit of Steelbender to Blacksmith Karrod before it begins to rot. You can find him at the village forge. [30144-01.htm] Magister Harne: You need a Soul Catcher? Planning on an exorcism ritual or something? The Abyssal Celebrants have conducted rituals to call the dead up from Shilen's kingdom for hundreds of years now, but I am always nervous -- long ago, the celebrants once called upon a dangerous entity that could not be sent back. Eventually, the elders were called upon to take care of the matter and the spirit was finally restrained, but as a result of that event many Celebrants lost their lives. The dead should be left dead. I do not attempt dangerous magic such as exorcism. Anyhow, it seems that Cecktinon needs a Soul Catcher, so I guess I must make one. For that, I will need the bones of the dead. The older the bones, the better. Please do me a favor -- go to the abandoned School of Dark Arts and hunt the undead that take the form of skeletons. Gather ten undead Bone Fragments and come back to me. I will make you the Soul Catcher with those bones. The School of Dark Arts is located southwest of the village. If you do not know the way there, ask Sentry Kayleen for directions. [30144-02.htm] Magister Harne: To create the Soul Catcher that Abyssal Celebrant Cecktinon has asked for, I need ten undead Bone Fragments. You can gather the Bone Fragments by hunting undead skeletons at the abandoned School of Dark Arts located southwest of the village. [30144-03.htm] Magister Harne: Good, now I can create a Soul Catcher from this. Like a fisherman catches fish with his net, the Abyssal Celebrants can capture the spirits of the dead from the well of souls. But unless the spirit is tied to this world, it flows back into the well. That's why a Soul Catcher is necessary. Simply put, it is a sort of bowl where the spirit of the dead can be held. Here, it is complete. When you go to the temple, please give Abyssal Celebrant Cecktinon my regards. [30144-04.htm] Magister Harne: Take the Soul Catcher that I have made to Cecktinon at the Temple of Shilen. Hurry! We shouldn't keep the Abyssal Celebrant waiting. [30307-00.htm] Blacksmith Karrod: It pains me to say it, but I will have no business with you. I just do not trust other races ... No offense. (This quest may only be undertaken by a Dark Elven character.) [30307-02.htm] Blacksmith Karrod: In a few days, the shipment of Oriharukon Ore that I ordered from the Dwarves in Giran will be arriving. Tetrarch Thifiell has commissioned me to make Oriharukon blades. But I am worried that I may not be able to make a blade good enough to satisfy the Tetrarch, as I am still unskilled in handling oriharukon metals. As soon as the oriharukon is delivered, I will start looking for ways to handle the metal. I may require your assistance then. (This quest may only be undertaken by a character of level 11 and above.) [30307-03.htm] Blacksmith Karrod: Recently I ordered a large amount of Oriharukon Ore from the Dwarven Blacksmiths of Giran. Tetrarch Thifiell has commissioned me to make Oriharukon blades. But I am having difficulties, since I am not skilled in working with this material. This precious metal is particularly difficult in all steps of manufacturing, even from its refinement stage. If only Steelbender were here now, I would be able to ask him ... Ask about Steelbender [30307-04.htm] Blacksmith Karrod: Roberto Steelbender ... He was a Dwarven Warsmith that was enslaved by we Dark Elves for nearly a century. Warsmith is a Dwarven title given to the most elite Dwarven Blacksmiths. I learned my skills from that slave Blacksmith. For decades, I worked hard under his direction, but there was always a limit to what I could do. No matter how closely I followed his instructions, the weapons and shields I made were always missing something, and always a bit dull. Then I found out that Steelbender had only taught me basic knowledge and hidden the most important skills from me -- he said that those skills were only passed on to the Dwarves and that he couldn't teach me ... I put him on a torture device and extracted those skills from him after 15 days of torture. Sadly, he couldn't stand the pain and died, but not before I found out the methods for manipulating Mithril, Adamantite and Damascus metals. This time around, I plan to call upon the spirit of Steelbender and ask him about the refinement process of Oriharukon. To do that, I am going to have to ask the Abyssal Celebrants of Shilen for exorcism rituals and prepare various materials. Do you think you can help? Say you will help [30307-05.htm] Blacksmith Karrod: First, head to the Temple of Shilen and give this letter to Abyssal Celebrant Cecktinon. Thank you. He is a friend of mine. He will gladly help. He will tell you about the exorcism spell to call the soul of Steelbender from the abyss. [30307-06.htm] Blacksmith Karrod: Go and deliver my letter to the Abyssal Celebrant Cecktinon at the temple of Shilen. Hurry! Tetrarch Thifiell is an impatient man. [30307-07.htm] Blacksmith Karrod: Steelbender's spirit is contained in this head? I see that Abyssal Celebrant Cecktinon went to great lengths for this. So now I can receive personal lessons from Steelbender about the refining of Oriharukon. You've done well, my friend. For helping me out, I will give this sword to you. It may sound like I am boasting, but it's a very useful weapon. Put it to good use. Now, shall we start ... Hey, Steelbender! What has it been, a decade now? Different head, but that dumb expression is still the same. Let's keep our welcomes short ... I've got a lot to ask you ...
Исходник условий и наград (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.Q00103_SpiritOfCraftsman;

import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.entity.actor.enums.creature.Race;
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.mechanics.variables.PlayerVariables;
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;

public class Q00103_SpiritOfCraftsman extends Quest
{
	// NPCs
	private static final int KARROD = 30307;
	private static final int CECKTINON = 30132;
	private static final int HARNE = 30144;
	
	// Items
	private static final int KARROD_LETTER = 968;
	private static final int CECKTINON_VOUCHER_1 = 969;
	private static final int CECKTINON_VOUCHER_2 = 970;
	private static final int SOUL_CATCHER = 971;
	private static final int PRESERVING_OIL = 972;
	private static final int ZOMBIE_HEAD = 973;
	private static final int STEELBENDER_HEAD = 974;
	private static final int BONE_FRAGMENT = 1107;
	
	// Rewards
	private static final int SPIRITSHOT_NO_GRADE = 2509;
	private static final int SOULSHOT_NO_GRADE = 1835;
	private static final int BLOODSABER = 975;
	private static final int SPIRITSHOT_FOR_BEGINNERS = 5790;
	private static final int SOULSHOT_FOR_BEGINNERS = 5789;
	private static final int LESSER_HEALING_POT = 1060;
	private static final int ECHO_BATTLE = 4412;
	private static final int ECHO_LOVE = 4413;
	private static final int ECHO_SOLITUDE = 4414;
	private static final int ECHO_FEAST = 4415;
	private static final int ECHO_CELEBRATION = 4416;
	
	public Q00103_SpiritOfCraftsman()
	{
		super(103, "Spirit of Craftsman");
		registerQuestItems(KARROD_LETTER, CECKTINON_VOUCHER_1, CECKTINON_VOUCHER_2, BONE_FRAGMENT, SOUL_CATCHER, PRESERVING_OIL, ZOMBIE_HEAD, STEELBENDER_HEAD);
		addStartNpc(KARROD);
		addTalkId(KARROD, CECKTINON, HARNE);
		addKillId(20015, 20020, 20455, 20517, 20518);
	}
	
	@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;
		}
		
		if (event.equals("30307-05.htm"))
		{
			st.startQuest();
			giveItems(player, KARROD_LETTER, 1);
		}
		
		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.getRace() != Race.DARK_ELF)
				{
					htmltext = "30307-00.htm";
				}
				else if (player.getLevel() < 11)
				{
					htmltext = "30307-02.htm";
				}
				else
				{
					htmltext = "30307-03.htm";
				}
				break;
			}
			case State.STARTED:
			{
				final int cond = st.getCond();
				switch (npc.getId())
				{
					case KARROD:
					{
						if (cond < 8)
						{
							htmltext = "30307-06.htm";
						}
						else if (cond == 8)
						{
							htmltext = "30307-07.htm";
							takeItems(player, STEELBENDER_HEAD, 1);
							giveItems(player, BLOODSABER, 1);
							rewardItems(player, LESSER_HEALING_POT, 100);
							
							if (player.isMageClass())
							{
								giveItems(player, SPIRITSHOT_NO_GRADE, 500);
							}
							else
							{
								giveItems(player, SOULSHOT_NO_GRADE, 1000);
							}
							
							// Give newbie reward if player is eligible
							if (player.isNewbie())
							{
								int newPlayerRewardsReceived = player.getVariables().getInt(PlayerVariables.NEWBIE_SHOTS_RECEIVED, 0);
								if (newPlayerRewardsReceived < 2)
								{
									st.showQuestionMark(26);
									if (player.isMageClass())
									{
										st.playTutorialVoice("tutorial_voice_027");
										giveItems(player, SPIRITSHOT_FOR_BEGINNERS, 3000);
										player.getVariables().set(PlayerVariables.NEWBIE_SHOTS_RECEIVED, ++newPlayerRewardsReceived);
									}
									else
									{
										st.playTutorialVoice("tutorial_voice_026");
										giveItems(player, SOULSHOT_FOR_BEGINNERS, 7000);
										player.getVariables().set(PlayerVariables.NEWBIE_SHOTS_RECEIVED, ++newPlayerRewardsReceived);
									}
								}
							}
							
							giveItems(player, ECHO_BATTLE, 10);
							giveItems(player, ECHO_LOVE, 10);
							giveItems(player, ECHO_SOLITUDE, 10);
							giveItems(player, ECHO_FEAST, 10);
							giveItems(player, ECHO_CELEBRATION, 10);
							player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
							st.exitQuest(false, true);
						}
						break;
					}
					case CECKTINON:
					{
						if (cond == 1)
						{
							htmltext = "30132-01.htm";
							st.setCond(2, true);
							takeItems(player, KARROD_LETTER, 1);
							giveItems(player, CECKTINON_VOUCHER_1, 1);
						}
						else if ((cond > 1) && (cond < 5))
						{
							htmltext = "30132-02.htm";
						}
						else if (cond == 5)
						{
							htmltext = "30132-03.htm";
							st.setCond(6, true);
							takeItems(player, SOUL_CATCHER, 1);
							giveItems(player, PRESERVING_OIL, 1);
						}
						else if (cond == 6)
						{
							htmltext = "30132-04.htm";
						}
						else if (cond == 7)
						{
							htmltext = "30132-05.htm";
							st.setCond(8, true);
							takeItems(player, ZOMBIE_HEAD, 1);
							giveItems(player, STEELBENDER_HEAD, 1);
						}
						else if (cond == 8)
						{
							htmltext = "30132-06.htm";
						}
						break;
					}
					case HARNE:
					{
						if (cond == 2)
						{
							htmltext = "30144-01.htm";
							st.setCond(3, true);
							takeItems(player, CECKTINON_VOUCHER_1, 1);
							giveItems(player, CECKTINON_VOUCHER_2, 1);
						}
						else if (cond == 3)
						{
							htmltext = "30144-02.htm";
						}
						else if (cond == 4)
						{
							htmltext = "30144-03.htm";
							st.setCond(5, true);
							takeItems(player, CECKTINON_VOUCHER_2, 1);
							takeItems(player, BONE_FRAGMENT, 10);
							giveItems(player, SOUL_CATCHER, 1);
						}
						else if (cond == 5)
						{
							htmltext = "30144-04.htm";
						}
						break;
					}
				}
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player killer, boolean isSummon)
	{
		final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
		if (qs == null)
		{
			return;
		}
		
		// The helper picks the party member that gets the drop, so every step below has to address that same player.
		final Player player = qs.getPlayer();
		
		switch (npc.getId())
		{
			case 20015:
			case 20020:
			{
				if (hasQuestItems(player, PRESERVING_OIL) && (getRandom(10) < 5))
				{
					giveItems(player, ZOMBIE_HEAD, 1);
					takeItems(player, PRESERVING_OIL, -1);
					qs.setCond(7, true);
				}
				break;
			}
			case 20517:
			case 20518:
			case 20455:
			{
				if (hasQuestItems(player, CECKTINON_VOUCHER_2) && giveItemRandomly(player, npc, BONE_FRAGMENT, 1, 10, 1, true))
				{
					qs.setCond(4, true);
				}
				break;
			}
		}
	}
}