This commit is contained in:
5
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-01.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-01.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>High Priest Innocentin:<br>
|
||||
Recent activities at the <font color="LEVEL">Pagan Temple</font> have raised my concerns. Considering the shenanigans that normally go on there, you must surely understand the peril!<br>
|
||||
You see, they've set their sights on Saint Solina's <font color="LEVEL">Grail of Splendor</font>! I'm sure that if we don't stop them, something terrible and irrevocable will happen! Will you help us in our time of need?<br>
|
||||
<a action="bypass -h Quest Q00638_SeekersOfTheHolyGrail 31328-03.htm">I'll do it.</a>
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-02.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>High Priest Innocentin:<br>
|
||||
Recent activities at the <font color="LEVEL">Pagan Temple</font> have raised my concerns. Considering the shenanigans that normally go on there, you must surely understand the peril!<br>
|
||||
Would you consider coming back to help me when you've had more experience?<br>
|
||||
(This quest may only be undertaken by characters of level 73 or above.)
|
||||
</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-03.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>High Priest Innocentin:<br>
|
||||
Splendid! Please go to the <font color="LEVEL">Pagan Temple</font> and defeat the evil ones that inhabit it! After you've destroyed them, bring me their <font color="LEVEL">Pagan Totems</font>. You'll be well-rewarded if you bring more than <font color="LEVEL">2000</font> of them! Of course, our definitions of large rewards might differ...<br>
|
||||
As you must have guessed, the Pagan Temple is heavily defended and will not be easily overtaken. <font color="LEVEL">Priest Eliyah could give you guidance on how to penetrate their defenses.</font>
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-04.html
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-04.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>High Priest Innocentin:<br>
|
||||
Did they put up much of a fight? Well, your efforts have saved the grail! And I see you brought some Pagan Totems!<br>
|
||||
Are you ready for your reward?<br>
|
||||
<a action="bypass -h Quest Q00638_SeekersOfTheHolyGrail 31328-06.html">Not right now, thanks.</a><br>
|
||||
<a action="bypass -h Quest Q00638_SeekersOfTheHolyGrail reward">Yes, I'm ready for my reward.</a>
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-05.html
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-05.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>High Priest Innocentin:<br>
|
||||
Please go to the <font color="LEVEL">Pagan Temple</font> and defeat the evil ones that inhabit it! After you've destroyed them, bring me their <font color="LEVEL">Pagan Totems</font>. You'll be well-rewarded if you bring more than <font color="LEVEL">2000</font> of them! Of course, our definitions of large rewards might differ...<br>
|
||||
As you must have guessed, the Pagan Temple is heavily defended and will not be easily overtaken. <font color="LEVEL">Priest Eliyah could give you guidance on how to penetrate their defenses.<br>
|
||||
<a action="bypass -h Quest Q00638_SeekersOfTheHolyGrail 31328-06.html">I'll continue.</a><br>
|
||||
<a action="bypass -h Quest Q00638_SeekersOfTheHolyGrail 31328-09.html">I want to quit.</a>
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-06.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-06.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>High Priest Innocentin:<br>
|
||||
Thank you!
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-07.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-07.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>High Priest Innocentin:<br>
|
||||
Thank you! Let's see... What's this? The Totem of a high-ranking Pagan is mixed in here! Your efforts have thwarted their evil plan! Please take this as a token of my appreciation. Keep up the good work!
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-08.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-08.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>High Priest Innocentin:<br>
|
||||
Thank you! Your efforts have definitely put a crimp in the evil plans of the Pagans!
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-09.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-09.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Priest Innocentin:<br>
|
||||
Oh, I'm sorry to see you go! Your efforts have done much to thwart the evil plans of the Pagans! If you have some spare time in the future, come back and help us again!
|
||||
</body></html>
|
||||
253
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/Q00638_SeekersOfTheHolyGrail.java
vendored
Normal file
253
trunk/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/Q00638_SeekersOfTheHolyGrail.java
vendored
Normal file
@@ -0,0 +1,253 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.Q00638_SeekersOfTheHolyGrail;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.ItemChanceHolder;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
|
||||
/**
|
||||
* Seekers Of The Holy Grail (638)
|
||||
* @author netvirus
|
||||
*/
|
||||
public final class Q00638_SeekersOfTheHolyGrail extends Quest
|
||||
{
|
||||
private static class DropInfo extends ItemChanceHolder
|
||||
{
|
||||
private final int _keyId;
|
||||
private final int _keyChance;
|
||||
private final int _keyCount;
|
||||
|
||||
public DropInfo(int itemId, double chance)
|
||||
{
|
||||
this(itemId, chance, 0, 0, 0);
|
||||
}
|
||||
|
||||
public DropInfo(int itemId, double chance, int keyId, int keyChance, int count)
|
||||
{
|
||||
super(itemId, chance);
|
||||
_keyId = keyId;
|
||||
_keyChance = keyChance;
|
||||
_keyCount = count;
|
||||
}
|
||||
|
||||
public int getKeyId()
|
||||
{
|
||||
return _keyId;
|
||||
}
|
||||
|
||||
public int getKeyChance()
|
||||
{
|
||||
return _keyChance;
|
||||
}
|
||||
|
||||
public int getKeyCount()
|
||||
{
|
||||
return _keyCount;
|
||||
}
|
||||
}
|
||||
|
||||
// NPC
|
||||
private static final int INNOCENTIN = 31328;
|
||||
// Items
|
||||
private static final int TOTEM = 8068;
|
||||
private static final int ANTEROOM_KEY = 8273;
|
||||
private static final int CHAPEL_KEY = 8274;
|
||||
private static final int KEY_OF_DARKNESS = 8275;
|
||||
// Misc
|
||||
private static final int MIN_LVL = 73;
|
||||
private static final int TOTEMS_REQUIRED_COUNT = 2000;
|
||||
// Rewards
|
||||
private static final int SCROLL_ENCHANT_W_S = 959;
|
||||
private static final int SCROLL_ENCHANT_A_S = 960;
|
||||
// Mobs
|
||||
private static final Map<Integer, DropInfo> MOBS_DROP_CHANCES = new HashMap<>();
|
||||
static
|
||||
{
|
||||
MOBS_DROP_CHANCES.put(22136, new DropInfo(TOTEM, 0.55)); // Gatekeeper Zombie
|
||||
MOBS_DROP_CHANCES.put(22137, new DropInfo(TOTEM, 0.06)); // Penance Guard
|
||||
MOBS_DROP_CHANCES.put(22138, new DropInfo(TOTEM, 0.06)); // Chapel Guard
|
||||
MOBS_DROP_CHANCES.put(22139, new DropInfo(TOTEM, 0.54)); // Old Aristocrat's Soldier
|
||||
MOBS_DROP_CHANCES.put(22140, new DropInfo(TOTEM, 0.54)); // Zombie Worker
|
||||
MOBS_DROP_CHANCES.put(22141, new DropInfo(TOTEM, 0.55)); // Forgotten Victim
|
||||
MOBS_DROP_CHANCES.put(22142, new DropInfo(TOTEM, 0.54)); // Triol's Layperson
|
||||
MOBS_DROP_CHANCES.put(22143, new DropInfo(TOTEM, 0.62, CHAPEL_KEY, 100, 1)); // Triol's Believer
|
||||
MOBS_DROP_CHANCES.put(22144, new DropInfo(TOTEM, 0.54)); // Resurrected Temple Knight
|
||||
MOBS_DROP_CHANCES.put(22145, new DropInfo(TOTEM, 0.53)); // Ritual Sacrifice
|
||||
MOBS_DROP_CHANCES.put(22146, new DropInfo(TOTEM, 0.54, KEY_OF_DARKNESS, 10, 1)); // Triol's Priest
|
||||
MOBS_DROP_CHANCES.put(22147, new DropInfo(TOTEM, 0.55)); // Ritual Offering
|
||||
MOBS_DROP_CHANCES.put(22148, new DropInfo(TOTEM, 0.45)); // Triol's Believer
|
||||
MOBS_DROP_CHANCES.put(22149, new DropInfo(TOTEM, 0.54, ANTEROOM_KEY, 100, 6)); // Ritual Offering
|
||||
MOBS_DROP_CHANCES.put(22150, new DropInfo(TOTEM, 0.46)); // Triol's Believer
|
||||
MOBS_DROP_CHANCES.put(22151, new DropInfo(TOTEM, 0.62, KEY_OF_DARKNESS, 10, 1)); // Triol's Priest
|
||||
MOBS_DROP_CHANCES.put(22152, new DropInfo(TOTEM, 0.55)); // Temple Guard
|
||||
MOBS_DROP_CHANCES.put(22153, new DropInfo(TOTEM, 0.54)); // Temple Guard Captain
|
||||
MOBS_DROP_CHANCES.put(22154, new DropInfo(TOTEM, 0.53)); // Ritual Sacrifice
|
||||
MOBS_DROP_CHANCES.put(22155, new DropInfo(TOTEM, 0.75)); // Triol's High Priest
|
||||
MOBS_DROP_CHANCES.put(22156, new DropInfo(TOTEM, 0.67)); // Triol's Priest
|
||||
MOBS_DROP_CHANCES.put(22157, new DropInfo(TOTEM, 0.66)); // Triol's Priest
|
||||
MOBS_DROP_CHANCES.put(22158, new DropInfo(TOTEM, 0.67)); // Triol's Believer
|
||||
MOBS_DROP_CHANCES.put(22159, new DropInfo(TOTEM, 0.75)); // Triol's High Priest
|
||||
MOBS_DROP_CHANCES.put(22160, new DropInfo(TOTEM, 0.67)); // Triol's Priest
|
||||
MOBS_DROP_CHANCES.put(22161, new DropInfo(TOTEM, 0.78)); // Ritual Sacrifice
|
||||
MOBS_DROP_CHANCES.put(22162, new DropInfo(TOTEM, 0.67)); // Triol's Believer
|
||||
MOBS_DROP_CHANCES.put(22163, new DropInfo(TOTEM, 0.87)); // Triol's High Priest
|
||||
MOBS_DROP_CHANCES.put(22164, new DropInfo(TOTEM, 0.67)); // Triol's Believer
|
||||
MOBS_DROP_CHANCES.put(22165, new DropInfo(TOTEM, 0.66)); // Triol's Priest
|
||||
MOBS_DROP_CHANCES.put(22166, new DropInfo(TOTEM, 0.66)); // Triol's Believer
|
||||
MOBS_DROP_CHANCES.put(22167, new DropInfo(TOTEM, 0.75)); // Triol's High Priest
|
||||
MOBS_DROP_CHANCES.put(22168, new DropInfo(TOTEM, 0.66)); // Triol's Priest
|
||||
MOBS_DROP_CHANCES.put(22169, new DropInfo(TOTEM, 0.78)); // Ritual Sacrifice
|
||||
MOBS_DROP_CHANCES.put(22170, new DropInfo(TOTEM, 0.67)); // Triol's Believer
|
||||
MOBS_DROP_CHANCES.put(22171, new DropInfo(TOTEM, 0.87)); // Triol's High Priest
|
||||
MOBS_DROP_CHANCES.put(22172, new DropInfo(TOTEM, 0.78)); // Ritual Sacrifice
|
||||
MOBS_DROP_CHANCES.put(22173, new DropInfo(TOTEM, 0.66)); // Triol's Priest
|
||||
MOBS_DROP_CHANCES.put(22174, new DropInfo(TOTEM, 0.67)); // Triol's Priest
|
||||
MOBS_DROP_CHANCES.put(22175, new DropInfo(TOTEM, 0.03)); // Andreas' Captain of the Royal Guard
|
||||
MOBS_DROP_CHANCES.put(22176, new DropInfo(TOTEM, 0.03)); // Andreas' Royal Guards
|
||||
MOBS_DROP_CHANCES.put(22188, new DropInfo(TOTEM, 0.03)); // Andreas' Captain of the Royal Guard
|
||||
MOBS_DROP_CHANCES.put(22189, new DropInfo(TOTEM, 0.03)); // Andreas' Royal Guards
|
||||
MOBS_DROP_CHANCES.put(22190, new DropInfo(TOTEM, 0.03)); // Ritual Sacrifice
|
||||
MOBS_DROP_CHANCES.put(22191, new DropInfo(TOTEM, 0.03)); // Andreas' Captain of the Royal Guard
|
||||
MOBS_DROP_CHANCES.put(22192, new DropInfo(TOTEM, 0.03)); // Andreas' Royal Guards
|
||||
MOBS_DROP_CHANCES.put(22193, new DropInfo(TOTEM, 0.03)); // Andreas' Royal Guards
|
||||
MOBS_DROP_CHANCES.put(22194, new DropInfo(TOTEM, 0.03)); // Penance Guard
|
||||
MOBS_DROP_CHANCES.put(22194, new DropInfo(TOTEM, 0.03)); // Ritual Sacrifice
|
||||
}
|
||||
|
||||
public Q00638_SeekersOfTheHolyGrail()
|
||||
{
|
||||
super(638, Q00638_SeekersOfTheHolyGrail.class.getSimpleName(), "Seekers Of The Holy Grail");
|
||||
addStartNpc(INNOCENTIN);
|
||||
addTalkId(INNOCENTIN);
|
||||
addKillId(MOBS_DROP_CHANCES.keySet());
|
||||
registerQuestItems(TOTEM);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
String htmltext = null;
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case "31328-03.htm":
|
||||
{
|
||||
if (qs.isCreated())
|
||||
{
|
||||
qs.startQuest();
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31328-06.html":
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "reward":
|
||||
{
|
||||
if (qs.isStarted() && (getQuestItemsCount(player, TOTEM) >= TOTEMS_REQUIRED_COUNT))
|
||||
{
|
||||
if (getRandom(100) < 80)
|
||||
{
|
||||
if (getRandomBoolean())
|
||||
{
|
||||
rewardItems(player, SCROLL_ENCHANT_A_S, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
rewardItems(player, SCROLL_ENCHANT_W_S, 1);
|
||||
}
|
||||
htmltext = "31328-07.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
giveAdena(player, 3576000, true);
|
||||
htmltext = "31328-08.html";
|
||||
}
|
||||
takeItems(player, TOTEM, 2000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31328-09.html":
|
||||
{
|
||||
if (qs.isStarted())
|
||||
{
|
||||
qs.exitQuest(true, true);
|
||||
htmltext = "31328-09.html";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc);
|
||||
if (qs != null)
|
||||
{
|
||||
final DropInfo info = MOBS_DROP_CHANCES.get(npc.getId());
|
||||
if (giveItemRandomly(qs.getPlayer(), npc, info.getId(), 1, 0, info.getChance(), true))
|
||||
{
|
||||
if ((info.getKeyId() > 0) && (getRandom(100) < info.getKeyChance()))
|
||||
{
|
||||
npc.dropItem(qs.getPlayer(), info.getKeyId(), info.getKeyCount());
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (qs.isCreated())
|
||||
{
|
||||
htmltext = ((player.getLevel() >= MIN_LVL) ? "31328-01.htm" : "31328-02.htm");
|
||||
}
|
||||
else if (qs.isStarted())
|
||||
{
|
||||
htmltext = ((getQuestItemsCount(player, TOTEM) >= TOTEMS_REQUIRED_COUNT) ? "31328-04.html" : "31328-05.html");
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user