Updated Path to Becoming a Lord quests.

Author: Sacrifice
Source: https://gitlab.com/L2JDevs
This commit is contained in:
MobiusDevelopment 2019-08-14 10:13:36 +00:00
parent 3b0c031157
commit 9b75651aeb
255 changed files with 2798 additions and 2800 deletions

View File

@ -235,8 +235,8 @@ public class Q00640_TheZeroHour extends Quest
{
if (talker.getLevel() >= MIN_LEVEL)
{
final QuestState questState2 = qs.getPlayer().getQuestState(Q00109_InSearchOfTheNest.class.getSimpleName());
if ((questState2 != null) && (questState2.getState() == State.COMPLETED))
final QuestState qs2 = qs.getPlayer().getQuestState(Q00109_InSearchOfTheNest.class.getSimpleName());
if ((qs2 != null) && (qs2.getState() == State.COMPLETED))
{
htmlText = "31554-01.htm";
}

View File

@ -0,0 +1,4 @@
<html><body>Blacksmith Pinter:<br>
Aren't you a member of the Gludio Castle Clan? What brings you here? I'm very busy, so unless it's important, leave me alone!<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio 30298-02.html">"I've come to solve your problem."</a>
</body></html>

View File

@ -1,6 +1,6 @@
<html><body><font color="FFFFFF">Blacksmith Pinter:</font><br>
<html><body>Blacksmith Pinter:<br>
Ha ha ha! You want to help us?<br>
You do know the current situation of Gludio Territory, right? Destruction is everywhere; a great deal is needed if we are to rebuild.<br>
Oh, I'm sure you already know all -- what did you have in mind?<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio pinter_q708_03.htm">"We've come to do whatever we can to help you."</a>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio 30298-03.html">"We've come to do whatever we can to help you."</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Blacksmith Pinter:</font><br>
<html><body>Blacksmith Pinter:<br>
Well, I like your can-do attitude! We'll gladly accept your help. We were supposed to received some construction materials, but they are long overdue. Something must have happened. We must find out what's happened, but I can't spare anyone to investigate. Most importantly, we need to resolve this problem quickly. Can you obtain the materials we need for our work? Then find out what happened to the materials that were supposed to arrive from Gludin.<br>
We need 100 pieces of leather, 100 polishers, 100 iron ores and 50 cokes. Will you help us? There's no time to waste!
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Blacksmith Pinter:</font><br>
<html><body>Blacksmith Pinter:<br>
Aren't you a member of the Gludio Castle Clan? What brings you here? I'm very busy, so unless it's important, leave me alone!<br>
(You can continue only if the castle lord is logged on.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Blacksmith Pinter:<br>
Were you able to obtain the materials that I requested? If so, please give them to me. Our work cannot be halted even for a single day.<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio 30298-05.html">Give him the materials.</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Blacksmith Pinter:</font><br>
<html><body>Blacksmith Pinter:<br>
What are you doing? Unless you supply us with materials, the reconstruction work will have to stop. We are relying on you. Don't let us down!<br>
You do know what's needed, right? The materials that we need now are 100 pieces of animal skin, 100 varnish, 100 iron ore, and 50 cokes.
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Blacksmith Pinter:</font><br>
<html><body>Blacksmith Pinter:<br>
These materials will last us for a while. Thank you! We will never forget what you have done for us here. You have the makings of a wise ruler, in fact. Are you perhaps interested in working for our territory?<br>
No? Well then, I must return to my work and let you go back to yours.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Blacksmith Pinter:</font><br>
<html><body>Blacksmith Pinter:<br>
Thanks to you, our reconstruction work went smoothly. Thank you, my friend!
</body></html>

View File

@ -1,5 +1,5 @@
<html><body><font color="FFFFFF">Captain Bathis:</font><br>
<html><body>Captain Bathis:<br>
Welcome, my lord. At the chamberlain's behest, we investigated the caravan's disappearance. We discovered that it went missing somewhere in the Relics of Sorrow.<br>
We also heard rumors of a headless knight attacking passing merchants...<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio bathis_q708_02.htm">"A headless knight in Gludio?! How can that be?"</a>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio 30332-02.html">"A headless knight in Gludio?! How can that be?"</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Captain Bathis:</font><br>
<html><body>Captain Bathis:<br>
I agree, my lord, but I spoke to several merchants who survived the attack. Their testimony all agreed: it was a headless knight. Perhaps the spirits of restless noblemen who perished in the war with Gracia now haunt that area.<br>
You must confirm this phenomenon for yourself. I learned that the headless knight appeared after the Skulls appeared in the Relics. They must be connected!<br>
If you go and slay the Skulls, perhaps the knight will appear...

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Captain Bathis:</font><br>
<html><body>Captain Bathis:<br>
Once you have confirmed that the streets of Gludin Village and the Town of Gludio are safe, I am sure our subjects will breathe a sigh of relief. As our lord, it is your duty to do this for us!
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Captain Bathis:<br>
Lord, has a headless knight appeared?<br>
But that armor...<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio 30332-05.html">"A headless knight in Gludio?! How can that be?"</a>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Captain Bathis:</font><br>
<html><body>Captain Bathis:<br>
I expected no less from you, my lord! I will inform your subjects of your victory! They will not soon forget your bravery in this matter. It is my honor to serve so noble a ruler.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
Congratulations on your ascension to the lordship. I trust you will rule wisely and well.
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
Hey! Are you looking for trouble? How dare you covet the lord's position? Go away before I loose the dogs on you!<br>
(Only the lord of Gludio Castle may undertake this quest.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Chamberlain Sayres:<br>
My lord, Gludio may be a barren land, but it deserves a noble ruler. Its people want only a wise lord who will govern well.<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio 35100-02.html">"Do you think I can be that ruler?"</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
I believe you have the necessary character, my lord. But despite your good character, remember that you asserted your claim by force. To become the true lord of this territory, recognized by all, there is still something you must do.<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio sayres_q708_03.htm">"What is it?"</a>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio 35100-03.html">"What is it?"</a>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
You must win the support of the local forces in this land. If you can do so, the stability of your reign will be assured. I will arrange a meeting with them. There you must do your best to impress them. Please wait while I make the preparations, my lord.
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
Our efforts to repair the devastation caused by the war with Gracia depend on the Dwarven builders who belong to Grey Column Guild. They have become quite influential here in Gludio as a result. If you can win their support, you will be able to rule the territory with an easy conscience. As luck would have it, I hear the Grey Column Dwarves have a problem...<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio sayres_q708_05.htm">"Perhaps I can offer my help."</a>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio 35100-05.html">"Perhaps I can offer my help."</a>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
An excellent idea, my lord! Their leader is Blacksmith Pinter of the Town of Gludio. I'm sure he would be grateful for any assistance you can offer. In fact, you need not do it yourself. You can appoint a trusted agent to act on your behalf in this matter. Simply let me know whom you have chosen to Raffortysent you. If he agrees and you verify his identity, I will tell him what he needs to know.
<html><body>Chamberlain Sayres:<br>
An excellent idea, my lord! Their leader is Blacksmith Pinter of the Town of Gludio. I'm sure he would be grateful for any assistance you can offer. In fact, you need not do it yourself. You can appoint a trusted agent to act on your behalf in this matter. Simply let me know whom you have chosen to Rafforty sent you. If he agrees and you verify his identity, I will tell him what he needs to know.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
Where did the lord go? I cannot give you the details of this mission without first verifying that you are the one whom he selected. Bring him here now.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
My lord, who will be your agent in this matter, acting on your behalf? Please send him to me.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Chamberlain Sayres:<br>
Are you the one who will meet with Blacksmith Pinter on our lord's behalf?<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio 35100-08.html">Say yes.</a>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
Your mission is to help Blacksmith Pinter of the Town of Gludio and win his support for our lord. We are trusting you to act wisely in this matter.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
What are you doing? Find Blacksmith Pinter and help him immediately!
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
I have been contacted by your representative, my lord. He says that we must determine the whereabouts of some freight Pinter and his men require for their reconstruction work, and then deliver it to them.<br>
I have already asked Captain Bathis to look into the matter -- may I suggest that you and your followers locate alternate materials? Your personal involvement will make a powerful statement.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
Captain Bathis is investigating the matter of the missing freight. I suggest you ask him what he has learned.
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
<html><body>Chamberlain Sayres:<br>
Now that Pinter and his men have the supplies they needed and the headless knight and his gang have been vanquished, I doubt we will have any further problems. Well done, my lord! Your popularity is soaring among the people of Gludio! Will you accept their wishes and formally become their lord?<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio sayres_q708_12.htm">"I will do so, since it is the will of the people."</a>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio 35100-12.html">"I will do so, since it is the will of the people."</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Saul:</font><br>
<html><body>Chamberlain Sayres:<br>
Understood, my lord!<br>
I look forward to your wise and benevolent rule.
</body></html>

View File

@ -31,36 +31,42 @@ import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
public class Q00708_PathToBecomingALordGludio extends Quest
/**
* Path to Becoming a Lord - Gludio (708)
* @author Sacrifice
*/
public final class Q00708_PathToBecomingALordGludio extends Quest
{
private static final int Sayres = 35100;
private static final int Pinter = 30298;
private static final int Bathis = 30332;
private static final int HeadlessKnight = 20280;
private static final int SAYRES = 35100;
private static final int PINTER = 30298;
private static final int BATHIS = 30332;
private static final int HEADLESS_KNIGHT = 20280;
private static final int HeadlessKnightsArmor = 13848;
private static final int COKES = 1879;
private static final int IRON_ORE = 1869;
private static final int ANIMAL_SKIN = 1867;
private static final int VARNISH = 1865;
private static final int HEADLESS_KNIGHT_ARMOR = 13848;
private static final int[] Mobs =
private static final int[] MOBS =
{
20045,
20051,
20099,
HeadlessKnight
20045, // Skeleton Scout
20051, // Skeleton Bowman
20099, // Skeleton
HEADLESS_KNIGHT
};
private static final int GludioCastle = 1;
private static final int GLUDIO_CASTLE = 1;
public Q00708_PathToBecomingALordGludio()
{
super(708);
addStartNpc(Sayres);
addTalkId(Sayres);
addTalkId(Pinter);
addTalkId(Bathis);
addKillId(Mobs);
addStartNpc(SAYRES);
addKillId(MOBS);
addTalkId(SAYRES, PINTER, BATHIS);
_questItemIds = new int[]
{
HeadlessKnightsArmor
HEADLESS_KNIGHT_ARMOR
};
}
@ -70,21 +76,22 @@ public class Q00708_PathToBecomingALordGludio extends Quest
String htmltext = event;
final QuestState qs = player.getQuestState(getName());
final Castle castle = CastleManager.getInstance().getCastleById(GludioCastle);
final Castle castle = CastleManager.getInstance().getCastleById(GLUDIO_CASTLE);
if (castle.getOwner() == null)
{
return "Castle has no lord";
return "Castle has no lord.";
}
final PlayerInstance castleOwner = castle.getOwner().getLeader().getPlayerInstance();
if (event.equals("sayres_q708_03.htm"))
if (event.equals("35100-03.html"))
{
qs.startQuest();
}
else if (event.equals("sayres_q708_05.htm"))
else if (event.equals("35100-05.html"))
{
qs.setCond(2);
}
else if (event.equals("sayres_q708_08.htm"))
else if (event.equals("35100-08.html"))
{
if (isLordAvailable(2, qs))
{
@ -94,10 +101,10 @@ public class Q00708_PathToBecomingALordGludio extends Quest
}
else
{
htmltext = "sayres_q708_05a.htm";
htmltext = "35100-05a.html";
}
}
else if (event.equals("pinter_q708_03.htm"))
else if (event.equals("30298-03.html"))
{
if (isLordAvailable(3, qs))
{
@ -105,46 +112,41 @@ public class Q00708_PathToBecomingALordGludio extends Quest
}
else
{
htmltext = "pinter_q708_03a.htm";
htmltext = "30298-03a.html";
}
}
else if (event.equals("bathis_q708_02.htm"))
else if (event.equals("30332-02.html"))
{
qs.setCond(6);
}
else if (event.equals("bathis_q708_05.htm"))
else if (event.equals("30332-05.html"))
{
takeItems(player, HeadlessKnightsArmor, 1);
takeItems(player, HEADLESS_KNIGHT_ARMOR, 1);
qs.setCond(8);
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_SHOUT, npc.getId(), NpcStringId.LISTEN_YOU_VILLAGERS_OUR_LIEGE_WHO_WILL_SOON_BECOME_A_LORD_HAS_DEFEATED_THE_HEADLESS_KNIGHT_YOU_CAN_NOW_REST_EASY));
}
else if (event.equals("pinter_q708_05.htm"))
else if (event.equals("30298-05.html"))
{
if (isLordAvailable(8, qs))
{
takeItems(player, 1867, 100);
takeItems(player, 1865, 100);
takeItems(player, 1869, 100);
takeItems(player, 1879, 50);
takeItems(player, ANIMAL_SKIN, 100);
takeItems(player, VARNISH, 100);
takeItems(player, IRON_ORE, 100);
takeItems(player, COKES, 50);
castleOwner.getQuestState(getName()).setCond(9);
}
else
{
htmltext = "pinter_q708_03a.htm";
htmltext = "30298-03a.html";
}
}
else if (event.equals("sayres_q708_12.htm"))
else if (event.equals("35100-12.html"))
{
if (castleOwner != null)
{
final NpcSay packet = new NpcSay(npc.getObjectId(), ChatType.NPC_SHOUT, npc.getId(), NpcStringId.S1_HAS_BECOME_LORD_OF_THE_TOWN_OF_GLUDIO_LONG_MAY_HE_REIGN);
packet.addStringParameter(player.getName());
npc.broadcastPacket(packet);
/**
* Territory terr = TerritoryWarManager.getInstance().getTerritory(castle.getId()); terr.setLordId(castleOwner.getObjectId()); terr.updateDataInDB(); terr.updateState();
*/
qs.exitQuest(true, true);
}
}
@ -152,20 +154,40 @@ public class Q00708_PathToBecomingALordGludio extends Quest
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
final Castle castle = CastleManager.getInstance().getCastleById(GludioCastle);
final QuestState qs = killer.getQuestState(getName());
if ((qs != null) && qs.isCond(6))
{
if ((npc.getId() != HEADLESS_KNIGHT) && (Rnd.get(9) == 0))
{
addSpawn(HEADLESS_KNIGHT, npc, true, 300000);
}
else if (npc.getId() == HEADLESS_KNIGHT)
{
giveItems(killer, HEADLESS_KNIGHT_ARMOR, 1);
qs.setCond(7);
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onTalk(Npc npc, PlayerInstance talker)
{
final QuestState qs = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
final Castle castle = CastleManager.getInstance().getCastleById(GLUDIO_CASTLE);
if (castle.getOwner() == null)
{
return "Castle has no lord";
return "Castle has no lord.";
}
final PlayerInstance castleOwner = castle.getOwner().getLeader().getPlayerInstance();
switch (npc.getId())
{
case Sayres:
case SAYRES:
{
if (qs.isCond(0))
{
@ -173,11 +195,11 @@ public class Q00708_PathToBecomingALordGludio extends Quest
{
if (!hasFort())
{
htmltext = "sayres_q708_01.htm";
htmltext = "35100-01.html";
}
else
{
htmltext = "sayres_q708_00.htm";
htmltext = "35100-00.html";
qs.exitQuest(true);
}
}
@ -185,93 +207,89 @@ public class Q00708_PathToBecomingALordGludio extends Quest
{
if (castleOwner.calculateDistance2D(npc) <= 200)
{
htmltext = "sayres_q708_07.htm";
htmltext = "35100-07.html";
}
else
{
htmltext = "sayres_q708_05a.htm";
htmltext = "35100-05a.html";
}
}
else if (qs.getState() == State.STARTED)
{
htmltext = "sayres_q708_08a.htm";
htmltext = "35100-08a.html";
}
else
{
htmltext = "sayres_q708_00a.htm";
htmltext = "35100-00a.html";
qs.exitQuest(true);
}
}
else if (qs.isCond(1))
{
htmltext = "sayres_q708_04.htm";
htmltext = "35100-04.html";
}
else if (qs.isCond(2))
{
htmltext = "sayres_q708_06.htm";
htmltext = "35100-06.html";
}
else if (qs.isCond(4))
{
qs.set("cond", "5");
htmltext = "sayres_q708_09.htm";
htmltext = "35100-09.html";
}
else if (qs.isCond(5))
{
htmltext = "sayres_q708_10.htm";
htmltext = "35100-10.html";
}
else if ((qs.getCond() > 5) && (qs.getCond() < 9))
{
htmltext = "sayres_q708_08.htm";
htmltext = "35100-08.html";
}
else if (qs.isCond(9))
{
htmltext = "sayres_q708_11.htm";
htmltext = "35100-11.html";
}
break;
}
case Pinter:
case PINTER:
{
if ((qs.getState() == State.STARTED) && qs.isCond(0) && isLordAvailable(3, qs))
{
if (castleOwner.getQuestState(getName()).getInt("confidant") == qs.getPlayer().getObjectId())
{
htmltext = "pinter_q708_01.htm";
htmltext = "30298-01.html";
}
}
else if ((qs.getState() == State.STARTED) && qs.isCond(0) && isLordAvailable(8, qs))
{
if ((getQuestItemsCount(player, 1867) >= 100) && (getQuestItemsCount(player, 1865) >= 100) && (getQuestItemsCount(player, 1869) >= 100) && (getQuestItemsCount(player, 1879) >= 50))
if ((getQuestItemsCount(talker, ANIMAL_SKIN) >= 100) && (getQuestItemsCount(talker, VARNISH) >= 100) && (getQuestItemsCount(talker, IRON_ORE) >= 100) && (getQuestItemsCount(talker, COKES) >= 50))
{
htmltext = "pinter_q708_04.htm";
htmltext = "30298-04.html";
}
else
{
htmltext = "pinter_q708_04a.htm";
htmltext = "30298-04a.html";
}
}
else if ((qs.getState() == State.STARTED) && qs.isCond(0) && isLordAvailable(9, qs))
{
htmltext = "pinter_q708_06.htm";
htmltext = "30298-06.html";
}
break;
}
case Bathis:
case BATHIS:
{
if (qs.isCond(5))
{
htmltext = "bathis_q708_01.htm";
htmltext = "30332-01.html";
}
else if (qs.isCond(6))
{
htmltext = "bathis_q708_03.htm";
htmltext = "30332-03.html";
}
else if (qs.isCond(7))
{
htmltext = "bathis_q708_04.htm";
}
else if (qs.isCond(8))
{
htmltext = "sophia_q709_06.htm";
htmltext = "30332-04.html";
}
break;
}
@ -279,29 +297,21 @@ public class Q00708_PathToBecomingALordGludio extends Quest
return htmltext;
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isPet)
private boolean hasFort()
{
final QuestState qs = killer.getQuestState(getName());
if ((qs != null) && qs.isCond(6))
for (Fort fortress : FortManager.getInstance().getForts())
{
if ((npc.getId() != HeadlessKnight) && (Rnd.get(9) == 0))
if (fortress.getContractedCastleId() == GLUDIO_CASTLE)
{
addSpawn(HeadlessKnight, npc, true, 300000);
}
else if (npc.getId() == HeadlessKnight)
{
giveItems(killer, HeadlessKnightsArmor, 1);
qs.setCond(7);
return true;
}
}
return null;
return false;
}
private boolean isLordAvailable(int cond, QuestState qs)
{
final Castle castle = CastleManager.getInstance().getCastleById(GludioCastle);
final Castle castle = CastleManager.getInstance().getCastleById(GLUDIO_CASTLE);
final Clan owner = castle.getOwner();
final PlayerInstance castleOwner = castle.getOwner().getLeader().getPlayerInstance();
if (owner != null)
@ -313,16 +323,4 @@ public class Q00708_PathToBecomingALordGludio extends Quest
}
return false;
}
private boolean hasFort()
{
for (Fort fortress : FortManager.getInstance().getForts())
{
if (fortress.getContractedCastleId() == GludioCastle)
{
return true;
}
}
return false;
}
}

View File

@ -1,5 +0,0 @@
<html><body><font color="FFFFFF">Captain Bathis:</font><br>
Lord, has a headless knight appeared?<br>
But that armor...<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio bathis_q708_05.htm">"A headless knight in Gludio?! How can that be?"</a>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Blacksmith Pinter:</font><br>
Aren't you a member of the Gludio Castle Clan? What brings you here? I'm very busy, so unless it's important, leave me alone!<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio pinter_q708_02.htm">"I've come to solve your problem."</a>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Blacksmith Pinter:</font><br>
Were you able to obtain the materials that I requested? If so, please give them to me. Our work cannot be halted even for a single day.<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio pinter_q708_05.htm">Give him the materials.</a>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
My lord, Gludio may be a barren land, but it deserves a noble ruler. Its people want only a wise lord who will govern well.<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio sayres_q708_02.htm">"Do you think I can be that ruler?"</a>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Chamberlain Saius:</font><br>
Are you the one who will meet with Blacksmith Pinter on our lord's behalf?<br>
<a action="bypass -h Quest Q00708_PathToBecomingALordGludio sayres_q708_08.htm">Say yes.</a>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Mercenary Captain Sophya:<br>
Aren't you the lord of Dion Castle? How can I help you?<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion 30735-02.html">Explain the current situation and ask about the rebels.</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Mercenary Captain Sophya:</font><br>
<html><body>Mercenary Captain Sophya:<br>
Well, I think I can give you some information. According to what we have learned, it looks like a new aide has been appointed for the Bloody Axe troop. He has changed their tactics. They've become more aggressive now.<br>
But I think if we could eliminate that aide, everything will return to normal. We also know he's very devoted to his troops. If we kill enough Ol Mahum, my guess is that he'll show up... That's our chance.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Mercenary Captain Sophya:</font><br>
<html><body>Mercenary Captain Sophya:<br>
I can't spare any of my men to take care of this, we're short-handed as it is. You look like you can handle it, though.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Mercenary Captain Sophya:<br>
Have you seen the new rebel aid?<br>
Oh, that epaulette!<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion 30735-05.html">"It was a little difficult, but I took care of it. I don't think the rebels will cause any trouble for a while."</a>
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Mercenary Captain Sophya:</font><br>
<html><body>Mercenary Captain Sophya:<br>
Terrific! I wish I had more soldiers like you! Well, I guess that's it. Well done. I'll take that epaulette, if you don't mind.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Mercenary Captain Sophya:</font><br>
<html><body>Mercenary Captain Sophya:<br>
With a few more soldiers like you, we wouldn't have any trouble here. If you ever need our help, just let me know. I'll give you an excellent rate.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Scroll Seller Rouke:<br>
Weren't you with the lord of the Town of Dion? Why you here? I'm having some serious problems, so please don't waste my time on something unless it's urgent.<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion 31418-02.html">"I've come to solve your problem."</a>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Scroll Seller Rouke:<br>
You want to help us?<br>
That's wonderful! But is this your decision? Or what the lord of Town of Dion has ordered?<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion 31418-03.html">"My lord wishes to resolve all problems in the Town of Dion."</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Scroll Seller Luke:</font><br>
<html><body>Scroll Seller Rouke:<br>
I'm glad to hear that! Let me tell you a story.<br>
The war has caused much sorrow here in Dion territory. But we have one hope. It is Mandragora! Mandragora can be cultivated only in our territory, and its root has begun to catch people's attention in Giran. Now real trade has begun. Unfortunately, the first merchant convoy was attacked by rebels. Unless we can restore faith in our ability to protect the merchants, our economy will fail. And if that happens, famine will follow.<br>
Will you find 100 Mandragora roots to help boost trade? We will also need your help to ensure our merchants' safety near the rebels' hideout.

View File

@ -0,0 +1,4 @@
<html><body>Scroll Seller Rouke:<br>
Did you find the Mandragora Roots? Our trading day is getting close...<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion 31418-05.html">Give him the Mandragora Roots.</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Scroll Seller Luke:</font><br>
<html><body>Scroll Seller Rouke:<br>
I appreciate the kindness of the Lord of Dion in making this offer. But don't forget that we must make our trade successful.<br>
Please bring me 100 Mandragora Roots, which grow in the Execution Grounds.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Spellbook Seller Luke:</font><br>
<html><body>Spellbook Seller Rouke:<br>
Oh! That's very fortunate. My thanks to you and your colleagues. My reputation is safe! Now I just have to figure out how to safely send these to Giran. Please tell your lord that I won't forget his kindness. I trust he will rule Dion very wisely. Until we meet again, farewell!
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Scroll Seller Luke:</font><br>
<html><body>Scroll Seller Rouke:<br>
Bright lights have again begun to shine throughout this land because of the Lord of Dion's kindness. I won't forget this.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
<html><body>Chamberlain Crosby:<br>
Congratulations on your ascension to the lordship of Dion! I trust you will be a wise and just ruler.
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Saul:</font><br>
<html><body>Chamberlain Crosby:<br>
Hey! Are you looking for trouble? How dare you covet the lord's position? Go away before I loose the dogs on you!<br>
(Only a Dion Castle lord may undertake this quest.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Chamberlain Crosby:<br>
My lord, Dion Territory may be barren, but a wise lord can nevertheless enjoy much success here. Our subjects are eager for a just and benevolent ruler.<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion 35142-02.html">"Do you think I can be that ruler?"</a><br>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
<html><body>Chamberlain Crosby:<br>
I believe you have the necessary character. However, I must note that you did seize your throne by force, which the people have not forgotten. To gain their acceptance and become the true lord of this territory, I believe there is still something you must do.<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion crosby_q709_03.htm">"What is it?"</a>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion 35142-03.html">"What is it?"</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
<html><body>Chamberlain Crosby:<br>
You must win the support of the local forces in the territory. Doing so will improve stability and enhance the legitimacy of your claim.<br>
I will arrange a meeting; please wait while I make inquiries...
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Chamberlain Crosby:<br>
Ah, a fine idea, my lord! Go see Spellbook Seller Rouke in the Town of Dion. If you are able to help him resolve his problem, I think you will win his support. You don't have to do it yourself. If you prefer, you can select someone to act as your representative in this matter. Simply let me know who will do so once you have confirmed it with the person of your choice.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
<html><body>Chamberlain Crosby:<br>
Who will be granted the lord's mandate to act on his behalf? Send him to me at once.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Chamberlain Crosby:<br>
Are you planning to meet Spellbook Seller Rouke on behalf of the lord?<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion 35142-06.html">"Yes."</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
<html><body>Chamberlain Crosby:<br>
Are you looking for trouble? Why do you covet the position of the lord? Leave this place!<br>
(You can proceed only if the clan leader of Dion Castle is logged on this server.)
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Chamberlain Crosby:<br>
As the lord's representative it is your duty to help Spellbook Seller Rouke in the Town of Dion. We are all counting on you to resolve this crisis quickly...
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
I have been contacted by the lord's representative. I believe we should obtain the Mandragora Roots that Spellbook Seller Luke has requested.<br>
<html><body>Chamberlain Crosby:<br>
I have been contacted by the lord's representative. I believe we should obtain the Mandragora Roots that Spellbook Seller Rouke has requested.<br>
Send one of your followers to search for the roots while you focus on obtaining information concerning the whereabouts of the resistance. Speak with Mercenary Captain Sophya, my lord -- she is fighting them and is very knowledgeable.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
<html><body>Chamberlain Crosby:<br>
The individual chosen to act as the lord's representative seems to have things well in hand. We must trust him to act wisely and await the outcome.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Chamberlain Crosby:<br>
Rouke has received the Mandragora Roots he requested, and the rebels' power has been greatly reduced. There shouldn't be any problems transporting the goods now. Well done, my lord! The residents of Dion are clamoring for you to formally accept the lordship of the territory. Will you accept their wish?<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion 35142-10.html">"I would be honored to do so."</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
<html><body>Chamberlain Crosby:<br>
Very good, my lord!<br>
I look forward to your wise and benevolent reign.
</body></html>

View File

@ -32,44 +32,50 @@ import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
public class Q00709_PathToBecomingALordDion extends Quest
/**
* Path to Becoming a Lord - Dion (709)
* @author Sacrifice
*/
public final class Q00709_PathToBecomingALordDion extends Quest
{
private static final int Crosby = 35142;
private static final int Rouke = 31418;
private static final int Sophia = 30735;
private static final int MandragoraRoot = 13849;
private static final int BloodyAxeAide = 27392;
private static final int Epaulette = 13850;
private static final int[] OlMahums =
private static final int CROSBY = 35142;
private static final int ROUKE = 31418;
private static final int SOPHYA = 30735;
private static final int BLOODY_AXE_AIDE = 27392;
private static final int MANDRAGORA_ROOT = 13849;
private static final int BLOODY_AXE_BLACK_EPAULETTE = 13850;
private static final int[] OL_MAHUMS =
{
20208,
20209,
20210,
20211,
BloodyAxeAide
20208, // Ol Mahum Raider
20209, // Ol Mahum Marksman
20210, // Ol Mahum Sergeant
20211, // Ol Mahum Captain
BLOODY_AXE_AIDE
};
private static final int[] Manragoras =
private static final int[] MANDRAGORAS =
{
20154,
20155,
20156
20154, // Mandragora Sprout
20155, // Mandragora Sapling
20156 // Mandragora Blossom
};
private static final int DionCastle = 2;
private static final int DION_CASTLE = 2;
public Q00709_PathToBecomingALordDion()
{
super(709);
addStartNpc(Crosby);
addTalkId(Crosby);
addTalkId(Sophia);
addTalkId(Rouke);
addStartNpc(CROSBY);
addKillId(OL_MAHUMS);
addKillId(MANDRAGORAS);
addTalkId(CROSBY, SOPHYA, ROUKE);
_questItemIds = new int[]
{
Epaulette,
MandragoraRoot
BLOODY_AXE_BLACK_EPAULETTE,
MANDRAGORA_ROOT
};
addKillId(OlMahums);
addKillId(Manragoras);
}
@Override
@ -77,18 +83,18 @@ public class Q00709_PathToBecomingALordDion extends Quest
{
String htmltext = event;
final QuestState qs = player.getQuestState(getName());
final Castle castle = CastleManager.getInstance().getCastleById(DionCastle);
final Castle castle = CastleManager.getInstance().getCastleById(DION_CASTLE);
if (castle.getOwner() == null)
{
return "Castle has no lord";
return "Castle has no lord.";
}
final PlayerInstance castleOwner = castle.getOwner().getLeader().getPlayerInstance();
if (event.equals("crosby_q709_03.htm"))
if (event.equals("35142-03.html"))
{
qs.startQuest();
}
else if (event.equals("crosby_q709_06.htm"))
else if (event.equals("35142-06.html"))
{
if (isLordAvailable(2, qs))
{
@ -98,10 +104,10 @@ public class Q00709_PathToBecomingALordDion extends Quest
}
else
{
htmltext = "crosby_q709_05a.htm";
htmltext = "35142-05a.html";
}
}
else if (event.equals("rouke_q709_03.htm"))
else if (event.equals("31418-03.html"))
{
if (isLordAvailable(3, qs))
{
@ -109,38 +115,33 @@ public class Q00709_PathToBecomingALordDion extends Quest
}
else
{
htmltext = "crosby_q709_05a.htm";
htmltext = "35142-05a.html";
}
}
else if (event.equals("sophia_q709_02.htm"))
else if (event.equals("30735-02.html"))
{
qs.set("cond", "6");
}
else if (event.equals("sophia_q709_05.htm"))
else if (event.equals("30735-05.html"))
{
takeItems(player, Epaulette, 1);
takeItems(player, BLOODY_AXE_BLACK_EPAULETTE, 1);
qs.set("cond", "8");
}
else if (event.equals("rouke_q709_05.htm"))
else if (event.equals("31418-05.html"))
{
if (isLordAvailable(8, qs))
{
takeItems(player, MandragoraRoot, -1);
takeItems(player, MANDRAGORA_ROOT, -1);
castleOwner.getQuestState(getName()).setCond(9);
}
}
else if (event.equals("crosby_q709_10.htm"))
else if (event.equals("35142-10.html"))
{
if (castleOwner != null)
{
final NpcSay packet = new NpcSay(npc.getObjectId(), ChatType.NPC_SHOUT, npc.getId(), NpcStringId.S1_HAS_BECOME_LORD_OF_THE_TOWN_OF_DION_LONG_MAY_HE_REIGN);
packet.addStringParameter(player.getName());
npc.broadcastPacket(packet);
/**
* Territory terr = TerritoryWarManager.getInstance().getTerritory(castle.getId()); terr.setLordId(castleOwner.getObjectId()); terr.updateDataInDB(); terr.updateState();
*/
qs.exitQuest(true, true);
}
}
@ -148,20 +149,48 @@ public class Q00709_PathToBecomingALordDion extends Quest
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
final Castle castle = CastleManager.getInstance().getCastleById(DionCastle);
final QuestState qs = killer.getQuestState(getName());
if ((qs != null) && qs.isCond(6) && CommonUtil.contains(OL_MAHUMS, npc.getId()))
{
if ((npc.getId() != BLOODY_AXE_AIDE) && (Rnd.get(9) == 0))
{
addSpawn(BLOODY_AXE_AIDE, npc, true, 300000);
}
else if (npc.getId() == BLOODY_AXE_AIDE)
{
giveItems(killer, BLOODY_AXE_BLACK_EPAULETTE, 1);
qs.setCond(7);
}
}
if ((qs != null) && (qs.getState() == State.STARTED) && qs.isCond(0) && isLordAvailable(8, qs) && CommonUtil.contains(MANDRAGORAS, npc.getId()))
{
if (getQuestItemsCount(killer, MANDRAGORA_ROOT) < 100)
{
giveItems(killer, MANDRAGORA_ROOT, 1);
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onTalk(Npc npc, PlayerInstance talker)
{
final QuestState qs = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
final Castle castle = CastleManager.getInstance().getCastleById(DION_CASTLE);
if (castle.getOwner() == null)
{
return "Castle has no lord";
return "Castle has no lord.";
}
final PlayerInstance castleOwner = castle.getOwner().getLeader().getPlayerInstance();
switch (npc.getId())
{
case Crosby:
case CROSBY:
{
if (qs.isCond(0))
{
@ -169,11 +198,11 @@ public class Q00709_PathToBecomingALordDion extends Quest
{
if (!hasFort())
{
htmltext = "crosby_q709_01.htm";
htmltext = "35142-01.html";
}
else
{
htmltext = "crosby_q709_00.htm";
htmltext = "35142-00.html";
qs.exitQuest(true);
}
}
@ -181,90 +210,90 @@ public class Q00709_PathToBecomingALordDion extends Quest
{
if (castleOwner.calculateDistance2D(npc) <= 200)
{
htmltext = "crosby_q709_05.htm";
htmltext = "35142-05.html";
}
else
{
htmltext = "crosby_q709_05a.htm";
htmltext = "35142-05a.html";
}
}
else
{
htmltext = "crosby_q709_00a.htm";
htmltext = "35142-00a.html";
qs.exitQuest(true);
}
}
else if (qs.isCond(1))
{
qs.set("cond", "2");
htmltext = "crosby_q709_04.htm";
htmltext = "35142-04.html";
}
else if (qs.isCond(2) || qs.isCond(3))
{
htmltext = "crosby_q709_04a.htm";
htmltext = "35142-04a.html";
}
else if (qs.isCond(4))
{
qs.set("cond", "5");
htmltext = "crosby_q709_07.htm";
htmltext = "35142-07.html";
}
else if (qs.isCond(5))
{
htmltext = "crosby_q709_07.htm";
htmltext = "35142-07.html";
}
else if ((qs.getCond() > 5) && (qs.getCond() < 9))
{
htmltext = "crosby_q709_08.htm";
htmltext = "35142-08.html";
}
else if (qs.isCond(9))
{
htmltext = "crosby_q709_09.htm";
htmltext = "35142-09.html";
}
break;
}
case Rouke:
case ROUKE:
{
if ((qs.getState() == State.STARTED) && qs.isCond(0) && isLordAvailable(3, qs))
{
if (castleOwner.getQuestState(getName()).getInt("confidant") == qs.getPlayer().getObjectId())
{
htmltext = "rouke_q709_01.htm";
htmltext = "31418-01.html";
}
}
else if ((qs.getState() == State.STARTED) && qs.isCond(0) && isLordAvailable(8, qs))
{
if (getQuestItemsCount(player, MandragoraRoot) >= 100)
if (getQuestItemsCount(talker, MANDRAGORA_ROOT) >= 100)
{
htmltext = "rouke_q709_04.htm";
htmltext = "31418-04.html";
}
else
{
htmltext = "rouke_q709_04a.htm";
htmltext = "31418-04a.html";
}
}
else if ((qs.getState() == State.STARTED) && qs.isCond(0) && isLordAvailable(9, qs))
{
htmltext = "rouke_q709_06.htm";
htmltext = "31418-06.html";
}
break;
}
case Sophia:
case SOPHYA:
{
if (qs.isCond(5))
{
htmltext = "sophia_q709_01.htm";
htmltext = "30735-01.html";
}
else if (qs.isCond(6))
{
htmltext = "sophia_q709_03.htm";
htmltext = "30735-03.html";
}
else if (qs.isCond(7))
{
htmltext = "sophia_q709_04.htm";
htmltext = "30735-04.html";
}
else if (qs.isCond(8))
{
htmltext = "sophia_q709_06.htm";
htmltext = "30735-06.html";
}
break;
}
@ -272,36 +301,21 @@ public class Q00709_PathToBecomingALordDion extends Quest
return htmltext;
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isPet)
private boolean hasFort()
{
final QuestState qs = killer.getQuestState(getName());
if ((qs != null) && qs.isCond(6) && CommonUtil.contains(OlMahums, npc.getId()))
for (Fort fortress : FortManager.getInstance().getForts())
{
if ((npc.getId() != BloodyAxeAide) && (Rnd.get(9) == 0))
if (fortress.getContractedCastleId() == DION_CASTLE)
{
addSpawn(BloodyAxeAide, npc, true, 300000);
}
else if (npc.getId() == BloodyAxeAide)
{
giveItems(killer, Epaulette, 1);
qs.setCond(7);
return true;
}
}
if ((qs != null) && (qs.getState() == State.STARTED) && qs.isCond(0) && isLordAvailable(8, qs) && CommonUtil.contains(Manragoras, npc.getId()))
{
if (getQuestItemsCount(killer, MandragoraRoot) < 100)
{
giveItems(killer, MandragoraRoot, 1);
}
}
return null;
return false;
}
private boolean isLordAvailable(int cond, QuestState qs)
{
final Castle castle = CastleManager.getInstance().getCastleById(DionCastle);
final Castle castle = CastleManager.getInstance().getCastleById(DION_CASTLE);
final Clan owner = castle.getOwner();
final PlayerInstance castleOwner = castle.getOwner().getLeader().getPlayerInstance();
if (owner != null)
@ -313,16 +327,4 @@ public class Q00709_PathToBecomingALordDion extends Quest
}
return false;
}
private boolean hasFort()
{
for (Fort fortress : FortManager.getInstance().getForts())
{
if (fortress.getContractedCastleId() == DionCastle)
{
return true;
}
}
return false;
}
}

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
My lord, Dion Territory may be barren, but a wise lord can nevertheless enjoy much success here. Our subjects are eager for a just and benevolent ruler.<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion crosby_q709_02.htm">"Do you think I can be that ruler?"</a><br>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
Ah, a fine idea, my lord! Go see Spellbook Seller Luke in the Town of Dion. If you are able to help him resolve his problem, I think you will win his support. You don't have to do it yourself. If you prefer, you can select someone to act as your representative in this matter. Simply let me know who will do so once you have confirmed it with the person of your choice.
</body></html>

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
Are you planning to meet Spellbook Seller Luke on behalf of the lord?<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion crosby_q709_06.htm">"Yes."</a>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
As the lord's representative it is your duty to help Spellbook Seller Luke in the Town of Dion. We are all counting on you to resolve this crisis quickly...
</body></html>

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Chamberlain Crosby:</font><br>
Luke has received the Mandragora Roots he requested, and the rebels' power has been greatly reduced. There shouldn't be any problems transporting the goods now. Well done, my lord! The residents of Dion are clamoring for you to formally accept the lordship of the territory. Will you accept their wish?<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion crosby_q709_10.htm">"I would be honored to do so."</a>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Scroll Seller Luke:</font><br>
Weren't you with the lord of the Town of Dion? Why you here? I'm having some serious problems, so please don't waste my time on something unless it's urgent.<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion rouke_q709_02.htm">"I've come to solve your problem."</a>
</body></html>

View File

@ -1,5 +0,0 @@
<html><body><font color="FFFFFF">Scroll Seller Luke:</font><br>
You want to help us?<br>
That's wonderful! But is this your decision? Or what the lord of Town of Dion has ordered?<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion rouke_q709_03.htm">"My lord wishes to resolve all problems in the Town of Dion."</a>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Scroll Seller Luke:</font><br>
Did you find the Mandragora Roots? Our trading day is getting close...<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion rouke_q709_05.htm">Give him the Mandragora Roots.</a>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Mercenary Captain Sophya:</font><br>
Aren't you the lord of Dion Castle? How can I help you?<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion sophia_q709_02.htm">Explain the current situation and ask about the rebels.</a>
</body></html>

View File

@ -1,5 +0,0 @@
<html><body><font color="FFFFFF">Mercenary Captain Sophya:</font><br>
Have you seen the new rebel aid?<br>
Oh, that epaulette!<br>
<a action="bypass -h Quest Q00709_PathToBecomingALordDion sophia_q709_05.htm">"It was a little difficult, but I took care of it. I don't think the rebels will cause any trouble for a while."</a>
</body></html>

View File

@ -1,5 +1,5 @@
<html><body><font color="FFFFFF">Warehouse Chief Gesto:</font><br>
<html><body>Warehouse Chief Gesto:<br>
How can I help you? The Iron Gate Guild can get you anything -- provided it exists, of course.<br>
But you don't seem like you're looking for something. So what brings you here?<br>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran gesto_q710_02.htm">"I need your support to become a lord."</a>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran 30511-02.html">"I need your support to become a lord."</a>
</body></html>

View File

@ -1,5 +1,5 @@
<html><body><font color="FFFFFF">Warehouse Chief Gesto:</font><br>
<html><body>Warehouse Chief Gesto:<br>
Ah, anybody who wants to become lord of Giran should come and see me! But why should I support you over the others?<br>
Tell me, how will the Iron Gate Guild benefit from your rule?<br>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran gesto_q710_03.htm">"What if I resolve your problem?"</a>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran 30511-03.html">"What if I resolve your problem?"</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Warehouse Chief Gesto:</font><br>
<html><body>Warehouse Chief Gesto:<br>
Ah! So you already know what's going on. Then you will understand our predicament.<br>
Giran Harbor, as you know, is a very busy port. But we have received word that a ship that left Gludin Harbor hasn't yet arrived at Giran Harbor. Will you investigate for us? Nothing like this has ever happened to us before. We aren't sure what to do.<br>
Do this for us and you will certainly win our support!

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Warehouse Chief Gesto:</font><br>
<html><body>Warehouse Chief Gesto:<br>
As I told you, you must locate the ship that failed to arrive at Giran Harbor.
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Warehouse Chief Gesto:</font><br>
<html><body>Warehouse Chief Gesto:<br>
What brought you here?<br>
That seal! Where did you find it?<br>
Under the pirate ship tunnel bridge at the entrance of the Devil's Isle, eh? Could it be that the infamous Zaken is again on the loose? No...I don't think Zaken could leave. It must be his followers... .<br>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Warehouse Chief Gesto:</font><br>
<html><body>Warehouse Chief Gesto:<br>
How did it go? Were those Devil's Isle pirates involved? Oh, I hope you brought me good news.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Warehouse Chief Gesto:</font><br>
<html><body>Warehouse Chief Gesto:<br>
Thank you! I saw your activities. Your clan members are quite imposing. With those kind of followers, I feel I can trust and support you in becoming the lord. Rule well, my lord!
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Wharf Manager Felton:<br>
Why did you come here? We may not be busy now, but soon there will be many ships here.<br>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran 30879-02.html">"I need information about a ship that didn't arrive when it was supposed to."</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Wharf Manager Felton:</font><br>
<html><body>Wharf Manager Felton:<br>
That... If you know that, were you sent by Gesto?<br>
It still hasn't arrived. We know it left Gludin, but after that... It couldn't have run onto a reef near Devil's Isle in such calm weather. I can't leave my post to investigate. Would you search the area near Devil's Isle? Please?
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Wharf Manager Felton:</font><br>
<html><body>Wharf Manager Felton:<br>
I can't leave my post to investigate. Please search the area near Devil's Isle. I beg of you!
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Freight Box:</font><br>
<html><body>Freight Box:<br>
Water has seeped inside, but the box is still in good shape. The seal on the box looks familiar... It looks like someone will have to be sent to Gesto to confirm the item.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Freight Box:</font><br>
<html><body>Freight Box:<br>
The messenger hasn't arrived yet. The box was under the sea for a long time, and it is very brittle. You should wait patiently until help arrives.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Chamberlain Saul:<br>
Congratulations on your ascension to the lordship of Giran. I trust you will rule wisely and well, my lord.
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Saul:</font><br>
<html><body>Chamberlain Saul:<br>
Hey! Are you looking for trouble? How dare you covet the lord's position? Go away before I loose the dogs on you!<br>
(Only a Giran Castle lord may undertake this quest.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Chamberlain Saul:<br>
My lord, are you content to only occupy Giran Territory, seat of culture and commerce? Would you not wish to make it a better, more prosperous land?<br>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran 35184-02.html">"Do you think I can rule Giran well?"</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Saul:</font><br>
<html><body>Chamberlain Saul:<br>
I do, my lord. But despite your good intentions, you used force to assert your claims to this land. If you wish to become the true and undisputed lord of Giran, there is still something you must do.<br>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran saul_q710_03.htm">"What is it?"</a><br>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran 35184-03.html">"What is it?"</a><br>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Chamberlain Saul:<br>
A true lord's power rests on the loyalty and love of his subjects, not the force of his arms. To win the support necessary to rule this land, you must earn the trust of the local forces. Allow me to gather some information, and I will be able to tell you who to meet. I will return shortly, my lord.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Saul:</font><br>
<html><body>Chamberlain Saul:<br>
As you know, Giran is the center of commerce. Therefore it should not surprise you that the most influential person in this territory is Warehouse Chief Gesto, whose organization controls the logistics necessary for trade. I think you should go see him and earn his trust, my lord. I have heard that he has a problem, and no doubt he would be grateful for your help.
</body></html>

View File

@ -1,3 +1,3 @@
<html><body><font color="FFFFFF">Chamberlain Saul:</font><br>
<html><body>Chamberlain Saul:<br>
Have you met with Gesto, my lord? Doing so is vital if you hope to gain his trust and support.
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Saul:</font><br>
<html><body>Chamberlain Saul:<br>
Well done, my lord! If Gesto supports you, you will have no problem being recognized as the lord of Giran. I will inform everyone that your coronation will take place at once.<br>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran saul_q710_07.htm">"I leave it to you."</a>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran 35184-07.html">"I leave it to you."</a>
</body></html>

View File

@ -1,4 +1,4 @@
<html><body><font color="FFFFFF">Chamberlain Logan:</font><br>
<html><body>Chamberlain Saul:<br>
Understood, my lord!<br>
I look forward to your wise and benevolent rule.
</body></html>

View File

@ -28,82 +28,79 @@ import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.NpcSay;
public class Q00710_PathToBecomingALordGiran extends Quest
/**
* Path to Becoming a Lord - Giran (710)
* @author Sacrifice
*/
public final class Q00710_PathToBecomingALordGiran extends Quest
{
private static final int Saul = 35184;
private static final int Gesto = 30511;
private static final int Felton = 30879;
private static final int CargoBox = 32243;
private static final int SAUL = 35184;
private static final int GESTO = 30511;
private static final int FELTON = 30879;
private static final int CARGO_BOX = 32243;
private static final int FreightChest = 13014;
private static final int GestoBox = 13013;
private static final int FREIGHT_CHESTS_SEAL = 13014;
private static final int GESTOS_BOX = 13013;
private static final int[] Mobs =
private static final int[] MOBS =
{
20832,
20833,
20835,
21602,
21603,
21604,
21605,
21606,
21607,
21608,
21609
20832, // Zaken's Pikeman
20833, // Zaken's Archer
20835, // Zaken's Seer
21602, // Zaken's Pikeman
21603, // Zaken's Pikeman
21604, // Zaken's Elite Pikeman
21605, // Zaken's Archer
21606, // Zaken's Archer
21607, // Zaken's Elite Archer
21608, // Zaken's Watchman
21609 // Zaken's Watchman
};
private static final int GiranCastle = 3;
private static final int GIRAN_CASTLE = 3;
public Q00710_PathToBecomingALordGiran()
{
super(710);
addStartNpc(Saul);
addTalkId(Saul);
addTalkId(Gesto);
addTalkId(Felton);
addTalkId(CargoBox);
addStartNpc(SAUL);
addKillId(MOBS);
addTalkId(SAUL, GESTO, FELTON, CARGO_BOX);
_questItemIds = new int[]
{
FreightChest,
GestoBox
FREIGHT_CHESTS_SEAL,
GESTOS_BOX
};
addKillId(Mobs);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final QuestState qs = player.getQuestState(getName());
final Castle castle = CastleManager.getInstance().getCastleById(GiranCastle);
final Castle castle = CastleManager.getInstance().getCastleById(GIRAN_CASTLE);
if (castle.getOwner() == null)
{
return "Castle has no lord";
return "Castle has no lord.";
}
if (event.equals("saul_q710_03.htm"))
if (event.equals("35184-03.html"))
{
qs.startQuest();
}
else if (event.equals("gesto_q710_03.htm"))
else if (event.equals("30511-03.html"))
{
qs.setCond(3);
}
else if (event.equals("felton_q710_02.htm"))
else if (event.equals("30879-02.html"))
{
qs.setCond(4);
}
else if (event.equals("saul_q710_07.htm"))
else if (event.equals("35184-07.html"))
{
if (castle.getOwner().getLeader().getPlayerInstance() != null)
{
final NpcSay packet = new NpcSay(npc.getObjectId(), ChatType.NPC_SHOUT, npc.getId(), NpcStringId.S1_HAS_BECOME_THE_LORD_OF_THE_TOWN_OF_GIRAN_MAY_THERE_BE_GLORY_IN_THE_TERRITORY_OF_GIRAN);
packet.addStringParameter(player.getName());
npc.broadcastPacket(packet);
/**
* Territory terr = TerritoryWarManager.getInstance().getTerritory(castle.getId()); terr.setLordId(castleOwner.getObjectId()); terr.updateDataInDB(); terr.updateState();
*/
qs.exitQuest(true, true);
}
}
@ -111,19 +108,40 @@ public class Q00710_PathToBecomingALordGiran extends Quest
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
final Castle castle = CastleManager.getInstance().getCastleById(GiranCastle);
final QuestState qs = killer.getQuestState(getName());
if ((qs != null) && qs.isCond(7))
{
if (getQuestItemsCount(killer, GESTOS_BOX) < 300)
{
giveItems(killer, GESTOS_BOX, 1);
}
if (getQuestItemsCount(killer, GESTOS_BOX) >= 300)
{
qs.setCond(8);
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onTalk(Npc npc, PlayerInstance talker)
{
final QuestState qs = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
final Castle castle = CastleManager.getInstance().getCastleById(GIRAN_CASTLE);
if (castle.getOwner() == null)
{
return "Castle has no lord";
return "Castle has no lord.";
}
final PlayerInstance castleOwner = castle.getOwner().getLeader().getPlayerInstance();
switch (npc.getId())
{
case Saul:
case SAUL:
{
if (qs.isCond(0))
{
@ -131,122 +149,102 @@ public class Q00710_PathToBecomingALordGiran extends Quest
{
if (!hasFort())
{
htmltext = "saul_q710_01.htm";
htmltext = "35184-01.html";
}
else
{
htmltext = "saul_q710_00.htm";
htmltext = "35184-00.html";
qs.exitQuest(true);
}
}
else
{
htmltext = "saul_q710_00a.htm";
htmltext = "35184-00a.html";
qs.exitQuest(true);
}
}
else if (qs.isCond(1))
{
qs.setCond(2);
htmltext = "saul_q710_04.htm";
htmltext = "35184-04.html";
}
else if (qs.isCond(2))
{
htmltext = "saul_q710_05.htm";
htmltext = "35184-05.html";
}
else if (qs.isCond(9))
{
htmltext = "saul_q710_06.htm";
htmltext = "35184-06.html";
}
break;
}
case Gesto:
case GESTO:
{
if (qs.isCond(2))
{
htmltext = "gesto_q710_01.htm";
htmltext = "30511-01.html";
}
else if (qs.isCond(3) || qs.isCond(4))
{
htmltext = "gesto_q710_04.htm";
htmltext = "30511-04.html";
}
else if (qs.isCond(5))
{
takeItems(player, FreightChest, -1);
takeItems(talker, FREIGHT_CHESTS_SEAL, -1);
qs.setCond(7);
htmltext = "gesto_q710_05.htm";
htmltext = "30511-05.html";
}
else if (qs.isCond(7))
{
htmltext = "gesto_q710_06.htm";
htmltext = "30511-06.html";
}
else if (qs.isCond(8))
{
takeItems(player, GestoBox, -1);
takeItems(talker, GESTOS_BOX, -1);
qs.setCond(9);
htmltext = "gesto_q710_07.htm";
htmltext = "30511-07.html";
}
else if (qs.isCond(9))
{
htmltext = "gesto_q710_07.htm";
htmltext = "30511-07.html";
}
break;
}
case Felton:
case FELTON:
{
if (qs.isCond(3))
{
htmltext = "felton_q710_01.htm";
htmltext = "30879-01.html";
}
else if (qs.isCond(4))
{
htmltext = "felton_q710_03.htm";
htmltext = "30879-03.html";
}
break;
}
case CargoBox:
case CARGO_BOX:
{
if (qs.isCond(4))
{
qs.setCond(5);
giveItems(player, FreightChest, 1);
htmltext = "box_q710_01.htm";
giveItems(talker, FREIGHT_CHESTS_SEAL, 1);
htmltext = "32243-01.html";
}
else if (qs.isCond(5))
{
htmltext = "box_q710_02.htm";
htmltext = "32243-02.html";
}
break;
}
}
return htmltext;
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isPet)
{
final QuestState qs = killer.getQuestState(getName());
if ((qs != null) && qs.isCond(7))
{
if (getQuestItemsCount(killer, GestoBox) < 300)
{
giveItems(killer, GestoBox, 1);
}
if (getQuestItemsCount(killer, GestoBox) >= 300)
{
qs.setCond(8);
}
}
return null;
}
private boolean hasFort()
{
for (Fort fortress : FortManager.getInstance().getForts())
{
if (fortress.getContractedCastleId() == GiranCastle)
if (fortress.getContractedCastleId() == GIRAN_CASTLE)
{
return true;
}

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Wharf Manager Felton:</font><br>
Why did you come here? We may not be busy now, but soon there will be many ships here.<br>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran felton_q710_02.htm">"I need information about a ship that didn't arrive when it was supposed to."</a>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body><font color="FFFFFF">Chamberlain Saul:</font><br>
Congratulations on your ascension to the lordship of Giran. I trust you will rule wisely and well, my lord.
</body></html>

View File

@ -1,4 +0,0 @@
<html><body><font color="FFFFFF">Chamberlain Saul:</font><br>
My lord, are you content to only occupy Giran Territory, seat of culture and commerce? Would you not wish to make it a better, more prosperous land?<br>
<a action="bypass -h Quest Q00710_PathToBecomingALordGiran saul_q710_02.htm">"Do you think I can rule Giran well?"</a>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body><font color="FFFFFF">Chamberlain Saul:</font><br>
A true lord's power rests on the loyalty and love of his subjects, not the force of his arms. To win the support ncessary to rule this land, you must earn the trust of the local forces. Allow me to gather some information, and I will be able to tell you who to meet. I will return shortly, my lord.
</body></html>

Some files were not shown because too many files have changed in this diff Show More