Addition of custom quest package.

This commit is contained in:
MobiusDevelopment 2019-04-03 15:59:29 +00:00
parent 7714c27a6e
commit da64c80f07
18 changed files with 435 additions and 57 deletions

View File

@ -0,0 +1,7 @@
<html><body>Chorina:<br>
The Sea of Spores used to have a barrier, but it couldn't stop the sea expanding as the Energy of the Sea of Spores got stronger.<br>
So the Ivory Tower found a way of creating a new barrier: "Killing poison with poison"...<br>
We're using the very same Energy of The Sea of Spores which made the Sea of Spores more dangerous as our source of energy. But there's a problem. This energy is very unstable and keeps trying to spread and escape.<br>
So I had to come here for the maintenance of the barrier. I'm capable of the most minute distribution of energy for maintaining the barrier. As long as I'm here, you don't have to worry about Sea of Spores.<br>
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 34448.htm">Back</Button>
</html>

View File

@ -0,0 +1,6 @@
<html><body>Chorina:<br>
Are you interested in the Sea of Spores? Then you've come to the right place. It's not the safest place in the world but don't worry, I'm here.<br>
There's nothing to worry about since I'm taking care of the barrier here.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">"Tell me about mercenaries."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</html>

View File

@ -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

View File

@ -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.

View File

@ -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);
}
}

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,3 @@
<html><body>Chorina:<br>
Thank you for your assistance.
</body></html>

View File

@ -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>

View File

@ -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);
}
}

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,3 @@
<html><body>Bacon:<br>
Thank you for your assistance.
</body></html>

View File

@ -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>

View File

@ -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;

View File

@ -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));
}
}

View File

@ -4,6 +4,7 @@
<group name="NPCs">
<npc id="19543" x="64328" y="26803" z="-3768" respawnTime="60sec" /> <!-- Invisible Kekropus NPC -->
<npc id="33846" x="63800" y="26584" z="-3763" heading="3968" respawnTime="60sec" /> <!-- Bacon -->
<npc id="34448" x="64135" y="25905" z="-3769" heading="10013" respawnTime="60sec" /> <!-- Chorina -->
<npc id="33960" x="62645" y="27761" z="-3760" heading="36920" respawnTime="60sec" /> <!-- Barrier Enforcer -->
<npc id="33960" x="63520" y="24448" z="-3792" heading="33708" respawnTime="60sec" /> <!-- Barrier Enforcer -->
<npc id="33960" x="60735" y="30320" z="-3736" heading="42512" respawnTime="60sec" /> <!-- Barrier Enforcer -->

View File

@ -349,6 +349,7 @@
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="is_questitem" val="true" />
</item>
<item id="48837" name="Dispersing Energy of the Sea of Spores" type="EtcItem">
<!-- Part of the Energy of the Sea of Spores obtained from Orfen's Handmaidens Arima and Arimus. It is dispersing as it is unstable. It will be stabilized once Orfen's Handmaidens absorb all the Energy of the Sea of Spores. Gather and take it to Paterson's Disciple Bacon at the entrance of the Sea of Spores. -->
@ -371,6 +372,7 @@
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="is_questitem" val="true" />
</item>
<item id="48839" name="Ultimate Lv. 5 Jewelry Box" type="EtcItem">
<!-- Double-click to obtain one level 5 Gem. -->