Addition of custom quest package.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
504 Competition for the Bandit Stronghold
|
||||
513 Request from the Red Libra Guild - Field of Silence
|
||||
514 Request from the Red Libra Guild - Field of Whispers
|
||||
529 Regular Barrier Maintenance
|
||||
554 Red Libra Request - Silent Valley
|
||||
555 Red Libra Request - Atelia Refinery
|
||||
556 Red Libra Request - Fallen Emperor's Throne
|
||||
@@ -197,7 +196,6 @@
|
||||
10518 Succeeding the Priestess
|
||||
10519 Controlling Your Temper
|
||||
10520 Temple Guardians
|
||||
10529 Ivory Tower's Research - Sea of Spores Journal
|
||||
10530 Kekropus' Letter, The Dragon's Transition Achieve Level 81
|
||||
10531 Odd Happenings at Dragon Valley Strange Things Afoot in the Valley
|
||||
10532 Uncovering the Conspiracy Eliminate the Undead and Dragons
|
||||
|
||||
@@ -390,6 +390,8 @@ import quests.Q10839_BlackbirdsNameValue.Q10839_BlackbirdsNameValue;
|
||||
import quests.Q10840_TimeToRecover.Q10840_TimeToRecover;
|
||||
import quests.Q10841_DeepInsideAteliaFortress.Q10841_DeepInsideAteliaFortress;
|
||||
import quests.Q10843_AnomalyInTheEnchantedValley.Q10843_AnomalyInTheEnchantedValley;
|
||||
import quests.custom.Q00529_RegularBarrierMaintenance.Q00529_RegularBarrierMaintenance;
|
||||
import quests.custom.Q10529_IvoryTowersResearchFloatingSeaJournal.Q10529_IvoryTowersResearchFloatingSeaJournal;
|
||||
import quests.not_done.*;
|
||||
|
||||
/**
|
||||
@@ -495,7 +497,7 @@ public class QuestMasterHandler
|
||||
Q00504_CompetitionForTheBanditStronghold.class, // TODO: Not done.
|
||||
Q00511_AwlUnderFoot.class,
|
||||
Q00512_BladeUnderFoot.class,
|
||||
Q00529_RegularBarrierMaintenance.class, // TODO: Not done.
|
||||
Q00529_RegularBarrierMaintenance.class, // FIXME: Custom.
|
||||
Q00551_OlympiadStarter.class,
|
||||
Q00553_OlympiadUndefeated.class,
|
||||
Q00560_HowToOvercomeFear.class, // TODO: Not done.
|
||||
@@ -776,7 +778,7 @@ public class QuestMasterHandler
|
||||
Q10526_TheDarkSecretOfTheKetraOrcs.class,
|
||||
Q10527_TheAssassinationOfTheKetraOrcCommander.class,
|
||||
Q10528_TheAssassinationOfTheKetraOrcChief.class,
|
||||
Q10529_IvoryTowersResearchFloatingSeaJournal.class, // TODO: Not done.
|
||||
Q10529_IvoryTowersResearchFloatingSeaJournal.class, // FIXME: Custom.
|
||||
Q10531_OddHappeningsAtDragonValley.class, // TODO: Not done.
|
||||
Q10532_UncoveringTheConspiracy.class, // TODO: Not done.
|
||||
Q10533_OrfensAmbition.class, // TODO: Not done.
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
/*
|
||||
* 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.custom.Q00529_RegularBarrierMaintenance;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.QuestType;
|
||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
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;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
|
||||
import quests.custom.Q10529_IvoryTowersResearchFloatingSeaJournal.Q10529_IvoryTowersResearchFloatingSeaJournal;
|
||||
|
||||
/**
|
||||
* Regular Barrier Maintenance (529)
|
||||
* @URL https://l2wiki.com/Regular_Barrier_Maintenance
|
||||
* @author Mobius
|
||||
*/
|
||||
public class Q00529_RegularBarrierMaintenance extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int START_NPC = 34448;
|
||||
private static final int[] MONSTERS =
|
||||
{
|
||||
24226,
|
||||
24227,
|
||||
24228,
|
||||
24229,
|
||||
24230,
|
||||
24231,
|
||||
24232,
|
||||
24233,
|
||||
24234,
|
||||
24235,
|
||||
24236,
|
||||
24237,
|
||||
24238,
|
||||
24239,
|
||||
};
|
||||
// Item
|
||||
private static final int MONSTER_DROP = 48838;
|
||||
// Misc
|
||||
private static final int REQUIRED_DROP_COUNT = 200;
|
||||
private static final int KILLING_NPCSTRING_ID = NpcStringId.LV_106_REGULAR_BARRIER_MAINTENANCE_IN_PROGRESS.getId();
|
||||
private static final QuestType QUEST_TYPE = QuestType.DAILY; // REPEATABLE, ONE_TIME, DAILY
|
||||
private static final boolean PARTY_QUEST = true;
|
||||
private static final int KILLING_COND = 1;
|
||||
private static final int FINISH_COND = 2;
|
||||
private static final int MIN_LEVEL = 106;
|
||||
|
||||
public Q00529_RegularBarrierMaintenance()
|
||||
{
|
||||
super(529);
|
||||
addStartNpc(START_NPC);
|
||||
addTalkId(START_NPC);
|
||||
addKillId(MONSTERS);
|
||||
registerQuestItems(MONSTER_DROP);
|
||||
addCondMinLevel(MIN_LEVEL, getNoQuestMsg(null));
|
||||
addCondCompletedQuest(Q10529_IvoryTowersResearchFloatingSeaJournal.class.getSimpleName(), getNoQuestMsg(null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "accept.htm":
|
||||
{
|
||||
if (qs.isCreated())
|
||||
{
|
||||
qs.startQuest();
|
||||
qs.setCond(KILLING_COND);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "reward.html":
|
||||
{
|
||||
if (qs.isCond(FINISH_COND) && (getQuestItemsCount(player, MONSTER_DROP) >= REQUIRED_DROP_COUNT))
|
||||
{
|
||||
takeItems(player, MONSTER_DROP, -1);
|
||||
// Reward.
|
||||
addExpAndSp(player, 49763842650L, 49763790);
|
||||
giveAdena(player, 3225882, false);
|
||||
qs.exitQuest(QUEST_TYPE, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
|
||||
if (npc.getId() == START_NPC)
|
||||
{
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = "start.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (qs.isCond(KILLING_COND))
|
||||
{
|
||||
htmltext = "accept.htm";
|
||||
}
|
||||
else if (qs.isCond(FINISH_COND))
|
||||
{
|
||||
htmltext = "finish.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (qs.isNowAvailable())
|
||||
{
|
||||
qs.setState(State.CREATED);
|
||||
htmltext = "start.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg(player, QUEST_TYPE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState qs = PARTY_QUEST ? getRandomPartyMemberState(killer, -1, 3, npc) : getQuestState(killer, false);
|
||||
if ((qs != null) && qs.isCond(KILLING_COND))
|
||||
{
|
||||
if (giveItemRandomly(killer, npc, MONSTER_DROP, 1, REQUIRED_DROP_COUNT, 1, true))
|
||||
{
|
||||
qs.setCond(FINISH_COND);
|
||||
}
|
||||
sendNpcLogList(killer);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(KILLING_COND))
|
||||
{
|
||||
final Set<NpcLogListHolder> holder = new HashSet<>();
|
||||
holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID, false, (int) getQuestItemsCount(player, MONSTER_DROP)));
|
||||
return holder;
|
||||
}
|
||||
return super.getNpcLogList(player);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<html><body>Chorina:<br>
|
||||
You will have to hunt monsters in the Sea of Spores and to get the Seized Energy of the Floating Sea. To hunt: <font color="LEVEL">Keros, Falena, Atrofa, Nuba, Torfedo, Aranea, Harane, Lesatanas, Arbor, Tergus, Skeletus, Atrofine, Orfen's Handmaiden Arimus, Orfen's Handmaiden Arima</font>. You need to get 200 <font color="LEVEL">Seized Energy of the Sea of Spores</font>.
|
||||
</body></html>
|
||||
@@ -0,0 +1,4 @@
|
||||
<html><body>Chorina:<br>
|
||||
Have you retrieved the items I asked for?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00529_RegularBarrierMaintenance reward.html">"Here are your items."</Button>
|
||||
</body></html>
|
||||
@@ -0,0 +1,3 @@
|
||||
<html><body>Chorina:<br>
|
||||
Thank you for your assistance.
|
||||
</body></html>
|
||||
@@ -0,0 +1,5 @@
|
||||
<html><body>Chorina:<br>
|
||||
If you have time I have a mission for you.<br1>
|
||||
This area needs to be cleansed.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00529_RegularBarrierMaintenance accept.htm">"Say no more. I accept."</Button>
|
||||
</body></html>
|
||||
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
* 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.custom.Q10529_IvoryTowersResearchFloatingSeaJournal;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.QuestType;
|
||||
import com.l2jmobius.gameserver.model.actor.Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
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;
|
||||
import com.l2jmobius.gameserver.network.NpcStringId;
|
||||
|
||||
/**
|
||||
* Ivory Tower's Research - Floating Sea Journal (10529)
|
||||
* @URL https://l2wiki.com/Ivory_Tower%27s_Research_-_Floating_Sea_Journal
|
||||
* @author Mobius
|
||||
*/
|
||||
public class Q10529_IvoryTowersResearchFloatingSeaJournal extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int START_NPC = 33846;
|
||||
private static final int[] MONSTERS =
|
||||
{
|
||||
24226,
|
||||
24227,
|
||||
24228,
|
||||
24229,
|
||||
24230,
|
||||
24231,
|
||||
24232,
|
||||
24233,
|
||||
24234,
|
||||
24235,
|
||||
24236,
|
||||
24237,
|
||||
24238,
|
||||
24239,
|
||||
};
|
||||
// Item
|
||||
private static final int MONSTER_DROP = 48836;
|
||||
// Misc
|
||||
private static final int REQUIRED_DROP_COUNT = 100;
|
||||
private static final int KILLING_NPCSTRING_ID = NpcStringId.LV_106_IVORY_TOWER_S_RESEARCH_SEA_OF_SPORES_JOURNAL_IN_PROGRESS.getId();
|
||||
private static final QuestType QUEST_TYPE = QuestType.ONE_TIME; // REPEATABLE, ONE_TIME, DAILY
|
||||
private static final boolean PARTY_QUEST = false;
|
||||
private static final int KILLING_COND = 1;
|
||||
private static final int FINISH_COND = 2;
|
||||
private static final int MIN_LEVEL = 106;
|
||||
|
||||
public Q10529_IvoryTowersResearchFloatingSeaJournal()
|
||||
{
|
||||
super(10529);
|
||||
addStartNpc(START_NPC);
|
||||
addTalkId(START_NPC);
|
||||
addKillId(MONSTERS);
|
||||
registerQuestItems(MONSTER_DROP);
|
||||
addCondMinLevel(MIN_LEVEL, getNoQuestMsg(null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "accept.htm":
|
||||
{
|
||||
if (qs.isCreated())
|
||||
{
|
||||
qs.startQuest();
|
||||
qs.setCond(KILLING_COND);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "reward.html":
|
||||
{
|
||||
if (qs.isCond(FINISH_COND) && (getQuestItemsCount(player, MONSTER_DROP) >= REQUIRED_DROP_COUNT))
|
||||
{
|
||||
takeItems(player, MONSTER_DROP, -1);
|
||||
// Reward.
|
||||
addExpAndSp(player, 99527685300L, 99527580);
|
||||
rewardItems(player, 19448, 1);
|
||||
qs.exitQuest(QUEST_TYPE, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, PlayerInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
|
||||
if (npc.getId() == START_NPC)
|
||||
{
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = "start.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (qs.isCond(KILLING_COND))
|
||||
{
|
||||
htmltext = "accept.htm";
|
||||
}
|
||||
else if (qs.isCond(FINISH_COND))
|
||||
{
|
||||
htmltext = "finish.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (qs.isNowAvailable())
|
||||
{
|
||||
qs.setState(State.CREATED);
|
||||
htmltext = "start.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg(player, QUEST_TYPE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState qs = PARTY_QUEST ? getRandomPartyMemberState(killer, -1, 3, npc) : getQuestState(killer, false);
|
||||
if ((qs != null) && qs.isCond(KILLING_COND))
|
||||
{
|
||||
if (giveItemRandomly(killer, npc, MONSTER_DROP, 1, REQUIRED_DROP_COUNT, 1, true))
|
||||
{
|
||||
qs.setCond(FINISH_COND);
|
||||
}
|
||||
sendNpcLogList(killer);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isCond(KILLING_COND))
|
||||
{
|
||||
final Set<NpcLogListHolder> holder = new HashSet<>();
|
||||
holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID, false, (int) getQuestItemsCount(player, MONSTER_DROP)));
|
||||
return holder;
|
||||
}
|
||||
return super.getNpcLogList(player);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<html><body>Bacon:<br>
|
||||
You will have to hunt monsters in the Sea of Spores. To hunt: <font color="LEVEL">Keros, Falena, Atrofa, Nuba, Torfedo, Aranea, Harane, Lesatanas, Arbor, Tergus, Skeletus, Atrofine, Orfen's Handmaiden Arimus, Orfen's Handmaiden Arima</font>. You need to get 100 <font color="LEVEL">Sea of Spores Journal</font>.
|
||||
</body></html>
|
||||
@@ -0,0 +1,4 @@
|
||||
<html><body>Bacon:<br>
|
||||
Have you retrieved the items I asked for?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10529_IvoryTowersResearchFloatingSeaJournal reward.html">"Here are your items."</Button>
|
||||
</body></html>
|
||||
@@ -0,0 +1,3 @@
|
||||
<html><body>Bacon:<br>
|
||||
Thank you for your assistance.
|
||||
</body></html>
|
||||
@@ -0,0 +1,5 @@
|
||||
<html><body>Bacon:<br>
|
||||
If you have time I have a mission for you.<br1>
|
||||
This area needs to be cleansed.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10529_IvoryTowersResearchFloatingSeaJournal accept.htm">"Say no more. I accept."</Button>
|
||||
</body></html>
|
||||
@@ -14,23 +14,8 @@
|
||||
* 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.not_done;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
|
||||
/**
|
||||
* Simple implementations of missing quests until made properly.
|
||||
* @author Mobius
|
||||
*/
|
||||
public class Q00529_RegularBarrierMaintenance extends Quest
|
||||
{
|
||||
private static final int START_NPC = 34448;
|
||||
|
||||
public Q00529_RegularBarrierMaintenance()
|
||||
{
|
||||
super(529);
|
||||
addStartNpc(START_NPC);
|
||||
addTalkId(START_NPC);
|
||||
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
|
||||
}
|
||||
}
|
||||
package quests.custom;
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* 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.not_done;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class Q10529_IvoryTowersResearchFloatingSeaJournal extends Quest
|
||||
{
|
||||
private static final int START_NPC = 33846;
|
||||
|
||||
public Q10529_IvoryTowersResearchFloatingSeaJournal()
|
||||
{
|
||||
super(10529);
|
||||
addStartNpc(START_NPC);
|
||||
addTalkId(START_NPC);
|
||||
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user