This commit is contained in:
5
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-01.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-01.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Guard Coleman:<br>
|
||||
Have you been to the Cemetery?<br>
|
||||
It's a dangerous place, where many monsters roam. The neglect of the kingdom has allowed it to fall into ruins. If we incur our ancestors' wrath, we'll have no one to blame but ourselves. You must use extreme care when you go there. I seriously doubt that you will survive.<br>
|
||||
(This quest can only be undertaken by a character of level 52 or higher.)
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-02.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-02.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Guard Coleman:<br>
|
||||
Have you witnessed the current condition of the Cemetery?<br>
|
||||
The final resting place of kings, aristocrats and heroes has fallen into ruin and been overtaken by hideous monsters. Our neglect tempts our ancestors' wrath.<br>
|
||||
At Captain Kurtiz's direction, we have begun to try to drive out the monsters, but we have not been very effective so far.<br>
|
||||
<a action="bypass -h Quest Q00360_PlunderTheirSupplies 30873-03.htm">"Is there any other way to solve this problem?"</a>
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-03.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-03.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Guard Coleman:<br>
|
||||
Captain Kurtiz says that in order to wipe them out completely, the <font color="LEVEL">Taik Orc seeker and the Taik Orc supply leader</font> must be stopped from giving supplies to the monsters.<br>
|
||||
But alas, our guards are having a hard time dealing with their forces. The captain has ordered me to find someone who can kill them for us.<br>
|
||||
You seem capable of doing it. Are you willing to help us? We will pay you a generous reward.<br>
|
||||
<a action="bypass -h Quest Q00360_PlunderTheirSupplies 30873-04.htm">"I will do my best."</a>
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-04.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-04.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Coleman:<br>
|
||||
I wish you luck. You will be compensated based on the amount of supplies you bring back from the orcs. If you happen to find an important <font color="LEVEL">document</font>, please bring it to me as well. In our current predicament, any amount of enemy intelligence would be very helpful.
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-05.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-05.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Guard Coleman:<br>
|
||||
Why are you still here? Your must subjugate <font color="LEVEL">Taik Orc seekers and Taik Orc supply leaders</font>. You can't go back on your word! You don't intend to do that, do you?<br>
|
||||
<a action="bypass -h Quest Q00360_PlunderTheirSupplies 30873-09.html">"I'll help you, but I expect to be paid very well."</a><br>
|
||||
<a action="bypass -h Quest Q00360_PlunderTheirSupplies 30873-10.html">"I want to quit."</a>
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-06.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-06.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Guard Coleman:<br>
|
||||
Are you finished already? You must be exhausted! Thank you! Here is your reward. This should be more than enough compensation for your work... Do you wish to continue helping me with this mission?<br>
|
||||
<a action="bypass -h Quest Q00360_PlunderTheirSupplies 30873-09.html">"I'll help you, but I must be paid well."</a><br>
|
||||
<a action="bypass -h Quest Q00360_PlunderTheirSupplies 30873-10.html">"Sorry, I can't help you anymore. "</a>
|
||||
</body></html>
|
||||
7
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-07.html
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-07.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Guard Coleman:<br>
|
||||
Are you finished already? You must be exhausted! Thank you! You shall be well compensated.<br>
|
||||
What is this? A document regarding the supplies? I knew it! There is a conspiracy afoot! I must take this to Captain Kurtiz right away! Thank you!<br>
|
||||
Oh yes, I almost forgot. Here is your reward. Here is some extra for the document...<br>
|
||||
<a action="bypass -h Quest Q00360_PlunderTheirSupplies 30873-09.html">"I'll continue to help you."</a><br>
|
||||
<a action="bypass -h Quest Q00360_PlunderTheirSupplies 30873-10.html">"Sorry, I can't help you anymore."</a>
|
||||
</body></html>
|
||||
7
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-08.html
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-08.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Guard Coleman:<br>
|
||||
Are you finished already? You must be exhausted! Thank you! You shall be well compensated.<br>
|
||||
What is this? A document regarding the supplies? I knew it! There is a conspiracy afoot! I must take this to Captain Kurtiz right away! Thank you!<br>
|
||||
Oh yes, I almost forgot. Here is your reward. Here is some extra for the document... Will you continue to help me?<br>
|
||||
<a action="bypass -h Quest Q00360_PlunderTheirSupplies 30873-09.html">"I'll help you, but I expect to be paid handsomely."</a><br>
|
||||
<a action="bypass -h Quest Q00360_PlunderTheirSupplies 30873-10.html">"Sorry, I can't help you any more. "</a>
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-09.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-09.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Coleman:<br>
|
||||
Thank you! I'm sure you will continue to have great results. Bring me any <font color="LEVEL">supplies</font> and <font color="LEVEL">documents</font> you take from the Taik orcs and I will give you a generous reward... Hurry!
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-10.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/30873-10.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Coleman:<br>
|
||||
Ah, yes... I understand... We all have our own path to follow... I shouldn't try to stop you. May a divine blessing shine upon your path from this day forward... But with your abilities, you probably don't even need a blessing. Someday I'm sure your name with be known throughout the kingdom of Aden.
|
||||
</body></html>
|
||||
184
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/Q00360_PlunderTheirSupplies.java
vendored
Normal file
184
trunk/dist/game/data/scripts/quests/Q00360_PlunderTheirSupplies/Q00360_PlunderTheirSupplies.java
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
* 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.Q00360_PlunderTheirSupplies;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Plunder Supplies (360)
|
||||
* @author netvirus
|
||||
*/
|
||||
public final class Q00360_PlunderTheirSupplies extends Quest
|
||||
{
|
||||
// Npc
|
||||
private static final int COLEMAN = 30873;
|
||||
// Misc
|
||||
private static final int MIN_LVL = 52;
|
||||
// Monsters
|
||||
private static final Map<Integer, Integer> MONSTER_DROP_CHANCES = new HashMap<>();
|
||||
// Items
|
||||
private static final int RECIPE_OF_SUPPLY = 5870;
|
||||
private static final int SUPPLY_ITEMS = 5872;
|
||||
private static final int SUSPICIOUS_DOCUMENT_PIECE = 5871;
|
||||
|
||||
static
|
||||
{
|
||||
MONSTER_DROP_CHANCES.put(20666, 50); // Taik Orc Seeker
|
||||
MONSTER_DROP_CHANCES.put(20669, 75); // Taik Orc Supply Leader
|
||||
}
|
||||
|
||||
public Q00360_PlunderTheirSupplies()
|
||||
{
|
||||
super(360, Q00360_PlunderTheirSupplies.class.getSimpleName(), "Plunder Their Supplies");
|
||||
addStartNpc(COLEMAN);
|
||||
addTalkId(COLEMAN);
|
||||
addKillId(MONSTER_DROP_CHANCES.keySet());
|
||||
registerQuestItems(SUPPLY_ITEMS, SUSPICIOUS_DOCUMENT_PIECE, RECIPE_OF_SUPPLY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
String htmltext = null;
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "30873-03.htm":
|
||||
case "30873-09.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "30873-04.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "30873-10.html":
|
||||
{
|
||||
st.exitQuest(false, true);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
|
||||
{
|
||||
final QuestState st = getQuestState(killer, false);
|
||||
if ((st == null) || !Util.checkIfInRange(1500, npc, killer, false))
|
||||
{
|
||||
return super.onKill(npc, killer, isPet);
|
||||
}
|
||||
|
||||
if (getRandom(100) < MONSTER_DROP_CHANCES.get(npc.getId()))
|
||||
{
|
||||
st.giveItems(SUPPLY_ITEMS, 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
if (getRandom(100) < 10)
|
||||
{
|
||||
if (st.getQuestItemsCount(SUSPICIOUS_DOCUMENT_PIECE) < 4)
|
||||
{
|
||||
st.giveItems(SUSPICIOUS_DOCUMENT_PIECE, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.giveItems(RECIPE_OF_SUPPLY, 1);
|
||||
st.takeItems(SUSPICIOUS_DOCUMENT_PIECE, -1);
|
||||
}
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
return super.onKill(npc, killer, isPet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() >= MIN_LVL) ? "30873-02.htm" : "30873-01.html";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
final long supplyCount = st.getQuestItemsCount(SUPPLY_ITEMS);
|
||||
final long recipeCount = st.getQuestItemsCount(RECIPE_OF_SUPPLY);
|
||||
if (supplyCount == 0)
|
||||
{
|
||||
if (recipeCount == 0)
|
||||
{
|
||||
htmltext = "30873-05.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.giveAdena((recipeCount * 6000), true);
|
||||
st.takeItems(RECIPE_OF_SUPPLY, -1);
|
||||
htmltext = "30873-08.html";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (recipeCount == 0)
|
||||
{
|
||||
st.giveAdena(((supplyCount * 100) + 6000), true);
|
||||
st.takeItems(SUPPLY_ITEMS, -1);
|
||||
htmltext = "30873-06.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.giveAdena((((supplyCount * 100) + 6000) + (recipeCount * 6000)), true);
|
||||
st.takeItems(SUPPLY_ITEMS, -1);
|
||||
st.takeItems(RECIPE_OF_SUPPLY, -1);
|
||||
htmltext = "30873-07.html";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user