This commit is contained in:
4
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-01.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-01.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
Well now. Do you know about the dragons that appear in <font color="LEVEL">Antharas's Lair</font>?<br>
|
||||
<a action="bypass -h Quest Q00905_RefinedDragonBlood 32864-04.htm">"Well... Not really."</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-02.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-02.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
I suppose you wish to be ripped off soul like me. If not, forget what I said.<br>
|
||||
(Must be above level 83 to do this quest)
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-03.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-03.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
Bring me more of the red and blue liquids.<br>
|
||||
(This quest can be done once a day. This quest gets initialized everyday at 6:30 am.)
|
||||
</body></html>
|
9
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-04.htm
vendored
Normal file
9
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-04.htm
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
When the dragons inside <font color="LEVEL">Antharas's Lair</font> are injured, they bleed two types of liquid.<br>
|
||||
I remember the stories that the adventurers told me about those dragons.<br>
|
||||
That liquid is actually the dragons' blood.<br>
|
||||
If you refine their blood, it can be used by humans.<br>
|
||||
If you collect those liquids and bring them to me, I will refine them for you.<br>
|
||||
But the refined dragon blood can only be used where the dragon's magic power can be felt. But if you would still like them, bring them to me.<br>
|
||||
<a action="bypass -h Quest Q00905_RefinedDragonBlood 32864-05.htm">"I will collect them."</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-05.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-05.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
The liquids that you must bring back can be obtained inside<br>
|
||||
<font color="LEVEL">Antharas's Lair.</font> The blue liquid can be obtained from the <font color="LEVEL">Dragon Guard, Dragon Mage, Dragon Knight, Dragon Knight Warrior, and Elite Dragon Knight.</font> The red liquid can be obtained from the <font color="LEVEL">Drake Leader, Drake Warrior, Drake Scout, and Drake Mage.</font><br>
|
||||
Please bring back <font color="LEVEL">10 red liquids and 10 blue liquids.</font>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-06.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-06.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
In order to conduct the refining, you must bring back <font color="LEVEL">10 Red Liquids and 10 Blue Liquids.</font>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-07.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-07.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
You have collected the required refining amount.<br><br>
|
||||
It takes a little time for the refining, so come back later.
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-08.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-08.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
Two types of refined dragon bloods were made because of the different refining rates. Which will you take?<br>
|
||||
<a action="bypass -h Quest Q00905_RefinedDragonBlood 32864-09.html">Refined Red Dragon Blood</a><br>
|
||||
<a action="bypass -h Quest Q00905_RefinedDragonBlood 32864-10.html">Refined Blue Dragon Blood</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-09.html
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-09.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
You will learn the effect of the <font color="LEVEL">Refined Red Dragon Blood</font> once you have sprinkled it upon yourself and your comrades.<br>
|
||||
It will fill your HP. It will be immediate after you sprinkle it on.<br>
|
||||
Now, about the <font color="LEVEL">Refined Blue Dragon Blood</font>...<br>
|
||||
<a action="bypass -h Quest Q00905_RefinedDragonBlood 32864-10.html">Listen to explanation about <font color="LEVEL">Refined Blue Dragon Blood.</font></a><br>
|
||||
<a action="bypass -h Quest Q00905_RefinedDragonBlood 32864-11.html">"Just give me the <font color="LEVEL">Refined Red Dragon Blood."</font></a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-10.html
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-10.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
You will learn the effect of the <font color="LEVEL">Refined Blue Dragon Blood</font> once you have sprinkled it upon yourself and your comrades.<br>
|
||||
It will fill your mana. It will be immediate after you sprinkle it on.<br>
|
||||
Now, about the <font color="LEVEL">Refined Red Dragon Blood</font>...<br>
|
||||
<a action="bypass -h Quest Q00905_RefinedDragonBlood 32864-09.html">Listen to explanation about <font color="LEVEL">Refined Red Dragon Blood.</font></a><br>
|
||||
<a action="bypass -h Quest Q00905_RefinedDragonBlood 32864-12.html">"Just give me the <font color="LEVEL">Refined Blue Dragon Blood."</font></a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-11.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-11.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
I will give you the <font color="LEVEL">Refined Red Dragon Blood.</font> I hope it can aid you and your comrades.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-12.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/32864-12.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Separated Soul:<br>
|
||||
I will give you the <font color="LEVEL">Refined Blue Dragon Blood.</font> I hope it can aid you and your comrades.
|
||||
</body></html>
|
220
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/Q00905_RefinedDragonBlood.java
vendored
Normal file
220
trunk/dist/game/data/scripts/quests/Q00905_RefinedDragonBlood/Q00905_RefinedDragonBlood.java
vendored
Normal file
@@ -0,0 +1,220 @@
|
||||
/*
|
||||
* 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.Q00905_RefinedDragonBlood;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.enums.QuestType;
|
||||
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;
|
||||
|
||||
/**
|
||||
* Refined Dragon Blood (905)
|
||||
* @author Zoey76
|
||||
*/
|
||||
public final class Q00905_RefinedDragonBlood extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int[] SEPARATED_SOULS =
|
||||
{
|
||||
32864,
|
||||
32865,
|
||||
32866,
|
||||
32867,
|
||||
32868,
|
||||
32869,
|
||||
32870,
|
||||
32891
|
||||
};
|
||||
// Items
|
||||
private static final int UNREFINED_RED_DRAGON_BLOOD = 21913;
|
||||
private static final int UNREFINED_BLUE_DRAGON_BLOOD = 21914;
|
||||
private static final int REFINED_RED_DRAGON_BLOOD = 21903;
|
||||
private static final int REFINED_BLUE_DRAGON_BLOOD = 21904;
|
||||
// Monsters
|
||||
private static final Map<Integer, Integer> MONSTERS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
MONSTERS.put(22844, UNREFINED_BLUE_DRAGON_BLOOD); // Dragon Knight
|
||||
MONSTERS.put(22845, UNREFINED_BLUE_DRAGON_BLOOD); // Dragon Knight
|
||||
MONSTERS.put(22846, UNREFINED_BLUE_DRAGON_BLOOD); // Elite Dragon Knight
|
||||
MONSTERS.put(22847, UNREFINED_RED_DRAGON_BLOOD); // Dragon Knight Warrior
|
||||
MONSTERS.put(22848, UNREFINED_RED_DRAGON_BLOOD); // Drake Leader
|
||||
MONSTERS.put(22849, UNREFINED_RED_DRAGON_BLOOD); // Drake Warrior
|
||||
MONSTERS.put(22850, UNREFINED_RED_DRAGON_BLOOD); // Drake Scout
|
||||
MONSTERS.put(22851, UNREFINED_RED_DRAGON_BLOOD); // Drake Mage
|
||||
MONSTERS.put(22852, UNREFINED_BLUE_DRAGON_BLOOD); // Dragon Guard
|
||||
MONSTERS.put(22853, UNREFINED_BLUE_DRAGON_BLOOD); // Dragon Mage
|
||||
}
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 83;
|
||||
private static final int DRAGON_BLOOD_COUNT = 10;
|
||||
|
||||
public Q00905_RefinedDragonBlood()
|
||||
{
|
||||
super(905, Q00905_RefinedDragonBlood.class.getSimpleName(), "Refined Dragon Blood");
|
||||
addStartNpc(SEPARATED_SOULS);
|
||||
addTalkId(SEPARATED_SOULS);
|
||||
addKillId(MONSTERS.keySet());
|
||||
registerQuestItems(UNREFINED_RED_DRAGON_BLOOD, UNREFINED_BLUE_DRAGON_BLOOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isSummon)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, player, false))
|
||||
{
|
||||
final int itemId = MONSTERS.get(npc.getId());
|
||||
if (st.getQuestItemsCount(itemId) < DRAGON_BLOOD_COUNT)
|
||||
{
|
||||
st.giveItems(itemId, 1);
|
||||
|
||||
if ((st.getQuestItemsCount(UNREFINED_RED_DRAGON_BLOOD) >= DRAGON_BLOOD_COUNT) && (st.getQuestItemsCount(UNREFINED_BLUE_DRAGON_BLOOD) >= DRAGON_BLOOD_COUNT))
|
||||
{
|
||||
st.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
if (player.getLevel() >= MIN_LEVEL)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "32864-04.htm":
|
||||
case "32864-09.html":
|
||||
case "32864-10.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32864-05.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32864-11.html":
|
||||
{
|
||||
st.giveItems(REFINED_RED_DRAGON_BLOOD, 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
st.exitQuest(QuestType.DAILY, true);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32864-12.html":
|
||||
{
|
||||
st.giveItems(REFINED_BLUE_DRAGON_BLOOD, 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
st.exitQuest(QuestType.DAILY, true);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
executeForEachPlayer(killer, npc, isSummon, true, false);
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, true);
|
||||
if (st == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < MIN_LEVEL) ? "32864-02.html" : "32864-01.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (st.getCond())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
htmltext = "32864-06.html";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
if (!st.isSet("wait"))
|
||||
{
|
||||
htmltext = "32864-07.html";
|
||||
st.set("wait", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32864-08.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (!st.isNowAvailable())
|
||||
{
|
||||
htmltext = "32864-03.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.setState(State.CREATED);
|
||||
htmltext = (player.getLevel() < MIN_LEVEL) ? "32864-02.html" : "32864-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user