Find Glittering Jewelry
- ID
- 35
- Название
- Find Glittering Jewelry
- start_npcs_json
- [30091]
- npc_ids_json
- [30091,30879]
- constants_json
- {"ELLIE":30091,"FELTON":30879,"ROUGH_JEWEL":7162,"ORIHARUKON":1893,"SILVER_NUGGET":1873,"THONS":4044,"JEWEL_BOX":7077}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00035_FindGlitteringJewelry/Q00035_FindGlitteringJewelry.java
NPC квеста
Условия уровней: выражения из Java
if (player.getLevel() >= 60)
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, JEWEL_BOX, 1); giveItems(member, ROUGH_JEWEL, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30091-0.htm] Jeweler Ellie: Come in! What can I do for you? Ah, Leikar's order isn't ready yet. I'm sorry. I ordered the ore that I need to make the jewelry from Wharf Manager Felton, but he hasn't delivered it yet. Are you in a hurry? I hate to ask you this, but would you mind going to see Mr. Felton and check to see if the ore has arrived? "Where can I find Mr. Felton?"
[30091-0a.htm] Jeweler Ellie: Welcome! What can I do for you? If you're not looking for anything in particular, feel free to browse and see if you can find anything you like. (This quest may only be undertaken by a character who advanced first in Make Formal Wear quest.)
[30091-0b.htm] Jeweler Ellie: Come in! What can I do for you? Ah, Leikar's order isn't ready yet. I'm sorry. I placed an order for the ore that I need to make the jewelry through Wharf Manager Felton, but he hasn't delivered it yet. Try back later! (This quest may only be undertaken by a character of level 60 and above.)
[30091-1.htm] Jeweler Ellie: Please go to Giran Harbor and look for Wharf Manager Felton. Ask him when the ore I ordered will arrive.
[30091-1a.htm] Jeweler Ellie: Why are you still here? Go ask Wharf Manager Felton when the ore will arrive. You can find him at Giran Harbor.
[30091-2.htm] Jeweler Ellie: Hi there! Have you met Mr. Felton? Since I see you holding the ore, you must have met with him. I think I ordered about 10 of them. If you can give them to me, I will make the jewelry for you. Please put the ore you have up here. "Here they are."
[30091-3.htm] Jeweler Ellie: Ah, very nice! One, two, three... 10 ore pieces! This should be enough. Now I'll get started! With this Oriharukon and silver, I'll make a very pretty... Oh no! I'm sorry, we've got a problem! I was going to refine the ore so I could make a beautiful piece of jewelry, but I ran out of some materials I need! Will you help me? I can't leave the store, and there's no time to order them now. I need 5 Oriharukons, 500 units of silver and 150 Thons. I know it's a lot, but I've got to have them! Please hurry!
[30091-4.htm] Jeweler Ellie: Ah! I didn't think that you could get it so quickly! Thank you! 5 oriharukons, 500 units of silver and 150 thons. I'll make some beautiful jewelry for a special occasion! Here are the materials.
[30091-4a.htm] Jeweler Ellie: These materials won't be easy to find! With some help, you can probably get them quicker. I need 5 Oriharukons, 500 units of silver and 150 Thons. Don't forget!
[30091-5.htm] Jeweler Ellie: Wait here, I won't be long... ... ... Here is the jewelry that Maid Leikar ordered. It's such a large order, I put it into this Gem Box for protection. Please, deliver it safely to Leikar!
[30879-0.htm] Wharf Manager Felton: What brings you here? The boat with the ore Ellie's looking for still hasn't arrived. If you're in a hurry, why don't you go get some yourself? "How?"
[30879-1.htm] Wharf Manager Felton: If you don't want to wait, you can get the ore by hunting the Alligators on Alligator Beach. Ellie's order was for 10 ores. They are ferocious, so be careful!
[30879-1a.htm] Wharf Manager Felton: You can get it from alligators on Alligator Beach. Ellie wanted 10 ores. They are ferocious, so be careful!
Исходник условий и наград (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.Q00035_FindGlitteringJewelry;
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;
import quests.Q00037_MakeFormalWear.Q00037_MakeFormalWear;
public class Q00035_FindGlitteringJewelry extends Quest
{
// NPCs
private static final int ELLIE = 30091;
private static final int FELTON = 30879;
// Items
private static final int ROUGH_JEWEL = 7162;
private static final int ORIHARUKON = 1893;
private static final int SILVER_NUGGET = 1873;
private static final int THONS = 4044;
// Reward
private static final int JEWEL_BOX = 7077;
public Q00035_FindGlitteringJewelry()
{
super(35, "Find Glittering Jewelry");
registerQuestItems(ROUGH_JEWEL);
addStartNpc(ELLIE);
addTalkId(ELLIE, FELTON);
addKillId(20135); // Alligator
}
@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 "30091-1.htm":
{
st.startQuest();
break;
}
case "30879-1.htm":
{
st.setCond(2, true);
break;
}
case "30091-3.htm":
{
st.setCond(4, true);
takeItems(player, ROUGH_JEWEL, 10);
break;
}
case "30091-5.htm":
{
if ((getQuestItemsCount(player, ORIHARUKON) >= 5) && (getQuestItemsCount(player, SILVER_NUGGET) >= 500) && (getQuestItemsCount(player, THONS) >= 150))
{
takeItems(player, ORIHARUKON, 5);
takeItems(player, SILVER_NUGGET, 500);
takeItems(player, THONS, 150);
giveItems(player, JEWEL_BOX, 1);
st.exitQuest(false, true);
}
else
{
htmltext = "30091-4a.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)
{
final QuestState fwear = player.getQuestState(Q00037_MakeFormalWear.class.getSimpleName());
if ((fwear != null) && fwear.isCond(6))
{
htmltext = "30091-0.htm";
}
else
{
htmltext = "30091-0a.htm";
}
}
else
{
htmltext = "30091-0b.htm";
}
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case ELLIE:
{
if ((cond == 1) || (cond == 2))
{
htmltext = "30091-1a.htm";
}
else if (cond == 3)
{
htmltext = "30091-2.htm";
}
else if (cond == 4)
{
htmltext = ((getQuestItemsCount(player, ORIHARUKON) >= 5) && (getQuestItemsCount(player, SILVER_NUGGET) >= 500) && (getQuestItemsCount(player, THONS) >= 150)) ? "30091-4.htm" : "30091-4a.htm";
}
break;
}
case FELTON:
{
if (cond == 1)
{
htmltext = "30879-0.htm";
}
else if (cond > 1)
{
htmltext = "30879-1a.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isSummon)
{
final Player member = getRandomPartyMember(player, 2);
if ((member != null) && getRandomBoolean())
{
giveItems(member, ROUGH_JEWEL, 1);
if (getQuestItemsCount(member, ROUGH_JEWEL) >= 10)
{
getQuestState(member, false).setCond(3, true);
}
else
{
playSound(member, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
}