This commit is contained in:
4
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-101.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-101.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
This land is fertile ground for the materials I need in my dark arts. The problem is, my servants <font color="LEVEL">all have rotten heads</font>! I need someone to give me a hand cultivating the forest.<br>
|
||||
<a action="bypass -h Quest Q00632_NecromancersRequest 31522-104.htm">Quest</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-103.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-103.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
I'm looking for someone whose power is equal to the Lord of the Forest of the Dead! I have many servants, even if their heads are rotten.<br>
|
||||
(Quest may only be undertaken by a character level 63 or above.)
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-104.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-104.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
The most important of the materials I need are undead hearts with their Human memory intact.<br>
|
||||
Especially the grey heart of undead vampires. They're just as good as red cloth from Aden. I need 200 of them.<br>
|
||||
Also, I'll trade you something for undead brains. You can hunt them at night. What do you think?
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-105.html
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-105.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Good, you brought 200 vampire hearts.<br>
|
||||
I'll buy them with Adena, but the undead brains aren't worth much. I'll trade you something else for them.<br>
|
||||
<a action="bypass -h Quest Q00632_NecromancersRequest 31522-202.html">"I'll sell you the vampire hearts."</a><br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 31522">"I'll trade the brains."</a><br>
|
||||
<a action="bypass -h Quest Q00632_NecromancersRequest 31522-204.html">"I want to quit hunting."</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-106.html
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-106.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
You don't have 200 vampire hearts yet.<br>
|
||||
I'll trade you something for the dead's brains though.<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 31522">Trade the dead's brains.</a><br>
|
||||
<a action="bypass -h Quest Q00632_NecromancersRequest 31522-201.html">Continue hunting.</a><br>
|
||||
<a action="bypass -h Quest Q00632_NecromancersRequest 31522-204.html">Stop hunting.</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-201.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-201.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
One more favor. Collect 200 vampire hearts. Also, I'll trade you something for any undead brains you can scoop up.
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-202.html
vendored
Normal file
9
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-202.html
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Come on, that's not enough! Can you imagine how many hearts I need to die a yard of cloth red with blood?<br>
|
||||
Excellent material, equivalent to the red cloth of Aden, but infused with magical power.<br>
|
||||
Please bring me more hearts.<br>
|
||||
I'll trade you for the dead's brains anytime.<br>
|
||||
<a action="bypass -h npc_%objectId%_multisell 31522">Trade the dead's brains.</a><br>
|
||||
<a action="bypass -h Quest Q00632_NecromancersRequest 31522-201.html">Say you'll go and bring more vampire hearts.</a><br>
|
||||
<a action="bypass -h Quest Q00632_NecromancersRequest 31522-204.html">Say you want to quit.</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-203.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-203.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Are you sure you have 200 vampire hearts?<br>
|
||||
Maybe you dropped some.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-204.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/31522-204.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
That'll do.<br>
|
||||
I have enough hearts now.
|
||||
</body></html>
|
194
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/Q00632_NecromancersRequest.java
vendored
Normal file
194
trunk/dist/game/data/scripts/quests/Q00632_NecromancersRequest/Q00632_NecromancersRequest.java
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* 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.Q00632_NecromancersRequest;
|
||||
|
||||
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.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
|
||||
/**
|
||||
* Necromancer's Request (632)
|
||||
* @author Zoey76
|
||||
*/
|
||||
public final class Q00632_NecromancersRequest extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int MYSTERIOUS_WIZARD = 31522;
|
||||
// Items
|
||||
private static final int VAMPIRES_HEART = 7542;
|
||||
private static final int ZOMBIES_BRAIN = 7543;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 63;
|
||||
private static final int REQUIRED_ITEM_COUNT = 200;
|
||||
private static final int ADENA_REWARD = 120000;
|
||||
// Monsters
|
||||
private static final Map<Integer, Double> BRAIN_MONSTERS = new HashMap<>();
|
||||
private static final Map<Integer, Double> HEART_MONSTERS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
BRAIN_MONSTERS.put(21547, 0.565); // Corrupted Knight
|
||||
BRAIN_MONSTERS.put(21548, 0.484); // Resurrected Knight
|
||||
BRAIN_MONSTERS.put(21549, 0.585); // Corrupted Guard
|
||||
BRAIN_MONSTERS.put(21550, 0.597); // Corrupted Guard
|
||||
BRAIN_MONSTERS.put(21551, 0.673); // Resurrected Guard
|
||||
BRAIN_MONSTERS.put(21552, 0.637); // Resurrected Guard
|
||||
BRAIN_MONSTERS.put(21555, 0.575); // Slaughter Executioner
|
||||
BRAIN_MONSTERS.put(21556, 0.560); // Slaughter Executioner
|
||||
BRAIN_MONSTERS.put(21562, 0.631); // Guillotine's Ghost
|
||||
BRAIN_MONSTERS.put(21571, 0.758); // Ghost of Rebellion Soldier
|
||||
BRAIN_MONSTERS.put(21576, 0.647); // Ghost of Guillotine
|
||||
BRAIN_MONSTERS.put(21577, 0.625); // Ghost of Guillotine
|
||||
BRAIN_MONSTERS.put(21579, 0.766); // Ghost of Rebellion Leader
|
||||
|
||||
HEART_MONSTERS.put(21568, 0.452); // Devil Bat
|
||||
HEART_MONSTERS.put(21569, 0.484); // Devil Bat
|
||||
HEART_MONSTERS.put(21573, 0.499); // Atrox
|
||||
HEART_MONSTERS.put(21582, 0.522); // Vampire Soldier
|
||||
HEART_MONSTERS.put(21585, 0.413); // Vampire Magician
|
||||
HEART_MONSTERS.put(21586, 0.496); // Vampire Adept
|
||||
HEART_MONSTERS.put(21587, 0.519); // Vampire Warrior
|
||||
HEART_MONSTERS.put(21588, 0.428); // Vampire Wizard
|
||||
HEART_MONSTERS.put(21589, 0.439); // Vampire Wizard
|
||||
HEART_MONSTERS.put(21590, 0.428); // Vampire Magister
|
||||
HEART_MONSTERS.put(21591, 0.502); // Vampire Magister
|
||||
HEART_MONSTERS.put(21592, 0.370); // Vampire Magister
|
||||
HEART_MONSTERS.put(21593, 0.592); // Vampire Warlord
|
||||
HEART_MONSTERS.put(21594, 0.554); // Vampire Warlord
|
||||
HEART_MONSTERS.put(21595, 0.392); // Vampire Warlord
|
||||
}
|
||||
|
||||
public Q00632_NecromancersRequest()
|
||||
{
|
||||
super(632, Q00632_NecromancersRequest.class.getSimpleName(), "Necromancer's Request");
|
||||
addStartNpc(MYSTERIOUS_WIZARD);
|
||||
addTalkId(MYSTERIOUS_WIZARD);
|
||||
addKillId(BRAIN_MONSTERS.keySet());
|
||||
addKillId(HEART_MONSTERS.keySet());
|
||||
registerQuestItems(VAMPIRES_HEART, ZOMBIES_BRAIN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "31522-104.htm":
|
||||
{
|
||||
if (player.getLevel() >= MIN_LEVEL)
|
||||
{
|
||||
qs.startQuest();
|
||||
qs.setMemoState(11);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31522-201.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "31522-202.html":
|
||||
{
|
||||
if (getQuestItemsCount(player, VAMPIRES_HEART) >= REQUIRED_ITEM_COUNT)
|
||||
{
|
||||
takeItems(player, VAMPIRES_HEART, -1);
|
||||
giveAdena(player, ADENA_REWARD, true);
|
||||
qs.setMemoState(11);
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31522-203.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31522-204.html":
|
||||
{
|
||||
takeItems(player, VAMPIRES_HEART, -1);
|
||||
qs.exitQuest(true, true);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
final QuestState qs = getRandomPartyMemberState(player, -1, 3, npc);
|
||||
if (qs != null)
|
||||
{
|
||||
if (BRAIN_MONSTERS.containsKey(npc.getId()))
|
||||
{
|
||||
qs.giveItemRandomly(npc, ZOMBIES_BRAIN, 1, 0, BRAIN_MONSTERS.get(npc.getId()), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.giveItemRandomly(npc, VAMPIRES_HEART, 1, 0, HEART_MONSTERS.get(npc.getId()), true);
|
||||
|
||||
if (getQuestItemsCount(player, VAMPIRES_HEART) >= REQUIRED_ITEM_COUNT)
|
||||
{
|
||||
qs.setCond(2);
|
||||
qs.setMemoState(12);
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (qs.isCreated())
|
||||
{
|
||||
htmltext = player.getLevel() >= MIN_LEVEL ? "31522-101.htm" : "31522-103.htm";
|
||||
}
|
||||
else if (qs.isStarted())
|
||||
{
|
||||
if (qs.isMemoState(11))
|
||||
{
|
||||
htmltext = "31522-106.html";
|
||||
}
|
||||
else if (qs.isMemoState(12) && (getQuestItemsCount(player, VAMPIRES_HEART) >= REQUIRED_ITEM_COUNT))
|
||||
{
|
||||
htmltext = "31522-105.html";
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user