Quest Strange Things Afoot in the Valley (10799).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev 2016-05-02 19:51:15 +00:00
parent 1755dc6d32
commit b694d05def
13 changed files with 260 additions and 1 deletions

View File

@ -0,0 +1,5 @@
<html><body>Namo:<br>
I'm sure you know about the dimensional rifts appearing all over Dragon Valley. The dragons have become very much weakened in recent days.<br>
The reduction of the dragons' strength and other dangers to us is a good thing, but there's also a problem. The dragons may be weakened, but there's been activity from them as a group, and this will grow into a huge problem.<br>And that's not all...<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10799_StrangeThingsAfootInTheValley 33973-02.htm">"What other problems are there?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Namo:<br>
Currently, the <font color="LEVEL">dragons</font> are active during the <font color="LEVEL">day</font> while the <font color="LEVEL">Undead</font> are up to no good at <font color="LEVEL">night</font>.<br>On top of that, we don't know which dimensional rifts are connected to which dimensions or what else we'll learn from Dragon Valley and that's a problem.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10799_StrangeThingsAfootInTheValley 33973-03.htm">"Is there a solution to all this?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Namo:<br>
We don't have any clear answers at the moment.<br>First, you and other Ertheia are to explore deep within Dragon Valley while we will continuously dispatching expeditions to find the reason and investigate current happenings.<br>
But, we can't be just content with this, and are continuously seeking help.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10799_StrangeThingsAfootInTheValley 33973-04.htm">"What kind of help do you need?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Namo:<br>
The southern region is generally more dangerous than the north.<br>
So for now, I want to send you to the less dangerous region to reduce the number of dragons and Undead there. On the north side of Dragon Valley, you'll find <font color="LEVEL">Mesmer Dragon, Gargoyle Dragon, Black Dragon, Emerald Dragon, Sand Dragon, Dragonblood Captain, Dragonblood Minion, Cave Servant Archer, Cave Servant Warrior, Metal Cave Servant, Iron Cave Servant, and Headless Knight</font>. You need to slay <font color="LEVEL">100</font> of them.<br>Until we can figure out where they're coming from and how to fix the situation, we're just going to have to try and remove the danger some other way.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Namo:<br>
I don't think you're done catching all your monsters.
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Namo:<br>
I think you got all the dragons and Undead.<br>
Thank you. The changes in Dragon Valley were so unusual that everyone was just nervous all the time.<br>
If you were curious about the dimensional rifts in Dragon Valley, you can join us when we go investigating the next time.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10799_StrangeThingsAfootInTheValley 33973-07.html">"Sure, I'll join you."</Button>
</body></html>

View File

@ -0,0 +1,10 @@
<html><body>Namo:<br>
Got it. We're going to start investigating soon. I'll let you know when we start.<br>
Here's your reward for helping. What would you like as your reward?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10799_StrangeThingsAfootInTheValley fire">30 Fire Stones</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10799_StrangeThingsAfootInTheValley water">30 Water Stones</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10799_StrangeThingsAfootInTheValley earth">30 Earth Stones</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10799_StrangeThingsAfootInTheValley wind">30 Wind Stones</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10799_StrangeThingsAfootInTheValley dark">30 Dark Stones</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10799_StrangeThingsAfootInTheValley holy">30 Holy Stones</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Namo:<br>
All right, here you go. I'll be giving you other helpful items aside from these. Thank you again for helping me.
</body></html>

View File

