This commit is contained in:
mobius
2015-01-01 20:02:50 +00:00
parent eeae660458
commit a6a3718849
17894 changed files with 2818932 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
<html><body>Magister Iris:<br>
So the rumors are true ... That the mercenaries fighting the Orcs on the northwest shores are secretly selling relics of the ancient kingdom ...<br>
How could they sell such valuable historical artifacts to businessmen ...! Objects that represent the lives of our ancestors ... They'll be degraded into mere decorations and displays ... This should not happen!<br>
Please ... If any relics of the ancient kingdom should chance to fall into your hands ... Don't sell them at the shop, but bring them to me ... I can't pay you, but ... I will try to share some of my knowledge with you ... And I will make sure that the relics that are recovered will all be used as research material for the researchers of the Ivory Tower.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-03.html">Give Clay Pot piece</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-04.html">Give brass decoration piece</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-05.html">Give Bronze Mirror Piece</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-06.html">Give Jade Necklace Bead</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-07.html">Give all completed ancient relics</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Magister Iris:<br>
Why are you trying to give me something you don't even have? I can't understand you at all.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Magister Iris:<br>
This Clay Pot piece ...? By the looks of the repetitive spiral designs, it looks like it was made in the early kingdom style. That such delicate craftsmanship was available thousands of years ago ... It's unbelievable.<br>
Thank you very much. The relics you have brought me will all be used as research material by the historical research society of the Ivory Tower. Take pride in the fact that you have played a part in revealing our forgotten past.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Magister Iris:<br>
This brass piece? It is part of a crown! However ... it's not the crown of a ruler, but a portion of the crown worn by priests during ceremonies. Look at these delicate carvings ... Beautiful, aren't they? It doesn't look like this item was made thousands of years ago, does it?<br>
Thank you very much. The relics you have brought me will all be used as research material by the historical research society of the Ivory Tower. Take pride in the fact that you have played a part in revealing our forgotten past.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Magister Iris:<br>
This is a piece of a broken mirror. This is probably a portion of one of the bronze mirrors used by noblewomen of the Elmoreden age. Truly this is a very valuable artifact, that holds images of the lives of the ancient ones.<br>
Thank you very much. The relics you have brought me will all be used as research material by the historical research society of the Ivory Tower. Take pride in the fact that you have played a part in revealing our forgotten past.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Magister Iris:<br>
... The bead appears to be part of a necklace ... Yes, that is probably it. It is the jade necklace worn by magicians of the royal Elmoreden court. Truly, it is a very valuable cultural artifact that records the lives and traditions of the ancient ones.<br>
Thank you very much. The relics you have brought me will all be used as research material by the historical research society of the Ivory Tower. Take pride in the fact that you have played a part in revealing our forgotten past.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Magister Iris:<br>
These artifacts...? Who restored them? Restoring broken artifacts to their original state is a job that requires great delicacy... Whoever worked on these is very talented.<br>
I will send them all to the Ivory Tower. They will be precious resources for historical study. I will make sure that your name appears in the Ivory Tower scholars' research paper.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30034-01.html">Back</a>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Trader Asha:<br>
Um ... um ... You're fighting with the orcs on the northern coast, right? They say there are many relics of the ancient empire in that region ...<br>
Uh, um ... I majored in ancient relics when I studied at the Ivory Tower, you see ... So ... Um ... . If you bring back pieces of relics, I can restore them to their original state ...<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-03.html">Request assembly of clay jar</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-05.html">Request assembly of brass accessory</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-07.html">Request assembly of bronze mirror</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-09.html">Request assembly of jade necklace</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Asha:<br>
Uh ... Well ... You must have five clay jar pieces to restore it to its original state ... I am so sorry ...<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Trader Asha:<br>
... I see you have collected five clay jar pieces ... All, all right ... I think I can restore the jar with this ...<br>
Look at the pattern engraved on this piece ... It is in the style of the early empire age ... If I match the pieces where the pattern continues ...<br>
Ah! It is done! ... You can see the lines of the cracks, but ... One way or another ... I have assembled the jar to its original state ... A relic of the empire that is over one thousand years old ... this is a very precious legacy of history ...<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Asha:<br>
Ahh ... Oh dear. You must have five accessory pieces ... Only then ... Can I restore it to its original state ...<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Asha:<br>
That I am assembling such a precious relic with my own hands ... It is so exciting ... However, I have not seen this accessory in the book ... Should this piece go on top? And if the rest are connected to the bottom ...<br>
See! It is a three-level crown used by the priests of Elmoreden ... Isn't it absolutely beautiful?<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Asha:<br>
Ahh ... I'm sorry! I must have five Bronze Mirror Pieces to restore it to its original shape ...<br>
Please take a look at this diagram ... "Bronze mirror used by noblewomen in the Elmoreden age" ... According to this diagram, to assemble the mirror, it is impossible to do so with only the pieces you have ...<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Asha:<br>
Wow! You have brought five pieces of bronze mirror fragments ... With this, I can restore the mirror as it is seen in this illustration ... This piece goes with this piece ... And if I connect it underneath with this ... And so! It is complete!<br>
Do you know? This mirror was used by the noblewomen of the Elmoreden age ... It contains the life of the ancient people ... It is a very precious relic ...!<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Asha:<br>
... Uh ... To restore the jade necklace to its original state ... umm ... well ... Please take a look at this diagram ... To assemble the necklace as you can see in this illustration ... You need five beads in all ...<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Asha:<br>
... You have found five jade beads ...! Yes ... I believe I can assemble it ... As it is shown in this diagram ... That I am restoring such a precious relic with my own hands! I am so excited my hands are trembling ...<br>
... Like this ... I line up the beads and connect them ... Ahh ...! It is done! See! It is the same as the picture, is it not? This jade necklace ... The explanation reads that it was an ornament worn on the necks of court magicians ... It is truly a precious relic ...!<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Asha:<br>
Ah ...! Oh dear. What am I to do ...?<br>
By mistake, I have ... smashed the relic pieces ... I am sorry. Terribly sorry ...<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30313-01.html">Return</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Trader Nestle:<br>
Are you the mercenary Piotur hired? What is going on over at the Orc Barracks? They say that ancient relics have recently been discovered there. Have you found any?<br>
Old relics wouldn't be of any use to a mercenary like yourself, now would they? If you bring some of them I will give you several useful items.<br>
What do you say? <br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-02.html">"I will trade relics for items."</a>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Trader Nestle:<br>
I have no interest is small pieces or fragments of relics. <font color="LEVEL">Trader Asha</font> would be interested in the smaller pieces, she is an expert in restoring relics.<br>
Do you have any relics I might be interested in?<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-03.html">Give him a Clay Pot.</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-04.html">Give him an Ancient Brass Tiara.</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-05.html">Give him an Ancient Bronze Mirror.</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-06.html">Give him an Ancient Jade Necklace.</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-09.html">Quit</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Trader Nestle:<br>
Oh, my! Look at the spiral pattern on the surface... the delicate carving of the handle... This is a genuine Imperial urn! It is exquisite! Thank you!<br>
You shall have your reward!<br>
Take these! I have packed several items that will be useful to a mercenary!<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-08.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Nestle:<br>
Oh, my! It is gorgeous! An actual tiara from the Imperial era! Isn't it beautiful? Thank you for your hard work.<br>
You shall have your reward! <br>Here are some things that a mercenary will find useful.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-08.html">Return</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Nestle:<br>
Oh, my, how stunning! A bronze mirror from the Imperial period! I imagine it was used by a female aristocrat of the Elmoreden kingdom... Good job!<br>
You shall have your reward. Here are some items that you will find useful.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-08.html">Return</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Trader Nestle:<br>
Oh, isn't it lovely! A jade necklace worn by the Mystics of the Imperial court! How did you find such a precious item? However you did it, good job!<br>
You shall have your reward as promised.<br>
Here are some items you will find useful.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-08.html">Return</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Nestle:<br>
Are you some kind of idiot? You can't sell something you don't have!<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-08.html">Return</a>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Trader Nestle:<br>
You should get rid of all that excess baggage! I'll take all the relics you have!<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-03.html">Give him a Clay Pot.</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-04.html">Give him an Ancient Brass Tiara.</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-05.html">Give him an Ancient Bronze Mirror.</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-06.html">Give him an Ancient Jade Necklace.</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30314-09.html">Quit</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Nestle:<br>
It's been a pleasure doing business with you. Bring me relics anytime!
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Guard Leikan:<br>
At one time the land northwest of Gludio was fertile farmland, yielding bountiful harvests of wheat and barley. During the dark days of the invasion of Gracia, when the farmers were in hiding, the land was taken over by the filthy Turek orcs.<br>
Some day, my people will drive them out and restore the farmland to its previous state...<br>
(This quest may only be undertaken by a character of level 25 or above.)
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Guard Leikan:<br>
At one time the land northwest of Gludio was fertile farmland, yielding bountiful harvests of wheat and barley. During the dark days of the invasion of Gracia, when the farmers were in hiding, the land was taken over by the filthy Turek orcs.<br>
Some day, my people will drive them out and restore the farmland to its previous state...<br>
One of the farmers, Piotur, has taken the initiative to drive the <font color="LEVEL">Turek orcs </font>from his land. He is looking for a few good mercenaries.<br>
This should be easy for you. Do you wish to help the farmers regain their land?<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30382-03.htm">"I will aid the farmers."</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Guard Leikan:<br>
Excellent. Take this letter to <font color="LEVEL">Farmer Piotur</font>. He is bravely tending his crops while being overrun by filthy orcs. His farm is <font color="LEVEL">near the east entrance of the Orc Barracks</font>.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Guard Leikan:<br>
You must hurry and take this letter to <font color="LEVEL">Piotur</font>. His farm is near the <font color="LEVEL">east entrance of the Orc Barracks</font>. I pray that you are able to recover the lands for the farmers of Gludio.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Guard Leikan:<br>
Ah, you again! How was Piotur?<br>
By the way, in case you're interested, I've heard that some <font color="LEVEL">relics from the ancient empire</font> have been discovered near the Orc Barracks. You could make quite a bit of money selling those.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30382-05a.html">"Tell me about the relics from the ancient empire."</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Guard Leikan:<br>
Bear in mind that this is a rumor, I've not seen it myself. I was told that mercenaries have been seen returning from the area near the Orc Barracks with relics from the Elmo-Aden period.<br>
Although they are little more than pottery shards, they fetch a high price. If you are interested you should visit a <font color="LEVEL">relics expert</font>.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30382-05b.html">"Where can I find a relics expert?"</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Guard Leikan:<br>
I know that <font color="LEVEL">Trader Asha</font> is an expert in the restoration of relics. He can be found at his magic store. <font color="LEVEL">Magister Iris</font> is researching relics of ancient empires at the temple...<br>
Also, <font color="LEVEL">Trader Nestle</font> is an avid collector of relics. He can be found at the grocery store in the southwest part of the village.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Piotur:<br>
When we were at war with Gracia, all the farmers of this region sought refuge in the east at Castle Gludio. However, when we returned to this land after the war, the turek orcs were occupying the surrounding area!<br>
The lord is at the height of pursuing reconstruction, but his attention does not extend to remote farm villages like this one. However, we cannot wait forever for the lord's help, can we? We are thinking of collecting money to hire mercenaries We will recover the blessed land that we inherited from our ancestors!<br>
<font color="LEVEL">(Minimum level necessary to undertake the quest is 25.)</font>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Piotur:<br>
When we were at war with Gracia, all the farmers of this region sought refuge in the east at Castle Gludio. However, when we returned to this land after the war, the turek orcs were occupying the surrounding area!<br>
The lord is at the height of pursuing reconstruction, but his attention does not extend to remote farm villages like this one. However, we cannot wait forever for the lord's help, can we? My brother and I have decided to collect money and hire mercenaries. We will recover the blessed land that we inherited from our ancestors!<br>
Now that I come to mention it, you look like quite an experienced mercenary yourself. What do you think? Will you lend us your strength to recover the farmland that the orcs took away from us? I will give you ample compensation.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30597-03.htm">Say you will drive off the orcs</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Piotur:<br>
Very well! Drive out the turek orcs that are camping around this area! If you bring the necklaces the orcs all wear, I will reward you according to the number.<br>
They may be lowly orcs, but they seem to have ranks among them. The one that seems to be the leader has a luxurious necklace. I will reward you a little more for that one.<br>
Ah! And as you know, this area was once the holy grounds for the ancient Elmoreden Empire. In the past, one could find three or four ancient relics each day when digging the earth to till the soil. Orcs also seem to understand about the value of those relics, and some collect them. Do away with the orcs and keep the relics that you find. You will be able to sell them for a high price at a store in the village.<br>
Now it is time for you to leave. Please make an effort to recover the land for the farmers that lost their way of life. May the blessing of the goddess be with you.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Piotur:<br>
Very well! Drive out the turek orcs that are camping around this area! If you bring the necklaces the orcs all wear, I will reward you according to the number.<br>
They may be lowly orcs, but they seem to have ranks among them. The one that seems to be the leader has a luxurious necklace. I will reward you a little more for that one.<br>
Ah! And as you know, this area was once the holy grounds for the ancient Elmoreden Empire. In the past, one could find three or four ancient relics each day when digging the earth to till the soil. Orcs also seem to understand about the value of those relics, and some collect them. Do away with the orcs and keep the relics that you find. You will be able to sell them for a high price at a store in the village.<br>
Now it is time for you to leave. Please make an effort to recover the land for the farmers that lost their way of life. May the blessing of the goddess be with you.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Piotur:<br>
You must be the mercenary sent by Guard Leikan. It is good to see you. I have a sad story to tell you...<br>
During the war with Gracia the farmers of this area were driven off of our land. After the war was over we returned to our farms only to find them occupied by Turek orcs!<br>
I'll give the Lord credit for his many restoration projects, but unfortunately we are far from the castle and haven't gotten any significant help from him. We must take responsibility for recovering our farms! Would you help us drive the orcs from our lands? You will be well compensated for you efforts.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30597-03.html">"I will drive the orcs away for you farmers."</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Piotur:<br>
Please help the farmers who lost their way of living recover their land from the orcs. As I told you, kill the turek orcs and bring their necklaces back as proof, and I will give you a reward.<br>
Also, do not discard the ancient relics that the orcs keep with them. Collect them all. You can sell them for quite a high price at the village. Why don't you think of it as a kind of bonus for this task?<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30597-06.html">Say you will quit</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30597-07.html">Say you will continue</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Piotur:<br>
Young soldier, you have fought well. By the Contract, I will give you a reward according to the number of turek Orc necklaces you have brought. Thanks to your efforts, the farmers who lost their way of living are one day closer to recovering their land.<br>
Ah! Also, do not dispose of the ancient relics that the orcs kept on them, but collect them all. You can sell them for quite a high price in the village. Why don't you think of it as a kind of bonus for the work you've done? Now that I think about it, there is supposed to be a specialist of archeology in Gludin ... That person will be able to tell you the value of these objects in more detail.<br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30597-06.html">Say you will quit</a><br>
<a action="bypass -h Quest Q00327_RecoverTheFarmland 30597-07.html">Say you will continue</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Piotur:<br>
I am sad to see you go, but it seems that our fates which brought us together for a time now must separate. However, only the gods know the destiny of people. I may request your help again someday. Or a day may come when I will help you ... we never know.<br>
May the goddess' blessing be upon your future days.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Piotur:<br>
They say that the turek orcs have trained the ferocious wolves to use as military hounds. Even the smallest creature knows its master. When orcs are attacked, the wolves fight as well, so be careful.<br>
May the goddess' blessing be with you.
</body></html>

