Rancher's Plea
- ID
- 259
- Название
- Rancher's Plea
- start_npcs_json
- [30497]
- npc_ids_json
- [20103,20106,20108,30405,30497]
- constants_json
- {"EDMOND":30497,"MARIUS":30405,"GIANT_SPIDER":20103,"TALON_SPIDER":20106,"BLADE_SPIDER":20108,"GIANT_SPIDER_SKIN":1495,"ADENA":57,"HEALING_POTION":1061,"WOODEN_ARROW":17}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00259_RequestFromTheFarmOwner/Q00259_RequestFromTheFarmOwner.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20103 | Giant Spider | Нет | 15 |
| 20106 | Talon Spider | Нет | 16 |
| 20108 | Blade Spider | Нет | 17 |
| 30405 | Marius | Нет | 70 |
| 30497 | Edmond | Да | 70 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 15) ? "30497-01.htm" : "30497-02.htm";
Выдача предметов, адены и опыта: выражения из Java
rewardItems(player, HEALING_POTION, 1); rewardItems(player, WOODEN_ARROW, 50); rewardItems(player, ADENA, reward); giveItems(player, GIANT_SPIDER_SKIN, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30405-01.htm] Marius: May the blessings of the starlight fall upon you. So you are the mercenary hired by my colleague Edmond. I was once a Knight with a sword ... But ... something happened. And I pledged not to touch a sword again. I have retired now. I felt terrible that I haven't been able help Edmond ... Thankfully, I owe you gratitude for volunteering to kill these spiders for us. Tell me anything you need. If you bring me ten giant spider husks, I will exchange them for a healing potion or arrows.
[30405-02.htm] Marius: May the blessings of the starlight fall upon you. So you are the mercenary hired by my colleague Edmond. I was once a Knight with a sword... But... something happened and I pledged not to touch a sword again. I am retired now. I felt terrible that I haven't been able to help Edmond. Thankfully, I owe you gratitude for volunteering to kill these spiders for us. Tell me if you need anything. I will exchange one healing potion or fifty arrows for ten giant spider husks. Say you will not make an exchange Say you will make an exchange for the healing potion Say you will make an exchange for fifty wooden arrows
[30405-03.htm] Marius: Please be careful when hunting the spiders. They have very sensitive hearing, so they will attack anything that moves around them. Be on guard from a distance, and be watchful for any unexpected attacks.
[30405-04.htm] Marius: I got this healing potion from Silvia in the village a few days ago. This is a very effective item for treating injuries received in battle. Go Back
[30405-05.htm] Marius: I bought these arrows from the weapon shop when I went to the village few days ago. Trader Lector took care in selecting these, so you can use them without any worries. Personally, I would shoot arrows from a far distance to wound the spider, then approach it to deliver the final blow ... but I'm sure you have your own ways of hunting them. Go Back
[30405-06.htm] Marius: Do you need anything else? I will exchange one healing potion or fifty arrows for ten giant spider husks. Say you will not make an exchange Say you will make an exchange for the healing potion Say you will make an exchange for fifty wooden arrows
[30405-07.htm] Marius: If you need anything later, gather giant spider husks and come back to me. Please be careful when you are hunting the spiders. They have very sensitive hearing, so they will attack anything that moves around them. Be on guard from a distance, and be watchful of any unexpected attacks.
[30497-01.htm] Edmond: Welcome, traveler. I originally resided in Gludio, but lost my family during the war with Gracia and moved here to start a new life. I am trying to ranch here with my old friend, Marius. We were going to take our sheep to the sunny hillside right over there and turn them out to pasture ... But the giant spiders showed up, and we lost all thirty sheep that we brought from Innadril. Soon, we're going to hire someone to kill the giant spiders around this area. Do you think you could help out with that? (This quest may only be undertaken by a character of level 15 and above.)
[30497-02.htm] Edmond: Welcome, traveler. I originally resided in Gludio, but lost my family during the war with Gracia and moved here to start a new life. I am trying to ranch here with my old friend, Marius. We were going to take our sheep to the sunny hillside right back there and turn them out to pasture ... But the giant spiders showed up, and we lost all thirty sheep that we brought from Innadril. We are going to hire mercenaries with the money the governor granted us and drive off the giant spiders from this area. It looks like you know how to fight ... Do you think you could exterminate those spiders for us? Say you will take the task
[30497-03.htm] Edmond: Hunt the giant spiders that are wrecking havoc in this area, then bring their husks back to me. I will reward you for each giant spider husk you bring back. Oh, and if you need something while hunting those spiders, ask my friend, Marius. He takes care of everything that we bring from the village.
[30497-04.htm] Edmond: What, there weren't any spiders to hunt? That can't be ... Only a few days ago, those spiders ate some pigs that were in the backyard. They're somewhere around here, I tell you. Say you will quit Say you will continue
[30497-05.htm] Edmond: Thank you for your trouble. I hope you didn't get hurt? As we promised, I will reward you for each giant spider husk that you have brought. Here, take this. Thanks to your help, I will soon be able to graze my cattle without any worries. Just thinking of that makes me so happy. I can picture my sheep peacefully grazing in the pastures on the green hillside. Say you will quit Say you will continue
[30497-06.htm] Edmond: It's too bad, but I guess it can't be helped. Although it was brief, I really appreciate your help. If you go back to the village, could you tell the folks that Edmond of the northwestern ranch is looking to hire soldiers?
[30497-07.htm] Edmond: Please carry on then. Those spiders are vicious, so be careful. And remember, if you need anything, ask Marius. He will be more than willing to help 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.Q00259_RequestFromTheFarmOwner;
import org.l2jmobius.gameserver.config.GeneralConfig;
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 Q00259_RequestFromTheFarmOwner extends Quest
{
// NPCs
private static final int EDMOND = 30497;
private static final int MARIUS = 30405;
// Monsters
private static final int GIANT_SPIDER = 20103;
private static final int TALON_SPIDER = 20106;
private static final int BLADE_SPIDER = 20108;
// Items
private static final int GIANT_SPIDER_SKIN = 1495;
// Rewards
private static final int ADENA = 57;
private static final int HEALING_POTION = 1061;
private static final int WOODEN_ARROW = 17;
public Q00259_RequestFromTheFarmOwner()
{
super(259, "Rancher's Plea");
registerQuestItems(GIANT_SPIDER_SKIN);
addStartNpc(EDMOND);
addTalkId(EDMOND, MARIUS);
addKillId(GIANT_SPIDER, TALON_SPIDER, BLADE_SPIDER);
}
@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 "30497-03.htm":
{
st.startQuest();
break;
}
case "30497-06.htm":
{
st.exitQuest(true, true);
break;
}
case "30405-04.htm":
{
if (getQuestItemsCount(player, GIANT_SPIDER_SKIN) >= 10)
{
takeItems(player, GIANT_SPIDER_SKIN, 10);
rewardItems(player, HEALING_POTION, 1);
}
else
{
htmltext = "<html><body>Incorrect item count</body></html>";
}
break;
}
case "30405-05.htm":
{
if (getQuestItemsCount(player, GIANT_SPIDER_SKIN) >= 10)
{
takeItems(player, GIANT_SPIDER_SKIN, 10);
rewardItems(player, WOODEN_ARROW, 50);
}
else
{
htmltext = "<html><body>Incorrect item count</body></html>";
}
break;
}
case "30405-07.htm":
{
if (getQuestItemsCount(player, GIANT_SPIDER_SKIN) >= 10)
{
htmltext = "30405-06.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:
{
htmltext = (player.getLevel() < 15) ? "30497-01.htm" : "30497-02.htm";
break;
}
case State.STARTED:
{
final int count = getQuestItemsCount(player, GIANT_SPIDER_SKIN);
switch (npc.getId())
{
case EDMOND:
{
if (count == 0)
{
htmltext = "30497-04.htm";
}
else
{
htmltext = "30497-05.htm";
takeItems(player, GIANT_SPIDER_SKIN, -1);
int reward = count * 25;
if (!GeneralConfig.ALT_VILLAGES_REPEATABLE_QUEST_REWARD && (count >= 10))
{
reward += 250;
}
rewardItems(player, ADENA, reward);
}
break;
}
case MARIUS:
{
htmltext = (count < 10) ? "30405-01.htm" : "30405-02.htm";
break;
}
}
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isCond(1))
{
return;
}
giveItems(player, GIANT_SPIDER_SKIN, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}