Four Goblets
- ID
- 620
- Название
- Four Goblets
- start_npcs_json
- [31453,31919,31920,31921,31922,31923,31924]
- npc_ids_json
- [31452,31453,31454,31919,31920,31921,31922,31923,31924]
- constants_json
- {"GHOST_OF_WIGOTH_1":31452,"NAMELESS_SPIRIT":31453,"GHOST_OF_WIGOTH_2":31454,"GHOST_CHAMBERLAIN_1":31919,"GHOST_CHAMBERLAIN_2":31920,"CONQUERORS_SEPULCHER_MANAGER":31921,"EMPERORS_SEPULCHER_MANAGER":31922,"GREAT_SAGES_SEPULCHER_MANAGER":31923,"JUDGES_SEPULCHER_MANAGER":31924,"RELIC":7254,"SEALED_BOX":7255,"GOBLET_OF_ALECTIA":7256,"GOBLET_OF_TISHAS":7257,"GOBLET_OF_MEKARA":7258,"GOBLET_OF_MORIGUL":7259,"USED_GRAVE_PASS":7261,"ANTIQUE_BROOCH":7262}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00620_FourGoblets/Q00620_FourGoblets.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 31452 | Ghost of Wigoth | Нет | 70 |
| 31453 | Nameless Spirit | Да | 70 |
| 31454 | Ghost of Wigoth | Нет | 70 |
| 31919 | Ghost Chamberlain of Elmoreden | Да | 70 |
| 31920 | Ghost Chamberlain of Elmoreden | Да | 70 |
| 31921 | Conquerors' Sepulcher Manager | Да | 70 |
| 31922 | Emperors' Sepulcher Manager | Да | 70 |
| 31923 | Great Sages' Sepulcher Manager | Да | 70 |
| 31924 | Judges' Sepulcher Manager | Да | 70 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() >= 74) ? "31453-01.htm" : "31453-12.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, ANTIQUE_BROOCH, 1); giveItems(player, id, 1); giveItems(partyMember, SEALED_BOX, 1); giveAdena(player, 10000, true); giveItems(player, 1884, 42); giveItems(player, 1895, 36); giveItems(player, 1876, 4); giveItems(player, 1881, 6); giveItems(player, 5549, 8); giveItems(player, 1874, 1); giveItems(player, 1889, 1); giveItems(player, 1877, 1); giveItems(player, 1894, 1); giveItems(player, 4043, 1); giveItems(player, 1888, 1); giveItems(player, 4040, 1); giveItems(player, 1890, 1); giveItems(player, 5550, 1); giveItems(player, 1893, 1); giveItems(player, 4046, 1); giveItems(player, 4048, 1); giveItems(player, 1878, 8); giveItems(player, 1882, 24); giveItems(player, 1879, 4); giveItems(player, 1880, 6); giveItems(player, 1885, 6); giveItems(player, 1875, 1); giveItems(player, 1883, 1); giveItems(player, 5220, 1); giveItems(player, 4039, 1); giveItems(player, 4044, 1); giveItems(player, 1887, 1); giveItems(player, 4042, 1); giveItems(player, 1886, 1); giveItems(player, 4041, 1); giveItems(player, 1892, 1); giveItems(player, 1891, 1); giveItems(player, 4047, 1); giveItems(player, 730, 1); giveItems(player, 948, 1); giveItems(player, 960, 1); giveItems(player, 729, 1); giveItems(player, 947, 1); giveItems(player, 959, 1); giveItems(player, 6698, 1); giveItems(player, 6699, 1); giveItems(player, 6700, 1); giveItems(player, 6701, 1); giveItems(player, 6702, 1); giveItems(player, 6703, 1); giveItems(player, 6704, 1); giveItems(player, 6705, 1); giveItems(player, 6706, 1); giveItems(player, 6707, 1); giveItems(player, 6708, 1); giveItems(player, 6709, 1); giveItems(player, 6710, 1); giveItems(player, 6711, 1); giveItems(player, 6712, 1); giveItems(player, 6713, 1); giveItems(player, 6714, 1); giveItems(player, 6688, 1); giveItems(player, 6689, 1); giveItems(player, 6690, 1); giveItems(player, 6691, 1); giveItems(player, 7579, 1); giveItems(player, 6693, 1); giveItems(player, 6694, 1); giveItems(player, 6695, 1); giveItems(player, 6696, 1); giveItems(player, 6697, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[31452-01.htm] Ghost of Wigoth: Come on, let's get out of here! Escape
[31452-02.htm] Ghost of Wigoth: I already gathered three goblets. You did good too. I'm not brave enough to face those women. "Do you know them?"
[31452-03.htm] Ghost of Wigoth: I'll tell you later. Let's get out of here first. Escape
[31452-04.htm] Ghost of Wigoth: They were Alectia, Tishas, Mekara, Morigul. Their devilish features bely their royal beauty. Let's get out of here. Escape
[31452-05.htm] Ghost of Wigoth: They were once my companions. Let's get out of here, quickly! Escape
[31452-06.htm] Ghost of Wigoth: Come on, let's go.
[31453-01.htm] Nameless Spirit: Delusions of grandeur and venal greed have resulted in this holy sepulcher becoming infested with demons and other evil monsters! If I could, I would drive every one of those vile creatures from this sacred place! But unfortunately... "What?"
[31453-02.htm] Nameless Spirit: If we are to destroy them we must get the four goblets from them. You should look for the shadows of Halisha in the deepest part of the Four Sepulchers. Would you help me gather the four goblets? What do you have to lose? It'll be good for you! "What's in it for me?"
[31453-03.htm] Nameless Spirit: There are some very securely Sealed Boxes within the Four Sepulchers. They contain the treasures of the ancestors, and have been sealed against graverobbers with some extremely powerful magic. The demons are another very effective tool against thievery there. Sometimes, too effective! Well, why are we standing around wasting time? Let's get those boxes! "How will we open them?"
[31453-04.htm] Nameless Spirit: I've got just the guy for the job! He'll open them for you. Some of the boxes will be empty, but you'll get lucky eventually! You can keep everything you find! My friend collects relics of the Empire. Bring him some and he'll give you something nice! Oh! I almost forgot! There are hidden traps set at the entrances to this sepulcher to discourage trespassers... "What do I need?"
[31453-05.htm] Nameless Spirit: You must have a pass to enter the sepulcher. This is done to ensure the security of the sacred final resting place of the Emperors. It's given to nobles who come to worship here. Unfortunately, the worshippers stopped coming when the monsters moved in. Sigh... "Really?"
[31453-06.htm] Nameless Spirit: The nobles who unknowingly came here to worship were cruelly massacred by evil creatures. Maybe we could get the passes from their corpses! They won't be easy to find, however. The ghost of an adventurer that haunts the gate of the Imperial graveyard will give us one if we do him a favor. The passes can only be used once, so you should get a few. The pass isn't the only requirement for entry, though! "What else is there?"
[31453-07.htm] Nameless Spirit: Entry to the sepulcher is only permitted at certain times. Only one party may enter at a time. All parties must have at least four members. When the gate opens, all party members should hurry inside to avoid being locked out. Once one party enters, no others may enter until the set time. All party members are expected to do you a favor, and they all must have a sepulcher pass. Once you satisfy these conditions, you should have no trouble getting in. But be careful what you ask for... This is not your average sepulcher! "What's different about it?"
[31453-08.htm] Nameless Spirit: When it is time for the party to leave the sepulcher, they are sent to the Pilgrim's Temple. You must defeat the shadow of Halisha before the next entry time. The sepulcher has several interconnected rooms, and you must find keys to open the locked doors. You can get the keys from evil creatures that appear when you open a suspicious box. Doors close periodically, so you'd better use them while they're open! You'll find the shadows of Halisha in one of the rooms. "Tell me more about the shadows of Halisha!"
[31453-09.htm] Nameless Spirit: Different shadows of Halisha inhabit each sepulcher. Each one has four different kinds of goblets. The four shadows are likely to appear in any location. This may turn out to be harder than you thought! Anyway, if you take the goblets from the shadows of Halisha, the door you came in through will be closed. "Then how do I get out?"
[31453-10.htm] Nameless Spirit: Naturally, I have a plan! After you defeat the shadows of Halisha, my friend will come and let you out. He'll teleport you to the Pilgrim's Temple and open the Sealed Boxes for you. My companion doesn't care for the shadows of Halisha, and he won't show up until they're all dead. Basically, you must defeat all the shadows if you are to escape! Don't forget to ask my friend to open all the boxes when you meet him. "The Pilgrim's Temple is very far from here!"
[31453-11.htm] Nameless Spirit: Don't worry! Show your used sepulcher pass to the ghost of Elmoreden's chamberlain at the Pilgrim's Temple. She'll teleport you here again. The pass will let her know that you've been here before. You can find another ghost of Elmoreden's chamberlain near the gate of the Wall of Argos. Well, you got all that? What do you think? Will you help me? "I'll do it!"
[31453-12.htm] Nameless Spirit: Delusions of grandeur and venal greed has resulted in this holy sepulcher becoming infested with demons and other evil monsters. If I could, I would drive every one of those vile creatures from this sacred place! But unfortunately... Oh, never mind. Obviously, you're not ready! Come back when you've had more training! (This quest may only be undertaken by a character of level 74 and above.)
[31453-13.htm] Nameless Spirit: I'm counting on you! Come back when you've collected all four goblets. I'll take it from there. If you have any questions about the four sepulchers, just let me know!
[31453-14.htm] Nameless Spirit: Slaughter the shadows of Halisha in the deepest part of the Four Sepulchers and bring me the four goblets. "I want to stop." "I want to continue." "Tell me about the four sepulchers."
[31453-15.htm] Nameless Spirit: At last, you've brought all of the four goblets! I'll bet Wigoth had some stories to tell!? I suppose now I can tell you the truth. I'm the one I mentioned earlier who would help you escape. I finally came to my senses, and even after hiding in this grave, I was terrified that someone would steal my treasure! I've really been acting crazy lately! I thought the evil creatures would protect my treasure, and I ordered Wigoth to place all my treasure in the boxes and seal them. Actually, the shadows of Halisha are also... "What?"
[31453-15a.htm] Nameless Spirit: They were my royal guards, Alectia, Tishas, Mekara and Morigul! I thought I'd make them stronger than ever to protect myself and my treasures. I was not thinking too clearly at that time! So I gave them over to the demon, with catastrophic results! Well, we can't let all your hard work go to waste! My friends may not be many, but I can trust them! They'll help me undo the damage I've done! If we are to restore the four sepulchers, I must confront my own demons! "What are you talking about?"
[31453-16.htm] Nameless Spirit: My guards weren't the only ones given over to the demon. I'll tell you more about that later. The restoration of the sepulchers will be hard work! You could help a lot by continuing to battle the creatures that infest that place! Oh, here's your reward for bringing the four goblets. Give it to the ghost of Elmoreden's chamberlain or the ghost of Elmoreden's page and they'll teleport you to the Imperial graveyard. "I want to stop." "I want to continue." "Tell me more about the sepulcher."
[31453-17.htm] Nameless Spirit: You've brought all four goblets! Restoring the sepulcher to its original state is going to take some time. Please continue to destroy as many of the evil creatures there as you can. "I want to stop." "I want to continue." "Tell me more about the sepulcher."
[31453-18.htm] Nameless Spirit: I'll miss you. Thanks you for your help.
[31453-19.htm] Nameless Spirit: Excellent! I'll be counting on you!
[31453-20.htm] Nameless Spirit: What do you want to know? "Tell me about Sealed Boxes." "Tell me about the sepulcher pass." "Tell me how I can enter the sepulcher." "Tell me about the interior of the sepulcher." "Tell me about the shadows of Halisha and the four goblets." "Tell me about the Pilgrim's Temple."
[31453-21.htm] Nameless Spirit: You can get the Sealed Boxes from the evil creatures inside the four sepulchers. These boxes are sealed with an incredible magic, impervious to even the most determined graverobber! Defeat the shadows of Halisha and my friend will help you escape and open the Sealed Boxes for you. By the way... "What?"
[31453-21a.htm] Nameless Spirit: By the way, my friend really hates the shadows of Halisha, and won't show up until you've defeated them. I don't have enough power to open the Sealed Boxes, so you'll need my companion to open them for you. My friend collects relics from the ancient Empire. Bring him some and he'll exchange it for something good...You can find out more from him. Return
[31453-22.htm] Nameless Spirit: Entry is restricted to those who possess a sepulcher pass. The nobles who unknowingly came here to worship were cruelly massacred by evil creatures. Maybe we could get the passes from their corpses! They won't be easy to find, however. The ghost of an adventurer that haunts the gate of the Imperial graveyard will give us one if we do him a favor. The passes can only be used once, so you should get a few. Return
[31453-23.htm] Nameless Spirit: Entry to the sepulcher is only permitted at certain times. Only one party may enter at a time. All parties must have at least four members. When the gate opens, all party members should hurry inside to avoid being locked out. Once one party enters, no others may enter until the set time. All party members are expected to do you a favor, and they all must have a sepulcher pass. Once you satisfy these conditions, you should have no trouble getting in. But be careful what you ask for... This is not your average sepulcher! Return
[31453-24.htm] Nameless Spirit: When it is time for the party to leave the sepulcher, they are sent to the Pilgrim's Temple. You must defeat the shadow of Halisha before the next entry time. The sepulcher has several interconnected rooms, and you must find keys to open the locked doors. You can get the keys from evil creatures that appear when you open a suspicious box. Doors close periodically, so you'd better use them while they're open! You'll find the shadows of Halisha in one of the rooms. Return
[31453-25.htm] Nameless Spirit: The shadow of Halisha is located in the last room of each sepulcher. Each sepulcher, of which there are four, has a different shadow. Each of the shadows has four goblets. By the way, the four shadows of Halisha change their location whenever they appear. This may turn out to be harder than you thought! Return
[31453-26.htm] Nameless Spirit: After defeating the Shadow of Halisha, a friend of mine will come and teleport you to the Pilgrim's Temple. He'll open the Sealed Boxes for you there... Of course, if you don't defeat the shadow of Halisha in time, you'll be sent to the Pilgrim's Temple. It's quite a distance from the Pilgrim's Temple to the Imperial graveyard, isn't it? "Yes, it is."
[31453-26a.htm] Nameless Spirit: Don't worry! Show your used sepulcher pass to the ghost of Elmoreden's chamberlain at the Pilgrim's Temple. She'll teleport you back here. The pass proves that you've been here before. You can find another ghost of Elmoreden's chamberlain near the gate of the Wall of Argos. Return
[31454-00.htm] Ghost of Wigoth: The exit is over there. Are you still gathering relics of the Elmoreden Empire? If you bring me 1000 relics, I'll trade them for an S-Grade Weapon Recipe. Call it nostalgia.
[31454-01.htm] Ghost of Wigoth: If you like, I can open the Sealed Boxes for you. Are you still gathering relics of the Elmoreden Empire? If you bring me 1000 relics, I'll trade them for an S-Grade Weapon Recipe. Call it nostalgia. "Please open the boxes."
[31454-02.htm] Ghost of Wigoth: Are you still gathering relics of the Elmoreden Empire? If you bring me 1000 relics, I'll trade them for an S-Grade Weapon Recipe. Call it nostalgia. "I'll trade the relics for the recipe."
[31454-03.htm] Ghost of Wigoth: If you like, I can open the Sealed Boxes for you. Are you still gathering relics of the Elmoreden Empire? If you bring me 1000 relics, I'll trade them for an S-Grade Weapon Recipe. Call it nostalgia. "Please open the boxes." "I'll trade the relics for the recipe."
[31454-04.htm] Ghost of Wigoth: Good job, the exit is over there. Are you still gathering relics of the Elmoreden Empire? If you bring me 1000 relics, I'll trade them for an S-Grade Weapon Recipe. Call it nostalgia.
[31454-05.htm] Ghost of Wigoth: Take the four glasses you gathered to the Nameless Soul in the Four Sepulchers later. If you like, I can open the Sealed Boxes for you. Are you still gathering relics of the Elmoreden Empire? If you bring me 1000 relics, I'll trade them for an S-Grade Weapon Recipe. Call it nostalgia. "Please open the boxes."
[31454-06.htm] Ghost of Wigoth: Take the four glasses you gathered to the Nameless Soul in the Four Sepulchers later. Are you still gathering relics of the Elmoreden Empire? If you bring me 1000 relics, I'll trade them for an S-Grade Weapon Recipe. Call it nostalgia. "I'll trade the relics for the recipe."
[31454-07.htm] Ghost of Wigoth: Take the four glasses you gathered to the Nameless Soul in the Four Sepulchers later. If you like, I can open the Sealed Boxes for you. Are you still gathering relics of the Elmoreden Empire? If you bring me 1000 relics, I'll trade them for a grade S weapon recipe. Call it nostalgia. "Please open the boxes." "I'll trade the relics for the recipe."
[31454-08.htm] Ghost of Wigoth: Look what's in the box!
[31454-09.htm] Ghost of Wigoth: The box is empty!
[31454-10.htm] Ghost of Wigoth: The box is broken!
[31454-11.htm] Ghost of Wigoth: Which recipe do you want in exchange? Recipe: Forgotten Blade (60%) Recipe: Basalt Battlehammer (60%) Recipe: Imperial Staff (60%) Recipe: Angel Slayer(60%) Recipe: Draconic Bow (60%) Recipe: Dragon Hunter Axe (60%) Recipe: Saint Spear (60%) Recipe: Demon Splinter (60%) Recipe: Heaven's Divider (60%) Recipe: Arcana Mace (60%)
[31454-12.htm] Ghost of Wigoth: Gather more and I'll trade you again.
[31919-00.htm] Ghost Chamberlain of Elmoreden: I teleport travelers to the Imperial Tomb. Only those who have visited the Four Sepulchers in the past may go there. To teleport, the traveler must carry a used pass for the sepulcher. I can also teleport those who possess any document that proves that they are directly connected to the Imperial Tomb.
[31919-01.htm] Ghost Chamberlain of Elmoreden: Ah, you're helping him, eh? I'm not that strong anymore, but I've broken a seal or two! Unfortunately, when I try to do it now, it rarely works! I've started breaking quite a few boxes, too! But if you don't mind the risk, I'll try to open the box for you. "Open the box."
[31919-03.htm] Ghost Chamberlain of Elmoreden: Wow! Something came out of it!
[31919-04.htm] Ghost Chamberlain of Elmoreden: Hmm. The box is empty.
[31919-05.htm] Ghost Chamberlain of Elmoreden: I'm so sorry! The box just disintegrated!
[31919-06.htm] Ghost Chamberlain of Elmoreden: I don't see a box... Come back when you find one!
[31920-00.htm] Ghost Chamberlain of Elmoreden: I teleport travelers to the Imperial Tomb. Only those who have visited the Four Sepulchers in the past may go there. To teleport, the traveler must carry a used pass for the sepulcher. I can also teleport those who possess any document that proves that they are directly connected to the Imperial Tomb.
[31920-01.htm] Ghost Chamberlain of Elmoreden: If you got some Sealed Boxes to unlock, you should seek my friend at the entrance of the Pilgrim's Temple.
[31921-01.htm] Conquerors' Sepulcher Manager: Hark! Who goes there? Place hands on the stone statue and concentrate...
[31922-01.htm] Emperors' Sepulcher Manager: Enter if you dare! Place hands on the stone statue and concentrate...
[31923-01.htm] Great Sages' Sepulcher Manager: Enter at your own risk. Place hands on the stone statue and concentrate...
[31924-01.htm] Judges' Sepulcher Manager: Enter if you dare! Place hands on the stone statue and concentrate...
Исходник условий и наград (Java)
/*
* Copyright (c) 2013 L2jMobius
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package quests.Q00620_FourGoblets;
import org.l2jmobius.commons.util.StringUtil;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.util.ArrayUtil;
public class Q00620_FourGoblets extends Quest
{
// NPCs
private static final int GHOST_OF_WIGOTH_1 = 31452;
private static final int NAMELESS_SPIRIT = 31453;
private static final int GHOST_OF_WIGOTH_2 = 31454;
private static final int GHOST_CHAMBERLAIN_1 = 31919;
private static final int GHOST_CHAMBERLAIN_2 = 31920;
private static final int CONQUERORS_SEPULCHER_MANAGER = 31921;
private static final int EMPERORS_SEPULCHER_MANAGER = 31922;
private static final int GREAT_SAGES_SEPULCHER_MANAGER = 31923;
private static final int JUDGES_SEPULCHER_MANAGER = 31924;
// Items
private static final int RELIC = 7254;
private static final int SEALED_BOX = 7255;
private static final int GOBLET_OF_ALECTIA = 7256;
private static final int GOBLET_OF_TISHAS = 7257;
private static final int GOBLET_OF_MEKARA = 7258;
private static final int GOBLET_OF_MORIGUL = 7259;
private static final int USED_GRAVE_PASS = 7261;
// Rewards
private static final int ANTIQUE_BROOCH = 7262;
private static final int[] RCP_REWARDS =
{
6881,
6883,
6885,
6887,
6891,
6893,
6895,
6897,
6899,
7580
};
public Q00620_FourGoblets()
{
super(620, "Four Goblets");
registerQuestItems(SEALED_BOX, USED_GRAVE_PASS, GOBLET_OF_ALECTIA, GOBLET_OF_TISHAS, GOBLET_OF_MEKARA, GOBLET_OF_MORIGUL);
addStartNpc(NAMELESS_SPIRIT, CONQUERORS_SEPULCHER_MANAGER, EMPERORS_SEPULCHER_MANAGER, GREAT_SAGES_SEPULCHER_MANAGER, JUDGES_SEPULCHER_MANAGER, GHOST_CHAMBERLAIN_1, GHOST_CHAMBERLAIN_2);
addTalkId(NAMELESS_SPIRIT, CONQUERORS_SEPULCHER_MANAGER, EMPERORS_SEPULCHER_MANAGER, GREAT_SAGES_SEPULCHER_MANAGER, JUDGES_SEPULCHER_MANAGER, GHOST_CHAMBERLAIN_1, GHOST_CHAMBERLAIN_2, GHOST_OF_WIGOTH_1, GHOST_OF_WIGOTH_2);
for (int id = 18120; id <= 18256; id++)
{
addKillId(id);
}
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
if (event.equals("31452-05.htm"))
{
if (getRandomBoolean())
{
htmltext = (getRandomBoolean()) ? "31452-03.htm" : "31452-04.htm";
}
}
else if (event.equals("EXIT"))
{
player.teleToLocation(169590, -90218, -2914); // Wigoth : Teleport back to Pilgrim's Temple
}
else if (event.equals("31453-13.htm"))
{
st.startQuest();
}
else if (event.equals("31453-16.htm"))
{
if (hasQuestItems(player, GOBLET_OF_ALECTIA, GOBLET_OF_TISHAS, GOBLET_OF_MEKARA, GOBLET_OF_MORIGUL))
{
st.setCond(2, true);
takeItems(player, GOBLET_OF_ALECTIA, -1);
takeItems(player, GOBLET_OF_TISHAS, -1);
takeItems(player, GOBLET_OF_MEKARA, -1);
takeItems(player, GOBLET_OF_MORIGUL, -1);
giveItems(player, ANTIQUE_BROOCH, 1);
}
else
{
htmltext = "31453-14.htm";
}
}
// else if (event.equals("31453-13.htm"))
// {
// if (st.getCond()s == 2)
// {
// htmltext = "31453-19.htm";
// }
// }
else if (event.equals("31453-18.htm"))
{
st.exitQuest(true, true);
}
else if (event.equals("boxes"))
{
if (hasQuestItems(player, SEALED_BOX))
{
takeItems(player, SEALED_BOX, 1);
if (!calculateBoxReward(player))
{
htmltext = (getRandomBoolean()) ? "31454-09.htm" : "31454-10.htm";
}
else
{
htmltext = "31454-08.htm";
}
}
}
// Ghost Chamberlain of Elmoreden: Teleport to 4s.
else if (event.equals("TELEPORT_TO_4S"))
{
if (hasQuestItems(player, ANTIQUE_BROOCH))
{
player.teleToLocation(178298, -84574, -7216);
return null;
}
if (hasQuestItems(player, USED_GRAVE_PASS))
{
takeItems(player, USED_GRAVE_PASS, 1);
player.teleToLocation(178298, -84574, -7216);
return null;
}
htmltext = npc.getId() + "-00.htm";
}
// Ghost Chamberlain of Elmoreden: Teleport to Imperial Tomb Entrance.
else if (event.equals("TELEPORT_TO_IT"))
{
if (hasQuestItems(player, ANTIQUE_BROOCH))
{
player.teleToLocation(186942, -75602, -2834);
return null;
}
if (hasQuestItems(player, USED_GRAVE_PASS))
{
takeItems(player, USED_GRAVE_PASS, 1);
player.teleToLocation(186942, -75602, -2834);
return null;
}
htmltext = npc.getId() + "-00.htm";
}
else if (event.equals("31919-06.htm"))
{
if (hasQuestItems(player, SEALED_BOX))
{
takeItems(player, SEALED_BOX, 1);
if (!calculateBoxReward(player))
{
htmltext = (getRandomBoolean()) ? "31919-04.htm" : "31919-05.htm";
}
else
{
htmltext = "31919-03.htm";
}
}
}
// If event is a simple digit, parse it to get an integer form, then test the reward list
else if (StringUtil.isNumeric(event))
{
final int id = Integer.parseInt(event);
if (ArrayUtil.contains(RCP_REWARDS, id) && (getQuestItemsCount(player, RELIC) >= 1000))
{
takeItems(player, RELIC, 1000);
giveItems(player, id, 1);
}
htmltext = "31454-12.htm";
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
final int npcId = npc.getId();
final int cond = st.getCond();
if (npcId == GHOST_OF_WIGOTH_1)
{
if (cond == 1)
{
htmltext = "31452-01.htm";
}
else if (cond == 2)
{
htmltext = "31452-02.htm";
}
}
else if (npcId == NAMELESS_SPIRIT)
{
if (cond == 0)
{
htmltext = (player.getLevel() >= 74) ? "31453-01.htm" : "31453-12.htm";
}
else if (cond == 1)
{
htmltext = (hasQuestItems(player, GOBLET_OF_ALECTIA, GOBLET_OF_TISHAS, GOBLET_OF_MEKARA, GOBLET_OF_MORIGUL)) ? "31453-15.htm" : "31453-14.htm";
}
else if (cond == 2)
{
htmltext = "31453-17.htm";
}
}
else if (npcId == GHOST_OF_WIGOTH_2)
{
// Possibilities : 0 = nothing, 1 = seal boxes only, 2 = relics only, 3 = both, 4/5/6/7 = "4 goblets" versions of 0/1/2/3.
int index = 0;
if (hasQuestItems(player, GOBLET_OF_ALECTIA, GOBLET_OF_TISHAS, GOBLET_OF_MEKARA, GOBLET_OF_MORIGUL))
{
index = 4;
}
final boolean gotSealBoxes = hasQuestItems(player, SEALED_BOX);
final boolean gotEnoughRelics = getQuestItemsCount(player, RELIC) >= 1000;
if (gotSealBoxes && gotEnoughRelics)
{
index += 3;
}
else if (!gotSealBoxes && gotEnoughRelics)
{
index += 2;
}
else if (gotSealBoxes)
{
index += 1;
}
htmltext = "31454-0" + index + ".htm";
}
else
{
htmltext = npcId + "-01.htm";
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getRandomPartyMemberState(player, -1, 3, npc);
if ((st == null) || !st.isStarted())
{
return;
}
final Player partyMember = st.getPlayer();
if (getRandom(10) < 3)
{
giveItems(partyMember, SEALED_BOX, 1);
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
/**
* Calculate boxes rewards, then return if there was a reward.
* @param player the Player, used to reward him.
* @return true if there was a reward, false if not (used to call a "no-reward" html)
*/
private static boolean calculateBoxReward(Player player)
{
boolean reward = false;
final int rnd = getRandom(5);
if (rnd == 0)
{
giveAdena(player, 10000, true);
reward = true;
}
else if (rnd == 1)
{
if (getRandom(1000) < 848)
{
reward = true;
final int i = getRandom(1000);
if (i < 43)
{
giveItems(player, 1884, 42);
}
else if (i < 66)
{
giveItems(player, 1895, 36);
}
else if (i < 184)
{
giveItems(player, 1876, 4);
}
else if (i < 250)
{
giveItems(player, 1881, 6);
}
else if (i < 287)
{
giveItems(player, 5549, 8);
}
else if (i < 484)
{
giveItems(player, 1874, 1);
}
else if (i < 681)
{
giveItems(player, 1889, 1);
}
else if (i < 799)
{
giveItems(player, 1877, 1);
}
else if (i < 902)
{
giveItems(player, 1894, 1);
}
else
{
giveItems(player, 4043, 1);
}
}
if (getRandom(1000) < 323)
{
reward = true;
final int i = getRandom(1000);
if (i < 335)
{
giveItems(player, 1888, 1);
}
else if (i < 556)
{
giveItems(player, 4040, 1);
}
else if (i < 725)
{
giveItems(player, 1890, 1);
}
else if (i < 872)
{
giveItems(player, 5550, 1);
}
else if (i < 962)
{
giveItems(player, 1893, 1);
}
else if (i < 986)
{
giveItems(player, 4046, 1);
}
else
{
giveItems(player, 4048, 1);
}
}
}
else if (rnd == 2)
{
if (getRandom(1000) < 847)
{
reward = true;
final int i = getRandom(1000);
if (i < 148)
{
giveItems(player, 1878, 8);
}
else if (i < 175)
{
giveItems(player, 1882, 24);
}
else if (i < 273)
{
giveItems(player, 1879, 4);
}
else if (i < 322)
{
giveItems(player, 1880, 6);
}
else if (i < 357)
{
giveItems(player, 1885, 6);
}
else if (i < 554)
{
giveItems(player, 1875, 1);
}
else if (i < 685)
{
giveItems(player, 1883, 1);
}
else if (i < 803)
{
giveItems(player, 5220, 1);
}
else if (i < 901)
{
giveItems(player, 4039, 1);
}
else
{
giveItems(player, 4044, 1);
}
}
if (getRandom(1000) < 251)
{
reward = true;
final int i = getRandom(1000);
if (i < 350)
{
giveItems(player, 1887, 1);
}
else if (i < 587)
{
giveItems(player, 4042, 1);
}
else if (i < 798)
{
giveItems(player, 1886, 1);
}
else if (i < 922)
{
giveItems(player, 4041, 1);
}
else if (i < 966)
{
giveItems(player, 1892, 1);
}
else if (i < 996)
{
giveItems(player, 1891, 1);
}
else
{
giveItems(player, 4047, 1);
}
}
}
else if (rnd == 3)
{
if (getRandom(1000) < 31)
{
reward = true;
final int i = getRandom(1000);
if (i < 223)
{
giveItems(player, 730, 1);
}
else if (i < 893)
{
giveItems(player, 948, 1);
}
else
{
giveItems(player, 960, 1);
}
}
if (getRandom(1000) < 5)
{
reward = true;
final int i = getRandom(1000);
if (i < 202)
{
giveItems(player, 729, 1);
}
else if (i < 928)
{
giveItems(player, 947, 1);
}
else
{
giveItems(player, 959, 1);
}
}
}
else if (rnd == 4)
{
if (getRandom(1000) < 329)
{
reward = true;
final int i = getRandom(1000);
if (i < 88)
{
giveItems(player, 6698, 1);
}
else if (i < 185)
{
giveItems(player, 6699, 1);
}
else if (i < 238)
{
giveItems(player, 6700, 1);
}
else if (i < 262)
{
giveItems(player, 6701, 1);
}
else if (i < 292)
{
giveItems(player, 6702, 1);
}
else if (i < 356)
{
giveItems(player, 6703, 1);
}
else if (i < 420)
{
giveItems(player, 6704, 1);
}
else if (i < 482)
{
giveItems(player, 6705, 1);
}
else if (i < 554)
{
giveItems(player, 6706, 1);
}
else if (i < 576)
{
giveItems(player, 6707, 1);
}
else if (i < 640)
{
giveItems(player, 6708, 1);
}
else if (i < 704)
{
giveItems(player, 6709, 1);
}
else if (i < 777)
{
giveItems(player, 6710, 1);
}
else if (i < 799)
{
giveItems(player, 6711, 1);
}
else if (i < 863)
{
giveItems(player, 6712, 1);
}
else if (i < 927)
{
giveItems(player, 6713, 1);
}
else
{
giveItems(player, 6714, 1);
}
}
if (getRandom(1000) < 54)
{
reward = true;
final int i = getRandom(1000);
if (i < 100)
{
giveItems(player, 6688, 1);
}
else if (i < 198)
{
giveItems(player, 6689, 1);
}
else if (i < 298)
{
giveItems(player, 6690, 1);
}
else if (i < 398)
{
giveItems(player, 6691, 1);
}
else if (i < 499)
{
giveItems(player, 7579, 1);
}
else if (i < 601)
{
giveItems(player, 6693, 1);
}
else if (i < 703)
{
giveItems(player, 6694, 1);
}
else if (i < 801)
{
giveItems(player, 6695, 1);
}
else if (i < 902)
{
giveItems(player, 6696, 1);
}
else
{
giveItems(player, 6697, 1);
}
}
}
return reward;
}
}