View File

@@ -0,0 +1,461 @@
/*
* Copyright (C) 2004-2014 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00327_RecoverTheFarmland;
import java.util.HashMap;
import java.util.Map;
import com.l2jserver.gameserver.enums.QuestSound;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.holders.ItemHolder;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
/**
* Recover the Farmland (327).
* @author GKR
*/
public final class Q00327_RecoverTheFarmland extends Quest
{
// NPCs
private static final int IRIS = 30034;
private static final int ASHA = 30313;
private static final int NESTLE = 30314;
private static final int LEIKAN = 30382;
private static final int PIOTUR = 30597;
private static final int TUREK_ORK_WARLORD = 20495;
private static final int TUREK_ORK_ARCHER = 20496;
private static final int TUREK_ORK_SKIRMISHER = 20497;
private static final int TUREK_ORK_SUPPLIER = 20498;
private static final int TUREK_ORK_FOOTMAN = 20499;
private static final int TUREK_ORK_SENTINEL = 20500;
private static final int TUREK_ORK_SHAMAN = 20501;
// Items
private static final int TUREK_DOG_TAG = 1846;
private static final int TUREK_MEDALLION = 1847;
private static final int LEIKANS_LETTER = 5012;
private static final int CLAY_URN_FRAGMENT = 1848;
private static final int BRASS_TRINKET_PIECE = 1849;
private static final int BRONZE_MIRROR_PIECE = 1850;
private static final int JADE_NECKLACE_BEAD = 1851;
private static final int ANCIENT_CLAY_URN = 1852;
private static final int ANCIENT_BRASS_TIARA = 1853;
private static final int ANCIENT_BRONZE_MIRROR = 1854;
private static final int ANCIENT_JADE_NECKLACE = 1855;
private static final int QUICK_STEP_POTION = 734;
private static final int SWIFT_ATTACK_POTION = 735;
private static final int SCROLL_OF_ESCAPE = 736;
private static final int SCROLL_OF_RESURRECTION = 737;
private static final int HEALING_POTION = 1061;
private static final int SOULSHOT_D = 1463;
private static final int SPIRITSHOT_D = 2510;
// Misc
private static final int MIN_LVL = 25;
private static final Map<String, ItemHolder> FRAGMENTS_REWARD_DATA = new HashMap<>(4);
private static final Map<Integer, Integer> FRAGMENTS_DROP_PROB = new HashMap<>(7);
private static final ItemHolder[] FULL_REWARD_DATA =
{
new ItemHolder(ANCIENT_CLAY_URN, 2766),
new ItemHolder(ANCIENT_BRASS_TIARA, 3227),
new ItemHolder(ANCIENT_BRONZE_MIRROR, 3227),
new ItemHolder(ANCIENT_JADE_NECKLACE, 3919)
};
static
{
FRAGMENTS_REWARD_DATA.put("30034-03.html", new ItemHolder(CLAY_URN_FRAGMENT, 307));
FRAGMENTS_REWARD_DATA.put("30034-04.html", new ItemHolder(BRASS_TRINKET_PIECE, 368));
FRAGMENTS_REWARD_DATA.put("30034-05.html", new ItemHolder(BRONZE_MIRROR_PIECE, 368));
FRAGMENTS_REWARD_DATA.put("30034-06.html", new ItemHolder(JADE_NECKLACE_BEAD, 430));
FRAGMENTS_DROP_PROB.put(TUREK_ORK_ARCHER, 21);
FRAGMENTS_DROP_PROB.put(TUREK_ORK_FOOTMAN, 19);
FRAGMENTS_DROP_PROB.put(TUREK_ORK_SENTINEL, 18);
FRAGMENTS_DROP_PROB.put(TUREK_ORK_SHAMAN, 22);
FRAGMENTS_DROP_PROB.put(TUREK_ORK_SKIRMISHER, 21);
FRAGMENTS_DROP_PROB.put(TUREK_ORK_SUPPLIER, 20);
FRAGMENTS_DROP_PROB.put(TUREK_ORK_WARLORD, 26);
}
public Q00327_RecoverTheFarmland()
{
super(327, Q00327_RecoverTheFarmland.class.getSimpleName(), "Recover the Farmland");
addStartNpc(LEIKAN, PIOTUR);
addTalkId(LEIKAN, PIOTUR, IRIS, ASHA, NESTLE);
addKillId(TUREK_ORK_WARLORD, TUREK_ORK_ARCHER, TUREK_ORK_SKIRMISHER, TUREK_ORK_SUPPLIER, TUREK_ORK_FOOTMAN, TUREK_ORK_SENTINEL, TUREK_ORK_SHAMAN);
registerQuestItems(TUREK_DOG_TAG, TUREK_MEDALLION, LEIKANS_LETTER);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, false);
if (st == null)
{
return null;
}
String html = null;
switch (event)
{
case "30034-01.html":
case "30313-01.html":
case "30314-02.html":
case "30314-08.html":
case "30314-09.html":
case "30382-05a.html":
case "30382-05b.html":
case "30597-03.html":
case "30597-07.html":
{
html = event;
break;
}
case "30382-03.htm":
{
st.startQuest();
giveItems(player, LEIKANS_LETTER, 1);
st.setCond(2);
html = event;
break;
}
case "30597-03.htm":
{
st.startQuest();
html = event;
break;
}
case "30597-06.html":
{
st.exitQuest(true, true);
html = event;
break;
}
case "30034-03.html":
case "30034-04.html":
case "30034-05.html":
case "30034-06.html":
{
final ItemHolder item = FRAGMENTS_REWARD_DATA.get(event);
if (!hasQuestItems(player, item.getId()))
{
html = "30034-02.html";
}
else
{
addExpAndSp(player, getQuestItemsCount(player, item.getId()) * item.getCount(), 0);
takeItems(player, item.getId(), -1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
html = event;
}
break;
}
case "30034-07.html":
{
boolean rewarded = false;
for (ItemHolder it : FULL_REWARD_DATA)
{
if (hasQuestItems(player, it.getId()))
{
addExpAndSp(player, getQuestItemsCount(player, it.getId()) * it.getCount(), 0);
takeItems(player, it.getId(), -1);
playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
rewarded = true;
}
}
html = rewarded ? event : "30034-02.html";
break;
}
case "30313-03.html":
{
if (getQuestItemsCount(player, CLAY_URN_FRAGMENT) < 5)
{
html = "30313-02.html";
}
else
{
takeItems(player, CLAY_URN_FRAGMENT, 5);
if (getRandom(6) < 5)
{
giveItems(player, ANCIENT_CLAY_URN, 1);
html = event;
}
else
{
html = "30313-10.html";
}
}
break;
}
case "30313-05.html":
{
if (getQuestItemsCount(player, BRASS_TRINKET_PIECE) < 5)
{
html = "30313-04.html";
}
else
{
takeItems(player, BRASS_TRINKET_PIECE, 5);
if (getRandom(7) < 6)
{
giveItems(player, ANCIENT_BRASS_TIARA, 1);
html = event;
}
else
{
html = "30313-10.html";
}
}
break;
}
case "30313-07.html":
{
if (getQuestItemsCount(player, BRONZE_MIRROR_PIECE) < 5)
{
html = "30313-06.html";
}
else
{
takeItems(player, BRONZE_MIRROR_PIECE, 5);
if (getRandom(7) < 6)
{
giveItems(player, ANCIENT_BRONZE_MIRROR, 1);
html = event;
}
else
{
html = "30313-10.html";
}
}
break;
}
case "30313-09.html":
{
if (getQuestItemsCount(player, JADE_NECKLACE_BEAD) < 5)
{
html = "30313-08.html";
}
else
{
takeItems(player, JADE_NECKLACE_BEAD, 5);
if (getRandom(8) < 7)
{
giveItems(player, ANCIENT_JADE_NECKLACE, 1);
html = event;
}
else
{
html = "30313-10.html";
}
}
break;
}
case "30314-03.html":
{
if (!hasQuestItems(player, ANCIENT_CLAY_URN))
{
html = "30314-07.html";
}
else
{
rewardItems(player, SOULSHOT_D, getRandom(70, 110));
takeItems(player, ANCIENT_CLAY_URN, 1);
html = event;
}
break;
}
case "30314-04.html":
{
if (!hasQuestItems(player, ANCIENT_BRASS_TIARA))
{
html = "30314-07.html";
}
else
{
final int rnd = getRandom(100);
if (rnd < 40)
{
rewardItems(player, HEALING_POTION, 1);
}
else if (rnd < 84)
{
rewardItems(player, QUICK_STEP_POTION, 1);
}
else
{
rewardItems(player, SWIFT_ATTACK_POTION, 1);
}
takeItems(player, ANCIENT_BRASS_TIARA, 1);
html = event;
}
break;
}
case "30314-05.html":
{
if (!hasQuestItems(player, ANCIENT_BRONZE_MIRROR))
{
html = "30314-07.html";
}
else
{
rewardItems(player, (getRandom(100) < 59) ? SCROLL_OF_ESCAPE : SCROLL_OF_RESURRECTION, 1);
takeItems(player, ANCIENT_BRONZE_MIRROR, 1);
html = event;
}
break;
}
case "30314-06.html":
{
if (!hasQuestItems(player, ANCIENT_JADE_NECKLACE))
{
html = "30314-07.html";
}
else
{
rewardItems(player, SPIRITSHOT_D, getRandom(50, 90));
takeItems(player, ANCIENT_JADE_NECKLACE, 1);
html = event;
}
break;
}
}
return html;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState st = getQuestState(killer, false);
if (st != null)
{
if ((npc.getId() == TUREK_ORK_SHAMAN) || (npc.getId() == TUREK_ORK_WARLORD))
{
giveItems(killer, TUREK_MEDALLION, 1);
}
else
{
giveItems(killer, TUREK_DOG_TAG, 1);
}
if (getRandom(100) < FRAGMENTS_DROP_PROB.get(npc.getId()))
{
giveItems(killer, getRandom(CLAY_URN_FRAGMENT, JADE_NECKLACE_BEAD), 1);
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, true);
String html = getNoQuestMsg(player);
switch (npc.getId())
{
case LEIKAN:
{
if (st.isCreated())
{
html = ((player.getLevel() >= MIN_LVL) ? "30382-02.htm" : "30382-01.htm");
}
else if (st.isStarted())
{
if (hasQuestItems(player, LEIKANS_LETTER))
{
html = "30382-04.html";
}
else
{
html = "30382-05.html";
st.setCond(5, true);
}
}
break;
}
case PIOTUR:
{
if (st.isCreated())
{
html = ((player.getLevel() >= MIN_LVL) ? "30597-02.htm" : "30597-01.htm");
}
else if (st.isStarted())
{
if (hasQuestItems(player, LEIKANS_LETTER))
{
html = "30597-03a.htm";
takeItems(player, LEIKANS_LETTER, -1);
st.setCond(3, true);
}
else
{
if (!hasQuestItems(player, TUREK_DOG_TAG) && !hasQuestItems(player, TUREK_MEDALLION))
{
html = "30597-04.html";
}
else
{
html = "30597-05.html";
final long dogTags = getQuestItemsCount(player, TUREK_DOG_TAG);
final long medallions = getQuestItemsCount(player, TUREK_MEDALLION);
final long rewardCount = (dogTags * 40) + (medallions * 50) + (((dogTags + medallions) >= 10) ? 619 : 0);
giveAdena(player, rewardCount, true);
takeItems(player, TUREK_DOG_TAG, -1);
takeItems(player, TUREK_MEDALLION, -1);
st.setCond(4, true);
}
}
}
break;
}
case IRIS:
{
if (st.isStarted())
{
html = "30034-01.html";
}
break;
}
case ASHA:
{
if (st.isStarted())
{
html = "30313-01.html";
}
break;
}
case NESTLE:
{
if (st.isStarted())
{
html = "30314-01.html";
}
break;
}
}
return html;
}
}