Classic branch.

This commit is contained in:
MobiusDev
2017-05-01 10:49:52 +00:00
parent 304ca84360
commit 23c1374047
19872 changed files with 3745265 additions and 0 deletions

View File

@@ -0,0 +1,253 @@
/*
* 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;
import com.l2jmobius.Config;
import com.l2jmobius.gameserver.enums.HtmlActionScope;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.instancemanager.CastleManager;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerBypass;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLevelChanged;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerLogin;
import com.l2jmobius.gameserver.model.events.impl.character.player.OnPlayerPressTutorialMark;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
import com.l2jmobius.gameserver.network.serverpackets.TutorialCloseHtml;
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml;
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowQuestionMark;
import com.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
/**
* Abstract class for quests "Letters from the Queen" and "Kekropus' Letter"
* @author malyelfik
*/
public abstract class LetterQuest extends Quest
{
private int _startSOE;
private Location _startTeleport;
private NpcStringId _startMessage;
private String _startQuestSound;
public LetterQuest(int questId)
{
super(questId);
}
/**
* Sets additional conditions that must be met to show question mark or start quest.
* @param player player trying start quest
* @return {@code true} when additional conditions are met, otherwise {@code false}
*/
public boolean canShowTutorialMark(L2PcInstance player)
{
return true;
}
/**
* Sets start quest sound.<br>
* This sound will be played when player clicks on the tutorial question mark.
* @param sound name of sound
*/
public final void setStartQuestSound(String sound)
{
_startQuestSound = sound;
}
/**
* Sets quest level restrictions.
* @param min minimum player's level to start quest
* @param max maximum player's level to start quest
*/
public final void setLevel(int min, int max)
{
addCondLevel(min, max, "");
}
/**
* Sets start location of quest.<br>
* When player starts quest, he will receive teleport scroll with id {@code itemId}.<br>
* When tutorial window is displayed, he can also teleport to location {@code loc} using HTML bypass.
* @param itemId id of item which player gets on quest start
* @param loc place where player will be teleported
*/
public final void setStartLocation(int itemId, Location loc)
{
_startSOE = itemId;
_startTeleport = loc;
}
/**
* Sets if quest is only for Ertheia characters or not.
* @param val {@code true} means {@code Race.ERTHEIA}, {@code false} means other
*/
public final void setIsErtheiaQuest(boolean val)
{
if (val)
{
addCondRace(Race.ERTHEIA, "");
_startMessage = NpcStringId.QUEEN_NAVARI_HAS_SENT_A_LETTER_NCLICK_THE_QUESTION_MARK_ICON_TO_READ;
}
else
{
addCondNotRace(Race.ERTHEIA, "");
_startMessage = NpcStringId.KEKROPUS_LETTER_HAS_ARRIVED_NCLICK_THE_QUESTION_MARK_ICON_TO_READ;
}
}
public final void setStartMessage(NpcStringId msg)
{
_startMessage = msg;
}
/**
* Gets teleport command associated with current quest.
* @return command in form Q<i>questId</i>_teleport (<i>questId</i> is replaced with original quest id)
*/
private String getTeleportCommand()
{
return "Q" + getId() + "_teleport";
}
@Override
public boolean canStartQuest(L2PcInstance player)
{
return canShowTutorialMark(player) && super.canStartQuest(player);
}
@RegisterEvent(EventType.ON_PLAYER_PRESS_TUTORIAL_MARK)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void onPlayerPressTutorialMark(OnPlayerPressTutorialMark event)
{
final L2PcInstance player = event.getActiveChar();
if ((event.getMarkId() == getId()) && canStartQuest(player))
{
final String html = getHtm(player.getHtmlPrefix(), "popup.html").replace("%teleport%", getTeleportCommand());
final QuestState st = getQuestState(player, true);
st.startQuest();
player.sendPacket(new PlaySound(3, _startQuestSound, 0, 0, 0, 0, 0));
player.sendPacket(new TutorialShowHtml(html));
giveItems(player, _startSOE, 1);
}
}
@RegisterEvent(EventType.ON_PLAYER_BYPASS)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void OnPlayerBypass(OnPlayerBypass event)
{
final L2PcInstance player = event.getActiveChar();
final QuestState st = getQuestState(player, false);
if (event.getCommand().equals(getTeleportCommand()))
{
if ((st != null) && st.isCond(1) && hasQuestItems(player, _startSOE))
{
if (CastleManager.getInstance().getCastles().stream().anyMatch(c -> c.getSiege().isInProgress()))
{
showOnScreenMsg(player, NpcStringId.YOU_MAY_NOT_TELEPORT_IN_MIDDLE_OF_A_SIEGE, ExShowScreenMessage.TOP_CENTER, 5000);
}
else if (player.isInParty())
{
showOnScreenMsg(player, NpcStringId.YOU_CANNOT_TELEPORT_IN_PARTY_STATUS, ExShowScreenMessage.TOP_CENTER, 5000);
}
else if (player.isInInstance())
{
showOnScreenMsg(player, NpcStringId.YOU_MAY_NOT_TELEPORT_WHILE_USING_INSTANCE_ZONE, ExShowScreenMessage.TOP_CENTER, 5000);
}
else if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(player))
{
showOnScreenMsg(player, NpcStringId.YOU_CANNOT_TELEPORT_IN_COMBAT, ExShowScreenMessage.TOP_CENTER, 5000);
}
else if (player.isTransformed())
{
showOnScreenMsg(player, NpcStringId.YOU_CANNOT_TELEPORT_WHILE_IN_A_TRANSFORMED_STATE, ExShowScreenMessage.TOP_CENTER, 5000);
}
else if (player.isDead())
{
showOnScreenMsg(player, NpcStringId.YOU_CANNOT_TELEPORT_WHILE_YOU_ARE_DEAD, ExShowScreenMessage.TOP_CENTER, 5000);
}
else
{
player.teleToLocation(_startTeleport);
takeItems(player, _startSOE, -1);
}
}
player.sendPacket(TutorialCloseHtml.STATIC_PACKET);
player.clearHtmlActions(HtmlActionScope.TUTORIAL_HTML);
}
}
@RegisterEvent(EventType.ON_PLAYER_LEVEL_CHANGED)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void OnPlayerLevelChanged(OnPlayerLevelChanged event)
{
if (Config.DISABLE_TUTORIAL)
{
return;
}
final L2PcInstance player = event.getActiveChar();
final QuestState st = getQuestState(player, false);
if ((st == null) && (event.getOldLevel() < event.getNewLevel()) && canStartQuest(player))
{
player.sendPacket(new TutorialShowQuestionMark(getId()));
playSound(player, QuestSound.ITEMSOUND_QUEST_TUTORIAL);
showOnScreenMsg(player, _startMessage, ExShowScreenMessage.TOP_CENTER, 10000);
}
}
@RegisterEvent(EventType.ON_PLAYER_LOGIN)
@RegisterType(ListenerRegisterType.GLOBAL_PLAYERS)
public void OnPlayerLogin(OnPlayerLogin event)
{
if (Config.DISABLE_TUTORIAL)
{
return;
}
final L2PcInstance player = event.getActiveChar();
final QuestState st = getQuestState(player, false);
if ((st == null) && canStartQuest(player))
{
player.sendPacket(new TutorialShowQuestionMark(getId()));
playSound(player, QuestSound.ITEMSOUND_QUEST_TUTORIAL);
showOnScreenMsg(player, _startMessage, ExShowScreenMessage.TOP_CENTER, 10000);
}
}
@Override
public void onQuestAborted(L2PcInstance player)
{
final QuestState st = getQuestState(player, true);
st.startQuest();
player.sendPacket(SystemMessageId.THIS_QUEST_CANNOT_BE_DELETED);
}
}

