Quests Sakums Trace (10359) and Rebellion of Monsters (10368).

Contributed by spider.
This commit is contained in:
MobiusDev
2015-08-08 08:02:37 +00:00
parent c3510abc6f
commit a948d5ee3f
28 changed files with 542 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<html><body>Guard Fred:<br>
The biggest problem is the appearance of the Ancient Monster Sakum. The native monsters have become agitated by his arrival, and many have become much stronger, while others have come from the depths of the world itself!<br>
Sigh... There are too many monsters, and not enough arriors. We need help.<br>
<button align=left icon=NORMAl action="bypass -h Quest Q10368_RebellionOfMonsters 33179-02.htm" >"Tell me what's going on."</button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Guard Fred:<br>
The monsters that have recently been running rampant are the Weary Jaguars and Ant Soldiers. They are not that ferocious, but their numbers are growing faster than we can control them.<br>
Can you help?<br>
<button align=left icon=NORMAl action="bypass -h Quest Q10368_RebellionOfMonsters 33179-03.htm" >"Of course."</button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Guard Fred:<br>
Excellent! please defeat the <font color="LEVEL">Weary Jaguars, Weary Jaguar Scouts, Ant Soldiers, and Ant Warrior Captains</font> here in the Wasteland.<br>
I'm sorry that I've assigned you several things. But timing is delicate thing...
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Guard Fred:<br>
Please defeat the <font color="LEVEL">Weary Jaguars, Weary Jaguar Scouts, Ant Soldiers, and Ant Warrior Captains</font> here in the Wasteland. Go!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Guard Fred:<br>
Ah, excellent - I thought they'd piped down a bit since you left!<br>
Thanks to you, the wasteland search will be much easier now. Thank you!
</body></html>

View File

@@ -0,0 +1,167 @@
/*
* 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.Q10368_RebellionOfMonsters;
import java.util.HashMap;
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;
/**
* Rebellion of Monsters (10368)
* @author spider
*/
public class Q10368_RebellionOfMonsters extends Quest
{
// NPCs
private static final int FRED = 33179;
// Monsters
private static final int WEARY_JAGUAR = 23024;
private static final int WEARY_JAGUAR_SCOUT = 23025;
private static final int ANT_SOLDIER = 23099;
private static final int ANT_WARRIOR_CAPTAIN = 23100;
private static final HashMap<Integer, Integer> MOBS_REQUIRED = new HashMap<>();
{
MOBS_REQUIRED.put(WEARY_JAGUAR, 10);
MOBS_REQUIRED.put(WEARY_JAGUAR_SCOUT, 15);
MOBS_REQUIRED.put(ANT_SOLDIER, 15);
MOBS_REQUIRED.put(ANT_WARRIOR_CAPTAIN, 20);
}
// Rewards
private static final int ADENA_REWARD = 99000;
private static final int EXP_REWARD = 750000;
private static final int SP_REWARD = 180;
// Others
private static final int MIN_LEVEL = 34;
private static final int MAX_LEVEL = 40;
public Q10368_RebellionOfMonsters()
{
super(10368, Q10368_RebellionOfMonsters.class.getSimpleName(), "Rebellion of Monsters");
addCondLevel(MIN_LEVEL, MAX_LEVEL, "no_level.htm");
addStartNpc(FRED);
addTalkId(FRED);
addKillId(MOBS_REQUIRED.keySet());
}
@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 "33179-02.htm":
{
htmltext = event;
break;
}
case "33179-03.htm": // start quest
{
qs.startQuest();
qs.set(Integer.toString(WEARY_JAGUAR), 0);
qs.set(Integer.toString(WEARY_JAGUAR_SCOUT), 0);
qs.set(Integer.toString(ANT_SOLDIER), 0);
qs.set(Integer.toString(ANT_WARRIOR_CAPTAIN), 0);
qs.setCond(2);
qs.setCond(1); // arrow hack
}
}
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:
{
htmltext = "33179-01.htm";
break;
}
case State.STARTED:
{
if (qs.isCond(1))
{
htmltext = "33179-04.html";
}
else if (qs.isCond(2)) // end quest
{
giveAdena(player, ADENA_REWARD, true);
addExpAndSp(player, EXP_REWARD, SP_REWARD);
qs.unset(Integer.toString(WEARY_JAGUAR));
qs.unset(Integer.toString(WEARY_JAGUAR_SCOUT));
qs.unset(Integer.toString(ANT_SOLDIER));
qs.unset(Integer.toString(ANT_WARRIOR_CAPTAIN));
qs.exitQuest(false, true);
htmltext = "33179-05.html";
}
break;
}
case State.COMPLETED:
{
htmltext = 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(1) && (Util.checkIfInRange(1500, npc, qs.getPlayer(), false)))
{
if (qs.getInt(Integer.toString(npc.getId())) < MOBS_REQUIRED.get(npc.getId()))
{
int kills = qs.getInt(Integer.toString(npc.getId()));
kills++;
qs.set(Integer.toString(npc.getId()), kills);
}
ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
log.addNpc(WEARY_JAGUAR, qs.getInt(Integer.toString(WEARY_JAGUAR)));
log.addNpc(WEARY_JAGUAR_SCOUT, qs.getInt(Integer.toString(WEARY_JAGUAR_SCOUT)));
log.addNpc(ANT_SOLDIER, qs.getInt(Integer.toString(ANT_SOLDIER)));
log.addNpc(ANT_WARRIOR_CAPTAIN, qs.getInt(Integer.toString(ANT_WARRIOR_CAPTAIN)));
killer.sendPacket(log);
if ((qs.getInt(Integer.toString(WEARY_JAGUAR)) >= MOBS_REQUIRED.get(WEARY_JAGUAR)) && (qs.getInt(Integer.toString(WEARY_JAGUAR_SCOUT)) >= MOBS_REQUIRED.get(WEARY_JAGUAR_SCOUT)) && (qs.getInt(Integer.toString(ANT_SOLDIER)) >= MOBS_REQUIRED.get(ANT_SOLDIER)) && (qs.getInt(Integer.toString(ANT_WARRIOR_CAPTAIN)) >= MOBS_REQUIRED.get(ANT_WARRIOR_CAPTAIN)))
{
qs.setCond(2);
}
}
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 34 to level 40)
</body></html>