Merged with released L2J-Unity files.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<html><body>Captain Bathis:<br>
|
||||
I got another message from the Ruins of Agony. The monsters that Sakum stirred up are causing trouble everywhere. We have an army near Windmill Hill, but it doesn't seem able to do anything. What can we do?<br>
|
||||
<button icon=NORMAL action="bypass -h Quest Q10335_RequestToFindSakum 30332-02.htm">"Can i Help?"</button>
|
||||
<html><body>Captain Bathis:<br>
|
||||
I got another message from the Ruins of Agony. The monsters that Sakum stirred up are causing trouble everywhere. We have an army near Windmill Hill, but it doesn't seem able to do anything. What can we do?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10335_RequestToFindSakum 30332-02.htm">"Can I help?"</Button>
|
||||
</body></html>
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Captain Bathis:<br>
|
||||
Sakum has been stirring up other creatures as it moves west of Gludio. I heard there's now another, similar-looking monster...<br>
|
||||
We do need to take care of the Sakum threat soon, but right now it's more urgent to clear out some of these other violent creatures. Can you leave right away?<br>
|
||||
<button icon=NORMAL action="bypass -h Quest Q10335_RequestToFindSakum 30332-03.htm">"Yes, I'll go now."</button>
|
||||
<html><body>Captain Bathis:<br>
|
||||
Sakum has been stirring up other creatures as it moves west of Gludio. I heard there's now another, similar-looking monster...<br>
|
||||
We do need to take care of the Sakum threat soon, but right now it's more urgent to clear out some of these other violent creatures. Can you leave right away?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10335_RequestToFindSakum 30332-03.htm">"Yes, I'll go now."</Button>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Captain Bathis:<br>
|
||||
Thanks for your decisiveness. Talk to the gatekeeper, and go to the <font color="LEVEL">Ruins of agony</font>. When you arrive, look for <font color="LEVEL">Guard Kallesin</font>.<br>
|
||||
He will give you further instructions.
|
||||
<html><body>Captain Bathis:<br>
|
||||
Thanks for your decisiveness. Talk to the gatekeeper, and go to the <font color="LEVEL">Ruins of Agony</font>. When you arrive, look for <font color="LEVEL">Guard Kallesin</font>. <br>
|
||||
He will give you further instructions.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/30332-04.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/30332-04.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Captain Bathis:<br>
|
||||
Talk to the gatekeeper to get to the <font color="LEVEL">Ruins of Agony</font>. When you arrive, look for <font color="LEVEL">Guard Kallesin</font>. <br>
|
||||
He will tell give you further instructions.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Captain Bathis:<br>
|
||||
Talk to the gatekeeper to get to the <font color="LEVEL">Ruins of Agony</font>. When you arrive, look for <font color="LEVEL>Guard Kallesin</font>.<br>
|
||||
He will give you further instructions.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/30332-05.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/30332-05.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Captain Bathis:<br>
|
||||
Is the Ruins of Agonymission going well? Help Kallesin. I'll wait here for the good news.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/30332-06.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/30332-06.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Captain Bathis:<br>
|
||||
I'll have another favor to ask of you soon.<br>
|
||||
(You have already completed this quest.)
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/30332-07.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/30332-07.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Captain Bathis:<br>
|
||||
What is it? I'd stay inside, if I were you. There are a lot of monsters cruising around outside today. <br>
|
||||
(Only characters of level 23 or above can take on this quest.)
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/30332-08.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/30332-08.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Captain Bathis:<br>
|
||||
They say curiosity is a trait of your race, but I wish you'd stay out of this.<br>
|
||||
(Ertheia classes cannot perform this quest.)
|
||||
</body></html>
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Guard Kallesin:<br>
|
||||
Ahh, the support soldier from the village, yes? Welcome. And you are just in time. Perhaps you saw Sakum on your way here? It just passed by. I was... I couldn't help but look, but I didn't dare approach. If you saw it, you'd know what I meant... it just freezes you in your tracks.<br>
|
||||
Anyway, I intend to draw a sketch of Sakum before I forget what it looked like, in hopes that it'll help someone else track it down. Meanwhile, I hope you can defeat some of the other monsters that have been stirred up by Sakum.<br>
|
||||
<button icon=NORMAL action="bypass -h Quest Q10335_RequestToFindSakum 33177-02.html">"Yeah, they shouldn't be too hard to take out.</button>
|
||||
<html><body>Guard Kallesin:<br>
|
||||
Ahh, the support soldier from the village, yes? Welcome. And you are just in time. Perhaps you saw Sakum on your way here? It just passed by. I was... I couldn't help but look, but I didn't dare approach. If you saw it, you'd know what I meant... it just freezes you in your tracks.<br>
|
||||
Anyway, I intend to draw a sketch of Sakum before I forget what it looked like, in hopes that it'll help someone else track it down. Meanwhile, I hope you can defeat some of the other monsters that have been stirred up by Sakum.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10335_RequestToFindSakum 33177-02.htm">"Yeah, they shouldn't be too hard to take out."</Button>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Guard Kallesin:<br>
|
||||
Good! I think you're capable enough to take care of them. That will ease the burden on my soldiers a little, protecting the residents of the town.<br>
|
||||
Please defeat some <font color="LEVEL"> Ruin Zombies, Ruin Zombie Leaders, Skeleton Trackers, Skeleton Bowmen, and Ruin Spartoi</font>in the Ruins of Agony. Then, report to <font color="LEVEL">Guard Zenath</font>, who's located at the far end of the ruins.
|
||||
<html><body>Guard Kallesin:<br>
|
||||
Good! I think you're capable enough to take care of them. That will ease the burden on my soldiers a little, protecting the residents of the town. <br>
|
||||
Please defeat some <font color="LEVEL">Ruin Zombies, Ruin Zombie Leaders, Skeleton Trackers, Skeleton Bowmen, and Ruin Spartoi</font> in the Ruins of Agony. Then, report to <font color="LEVEL">Guard Zenath</font>, who's located at the far end of the ruins.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33177-03.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33177-03.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Kallesin:<br>
|
||||
Please defeat some <font color="LEVEL">Ruin Zombies, Ruin Zombie Leaders, Skeleton Trackers, Skeleton Bowmen, and Ruin Spartoi</font> in the Ruins of Agony. Then, report to <font color="LEVEL">Guard Zenath</font>, who's located at the far end of the ruins.
|
||||
</body></html>
|
@@ -1,3 +0,0 @@
|
||||
<html><body>Guard Kallesin:<br>
|
||||
Please defeat some <font color="LEVEL"> Ruin Zombies, Ruin Zombie Leaders, Skeleton Trackers, Skeleton Bowmen, and Ruin Spartoi</font>in the Ruins of Agony. Then, report to <font color="LEVEL">Guard Zenath</font>, who's located at the far end of the ruins.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33177-04.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33177-04.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Kallesin:<br>
|
||||
Did you catch all those monsters? If so, please report to <font color="LEVEL">Guard Zenath</font> at the end of the Ruins of Agony.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33177-05.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33177-05.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Kallesin:<br>
|
||||
You look like you're doing well. Me? I'm doing good. I am going to head back into the village for a drink and a game of dice, as soon as this situation is taken care of. <br>
|
||||
(You have already completed this quest.)
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33509-01.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33509-01.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Guard Zenath:<br>
|
||||
Oh... Perhaps you're the one sent from the village? Kallesin was looking for you.
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Guard Zenath:<br>
|
||||
Have you come from the village? Please... report!<br>
|
||||
<button icon=NORMAL action="bypass -h Quest Q10335_RequestToFindSakum 33509-02.html">"Well..."</button>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33509-02.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33509-02.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Zenath:<br>
|
||||
Have you come from the village? Please... report!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10335_RequestToFindSakum 33509-03.htm">"Well..."</Button>
|
||||
</body></html>
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Guard Zenath:<br>
|
||||
I'm alive thanks to you! I can't believe that you defeated so many monsters in such a short time!<br>
|
||||
I was doing my best to chase Sakum, but <font color="LEVEL">Kanilov</font> is quite a distraction...<br>
|
||||
<button icon=NORMAL action="bypass -h Quest Q10335_RequestToFindSakum 33509-03.html">"Oh?"</button>
|
||||
<html><body>Guard Zenath:<br>
|
||||
I'm alive thanks to you! I can't believe that you defeated so many monsters in such a short time!<br>
|
||||
I was doing my best to chase Sakum, but <font color="LEVEL">Kanilov</font> is quite a distraction...<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10335_RequestToFindSakum 33509-04.htm">"Oh?"</Button>
|
||||
</body></html>
|
@@ -1,4 +0,0 @@
|
||||
<html><body>Guard Zenath:<br>
|
||||
We're trying to figure out Sakum's movements. However, it's more important we defeat Kanilov than track Sakum.<br>
|
||||
Kanilov's no pushover either - we'll need to be careful.
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33509-04.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q10335_RequestToFindSakum/33509-04.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Guard Zenath:<br>
|
||||
We're trying to figure out Sakum's movements. However, it's more important we defeat Kanilov than track Sakum. <br>
|
||||
Kanilov's no pushover either - we'll need to be careful.
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Guard Zenath:<br>
|
||||
Once Kanilov is defeated, I'm going back to the village!<br>
|
||||
(You have already completed this quest.)
|
||||
<html><body>Guard Zenath:<br>
|
||||
Once Kanilov is defeated, I'm going back to the village! <br>
|
||||
(You have already completed this quest.)
|
||||
</body></html>
|
@@ -1,236 +1,283 @@
|
||||
/*
|
||||
* 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.Q10335_RequestToFindSakum;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExQuestNpcLogList;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Request to find Sakum (10335)
|
||||
* @author spider
|
||||
*/
|
||||
public class Q10335_RequestToFindSakum extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int BATHIS = 30332;
|
||||
private static final int KALLESIN = 33177;
|
||||
private static final int ZENATH = 33509;
|
||||
// Monsters
|
||||
private static final int SKELETON_TRACKER = 20035;
|
||||
private static final int SKELETON_BOWMAN = 20051;
|
||||
private static final int RUIN_ZOMBIE = 20026;
|
||||
private static final int RUIN_SPARTOI = 20054;
|
||||
private static final Map<Integer, Integer> MOBS_REQUIRED = new HashMap<>();
|
||||
{
|
||||
MOBS_REQUIRED.put(SKELETON_TRACKER, 10);
|
||||
MOBS_REQUIRED.put(SKELETON_BOWMAN, 10);
|
||||
MOBS_REQUIRED.put(RUIN_ZOMBIE, 15);
|
||||
MOBS_REQUIRED.put(RUIN_SPARTOI, 15);
|
||||
}
|
||||
// Rewards
|
||||
private static final int ADENA_REWARD = 90000;
|
||||
private static final int EXP_REWARD = 350000;
|
||||
private static final int SP_REWARD = 84;
|
||||
// Others
|
||||
private static final int MIN_LEVEL = 23;
|
||||
private static final int MAX_LEVEL = 40;
|
||||
|
||||
public Q10335_RequestToFindSakum()
|
||||
{
|
||||
super(10335, Q10335_RequestToFindSakum.class.getSimpleName(), "Request to find Sakum");
|
||||
addStartNpc(BATHIS);
|
||||
addTalkId(BATHIS, KALLESIN, ZENATH);
|
||||
addKillId(SKELETON_TRACKER, SKELETON_BOWMAN, RUIN_ZOMBIE, RUIN_SPARTOI);
|
||||
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 "30332-02.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "30332-03.htm": // start the quest
|
||||
{
|
||||
qs.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "33177-02.html": // next step, killing mobs
|
||||
{
|
||||
qs.setCond(2);
|
||||
qs.set(Integer.toString(SKELETON_TRACKER), 0);
|
||||
qs.set(Integer.toString(SKELETON_BOWMAN), 0);
|
||||
qs.set(Integer.toString(RUIN_ZOMBIE), 0);
|
||||
qs.set(Integer.toString(RUIN_SPARTOI), 0);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "33509-02.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "33509-03.html":
|
||||
{
|
||||
if (qs.isCond(3))
|
||||
{ // exit quest.
|
||||
giveAdena(player, ADENA_REWARD, true);
|
||||
addExpAndSp(player, EXP_REWARD, SP_REWARD);
|
||||
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 BATHIS:
|
||||
{
|
||||
htmltext = "30332-01.htm";
|
||||
break;
|
||||
}
|
||||
case KALLESIN:
|
||||
case ZENATH:
|
||||
{
|
||||
htmltext = getNoQuestMsg(player);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case BATHIS:
|
||||
{
|
||||
htmltext = "30332-04.html";
|
||||
break;
|
||||
}
|
||||
case KALLESIN:
|
||||
{
|
||||
if (qs.isCond(1))
|
||||
{
|
||||
htmltext = "33177-01.html";
|
||||
}
|
||||
else if (qs.isCond(2))
|
||||
{
|
||||
htmltext = "33177-03.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = getNoQuestMsg(player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ZENATH:
|
||||
{
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
htmltext = "33509-01.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = getNoQuestMsg(player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case BATHIS:
|
||||
case KALLESIN:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg(player);
|
||||
break;
|
||||
}
|
||||
case ZENATH:
|
||||
{
|
||||
htmltext = "33509-04.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
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 = qs.getInt(Integer.toString(npc.getId()));
|
||||
if (kills < MOBS_REQUIRED.get(npc.getId())) // check if killed required number of monsters
|
||||
{
|
||||
kills++;
|
||||
qs.set(Integer.toString(npc.getId()), kills);
|
||||
}
|
||||
|
||||
final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
|
||||
log.addNpc(SKELETON_TRACKER, qs.getInt(Integer.toString(SKELETON_TRACKER)));
|
||||
log.addNpc(SKELETON_BOWMAN, qs.getInt(Integer.toString(SKELETON_BOWMAN)));
|
||||
log.addNpc(RUIN_SPARTOI, qs.getInt(Integer.toString(RUIN_SPARTOI)));
|
||||
log.addNpc(RUIN_ZOMBIE, qs.getInt(Integer.toString(RUIN_ZOMBIE)));
|
||||
killer.sendPacket(log);
|
||||
|
||||
if ((qs.getInt(Integer.toString(SKELETON_TRACKER)) >= MOBS_REQUIRED.get(SKELETON_TRACKER)) && (qs.getInt(Integer.toString(SKELETON_BOWMAN)) >= MOBS_REQUIRED.get(SKELETON_BOWMAN)) && (qs.getInt(Integer.toString(RUIN_SPARTOI)) >= MOBS_REQUIRED.get(RUIN_SPARTOI)) && (qs.getInt(Integer.toString(RUIN_ZOMBIE)) >= MOBS_REQUIRED.get(RUIN_ZOMBIE)))
|
||||
{
|
||||
qs.setCond(3);
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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.Q10335_RequestToFindSakum;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
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.NpcLogListHolder;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Request To Find Sakum (10335)
|
||||
* @author St3eT
|
||||
*/
|
||||
public final class Q10335_RequestToFindSakum extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int BATHIS = 30332;
|
||||
private static final int KALLESIN = 33177;
|
||||
private static final int ZENATH = 33509;
|
||||
private static final int SKELETON_TRACKER = 20035;
|
||||
private static final int SKELETON_BOWMAN = 20051;
|
||||
private static final int RUIN_SPARTOI = 20054;
|
||||
private static final int RUIN_ZOMBIE = 20026;
|
||||
private static final int RUIN_ZOMBIE_LEADER = 20029;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 23;
|
||||
private static final int MAX_LEVEL = 40;
|
||||
|
||||
public Q10335_RequestToFindSakum()
|
||||
{
|
||||
super(10335);
|
||||
addStartNpc(BATHIS);
|
||||
addTalkId(BATHIS, KALLESIN, ZENATH);
|
||||
addKillId(SKELETON_TRACKER, SKELETON_BOWMAN, RUIN_SPARTOI, RUIN_ZOMBIE, RUIN_ZOMBIE_LEADER);
|
||||
addCondNotRace(Race.ERTHEIA, "30332-08.htm");
|
||||
addCondLevel(MIN_LEVEL, MAX_LEVEL, "30332-07.htm");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "30332-02.htm":
|
||||
case "33509-03.htm":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "30332-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "33177-02.htm":
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
st.setCond(2);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "33509-04.htm":
|
||||
{
|
||||
if (st.isCond(3))
|
||||
{
|
||||
giveAdena(player, 900, true);
|
||||
addExpAndSp(player, 350000, 84);
|
||||
st.exitQuest(false, true);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState st = getQuestState(player, true);
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (npc.getId() == BATHIS)
|
||||
{
|
||||
htmltext = "30332-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case BATHIS:
|
||||
{
|
||||
htmltext = st.isCond(1) ? "30332-04.htm" : "30332-05.htm";
|
||||
break;
|
||||
}
|
||||
case KALLESIN:
|
||||
{
|
||||
switch (st.getCond())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
htmltext = "33177-01.htm";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
htmltext = "33177-03.htm";
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
htmltext = "33177-04.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ZENATH:
|
||||
{
|
||||
switch (st.getCond())
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
{
|
||||
htmltext = "33509-01.htm";
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
htmltext = "33509-02.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
switch (npc.getId())
|
||||
{
|
||||
case BATHIS:
|
||||
{
|
||||
htmltext = "30332-06.htm";
|
||||
break;
|
||||
}
|
||||
case KALLESIN:
|
||||
{
|
||||
htmltext = "33177-05.htm";
|
||||
break;
|
||||
}
|
||||
case ZENATH:
|
||||
{
|
||||
htmltext = "33509-05.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState st = getQuestState(killer, false);
|
||||
|
||||
if ((st != null) && st.isStarted() && st.isCond(2))
|
||||
{
|
||||
int killedTracker = st.getInt("killed_" + SKELETON_TRACKER);
|
||||
int killedBowman = st.getInt("killed_" + SKELETON_BOWMAN);
|
||||
int killedRuinSpartois = st.getInt("killed_" + RUIN_SPARTOI);
|
||||
int killedZombie = st.getInt("killed_" + RUIN_ZOMBIE);
|
||||
|
||||
switch (npc.getId())
|
||||
{
|
||||
case SKELETON_TRACKER:
|
||||
{
|
||||
if (killedTracker < 10)
|
||||
{
|
||||
killedTracker++;
|
||||
st.set("killed_" + SKELETON_TRACKER, killedTracker);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SKELETON_BOWMAN:
|
||||
{
|
||||
if (killedBowman < 10)
|
||||
{
|
||||
killedBowman++;
|
||||
st.set("killed_" + SKELETON_BOWMAN, killedBowman);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RUIN_SPARTOI:
|
||||
{
|
||||
if (killedRuinSpartois < 15)
|
||||
{
|
||||
killedRuinSpartois++;
|
||||
st.set("killed_" + RUIN_SPARTOI, killedRuinSpartois);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RUIN_ZOMBIE:
|
||||
case RUIN_ZOMBIE_LEADER:
|
||||
{
|
||||
if (killedZombie < 15)
|
||||
{
|
||||
killedZombie++;
|
||||
st.set("killed_" + RUIN_ZOMBIE, killedZombie);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((killedTracker == 10) && (killedBowman == 10) && (killedRuinSpartois == 15) && (killedZombie == 15))
|
||||
{
|
||||
st.setCond(3, true);
|
||||
}
|
||||
sendNpcLogList(killer);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<NpcLogListHolder> getNpcLogList(L2PcInstance activeChar)
|
||||
{
|
||||
final QuestState st = getQuestState(activeChar, false);
|
||||
if ((st != null) && st.isStarted() && st.isCond(2))
|
||||
{
|
||||
final Set<NpcLogListHolder> npcLogList = new HashSet<>(4);
|
||||
npcLogList.add(new NpcLogListHolder(SKELETON_TRACKER, false, st.getInt("killed_" + SKELETON_TRACKER)));
|
||||
npcLogList.add(new NpcLogListHolder(SKELETON_BOWMAN, false, st.getInt("killed_" + SKELETON_BOWMAN)));
|
||||
npcLogList.add(new NpcLogListHolder(RUIN_SPARTOI, false, st.getInt("killed_" + RUIN_SPARTOI)));
|
||||
npcLogList.add(new NpcLogListHolder(RUIN_ZOMBIE, false, st.getInt("killed_" + RUIN_ZOMBIE)));
|
||||
return npcLogList;
|
||||
}
|
||||
return super.getNpcLogList(activeChar);
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
<html><body>You don't meet level requirements<br>
|
||||
(Quest available from level 23 to level 40)
|
||||
</body></html>
|
Reference in New Issue
Block a user