@ -0,0 +1,211 @@
/*
* This file is part of the L2J Mobius project.
*
* This program 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.
*
* This program 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.Q10799_StrangeThingsAfootInTheValley;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
import com.l2jmobius.gameserver.util.Util;
/**
* Strange Things Afoot in the Valley (10799)
* @URL https://l2wiki.com/Strange_Things_Afoot_in_the_Valley
* @author Gigi
*/
public class Q10799_StrangeThingsAfootInTheValley extends Quest
{
// NPCs
private static final int NAMO = 33973;
// Monsters
private static final int MOB_1 = 23423; // Mesmer Dragon
private static final int MOB_2 = 23424; // Gargoyle Dragon
private static final int MOB_3 = 23425; // Black Dragon
private static final int MOB_4 = 23427; // Sand Dragon
private static final int MOB_5 = 23428; // Captain Dragonblood
private static final int MOB_6 = 23429; // Minion Dragonblood
private static final int MOB_7 = 23436; // Cave Servant Archer
private static final int MOB_8 = 23437; // Cave Servant Warrior
private static final int MOB_9 = 23438; // Metallic Cave Servant
private static final int MOB_10 = 23439; // Iron Cave Servant
private static final int MOB_11 = 23440; // Headless Knight
// Items
private static final ItemHolder STEEL_DOOR_GUILD = new ItemHolder(37045, 196);
private static final ItemHolder EAS = new ItemHolder(960, 5);
private static final ItemHolder FIRE_STONE = new ItemHolder(9546, 30);
private static final ItemHolder WATER_STONE = new ItemHolder(9547, 30);
private static final ItemHolder EARTH_STONE = new ItemHolder(9548, 30);
private static final ItemHolder WIND_STONE = new ItemHolder(9549, 30);
private static final ItemHolder DARK_STONE = new ItemHolder(9550, 30);
private static final ItemHolder HOLY_STONE = new ItemHolder(9551, 30);
// Reward
private static final int EXP_REWARD = 76658400;
private static final int SP_REWARD = 18398;
// Misc
private static final int MIN_LEVEL = 76;
private static final int MAX_LEVEL = 85;
public Q10799_StrangeThingsAfootInTheValley()
{
super(10799, Q10799_StrangeThingsAfootInTheValley.class.getSimpleName(), "Strange Things Afoot in the Valley");
addStartNpc(NAMO);
addTalkId(NAMO);
addKillId(MOB_1, MOB_2, MOB_3, MOB_4, MOB_5, MOB_6, MOB_7, MOB_8, MOB_9, MOB_10, MOB_11);
addCondRace(Race.ERTHEIA, "noErtheia.html");
addCondLevel(MIN_LEVEL, MAX_LEVEL, "no_level.html");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
switch (event)
{
case "33973-02.htm":
case "33973-03.htm":
case "33973-07.html":
{
htmltext = event;
break;
}
case "33973-04.htm":
{
qs.startQuest();
qs.set(Integer.toString(MOB_1), 0);
htmltext = event;
break;
}
case "fire":
{
addExpAndSp(player, EXP_REWARD, SP_REWARD);
giveItems(player, STEEL_DOOR_GUILD);
giveItems(player, EAS);
giveItems(player, FIRE_STONE);
qs.exitQuest(false, true);
htmltext = "33973-08.html";
break;
}
case "water":
{
addExpAndSp(player, EXP_REWARD, SP_REWARD);
giveItems(player, STEEL_DOOR_GUILD);
giveItems(player, EAS);
giveItems(player, WATER_STONE);
qs.exitQuest(false, true);
htmltext = "33973-08.html";
break;
}
case "earth":
{
addExpAndSp(player, EXP_REWARD, SP_REWARD);
giveItems(player, STEEL_DOOR_GUILD);
giveItems(player, EAS);
giveItems(player, EARTH_STONE);
qs.exitQuest(false, true);
htmltext = "33973-08.html";
break;
}
case "wind":
{
addExpAndSp(player, EXP_REWARD, SP_REWARD);
giveItems(player, STEEL_DOOR_GUILD);
giveItems(player, EAS);
giveItems(player, WIND_STONE);
qs.exitQuest(false, true);
htmltext = "33973-08.html";
break;
}
case "dark":
{
addExpAndSp(player, EXP_REWARD, SP_REWARD);
giveItems(player, STEEL_DOOR_GUILD);
giveItems(player, EAS);
giveItems(player, DARK_STONE);
qs.exitQuest(false, true);
htmltext = "33973-08.html";
break;
}
case "holy":
{
addExpAndSp(player, EXP_REWARD, SP_REWARD);
giveItems(player, STEEL_DOOR_GUILD);
giveItems(player, EAS);
giveItems(player, HOLY_STONE);
qs.exitQuest(false, true);
htmltext = "33973-08.html";
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (qs.isCreated())
{
htmltext = "33973-01.htm";
}
else if ((qs.isStarted()) && (qs.isCond(1)))
{
htmltext = "33973-05.html";
}
else if (qs.isCond(2))
{
htmltext = "33973-06.html";
}
else if (qs.isCompleted())
{
htmltext = getAlreadyCompletedMsg(player);
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
if ((qs != null) && qs.isCond(1) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
{
int kills = qs.getInt(Integer.toString(MOB_1));
kills++;
qs.set(Integer.toString(MOB_1), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (kills >= 100)
{
qs.setCond(2, true);
}
final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
log.addNpcString(NpcStringId.KILL_MONSTERS_IN_THE_DRAGON_VALLEY, kills);
killer.sendPacket(log);
}
return super.onKill(npc, killer, isSummon);
}
}

View File

@ -0,0 +1,3 @@
<html><body>High Priest Orven:<br>
You are not Ertheia, this quest is not for you.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>You don't meet level requirements<br>
(Quest available from level 76 - 85)
</body></html>

View File

@ -298,6 +298,7 @@ import quests.Q10791_TheManOfMystery.Q10791_TheManOfMystery;
import quests.Q10792_LettersFromTheQueen_ForestOfTheDead.Q10792_LettersFromTheQueen_ForestOfTheDead;
import quests.Q10795_LettersFromTheQueen_WallOfAgros.Q10795_LettersFromTheQueen_WallOfAgros;
import quests.Q10798_LettersFromTheQueen_DragonValley.Q10798_LettersFromTheQueen_DragonValley;
import quests.Q10799_StrangeThingsAfootInTheValley.Q10799_StrangeThingsAfootInTheValley;
/**
* @author NosBit
@ -586,7 +587,8 @@ final class QuestMasterHandler
Q10791_TheManOfMystery.class,
Q10792_LettersFromTheQueen_ForestOfTheDead.class,
Q10795_LettersFromTheQueen_WallOfAgros.class,
Q10798_LettersFromTheQueen_DragonValley.class
Q10798_LettersFromTheQueen_DragonValley.class,
Q10799_StrangeThingsAfootInTheValley.class
};
public static void main(String[] args)