This commit is contained in:
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-01.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-01.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
I'm in charge of finding skilled soldiers to become brothers in our Golden Ram Mercenary Force! Are you up to the task?<br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam accept">"Accept quest."</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-02.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
I admire your courage, but you lack the required skills to join us.<br>
|
||||
(Quest available only for characters level 66 or above.)
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-03.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-03.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
We are here to destroy the Stakatos in the Swamp of Screams. They're no match for our skills, but they're tough and outnumber us, so we need all the skilled help we can get.<br>
|
||||
You meet the basic requirements, but you must prove yourself if you want to be a member of the Golden Ram Mercenary Force!<br>
|
||||
Kill <font color="LEVEL">Splinter Stakatos, Splinter Stakato Walkers, Splinter Stakato Soldiers and Splinter Stakato Drones</font> and bring back <font color="LEVEL">one-hundred Stakato Chitins</font> to prove your worth.<br>
|
||||
Good luck to you!
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-04.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-04.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
There are two classes here, rookie and elite.<br>
|
||||
An elite mercenary is a veteran with a long record of active service. The title earns you special priviliges.<br>
|
||||
Rookies must kill Needle Stakatos as well as Splinter Stakatos to gain elite status. Collect <font color="LEVEL">one-hundred Chitins each of Splinter Stakatos and Needle Stakatos</font> to earn the title.<br>
|
||||
Show them what you're worth!
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-05.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-05.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
You're already an elite warrior! What more do you want? You are free to choose.<br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam 31554-13.html">"I want to return to the fight!"</a><br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam 31554-12.html">"I want to end our Contract."</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-06.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-06.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
To become an honorable member of the Golden Ram Mercenary Force, you must collect <font color="LEVEL">100 Chitins of Splinter Stakatos</font> from the Swamp of Screams. Now go!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-07.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-07.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
You're back! Have you taught the stakatos a lesson?<br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam 31554-08.html">"Here are the 100 stakato Chitins."</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-08.html
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-08.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
Great work, my soldier! You are fully qualified to become a brother of the Golden Ram Mercenary Force!<br>
|
||||
Well, take this <font color="LEVEL">mark of Golden Ram - Recruit</font>! From now on, you are a brother of the Golden Ram Mercenary Force. Congratulations!<br>
|
||||
But, you must get stronger, stranger, if you want to become an elite soldier! Go into the Swamp of Screams, kill Splinter Stakatos and Needle Stakatos, and collect <font color="LEVEL">100 Chitins each of Splinter Stakatos and Needle Stakatos</font>!<br>
|
||||
If you can't carry out such a task, you will not be able to become the Elite!
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-09.html
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-09.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
To become an elite member of the Golden Ram Mercenary Force, you must collect <font color="LEVEL">100 Chitins each of Splinter Stakatos and Needle Stakatos</font>.<br>
|
||||
Prove your skills and you can rise in the ranks!<br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam 31554-13.html">"I'm ready to fight!"</a><br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam 31554-12.html">"I want to quit."</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-10.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-10.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
Your skills and long record of active service have earned you the title of elite mercenary in the Golden Ram Force!<br>
|
||||
Take this <font color="LEVEL">Golden Ram Badge - Soldier</font>. Congratulations, brother!
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-11.html
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-11.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
See Mercenary Medic Selina and Mercenary Supplier Abercrombie if you need anything.<br>
|
||||
Selina will help you with magic and Abercrombie will help you with supplies.<br>
|
||||
Let me know if you've ever had enough.<br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam 31554-13.html">"I'm ready to fight!"</a><br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam 31554-12.html">"I want to quit."</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-12.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-12.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
It's not easy to become a member. If you quit now, you may regret it later! You'll have to start from the beginning if you come back. Are you sure?<br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam 31554-14.html">"I'm sure."</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-13.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-13.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
That's the spirit! Kill with extreme prejudice in the name of the Golden Ram!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-14.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31554-14.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Kahman:<br>
|
||||
What a pity. We can't afford to lose such skills, but I'll respect your decision.<br>
|
||||
I hope to hear of your great deeds someday. May Pa'agrio's Flame be with you!
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31555-00.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31555-00.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Mercenary Supplier Abercrombie:<br>
|
||||
Jeesh! Why are you turning into such a pain?! Can't you see I'm busy? It's more than enough for me to deal with the mercenaries! I don't have the time to deal with an outsider like you!<br>
|
||||
If you want to serve in our Golden Ram Mercenary force, why don't you go see Kadoon. What a life! What kind of fortune can I make here? Sigh! What a life!<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31555-01.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31555-01.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Mercenary Supplier Abercrombie:<br>
|
||||
Everyone's talking about the excellence you showed in battle again today! You're winning all the bonuses! Ha! It's good to see someone succeed in this godforsaken place!<br>
|
||||
Now tell me! Is there anything in particular you want? Although only a few types of supplies are available, I'll see what I can do. By the way, you prepared a chit didn't you?<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 521">"I want to trade a chit of Golden Ram for an item."</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31555-02.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31555-02.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Mercenary Supplier Abercrombie:<br>
|
||||
Everyone's talking about the excellence you showed in battle again today! You're winning all the bonuses! Ha! It's good to see someone succeed in this godforsaken place!<br>
|
||||
Now tell me! Is there anything in particular you want? Although only a few types of supplies are available, I'll see what I can do. By the way, you prepared a chit didn't you?<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 526">"I want to trade a chit of Golden Ram for an item."</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31556-00.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31556-00.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mercenary Medic Selina:<br>
|
||||
Hey, you're not my boyfriend! You don't even belong to the Golden Ram Mercenary force! Get away from me!<br>
|
||||
If you want to join our force go talk to that rough-looking Orc over there.
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31556-01.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31556-01.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Mercenary Medic Selina:<br>
|
||||
Huh? Have you joined us? Excellent!<br>
|
||||
My name's Selina. I'm a medic. Welcome aboard!<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31556-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31556-02.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Mercenary Medic Selina:<br>
|
||||
Listen up! Your bravery is admirable, but you must take better care of yourself! I actually felt sorry for you when you came in so mangled!<br>
|
||||
But don't get me wrong, you did a great job! You really raised morale around here! I'd like to offer you some magical assistance. Let me know if you need anything.<br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Please give me some buff.</a>
|
||||
</body></html>
|
10
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31556-03.htm
vendored
Normal file
10
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31556-03.htm
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<html><body>Mercenary Medic Selina:<br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam Focus">Focus: Requires 2 Golden Ram Coins</a><br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam Death">Death Whisper: Requires 2 Golden Ram Coins</a><br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam Might">Might: Requires 3 Golden Ram Coins</a><br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam Acumen">Acumen: Requires 3 Golden Ram Coins</a><br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam Berserker">Berserker: Requires 3 Golden Ram Coins</a><br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam Vampiric">Vampiric Rage: Requires 3 Golden Ram Coins</a><br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam Empower">Empower: Requires 6 Golden Ram Coins</a><br>
|
||||
<a action="bypass -h Quest Q00628_HuntGoldenRam Haste">Haste: Requires 6 Golden Ram Coins</a><br>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31556-04.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/31556-04.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Mercenary Medic Selina:<br>
|
||||
You don't have required items.
|
||||
</body></html>
|
356
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/Q00628_HuntGoldenRam.java
vendored
Normal file
356
trunk/dist/game/data/scripts/quests/Q00628_HuntGoldenRam/Q00628_HuntGoldenRam.java
vendored
Normal file
@@ -0,0 +1,356 @@
|
||||
/*
|
||||
* 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.Q00628_HuntGoldenRam;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.ItemChanceHolder;
|
||||
import com.l2jserver.gameserver.model.holders.QuestItemHolder;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Hunt of the Golden Ram Mercenary Force (628)
|
||||
* @author netvirus
|
||||
*/
|
||||
public final class Q00628_HuntGoldenRam extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int KAHMAN = 31554;
|
||||
private static final int ABERCROMBIE = 31555;
|
||||
private static final int SELINA = 31556;
|
||||
// Items
|
||||
private static final int GOLDEN_RAM_COIN = 7251;
|
||||
private static final int BADGE_RECRUIT = 7246;
|
||||
private static final int BADGE_SOLDIER = 7247;
|
||||
private static final int SPLINTER_STAKATO_CHITIN = 7248;
|
||||
private static final int NEEDLE_STAKATO_CHITIN = 7249;
|
||||
// Misc
|
||||
private static final int REQUIRED_ITEM_COUNT = 100;
|
||||
private static final int MIN_LVL = 66;
|
||||
// Mobs
|
||||
private static final Map<Integer, ItemChanceHolder> MOBS_DROP_CHANCES = new HashMap<>();
|
||||
// Buffs
|
||||
private static final Map<String, QuestItemHolder> BUFFS = new HashMap<>();
|
||||
|
||||
static
|
||||
{
|
||||
MOBS_DROP_CHANCES.put(21508, new ItemChanceHolder(SPLINTER_STAKATO_CHITIN, 0.500, 1)); // splinter_stakato
|
||||
MOBS_DROP_CHANCES.put(21509, new ItemChanceHolder(SPLINTER_STAKATO_CHITIN, 0.430, 1)); // splinter_stakato_worker
|
||||
MOBS_DROP_CHANCES.put(21510, new ItemChanceHolder(SPLINTER_STAKATO_CHITIN, 0.521, 1)); // splinter_stakato_soldier
|
||||
MOBS_DROP_CHANCES.put(21511, new ItemChanceHolder(SPLINTER_STAKATO_CHITIN, 0.575, 1)); // splinter_stakato_drone
|
||||
MOBS_DROP_CHANCES.put(21512, new ItemChanceHolder(SPLINTER_STAKATO_CHITIN, 0.746, 1)); // splinter_stakato_drone_a
|
||||
MOBS_DROP_CHANCES.put(21513, new ItemChanceHolder(NEEDLE_STAKATO_CHITIN, 0.500, 2)); // needle_stakato
|
||||
MOBS_DROP_CHANCES.put(21514, new ItemChanceHolder(NEEDLE_STAKATO_CHITIN, 0.430, 2)); // needle_stakato_worker
|
||||
MOBS_DROP_CHANCES.put(21515, new ItemChanceHolder(NEEDLE_STAKATO_CHITIN, 0.520, 2)); // needle_stakato_soldier
|
||||
MOBS_DROP_CHANCES.put(21516, new ItemChanceHolder(NEEDLE_STAKATO_CHITIN, 0.531, 2)); // needle_stakato_drone
|
||||
MOBS_DROP_CHANCES.put(21517, new ItemChanceHolder(NEEDLE_STAKATO_CHITIN, 0.744, 2)); // needle_stakato_drone_a
|
||||
|
||||
BUFFS.put("Focus", new QuestItemHolder(4404, 2, 2)); // (buff_id, buff_level, buff_cost)
|
||||
BUFFS.put("Death", new QuestItemHolder(4405, 2, 2));
|
||||
BUFFS.put("Might", new QuestItemHolder(4393, 3, 3));
|
||||
BUFFS.put("Acumen", new QuestItemHolder(4400, 2, 3));
|
||||
BUFFS.put("Berserker", new QuestItemHolder(4397, 1, 3));
|
||||
BUFFS.put("Vampiric", new QuestItemHolder(4399, 2, 3));
|
||||
BUFFS.put("Empower", new QuestItemHolder(4401, 1, 6));
|
||||
BUFFS.put("Haste", new QuestItemHolder(4402, 2, 6));
|
||||
}
|
||||
|
||||
public Q00628_HuntGoldenRam()
|
||||
{
|
||||
super(628, Q00628_HuntGoldenRam.class.getSimpleName(), "Hunt of the Golden Ram Mercenary Force");
|
||||
addStartNpc(KAHMAN);
|
||||
addTalkId(KAHMAN, SELINA);
|
||||
addFirstTalkId(ABERCROMBIE, SELINA);
|
||||
addKillId(MOBS_DROP_CHANCES.keySet());
|
||||
registerQuestItems(SPLINTER_STAKATO_CHITIN, NEEDLE_STAKATO_CHITIN, BADGE_RECRUIT, BADGE_SOLDIER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
String htmltext = null;
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "accept":
|
||||
{
|
||||
if (qs.isCreated())
|
||||
{
|
||||
final boolean itemRecruit = hasQuestItems(player, BADGE_RECRUIT);
|
||||
final boolean itemSoldier = hasQuestItems(player, BADGE_SOLDIER);
|
||||
qs.startQuest();
|
||||
if (itemSoldier)
|
||||
{
|
||||
htmltext = "31554-05.htm";
|
||||
qs.setCond(3);
|
||||
}
|
||||
else if (itemRecruit)
|
||||
{
|
||||
htmltext = "31554-04.htm";
|
||||
qs.setCond(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31554-03.htm";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31554-08.html":
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
giveItems(player, BADGE_RECRUIT, 1);
|
||||
takeItems(player, SPLINTER_STAKATO_CHITIN, -1);
|
||||
qs.setCond(2, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31554-12.html":
|
||||
case "31554-13.html":
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31554-14.html":
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
qs.exitQuest(true, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "Focus":
|
||||
case "Death":
|
||||
case "Might":
|
||||
case "Acumen":
|
||||
case "Berserker":
|
||||
case "Vampiric":
|
||||
case "Empower":
|
||||
case "Haste":
|
||||
{
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
final QuestItemHolder buffs = BUFFS.get(event);
|
||||
if (getQuestItemsCount(player, GOLDEN_RAM_COIN) >= buffs.getCount())
|
||||
{
|
||||
takeItems(player, GOLDEN_RAM_COIN, buffs.getCount());
|
||||
npc.setTarget(player);
|
||||
npc.doCast(SkillData.getInstance().getSkill(buffs.getId(), buffs.getChance()));
|
||||
htmltext = "31556-03.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31556-04.htm";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = null;
|
||||
if (qs == null)
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case ABERCROMBIE:
|
||||
{
|
||||
htmltext = "31555-00.htm";
|
||||
break;
|
||||
}
|
||||
case SELINA:
|
||||
{
|
||||
htmltext = "31556-00.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
final boolean itemRecruit = hasQuestItems(player, BADGE_RECRUIT);
|
||||
final boolean itemSolder = hasQuestItems(player, BADGE_SOLDIER);
|
||||
switch (npc.getId())
|
||||
{
|
||||
case ABERCROMBIE:
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
if (itemRecruit)
|
||||
{
|
||||
htmltext = "31555-01.htm";
|
||||
}
|
||||
else if (itemSolder)
|
||||
{
|
||||
htmltext = "31555-02.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31555-00.htm";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SELINA:
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
if (itemRecruit)
|
||||
{
|
||||
htmltext = "31556-01.htm";
|
||||
}
|
||||
else if (itemSolder)
|
||||
{
|
||||
htmltext = "31556-02.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31556-00.htm";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
QuestState qs = getRandomPartyMemberState(killer, -1, 1, npc);
|
||||
if (qs != null)
|
||||
{
|
||||
final ItemChanceHolder item = MOBS_DROP_CHANCES.get(npc.getId());
|
||||
if ((item.getCount() <= qs.getCond()) && !qs.isCond(3))
|
||||
{
|
||||
giveItemRandomly(qs.getPlayer(), npc, item.getId(), 1, REQUIRED_ITEM_COUNT, item.getChance(), true);
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (npc.getId())
|
||||
{
|
||||
case KAHMAN:
|
||||
{
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = ((player.getLevel() >= MIN_LVL) ? "31554-01.htm" : "31554-02.htm");
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
final long itemCountSplinter = getQuestItemsCount(player, SPLINTER_STAKATO_CHITIN);
|
||||
final long itemCountNeedle = getQuestItemsCount(player, NEEDLE_STAKATO_CHITIN);
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
htmltext = ((itemCountSplinter >= REQUIRED_ITEM_COUNT) ? "31554-07.html" : "31554-06.html");
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
if (hasQuestItems(player, BADGE_RECRUIT))
|
||||
{
|
||||
if ((itemCountSplinter >= REQUIRED_ITEM_COUNT) && (itemCountNeedle >= REQUIRED_ITEM_COUNT))
|
||||
{
|
||||
takeItems(player, BADGE_RECRUIT, -1);
|
||||
takeItems(player, SPLINTER_STAKATO_CHITIN, -1);
|
||||
takeItems(player, NEEDLE_STAKATO_CHITIN, -1);
|
||||
giveItems(player, BADGE_SOLDIER, 1);
|
||||
qs.setCond(3, true);
|
||||
htmltext = "31554-10.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31554-09.html";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.setCond(1);
|
||||
htmltext = ((itemCountSplinter >= REQUIRED_ITEM_COUNT) ? "31554-07.html" : "31554-06.html");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
if (hasQuestItems(player, BADGE_SOLDIER))
|
||||
{
|
||||
htmltext = "31554-11.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.setCond(1);
|
||||
htmltext = ((itemCountSplinter >= REQUIRED_ITEM_COUNT) ? "31554-07.html" : "31554-06.html");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SELINA:
|
||||
{
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
htmltext = "31556-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user