Quest Sakum's Influence (10337).

Contributed by spider.
This commit is contained in:
MobiusDev
2015-08-05 19:07:09 +00:00
parent 617d6f4281
commit dd0f015208
13 changed files with 304 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<html><body>Adventurer Guildsman:<br>
Have you head the news?<br>
The hunt for <font color="LEVEL">Sakum</font> is coming to an end. After the escape from Ye Sagira, Sakum has been chased from Windmill Hill and Ruins of Agony. It is running out of places to run!<br>
Hahaha!<br>
<button align=LEFT icon=NORMAL action="bypass -h Quest Q10337_SakumsImpact 31795-02.htm">"Can it be captured?"</button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Adventurer Guildsman:<br>
In all things, you must keep a positive outlook... tell yourself that we CAN do this.<br>
Capturing Sakum isn't an easy task. All we have so far are rumors and conflicting information on what the creature looks like now. Anyone who has actually seen the beast can't give us an accurate sketch of the creature that doesn't look like it was done by a 4-year-old child with a broken hand. So we haven't been able to make accurate wanted posters for the thing.<br>
it would be helpful if you can find me anything we can use to get an accurate image of the beast. Think you can do this?
<button align=LEFT icon=NORMAL action="bypass -h Quest Q10337_SakumsImpact 31795-03.htm">Agree to help.</button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Adventure Guildsman:<br>
I'm glad to hear you will help us. I hear that Guard Silvan has seen <font color="LEVEL">Sakum</font> near the <font color="LEVEL">Ruins of Despair</font> which seems to have caused the monsters in the area to rage out of control.<br>
Travel to the Ruins of Despair and speak with <font color="LEVEL">Guard Silvan</font>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Adventure Guildsman:<br>
Why are you still here? Go to the <font color="LEVEL">Ruins of Despair</font>.
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Guard Silvan:<br>
I remember when the sky used to be clear but now it is cloudy and never rains...<br>
I wonder what it means...?<br>
Sorry, I tend to ramble when I haven't slept for days. What brings you to this dismal place?<br>
<button align=LEFT icon=NORMAL action="bypass -h Quest Q10337_SakumsImpact 33178-02.html">"A sketch of Sakum."</button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Guard Silvan:<br>
Sakum? Yes, that creature has been sighted in the Ruins of Despair.<br>
Why do you think I haven't been able to sleep in days? I'm afraid I can't help you with your task... I can barely swing my sword properly.<br>
Additionally, my guards need to defend this location so I can't send anyone to assist you.<br>
<button align=LEFT icon=NORMAL action="bypass -h Quest Q10337_SakumsImpact 33178-03.html">"Don't worry about it."</button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Guard Silvan:<br>
Tell you what, if all you need is a sketch of Sakum, Guard Lef is a little bit of an artist and has already drawn a pretty good sketch of the creature.<br>
But you need to do a favor for us first. I need you to eliminate some of the creatures around the Ruins of Despair for us. About <font color="LEVEL">15 Skeleton Warriors, 20 Ruin Imps</font>, and <font color="LEVEL">25 Bets</font> should do it.<br>
Once you are done, go see <font color="LEVEL">Guard Lef</font> about getting that sketch.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Guard Lef:<br>
Ha! Silvan tricked you into doing his work...classic. What did he say he would give you in return? Hmm... by the looks of it he said that I was supposed to give you something. What was it?<br>
<button align=LEFT icon=NORMAL action="bypass -h Quest Q10337_SakumsImpact 33510-02.html">"A sketch of Sakum."</button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Guard Lef:<br>
I'm getting tired of Silvan getting others to do his work. I understand that he hasn't slept in days, but still... bad form.<br>
I do have a <font color="LEVEL">sketch of Sakum</font> but I'm afraid that I can't just hand it over to you just for doing Silvan's task. You will need to do something for me first.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Guard Lef:<br>
Although Silvan some times acts oddly. his heart is in the right place.<br>
(You have already completed this quest.)
</body></html>

View File

