Chest caught with a bait of fire
- ID
- 30
- Название
- Chest caught with a bait of fire
- start_npcs_json
- [31577]
- npc_ids_json
- [30629,31577]
- constants_json
- {"LINNAEUS":31577,"RUKAL":30629,"RED_TREASURE_BOX":6511,"MUSICAL_SCORE":7628,"NECKLACE_OF_PROTECTION":916}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00030_ChestCaughtWithABaitOfFire/Q00030_ChestCaughtWithABaitOfFire.java
NPC квеста
Условия уровней: выражения из Java
if (player.getLevel() < 60)
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, MUSICAL_SCORE, 1); giveItems(player, NECKLACE_OF_PROTECTION, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30629-01.htm] Bard Rukal: Beautiful music is pure magic! Are you here to listen to songs of the old poets? No? You have something for me? The musical score signed by Rukal that credits me as the composer and lyricist? That's what I've been waiting for! Show it to me! "Here it is."
[30629-02.htm] Bard Rukal: The Fishermen's Guild is truly a major patron of the arts! Whenever an object is lost, anywhere in the world, they manage to retrieve it! It's ironic that only those who know nothing about the lost objects can find them... As an Elf, it's hard to understand how Humans could have created such a technique! Could it be that they're catching all these objects by accident? It doesn't seem likely, does it? They must be the best detectives in the world! I'm so grateful to have recovered this lost score by my dead father. I don't dare to use his name when I compose! This is his musical score! Please accept this gift of thanks for recovering the musical score for me.
[30629-03.htm] Bard Rukal: You say you've found the musical score I'm looking for, but you don't seem to have it with you. If you find a musical score with the name "Rukal" written on it, please bring it to me. It was composed by my late father.
[31577-01.htm] Fishermen's Guild Member Linnaeus: Welcome back! You're the one that I gave the bait of flame, right? So... Did you catch anything with it? Other than fish, I mean? That was a very specialized bait you were using! You didn't happen to catch a box, did you? "It's none of your business what I caught!"
[31577-02.htm] Fishermen's Guild Member Linnaeus: Fishing really brings life into perspective. You're not here to buy fishing gear, are you? Have you ever been fishing? Even the nobles of Aden enjoy it. (This quest may only be undertaken by a character of level 60 and above.)
[31577-03.htm] Fishermen's Guild Member Linnaeus: Fishing really brings life into perspective. You're not here to buy fishing gear, are you? Have you ever been fishing? Even the nobles of Aden enjoy it. (This quest may only be undertaken by a character who has completed Linnaeus's Special Bait quest.)
[31577-04.htm] Fishermen's Guild Member Linnaeus: There are some things more interesting than fish! A while back, someone came around looking for a red treasure box. Honestly, the bait I gave you earlier was designed to find it! Don't look at me like that! It wouldn't have worked if you would've known what the bait was for! So, did you find it? I'll tell you who my client is when you bring me the red treasure box. You must bring it to me unopened. Use the bait of flame to find it. Remember, your fishing skill must be level 20. Someone may already have found it, so ask around in the market first.
[31577-05.htm] Fishermen's Guild Member Linnaeus: Wow! Did you already find the red treasure box? Let me see it! I need to verify that it's the one my client lost. "Here it is."
[31577-06.htm] Fishermen's Guild Member Linnaeus: You're back! Did you finish your assignment already? No? Please, go and find the Red Treasure Box. I know it's not easy, but I really must have it! Ask around, see if anyone's found it.
[31577-07.htm] Fishermen's Guild Member Linnaeus: I think this is my client's red treasure box. It contains the musical score that Mr. Rukal was looking for. It has his name listed as the composer and lyricist. If it is anything like his other works, it's wonderfully powerful music! Take it to Mr. Rukal in Dion Castle Town.
[31577-08.htm] Fishermen's Guild Member Linnaeus: You found the red treasure box? Well, I hope you didn't open it! Let me see... Hmm, this isn't the box I'm looking for.
[31577-09.htm] Fishermen's Guild Member Linnaeus: Why haven't you gone to see Mr. Rukal yet? Go to Dion Castle Town. Mortals such as us are unworthy to possess such beautiful music! It should be reserved for Swordsingers and Bladedancers!
Исходник условий и наград (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.Q00030_ChestCaughtWithABaitOfFire;
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 quests.Q00053_LinnaeusSpecialBait.Q00053_LinnaeusSpecialBait;
public class Q00030_ChestCaughtWithABaitOfFire extends Quest
{
// NPCs
private static final int LINNAEUS = 31577;
private static final int RUKAL = 30629;
// Items
private static final int RED_TREASURE_BOX = 6511;
private static final int MUSICAL_SCORE = 7628;
private static final int NECKLACE_OF_PROTECTION = 916;
public Q00030_ChestCaughtWithABaitOfFire()
{
super(30, "Chest caught with a bait of fire");
registerQuestItems(MUSICAL_SCORE);
addStartNpc(LINNAEUS);
addTalkId(LINNAEUS, RUKAL);
}
@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 "31577-04.htm":
{
st.startQuest();
break;
}
case "31577-07.htm":
{
if (hasQuestItems(player, RED_TREASURE_BOX))
{
st.setCond(2);
takeItems(player, RED_TREASURE_BOX, 1);
giveItems(player, MUSICAL_SCORE, 1);
}
else
{
htmltext = "31577-08.htm";
}
break;
}
case "30629-02.htm":
{
if (hasQuestItems(player, MUSICAL_SCORE))
{
htmltext = "30629-02.htm";
takeItems(player, MUSICAL_SCORE, 1);
giveItems(player, NECKLACE_OF_PROTECTION, 1);
st.exitQuest(false, true);
}
else
{
htmltext = "30629-03.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() < 60)
{
htmltext = "31577-02.htm";
}
else
{
final QuestState st2 = player.getQuestState(Q00053_LinnaeusSpecialBait.class.getSimpleName());
if ((st2 != null) && st2.isCompleted())
{
htmltext = "31577-01.htm";
}
else
{
htmltext = "31577-03.htm";
}
}
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case LINNAEUS:
{
if (cond == 1)
{
htmltext = (!hasQuestItems(player, RED_TREASURE_BOX)) ? "31577-06.htm" : "31577-05.htm";
}
else if (cond == 2)
{
htmltext = "31577-09.htm";
}
break;
}
case RUKAL:
{
if (cond == 2)
{
htmltext = "30629-01.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}