Addition of quests 589 and 590.

This commit is contained in:
MobiusDevelopment 2019-04-18 03:16:31 +00:00
parent 292818848e
commit 66f0a22629
30 changed files with 824 additions and 152 deletions

View File

@ -21,8 +21,6 @@
586 Mutated Creatures 586 Mutated Creatures
587 More Aggressive Operation 587 More Aggressive Operation
588 Head-on Crash 588 Head-on Crash
589 A Secret Change
590 To Each Their Own
591 Great Ambitions 591 Great Ambitions
599 Demons and Dimensional Energy 599 Demons and Dimensional Energy
600 Key to the Refining Process 600 Key to the Refining Process

View File

@ -408,6 +408,8 @@ import quests.Q10839_BlackbirdsNameValue.Q10839_BlackbirdsNameValue;
import quests.Q10840_TimeToRecover.Q10840_TimeToRecover; import quests.Q10840_TimeToRecover.Q10840_TimeToRecover;
import quests.Q10841_DeepInsideAteliaFortress.Q10841_DeepInsideAteliaFortress; import quests.Q10841_DeepInsideAteliaFortress.Q10841_DeepInsideAteliaFortress;
import quests.Q10843_AnomalyInTheEnchantedValley.Q10843_AnomalyInTheEnchantedValley; import quests.Q10843_AnomalyInTheEnchantedValley.Q10843_AnomalyInTheEnchantedValley;
import quests.custom.Q00589_ASecretChange.Q00589_ASecretChange;
import quests.custom.Q00590_ToEachTheirOwn.Q00590_ToEachTheirOwn;
import quests.not_done.*; import quests.not_done.*;
/** /**
@ -543,8 +545,8 @@ public class QuestMasterHandler
Q00586_MutatedCreatures.class, // TODO: Not done. Q00586_MutatedCreatures.class, // TODO: Not done.
Q00587_MoreAggressiveOperation.class, // TODO: Not done. Q00587_MoreAggressiveOperation.class, // TODO: Not done.
Q00588_HeadOnCrash.class, // TODO: Not done. Q00588_HeadOnCrash.class, // TODO: Not done.
Q00589_ASecretChange.class, // TODO: Not done. Q00589_ASecretChange.class, // FIXME: Custom.
Q00590_ToEachTheirOwn.class, // TODO: Not done. Q00590_ToEachTheirOwn.class, // FIXME: Custom.
Q00591_GreatAmbitions.class, // TODO: Not done. Q00591_GreatAmbitions.class, // TODO: Not done.
Q00599_DemonsAndDimensionalEnergy.class, // TODO: Not done. Q00599_DemonsAndDimensionalEnergy.class, // TODO: Not done.
Q00600_KeyToTheRefiningProcess.class, // TODO: Not done. Q00600_KeyToTheRefiningProcess.class, // TODO: Not done.

View File

@ -0,0 +1,183 @@
/*
* 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.Q00589_ASecretChange;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.network.NpcStringId;
/**
* A Secret Change (589)
* @URL https://l2wiki.com/A_Secret_Change
* @author Mobius
*/
public class Q00589_ASecretChange extends Quest
{
// NPCs
private static final int START_NPC = 34424;
private static final int[] MONSTERS =
{
24200,
24201,
24202,
24203,
};
// Item
private static final int MONSTER_DROP = 48533;
// Misc
private static final int REQUIRED_DROP_COUNT = 250;
private static final int KILLING_NPCSTRING_ID = NpcStringId.LV_95_105_A_SECRET_CHANGE_IN_PROGRESS.getId();
private static final QuestType QUEST_TYPE = QuestType.DAILY; // 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 = 95;
private static final int MAX_LEVEL = 105;
public Q00589_ASecretChange()
{
super(589);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addKillId(MONSTERS);
registerQuestItems(MONSTER_DROP);
addCondMinLevel(MIN_LEVEL, getNoQuestMsg(null));
addCondMaxLevel(MAX_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, 1793099880, 1793070);
giveAdena(player, 680100, 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))
{
final PlayerInstance player = qs.getPlayer();
if (giveItemRandomly(player, npc, MONSTER_DROP, 1, REQUIRED_DROP_COUNT, 1, true))
{
qs.setCond(FINISH_COND, true);
}
sendNpcLogList(player);
}
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, true, (int) getQuestItemsCount(player, MONSTER_DROP)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@ -0,0 +1,3 @@
<html><body>Corzet:<br>
You have to hunt monsters in Silent Valley. Hunt <font color="LEVEL">Silence Warrior, Silence Slave, Silence Claw, Silence Witch</font>. You need to gather 250 <font color="LEVEL">Trace of Evil</font>.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Corzet:<br>
Have you retrieved the items I asked for?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00589_ASecretChange reward.html">"Here are your items."</Button>
</body></html>

View File

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

View File

@ -0,0 +1,5 @@
<html><body>Corzet:<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 Q00589_ASecretChange accept.htm">"Say no more. I accept."</Button>
</body></html>

View File

@ -0,0 +1,182 @@
/*
* 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.Q00590_ToEachTheirOwn;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.network.NpcStringId;
/**
* To Each Their Own (590)
* @URL https://l2wiki.com/To_Each_Their_Own
* @author Mobius
*/
public class Q00590_ToEachTheirOwn extends Quest
{
// NPCs
private static final int START_NPC = 34424;
private static final int[] MONSTERS =
{
24204,
24205,
24206,
};
// Item
private static final int MONSTER_DROP = 48534;
// Misc
private static final int REQUIRED_DROP_COUNT = 50;
private static final int KILLING_NPCSTRING_ID = NpcStringId.LV_95_105_TO_EACH_THEIR_OWN_IN_PROGRESS.getId();
private static final QuestType QUEST_TYPE = QuestType.DAILY; // 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 = 95;
private static final int MAX_LEVEL = 105;
public Q00590_ToEachTheirOwn()
{
super(590);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addKillId(MONSTERS);
registerQuestItems(MONSTER_DROP);
addCondMinLevel(MIN_LEVEL, getNoQuestMsg(null));
addCondMaxLevel(MAX_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, 1793099880, 1793070);
giveAdena(player, 680100, 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))
{
final PlayerInstance player = qs.getPlayer();
if (giveItemRandomly(player, npc, MONSTER_DROP, 1, REQUIRED_DROP_COUNT, 1, true))
{
qs.setCond(FINISH_COND, true);
}
sendNpcLogList(player);
}
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, true, (int) getQuestItemsCount(player, MONSTER_DROP)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@ -0,0 +1,3 @@
<html><body>Corzet:<br>
You have to hunt monsters in Silent Valley. Hunt <font color="LEVEL">Silence Hannibal, Silence Preacle, Silence Phantom</font>. You need to gather 50 <font color="LEVEL">Dust of Destroyed Demon</font>.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Corzet:<br>
Have you retrieved the items I asked for?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00590_ToEachTheirOwn reward.html">"Here are your items."</Button>
</body></html>

View File

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

View File

@ -0,0 +1,5 @@
<html><body>Corzet:<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 Q00590_ToEachTheirOwn accept.htm">"Say no more. I accept."</Button>
</body></html>

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 org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q00589_ASecretChange extends Quest
{
private static final int START_NPC = 34424;
public Q00589_ASecretChange()
{
super(589);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}

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 org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q00590_ToEachTheirOwn extends Quest
{
private static final int START_NPC = 34424;
public Q00590_ToEachTheirOwn()
{
super(590);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}

View File

@ -148,4 +148,28 @@
<stat type="pAtkRange">40</stat> <stat type="pAtkRange">40</stat>
</stats> </stats>
</item> </item>
<item id="48533" name="Trace of Evil" type="EtcItem">
<!-- The item that Corzet asked you to gather after defeating demons in the Silent Valley. -->
<set name="icon" val="icon.etc_pouch_yellow_i00" />
<set name="material" val="PAPER" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
<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="48534" name="Dust of Destroyed Demon" type="EtcItem">
<!-- The item that Corzet asked you to gather as evidence of defeating demons in the Silent Valley. -->
<set name="icon" val="icon.etc_powder_black_i00" />
<set name="material" val="PAPER" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_destroyable" val="false" />
<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>
</list> </list>

View File

@ -25,8 +25,6 @@
586 Mutated Creatures 586 Mutated Creatures
587 More Aggressive Operation 587 More Aggressive Operation
588 Head-on Crash 588 Head-on Crash
589 A Secret Change
590 To Each Their Own
591 Great Ambitions 591 Great Ambitions
593 Basic Mission: Pagan Temple 593 Basic Mission: Pagan Temple
594 Basic Mission: Dimensional Rift 594 Basic Mission: Dimensional Rift

View File

@ -408,6 +408,8 @@ import quests.Q10841_DeepInsideAteliaFortress.Q10841_DeepInsideAteliaFortress;
import quests.Q10843_AnomalyInTheEnchantedValley.Q10843_AnomalyInTheEnchantedValley; import quests.Q10843_AnomalyInTheEnchantedValley.Q10843_AnomalyInTheEnchantedValley;
import quests.custom.Q00529_RegularBarrierMaintenance.Q00529_RegularBarrierMaintenance; import quests.custom.Q00529_RegularBarrierMaintenance.Q00529_RegularBarrierMaintenance;
import quests.custom.Q00560_HowToOvercomeFear.Q00560_HowToOvercomeFear; import quests.custom.Q00560_HowToOvercomeFear.Q00560_HowToOvercomeFear;
import quests.custom.Q00589_ASecretChange.Q00589_ASecretChange;
import quests.custom.Q00590_ToEachTheirOwn.Q00590_ToEachTheirOwn;
import quests.custom.Q00683_AdventOfKrofinSubspecies.Q00683_AdventOfKrofinSubspecies; import quests.custom.Q00683_AdventOfKrofinSubspecies.Q00683_AdventOfKrofinSubspecies;
import quests.custom.Q00684_DisturbedFields.Q00684_DisturbedFields; import quests.custom.Q00684_DisturbedFields.Q00684_DisturbedFields;
import quests.custom.Q10516_UnveiledFafurionTemple.Q10516_UnveiledFafurionTemple; import quests.custom.Q10516_UnveiledFafurionTemple.Q10516_UnveiledFafurionTemple;
@ -553,8 +555,8 @@ public class QuestMasterHandler
Q00586_MutatedCreatures.class, // TODO: Not done. Q00586_MutatedCreatures.class, // TODO: Not done.
Q00587_MoreAggressiveOperation.class, // TODO: Not done. Q00587_MoreAggressiveOperation.class, // TODO: Not done.
Q00588_HeadOnCrash.class, // TODO: Not done. Q00588_HeadOnCrash.class, // TODO: Not done.
Q00589_ASecretChange.class, // TODO: Not done. Q00589_ASecretChange.class, // FIXME: Custom.
Q00590_ToEachTheirOwn.class, // TODO: Not done. Q00590_ToEachTheirOwn.class, // FIXME: Custom.
Q00591_GreatAmbitions.class, // TODO: Not done. Q00591_GreatAmbitions.class, // TODO: Not done.
Q00593_BasicMissionPaganTemple.class, // TODO: Not done. Q00593_BasicMissionPaganTemple.class, // TODO: Not done.
Q00594_BasicMissionDimensionalRift.class, // TODO: Not done. Q00594_BasicMissionDimensionalRift.class, // TODO: Not done.

View File

@ -0,0 +1,183 @@
/*
* 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.Q00589_ASecretChange;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.network.NpcStringId;
/**
* A Secret Change (589)
* @URL https://l2wiki.com/A_Secret_Change
* @author Mobius
*/
public class Q00589_ASecretChange extends Quest
{
// NPCs
private static final int START_NPC = 34424;
private static final int[] MONSTERS =
{
24200,
24201,
24202,
24203,
};
// Item
private static final int MONSTER_DROP = 48533;
// Misc
private static final int REQUIRED_DROP_COUNT = 250;
private static final int KILLING_NPCSTRING_ID = NpcStringId.LV_95_105_A_SECRET_CHANGE_IN_PROGRESS.getId();
private static final QuestType QUEST_TYPE = QuestType.DAILY; // 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 = 95;
private static final int MAX_LEVEL = 105;
public Q00589_ASecretChange()
{
super(589);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addKillId(MONSTERS);
registerQuestItems(MONSTER_DROP);
addCondMinLevel(MIN_LEVEL, getNoQuestMsg(null));
addCondMaxLevel(MAX_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, 1793099880, 1793070);
giveAdena(player, 680100, 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))
{
final PlayerInstance player = qs.getPlayer();
if (giveItemRandomly(player, npc, MONSTER_DROP, 1, REQUIRED_DROP_COUNT, 1, true))
{
qs.setCond(FINISH_COND, true);
}
sendNpcLogList(player);
}
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, true, (int) getQuestItemsCount(player, MONSTER_DROP)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@ -0,0 +1,3 @@
<html><body>Corzet:<br>
You have to hunt monsters in Silent Valley. Hunt <font color="LEVEL">Silence Warrior, Silence Slave, Silence Claw, Silence Witch</font>. You need to gather 250 <font color="LEVEL">Trace of Evil</font>.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Corzet:<br>
Have you retrieved the items I asked for?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00589_ASecretChange reward.html">"Here are your items."</Button>
</body></html>

View File

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

View File

@ -0,0 +1,5 @@
<html><body>Corzet:<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 Q00589_ASecretChange accept.htm">"Say no more. I accept."</Button>
</body></html>

View File

@ -0,0 +1,182 @@
/*
* 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.Q00590_ToEachTheirOwn;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.gameserver.enums.QuestType;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.holders.NpcLogListHolder;
import org.l2jmobius.gameserver.model.quest.Quest;
import org.l2jmobius.gameserver.model.quest.QuestState;
import org.l2jmobius.gameserver.model.quest.State;
import org.l2jmobius.gameserver.network.NpcStringId;
/**
* To Each Their Own (590)
* @URL https://l2wiki.com/To_Each_Their_Own
* @author Mobius
*/
public class Q00590_ToEachTheirOwn extends Quest
{
// NPCs
private static final int START_NPC = 34424;
private static final int[] MONSTERS =
{
24204,
24205,
24206,
};
// Item
private static final int MONSTER_DROP = 48534;
// Misc
private static final int REQUIRED_DROP_COUNT = 50;
private static final int KILLING_NPCSTRING_ID = NpcStringId.LV_95_105_TO_EACH_THEIR_OWN_IN_PROGRESS.getId();
private static final QuestType QUEST_TYPE = QuestType.DAILY; // 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 = 95;
private static final int MAX_LEVEL = 105;
public Q00590_ToEachTheirOwn()
{
super(590);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addKillId(MONSTERS);
registerQuestItems(MONSTER_DROP);
addCondMinLevel(MIN_LEVEL, getNoQuestMsg(null));
addCondMaxLevel(MAX_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, 1793099880, 1793070);
giveAdena(player, 680100, 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))
{
final PlayerInstance player = qs.getPlayer();
if (giveItemRandomly(player, npc, MONSTER_DROP, 1, REQUIRED_DROP_COUNT, 1, true))
{
qs.setCond(FINISH_COND, true);
}
sendNpcLogList(player);
}
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, true, (int) getQuestItemsCount(player, MONSTER_DROP)));
return holder;
}
return super.getNpcLogList(player);
}
}

View File

@ -0,0 +1,3 @@
<html><body>Corzet:<br>
You have to hunt monsters in Silent Valley. Hunt <font color="LEVEL">Silence Hannibal, Silence Preacle, Silence Phantom</font>. You need to gather 50 <font color="LEVEL">Dust of Destroyed Demon</font>.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Corzet:<br>
Have you retrieved the items I asked for?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00590_ToEachTheirOwn reward.html">"Here are your items."</Button>
</body></html>

View File

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

View File

@ -0,0 +1,5 @@
<html><body>Corzet:<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 Q00590_ToEachTheirOwn accept.htm">"Say no more. I accept."</Button>
</body></html>

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 org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q00589_ASecretChange extends Quest
{
private static final int START_NPC = 34424;
public Q00589_ASecretChange()
{
super(589);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}

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 org.l2jmobius.Config;
import org.l2jmobius.gameserver.model.quest.Quest;
/**
* @author Mobius
*/
public class Q00590_ToEachTheirOwn extends Quest
{
private static final int START_NPC = 34424;
public Q00590_ToEachTheirOwn()
{
super(590);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}

View File

@ -337,6 +337,7 @@
<set name="is_depositable" val="false" /> <set name="is_depositable" val="false" />
<set name="is_sellable" val="false" /> <set name="is_sellable" val="false" />
<set name="is_stackable" val="true" /> <set name="is_stackable" val="true" />
<set name="is_questitem" val="true" />
</item> </item>
<item id="48534" name="Dust of Destroyed Demon" type="EtcItem"> <item id="48534" name="Dust of Destroyed Demon" type="EtcItem">
<!-- The item that Corzet asked you to gather as evidence of defeating demons in the Silent Valley. --> <!-- The item that Corzet asked you to gather as evidence of defeating demons in the Silent Valley. -->
@ -348,6 +349,7 @@
<set name="is_depositable" val="false" /> <set name="is_depositable" val="false" />
<set name="is_sellable" val="false" /> <set name="is_sellable" val="false" />
<set name="is_stackable" val="true" /> <set name="is_stackable" val="true" />
<set name="is_questitem" val="true" />
</item> </item>
<item id="48535" name="Scroll of Escape - Silent Valley" type="EtcItem"> <item id="48535" name="Scroll of Escape - Silent Valley" type="EtcItem">
<!-- Use the scroll to teleport to the Silent Valley. --> <!-- Use the scroll to teleport to the Silent Valley. -->