This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* 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.Q00148_PathtoBecominganExaltedMercenary;
|
||||
|
||||
import quests.Q00147_PathtoBecominganEliteMercenary.Q00147_PathtoBecominganEliteMercenary;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Path to Becoming an Exalted Mercenary (148)
|
||||
* @author Gnacik
|
||||
* @version 2010-09-30 Based on official server Franz
|
||||
*/
|
||||
public class Q00148_PathtoBecominganExaltedMercenary extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int[] MERC =
|
||||
{
|
||||
36481,
|
||||
36482,
|
||||
36483,
|
||||
36484,
|
||||
36485,
|
||||
36486,
|
||||
36487,
|
||||
36488,
|
||||
36489
|
||||
};
|
||||
// Items
|
||||
private static final int ELITE_CERTIFICATE = 13767;
|
||||
private static final int TOP_ELITE_CERTIFICATE = 13768;
|
||||
|
||||
public Q00148_PathtoBecominganExaltedMercenary()
|
||||
{
|
||||
super(148, Q00148_PathtoBecominganExaltedMercenary.class.getSimpleName(), "Path to Becoming an Exalted Mercenary");
|
||||
addStartNpc(MERC);
|
||||
addTalkId(MERC);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = event;
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equalsIgnoreCase("exalted-00b.htm"))
|
||||
{
|
||||
st.giveItems(ELITE_CERTIFICATE, 1);
|
||||
}
|
||||
else if (event.equalsIgnoreCase("exalted-03.htm"))
|
||||
{
|
||||
st.startQuest();
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState st = getQuestState(player, true);
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
QuestState _prev = player.getQuestState(Q00147_PathtoBecominganEliteMercenary.class.getSimpleName());
|
||||
if ((player.getClan() != null) && (player.getClan().getCastleId() > 0))
|
||||
{
|
||||
htmltext = "castle.htm";
|
||||
}
|
||||
else if (st.hasQuestItems(ELITE_CERTIFICATE))
|
||||
{
|
||||
htmltext = "exalted-01.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((_prev != null) && _prev.isCompleted())
|
||||
{
|
||||
htmltext = "exalted-00a.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "exalted-00.htm";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case State.STARTED:
|
||||
if (st.getCond() < 4)
|
||||
{
|
||||
htmltext = "exalted-04.htm";
|
||||
}
|
||||
else if (st.isCond(4))
|
||||
{
|
||||
st.takeItems(ELITE_CERTIFICATE, -1);
|
||||
st.giveItems(TOP_ELITE_CERTIFICATE, 1);
|
||||
st.exitQuest(false);
|
||||
htmltext = "exalted-05.htm";
|
||||
}
|
||||
break;
|
||||
case State.COMPLETED:
|
||||
htmltext = getAlreadyCompletedMsg(player);
|
||||
break;
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
4
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/castle.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/castle.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Captain:<br>
|
||||
Did you come here to spy on us? Leave at once!<br><br>
|
||||
(Members of a clan that owns a castle cannot undertake this quest)
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-00.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-00.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Mercenary Captain:<br>
|
||||
You must have a thick skin to come to me! You know you need a Mercenary Certificate in order to work as a mercenary, right?
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-00a.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-00a.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Captain:<br>
|
||||
You must have a thick skin to come to me! You know you need a Mercenary Certificate in order to work as a mercenary, right?<br>
|
||||
<a action="bypass -h Quest Q00148_PathtoBecominganExaltedMercenary exalted-00b.htm">"Please give me another one."</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-00b.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-00b.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Captain:<br>
|
||||
Here you go. Don't lose it again! Do you think you can become an Exalted Mercenary if you're that careless?<br>
|
||||
<a action="bypass -h Quest Q00148_PathtoBecominganExaltedMercenary exalted-02.htm">"That has nothing to do with becoming an Exalted Mercenary."</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-01.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-01.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Captain:<br>
|
||||
So you came to sign on with us, eh?<br>
|
||||
<a action="bypass -h Quest Q00148_PathtoBecominganExaltedMercenary exalted-02.htm">"I came here to be certified as an Exalted Mercenary." </a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-02.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-02.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Mercenary Captain:<br>
|
||||
An Exalted Mercenary, eh?<br>
|
||||
Do you really think it's that easy? An Exalted Mercenary must demonstrate superior bravery and capability far surpassing those of an ordinary mercenary.<br>
|
||||
Before you can be certified as an Exalted Mercenary, you must prove those qualities.<br>
|
||||
<a action="bypass -h Quest Q00148_PathtoBecominganExaltedMercenary exalted-03.htm">"I'm ready to prove my worth."</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-03.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Captain:<br>
|
||||
Very well. If your will is strong, join our Territory War and slay at least 30 enemies, then destroy 2 of their territory catapults. If you can do that, I'll approve you.<br>
|
||||
If you can't, don't bother me any more with talk of becoming an Exalted Mercenary.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-04.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-04.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Mercenary Captain:<br>
|
||||
You remember what I asked you? If you want to be an Elite Mercenary, slay at least 30 enemies and destroy 2 of the enemy's territory catapults. Any questions?
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-05.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00148_PathtoBecominganExaltedMercenary/exalted-05.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Mercenary Captain:<br>
|
||||
Here is a proof of your Elite mercenary status.
|
||||
</body></html>
|
Reference in New Issue
Block a user