Merged with released L2J-Unity files.

This commit is contained in:
mobiusdev
2016-06-12 01:34:09 +00:00
parent e003e87887
commit 635557f5da
18352 changed files with 3245113 additions and 2892959 deletions

View File

@@ -1,5 +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>
<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 warriors. 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

@@ -1,5 +1,4 @@
<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>
<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. 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

@@ -1,4 +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...
<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 a delicate thing...
</body></html>

View File

@@ -1,3 +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!
<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

@@ -1,4 +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!
<html><body>Guard Fred:<br>
How are you getting on?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10368_RebellionOfMonsters 33179-06.html">"All done!"</Button>
</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,4 @@
<html><body>Guard Fred:<br>
I wish I could go back to town, but the situation forces me to stay here. Sigh...<br>
(You have already completed this quest.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Guard Fred:<br>
It's dangerous here - go back to town.<br>
(Only characters with levels greater than 34 and below 40 can take this quest.)
</body></html>

View File

@@ -1,164 +1,206 @@
/*
* 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.Q10368_RebellionOfMonsters;
import java.util.HashMap;
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;
/**
* 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);
}
final 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);
}
}
/*
* 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.Q10368_RebellionOfMonsters;
import java.util.HashSet;
import java.util.Set;
import com.l2jmobius.gameserver.enums.QuestSound;
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;
/**
* Rebellion of Monsters (10368)
* @author St3eT
*/
public final class Q10368_RebellionOfMonsters extends Quest
{
// NPCs
private static final int FRED = 33179;
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;
// Misc
private static final int MIN_LEVEL = 34;
private static final int MAX_LEVEL = 40;
public Q10368_RebellionOfMonsters()
{
super(10368);
addStartNpc(FRED);
addTalkId(FRED);
addKillId(WEARY_JAGUAR, WEARY_JAGUAR_SCOUT, ANT_SOLDIER, ANT_WARRIOR_CAPTAIN);
addCondLevel(MIN_LEVEL, MAX_LEVEL, "33179-08.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 "33179-02.htm":
{
htmltext = event;
break;
}
case "33179-03.htm":
{
st.startQuest();
htmltext = event;
break;
}
case "33179-06.html":
{
if (st.isCond(2))
{
giveAdena(player, 990, true);
addExpAndSp(player, 750000, 180);
st.exitQuest(false, true);
}
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:
{
htmltext = "33179-01.htm";
break;
}
case State.STARTED:
{
if (st.isCond(1))
{
htmltext = "33179-04.html";
}
else if (st.isCond(2))
{
htmltext = "33179-05.html";
}
break;
}
case State.COMPLETED:
{
htmltext = "33179-07.html";
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(1))
{
int killedJaguar = st.getInt("killed_" + WEARY_JAGUAR);
int killedJaguarScout = st.getInt("killed_" + WEARY_JAGUAR_SCOUT);
int killedSoldier = st.getInt("killed_" + ANT_SOLDIER);
int killedCaptain = st.getInt("killed_" + ANT_WARRIOR_CAPTAIN);
switch (npc.getId())
{
case WEARY_JAGUAR:
{
if (killedJaguar < 10)
{
killedJaguar++;
st.set("killed_" + WEARY_JAGUAR, killedJaguar);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case WEARY_JAGUAR_SCOUT:
{
if (killedJaguarScout < 15)
{
killedJaguarScout++;
st.set("killed_" + WEARY_JAGUAR_SCOUT, killedJaguarScout);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case ANT_SOLDIER:
{
if (killedSoldier < 15)
{
killedSoldier++;
st.set("killed_" + ANT_SOLDIER, killedSoldier);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case ANT_WARRIOR_CAPTAIN:
{
if (killedCaptain < 20)
{
killedCaptain++;
st.set("killed_" + ANT_WARRIOR_CAPTAIN, killedCaptain);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
}
if ((killedJaguar == 10) && (killedJaguarScout == 15) && (killedSoldier == 15) && (killedCaptain == 20))
{
st.setCond(2, 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(1))
{
final Set<NpcLogListHolder> npcLogList = new HashSet<>(4);
npcLogList.add(new NpcLogListHolder(WEARY_JAGUAR, false, st.getInt("killed_" + WEARY_JAGUAR)));
npcLogList.add(new NpcLogListHolder(WEARY_JAGUAR_SCOUT, false, st.getInt("killed_" + WEARY_JAGUAR_SCOUT)));
npcLogList.add(new NpcLogListHolder(ANT_SOLDIER, false, st.getInt("killed_" + ANT_SOLDIER)));
npcLogList.add(new NpcLogListHolder(ANT_WARRIOR_CAPTAIN, false, st.getInt("killed_" + ANT_WARRIOR_CAPTAIN)));
return npcLogList;
}
return super.getNpcLogList(activeChar);
}
}

View File

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