View File

@@ -0,0 +1,125 @@
245 Come to Me
482 Recertification of Value
504 Competition for the Bandit Stronghold
655 A Grand Plan for Taming Wild Beasts
744 The Alligator Hunter returns
745 The Outlaws are Incoming
746 The Reason One Cannot Wait
747 Defending the Forsaken Plains
748 Endless Revenge
750 Seven Flowers
759 The Dwarven Nightmare Continues
766 10-day Adventure
773 To Calm the Flood
774 Dreaming of peace
779 Utilize the Darkness - Seed of Destruction
780 Utilize the Darkness - Seed of Infinity
781 Utilize the Darkness - Seed of Annihilation
782 Utilize the Darkness - Seed of Hellfire
789 Waiting for Pa'agrio
792 The Superion Giants
800 Hunter Guild Request - Altar of Evil
801 Hunter Guild Request - Gludio Territory
802 Hunter Guild Request - Turek Orc Campsite
803 Hunter Guild Request - Elven Forest
804 Hunter Guild Request - Fairy Settlement
805 Hunter Guild Request - Garden of Beasts
806 Hunter Guild Request - North of the Town of Giran
807 Hunter Guild Request - Cruma Marshlands
808 Hunter Guild Request - The Fields
809 Hunter Guild Request - The Immortal Plateau
810 Hunter Guild Request - Isle of Souls
811 Hunter Guild Request - Cemetery
816 Plans to Repair the Stronghold
824 Attack the Command Post
825 Hunter Guild Request - Valley of Saints
826 In Search of the Secret Weapon
827 Einhasad's Order
828 Eva's Blessing
829 Maphr's Salvation
830 The Way of the Giant's Pawn
831 Sayha's Scheme
832 Hunter Guild Request - Southern Region, Isle of Prayer
833 Devil's Treasure, Tauti
834 Against Dragonclaw
835 Pitiable Melisa
836 Request from the Blackbird Clan
837 Request from the Giant Trackers
838 Request from the Mother Tree Guardians
839 Request from the Unworldly Visitors
840 Request from the Kingdom's Royal Guard
841 Contamination Containment
842 Captive Demons
843 Giant Evolution Control
844 Giant's Treasure
845 Sabotage the Embryo Supplies
846 Building up Strength
910 Red Libra Request - Lv. 1
911 Red Libra Request - Lv. 2
912 Red Libra Request - Lv. 3
913 Red Libra Request - Lv. 4
914 Red Libra Request - Lv. 5
922 Hunter Guild Request - Northern Region, Isle of Prayer
923 Shinedust Extraction
924 Giant of the Restoration Room
925 Hunter Guild Request - Garden of Spirits
926 Exploring the Dimension - 30-day Search Operation
928 100-day Subjugation Operation
929 Seeker Rescue
930 Disparaging the Phantoms
931 Memories of the Wind
932 Sayha's Energy
937 To Revive the Fishing Guild
938 The Fisherman's Other Hobby
940 Hunter Guild Request - Atelia Fortress
10298 Wasteland Queen
10357 Altar of Blood that Awakens Destruction
10373 Exploring the Dimension - Sealing the Dimension
10396 Witch of Spores
10418 The Immortal Pirate King
10456 Operation: Rescue
10457 Kefensis' Illusion
10506 Diana's Request
10521 Queen Navari's Letter: Varka Silenos Barracks Achieve Level 76
10522 The Dark Secret of Varka Silenos Reveal the dark secret
10523 The Assassination of the Varka Silenos Commander Defeat Varka's Commander Mos
10524 The Assassination of the Varka Silenos Commander Chief Defeat Varka's Chief Horus
10525 Queen Navari's Letter, Ketra Orc Outpost Achieve Level 76
10526 The Dark Secret of the Ketra Orcs Reveal the dark secret
10527 The Assassination of the Ketra Orc Commander Defeat Ketra's Commander Tayr
10528 The Assassination of the Ketra Orc Chief Defeat Ketra's Chief Brakki
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
10534 Hatchling Research Bizarre Research
10537 Kamael Disarray To Retbach
10538 Giant's Evolution Cause of failed evolution
10539 Energy Supply Cutoff Plan Defeat Halisha's Henchman
10540 Thwarting Mimir's Plan Defeating Mimir
10658 Makkum in the Dimension Dimensional Makkum
10717 The Minstrel's Song, Part 2
10720 The Minstrel's Song, Part 3
10723 The Minstrel's Song, Part 4
10726 The Minstrel's Song, Part 5
10748 Mysterious Suggestion - 1
10749 Mysterious Suggestion - 2
10801 The Dimensional Warp, Part 1
10802 The Dimensional Warp, Part 2
10803 The Dimensional Warp, Part 3
10804 The Dimensional Warp, Part 4
10805 The Dimensional Warp, Part 5
10806 The Dimensional Warp, Part 6
10807 The Dimensional Warp, Part 7
10844 Bloody Battle - Seizing Supplies
10845 Bloody Battle - Rescue the Smiths
10846 Bloody Battle - Meeting the Commander
10848 Trials before the Battle
10849 Trials for Adaptation
10851 Elven Botany
10852 The Mother Tree Revival Project
10853 To Weaken the Giants
10854 To Seize the Fortress
10856 Superion Appears
10857 Secret Teleport
10858 Queen Ramona, Controller of the Vessel
10859 Own the Earth and the Heavens

