ZURSULUS L2

Linnaeus' Special Bait

ID
53
Название
Linnaeus' Special Bait
start_npcs_json
[31577]
npc_ids_json
[]
constants_json
{"CRIMSON_DRAKE_HEART":7624,"FLAMING_FISHING_LURE":7613}
Статус разбора
metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
Источник
game/data/scripts/quests/Q00053_LinnaeusSpecialBait/Q00053_LinnaeusSpecialBait.java

NPC квеста

Записей нет.

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

htmltext = (player.getLevel() < 60) ? "31577-02.htm" : "31577-01.htm";

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

rewardItems(player, FLAMING_FISHING_LURE, 4);
giveItems(partyMember, CRIMSON_DRAKE_HEART, 1);

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

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

[31577-01.htm] Fishing Guild Member Linnaeus: Theese days, many nobles enjoy fishing. We fishermen like to take our time while fishing, but the nobles prefer to quickly catch things other than fish. They're quite particular about who is allowed to use the special bait, but I don't think they'd have a problem with my giving it to a fine soldier like you! Of course, I can't legally sell it to you, but if you bring me the ingredients I need, I'll make it for you for free! Don't be surprised if you pull in a treasure box when you start using this bait! It uses the power of the elements to retrieve sunken treasure! Will you bring me the materials I need? I'll do it. [31577-02.htm] Fishermen's Guild Member Linnaeus: Not long ago while fishing, I caught several strange boxes containing assorted valuable items. They ended up being more valuable than fish! I have a knack for finding these boxes, but I can't show you how to do it yet. (This quest may only be undertaken by a character of level 60 and above.) [31577-03.htm] Fishing Guild Member Linnaeus: The special bait I'm talking about is made of Crimson Drake's Heart at Seal of Shilen. This bait is called Bait of Flame to contain the power of flames. And it never easy to get the materials. Besides, it requires 100 hearts. To make even a few baits, you need that number of hearts at least. If you want to get the special bait materials, there is something you have to bear in mind. That is to use the power of flame extracted from Crimson Drake's Heart containing evil thoughts of flame for the bait. When the power of fire incompatible to water is contained in the bait and thrown in the water, things that must not stay in the water are pulled out. Ultimately, it depends on your fishing skills, but you can take out anything from the water if you had special bait with the attributes of flame. [31577-04.htm] Fishing Guild Member Linnaeus: You already came back. Being such a famous person, you clearly have different ability. You've obtained all the bait materials to make the bait with the attributes of flame, haven't you? Frankly, I should charge you for the production itself, but wouldn't do that since you're a well-known soldier. This is also a type of advertisement. This bait utilizes the repulsive force between the elements. Like the water and fire don't mix together, the thing sunken like boxes in the water will float if you use the Bait of Flame. Then, will you give me the materials that you got now? Give the hearts [31577-05.htm] Fishing Guild Member Linnaeus: You still haven't obtained the 100 crimson drake's hearts I need to make the bait. Since I'm making it for free, the least you can do is bring the materials I need! [31577-06.htm] Fishing Guild Member Linnaeus: You've obtained all the crimson drake's hearts. Please accept this bait of flame. You'll find it quite different than baits containing the other elements. You won't catch any fish with it, but you're more likely to discover a sunken Treasure Chest! You won't always land your catch with this bait. This bait is mostly useless unless your fishing level is exectly 20. If it's not, you should consider giving it to someone else. Remember, bring anything you recover to me unopened! [31577-07.htm] Fishermen's Guild Member Linnaeus: You said you'd brought all of the Crimson Drake's Hearts, but they are not enough. I cannot make Bait of Flame containing the power of flame with these. Even though you are a famous soldier, you have to bring me the right materials for making it.
Исходник условий и наград (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.Q00053_LinnaeusSpecialBait;

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.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;

public class Q00053_LinnaeusSpecialBait extends Quest
{
	// Item
	private static final int CRIMSON_DRAKE_HEART = 7624;
	
	// Reward
	private static final int FLAMING_FISHING_LURE = 7613;
	
	public Q00053_LinnaeusSpecialBait()
	{
		super(53, "Linnaeus' Special Bait");
		registerQuestItems(CRIMSON_DRAKE_HEART);
		addStartNpc(31577); // Linnaeus
		addTalkId(31577);
		addKillId(20670); // Crimson Drake
	}
	
	@Override
	public String onEvent(String event, Npc npc, Player player)
	{
		String htmltext = event;
		final QuestState st = getQuestState(player, false);
		if (st == null)
		{
			return htmltext;
		}
		
		if (event.equals("31577-03.htm"))
		{
			st.startQuest();
		}
		else if (event.equals("31577-07.htm"))
		{
			htmltext = "31577-06.htm";
			takeItems(player, CRIMSON_DRAKE_HEART, -1);
			rewardItems(player, FLAMING_FISHING_LURE, 4);
			st.exitQuest(false, true);
		}
		
		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) ? "31577-02.htm" : "31577-01.htm";
				break;
			}
			case State.STARTED:
			{
				htmltext = (getQuestItemsCount(player, CRIMSON_DRAKE_HEART) == 100) ? "31577-04.htm" : "31577-05.htm";
				break;
			}
			case State.COMPLETED:
			{
				htmltext = getAlreadyCompletedMsg(player);
				break;
			}
		}
		
		return htmltext;
	}
	
	@Override
	public void onKill(Npc npc, Player player, boolean isSummon)
	{
		final Player partyMember = getRandomPartyMember(player, 1);
		if (partyMember == null)
		{
			return;
		}
		
		final QuestState qs = getQuestState(partyMember, false);
		if (getQuestItemsCount(partyMember, CRIMSON_DRAKE_HEART) < 100)
		{
			if (getRandom(100) < 33)
			{
				giveItems(partyMember, CRIMSON_DRAKE_HEART, 1);
				playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
			}
		}
		
		if (getQuestItemsCount(partyMember, CRIMSON_DRAKE_HEART) >= 100)
		{
			qs.setCond(2, true);
		}
	}
}