Addition of quest Curse of Undying (11032).

Contributed by Dmitri.
This commit is contained in:
MobiusDevelopment
2019-11-06 00:24:00 +00:00
parent 820fd47246
commit a263eb5641
15 changed files with 341 additions and 39 deletions

View File

@@ -239,7 +239,6 @@
11028 Wind of Destiny - Encounter
11029 Wind of Destiny - Promise
11030 Wind of Destiny - Choice
11032 Curse of Undying
11033 Antidote Ingredients
11034 Resurrected One
11035 Deathly Mischief

View File

@@ -1,5 +1,5 @@
<html><body>Guard Silvan:<br>
Well, I have a little favor to ask you.<br>
There've been a lot of trouble around here lately. I can't even get a decent sleep, so I'm barely standing straight. Ugh.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11032_CurseOfUndying 33178-01.html">Ask what happened</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11032_CurseOfUndying 33178-02.html">Ask what happened</Button>
</body></html>

View File

@@ -21,6 +21,7 @@ import java.util.Set;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.instancemanager.QuestManager;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
@@ -38,6 +39,8 @@ import org.l2jmobius.gameserver.network.NpcStringId;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import org.l2jmobius.gameserver.network.serverpackets.ExTutorialShowId;
import quests.Q11032_CurseOfUndying.Q11032_CurseOfUndying;
/**
* Training Begins Now (11031)
* @URL https://l2wiki.com/Training_Begins_Now
@@ -131,6 +134,13 @@ public class Q11031_TrainingBeginsNow extends Quest
addExpAndSp(player, 48229, 43);
qs.exitQuest(false, true);
htmltext = event;
// Initialize next quest.
final Quest nextQuest = QuestManager.getInstance().getQuest(Q11032_CurseOfUndying.class.getSimpleName());
if (nextQuest != null)
{
nextQuest.newQuestState(player);
}
}
break;
}

View File

@@ -0,0 +1,5 @@
<html><body>Guard Silvan:<br>
Will, I have a little favor to ask of you.<br>
There've been a lot of trouble around here lately. I can't even get a decent sleep, so I'm barely standing straight. Ugh.
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11032_CurseOfUndying 33178-02.html">"Ask what happened".</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Guard Silvan:<br>
Ugh, have you seen Nasty Zombies and Nasty Zombie Lords around?<br>
Ugh, I can't sleep because there are so many of them, ugh.<br>
I'm not sure... May be, there is some curse on those dead people, may be, that's the case, ugh.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11032_CurseOfUndying 33178-03.html">"We have to deal with it.".</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Guard Silvan:<br>
All we can do here is to help the dead to go to their last home. It is necessary to kill <font color="LEVEL">Nasty Zombies and Nasty Zombie Lords.</font><br>
Please, do it for the sake of peace between the living and the dead. Hyaaaaah....<br>
By the way, it will be easier to complete the mission if you use <font color="LEVEL">Use Supplies Automatically</font> function. Just try it out and you'll see.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11032_CurseOfUndying teleport">Teleport</Button><br>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Tarti:<br>
Have you defeated the Nasty Zombies and Nasty Zombie Lords?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11032_CurseOfUndying 34505-02.html">Confirm</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Tarti:<br>
Sometimes even death doesn't bring peace. That's horrible... Your training's going very well by the way. Congratulations.<br>
I think I'll tell you about class change. It's pretty simple even if you're doing it for the first time.
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11032_CurseOfUndying 34505-03.html">Learn more</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Tarti:<br>
To get stronger you need to change class.<br>
Once you change class you'll be able to increase your knowledge and learn even more skills. You will learn to handle new weapons and get new abilities.<br>
In order to change class, however, you need to gain a lot of power. I ree that the challenges you've faced have made you tougher and stronger.<br>
Are you ready to change class?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11032_CurseOfUndying 34505-04.html">"Nod".</Button><br>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Tarti:<br>
Congratulations! Once you <font color="LEVEL">change your class</font> you can learn new skills. That happens every time you change class.<br>
Keep in mind, though, that class change is only possible in <font color="LEVEL">towns.</font>
</body></html>

View File

@@ -0,0 +1,247 @@
/*
* 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.Q11032_CurseOfUndying;
import java.util.HashSet;
import java.util.Set;
import org.l2jmobius.Config;
import org.l2jmobius.gameserver.data.xml.impl.CategoryData;
import org.l2jmobius.gameserver.enums.CategoryType;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.actor.Npc;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.events.EventType;
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
import org.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import org.l2jmobius.gameserver.model.events.annotations.RegisterType;
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogin;
import org.l2jmobius.gameserver.model.holders.ItemHolder;
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;
import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import org.l2jmobius.gameserver.network.serverpackets.ExTutorialShowId;
import org.l2jmobius.gameserver.network.serverpackets.classchange.ExRequestClassChangeUi;
import quests.Q11031_TrainingBeginsNow.Q11031_TrainingBeginsNow;
/**
* Curse of Undying (11032)
* @URL https://l2wiki.com/Curse_of_Undying
* @author Dmitri, Mobius
*/
public class Q11032_CurseOfUndying extends Quest
{
// NPCs
private static final int SILVAN = 33178;
private static final int TARTI = 34505;
private static final int DISGUSTING_ZOMBIES = 24382;
private static final int THE_HIDEOUS_LORD_ZOMBIE = 24383;
// Item
private static final ItemHolder SOE_SILVAN = new ItemHolder(80677, 1);
// Location
private static final Location TRAINING_GROUNDS_TELEPORT = new Location(-19204, 138941, -3896);
// Misc
private static final String KILL_COUNT_VAR = "KillCount";
public Q11032_CurseOfUndying()
{
super(11032);
addStartNpc(SILVAN);
addTalkId(SILVAN, TARTI);
addKillId(DISGUSTING_ZOMBIES, THE_HIDEOUS_LORD_ZOMBIE);
registerQuestItems(SOE_SILVAN.getId());
addCondCompletedQuest(Q11031_TrainingBeginsNow.class.getSimpleName(), getNoQuestMsg(null));
setQuestNameNpcStringId(NpcStringId.LV_1_20_CURSE_OF_UNDYING);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
String htmltext = null;
QuestState qs = getQuestState(player, false);
if (qs == null)
{
return htmltext;
}
switch (event)
{
case "33178-03.html":
{
htmltext = event;
break;
}
case "33178-02.html":
{
qs.startQuest();
player.sendPacket(new ExTutorialShowId(23)); // Adventurers Guide
htmltext = event;
break;
}
case "34505-04.html":
{
qs.setCond(4, true);
showOnScreenMsg(player, NpcStringId.CLASS_TRANSFER_IS_AVAILABLE_NCLICK_THE_CLASS_TRANSFER_ICON_IN_THE_NOTIFICATION_WINDOW_TO_TRANSFER_YOUR_CLASS, ExShowScreenMessage.TOP_CENTER, 10000);
htmltext = event;
break;
}
case "34505-03.html":
{
qs.setCond(3, true);
player.sendPacket(new ExTutorialShowId(22)); // Adventurers Guide
htmltext = event;
break;
}
case "teleport":
{
if (qs.isCond(1))
{
player.teleToLocation(TRAINING_GROUNDS_TELEPORT);
}
break;
}
case "34505-02.html":
{
if (qs.isCond(2))
{
showOnScreenMsg(player, NpcStringId.FIRST_CLASS_TRANSFER_IS_AVAILABLE_NGO_SEE_TARTI_IN_THE_TOWN_OF_GLUDIO_TO_START_THE_CLASS_TRANSFER, ExShowScreenMessage.TOP_CENTER, 10000);
addExpAndSp(player, 787633, 708);
qs.exitQuest(false, true);
if (CategoryData.getInstance().isInCategory(CategoryType.FIRST_CLASS_GROUP, player.getClassId().getId()))
{
player.sendPacket(ExRequestClassChangeUi.STATIC_PACKET);
}
htmltext = event;
break;
}
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
if (npc.getId() == SILVAN)
{
htmltext = "33178-01.html";
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case SILVAN:
{
if (qs.isCond(1))
{
htmltext = "33178-02.html";
}
break;
}
case TARTI:
{
if (qs.isCond(2))
{
htmltext = "34505-01.html";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public String onKill(Npc npc, PlayerInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(1))
{
final int killCount = qs.getInt(KILL_COUNT_VAR) + 1;
if (killCount < 30)
{
qs.set(KILL_COUNT_VAR, killCount);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
sendNpcLogList(killer);
}
else
{
qs.setCond(2, true);
qs.unset(KILL_COUNT_VAR);
giveItems(killer, SOE_SILVAN);
showOnScreenMsg(killer, NpcStringId.USE_SCROLL_OF_ESCAPE_TARTI_IN_YOUR_INVENTORY_NTALK_TO_TARTI_TO_COMPLETE_THE_QUEST, ExShowScreenMessage.TOP_CENTER, 10000);
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public Set<NpcLogListHolder> getNpcLogList(PlayerInstance player)
{
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCond(1))
{
final Set<NpcLogListHolder> holder = new HashSet<>();
holder.add(new NpcLogListHolder(NpcStringId.DEFEAT_THE_SWARM_OF_ZOMBIES.getId(), true, qs.getInt(KILL_COUNT_VAR)));
return holder;
}
return super.getNpcLogList(player);
}
@RegisterEvent(EventType.ON_PLAYER_LOGIN)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void OnPlayerLogin(OnPlayerLogin event)
{
if (Config.DISABLE_TUTORIAL)
{
return;
}
final PlayerInstance player = event.getPlayer();
if ((player == null) || !CategoryData.getInstance().isInCategory(CategoryType.FIRST_CLASS_GROUP, player.getClassId().getId()))
{
return;
}
final QuestState qs = getQuestState(player, false);
if ((qs != null) && qs.isCompleted())
{
player.sendPacket(ExRequestClassChangeUi.STATIC_PACKET);
}
}
}

View File

@@ -165,6 +165,7 @@ import quests.Q10843_AnomalyInTheEnchantedValley.Q10843_AnomalyInTheEnchantedVal
import quests.Q10851_ElvenBotany.Q10851_ElvenBotany;
import quests.Q10856_SuperionAppears.Q10856_SuperionAppears;
import quests.Q11031_TrainingBeginsNow.Q11031_TrainingBeginsNow;
import quests.Q11032_CurseOfUndying.Q11032_CurseOfUndying;
import quests.custom.Q00529_RegularBarrierMaintenance.Q00529_RegularBarrierMaintenance;
import quests.custom.Q00560_HowToOvercomeFear.Q00560_HowToOvercomeFear;
import quests.custom.Q00589_ASecretChange.Q00589_ASecretChange;
@@ -479,7 +480,7 @@ public class QuestMasterHandler
Q10900_PathToStrength.class, // TODO: Not done.
Q10901_AModelAdventurer.class, // TODO: Not done.
Q11031_TrainingBeginsNow.class,
Q11032_CurseOfUndying.class, // TODO: Not done.
Q11032_CurseOfUndying.class,
Q11034_ResurrectedOne.class, // TODO: Not done.
Q11035_DeathlyMischief.class, // TODO: Not done.
Q11037_WhyAreTheRatelHere.class, // TODO: Not done.

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 Q11032_CurseOfUndying extends Quest
{
private static final int START_NPC = 33178;
public Q11032_CurseOfUndying()
{
super(11032);
addStartNpc(START_NPC);
addTalkId(START_NPC);
addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null));
}
}

View File

@@ -706,6 +706,10 @@
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="handler" val="ItemSkills" />
<skills>
<skill id="39480" level="1" /> <!-- Scroll of Escape: Tarti -->
</skills>
</item>
<item id="80678" name="Scroll of Escape: Silvan" type="EtcItem">
<!-- Teleports you to Silvan. -->
@@ -718,6 +722,10 @@
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="handler" val="ItemSkills" />
<skills>
<skill id="39481" level="1" /> <!-- Scroll of Escape: Silvan -->
</skills>
</item>
<item id="80679" name="Scroll of Escape: Kallesin" type="EtcItem">
<!-- Teleports you to Kallesin. -->

View File

@@ -898,11 +898,47 @@
<operateType>A1</operateType>
<isMagic>4</isMagic>
<hitTime>200</hitTime>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<itemConsumeId>80677</itemConsumeId> <!-- Scroll of Escape: Tarti -->
<itemConsumeCount>1</itemConsumeCount>
<conditions>
<condition name="OpAlignment">
<affectType>CASTER</affectType>
<alignment>LAWFUL</alignment>
</condition>
<condition name="OpCanEscape" />
</conditions>
<effects>
<effect name="Teleport">
<x>-14180</x>
<y>123840</y>
<z>-3120</z>
</effect>
</effects>
</skill>
<skill id="39481" toLevel="1" name="Scroll of Escape: Silvan">
<operateType>A1</operateType>
<isMagic>4</isMagic>
<hitTime>200</hitTime>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<itemConsumeId>80678</itemConsumeId> <!-- Scroll of Escape: Silvan -->
<itemConsumeCount>1</itemConsumeCount>
<conditions>
<condition name="OpAlignment">
<affectType>CASTER</affectType>
<alignment>LAWFUL</alignment>
</condition>
<condition name="OpCanEscape" />
</conditions>
<effects>
<effect name="Teleport">
<x>-19353</x>
<y>136854</y>
<z>-3760</z>
</effect>
</effects>
</skill>
<skill id="39482" toLevel="1" name="Scroll of Escape: Kallesin">
<operateType>A1</operateType>