This commit is contained in:
6
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-01.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-01.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Karuda:<br>
|
||||
Greetings, and welcome! We are the followers of Pa'agrio, as we are fated to be. Are you free to help us?<br>
|
||||
This is the graveyard of a lost tribe, but grave robbers seek to plunder the burial grounds within. And thus, the spirits of the dead have become restless.<br>
|
||||
We have decided to drive the grave robbers from this place, but we're short of capable hands and need your help. Can you help us?<br>
|
||||
<a action="bypass -h Quest Q00644_GraveRobberAnnihilation 32017-03.htm">How can I help you?</a>
|
||||
</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-02.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Karuda:<br>
|
||||
Greetings, and welcome... but what has brought you to such a dangerous place?<br>
|
||||
(Only characters above level 20 can perform this quest.)
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-03.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-03.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Karuda:<br>
|
||||
My investigation confirms that the grave robbers plundered <font color="LEVEL">almost 120</font> graves. If you defeat them and bring back the <font color="LEVEL">stolen Orcish burial goods</font>, I will give you a reward. I have heard that the grave robbers' hideout is based in the south. Best of luck to you.
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-04.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-04.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Karuda:<br>
|
||||
Have you recovered all of the stolen burial goods? Swift work! I think you must have had the blessings of Pa'agrio!<br>
|
||||
Please return the burial goods to me. I will see to their proper disposition.<br>
|
||||
<a action="bypass -h Quest Q00644_GraveRobberAnnihilation 32017-06.html">Hand over the burial goods.</a>
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-05.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-05.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Karuda:<br>
|
||||
We have confirmed that grave robbers plundered almost 120 graves. If you defeat them and bring back all of the <font color="LEVEL">stolen Orcish burial goods</font>, I will give you a reward. I have heard that the grave robbers' hideout is based in the south. Best of luck.
|
||||
</body></html>
|
||||
9
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-06.html
vendored
Normal file
9
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-06.html
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><body>Karuda:<br>
|
||||
Yes, I certify that these are all of the stolen items. I shall reward you for your hard work as best I can. I don't have much to give you, but I can give you your choice of:<br>
|
||||
<a action="bypass -h Quest Q00644_GraveRobberAnnihilation varnish">Varnish</a><br>
|
||||
<a action="bypass -h Quest Q00644_GraveRobberAnnihilation animalskin">Animal Skin</a><br>
|
||||
<a action="bypass -h Quest Q00644_GraveRobberAnnihilation animalbone">Animal Bone</a><br>
|
||||
<a action="bypass -h Quest Q00644_GraveRobberAnnihilation charcoal">Charcoal</a><br>
|
||||
<a action="bypass -h Quest Q00644_GraveRobberAnnihilation coal">Coal</a><br>
|
||||
<a action="bypass -h Quest Q00644_GraveRobberAnnihilation ironore">Iron Ore</a>
|
||||
</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-07.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-07.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Karuda:<br>
|
||||
Here, and may Pa'agrio bless and protect you!<br>
|
||||
Perhaps we will meet again, if it is His will.
|
||||
</body></html>
|
||||
@@ -0,0 +1,166 @@
|
||||
/*
|
||||
* 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.Q00644_GraveRobberAnnihilation;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.ItemHolder;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Grave Robber Annihilation (644)
|
||||
* @author netvirus
|
||||
*/
|
||||
public final class Q00644_GraveRobberAnnihilation extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int KARUDA = 32017;
|
||||
// Item
|
||||
private static final int ORC_GOODS = 8088;
|
||||
// Misc
|
||||
private static final int MIN_LVL = 20;
|
||||
private static final int ORC_GOODS_REQUIRED_COUNT = 120;
|
||||
// Monsters
|
||||
private static final Map<Integer, Double> MONSTER_DROP_CHANCES = new HashMap<>();
|
||||
// Rewards
|
||||
private static final Map<String, ItemHolder> REWARDS = new HashMap<>();
|
||||
|
||||
static
|
||||
{
|
||||
MONSTER_DROP_CHANCES.put(22003, 0.714); // Grave Robber Scout
|
||||
MONSTER_DROP_CHANCES.put(22004, 0.841); // Grave Robber Lookout
|
||||
MONSTER_DROP_CHANCES.put(22005, 0.778); // Grave Robber Ranger
|
||||
MONSTER_DROP_CHANCES.put(22006, 0.746); // Grave Robber Guard
|
||||
MONSTER_DROP_CHANCES.put(22008, 0.810); // Grave Robber Fighter
|
||||
|
||||
REWARDS.put("varnish", new ItemHolder(1865, 30)); // Varnish
|
||||
REWARDS.put("animalskin", new ItemHolder(1867, 40)); // Animal Skin
|
||||
REWARDS.put("animalbone", new ItemHolder(1872, 40)); // Animal Bone
|
||||
REWARDS.put("charcoal", new ItemHolder(1871, 30)); // Charcoal
|
||||
REWARDS.put("coal", new ItemHolder(1870, 30)); // Coal
|
||||
REWARDS.put("ironore", new ItemHolder(1869, 30)); // Iron Ore
|
||||
}
|
||||
|
||||
public Q00644_GraveRobberAnnihilation()
|
||||
{
|
||||
super(644, Q00644_GraveRobberAnnihilation.class.getSimpleName(), "Grave Robber Annihilation");
|
||||
addStartNpc(KARUDA);
|
||||
addTalkId(KARUDA);
|
||||
addKillId(MONSTER_DROP_CHANCES.keySet());
|
||||
registerQuestItems(ORC_GOODS);
|
||||
}
|
||||
|
||||
@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 "32017-03.htm":
|
||||
{
|
||||
if (st.isCreated())
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "32017-06.html":
|
||||
{
|
||||
if (st.isCond(2) && (st.getQuestItemsCount(ORC_GOODS) >= ORC_GOODS_REQUIRED_COUNT))
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "varnish":
|
||||
case "animalskin":
|
||||
case "animalbone":
|
||||
case "charcoal":
|
||||
case "coal":
|
||||
case "ironore":
|
||||
{
|
||||
if (st.isCond(2))
|
||||
{
|
||||
final ItemHolder reward = REWARDS.get(event);
|
||||
st.rewardItems(reward.getId(), reward.getCount());
|
||||
st.exitQuest(true, true);
|
||||
htmltext = "32017-07.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState qs = getRandomPartyMemberState(killer, 1, 3, npc);
|
||||
if ((qs != null) && qs.giveItemRandomly(npc, ORC_GOODS, 1, ORC_GOODS_REQUIRED_COUNT, MONSTER_DROP_CHANCES.get(npc.getId()), true))
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@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) ? "32017-01.htm" : "32017-02.htm");
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (st.isCond(2) && (st.getQuestItemsCount(ORC_GOODS) >= ORC_GOODS_REQUIRED_COUNT))
|
||||
{
|
||||
htmltext = "32017-04.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32017-05.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user