Beyond the Hills of Winter
- ID
- 116
- Название
- Beyond the Hills of Winter
- start_npcs_json
- [30535]
- npc_ids_json
- [30535,32052]
- constants_json
- {"FILAUR":30535,"OBI":32052,"BANDAGE":1833,"ENERGY_STONE":5589,"THIEF_KEY":1661,"GOODS":8098,"SSD":1463}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00116_BeyondTheHillsOfWinter/Q00116_BeyondTheHillsOfWinter.java
NPC квеста
Условия уровней: выражения из Java
htmltext = ((player.getLevel() < 30) || (player.getRace() != Race.DWARF)) ? "30535-00.htm" : "30535-01.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, GOODS, 1); rewardItems(player, SSD, 1650); giveAdena(player, 16500, true);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30535-00.htm] Filaur of Gray Pillar Guild: Mh. I got a mission, but unfortunately you don't fit my criterias. (This quest may only be undertaken by a Dwarven character of level 30 and above.)
[30535-01.htm] Filaur of Gray Pillar Guild: Egads! I almost didn't notice you! Pardon my ignorance as I am old and absent-minded. I however must still ask a favor of you. Agree to do it.
[30535-02.htm] Filaur of the Gray Pillar Guild: This is fortuitous timing! Come closer, so that my aging eyes can see you better... ah, yes, I can see that you are an experinced adventurer. I have a task that requires the skills of someone just like you. Before you embark on it, however, you'll need some things. Let me think...yes, I believe that 20 Bandages, 5 Energy Stones and 10 Skeleton Keys should be it. Bring them to me as quickly as you can!
[30535-03.htm] Filaur of the Gray Pillar Guild: Ah, you have returned! Most fortunate. Thank you for these; I need to send them to Railroad Worker Obi in the Plunderous Plains. Ha! I imagine you can guess what I need you to do next... "Yes, I can."
[30535-04.htm] Filaur of the Gray Pillar Guild: Bring me 20 Bandages, 5 Energy Stones and 10 Skeleton Keys.
[30535-05.htm] Filaur of the Gray Pillar Guild: My thanks for the supplies. I now need you to deliver them to where they are needed most. Travel through the Mining Zone Passage that you will find south of here. From there, you will come to see the Plunderous Plains. Once there, you should easily fond the Train Station that we Dwarves originally built. Find Railroad Worker Obi and give these supplies to him. It is a long journey, and there are a few people to see along the way... If your devotion wanes, just think back to all of our guildsmen who are waiting for these supplies and how much they are counting on you. Be careful and good luck!
[32052-00.htm] Railroad Worker Obi: It looks like it came from Filaur of the Gray Pillar Guild. All right... I didn't see this coming. We may still survive after all! What a relief! Hmm... I think this is for you... "What?"
[32052-01.htm] Railroad Worker Obi: This symbol is used by the Gray Pillar Guild, of which we are members. Well, shall we open it together? Hmm... Unless someone can use D-Grade materials, it doesn't seem very helpful! What shall we do with it? Do you want it, or do you want me to give you some adena for it? "I'll take the materials." "I'll take the adena."
[32052-02.htm] Railroad Worker Obi: Ok, here it goes... My sister Abey and I have been looking for a skilled adventurer like you! Abey sleeps a lot so it might be hard to catch her... If you have some free time, please come back to see us. Have a good trip!
Исходник условий и наград (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.Q00116_BeyondTheHillsOfWinter;
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;
public class Q00116_BeyondTheHillsOfWinter extends Quest
{
// NPCs
private static final int FILAUR = 30535;
private static final int OBI = 32052;
// Items
private static final int BANDAGE = 1833;
private static final int ENERGY_STONE = 5589;
private static final int THIEF_KEY = 1661;
private static final int GOODS = 8098;
// Reward
private static final int SSD = 1463;
public Q00116_BeyondTheHillsOfWinter()
{
super(116, "Beyond the Hills of Winter");
registerQuestItems(GOODS);
addStartNpc(FILAUR);
addTalkId(FILAUR, OBI);
}
@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 "30535-02.htm":
{
st.startQuest();
break;
}
case "30535-05.htm":
{
st.setCond(2, true);
giveItems(player, GOODS, 1);
break;
}
case "materials":
{
htmltext = "32052-02.htm";
takeItems(player, GOODS, -1);
rewardItems(player, SSD, 1650);
st.exitQuest(false, true);
break;
}
case "adena":
{
htmltext = "32052-02.htm";
takeItems(player, GOODS, -1);
giveAdena(player, 16500, true);
st.exitQuest(false, true);
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:
{
htmltext = ((player.getLevel() < 30) || (player.getRace() != Race.DWARF)) ? "30535-00.htm" : "30535-01.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case FILAUR:
{
if (cond == 1)
{
if ((getQuestItemsCount(player, BANDAGE) >= 20) && (getQuestItemsCount(player, ENERGY_STONE) >= 5) && (getQuestItemsCount(player, THIEF_KEY) >= 10))
{
htmltext = "30535-03.htm";
takeItems(player, BANDAGE, 20);
takeItems(player, ENERGY_STONE, 5);
takeItems(player, THIEF_KEY, 10);
}
else
{
htmltext = "30535-04.htm";
}
}
else if (cond == 2)
{
htmltext = "30535-05.htm";
}
break;
}
case OBI:
{
if (cond == 2)
{
htmltext = "32052-00.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}