This commit is contained in:
4
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-00.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-00.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Watcher of Valakas Klein:<br>
|
||||
Hold on a moment. You must be at least "this" experienced before you can take on the thrill ride that is Valakas.<br>
|
||||
(Only characters level 83 or above can take this quest.)
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-01.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-01.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Watcher of Valakas Klein:<br>
|
||||
Well, I'll give you this kid. You've got the skills to take on the Fire Dragon but you don't have the right tools for the task. If you're serious about fighting against Valakas, first go get a "Vacualite Floating Stone".
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-02.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-02.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Watcher of Valakas Klein:<br>
|
||||
Is it hot in here or is it just me? Guess that is what you get when your blood is replaced with pure liquid magma for all eternity.<br>
|
||||
By the expression on your face I can tell you are wondering about Valakas, no? Heard the rumor as of late? No? Ah... you are in for a real treat then. It used to be Valakas was somewhat of a push over, no challenge to any adventurer looking for sport.<br>
|
||||
Valakas has found a way to channel the energy of the Forge of the Gods and increase his power. Now many adventurers go into his lair only never to return. Now you tell me friend... are you ready to play with fire?<br>
|
||||
<a action="bypass -h Quest Q10291_FireDragonDestroyer 31540-03.html">Accept challenge to defeat Valakas.</a>
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-03.html
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-03.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Watcher of Valakas Klein:<br>
|
||||
Ah... so determined I see. Are you sure you are ready to face Valakas? You may wish to reconsider.<br>
|
||||
A thought in my mind, years of being stopped by adventurers like you can do horrible things to a dragon's spirit. Imagine all that pure rage combined with his newly found power... one could only hope that Valakas doesn't like to play with his food.<br>
|
||||
You aren't the first adventurer I've given this speech to. Last chance. Are you sure you are ready?<br>
|
||||
<a action="bypass -h Quest Q10291_FireDragonDestroyer 31540-04.htm">Let's do this!</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-04.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-04.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Watcher of Valakas Klein:<br>
|
||||
I can see that you are determined despite my warnings. I will not try to stop you any further from your haste to find a quick death.<br>
|
||||
However, should you be one of the lucky few to actually survive the encounter with Valakas you will need proof that you have defeated the Fire Dragon.<br>
|
||||
<a action="bypass -h Quest Q10291_FireDragonDestroyer 31540-05.htm">Ask about proof.</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-05.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-05.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Watcher of Valakas Klein:<br>
|
||||
Take this Poor Necklace. By itself it is worthless. However, if combined with the blood of Valakas it will absorb some of his energy into the necklace. The reaction should be instant upon the defeat of Valakas. The necklace will transform into a necklace of value. Bring me this as proof that Valakas has been defeated and you shall be rewarded.<br>
|
||||
You may wish to bring a small-er-very large army with you into Valakas Lair.
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-06.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-06.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Watcher of Valakas Klein:<br>
|
||||
I apologize I think you misunderstood me...<br>
|
||||
Let me restate it to you a bit more clearly. Don't come back until you have DEFEATED Valakas.<br>
|
||||
Return to me once the necklace you carry has the energy of Valakas contained in it.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-07.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-07.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Watcher of Valakas Klein:<br>
|
||||
What? You lost the necklace? How did you lose that necklace? That takes a special type of talent to lose something that cannot be lost.<br>
|
||||
Here... take this spare necklace I have. Do not "lose" this one. It is the only thing that can be used to prove that you have defeated Valakas.
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-08.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-08.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Watcher of Valakas Klein:<br>
|
||||
Impossible! I cannot believe it. No really, I cannot believe it. Usually I'm pretty good about sending adventurers to their death by facing Valakas, but you... just, wow. This is impressive. Soon all across the land will tell stories about the brave... what ever your name is, and how they defeated Valakas.<br>
|
||||
You should feel pretty good about yourself right about now. Too bad it won't last more than 2 weeks. I don't want to rain on your parade, but Valakas is Immortal. Sure you won't see him around for a few days... but he'll be back... mad as ever.<br>
|
||||
In any case, take this. A gift for the time you slew the dragon.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-09.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/31540-09.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Watcher of Valakas Klein:<br>
|
||||
Well if it isn't Mr. Fancy-I-Killed-Valakas-Pants. If I could I would send you into the depths of Valakas lair to stop the Fire Dragon's return and reward you with riches of your success. I really wish I could... not really.<br>
|
||||
(You have already completed this quest.)
|
||||
</body></html>
|
168
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/Q10291_FireDragonDestroyer.java
vendored
Normal file
168
trunk/dist/game/data/scripts/quests/Q10291_FireDragonDestroyer/Q10291_FireDragonDestroyer.java
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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.Q10291_FireDragonDestroyer;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* Fire Dragon Destroyer (10291)
|
||||
* @author malyelfik
|
||||
*/
|
||||
public class Q10291_FireDragonDestroyer extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int KLEIN = 31540;
|
||||
// Monster
|
||||
private static final int VALAKAS = 29028;
|
||||
// Items
|
||||
private static final int FLOATING_STONE = 7267;
|
||||
private static final int POOR_NECKLACE = 15524;
|
||||
private static final int VALOR_NECKLACE = 15525;
|
||||
|
||||
private static final int VALAKAS_SLAYER_CIRCLET = 8567;
|
||||
|
||||
public Q10291_FireDragonDestroyer()
|
||||
{
|
||||
super(10291, Q10291_FireDragonDestroyer.class.getSimpleName(), "Fire Dragon Destroyer");
|
||||
addStartNpc(KLEIN);
|
||||
addTalkId(KLEIN);
|
||||
addKillId(VALAKAS);
|
||||
registerQuestItems(POOR_NECKLACE, VALOR_NECKLACE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
|
||||
if (event.equals("31540-05.htm"))
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(POOR_NECKLACE, 1);
|
||||
}
|
||||
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
if (!player.isInParty())
|
||||
{
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
Function<L2PcInstance, Boolean> rewardCheck = p ->
|
||||
{
|
||||
if (Util.checkIfInRange(8000, npc, p, false))
|
||||
{
|
||||
QuestState st = getQuestState(p, false);
|
||||
|
||||
if ((st != null) && st.isCond(1) && st.hasQuestItems(POOR_NECKLACE))
|
||||
{
|
||||
st.takeItems(POOR_NECKLACE, -1);
|
||||
st.giveItems(VALOR_NECKLACE, 1);
|
||||
st.setCond(2, true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// Rewards go only to command channel, not to a single party or player.
|
||||
if (player.getParty().isInCommandChannel())
|
||||
{
|
||||
player.getParty().getCommandChannel().forEachMember(rewardCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.getParty().forEachMember(rewardCheck);
|
||||
}
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState st = getQuestState(player, true);
|
||||
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getLevel() < 83)
|
||||
{
|
||||
htmltext = "31540-00.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = st.hasQuestItems(FLOATING_STONE) ? "31540-02.htm" : "31540-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
if (st.hasQuestItems(POOR_NECKLACE))
|
||||
{
|
||||
htmltext = "31540-06.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.giveItems(POOR_NECKLACE, 1);
|
||||
htmltext = "31540-07.html";
|
||||
}
|
||||
}
|
||||
else if (st.isCond(2) && st.hasQuestItems(VALOR_NECKLACE))
|
||||
{
|
||||
htmltext = "31540-08.html";
|
||||
st.giveAdena(126549, true);
|
||||
st.addExpAndSp(717291, 77397);
|
||||
st.giveItems(VALAKAS_SLAYER_CIRCLET, 1);
|
||||
st.exitQuest(false, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = "31540-09.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user