View File

@@ -0,0 +1,6 @@
<html><body>Mineral Trader Fundin:<br>
I have an urgent delivery to the Forge of the Gods!<br>
I am too busy to make the delivery myself. What? I don't look that busy? Well... To be honest, the Forge of the Gods is way too dangerous... So...<br>
Would you make the delivery for me?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00013_ParcelDelivery 31274-02.html">"Okay."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mineral Trader Fundin:<br>
My delivery to the Gods' Cauldron area is too important for a novice!<br>
(This quest can only be undertaken by a character of level 74 or above.)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Mineral Trader Fundin:<br>
Take this to<font color="LEVEL"> Flame Blacksmith Vulcan on the lower level of the Forge of the Gods.</font> He'll reward you for it, he's been waiting.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Vulcan, Blacksmith of the Flame:<br>
Did Fundin send you? A little late, but at least you didn't break it.<br>
Let me have it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00013_ParcelDelivery 31539-01.html">Here</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Vulcan, Blacksmith of the Flame:<br>
It's all here, thanks.<br>
Here's a token of my thanks.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Vulcan, Blacksmith of the Flame:<br>
You don't have required items.
</body></html>

View File

@@ -0,0 +1,119 @@
/*
* 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.Q00013_ParcelDelivery;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
/**
* Parcel Delivery (13)
* @author nonom
*/
public class Q00013_ParcelDelivery extends Quest
{
// NPCs
private static final int FUNDIN = 31274;
private static final int VULCAN = 31539;
// Item
private static final int PACKAGE = 7263;
// Misc
private static final int MIN_LEVEL = 74;
public Q00013_ParcelDelivery()
{
super(13);
addStartNpc(FUNDIN);
addTalkId(FUNDIN, VULCAN);
registerQuestItems(PACKAGE);
addCondMinLevel(MIN_LEVEL, "31274-01.html");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
switch (event)
{
case "31274-02.html":
st.startQuest();
giveItems(player, PACKAGE, 1);
break;
case "31539-01.html":
if (st.isCond(1) && hasQuestItems(player, PACKAGE))
{
giveAdena(player, 271980, true);
addExpAndSp(player, 1_279_632, 307);
st.exitQuest(false, true);
}
else
{
htmltext = "31539-02.html";
}
break;
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
if (st == null)
{
return htmltext;
}
final int npcId = npc.getId();
switch (st.getState())
{
case State.CREATED:
if (npcId == FUNDIN)
{
htmltext = "31274-00.htm";
}
break;
case State.STARTED:
if (st.isCond(1))
{
switch (npcId)
{
case FUNDIN:
htmltext = "31274-02.html";
break;
case VULCAN:
htmltext = "31539-00.html";
break;
}
}
break;
case State.COMPLETED:
htmltext = getAlreadyCompletedMsg(player);
break;
}
return htmltext;
}
}

View File

@@ -0,0 +1,5 @@
<html><body>Trader Vladimir:<br>
Sir, can I talk to you for a second? You know the world has gotten so dangerous these days that honing your own strength is your best protection.<br>
I'd like to help you to get a new power. Are you interested?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00015_SweetWhispers 31302-01.html"> "What kind of power is it?" </Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Vladimir:<br>
You need more training before we can talk.<br>
(This quest may only be undertaken by a character of level 60 or above.)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Vladimir:<br>
Excellent, I'll tell you what to do. Find the <font color="LEVEL">Mysterious Necromancer</font> at the entrance to the <font color="LEVEL">Valley of Saints</font>. He'll help you test your fate. Look for someone from my guild if you should need help.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Vladimir:<br>
Find the <font color="LEVEL">mysterious Necromancer</font> at the entrance to the <font color="LEVEL">Valley of Saints</font>. He'll help you test your fate.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
What are you doing here? We don't let just anybody in here!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00015_SweetWhispers 31517-01.html">"Vladimir sent me."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Hierarch:<br>
Oh, he sent you! Fine! We'll be working together then! Your first task will only be a test. After I assess your ability, I'll assign you a mission that's more appropriate for you. Come back later.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mysterious Necromancer:<br>
What business do you have here? What do you want from me?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00015_SweetWhispers 31518-01.html">"I want to change my ways."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mysterious Necromancer:<br>
Ah! You're looking for the elder too, aren't you? Lots of folks looking for him these days... This is getting old! Do I look like a street sign to you?<br>
Anyway, past the Entrance of the Saints, you'll see the valley. Go to the deepest part of the valley and enter the cave. You'll find the elder there.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Mysterious Necromancer:<br>
Hmmph! I've already told you where to look for him! Past the Entrance of the Saints you'll see the valley. Go to the deepest part of the valley and enter the cave there. You'll find the elder that you seek.
</body></html>

View File

@@ -0,0 +1,131 @@
/*
* 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.Q00015_SweetWhispers;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
/**
* Sweet Whispers (15)
* @author nonom
*/
public class Q00015_SweetWhispers extends Quest
{
// NPCs
private static final int VLADIMIR = 31302;
private static final int HIERARCH = 31517;
private static final int M_NECROMANCER = 31518;
// Misc
private static final int MIN_LEVEL = 60;
public Q00015_SweetWhispers()
{
super(15);
addStartNpc(VLADIMIR);
addTalkId(VLADIMIR, HIERARCH, M_NECROMANCER);
addCondMinLevel(MIN_LEVEL, "31302-00a.html");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
switch (event)
{
case "31302-01.html":
st.startQuest();
break;
case "31518-01.html":
if (st.isCond(1))
{
st.setCond(2);
}
break;
case "31517-01.html":
if (st.isCond(2))
{
addExpAndSp(player, 714215, 171);
st.exitQuest(false, true);
}
break;
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
if (st == null)
{
return htmltext;
}
final int npcId = npc.getId();
switch (st.getState())
{
case State.CREATED:
if (npcId == VLADIMIR)
{
htmltext = "31302-00.htm";
}
break;
case State.STARTED:
switch (npcId)
{
case VLADIMIR:
if (st.isCond(1))
{
htmltext = "31302-01a.html";
}
break;
case M_NECROMANCER:
switch (st.getCond())
{
case 1:
htmltext = "31518-00.html";
break;
case 2:
htmltext = "31518-01a.html";
break;
}
break;
case HIERARCH:
if (st.isCond(2))
{
htmltext = "31517-00.html";
}
break;
}
break;
case State.COMPLETED:
htmltext = getAlreadyCompletedMsg(player);
break;
}
return htmltext;
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Evil Altar:<br>
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31512-02.htm">Place the crystal in the space under the altar</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Evil Altar:<br>
The altar makes an ominous sound as the seal loosens and the crystal disappears. Try the next altar.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Evil Altar:<br>
There is space at the altar, but the crystal is missing. You must return to the Heirarch.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Evil Altar:<br>
The altar looks the same as the seal loosens, but feels different. Fear washes over you.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Evil Altar:<br>
As with the previous altar, there is a space underneath where the crystal will easily fit.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31513-02.htm">Place the crystal in the space under the altar</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Evil Altar:<br>
The seal is loosening! The power is getting stronger.<br>
Find the next altar.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Evil Altar:<br>
There is space at the altar, but the crystal is missing. You must return to the Heirarch.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Evil Altar:<br>
The altar looks the same as the seal continues to loosen, but it feels different.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Evil Altar:<br>
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31514-02.htm">Place the crystal in the space under the altar</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Evil Altar:<br>
The power is growing stronger as the seal loosens.<br>
Find the next altar.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Evil Altar:<br>
There is space at the altar, but the crystal is missing. You must return to the Heirarch.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Evil Altar:<br>
The seal is loosening. Your faith is being tested.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Evil Altar:<br>
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31515-02.htm">Place the crystal in the space under the altar</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Evil Altar:<br>
The power is growing stronger as the seal loosens.<br>
Find the next altar.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Evil Altar:<br>
There is space at the altar, but the crystal is missing. You must return to the Heirarch.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Evil Altar:<br>
The seal is almost removed and the power is growing stronger. If you continue, you won't be able to stop it.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Evil Altar:<br>
Upon close examination, you discover a place under the altar where the crystal will easily fit.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31516-02.htm">Place the crystal in the space under the altar</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Evil Altar:<br>
The seal is almost loose, and it emanates great power.<br>
Visit the Tetrarch in the neighborhood.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Evil Altar:<br>
There is space at the altar, but the crystal is missing. You must return to the Heirarch.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Evil Altar:<br>
The seal is removed.<br1>
Visit the Heirarch in the neighborhood.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
Brother, you've been with us for a long time! You've earned our trust, and therefore I believe you're ready for an important mission!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31517-02.htm">"I'm ready!"</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
You're very well prepared! I wish all of us could be as well prepared as you! You've chosen a path that holds many trials, one that your brothers have traveled before you! Do you have the faith you'll need to complete your journey?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00016_TheComingDarkness 31517-03.htm">"I have enough faith."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
Very well. Based on the trust we have for you, brother, I'll give you a mission. Use these five crystals of sealing to break open the seals that have been placed throughout this region. Watch the altar carefully; you'll discover how to use these crystals. I'll wait here until you break all the seals and return.<br1>
First, you must go to the altar near the entrance of the Valley of Saints. Your mission begins there. Good luck!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Hierarch:<br>
You haven't finished your job yet! Come back when you've broken the seal. I'll be waiting.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Hierarch:<br>
You've done well! Welcome to the brotherhood! You're now a member of the Benandanti Cartel! I'll see that you're well-rewarded!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
Where are the crystals of sealing? How could you betray us, your brothers?<br>
Very well, you are no longer our brother! We cast you out in the name of Triol! May the rest of your days be filled with pain and agony...
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
We've spent much time together, dear brother, but I regret to tell you that you're not yet ready! Try again when your faith and conviction are more firmly established.<br>
(Only characters of level 62 and above may undertake this quest.)
</body></html>

View File

@@ -0,0 +1,287 @@
/*
* 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.Q00016_TheComingDarkness;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import quests.Q00017_LightAndDarkness.Q00017_LightAndDarkness;
/**
* The Coming Darkness (16)
* @author Gladicek
*/
public final class Q00016_TheComingDarkness extends Quest
{
// NPCs
private static final int HIERARCH = 31517;
private static final int EVIL_ALTAR_1 = 31512;
private static final int EVIL_ALTAR_2 = 31513;
private static final int EVIL_ALTAR_3 = 31514;
private static final int EVIL_ALTAR_4 = 31515;
private static final int EVIL_ALTAR_5 = 31516;
// Item
private static final int CRYSTAL_OF_SEAL = 7167;
// Misc
private static final int MIN_LEVEL = 62;
public Q00016_TheComingDarkness()
{
super(16);
addStartNpc(HIERARCH);
addTalkId(HIERARCH, EVIL_ALTAR_1, EVIL_ALTAR_2, EVIL_ALTAR_3, EVIL_ALTAR_4, EVIL_ALTAR_5);
registerQuestItems(CRYSTAL_OF_SEAL);
addCondMinLevel(MIN_LEVEL, "31517-07.html");
addCondCompletedQuest(Q00017_LightAndDarkness.class.getSimpleName(), "");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return htmltext;
}
switch (event)
{
case "31517-03.htm":
{
qs.startQuest();
giveItems(player, CRYSTAL_OF_SEAL, 5);
break;
}
case "31512-02.htm":
{
if (qs.isCond(1))
{
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
{
qs.setMemoState(1);
qs.setCond(2);
takeItems(player, CRYSTAL_OF_SEAL, 1);
htmltext = event;
}
else
{
htmltext = "31512-03.html";
}
}
break;
}
case "31513-02.htm":
{
if (qs.isCond(2))
{
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
{
qs.setMemoState(2);
qs.setCond(3);
takeItems(player, CRYSTAL_OF_SEAL, 1);
htmltext = event;
}
else
{
htmltext = "31513-03.html";
}
}
break;
}
case "31514-02.htm":
{
if (qs.isCond(3))
{
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
{
qs.setMemoState(3);
qs.setCond(4);
takeItems(player, CRYSTAL_OF_SEAL, 1);
htmltext = event;
}
else
{
htmltext = "31514-03.html";
}
}
break;
}
case "31515-02.htm":
{
if (qs.isCond(4))
{
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
{
qs.setMemoState(4);
qs.setCond(5);
takeItems(player, CRYSTAL_OF_SEAL, 1);
htmltext = event;
}
else
{
htmltext = "31515-03.html";
}
}
break;
}
case "31516-02.htm":
{
if (qs.isCond(5))
{
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
{
qs.setMemoState(5);
qs.setCond(6);
takeItems(player, CRYSTAL_OF_SEAL, 1);
htmltext = event;
}
else
{
htmltext = "31516-03.html";
}
break;
}
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
switch (qs.getState())
{
case State.CREATED:
{
if (npc.getId() == HIERARCH)
{
htmltext = "31517-01.html";
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case HIERARCH:
{
if ((qs.getCond() >= 1) && (qs.getCond() <= 5))
{
if (hasQuestItems(player, CRYSTAL_OF_SEAL))
{
htmltext = "31517-04.html";
}
else
{
if (!isSimulated)
{
qs.exitQuest(true, true);
}
htmltext = "31517-06.html";
}
break;
}
else if (qs.isCond(6))
{
if (!isSimulated)
{
addExpAndSp(player, 1_795_524, 79);
qs.exitQuest(false, true);
}
htmltext = "31517-05.html";
}
}
break;
case EVIL_ALTAR_1:
{
if (qs.isCond(1))
{
htmltext = "31512-01.html";
}
else if (qs.isMemoState(1))
{
htmltext = "31512-04.html";
}
break;
}
case EVIL_ALTAR_2:
{
if (qs.isCond(2))
{
htmltext = "31513-01.html";
}
else if (qs.isMemoState(2))
{
htmltext = "31513-04.html";
}
break;
}
case EVIL_ALTAR_3:
{
if (qs.isCond(3))
{
htmltext = "31514-01.html";
}
else if (qs.isMemoState(3))
{
htmltext = "31514-04.html";
}
break;
}
case EVIL_ALTAR_4:
{
if (qs.isCond(4))
{
htmltext = "31515-01.html";
}
else if (qs.isMemoState(4))
{
htmltext = "31515-04.html";
}
break;
}
case EVIL_ALTAR_5:
{
if (qs.isCond(5))
{
htmltext = "31516-01.html";
}
else if (qs.isMemoState(5))
{
htmltext = "31516-04.html";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Altar of Saints:<br>
The first Altar of Saints has a desolate atmosphere. You know that you need to sprinkle the Blood of Saint here, but you feel apprehensive. You begin to feel faint...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00017_LightAndDarkness 31508-02.htm">Sprinkle the Blood of Saint.</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
The Blood of Saint you sprinkled on the Altar of Saints quickly disappeared. You're starting to feel better now. It's time to move on!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
Behold, the Altar of Saints! As instructed, you put your hand in your pocket to prepare to sprinkle the blood, and... The Blood of Saint is gone! Did you lose it on your way here? This is terrible!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
An Altar of Saints that has lost its power. All traces of purity have disappeared. Hurry along, much remains to be done.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Altar of Saints:<br>
The second Altar of Saints. The atmosphere is similar to that of the previous altar. You know that you should sprinkle the Blood of Saint here as you were told, but you're hesitant... You begin to feel faint...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00017_LightAndDarkness 31509-02.htm">Sprinkle the Blood of Saint.</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
The Altar of Saints reacts to the Blood of Saint. You're starting to feel better. The altar appears depleted. It's time to move on.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
Behold, the Altar of Saints! As instructed, you put your hand in your pocket to prepare to sprinkle the blood, and... The Blood of Saint is gone! Perhaps you lost it on your way here. What shall you do?!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
The altar is depleted of its power. Its former atmosphere of purity has dissipated. Only two more altars to go.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Altar of Saints:<br>
At last, the third Altar of Saints! No less forbidding than the first two!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00017_LightAndDarkness 31510-02.htm">Sprinkle the Blood of Saint.</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
The Altar of Saints reacts. It seems the Blood of Saint has relieved the altar of its purity. One more altar to go.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
Behold, the Altar of Saints! As instructed, you put your hand in your pocket to prepare to sprinkle the blood, and... The Blood of Saint is gone! Perhaps you lost it on your way here!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
The altar is depleted of its power. Its former purity is gone. One more altar to go.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Altar of Saints:<br>
The last Altar of Saints looks the same as the others. You're starting to feel more comfortable. That could be good or bad!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00017_LightAndDarkness 31511-02.htm">Sprinkle the Blood of Saint.</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
The Altar of Saints is behaving strangely. This is getting tiresome. It seems tthat I'm changed a lot. Time to go back and see the elder.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
Behold, the Altar of Saints! As instructed, you put your hand in your pocket to prepare to sprinkle the blood, and... The Blood of Saint is gone! Perhaps you lost it on your way here. What shall you do?!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Altar of Saints:<br>
The altar is depleted of its power. Its former purity has dissipated. The quest is complete. Return to the elder.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
You have been with us for quite some time! You've earned our trust, and therefore I believe you are ready for an important mission! Are you up to the task?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00017_LightAndDarkness 31517-02.htm">"What do you need done?"</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
Before I tell you, I need to ask you something. How strong is your faith in the work that we do? Are you certain that you can persevere no matter what happens while carrying out this mission?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00017_LightAndDarkness 31517-03.htm">"I can do anything."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
Very well, then. Listen carefully! Go to the Altar of Saints, sprinkle this Blood of Saint on it and then come back. You may think that this sounds simple... But I warn you... Unless your faith in us is very strong, you won't complete this mission!<br1>
So go sprinkle the blood on the Altar of Saints! You can see it from the path by the entrance to the Valley of Saints. Don't get lost on your way there! May Triol watch over you...
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Hierarch:<br>
You haven't finished your mission. Come back when you're done.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Hierarch:<br>
Well done! Our trust in you has proven well placed thus far. Someday, perhaps, you will truly be one of us. Congratulations!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
Where is the Blood of Saint I gave you? How could you betray our trust like that?!<br>
You are no longer our brother! Get out! We cast you out in the name of Triol! May your remaining days be full of terrible pain and suffering...
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Hierarch:<br>
We've spent much time together, dear brother, but I regret to tell you that you're not yet ready! Try again when your faith and conviction are more firmly established.<br>
(Only characters of level 61 and above may undertake this quest.)
</body></html>

View File

@@ -0,0 +1,260 @@
/*
* 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.Q00017_LightAndDarkness;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import quests.Q00015_SweetWhispers.Q00015_SweetWhispers;
/**
* Light And Darkness (17)
* @author Gladicek
*/
public final class Q00017_LightAndDarkness extends Quest
{
// NPCs
private static final int HIERARCH = 31517;
private static final int SAINT_ALTAR_1 = 31508;
private static final int SAINT_ALTAR_2 = 31509;
private static final int SAINT_ALTAR_3 = 31510;
private static final int SAINT_ALTAR_4 = 31511;
// Item
private static final int BLOOD_OF_SAINT = 7168;
// Misc
private static final int MIN_LEVEL = 61;
public Q00017_LightAndDarkness()
{
super(17);
addStartNpc(HIERARCH);
addTalkId(HIERARCH, SAINT_ALTAR_1, SAINT_ALTAR_2, SAINT_ALTAR_3, SAINT_ALTAR_4);
registerQuestItems(BLOOD_OF_SAINT);
addCondMinLevel(MIN_LEVEL, "31517-07.html");
addCondCompletedQuest(Q00015_SweetWhispers.class.getSimpleName(), "");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return htmltext;
}
switch (event)
{
case "31517-03.htm":
{
qs.startQuest();
giveItems(player, BLOOD_OF_SAINT, 4);
}
break;
case "31508-02.htm":
{
if (qs.isCond(1))
{
if (hasQuestItems(player, BLOOD_OF_SAINT))
{
qs.setMemoState(1);
qs.setCond(2);
takeItems(player, BLOOD_OF_SAINT, 1);
htmltext = event;
}
else
{
htmltext = "31508-03.html";
}
}
break;
}
case "31509-02.htm":
{
if (qs.isCond(2))
{
if (hasQuestItems(player, BLOOD_OF_SAINT))
{
qs.setMemoState(2);
qs.setCond(3);
takeItems(player, BLOOD_OF_SAINT, 1);
htmltext = event;
}
else
{
htmltext = "31512-03.html";
}
}
break;
}
case "31510-02.htm":
{
if (qs.isCond(3))
{
if (hasQuestItems(player, BLOOD_OF_SAINT))
{
qs.setMemoState(3);
qs.setCond(4);
takeItems(player, BLOOD_OF_SAINT, 1);
htmltext = event;
}
else
{
htmltext = "31512-03.html";
}
}
break;
}
case "31511-02.htm":
{
if (qs.isCond(4))
{
if (hasQuestItems(player, BLOOD_OF_SAINT))
{
qs.setMemoState(4);
qs.setCond(5);
takeItems(player, BLOOD_OF_SAINT, 1);
htmltext = event;
}
else
{
htmltext = "31512-03.html";
}
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
if (qs == null)
{
return htmltext;
}
switch (qs.getState())
{
case State.CREATED:
{
if (npc.getId() == HIERARCH)
{
htmltext = "31517-01.html";
}
break;
}
case State.STARTED:
{
switch (npc.getId())
{
case HIERARCH:
{
if ((qs.getCond() >= 1) && (qs.getCond() <= 4))
{
if (hasQuestItems(player, BLOOD_OF_SAINT))
{
htmltext = "31517-04.html";
}
else
{
if (!isSimulated)
{
qs.exitQuest(true, true);
}
htmltext = "31517-06.html";
}
break;
}
else if (qs.isCond(5))
{
if (!isSimulated)
{
addExpAndSp(player, 1_469_840, 352);
qs.exitQuest(false, true);
}
htmltext = "31517-05.html";
}
}
break;
case SAINT_ALTAR_1:
{
if (qs.isCond(1))
{
htmltext = "31508-01.html";
}
else if (qs.isMemoState(1))
{
htmltext = "31508-04.html";
}
break;
}
case SAINT_ALTAR_2:
{
if (qs.isCond(2))
{
htmltext = "31509-01.html";
}
else if (qs.isMemoState(2))
{
htmltext = "31509-04.html";
}
break;
}
case SAINT_ALTAR_3:
{
if (qs.isCond(3))
{
htmltext = "31510-01.html";
}
else if (qs.isMemoState(3))
{
htmltext = "31510-04.html";
}
break;
}
case SAINT_ALTAR_4:
{
if (qs.isCond(4))
{
htmltext = "31511-01.html";
}
else if (qs.isMemoState(4))
{
htmltext = "31511-04.html";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Trader Vladimir:<br>
What.., is everyone here DEAF?!<br>Hey... you! Can you help me? I ordered meat from that farm... look at the crap they gave me! I'm too mad to go myself, I wonder if you would return this for me?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00019_GoToThePastureland 31302-02.htm">"I will."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Vladimir:<br>
Is that you? Here. Take this meat! <font color="LEVEL">Farm Manager Tunatun</font> sent it to me, but it's disgusting.<br>
I see red just thinking about it! I can't decide if he doesn't know any better, or if he's trying to slip one by me. Between you and me, I won't buy anything from him!<br>
Not if he paid me! But you might like it...
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Trader Vladimir:<br>
You? How could someone as inexperienced as you TRULY know how to deal with meat?<br>
The answer is... you can't. Come back after you gain more experience.<br>
(Only character with level 82 or above can take on this quest.)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Vladimir:<br>
Did you find the Farm manager? What are you doing? And can you get rid of this meat before it stinks? The quality isn't good enough.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Beast Herder Tunatun:<br>
What? Vladimir said that? Hmm...<br>
Actually, that is the best meat I can get. Unless a skilled adventurer shows up...<br>
There is nothing else I can do. This is the only time I will accept a return. But I still look forward to doing business. Do I have any change?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00019_GoToThePastureland 31537-02.htm">Say that he said he doesn't need it</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Beast Herder Tunatun:<br>
He's a cranky one, eh!<br>
But I can't do that. I can apologize to him later. But you should take this money. I'll feel better that way when I pay a visit later.<br>
Now, I'm in need of a skilled, feared, willing adventurer to help me acquire good meat, if ONLY there was one nearby...?
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Beast Herder Tunatun:<br>
I see. Then, first return the meat... What? You didn't bring the meat? How would I know if he sent you?
</body></html>

View File

@@ -0,0 +1,122 @@
/*
* 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.Q00019_GoToThePastureland;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
/**
* Go to the Pastureland (19)
* @author malyelfik
*/
public final class Q00019_GoToThePastureland extends Quest
{
// NPCs
private static final int VLADIMIR = 31302;
private static final int TUNATUN = 31537;
// Items
private static final int VEAL = 15532;
private static final int YOUNG_WILD_BEAST_MEAT = 7547;
// Misc
private static final int MIN_LEVEL = 82;
public Q00019_GoToThePastureland()
{
super(19);
addStartNpc(VLADIMIR);
addTalkId(VLADIMIR, TUNATUN);
registerQuestItems(VEAL, YOUNG_WILD_BEAST_MEAT);
addCondMinLevel(MIN_LEVEL, "31302-03.html");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return getNoQuestMsg(player);
}
if (event.equalsIgnoreCase("31302-02.htm"))
{
st.startQuest();
giveItems(player, VEAL, 1);
}
else if (event.equalsIgnoreCase("31537-02.htm"))
{
if (hasQuestItems(player, YOUNG_WILD_BEAST_MEAT))
{
giveAdena(player, 50000, true);
addExpAndSp(player, 136766, 59); // TODO: Retail like SP value
st.exitQuest(false, true);
htmltext = event;
}
else if (hasQuestItems(player, VEAL))
{
giveAdena(player, 299928, true);
addExpAndSp(player, 1_456_218, 349);
st.exitQuest(false, true);
htmltext = event;
}
else
{
htmltext = "31537-03.html";
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
if (npc.getId() == VLADIMIR)
{
switch (st.getState())
{
case State.CREATED:
{
htmltext = "31302-01.html";
break;
}
case State.STARTED:
{
htmltext = "31302-04.html";
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
}
else if ((npc.getId() == TUNATUN) && (st.isCond(1)))
{
htmltext = "31537-01.html";
}
return htmltext;
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Beast Herder Tunatun:<br>
Ahh... I love the farm, but I wonder what they will become when they mature.<br>It's not always easy to farm beasts, you know. Even as manager of this place, I can only do so much to command those beasts... Do you know anyone skilled with such beasts...?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-02.htm">Say that you will help</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Beast Herder Tunatun:<br>
You...? I agree you look the part, but know that these beasts won't care how you look. You must stay in control. The young are docile, it's the adults to watch out for. Are you sure you are ready?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-03.htm">Say that you are ready</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Beast Herder Tunatun:<br>
If you say so...<br>
First, take this <font color="LEVEL">Beast Handler's Whip</font>. Do I need to show you how this works?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-04.htm">Say that you know</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-05.htm">Say that you don't know</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Beast Herder Tunatun:<br>
Well, the lesson is almost over.<br>
If you feel ready, there's only one way to know for sure.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-08.htm">Say that you know</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-12.htm">Say that you don't know</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Beast Herder Tunatun:<br>
The Beast Handler's Whip is a necessity on this farm.<br>
One beast used to be our limit, but thanks to the Beast Handler's Whip it isn't a problem controlling more.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-06.htm">Continue to listen to the story</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Beast Herder Tunatun:<br>
That's not the only reason. When you use this Beast Handler's Whip, you can use a variety supplemental magic on the cubs you train.<br>
The more kinds of beasts you train, the greater the magic you can use!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-07.htm">Continue to listen to the story</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Beast Herder Tunatun:<br>
If somehow you lose the Beast Handler's Whip, let me know. I'll give you another one.<br>
Before we begin.. Do you need a few tips?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-08.htm">Say that you know</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-12.htm">Say that you don't know</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Beast Herder Tunatun:<br>
The next step is simple. The cubs need proper positive attention. They only recognize you as their master if you raise them right.<br>
But, if you ignore them and leave them to their own mischief... Well let's just say you won't be bringing one home for the kids!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-09.htm">"And then?"</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Beast Herder Tunatun:<br>
Now sometimes, and I do mean rarely, a cub remains purely innocent and good, without any trace of evil. Again, this is rare. But when it does happen, that cub will produce a white jewel.<br>
We call this jewel a <font color="LEVEL">Jewel of Innocence</font>. It's a product of the cub's pure love for its master.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-10.htm">"So, what you really want to say is...?"</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Beast Herder Tunatun:<br>
You've guessed it, I want that Jewel of Innocence! Beasts crave them, but only the person who raised the cub can retrieve the Jewel of Innocence.<br>
Also, and I don't know why, but you only get one chance to acquire that jewel. I've only seen it once, truly unforgettable to say the least...<br>
Get this jewel for me and the reward will be great. What do you say?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-11.html">Say that you will</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Beast Herder Tunatun:<br>
I hope you aren't all talk! Feed them, diligently, with Feed from the Feed Sellers, and fortune may shine on you... with a jewel!<br>
However, a beast with any evil in it can be dangerous. So be careful! I'll be waiting for that jewel.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Beast Herder Tunatun:<br>
Pay attention. You see those Feed Sellers?<br>
Purchase the Feed from them, and let <font color="LEVEL">Alpine Buffalo, Alpine Grendel, Alpine Kookaburra, Alpine Cougar</font> eat the Feed to make them grow.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-08.htm">Listen to the next story</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Beast Herder Tunatun:<br>
Ahh... I love the farm, but I wonder what they will become when they mature.<br>
It's not always easy to farm beasts, you know. Even as manager of this place, I can only do so much to command those beasts... Do you know anyone skilled with such beasts...?<br>
Feral beasts are too dangerous for pretenders and beginners....<br>
(Only characters of level 82 and above are permitted to take on this quest.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Beast Herder Tunatun:<br>
Buy food from the Feed Sellers. Without food the beasts turn feral. If that happens you've wasted everyone's time. So do us both a favor, have enough food ready.<br>
The cubs you can raise are <font color="LEVEL">Alpine Buffalo, Alpine Grendel, Alpine Kookaburra, and Alpine Cougar</font>. So raise em' right. And when you do... bring me a Jewel of Innocence!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Beast Herder Tunatun:<br>
The Jewel of Innocence! You aren't thinking of keeping it, are you? I'll pay you now..<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00020_BringUpWithLove 31537-16.html">Give it to him</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Beast Herder Tunatun:<br>
Ahh, it has been too long...! The way light catches it, the color, the texture, the...<br>
Oh... I, I'm crying. Don't mind me...<br>
This Jewel... when I hold it I remember the innocence of my youth. I remember a dream...<br>
I dreamed about making the world a better place. Yes, I was young. But I realize now I still dream this.<br>
I have to do something, I have to act.
</body></html>

View File

@@ -0,0 +1,145 @@
/*
* 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.Q00020_BringUpWithLove;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
/**
* Bring Up With Love (20)
* @author Adry_85
*/
public class Q00020_BringUpWithLove extends Quest
{
// NPC
private static final int TUNATUN = 31537;
// Items
private static final int WATER_CRYSTAL = 9553;
private static final int INNOCENCE_JEWEL = 15533;
// Misc
private static final int MIN_LEVEL = 82;
public Q00020_BringUpWithLove()
{
super(20);
addStartNpc(TUNATUN);
addTalkId(TUNATUN);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "31537-02.htm":
case "31537-03.htm":
case "31537-04.htm":
case "31537-05.htm":
case "31537-06.htm":
case "31537-07.htm":
case "31537-08.htm":
case "31537-09.htm":
case "31537-10.htm":
case "31537-12.htm":
{
htmltext = event;
break;
}
case "31537-11.html":
{
qs.startQuest();
htmltext = event;
break;
}
case "31537-16.html":
{
if (qs.isCond(2) && hasQuestItems(player, INNOCENCE_JEWEL))
{
giveItems(player, WATER_CRYSTAL, 1);
takeItems(player, INNOCENCE_JEWEL, -1);
qs.exitQuest(false, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (qs == null)
{
return htmltext;
}
switch (qs.getState())
{
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
case State.CREATED:
{
htmltext = player.getLevel() >= MIN_LEVEL ? "31537-01.htm" : "31537-13.html";
break;
}
case State.STARTED:
{
switch (qs.getCond())
{
case 1:
{
htmltext = "31537-14.html";
break;
}
case 2:
{
htmltext = !hasQuestItems(player, INNOCENCE_JEWEL) ? "31537-14.html" : "31537-15.html";
break;
}
}
break;
}
}
return htmltext;
}
public static void checkJewelOfInnocence(L2PcInstance player)
{
final QuestState qs = player.getQuestState(Q00020_BringUpWithLove.class.getSimpleName());
if ((qs != null) && qs.isCond(1) && !hasQuestItems(player, INNOCENCE_JEWEL) && (getRandom(100) < 5))
{
giveItems(player, INNOCENCE_JEWEL, 1);
qs.setCond(2, true);
}
}
}

View File

@@ -0,0 +1,4 @@
<html><body>Mercenary Supplier Abercrombie:<br>
The person we sent to investigate the ancient monument is missing. Can you help us find him?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00031_SecretBuriedInTheSwamp 31555-02.html">Quest</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mercenary Supplier Abercrombie:<br><br><br>
Rangers reported that Krorin went missing somewhere in the Swamp of Screams. Look for him there. If he is dead, find his diary. It might hold a clue about the ancient monument hidden there.<br1>
The swamp is a dangerous place, but I'm sure you can handle it. Good luck!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mercenary Supplier Abercrombie:<br>
The Swamp of Screams is very dangerous. This is too difficult a mission for you.<br>
(This quest may only be undertaken by a character level 66 or above.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mercenary Supplier Abercrombie:<br>
He was a good guild member, he will be missed. Captain Pierce thinks this could be why the Golden Ram are here. Would you complete his research so his death is not in vain?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00031_SecretBuriedInTheSwamp 31555-05.html">"I'll help."</Button>
</body></html>

Some files were not shown because too many files have changed in this diff Show More