Castle Rune Pailaka dungeons and some simple quest implementations.

This commit is contained in:
MobiusDev
2016-08-22 19:36:55 +00:00
parent 1bf7f6c280
commit d29af7aed5
89 changed files with 3204 additions and 40 deletions

View File

@@ -24,8 +24,6 @@
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

View File

@@ -0,0 +1,129 @@
/*
* 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.Q00726_LightWithinTheDarkness;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.entity.Fort;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
/**
* Light within the Darkness (726)
* @author Mobius
*/
public final class Q00726_LightWithinTheDarkness extends Quest
{
// NPCs
private static final int[] NPCS =
{
35666, // Shanty
35698, // Southern
35735, // Hive
35767, // Valley
35804, // Ivory
35835, // Narsell
35867, // Bayou
35904, // White Sands
35936, // Borderland
35974, // Swamp
36011, // Archaic
36043, // Floran
36081, // Cloud Mountain
36118, // Tanor
36149, // Dragonspine
36181, // Antharas
36219, // Western
36257, // Hunter
36294, // Aaru
36326, // Demon
36364, // Monastic
};
// Items
private static final int KNIGHT_EPALUETTE = 9912;
// Misc
private static final int MIN_LEVEL = 85;
public Q00726_LightWithinTheDarkness()
{
super(726);
addStartNpc(NPCS);
addTalkId(NPCS);
addCondMinLevel(MIN_LEVEL, "Warden-00a.htm");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = event;
switch (event)
{
case "Warden-03.html":
case "Warden-04.html":
{
break;
}
case "Warden-02.htm":
{
qs.startQuest();
break;
}
default:
{
htmltext = null;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (qs.isCreated())
{
final Fort fort = npc.getFort();
final L2Clan clan = player.getClan();
htmltext = ((fort != null) && (clan != null) && (clan.getFortId() == fort.getResidenceId())) ? "Warden-01.htm" : "Warden-00b.htm";
}
else if (qs.isStarted())
{
if (qs.isCond(1))
{
htmltext = "Warden-03.html";
}
else
{
player.setPkKills(Math.max(0, player.getPkKills() - 1));
giveItems(player, KNIGHT_EPALUETTE, 200);
qs.exitQuest(QuestType.REPEATABLE);
htmltext = "Warden-05.html";
}
}
return htmltext;
}
}

View File

@@ -0,0 +1,5 @@
<html><body>Camp Keeper:<br>
It's an odd time to be alive, I tell you. Strange happenings and omens. Frightening portents of danger and doom. I'm not sure what to make of them, but I do know that we need more power! Yes, we need to focus on increasing our strengths before it's too late.<br>
You, focus. Work hard to become stronger and more powerful. The more powerful you become, the better able you'll be to protect yourself and your clan!<br>
(This quest is for characters level 85 or above.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Camp Keeper:<br>
Who are you? I don't see you on the Clan member list...<br>
(Only members of the clan that owns this fortress may undertake this quest.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Camp Keeper:<br>
Welcome! Have you heard about a place called Rim Pailaka? It was mentioned in a recent report about Pailaka: a unique kind of Pailaka different from the others. We had difficulty distinguishing it from the ordinary ones for quite a while. It is a place where evil invades the mind, like Rim Kamaloka. The scholars have announced that the Pailaka in Rune Fortress is a Rim Pailaka.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00726_LightWithinTheDarkness Warden-02.htm">"It sounds dangerous."</Button>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Camp Keeper:<br>
Of course you can participate. But before you do, there are several things you should know. There are 4 researchers currently inspecting the Rim Pailaka that can be entered from Rune Fortress.<br>
Because of the mystical dream-nature of Rim Pailaka, we don't know what will happen to them if they "die" in there. Our goal therefore, is to bring them all home safely.<font color="LEVEL">People say attacks in that strange place develop over 3 stages. Defend them from each!</font><br>
One more thing. It would be unwise to enter Rim Pailaka alone. Find another clan member willing to accompany you. Then I'll send you in.<br>
There's no time to waste. Please hurry!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00726_LightWithinTheDarkness Warden-04.html">"I'm ready now."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00726_LightWithinTheDarkness Warden-03.html">"I'll come back soon."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Camp Keeper:<br>
Do you know what kind of mission you're signing on for?<br>
Have you heard about a place called Rim Pailaka? It was mentioned in a recent report about Pailaka: a unique kind of Pailaka different from the others. We had difficulty distinguishing it from the ordinary ones for quite a while. It is a place where evil invades the mind, like Rim Kamaloka. The scholars have announced that the Pailaka in Rune Fortress is a Rim Pailaka.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00726_LightWithinTheDarkness Warden-04.html">"It sounds dangerous."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Camp Keeper:<br>
Good luck, and win honor for your clan!
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Camp Keeper:<br>
You and your fellow party members did very well!<br>
You have made our clan proud.<br>
Take this token of appreciation.<br>
Now you must rest, but visit me again when you have time.
</body></html>

View File

@@ -0,0 +1,117 @@
/*
* 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.Q00727_HopeWithinTheDarkness;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.entity.Castle;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
/**
* Hope within the Darkness (727)
* @author Mobius
*/
public final class Q00727_HopeWithinTheDarkness extends Quest
{
// NPCs
private static final int[] NPCS =
{
36403, // Gludio
36404, // Dion
36405, // Giran
36406, // Oren
36407, // Aden
36408, // Innadril
36409, // Goddard
36410, // Rune
36411, // Schuttgart
};
// Items
private static final int KNIGHT_EPALUETTE = 9912;
// Misc
private static final int MIN_LEVEL = 90;
public Q00727_HopeWithinTheDarkness()
{
super(727);
addStartNpc(NPCS);
addTalkId(NPCS);
addCondMinLevel(MIN_LEVEL, "Warden-00a.htm");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = event;
switch (event)
{
case "Warden-03.html":
case "Warden-04.html":
{
break;
}
case "Warden-02.htm":
{
qs.startQuest();
break;
}
default:
{
htmltext = null;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (qs.isCreated())
{
final Castle castle = npc.getCastle();
final L2Clan clan = player.getClan();
htmltext = ((castle != null) && (clan != null) && (clan.getCastleId() == castle.getResidenceId())) ? "Warden-01.htm" : "Warden-00b.htm";
}
else if (qs.isStarted())
{
if (qs.isCond(1))
{
htmltext = "Warden-03.html";
}
else
{
player.setPkKills(Math.max(0, player.getPkKills() - 1));
giveItems(player, KNIGHT_EPALUETTE, 300);
qs.exitQuest(QuestType.REPEATABLE);
htmltext = "Warden-05.html";
}
}
return htmltext;
}
}

View File

@@ -0,0 +1,5 @@
<html><body>Prison Warden:<br>
Strange omens. There have been lots of strange omens of late. The only thing we can rely on in this unstable world is power. As a member of the castle community, I hope that our clan members will become strong and powerful.<br>
You, you must put in the time required to train and practice. Improve yourself so that we may rely on you to protect yourself and the clan.<br>
(This quest is for characters level 90 or above.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Prison Warden:<br>
Who are you? I don't see you on the Clan member list...<br>
(Only members of the clan that owns this castle may undertake this quest.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Prison Warden:<br>
Welcome! Have you heard about a place called Rim Pailaka? It was mentioned in a recent report about Pailaka: a unique kind of Pailaka different from the others. We had difficulty distinguishing it from the ordinary ones for quite a while. It is a place where evil invades the mind, like Rim Kamaloka. The scholars have announced that the Pailaka in Rune Castle is a Rim Pailaka.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00727_HopeWithinTheDarkness Warden-02.htm">"It sounds dangerous."</Button>
</body></html>

View File

@@ -0,0 +1,8 @@
<html><body>Prison Warden:<br>
Of course, you can participate. But before you do, there are several things you should know. There are 4 researchers currently inspecting the Rim Pailaka that can be entered from Rune Castle.<br>
Because of the mystical dream-nature of Rim Pailaka, we don't know what will happen to them if they "die" in there. Our goal therefore, is to bring them all home safely.<font color="LEVEL">People say attacks in that strange place develop over 3 stages. Defend them from each!</font><br>
One more thing. It would be unwise to enter Rim Pailaka alone. Find another clan member willing to accompany you. Then I'll send you in.<br>
There's no time to waste. Please hurry!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00727_HopeWithinTheDarkness Warden-04.html">"I'm ready now."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00727_HopeWithinTheDarkness Warden-03.html">"I'll come back soon."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Prison Warden:<br>
Do you know what kind of mission you're signing on for?<br>
Have you heard about a place called Rim Pailaka? In a recent report, findings concluded that this Pailaka was different from the others. We had difficulty distinguishing it from the ordinary ones for quite a while. Unlike the others, it was found that this Kamaloka had the power to invade one's mind. The scholars have announced that the Pailaka in Rune Castle is a Rim Pailaka.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00727_HopeWithinTheDarkness Warden-04.html">"It sounds dangerous."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Prison Warden:<br>
Good luck, and win honor for your clan!
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Prison Warden:<br>
You and your fellow party members did very well!<br>
You have made our clan proud.<br>
Take this token of appreciation.<br>
Now you must rest, but visit me again when you have time.
</body></html>

View File

@@ -169,6 +169,8 @@ import quests.Q00652_AnAgedExAdventurer.Q00652_AnAgedExAdventurer;
import quests.Q00662_AGameOfCards.Q00662_AGameOfCards;
import quests.Q00663_SeductiveWhispers.Q00663_SeductiveWhispers;
import quests.Q00688_DefeatTheElrokianRaiders.Q00688_DefeatTheElrokianRaiders;
import quests.Q00726_LightWithinTheDarkness.Q00726_LightWithinTheDarkness;
import quests.Q00727_HopeWithinTheDarkness.Q00727_HopeWithinTheDarkness;
import quests.Q00754_AssistingTheRebelForces.Q00754_AssistingTheRebelForces;
import quests.Q00755_InNeedOfPetras.Q00755_InNeedOfPetras;
import quests.Q00756_TopQualityPetra.Q00756_TopQualityPetra;
@@ -545,6 +547,8 @@ public class QuestMasterHandler
Q00662_AGameOfCards.class,
Q00663_SeductiveWhispers.class,
Q00688_DefeatTheElrokianRaiders.class,
Q00726_LightWithinTheDarkness.class,
Q00727_HopeWithinTheDarkness.class,
Q00754_AssistingTheRebelForces.class,
Q00755_InNeedOfPetras.class,
Q00756_TopQualityPetra.class,