@ -0,0 +1,251 @@
/*
* Copyright (C) 2004-2015 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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 Server 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.Q10337_SakumsInfluence;
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;
import com.l2jserver.gameserver.model.quest.State;
import com.l2jserver.gameserver.network.serverpackets.ExQuestNpcLogList;
import com.l2jserver.gameserver.util.Util;
/**
* Sakum's Influence (10337)
* @author spider
*/
public class Q10337_SakumsInfluence extends Quest
{
// NPCs
private static final int ADV_GUILDSMAN = 31795;
private static final int SILVAN = 33178;
private static final int LEF = 33510;
// Monsters
private static final int SKELETON_WARRIOR = 23022;
private static final int RUIN_IMP = 20506;
private static final int RUIN_IMP_ELDER = 20507;
private static final int RUIN_BAT = 23023;
private static final int SCAVENGER_BAT = 20411;
private static final int BAT = 27458; // for ruin bat & scavenger bat counter(client counter requires BAT id)
private static final Map<Integer, Integer> MOBS_REQUIRED = new HashMap<>();
{
MOBS_REQUIRED.put(SKELETON_WARRIOR, 10);
MOBS_REQUIRED.put(RUIN_IMP, 20); // imp elder same counter
MOBS_REQUIRED.put(BAT, 25); // & scavenger bat same counter
}
// Rewards
private static final int ADENA_REWARD = 1030;
private static final int EXP_REWARD = 650000;
private static final int SP_REWARD = 156;
// Others
private static final int MIN_LEVEL = 28;
private static final int MAX_LEVEL = 40;
public Q10337_SakumsInfluence()
{
super(10337, Q10337_SakumsInfluence.class.getSimpleName(), "Sakum's Influence");
addStartNpc(ADV_GUILDSMAN);
addTalkId(ADV_GUILDSMAN, SILVAN, LEF);
addKillId(SKELETON_WARRIOR, RUIN_IMP, RUIN_IMP_ELDER, RUIN_BAT, SCAVENGER_BAT);
addCondLevel(MIN_LEVEL, MAX_LEVEL, "no_level.htm");
}
@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 "31795-02.htm":
{
htmltext = event;
break;
}
case "31795-03.htm": // start the quest
{
qs.startQuest();
qs.setCond(2);
qs.setCond(1); // arrow hack
htmltext = event;
break;
}
case "33178-02.html":
{
htmltext = event;
break;
}
case "33178-03.html": // step 2 - go kill mobs
{
qs.setCond(2);
qs.set(Integer.toString(SKELETON_WARRIOR), 0); // db vars for mob counter
qs.set(Integer.toString(RUIN_IMP), 0);
qs.set(Integer.toString(BAT), 0);
htmltext = event;
break;
}
case "33510-02.html": // exit quest, give rewards, remove vars from db
{
if (qs.isCond(3))
{
giveAdena(player, ADENA_REWARD, true);
addExpAndSp(player, EXP_REWARD, SP_REWARD);
qs.unset(Integer.toString(SKELETON_WARRIOR));
qs.unset(Integer.toString(RUIN_IMP));
qs.unset(Integer.toString(BAT));
qs.exitQuest(false, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = null;
switch (qs.getState())
{
case State.CREATED:
{
switch (npc.getId())
{
case ADV_GUILDSMAN:
{
htmltext = "31795-01.htm";
break;
}
case SILVAN:
{
htmltext = getNoQuestMsg(player);
break;
}
case LEF:
{
htmltext = getNoQuestMsg(player);
break;
}
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case ADV_GUILDSMAN:
{
htmltext = "31795-04.htm";
break;
}
case SILVAN:
{
if (qs.isCond(1))
{
htmltext = "33178-01.html";
}
else
{
htmltext = "33178-03.html";
}
break;
}
case LEF:
{
if (qs.isCond(3)) // mobs killed condition
{
htmltext = "33510-01.html";
}
else
{
htmltext = getNoQuestMsg(player);
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = npc.getId() == LEF ? "33510-03.html" : getAlreadyCompletedMsg(player);
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.isStarted() && qs.isCond(2) && (Util.checkIfInRange(1500, npc, qs.getPlayer(), false)))
{
int kills = 0;
switch (npc.getId())
{
case SKELETON_WARRIOR:
{
kills = qs.getInt(Integer.toString(SKELETON_WARRIOR));
kills++;
qs.set(Integer.toString(SKELETON_WARRIOR), kills);
break;
}
case RUIN_BAT: // ruin bat & scavenger bat - same counter BAT
case SCAVENGER_BAT:
{
kills = qs.getInt(Integer.toString(BAT));
kills++;
qs.set(Integer.toString(BAT), kills);
break;
}
case RUIN_IMP: // ruin imp & ruin imp elder - same counter RUIN_IMP
case RUIN_IMP_ELDER:
{
kills = qs.getInt(Integer.toString(RUIN_IMP));
kills++;
qs.set(Integer.toString(RUIN_IMP), kills);
break;
}
}
ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
log.addNpc(SKELETON_WARRIOR, qs.getInt(Integer.toString(SKELETON_WARRIOR)));
log.addNpc(RUIN_IMP, qs.getInt(Integer.toString(RUIN_IMP)));
log.addNpc(BAT, qs.getInt(Integer.toString(BAT)));
killer.sendPacket(log);
if ((qs.getInt(Integer.toString(SKELETON_WARRIOR)) >= MOBS_REQUIRED.get(SKELETON_WARRIOR)) && (qs.getInt(Integer.toString(BAT)) >= MOBS_REQUIRED.get(BAT)) && (qs.getInt(Integer.toString(RUIN_IMP)) >= MOBS_REQUIRED.get(RUIN_IMP)))
{
qs.setCond(3);
}
}
return super.onKill(npc, killer, isSummon);
}
}

View File

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

View File

@ -200,6 +200,7 @@ import quests.Q10333_DisappearedSakum.Q10333_DisappearedSakum;
import quests.Q10334_ReportingTheStatusOfWindmillHill.Q10334_ReportingTheStatusOfWindmillHill;
import quests.Q10335_RequestToFindSakum.Q10335_RequestToFindSakum;
import quests.Q10336_DividedSakumKanilov.Q10336_DividedSakumKanilov;
import quests.Q10337_SakumsInfluence.Q10337_SakumsInfluence;
import quests.Q10338_SeizeYourDestiny.Q10338_SeizeYourDestiny;
import quests.Q10365_SeekerEscort.Q10365_SeekerEscort;
import quests.Q10390_KekropusLetter.Q10390_KekropusLetter;
@ -420,6 +421,7 @@ public class QuestMasterHandler
Q10334_ReportingTheStatusOfWindmillHill.class,
Q10335_RequestToFindSakum.class,
Q10336_DividedSakumKanilov.class,
Q10337_SakumsInfluence.class,
Q10338_SeizeYourDestiny.class,
Q10365_SeekerEscort.class,
Q10390_KekropusLetter.class,