Aiding the Floran Village
- ID
- 660
- Название
- Aiding the Floran Village
- start_npcs_json
- [30291,30608]
- npc_ids_json
- [20781,21102,21103,21104,21105,21106,21107,30291,30608]
- constants_json
- {"MARIA":30608,"ALEX":30291,"PLAIN_WATCHMAN":21102,"ROCK_GOLEM":21103,"LIZARDMEN_SUPPLIER":21104,"LIZARDMEN_AGENT":21105,"CURSED_SEER":21106,"LIZARDMEN_COMMANDER":21107,"LIZARDMEN_SHAMAN":20781,"WATCHING_EYES":8074,"GOLEM_SHARD":8075,"LIZARDMEN_SCALE":8076,"ADENA":57,"ENCHANT_WEAPON_D":955,"ENCHANT_ARMOR_D":956}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00660_AidingTheFloranVillage/Q00660_AidingTheFloranVillage.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20781 | Delu Lizardman Shaman | Нет | 35 |
| 21102 | Watchman of the Plains | Нет | 30 |
| 21103 | Roughly Hewn Rock Golem | Нет | 31 |
| 21104 | Delu Lizardman Supplier | Нет | 32 |
| 21105 | Delu Lizardman Special Agent | Нет | 33 |
| 21106 | Cursed Seer | Нет | 34 |
| 21107 | Delu Lizardman Commander | Нет | 35 |
| 30291 | Alex | Да | 70 |
| 30608 | Maria | Да | 70 |
Условия уровней: выражения из Java
if (player.getLevel() < 30) htmltext = (player.getLevel() < 30) ? "30608-01.htm" : "30608-02.htm";
Выдача предметов, адены и опыта: выражения из Java
rewardItems(player, ADENA, (count * 100) + ((count >= 45) ? 9000 : 0)); rewardItems(player, ADENA, 1000); rewardItems(player, ADENA, 13000); rewardItems(player, ENCHANT_ARMOR_D, 1); rewardItems(player, ADENA, 2000); rewardItems(player, ADENA, 20000); rewardItems(player, ENCHANT_ARMOR_D, 1); rewardItems(player, ENCHANT_WEAPON_D, 1); rewardItems(player, ADENA, 5000); rewardItems(player, ADENA, 45000); rewardItems(player, ENCHANT_WEAPON_D, 1); rewardItems(player, ADENA, (count * 100) + ((count >= 45) ? 9000 : 0)); giveItems(partyMember, WATCHING_EYES, 1); giveItems(partyMember, GOLEM_SHARD, 1); giveItems(partyMember, LIZARDMEN_SCALE, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30291-01.htm] Captain Alex: We've been having problems in Floran with monsters violating our perimeter. There have been a few skirmishes with our militia, but even worse than that, some monsters have gotten past our sentries and attacked citizens. I'm embarrassed to admit that - it's our job to keep this community safe, but we're just spread too darn thin! Reports indicate the monsters are targeting farmers out plowing their fields. I'm telling you this because I'd like your help in dealing with these monsters. If we can stop them, it'd go a long way toward restoring peace and order in Floran Village. Will you help us? "I'll help."
[30291-02.htm] Captain Alex: Ha! I'll be honest - I was hoping for someone of your caliber to step forward. Here's the situation: we have a major problem with monster incursions in the Floran Agricultural Area. They've been killing innocent citizens, and we can't have that. I'll need proof of your kills, of course. No offense, but I can't pay out a reward unless I'm sure it's done. Bring me the Watching Eyes, a Golem Shard and a Delu Lizardman Scale, and I'll gladly pay you. Good hunting! We're counting on you.
[30291-02a.htm] Captain Alex: Hrm. Harrumph. That's awfully generous of you youngsters, and it absolutely shows the right spirit, but I just can't accept your help in good conscience. These monsters are far too much for our militia to handle, and honestly I can't see you succeeding where my men have failed. Maybe a more experienced band could do the job, but I fear you'd just be throwing your lives away. Now don't be offended. My men haven't exactly been up to the challenge either. But who knows? You may see more action in the future and come back twice as capable as before! If that happens, and if we're still stuck with this problem, then I'll gladly accept your help.
[30291-03.htm] Captain Alex: Maria sent you, you say? Hrmph. Unfortunate business, that. Is she doing better? In any event, I'm glad to see you. We're having a problem with monster incursions, and the militia's spread too thin to handle it. Most of the attacks have been on farmers trying to reclaim and cultivate nearby abandoned land. I'll wager you're just the type of adventurer we need to fight this problem, and there's a reward in it. Just bring me the Watching Eyes, a Golem Shard and a Delu Lizardman Scale to prove your kills. Good hunting!
[30291-04.htm] Captain Alex: Ha! You've done it. Fine work! I knew you had it in you. And here is the proof I asked for - a sight for sore eyes, if I do say so myself! Well, I spoke of a reward, and a reward you shall have! "Thanks - we'll try not to spend it all in one place! Ha ha!" "Reward? Sir, there has been a mistake, surely. One doesn't do such things for a reward, but for the satisfaction of the deed itself."
[30291-05.htm] Captain Alex: Great rumbling thunder, you've done some work here that's for sure! You have this soldier's thanks. Now we can get those fields working, and that means more food for everyone. Well, I can't offer you much, but please take this adena as compensation for the great good you've done us. It's obvious you are a person of action, and to be honest, we have more problems that could use your attention. You've proven your mettle to all of us, so... are you interested? "Always happy to help. What's the task?" "We appreciate your gratitude, but we can't tarry. Best wishes to you and your community."
[30291-05a.htm] Captain Alex: Eh? I fear you've made a mistake, folks; your work's not done. There's nothing to fight standing here, so you'd best head out to the Floran Agricultural Area. Go on, kill what needs killing, and don't forget - bring me the Watching Eyes, a Roughly Hewn Rock Golem Shard and a Delu Lizardman Scale to earn your reward.
[30291-06.htm] Captain Alex: Hrmph. Well, I understand. I hope to see you again - y'never know, after all. In the meantime, best wishes and many thanks!
[30291-07.htm] Captain Alex: Hmmm. I can see that you are a practiced band of adventurers, and as one old soldier to others, I think we understand each other. There's always a bond between those who fight for order. Soldier to soldier, then... we're having troubles in Floran, and my militia can't keep up. Don't take my word for it, though. Hear it from those who are suffering. Hear about Timothy, a farmer who lost a friend to a monster. Hear about Maria, a lady who lost her husband to a monster. Hear about the Floran village chief. Conclude the conversation.
[30291-08.htm] Captain Alex: Take Timothy there. He and his friend Jeremy were working a new field they had bought with their shared savings. They put everything into that effort. Not long ago, the two of them were hard at work, each taking turns at the plow, when something - we're not sure what - attacked them. Jeremy was at the plow, and it slowed him down, so he didn't make it. Timothy wanted to help, but in the face of such an attack he was helpless, and with a bitter curse, he ran. Timothy says the only way he can live with himself now is to offer 100 dead monsters as recompense, to put his friend's soul to rest. I've told him it won't bring Jeremy back, but he won't listen. Honestly, though, I have no idea how he'd get 100 dead monsters. But it sure would take a load off of his soul. Donate proof of 100 dead monsters. Finish the conversation.
[30291-09.htm] Captain Alex: Ah, Maria. Poor, poor girl. If ever a bride meant her vow "for better or for worse," it was she. Maria married Jason at the height of our monster troubles, but you wouldn't have known anything was wrong to see the two of them so happy, so in love. It did us all good to see them. Jason worked his fields as hard as any man could, but they didn't yield enough to support them, and Maria was soon great with child. He did what many men would in his place: he took a chance. He found some wild, abandoned fields with fertile soil, and he began to work them. He didn't recognize the signs of monsters in the area; he was a farmer, not a tracker or an adventurer. One day, he didn't return from his new field, and we haven't seem him since. It makes my blood boil to think of it. We all failed him. We of the militia didn't protect him. We should have! If only we could have! What good are we if we can't even keep our farmers safe against monsters? They can't fight! That's our job, by thunder, and we failed to do it! Hrmph. Forgive me. Hadn't meant to go on so. Anyway, Maria is bereft. She wants 200 dead monsters to put Jason's soul to rest. I wish I could give 'em to her; she could use some peace. But where could I get 200 dead monsters? Donate proof of 200 dead monsters. Finish the conversation.
[30291-10.htm] Captain Alex: Well, you've seen the area, and you well know we can't be protected by the lord's army. We've formed a citizen militia, but it's done us precious little good. Myself aside, most of our farmers barely know which end of a knife to hold, and not a sword among them. They're helpless against the vicious monsters that plague us. I'd normally hire adventurers to help us, but we can't afford the gold to pay anyone experienced enough to do it for money, and we're not exactly being overwhelmed with volunteers. So we fight, and we die, and the village chief's face grows longer with every funeral he has to attend. The chief wants to hold a memorial service for the victims. Nothing fancy, but with the losses we've suffered, we'd need five hundred monster sacrifices to put the victims' souls to rest. I have no idea where we'll get them. Donate proof of 500 dead monsters. Finish the conversation.
[30291-11.htm] Captain Alex: Soldier, I can't thank you enough. You've helped our farming community enormously, and we all appreciate it. It's not much, but Timothy wanted me to give you something as an extra reward for your help. It's of no economic value, but it's a gift, and you'd oblige us both by taking it. And, again, my undying thanks. "I will continue to help the Floran farmers." "I will now embark on a new adventure."
[30291-11a.htm] Captain Alex: Heh. I appreciate the thought, but I fear it won't do. Timothy's pretty insistent on this point, and if he says it'll take 100 monster corpses to placate Jeremy's ghost, he's not likely to settle for less.
[30291-12.htm] Captain Alex: Soldier, you've done us a great favor, and mere thanks aren't enough. I can't offer much, but Maria insisted that I give you something. It won't fetch you any gold, but it's valuable to her, and it's a gift from the heart. You'd be doing all of us a kindness by accepting it. And who knows? It might help you somehow, somewhere. "I will continue to help the Floran farmers." "I'd like to embark on a new adventure."
[30291-12a.htm] Captain Alex: That's a fine gesture, but it won't do for Maria. She wants 200 monsters to die for her man, and nothing less will give her peace.
[30291-13.htm] Captain Alex: I thank you for that, I truly do. As the captain of the militia, it'll relieve me, as well as the chief, to put the souls of our dead militiamen to rest. No reward could match the great service you've done us, and I have precious little to give besides our thanks. But the chief entrusted me with something for a great-hearted adventurer and, by thunder, I see one before me now. Please accept it, and let's hope for better days for our struggling village. "I will continue to help the Floran farmers." "I will now embark on a new adventure."
[30291-13a.htm] Captain Alex: I appreciate the thought, but we've lost so many militiamen that it would take 500 monster sacrifices to put their souls to rest.
[30291-14.htm] Captain Alex: Are you kidding me? Just bring me the Watching Eyes, a Golem Shard and a Delu Lizardman Scale to prove your kills.
[30291-15.htm] Captain Alex: Exellent! Just bring me the Watching Eyes, a Golem Shard and a Delu Lizardman Scale to prove your kills. And dont forget to bring me proof of your kills... Good luck!
[30291-16.htm] Captain Alex: Exellent! Just bring me the Watching Eyes, a Golem Shard and a Delu Lizardman Scale to prove your kills. And dont forget to bring me proof of your kills... Good luck!
[30291-17.htm] Captain Alex: So, you're on to other adventures, are you? Well, good luck to you, and don't forget us here in Floran. We farmers know how to welcome adventurers who have helped us. Farewell!
[30291-17a.htm] Captain Alex: So, you're off to other adventures? Very well, but... I see you have proof of completing the quest. I can offer you a reward for it, although I'm sure it won't be of any other use to you. Let's make that trade now, shall we? Thank you, and here's your reward. Good luck in your travels, and don't forget us here in Floran. Our doors are always open to you!
[30608-01.htm] Maria: Did you know there were survivors of the Dion Peasant Riot? They're desperately in need of help from an adventurer like you! You should try to help them when you've had more experience! (This quest may only be undertaken by a character of level 30 and above.)
[30608-02.htm] Maria: What do you think of the Dion Peasant Riot? "It was a result of the unusually bitter cold and the oppressive policies of the Lord. The riot was justified." "The situation was bad, but the peasants were disloyal and the actions of the Lord were justified."
[30608-03.htm] Maria: Oh, really? Come closer, so no one will hear us... ...Some peasants actually survived that brutal repression! They've established an autonomous community called Floran Village. There they have been leading free lives, or at least as free as peasants' hard lives can be, that is... I'm so proud of them! Still, I'm afraid things aren't going so well in Floran Village right now. But they have their pride, and hesitate to ask for the help they need from adventurers like you. Oh, did I mention that I'm from Floran Village? I'm here on business for my village, as a matter of fact. Would you help my village? "What can I do to help?" "No, sorry, I don't have the time."
[30608-04.htm] Maria: I was right about you! You have a deep sense of what is right and wrong. We think you'll be a great help to us! Floran Village is autonomous, and has no protection against organized military attacks. But they've recently formed a militia to protect the village from the monsters... Go to Floran Village and meet Militia Captain Alex... Tell him I sent you! Good luck!
[30608-05.htm] Maria: Hmm... You should think about whether or not you're cut out to be an adventurer. Good deeds often come back as favors when you need them most! Humph!
[30608-06.htm] Maria: You're a true friend of the farmer! I expect great things from you! By the way, how is Alex in Floran Village?
Исходник условий и наград (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.Q00660_AidingTheFloranVillage;
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 Q00660_AidingTheFloranVillage extends Quest
{
// NPCs
private static final int MARIA = 30608;
private static final int ALEX = 30291;
// Monsters
private static final int PLAIN_WATCHMAN = 21102;
private static final int ROCK_GOLEM = 21103;
private static final int LIZARDMEN_SUPPLIER = 21104;
private static final int LIZARDMEN_AGENT = 21105;
private static final int CURSED_SEER = 21106;
private static final int LIZARDMEN_COMMANDER = 21107;
private static final int LIZARDMEN_SHAMAN = 20781;
// Items
private static final int WATCHING_EYES = 8074;
private static final int GOLEM_SHARD = 8075;
private static final int LIZARDMEN_SCALE = 8076;
// Rewards
private static final int ADENA = 57;
private static final int ENCHANT_WEAPON_D = 955;
private static final int ENCHANT_ARMOR_D = 956;
public Q00660_AidingTheFloranVillage()
{
super(660, "Aiding the Floran Village");
registerQuestItems(WATCHING_EYES, LIZARDMEN_SCALE, GOLEM_SHARD);
addStartNpc(MARIA, ALEX);
addTalkId(MARIA, ALEX);
addKillId(CURSED_SEER, PLAIN_WATCHMAN, ROCK_GOLEM, LIZARDMEN_SHAMAN, LIZARDMEN_SUPPLIER, LIZARDMEN_COMMANDER, LIZARDMEN_AGENT);
}
@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 "30608-04.htm":
{
st.startQuest();
break;
}
case "30291-02.htm":
{
if (player.getLevel() < 30)
{
htmltext = "30291-02a.htm";
}
else
{
st.startQuest();
st.setCond(2);
}
break;
}
case "30291-05.htm":
{
final int count = getQuestItemsCount(player, WATCHING_EYES) + getQuestItemsCount(player, LIZARDMEN_SCALE) + getQuestItemsCount(player, GOLEM_SHARD);
if (count == 0)
{
htmltext = "30291-05a.htm";
}
else
{
takeItems(player, GOLEM_SHARD, -1);
takeItems(player, LIZARDMEN_SCALE, -1);
takeItems(player, WATCHING_EYES, -1);
rewardItems(player, ADENA, (count * 100) + ((count >= 45) ? 9000 : 0));
}
break;
}
case "30291-06.htm":
{
st.exitQuest(true, true);
break;
}
case "30291-11.htm":
{
if (!verifyAndRemoveItems(player, 100))
{
htmltext = "30291-11a.htm";
}
else
{
if (getRandom(10) < 8)
{
rewardItems(player, ADENA, 1000);
}
else
{
rewardItems(player, ADENA, 13000);
rewardItems(player, ENCHANT_ARMOR_D, 1);
}
}
break;
}
case "30291-12.htm":
{
if (!verifyAndRemoveItems(player, 200))
{
htmltext = "30291-12a.htm";
}
else
{
final int luck = getRandom(15);
if (luck < 8)
{
rewardItems(player, ADENA, 2000);
}
else if (luck < 12)
{
rewardItems(player, ADENA, 20000);
rewardItems(player, ENCHANT_ARMOR_D, 1);
}
else
{
rewardItems(player, ENCHANT_WEAPON_D, 1);
}
}
break;
}
case "30291-13.htm":
{
if (!verifyAndRemoveItems(player, 500))
{
htmltext = "30291-13a.htm";
}
else
{
if (getRandom(10) < 8)
{
rewardItems(player, ADENA, 5000);
}
else
{
rewardItems(player, ADENA, 45000);
rewardItems(player, ENCHANT_WEAPON_D, 1);
}
}
break;
}
case "30291-17.htm":
{
final int count = getQuestItemsCount(player, WATCHING_EYES) + getQuestItemsCount(player, LIZARDMEN_SCALE) + getQuestItemsCount(player, GOLEM_SHARD);
if (count != 0)
{
htmltext = "30291-17a.htm";
takeItems(player, WATCHING_EYES, -1);
takeItems(player, LIZARDMEN_SCALE, -1);
takeItems(player, GOLEM_SHARD, -1);
rewardItems(player, ADENA, (count * 100) + ((count >= 45) ? 9000 : 0));
}
st.exitQuest(true, 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:
{
switch (npc.getId())
{
case MARIA:
htmltext = (player.getLevel() < 30) ? "30608-01.htm" : "30608-02.htm";
break;
case ALEX:
htmltext = "30291-01.htm";
break;
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case MARIA:
{
htmltext = "30608-06.htm";
break;
}
case ALEX:
{
final int cond = st.getCond();
if (cond == 1)
{
htmltext = "30291-03.htm";
st.setCond(2, true);
}
else if (cond == 2)
{
htmltext = (hasAtLeastOneQuestItem(player, WATCHING_EYES, LIZARDMEN_SCALE, GOLEM_SHARD)) ? "30291-04.htm" : "30291-05a.htm";
}
break;
}
}
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState qs = getRandomPartyMemberState(player, 2, 3, npc);
if (qs == null)
{
return;
}
final Player partyMember = qs.getPlayer();
final QuestState st = getQuestState(partyMember, false);
if (st == null)
{
return;
}
switch (npc.getId())
{
case PLAIN_WATCHMAN:
case CURSED_SEER:
{
if (getRandom(100) < 79)
{
giveItems(partyMember, WATCHING_EYES, 1);
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case ROCK_GOLEM:
{
if (getRandom(100) < 75)
{
giveItems(partyMember, GOLEM_SHARD, 1);
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case LIZARDMEN_SHAMAN:
case LIZARDMEN_SUPPLIER:
case LIZARDMEN_AGENT:
case LIZARDMEN_COMMANDER:
{
if (getRandom(100) < 67)
{
giveItems(partyMember, LIZARDMEN_SCALE, 1);
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
}
}
/**
* This method drops items following current counts.
* @param player The Player to affect.
* @param numberToVerify The count of qItems to drop from the different categories.
* @return false when counter isn't reached, true otherwise.
*/
private static boolean verifyAndRemoveItems(Player player, int numberToVerify)
{
final int eyes = getQuestItemsCount(player, WATCHING_EYES);
final int scale = getQuestItemsCount(player, LIZARDMEN_SCALE);
final int shard = getQuestItemsCount(player, GOLEM_SHARD);
if ((eyes + scale + shard) < numberToVerify)
{
return false;
}
if (eyes >= numberToVerify)
{
takeItems(player, WATCHING_EYES, numberToVerify);
}
else
{
int currentNumber = numberToVerify - eyes;
takeItems(player, WATCHING_EYES, -1);
if (scale >= currentNumber)
{
takeItems(player, LIZARDMEN_SCALE, currentNumber);
}
else
{
currentNumber -= scale;
takeItems(player, LIZARDMEN_SCALE, -1);
takeItems(player, GOLEM_SHARD, currentNumber);
}
}
return true;
}
}