Renamed trunk folder.

This commit is contained in:
MobiusDev
2016-08-14 11:56:36 +00:00
parent 0bb4e57aad
commit 69cbd04d91
19923 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,248 @@
/*
* 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;
}
}
/**
* 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,166 @@
149 Primal Mother, Istina
150 Extreme Challenge: Primal Mother Resurrected
180 Infernal Flames Burning in Crystal Prison
181 Devils Strike Back, Advent of Balok
245 Come to Me
459 The Villain of the Underground Mine, Teredor
460 Precious Research Material
462 Stuffed Ancient Heroes
465 We Are Friends
468 Be Lost in the Mysterious Scent
469 Suspicious Gardener
471 Breaking through the Emerald Square
472 Challenge, Steam Corridor
473 In the Coral Garden
480 Another Legacy of Cruma Tower
482 Recertification of Value
483 Intended Tactic
491 In Nomine Patris
504 Competition for the Bandit Stronghold
512 Blade Under Foot
655 A Grand Plan for Taming Wild Beasts
665 Great Pirate Zaken's Treasure
666 Leona Blackbird's Treasure
667 Queen Beora's Legacy
668 The Gladiator's Treasure
669 High Priest's Treasure
670 Turek Orc's Treasure
726 Light within the Darkness
727 Hope within the Darkness
750 Seven Flowers
751 Liberating the Spirits
752 Uncover the Secret
753 Reacting to a Crisis
758 The Fallen King's Men
759 The Dwarven Nightmare Continues
767 Banishing Evil
768 Terror of Town
769 The Truth Concealed in Beauty
770 Maintaining the Field Business
771 Partaking in the Purification Campaign
772 Purifying Souls
775 Retrieving the Chaos Fragment
776 Slay Dark Lord Ekimus
777 Slay Dark Lord Tiat
778 Operation Roaring Flame
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
783 Vestige of the Magic Power
785 A Suspicious Ingredient
787 The Role of a Watcher
789 Waiting for Pa'agrio
790 Obtaining Ferin's Trust
816 Plans to Repair the Stronghold
817 Black Atelia Research
823 Disappeared Race, New Fairy
824 Attack the Command Post
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
833 Devil's Treasure, Tauti
834 Against Dragonclaw
835 Pitiable Melisa
10295 Seven Signs, Solina's Tomb
10296 Seven Signs, One Who Seeks the Power of the Seal
10303 Crossroads between Light and Darkness
10304 For the Forgotten Heroes
10307 The Corrupted Leader: His Truth
10310 Twisted Creation Tree
10311 Peaceful Days are Over
10312 Abandoned God's Creature
10315 To the Prison of Darkness
10316 Undecaying Memory of the Past
10351 Owner of Hall
10352 Legacy of Cruma Tower
10353 Certification of Value
10354 Resurrected Owner of Hall
10357 Altar of Blood that Awakens Destruction
10370 Menacing Times
10371 Grasp Thy Power
10372 Purgatory Volvere
10374 That Place Succubus
10375 Succubus Disciples
10376 Bloody Good Time
10377 The Invaded Execution Grounds
10378 Weeding Work
10379 An Uninvited Guest
10380 The Executioner's Execution
10388 Conspiracy Behind Doors
10389 The Voice of Authority
10431 The Seal of Punishment: Den of Evil
10432 Chasing Varangka
10433 Kekropus' Letter: Regarding a Seal (9/9)
10434 The Seal of Punishment: Sel Mahum Training Grounds
10435 Chasing Keltron
10436 Kekropus' Letter: The Seal of Punishment (9/9)
10437 The Seal of Punishment: Plains of the Lizardmen
10438 Chasing Loygen
10439 Kekropus' Letter: The Origins of a Rumor (9/9)
10440 The Seal of Punishment: The Fields
10441 Chasing Meccadan
10446 Hit and Run
10447 Timing is Everything
10452 Is it Edible?
10456 Operation: Rescue
10457 Kefensis' Illusion
10458 To the Desert Quarry
10459 A Sick Ambition
10462 Temper a Rusting Blade
10506 Diana's Request
10703 Bottle of Istina's Soul
10704 Bottle of Octavis' Soul
10705 Bottle of Tauti's Soul
10712 The Minstrel's Song, Part 1
10713 The Hero's Journey: Bloody Swampland
10714 The Hero's Journey: Seed of Annihilation
10715 The Hero's Journey: Harnak Underground Ruins
10716 The Hero's Journey: Kartia's Labyrinth
10717 The Minstrel's Song, Part 2
10718 The Hero's Journey: Fairy Settlement
10720 The Minstrel's Song, Part 3
10721 The Hero's Journey: Prison of Darkness
10722 The Hero's Journey: Fortuna
10723 The Minstrel's Song, Part 4
10724 The Hero's Journey: Isle of Souls
10725 The Hero's Journey: Nornil's Cave
10726 The Minstrel's Song, Part 5
10727 The Hero's Journey: Seal of Shilen
10728 The Hero's Journey: Cemetary
10729 The Hero's Journey: Guillotine Fortress
10730 The Hero's Journey: Orbis Temple
10731 The Minstrel's Song, Part 6
10747 The Hero's Journey: Pagan Temple
10748 Mysterious Suggestion - 1
10749 Mysterious Suggestion - 2
10753 Winds of Fate: Choices
10767 A Whole New Level of Alchemy
10796 The Eye that Defied the Gods
10797 Crossing Fate
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
10809 The Hero's Journey: Blazing Swamp
10829 In Search of the Cause
10830 The Lost Garden of Spirits
10831 Unbelievable Sight
10832 Energy of Sadness and Anger
10833 Put the Queen of Spirits to Sleep
10836 Disappeared Clan Member
10837 Looking for the Blackbird Clan Member
10838 The Reason For Not Being Able to Get Out
10839 Blackbird's Name Value
10840 Time to Recover
10841 Deep Inside Atelia Fortress
10843 Anomaly in the Enchanted Valley
10844 Bloody Battle - Seizing Supplies
10845 Bloody Battle - Rescue the Smiths
10846 Bloody Battle - Meeting the Commander

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,302 @@
/*
* 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,272 @@
/*
* 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>Isael Silvershadow:<br>
There's something putting me in a difficult situation. But it is too dangerous to ask you to take on the job. Get some more experience first.<br>
(Only characters at level 80 or higher can perform the quest.)
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Isael Silvershadow:<br>
May the blessing of the starlight be with you. Welcome to the Hunters Village!<br>
I'd love to welcome you here... or ask you to tell me your stories, but... circumstance forces me not to do any of that.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00026_TiredOfWaiting 30655-02.htm">"Is something wrong?"</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Isael Silvershadow:<br>
There's something putting me in a difficult situation. I have a favor to ask, but it is a request that I would not ask of someone without skills, and someone I didn't deem trustworthy. I believe that you may be qualified to do the job...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00026_TiredOfWaiting 30655-03.htm">"I'd like to hear more about it."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Isael Silvershadow:<br>
In fact, you should deliver a <font color="LEVEL">Special Item</font> to the Dragon valley. The atmosphere there has been changed, so the porters are refusing to deliver it even under double pay.<br>
Nevertheless, I have contracts with the merchants in the valley, so have no choice but to deliver the thing. I'm in trouble.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00026_TiredOfWaiting 30655-04.html">"Well, what is the favor that you wanted to ask me?"</Button>
</body></html>

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