Addition of quest Fafurion's Minions (10517).
Contributed by Liamxroy.
This commit is contained in:
parent
11e374810d
commit
75a77de926
@ -191,7 +191,6 @@
|
||||
10423 Embryo Stronghold Ambush
|
||||
10454 Final Embryo Apostle
|
||||
10457 Kefensis' Illusion
|
||||
10517 Fafurion's Minions
|
||||
10518 Succeeding the Priestess
|
||||
10519 Controlling Your Temper
|
||||
10520 Temple Guardians
|
||||
|
@ -392,6 +392,7 @@ import quests.Q10841_DeepInsideAteliaFortress.Q10841_DeepInsideAteliaFortress;
|
||||
import quests.Q10843_AnomalyInTheEnchantedValley.Q10843_AnomalyInTheEnchantedValley;
|
||||
import quests.custom.Q00529_RegularBarrierMaintenance.Q00529_RegularBarrierMaintenance;
|
||||
import quests.custom.Q10516_UnveiledFafurionTemple.Q10516_UnveiledFafurionTemple;
|
||||
import quests.custom.Q10517_FafurionsMinions.Q10517_FafurionsMinions;
|
||||
import quests.custom.Q10529_IvoryTowersResearchFloatingSeaJournal.Q10529_IvoryTowersResearchFloatingSeaJournal;
|
||||
import quests.not_done.*;
|
||||
|
||||
@ -767,7 +768,7 @@ public class QuestMasterHandler
|
||||
Q10504_JewelOfAntharas.class,
|
||||
Q10505_JewelOfValakas.class,
|
||||
Q10516_UnveiledFafurionTemple.class, // FIXME: Custom.
|
||||
Q10517_FafurionsMinions.class, // TODO: Not done.
|
||||
Q10517_FafurionsMinions.class, // FIXME: Custom.
|
||||
Q10518_SucceedingThePriestess.class, // TODO: Not done.
|
||||
Q10519_ControllingYourTemper.class, // TODO: Not done.
|
||||
Q10520_TempleGuardians.class, // TODO: Not done.
|
||||
|
@ -0,0 +1,207 @@
|
||||
/*
|
||||
* 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.Q10517_FafurionsMinions;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.QuestSound;
|
||||
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.Q10516_UnveiledFafurionTemple.Q10516_UnveiledFafurionTemple;
|
||||
|
||||
/**
|
||||
* https://l2wiki.com/Fafurion%27s_Minions (10517)
|
||||
* @URL https://l2wiki.com/Fafurion%27s_Minions
|
||||
* @author Liamxroy
|
||||
*/
|
||||
public class Q10517_FafurionsMinions extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int START_NPC = 34489;
|
||||
private static final int[] MONSTERS =
|
||||
{
|
||||
24318,
|
||||
24319,
|
||||
24320,
|
||||
24321,
|
||||
24322,
|
||||
24323,
|
||||
24324,
|
||||
24325,
|
||||
24326,
|
||||
24327,
|
||||
24328,
|
||||
24329,
|
||||
};
|
||||
// Item
|
||||
private static final int MONSTER_DROP = 80323;
|
||||
// Misc
|
||||
private static final int REQUIRED_DROP_COUNT = 10;
|
||||
private static final int REQUIRED_KILL_COUNT = 250;
|
||||
private static final String KILL_COUNT_VAR = "KillCount";
|
||||
private static final int KILLING_NPCSTRING_ID1 = NpcStringId.LV_110_FAFURION_S_MINIONS_IN_PROGRESS.getId();
|
||||
private static final int KILLING_NPCSTRING_ID2 = NpcStringId.DEFEAT_FAFURION_S_KIN.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 = 110;
|
||||
|
||||
public Q10517_FafurionsMinions()
|
||||
{
|
||||
super(10517);
|
||||
addStartNpc(START_NPC);
|
||||
addTalkId(START_NPC);
|
||||
addKillId(MONSTERS);
|
||||
registerQuestItems(MONSTER_DROP);
|
||||
addCondMinLevel(MIN_LEVEL, getNoQuestMsg(null));
|
||||
addCondCompletedQuest(Q10516_UnveiledFafurionTemple.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, 333371214000L, 333371160);
|
||||
rewardItems(player, 46150, 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)
|
||||
{
|
||||
QuestState qs = PARTY_QUEST ? getRandomPartyMemberState(killer, -1, 3, npc) : getQuestState(killer, false);
|
||||
if ((qs != null) && qs.isCond(KILLING_COND))
|
||||
{
|
||||
giveItemRandomly(killer, npc, MONSTER_DROP, 1, REQUIRED_DROP_COUNT, 1, true);
|
||||
|
||||
final int killCount = qs.getInt(KILL_COUNT_VAR) + 1;
|
||||
if (killCount < REQUIRED_KILL_COUNT)
|
||||
{
|
||||
qs.set(KILL_COUNT_VAR, killCount);
|
||||
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
|
||||
if ((killCount >= REQUIRED_KILL_COUNT) && (getQuestItemsCount(killer, MONSTER_DROP) >= REQUIRED_DROP_COUNT))
|
||||
{
|
||||
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_ID1, true, (int) getQuestItemsCount(player, MONSTER_DROP)));
|
||||
holder.add(new NpcLogListHolder(KILLING_NPCSTRING_ID2, true, qs.getInt(KILL_COUNT_VAR)));
|
||||
return holder;
|
||||
}
|
||||
return super.getNpcLogList(player);
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
<html><body>Lupicia:<br>
|
||||
You have to defeated the monsters created by Fafurion, dwelling in Fafurion Temple and to bring her Minion’s Symbols worn by his closest minions. To hunt: <font color="LEVEL">Temple Guard Captain, Temple Guard Captain, Elite Guardian Warrior, Elite Guardian Archer, Temple Patrol Guard, Temple Knight Recruit, Temple Guard, Temple Guardian Warrior, Temple Wizard, Temple Guardian Wizard, Temple Priest, Temple Guardian Priest, Starving Water Dragon</font>. You need to get 10 <font color="LEVEL">Minion’s Symbol Minion’s Symbol</font>.
|
||||
</body></html>
|
@ -0,0 +1,4 @@
|
||||
<html><body>Lupicia:<br>
|
||||
Have you retrieved the items I asked for?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10517_FafurionsMinions reward.html">"Here are your items."</Button>
|
||||
</body></html>
|
@ -0,0 +1,3 @@
|
||||
<html><body>Lupicia:<br>
|
||||
Thank you for your assistance.
|
||||
</body></html>
|
@ -0,0 +1,5 @@
|
||||
<html><body>Lupicia:<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 Q10517_FafurionsMinions accept.htm">"Say no more. I accept."</Button>
|
||||
</body></html>
|
@ -308,6 +308,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="80324" name="Fragment of Power" type="EtcItem">
|
||||
<!-- A Fragment of Power obtained by defeating Fafurion s minions. It still contains the power that Fafurion bestowed upon his men guarding his temple. Gather the fragments and take them to Lupicia at the entrance of Fafurion Temple. -->
|
||||
|
Loading…
Reference in New Issue
Block a user