Various quest adjustments and fixes.
Contributed by emilianoify.
This commit is contained in:
@@ -1,182 +0,0 @@
|
||||
/*
|
||||
* 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 ai.others;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
|
||||
/**
|
||||
* Adapted from FirstTeam Interlude
|
||||
*/
|
||||
public class Bingo
|
||||
{
|
||||
protected static final String TEMPLATE = "%msg%<br><br>%choices%<br><br>%board%";
|
||||
protected static final String TEMPLATE_FINAL = "%msg%<br><br>%board%";
|
||||
protected static final String TEMPLATE_BOARD = "For your information, below is your current selection.<br><table border=\"1\" border color=\"white\" width=100><tr><td align=\"center\">%cell1%</td><td align=\"center\">%cell2%</td><td align=\"center\">%cell3%</td></tr><tr><td align=\"center\">%cell4%</td><td align=\"center\">%cell5%</td><td align=\"center\">%cell6%</td></tr><tr><td align=\"center\">%cell7%</td><td align=\"center\">%cell8%</td><td align=\"center\">%cell9%</td></tr></table>";
|
||||
protected static final String MSG_AGAIN = "You have already selected that number. Choose your %choicenum% number again.";
|
||||
protected static final String MSG_BEGIN = "I've arranged 9 numbers on the panel.<br>Now, select your %choicenum% number.";
|
||||
protected static final String MSG_NEXT = "Now, choose your %choicenum% number.";
|
||||
protected static final String MSG_ZERO_LINES = "You are spectacularly unlucky! The red-colored numbers on the panel below are the ones you chose. As you can see, they didn't create even a single line. Did you know that it is harder not to create a single line than creating all 3 lines?";
|
||||
protected static final String MSG_THREE_LINES = "You've created 3 lines! The red colored numbers on the bingo panel below are the numbers you chose. Congratulations!";
|
||||
protected static final String MSG_LOSE = "Hmm... You didn't make 3 lines. Why don't you try again? The red-colored numbers on the panel are the ones you chose.";
|
||||
protected static final String[] NUMBERS =
|
||||
{
|
||||
"first",
|
||||
"second",
|
||||
"third",
|
||||
"fourth",
|
||||
"fifth",
|
||||
"final"
|
||||
};
|
||||
|
||||
private final String _template_choice;
|
||||
private final List<Integer> board;
|
||||
private final List<Integer> guesses;
|
||||
protected int lines;
|
||||
|
||||
public Bingo(String templateChoice)
|
||||
{
|
||||
board = new ArrayList<>();
|
||||
guesses = new ArrayList<>();
|
||||
_template_choice = templateChoice;
|
||||
while (board.size() < 9)
|
||||
{
|
||||
final int num = Rnd.get(1, 9);
|
||||
if (!board.contains(num))
|
||||
{
|
||||
board.add(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String Select(String s)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Select(Integer.parseInt(s));
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String Select(int choise)
|
||||
{
|
||||
if ((choise < 1) || (choise > 9))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (guesses.contains(choise))
|
||||
{
|
||||
return getDialog("You have already selected that number. Choose your %choicenum% number again.");
|
||||
}
|
||||
guesses.add(choise);
|
||||
if (guesses.size() == 6)
|
||||
{
|
||||
return getFinal();
|
||||
}
|
||||
return getDialog("");
|
||||
}
|
||||
|
||||
protected String getBoard()
|
||||
{
|
||||
if (guesses.isEmpty())
|
||||
{
|
||||
return "";
|
||||
}
|
||||
String result = "For your information, below is your current selection.<br><table border=\"1\" border color=\"white\" width=100><tr><td align=\"center\">%cell1%</td><td align=\"center\">%cell2%</td><td align=\"center\">%cell3%</td></tr><tr><td align=\"center\">%cell4%</td><td align=\"center\">%cell5%</td><td align=\"center\">%cell6%</td></tr><tr><td align=\"center\">%cell7%</td><td align=\"center\">%cell8%</td><td align=\"center\">%cell9%</td></tr></table>";
|
||||
for (int i = 1; i <= 9; ++i)
|
||||
{
|
||||
final String cell = "%cell" + i + "%";
|
||||
final int num = board.get(i - 1);
|
||||
if (guesses.contains(num))
|
||||
{
|
||||
result = result.replaceFirst(cell, "<font color=\"" + ((guesses.size() == 6) ? "ff0000" : "ffff00") + "\">" + num + "</font>");
|
||||
}
|
||||
else
|
||||
{
|
||||
result = result.replaceFirst(cell, "?");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getDialog(String msg)
|
||||
{
|
||||
String result = "%msg%<br><br>%choices%<br><br>%board%";
|
||||
if (guesses.isEmpty())
|
||||
{
|
||||
result = result.replaceFirst("%msg%", "I've arranged 9 numbers on the panel.<br>Now, select your %choicenum% number.");
|
||||
}
|
||||
else
|
||||
{
|
||||
result = result.replaceFirst("%msg%", "".equalsIgnoreCase(msg) ? "Now, choose your %choicenum% number." : msg);
|
||||
}
|
||||
result = result.replaceFirst("%choicenum%", Bingo.NUMBERS[guesses.size()]);
|
||||
final StringBuilder choices = new StringBuilder();
|
||||
for (int i = 1; i <= 9; ++i)
|
||||
{
|
||||
if (!guesses.contains(i))
|
||||
{
|
||||
choices.append(_template_choice.replace("%n%", String.valueOf(i)));
|
||||
}
|
||||
}
|
||||
result = result.replaceFirst("%choices%", choices.toString());
|
||||
result = result.replaceFirst("%board%", getBoard());
|
||||
return result;
|
||||
}
|
||||
|
||||
protected String getFinal()
|
||||
{
|
||||
String result = "%msg%<br><br>%board%".replaceFirst("%board%", getBoard());
|
||||
calcLines();
|
||||
switch (lines)
|
||||
{
|
||||
case 3:
|
||||
result = result.replaceFirst("%msg%", "You've created 3 lines! The red colored numbers on the bingo panel below are the numbers you chose. Congratulations!");
|
||||
break;
|
||||
case 0:
|
||||
result = result.replaceFirst("%msg%", "You are spectacularly unlucky! The red-colored numbers on the panel below are the ones you chose. As you can see, they didn't create even a single line. Did you know that it is harder not to create a single line than creating all 3 lines?");
|
||||
break;
|
||||
default:
|
||||
result = result.replaceFirst("%msg%", "Hmm... You didn't make 3 lines. Why don't you try again? The red-colored numbers on the panel are the ones you chose.");
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public int calcLines()
|
||||
{
|
||||
lines = 0;
|
||||
lines += (checkLine(0, 1, 2) ? 1 : 0);
|
||||
lines += (checkLine(3, 4, 5) ? 1 : 0);
|
||||
lines += (checkLine(6, 7, 8) ? 1 : 0);
|
||||
lines += (checkLine(0, 3, 6) ? 1 : 0);
|
||||
lines += (checkLine(1, 4, 7) ? 1 : 0);
|
||||
lines += (checkLine(2, 5, 8) ? 1 : 0);
|
||||
lines += (checkLine(0, 4, 8) ? 1 : 0);
|
||||
return lines += (checkLine(2, 4, 6) ? 1 : 0);
|
||||
}
|
||||
|
||||
public boolean checkLine(int idx1, int idx2, int idx3)
|
||||
{
|
||||
return guesses.contains(board.get(idx1)) && guesses.contains(board.get(idx2)) && guesses.contains(board.get(idx3));
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Centurion Nakusin:<br>
|
||||
Dekara Lamchar Kakai! Kakai, the Pa'agrio Lord, has not been well recently. The tribal elders have decided that each tribe should offer him <font color="LEVEL">something that is good for his health </font>. Meet the representatives of each tribe and bring back their gifts! Can you do it?<br>
|
||||
<a action="bypass -h Quest Q004_LongliveThePa'agrioLord 30578-03.htm">Say you will do it</a>
|
||||
<a action="bypass -h Quest Q004_LongliveThePaagrioLord 30578-03.htm">Say you will do it</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Centurion Nakusin:<br>
|
||||
Meet the representatives of each tribe and bring back their gifts! Don't tell me that you have forgotten what your task is?<br>
|
||||
<a action="bypass -h Quest Q004_LongliveThePa'agrioLord 30578-05.htm">Say you forgot</a>
|
||||
<a action="bypass -h Quest Q004_LongliveThePaagrioLord 30578-05.htm">Say you forgot</a>
|
||||
</body></html>
|
@@ -28,6 +28,7 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q004_LongliveThePaagrioLord extends Quest
|
||||
{
|
||||
private static final int NAKUSIN = 30578;
|
||||
private static final Map<Integer, Integer> NPC_GIFTS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
@@ -99,7 +100,8 @@ public class Q004_LongliveThePaagrioLord extends Quest
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
final int npcId = npc.getNpcId();
|
||||
if (npcId == 30578)
|
||||
|
||||
if (npcId == NAKUSIN)
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
@@ -123,12 +125,13 @@ public class Q004_LongliveThePaagrioLord extends Quest
|
||||
final int i = NPC_GIFTS.get(npcId);
|
||||
if (st.hasQuestItems(i))
|
||||
{
|
||||
htmltext = npcId + "-02.htm";
|
||||
htmltext = "30585-02.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.giveItems(i, 1);
|
||||
htmltext = npcId + "-01.htm";
|
||||
htmltext = "30585-01.htm";
|
||||
|
||||
int count = 0;
|
||||
for (int item : NPC_GIFTS.values())
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Innocentin:<br>
|
||||
Take this crucifix to Magister Tifaren and ask her to perform necromancy. She
|
||||
tends to be quite wary of strangers, so you may need to prove your sincerity
|
||||
to her. Keep trying, she'll come around.</body></html>
|
||||
Come on in! Did he tell you anything?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-03.htm">"Well, he said..."</a>
|
||||
</body></html>
|
@@ -1,4 +1,7 @@
|
||||
<html><body>Innocentin:<br>
|
||||
Come on in! Did he tell you anything?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-04.htm">"Well, he said..."</a>
|
||||
<html><body>Innocentin<br>
|
||||
I see.. Lidia von Hellmann was lord of the Forest of the Dead! She was Alfred's daughter, a survivor of the tragedy of Hellmann Forest... Thank you.<br>
|
||||
Thanks to you, we know that his death wasn't in vain...<br>
|
||||
I will treasure this crucifix always!<br>
|
||||
Hmm..? Was there something else?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-05.htm">"Who's behind all of this?"</a>
|
||||
</body></html>
|
@@ -1,7 +1,4 @@
|
||||
<html><body>Innocentin<br>
|
||||
I see.. Lidia von Hellmann was lord of the Forest of the Dead! She was Alfred's daughter, a survivor of the tragedy of Hellmann Forest...Thank you.<br>
|
||||
Thanks to you, we know that his death wasn't in vain...<br>
|
||||
I will treasure this crucifix always!<br>
|
||||
Hmm..? Was there something else?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-06.htm">"Who's behind all of this?"</a>
|
||||
<html><body>Innocentin:<br>
|
||||
Do you want to ask me something?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-05.htm">"Who is behind the tragedy?"</a>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Innocentin:<br>
|
||||
Who's behind the tragedy? Well, there are several theories, I'm sure you've heard them all!<br>
|
||||
Why don't I tell you one you probably haven't heard...<br>
|
||||
Alfred von Hellmann and I were very close friends and he shared with me the terrible dissatisfaction he had in his heart...<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-06.htm">"I heard that he didn't intentionally become a traitor."</a>
|
||||
</body></html>
|
@@ -1,6 +1,4 @@
|
||||
<html><body>Innocentin:<br>
|
||||
Who's behind the tragedy? Well, there are several theories, I'm sure you've heard them all!<br>
|
||||
Why don't I tell you one you probably haven't heard...<br>
|
||||
Alfred von Hellmann and I were very close friends and he shared with me the terrible dissatisfaction he had in his heart...<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-07.htm">"I heard that he didn't intentionally become a traitor."</a>
|
||||
Exactly! He only meant to encourage the lame duck king! He never even considered treason until his meeting with a mystic in the forest! Around that time I hired a treasure hunter to find out exactly what was going on with Alfred... That didn't go well at all!<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-07.htm">"What happened?"</a>
|
||||
</body></html>
|
@@ -1,4 +1,6 @@
|
||||
<html><body>Innocentin:<br>
|
||||
Exactly! He only meant to encourage the lame duck king! He never even considered treason until his meeting with a mystic in the forest! Around that time I hired a treasure hunter to find out exactly what was going on with Alfred... That didn't go well at all!<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-08.htm">"What happened?"</a>
|
||||
He was accused of worshipping the devil! His secretive nature, along with the sensitivity of the mission, led to his downfall.<br>
|
||||
I was occupied elsewhere and couldn't protect him...<br>
|
||||
He was charged, convicted and executed on the square of Rune Castle! The evidence he had gathered for me was thrown into a <font color="LEVEL">deserted well</font>.<br><br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-08.htm">"Tell me more!"</a>
|
||||
</body></html>
|
@@ -1,6 +1,6 @@
|
||||
<html><body>Innocentin:<br>
|
||||
He was accused of worshipping the devil! His secretive nature, along with the sensitivity of the mission, led to his downfall.<br>
|
||||
I was occupied elsewhere and couldn't protect him...<br>
|
||||
He was charged, convicted and executed on the square of Rune Castle! The evidence he had gathered for me was thrown into a <font color="LEVEL">deserted well</font>.<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-09.htm">"Tell me more!"</a>
|
||||
It's said that his ghost visits that well every night.<br>
|
||||
I'd always believed that all ghosts were evil, but after my experiences with necromancy, the realm of the gods is denied to me. I must find out what actually happened!<br>
|
||||
Would you meet with him and ask him what he found out?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-09.htm">"I'll do it."</a>
|
||||
</body></html>
|
@@ -1,6 +1,3 @@
|
||||
<html><body>Innocentin:<br>
|
||||
It's said that his ghost visits that well every night.<br>
|
||||
I'd always believed that all ghosts were evil, but after my experiences with necromancy, the realm of the gods is denied to me. I must find out what actually happened!<br>
|
||||
Would you meet with him and ask him what he found out?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-10.htm">"I'll do it."</a>
|
||||
You'll find the well in the northwest part of the village. Show the ghost the letter and he'll grant your request.
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Innocentin:<br>
|
||||
The ghost of the treasure hunter is said to appear around the well in the northwest part of the village.<br>
|
||||
Take the letter to him and come back to me with his reply.
|
||||
</body></html>
|
@@ -1,3 +1,4 @@
|
||||
<html><body>Innocentin:<br>
|
||||
You'll find the well in the northwest part of the village. Show the ghost the letter and he'll grant your request.
|
||||
Oh, you're back? Did you bring any news?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-11.htm">"Check out this box."</a>
|
||||
</body></html>
|
@@ -1,4 +1,7 @@
|
||||
<html><body>Innocentin:<br>
|
||||
The ghost of the treasure hunter is said to appear around the well in the northwest part of the village.<br>
|
||||
Take the letter to him and come back to me with his reply.
|
||||
Indeed! Is this the box he told you about?<br>
|
||||
He told me once, in case something happened to him, he would store all his most important documents in a box! Hmm...<br>
|
||||
I can't help but think... Perhaps it's fortunate that I left the temple and came here! Ah... but that's not important...<br>
|
||||
Now give me the box!<br>
|
||||
I must open it carefully and see what it holds. Why don't you come back a little later?
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Innocentin:<br>
|
||||
Oh, you're back? Did you bring any news?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-13.htm">"Check out this box."</a>
|
||||
It's the report of the Mystic Neidrahu, the instigator of the insurrection! Do you care to read it?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-13.htm">"Yes!"</a>
|
||||
</body></html>
|
@@ -1,7 +1,5 @@
|
||||
<html><body>Innocentin:<br>
|
||||
Indeed! Is this the box he told you about?<br>
|
||||
He told me once, in case something happened to him, he would store all his most important documents in a box! Hmm...<br>
|
||||
I can't help but think... Perhaps it's fortunate that I left the temple and came here! Ah... but that's not important...<br>
|
||||
Now give me the box!<br>
|
||||
I must open it carefully and see what it holds. Why don't you come back a little later?
|
||||
<html><body><br>
|
||||
<font color="LEVEL">Regarding Neidrahu</font><br>
|
||||
"... No one knows for sure how deeply Alfred von Hellmann was influenced by his magic, for his eloquence was certainly equal to his magic ability. Alfred wasn't the only one swayed by his words. Neidrahu called himself a messenger, and personally gathered many supporters for the insurrection."<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-14.htm">Turn the page</a>
|
||||
</body></html>
|
@@ -1,4 +1,5 @@
|
||||
<html><body>Innocentin:<br>
|
||||
It's the report of the Mystic Neidrahu, the instigator of the insurrection! Do you care to read it?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-15.htm">"Yes!"</a>
|
||||
<html><body>
|
||||
"Nidrah's preaching persuaded his followers of the awesome power of the dark arts. He often spoke of a powerful magus known as a devil, who practiced magic in Gludio. He convinced them that his own power was equal to the devil's!<br>
|
||||
Information regarding Beleth, Black Magus and the pastoral history of the wasteland of Gludio was all available at the main library. Although many were suspicious of his claims, eventually they believed him."<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-15.htm">Turn the page</a>
|
||||
</body></html>
|
@@ -1,5 +1,5 @@
|
||||
<html><body><br>
|
||||
<font color="LEVEL">Regarding Neidrahu</font><br>
|
||||
"... No one knows for sure how deeply Alfred von Hellmann was influenced by his magic, for his eloquence was certainly equal to his magic ability. Alfred wasn't the only one swayed by his words. Neidrahu called himself a messenger, and personally gathered many supporters for the insurrection."<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-16.htm">Turn the page</a>
|
||||
<html><body>
|
||||
"This was to be his greatest accomplishment! The army of undead that he conjured played a pivotal role in the tragedy that occurred in the Hellmann Forest, but the outcome wasn't as he expected...<br>
|
||||
Before his army was ready, the King learned of the Hellmann family's treason. In a fit of rage, and without any consultations, the King mobilized an occupation force and marched on the Hellmann Forest."<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-16.htm">Next Page</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>"Nidrah's preaching persuaded his followers of the awesome power of the dark arts. He often spoke of a powerful magus known as a devil, who practiced magic in Gludio. He convinced them that his own power was equal to the devil's!<br>
|
||||
Information regarding Beleth, Black Magus and the pastoral history of the wasteland of Gludio was all available at the main library. Although many were suspicious of his claims, eventually they believed him."<br>
|
||||
<html><body>
|
||||
"The supporters of the von Hellmann family fought bravely, but their lack of organization was their undoing. As the King's army approached, the family finally realized that they had failed. By then, most of their sympathizers had been beheaded or taken prisoner by the King's army. The von Hellmanns were very powerful, but their treasonous behavior caused them to fall into disgrace and to be renounced by the royal family. The fall was especially painful to Alfred, who, as patriarch, had to watch as his vassals and then his family were tortured and beheaded, before he ascended the scaffold himself.<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-17.htm">Turn the page</a>
|
||||
</body></html>
|
@@ -1,4 +1,5 @@
|
||||
<html><body>"This was to be his greatest accomplishment! The army of undead that he conjured played a pivotal role in the tragedy that occurred in the Hellmann Forest, but the outcome wasn't as he expected...<br>
|
||||
Before his army was ready, the King learned of the Hellmann family's treason. In a fit of rage, and without any consultations, the King mobilized an occupation force and marched on the Hellmann Forest."<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-18.htm">Next Page</a>
|
||||
<html><body>
|
||||
"It was then that Nidrah's magic sprang into action! At dusk, as the King's army took inventory of the treasures of the Hellmann family, a huge army of undead fighters rushed the castle!<br>
|
||||
They were the souls of the executed vassals, led by Alfred's children Lidia and Eilhalder von Hellmann! All were under the control of Nidrah."<br><br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-18.htm">Turn the page</a>
|
||||
</body></html>
|
@@ -1,3 +1,5 @@
|
||||
<html><body>"The supporters of the von Hellmann family fought bravely, but their lack of organization was their undoing. As the King's army approached, the family finally realized that they had failed. By then, most of their sympathizers had been beheaded or taken prisoner by the King's army. The von Hellmanns were very powerful, but their treasonous behavior caused them to fall into disgrace and to be renounced by the royal family. The fall was especially painful to Alfred, who, as patriarch, had to watch as his vassals and then his family were tortured and beheaded, before he ascended the scaffold himself. ..."<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-19.htm">Turn the page</a>
|
||||
<html><body>
|
||||
"What happened next was a repeat of the events of the war with Beleth. Those killed by an undead were resurrected and enlisted in Lidia's force. The higher-level vassals of the Hellmann family became vampires, or high level undead. They possessed indescribable power!<br>
|
||||
It seemed the battle was over, until..."<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-19.htm">Next Page</a>
|
||||
</body></html>
|
@@ -1,4 +1,5 @@
|
||||
<html><body>"It was then that Nidrah's magic sprang into action! At dusk, as the King's army took inventory of the treasures of the Hellmann family, a huge army of undead fighters rushed the castle!<br>
|
||||
They were the souls of the executed vassals, led by Alfred's children Lidia and Eilhalder von Hellmann! All were under the control of Nidrah."<br><br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-20.htm">Turn the page</a>
|
||||
<html><body>
|
||||
"I had my doubts about Lidia. If she was resurrected, how did she become Lord of the Forest of the Dead? Why not Alfred?<br>
|
||||
I think she conspired with Nidrah! I'll investigate this further."<br>
|
||||
Hmm...
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>"What happened next was a repeat of the events of the war with Beleth. Those killed by an undead were resurrected and enlisted in Lidia's force. The higher-level vassals of the Hellmann family became vampires, or high level undeads. They possessed indescribable power!<br>
|
||||
It seemed the battle was over, until..."<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31328-21.htm">Next Page</a>
|
||||
<html><body>Innocentin:<br>
|
||||
Did you finish it? It's the true account of the terrible tragedy that occurred in Hellmann Forest... But it doesn't answer all of my questions... Would you do something for me?<br>
|
||||
I'm afraid it won't be easy, and you look very tired! Why don't you take a break and come back when you're refreshed.
|
||||
</body></html>
|
@@ -1,4 +1,5 @@
|
||||
<html><body>"I had my doubts about Lidia. If she was resurrected, how did she become Lord of the Forest of the Dead? Why not Alfred?<br>
|
||||
I think she conspired with Nidrah! I'll investigate this further."<br>
|
||||
Hmm...
|
||||
<html><body>Innocentin:<br>
|
||||
Did you finish it? It's the true account of the terrible tragedy that occurred in Hellmann Forest... But it doesn't answer all of my questions... Would you do something for me?<br>
|
||||
I'm afraid it won't be easy, and you look very tired! Why don't you take a break and come back later when you're refreshed and have had a little more training.<br>
|
||||
<font color="LEVEL">(The Heart of Lidia quest may only be undertaken by a character of level 64 or above.)</font>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Grand Magister Tifaren:<br>
|
||||
What's your business here?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31334-03.htm">"I need the necromantic rite of communion performed."</a>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31334-02.htm">"I need the necromantic rite of communion performed."</a>
|
||||
</body></html>
|
@@ -1,2 +1,3 @@
|
||||
<html><body>Well:<br>
|
||||
Be prepared to fight the spirit from the well!</body></html>
|
||||
Be prepared to fight the spirit from the well!
|
||||
</body></html>
|
@@ -1,2 +1,3 @@
|
||||
<html><body>Well:<br>
|
||||
The box inside the well is within your reach.</body></html>
|
||||
The box inside the well is within your reach.
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Ghost of Priest:<br>
|
||||
I'm not sure... It's all so foggy. Why am I here?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31528-03.htm">"I used necromancy."</a>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31528-04.htm">"I used necromancy."</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Ghost of Priest:<br>
|
||||
Why would you use necromancy to talk to me?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31528-04.htm">"To find out what happened in the Forest of the Dead."</a>
|
||||
....................<br>
|
||||
(Points to Tifaren.)
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Ghost of Priest:<br>
|
||||
You must mean Lidia von Hellmann, she was the only survivor of the tragedy here.<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31528-06.htm">"What tragedy?"</a>
|
||||
</body></html>
|
||||
</body>
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
This is from High Priest Innocentin? He wants me to work even when I'm dead? Einhasad Temple must be worse off than I thought.<br>
|
||||
Well, I don't have anything else to do, so what do you want to know?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-05.htm">"I want to know about the Mage of the dark arts."</a>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-04.htm">"I want to know about the Mage of the dark arts."</a>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
This is from the Priest of the Earth? He wants me to work even when I'm dead? Einhasad Temple must be worse off than I thought.<br>
|
||||
Well, I don't have anything else to do, so what do you want to know?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-04.htm">"I want to know about the Mage of the dark arts."</a>
|
||||
</body></html>
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
This is from the Priest of the Earth? He wants me to work even when I'm dead? Einhasad Temple must be worse off than I thought.<br>
|
||||
Well, I don't have anything else to do, so what do you want to know?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-05.htm">"I want to know about the Mage of the dark arts."</a>
|
||||
His name is Neid, short for Nidrah.<br>
|
||||
I can't rest in peace until I find him.<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-05.htm">"Tell me about him."</a>
|
||||
</body></html>
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
His name is Neid, short for Nidrah.<br>
|
||||
I can't rest in peace until I find him.<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-06.htm">"Tell me about him."</a>
|
||||
The shock of decapitation has dulled my memory, so I don't remember him well, and his disciples burned all the records.<br>
|
||||
I think I remember why I'm here.<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-06.htm">"Why?"</a>
|
||||
</body></html>
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
The shock of decapitation has dulled my memory, so I don't remember him well, and his disciples burned all the records.<br>
|
||||
I think I remember why I'm here.<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-07.htm">"Why?"</a>
|
||||
I remember now! I hid the book about him in this well.<br>
|
||||
The heads of those accused of following demons were thrown into it. <font color="LEVEL">If you enter the well, they'll attack you</font>!<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-07.htm">"Is there no other way?"</a>
|
||||
</body></html>
|
@@ -1,5 +1,4 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
I remember now! I hid the book about him in this well.<br>
|
||||
The heads of those accused of following demons were thrown into it. <font color="LEVEL">If you enter the well, they'll attack you</font>!<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-08.htm">"Is there no other way?"</a>
|
||||
Of course! We just came up with another way.<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-08.htm">"What is it?"</a>
|
||||
</body></html>
|
@@ -1,4 +1,8 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
Of course! We just came up with another way.<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-09.htm">"What is it?"</a>
|
||||
They aren't very smart! They'll attack if you touch the well.<br>
|
||||
<font color="LEVEL">All you have to do is fight them</font>.<br>
|
||||
While you're fighting, I'll lift up the gate of the well.<br>
|
||||
You can back out if you want to...<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-11.htm">"I'll do it!"</a><br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-09.htm">"I quit."</a>
|
||||
</body></html>
|
@@ -1,8 +1,3 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
They aren't very smart! They'll attack if you touch the well.<br>
|
||||
<font color="LEVEL">All you have to do is fight them</font>.<br>
|
||||
While you're fighting, I'll lift up the gate of the well.<br>
|
||||
You can back out if you want to...<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-12.htm">"I'll do it!"</a><br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-10.htm">"I quit."</a>
|
||||
It's your loss, not mine.
|
||||
</body></html>
|
@@ -1,2 +1,8 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
It's your loss, not mine.</body></html>
|
||||
They aren't very smart! They'll attack if you touch the well.<br>
|
||||
<font color="LEVEL">All you have to do is fight them</font>.<br>
|
||||
While you're fighting, I'll lift up the gate of the well.<br>
|
||||
You can back out if you want to...<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-11.htm">"I'll do it!"</a><br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-09.htm">"I don't want to do it."</a>
|
||||
</body></html>
|
@@ -0,0 +1,8 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
Ok. Then, let's talk about the method. First, take this jewelry. If you hit the well, the spirits will come out.<br>
|
||||
While you are fighting with the spirits, I will break the seal of the hidden report in the well<br>
|
||||
<font color="LEVEL">Just, don't kill the spirit while I'm working. Because they will come back to the well if they die.</font><br>
|
||||
If I break the seal, the color of the jewelry will change. After that, you can kill the spirit or do whatever you want. You got it?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-13.htm">"I am not sure"</a><br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-13a.htm">"I see"</a>
|
||||
</body></html>
|
@@ -1,8 +1,8 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
Ok. Then, let's talk about the method. First, take this jewelry. If you hit the well, the spirits will come out.<br>
|
||||
While you are fighting with the spirits, I will break the seal of the hidden report in the well.<br>
|
||||
If you hit the well, the spirits will come out.<br>
|
||||
While you are fighting with the spirits, I will break the seal of the hidden report in the well<br>
|
||||
<font color="LEVEL">Just, don't kill the spirit while I'm working. Because they will come back to the well if they die.</font><br>
|
||||
If I break the seal, the color of the jewelry will change. After that, you can kill the spirit or do whatever you want. You got it?<br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-14.htm">"I am not sure"</a><br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-15.htm">"I see"</a>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-13.htm">"I am not sure"</a><br>
|
||||
<a action="bypass -h Quest Q022_TragedyInVonHellmannForest 31529-13a.htm">"I see"</a>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
What don't you get?<br>
|
||||
Fight with them, don't kill them. When the jewelry changes color, find me.<br>
|
||||
Don't kill the spirits before the jewelry changes color!
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
OK! Go ahead!
|
||||
</body></html>
|
@@ -1,5 +1,4 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
What don't you get?<br>
|
||||
Fight with them, don't kill them. When the jewelry changes color, find me.<br>
|
||||
Don't kill the spirits before the jewelry changes color!
|
||||
Hey, why don't you do a good job? You can't just hit once and then run away like a child! Real work isn't easy!<br>
|
||||
<font color="LEVEL">You must call the soul by beating the well, fight until the jewil changes color, and then investigate the will! Is that clear?</font>
|
||||
</body></html>
|
@@ -1,3 +1,3 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
OK! Go ahead!
|
||||
The report is at the gate of the well. Since I'm a ghost, you'll have to get it.
|
||||
</body></html>
|
@@ -1,4 +1,3 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
Don't hit them and run away, and don't kill them too quickly!<br>
|
||||
Lure the spirits out by hitting the well and fight them until the jewelry changes color. Then we'll investigate.
|
||||
This is it! I'll break the first seal. Give it to Innocentin, only he can finish opening the lock. Until we meet again!
|
||||
</body></html>
|
@@ -1,3 +1,3 @@
|
||||
<html><body>Ghost of Adventurer:<br>
|
||||
The report is at the gate of the well. Since I'm a ghost, you'll have to get it.
|
||||
This is my life's work! Quickly, find Innocentin!
|
||||
</body></html>
|
@@ -16,179 +16,322 @@
|
||||
*/
|
||||
package quests.Q022_TragedyInVonHellmannForest;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.model.actor.Attackable;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestTimer;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
import quests.Q021_HiddenTruth.Q021_HiddenTruth;
|
||||
|
||||
public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int WELL = 31527;
|
||||
private static final int TIFAREN = 31334;
|
||||
private static final int INNOCENTIN = 31328;
|
||||
private static final int TIFAREN = 31334;
|
||||
private static final int WELL = 31527;
|
||||
private static final int GHOST_OF_PRIEST = 31528;
|
||||
private static final int GHOST_OF_ADVENTURER = 31529;
|
||||
|
||||
// Mobs
|
||||
private static final int[] MOBS =
|
||||
{
|
||||
21553, // Trampled Man
|
||||
21554, // Trampled Man
|
||||
21555, // Slaughter Executioner
|
||||
21556, // Slaughter Executioner
|
||||
21561, // Sacrificed Man
|
||||
};
|
||||
private static final int SOUL_OF_WELL = 27217;
|
||||
// Items
|
||||
private static final int CROSS_OF_EINHASAD = 7141;
|
||||
private static final int LOST_SKULL_OF_ELF = 7142;
|
||||
private static final int LETTER_OF_INNOCENTIN = 7143;
|
||||
private static final int GREEN_JEWEL_OF_ADVENTURER = 7144;
|
||||
private static final int RED_JEWEL_OF_ADVENTURER = 7145;
|
||||
private static final int JEWEL_OF_ADVENTURER_1 = 7144;
|
||||
private static final int JEWEL_OF_ADVENTURER_2 = 7145;
|
||||
private static final int SEALED_REPORT_BOX = 7146;
|
||||
private static final int REPORT_BOX = 7147;
|
||||
|
||||
// Monsters
|
||||
private static final int SOUL_OF_WELL = 27217;
|
||||
|
||||
private NpcInstance _ghostOfPriestInstance = null;
|
||||
private NpcInstance _soulOfWellInstance = null;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 63;
|
||||
private static final Location PRIEST_LOC = new Location(38354, -49777, -1128);
|
||||
private static final Location SOUL_WELL_LOC = new Location(34706, -54590, -2054);
|
||||
private static int _tifarenOwner = 0;
|
||||
private static NpcInstance _soulWellNpc = null;
|
||||
|
||||
public Q022_TragedyInVonHellmannForest()
|
||||
{
|
||||
super(22, "Tragedy in von Hellmann Forest");
|
||||
|
||||
registerQuestItems(LOST_SKULL_OF_ELF, REPORT_BOX, SEALED_REPORT_BOX, LETTER_OF_INNOCENTIN, RED_JEWEL_OF_ADVENTURER, GREEN_JEWEL_OF_ADVENTURER);
|
||||
|
||||
addStartNpc(TIFAREN, INNOCENTIN);
|
||||
addTalkId(INNOCENTIN, TIFAREN, GHOST_OF_PRIEST, GHOST_OF_ADVENTURER, WELL);
|
||||
|
||||
addKillId(MOBS);
|
||||
addKillId(SOUL_OF_WELL);
|
||||
addAttackId(SOUL_OF_WELL);
|
||||
addKillId(SOUL_OF_WELL, 21553, 21554, 21555, 21556, 21561);
|
||||
addStartNpc(TIFAREN);
|
||||
addTalkId(INNOCENTIN, TIFAREN, WELL, GHOST_OF_PRIEST, GHOST_OF_ADVENTURER);
|
||||
registerQuestItems(LOST_SKULL_OF_ELF, CROSS_OF_EINHASAD, REPORT_BOX, JEWEL_OF_ADVENTURER_1, JEWEL_OF_ADVENTURER_2, SEALED_REPORT_BOX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
|
||||
{
|
||||
String htmltext = event;
|
||||
final QuestState st = player.getQuestState(getName());
|
||||
if (st == null)
|
||||
final QuestState qs = player.getQuestState(getName());
|
||||
String htmltext = null;
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31334-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
final QuestState st2 = player.getQuestState(Q021_HiddenTruth.class.getSimpleName());
|
||||
if ((st2 != null) && st2.isCompleted() && (player.getLevel() >= 63))
|
||||
case "31529-02.htm":
|
||||
case "31529-04.htm":
|
||||
case "31529-05.htm":
|
||||
case "31529-06.htm":
|
||||
case "31529-07.htm":
|
||||
case "31529-09.htm":
|
||||
case "31529-13.htm":
|
||||
case "31529-13a.htm":
|
||||
case "31528-02.htm":
|
||||
case "31528-05.htm":
|
||||
case "31528-06.htm":
|
||||
case "31528-07.htm":
|
||||
case "31328-13.htm":
|
||||
case "31328-06.htm":
|
||||
case "31328-05.htm":
|
||||
case "31328-02.htm":
|
||||
case "31328-07.htm":
|
||||
case "31328-08.htm":
|
||||
case "31328-14.htm":
|
||||
case "31328-15.htm":
|
||||
case "31328-16.htm":
|
||||
case "31328-17.htm":
|
||||
case "31328-18.htm":
|
||||
case "31334-12.htm":
|
||||
{
|
||||
htmltext = "31334-02.htm";
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31334-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31334-07.htm"))
|
||||
{
|
||||
if (!st.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
case "31334-02.htm":
|
||||
{
|
||||
st.set("cond", "2");
|
||||
if (qs.isCreated())
|
||||
{
|
||||
final QuestState qs2 = player.getQuestState(Q021_HiddenTruth.class.getSimpleName());
|
||||
if ((player.getLevel() >= MIN_LEVEL) && (qs2 != null) && qs2.isCompleted())
|
||||
{
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31334-03.htm";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31334-04.htm":
|
||||
{
|
||||
htmltext = "31334-06.htm";
|
||||
if (qs.isCreated())
|
||||
{
|
||||
qs.setState(State.STARTED);
|
||||
qs.set("cond", "1");
|
||||
qs.playSound(QuestState.SOUND_ACCEPT);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31334-08.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
case "31334-07.htm":
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CROSS_OF_EINHASAD, 1);
|
||||
if (!qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
qs.set("cond", "2");
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31334-06.htm";
|
||||
qs.set("cond", "3");
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31334-08.htm":
|
||||
{
|
||||
st.set("cond", "2");
|
||||
htmltext = "31334-07.htm";
|
||||
if (qs.getInt("cond") == 3)
|
||||
{
|
||||
qs.set("cond", "4");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31334-13.htm"))
|
||||
{
|
||||
if (_ghostOfPriestInstance != null)
|
||||
case "31334-13.htm":
|
||||
{
|
||||
st.set("cond", "6");
|
||||
htmltext = "31334-14.htm";
|
||||
final int cond = qs.getInt("cond");
|
||||
if (((5 <= cond) && (cond <= 7)) && qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
if (_tifarenOwner == 0)
|
||||
{
|
||||
_tifarenOwner = player.getObjectId();
|
||||
final NpcInstance ghost2 = addSpawn(GHOST_OF_PRIEST, PRIEST_LOC, true, 0);
|
||||
ghost2.setScriptValue(player.getObjectId());
|
||||
startQuestTimer("DESPAWN_GHOST2", 1000 * 120, ghost2, player);
|
||||
ghost2.broadcastNpcSay("Did you call me, " + player.getName() + "?");
|
||||
if (((cond == 5) || (cond == 6)) && qs.hasQuestItems(LOST_SKULL_OF_ELF))
|
||||
{
|
||||
qs.takeItems(LOST_SKULL_OF_ELF, -1);
|
||||
qs.set("cond", "7");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.set("cond", "6");
|
||||
htmltext = "31334-14.htm";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31528-04.htm":
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LOST_SKULL_OF_ELF, 1);
|
||||
_ghostOfPriestInstance = addSpawn(GHOST_OF_PRIEST, 38418, -49894, -1104, 0, false, 120000);
|
||||
_ghostOfPriestInstance.broadcastNpcSay("Did you call me, " + player.getName() + "?");
|
||||
startQuestTimer("ghost_cleanup", 118000, null, player, false);
|
||||
if (npc.getScriptValue() == player.getObjectId())
|
||||
{
|
||||
qs.playSound(QuestState.SOUND_ACCEPT);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31528-08.htm"))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
|
||||
cancelQuestTimer("ghost_cleanup", null, player);
|
||||
|
||||
if (_ghostOfPriestInstance != null)
|
||||
case "31528-08.htm":
|
||||
{
|
||||
_ghostOfPriestInstance.deleteMe();
|
||||
_ghostOfPriestInstance = null;
|
||||
final QuestTimer qt = getQuestTimer("DESPAWN_GHOST2", npc, player);
|
||||
if ((qt != null) && (npc.getScriptValue() == player.getObjectId()))
|
||||
{
|
||||
qt.cancel();
|
||||
npc.setScriptValue(0);
|
||||
startQuestTimer("DESPAWN_GHOST2", 1000 * 3, npc, player);
|
||||
qs.set("cond", "8");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31328-10.htm"))
|
||||
{
|
||||
st.set("cond", "9");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(LETTER_OF_INNOCENTIN, 1);
|
||||
}
|
||||
else if (event.equals("31529-12.htm"))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_INNOCENTIN, 1);
|
||||
st.giveItems(GREEN_JEWEL_OF_ADVENTURER, 1);
|
||||
}
|
||||
else if (event.equals("31527-02.htm"))
|
||||
{
|
||||
if (_soulOfWellInstance == null)
|
||||
case "DESPAWN_GHOST2":
|
||||
{
|
||||
_soulOfWellInstance = addSpawn(SOUL_OF_WELL, 34860, -54542, -2048, 0, false, 0);
|
||||
|
||||
// Attack player.
|
||||
((Attackable) _soulOfWellInstance).addDamageHate(player, 0, 99999);
|
||||
_soulOfWellInstance.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
_tifarenOwner = 0;
|
||||
if (npc.getScriptValue() != 0)
|
||||
{
|
||||
npc.broadcastNpcSay("I_M_CONFUSED_MAYBE_IT_S_TIME_TO_GO_BACK");
|
||||
}
|
||||
npc.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "31328-03.htm":
|
||||
{
|
||||
if (qs.getInt("cond") == 8)
|
||||
{
|
||||
|
||||
qs.takeItems(CROSS_OF_EINHASAD, -1);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31328-09.htm":
|
||||
{
|
||||
if (qs.getInt("cond") == 8)
|
||||
{
|
||||
qs.giveItems(LETTER_OF_INNOCENTIN, 1);
|
||||
qs.set("cond", "9");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31328-11.htm":
|
||||
{
|
||||
if ((qs.getInt("cond") == 14) && qs.hasQuestItems(REPORT_BOX))
|
||||
{
|
||||
qs.takeItems(REPORT_BOX, -1);
|
||||
qs.set("cond", "15");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31328-19.htm":
|
||||
{
|
||||
if (qs.getInt("cond") == 15)
|
||||
{
|
||||
qs.set("cond", "16");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31527-02.htm":
|
||||
{
|
||||
if ((qs.getInt("cond") == 10) && (_soulWellNpc == null))
|
||||
{
|
||||
_soulWellNpc = addSpawn(SOUL_OF_WELL, SOUL_WELL_LOC, true, 0);
|
||||
startQuestTimer("activateSoulOfWell", 90000, _soulWellNpc, player);
|
||||
startQuestTimer("despawnSoulOfWell", 120000, _soulWellNpc, player);
|
||||
_soulWellNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31527-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "activateSoulOfWell":
|
||||
{
|
||||
// this enables onAttack ELSE IF block which allows the player to proceed the quest
|
||||
npc.setScriptValue(1);
|
||||
break;
|
||||
}
|
||||
case "despawnSoulOfWell":
|
||||
{
|
||||
// if the player fails to proceed the quest in 2 minutes, the soul is unspawned
|
||||
if (!npc.isDead())
|
||||
{
|
||||
_soulWellNpc = null;
|
||||
}
|
||||
npc.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "31529-03.htm":
|
||||
{
|
||||
if ((qs.getInt("cond") == 9) && qs.hasQuestItems(LETTER_OF_INNOCENTIN))
|
||||
{
|
||||
qs.set("memoState", "8");
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31529-08.htm":
|
||||
{
|
||||
if (qs.getInt("memoState") == 8)
|
||||
{
|
||||
qs.set("memoState", "9");
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31529-11.htm":
|
||||
{
|
||||
if (qs.getInt("memoState") == 9)
|
||||
{
|
||||
qs.giveItems(JEWEL_OF_ADVENTURER_1, 1);
|
||||
qs.set("cond", "10");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.set("memoState", "10");
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("attack_timer"))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GREEN_JEWEL_OF_ADVENTURER, 1);
|
||||
st.giveItems(RED_JEWEL_OF_ADVENTURER, 1);
|
||||
}
|
||||
else if (event.equals("31328-13.htm"))
|
||||
{
|
||||
st.set("cond", "15");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(REPORT_BOX, 1);
|
||||
}
|
||||
else if (event.equals("31328-21.htm"))
|
||||
{
|
||||
st.set("cond", "16");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("ghost_cleanup"))
|
||||
{
|
||||
_ghostOfPriestInstance.broadcastNpcSay("I'm confused! Maybe it's time to go back.");
|
||||
_ghostOfPriestInstance = null;
|
||||
return null;
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
@@ -196,271 +339,323 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
@Override
|
||||
public String onTalk(NpcInstance npc, PlayerInstance player)
|
||||
{
|
||||
final QuestState qs = player.getQuestState(getName());
|
||||
String htmltext = getNoQuestMsg();
|
||||
final QuestState st = player.getQuestState(getName());
|
||||
if (st == null)
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
switch (npc.getNpcId())
|
||||
case TIFAREN:
|
||||
{
|
||||
switch (qs.getInt("cond"))
|
||||
{
|
||||
case INNOCENTIN:
|
||||
final QuestState st2 = player.getQuestState(Q021_HiddenTruth.class.getSimpleName());
|
||||
if ((st2 != null) && st2.isCompleted())
|
||||
case 0:
|
||||
{
|
||||
if (qs.isCreated())
|
||||
{
|
||||
if (!st.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
htmltext = "31328-01.htm";
|
||||
st.giveItems(CROSS_OF_EINHASAD, 1);
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31328-01b.htm";
|
||||
}
|
||||
htmltext = "31334-01.htm";
|
||||
}
|
||||
else if (qs.isCompleted())
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
}
|
||||
break;
|
||||
|
||||
case TIFAREN:
|
||||
htmltext = "31334-01.htm";
|
||||
}
|
||||
case 1:
|
||||
case 3:
|
||||
{
|
||||
htmltext = "31334-05.htm";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case TIFAREN:
|
||||
if ((cond == 1) || (cond == 2) || (cond == 3))
|
||||
}
|
||||
case 4:
|
||||
case 5:
|
||||
{
|
||||
if (qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
htmltext = "31334-05.htm";
|
||||
}
|
||||
else if (cond == 4)
|
||||
{
|
||||
htmltext = "31334-09.htm";
|
||||
}
|
||||
else if ((cond == 5) || (cond == 6))
|
||||
{
|
||||
if (st.hasQuestItems(LOST_SKULL_OF_ELF))
|
||||
{
|
||||
htmltext = (_ghostOfPriestInstance == null) ? "31334-10.htm" : "31334-11.htm";
|
||||
}
|
||||
else
|
||||
if (!qs.hasQuestItems(LOST_SKULL_OF_ELF))
|
||||
{
|
||||
htmltext = "31334-09.htm";
|
||||
st.set("cond", "4");
|
||||
}
|
||||
else if (_tifarenOwner == 0)
|
||||
{
|
||||
htmltext = "31334-10.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31334-11.htm";
|
||||
}
|
||||
}
|
||||
else if (cond == 7)
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
case 7:
|
||||
{
|
||||
if (qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
htmltext = (_ghostOfPriestInstance != null) ? "31334-15.htm" : "31334-17.htm";
|
||||
if (_tifarenOwner == 0)
|
||||
{
|
||||
htmltext = "31334-17.htm";
|
||||
}
|
||||
else if (_tifarenOwner == player.getObjectId())
|
||||
{
|
||||
htmltext = "31334-15.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31334-16.htm";
|
||||
qs.set("cond", "6");
|
||||
}
|
||||
}
|
||||
else if (cond > 7)
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
if (qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
htmltext = "31334-18.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
case INNOCENTIN:
|
||||
if (cond < 3)
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GHOST_OF_PRIEST:
|
||||
{
|
||||
if (npc.getScriptValue() == player.getObjectId())
|
||||
{
|
||||
htmltext = "31528-01.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31528-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case INNOCENTIN:
|
||||
{
|
||||
switch (qs.getInt("cond"))
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
if (!qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
if (!st.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
htmltext = "31328-01.htm";
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(CROSS_OF_EINHASAD, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31328-01b.htm";
|
||||
}
|
||||
qs.giveItems(CROSS_OF_EINHASAD, 1);
|
||||
qs.set("cond", "3");
|
||||
htmltext = "31328-01.htm";
|
||||
}
|
||||
else if (cond == 3)
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
if (qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
htmltext = "31328-01b.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
if (qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
htmltext = "31328-02.htm";
|
||||
}
|
||||
else if (cond == 8)
|
||||
else
|
||||
{
|
||||
htmltext = "31328-03.htm";
|
||||
}
|
||||
else if (cond == 9)
|
||||
{
|
||||
htmltext = "31328-11.htm";
|
||||
}
|
||||
else if (cond == 14)
|
||||
{
|
||||
if (st.hasQuestItems(REPORT_BOX))
|
||||
{
|
||||
htmltext = "31328-12.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.set("cond", "13");
|
||||
}
|
||||
}
|
||||
else if (cond == 15)
|
||||
{
|
||||
htmltext = "31328-14.htm";
|
||||
}
|
||||
else if (cond == 16)
|
||||
{
|
||||
htmltext = (player.getLevel() < 64) ? "31328-23.htm" : "31328-22.htm";
|
||||
st.exitQuest(false);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
htmltext = "31328-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
case GHOST_OF_PRIEST:
|
||||
if (cond == 7)
|
||||
}
|
||||
case 9:
|
||||
{
|
||||
htmltext = "31328-09a.htm";
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
{
|
||||
if (qs.hasQuestItems(REPORT_BOX))
|
||||
{
|
||||
htmltext = "31528-01.htm";
|
||||
}
|
||||
else if (cond == 8)
|
||||
{
|
||||
htmltext = "31528-08.htm";
|
||||
htmltext = "31328-10.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
case GHOST_OF_ADVENTURER:
|
||||
if (cond == 9)
|
||||
}
|
||||
case 15:
|
||||
{
|
||||
htmltext = "31328-12.htm";
|
||||
break;
|
||||
}
|
||||
case 16:
|
||||
{
|
||||
qs.rewardExpAndSp(345966, 31578);
|
||||
qs.exitQuest(false);
|
||||
if (player.getLevel() >= MIN_LEVEL)
|
||||
{
|
||||
if (st.hasQuestItems(LETTER_OF_INNOCENTIN))
|
||||
htmltext = "31328-20.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31328-21.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WELL:
|
||||
{
|
||||
switch (qs.getInt("cond"))
|
||||
{
|
||||
case 10:
|
||||
{
|
||||
if (qs.hasQuestItems(JEWEL_OF_ADVENTURER_1))
|
||||
{
|
||||
htmltext = "31527-01.htm";
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 12:
|
||||
{
|
||||
if (qs.hasQuestItems(JEWEL_OF_ADVENTURER_2) && !qs.hasQuestItems(SEALED_REPORT_BOX))
|
||||
{
|
||||
qs.giveItems(SEALED_REPORT_BOX, 1);
|
||||
qs.set("cond", "13");
|
||||
htmltext = "31527-04.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
{
|
||||
htmltext = "31527-05.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GHOST_OF_ADVENTURER:
|
||||
{
|
||||
switch (qs.getInt("cond"))
|
||||
{
|
||||
case 9:
|
||||
{
|
||||
if (qs.hasQuestItems(LETTER_OF_INNOCENTIN))
|
||||
{
|
||||
switch (qs.getInt("memoState"))
|
||||
{
|
||||
htmltext = "31529-01.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31529-10.htm";
|
||||
st.set("cond", "8");
|
||||
case 0:
|
||||
{
|
||||
htmltext = "31529-01.htm";
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
htmltext = "31529-03a.htm";
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
{
|
||||
htmltext = "31529-10.htm";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cond == 10)
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
{
|
||||
if (qs.hasQuestItems(JEWEL_OF_ADVENTURER_1))
|
||||
{
|
||||
final int id = qs.getInt("memoState");
|
||||
if (id == 10)
|
||||
{
|
||||
htmltext = "31529-12.htm";
|
||||
}
|
||||
else if (id == 11)
|
||||
{
|
||||
htmltext = "31529-14.htm";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 11:
|
||||
{
|
||||
if (qs.hasQuestItems(JEWEL_OF_ADVENTURER_2) && !qs.hasQuestItems(SEALED_REPORT_BOX))
|
||||
{
|
||||
htmltext = "31529-15.htm";
|
||||
qs.set("cond", "12");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 13:
|
||||
{
|
||||
if (qs.hasQuestItems(JEWEL_OF_ADVENTURER_2) && qs.hasQuestItems(SEALED_REPORT_BOX))
|
||||
{
|
||||
qs.giveItems(REPORT_BOX, 1);
|
||||
qs.takeItems(SEALED_REPORT_BOX, -1);
|
||||
qs.takeItems(JEWEL_OF_ADVENTURER_2, -1);
|
||||
qs.set("cond", "14");
|
||||
htmltext = "31529-16.htm";
|
||||
}
|
||||
else if (cond == 11)
|
||||
{
|
||||
if (st.hasQuestItems(RED_JEWEL_OF_ADVENTURER))
|
||||
{
|
||||
htmltext = "31529-17.htm";
|
||||
st.set("cond", "12");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(RED_JEWEL_OF_ADVENTURER, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31529-09.htm";
|
||||
st.set("cond", "10");
|
||||
}
|
||||
}
|
||||
else if (cond == 12)
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
{
|
||||
if (qs.hasQuestItems(REPORT_BOX))
|
||||
{
|
||||
htmltext = "31529-17.htm";
|
||||
}
|
||||
else if (cond == 13)
|
||||
{
|
||||
if (st.hasQuestItems(SEALED_REPORT_BOX))
|
||||
{
|
||||
htmltext = "31529-18.htm";
|
||||
st.set("cond", "14");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SEALED_REPORT_BOX, 1);
|
||||
st.giveItems(REPORT_BOX, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31529-10.htm";
|
||||
st.set("cond", "12");
|
||||
}
|
||||
}
|
||||
else if (cond > 13)
|
||||
{
|
||||
htmltext = "31529-19.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
case WELL:
|
||||
if (cond == 10)
|
||||
{
|
||||
htmltext = "31527-01.htm";
|
||||
}
|
||||
else if (cond == 11)
|
||||
{
|
||||
htmltext = "31527-03.htm";
|
||||
}
|
||||
else if (cond == 12)
|
||||
{
|
||||
htmltext = "31527-04.htm";
|
||||
st.set("cond", "13");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SEALED_REPORT_BOX, 1);
|
||||
}
|
||||
else if (cond > 12)
|
||||
{
|
||||
htmltext = "31527-05.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case State.COMPLETED:
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isPet)
|
||||
public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isSummon)
|
||||
{
|
||||
final QuestState st = attacker.getQuestState(getName());
|
||||
if ((st == null) || !st.isStarted() || isPet)
|
||||
final QuestState qs = attacker.getQuestState(getName());
|
||||
if ((qs != null) && (qs.getInt("cond") == 10) && qs.hasQuestItems(JEWEL_OF_ADVENTURER_1))
|
||||
{
|
||||
return null;
|
||||
if (qs.getInt("memoState") == 10)
|
||||
{
|
||||
qs.set("memoState", "11");
|
||||
}
|
||||
else if (npc.isScriptValue(1))
|
||||
{
|
||||
qs.takeItems(JEWEL_OF_ADVENTURER_1, -1);
|
||||
qs.giveItems(JEWEL_OF_ADVENTURER_2, 1);
|
||||
qs.set("cond", "11");
|
||||
}
|
||||
}
|
||||
|
||||
if (getQuestTimer("attack_timer", null, attacker) != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (st.getInt("cond") == 10)
|
||||
{
|
||||
startQuestTimer("attack_timer", 20000, null, attacker, false);
|
||||
}
|
||||
|
||||
return null;
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
public String onKill(NpcInstance npc, PlayerInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState st = checkPlayerState(player, npc, State.STARTED);
|
||||
if (st == null)
|
||||
if (Util.checkIfInRange(Config.ALT_PARTY_RANGE, killer, npc, true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (npc.getNpcId() != SOUL_OF_WELL)
|
||||
{
|
||||
if ((st.getInt("cond") == 4) && st.dropItems(LOST_SKULL_OF_ELF, 1, 1, 100000))
|
||||
if (npc.getNpcId() == SOUL_OF_WELL)
|
||||
{
|
||||
st.set("cond", "5");
|
||||
_soulWellNpc = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
final QuestState qs = killer.getQuestState(getName());
|
||||
if ((qs != null) && (qs.getInt("cond") == 4) && qs.hasQuestItems(CROSS_OF_EINHASAD) && !qs.hasQuestItems(LOST_SKULL_OF_ELF) && (Rnd.get(100) < 10))
|
||||
{
|
||||
qs.giveItems(LOST_SKULL_OF_ELF, 1);
|
||||
qs.set("cond", "5");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelQuestTimer("attack_timer", null, player);
|
||||
_soulOfWellInstance = null;
|
||||
}
|
||||
|
||||
return null;
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
}
|
@@ -215,6 +215,10 @@ public class Q023_LidiasHeart extends Quest
|
||||
{
|
||||
htmltext = "31328-08.htm";
|
||||
}
|
||||
else if (cond == 5)
|
||||
{
|
||||
htmltext = "31328-10.htm";
|
||||
}
|
||||
else if (cond > 5)
|
||||
{
|
||||
htmltext = "31328-21.htm";
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Dorian:<br>
|
||||
Are you the one who recovered the Silver Spear? Your reputation precedes you! Actually, I have a problem you may be able to help me with!<br>
|
||||
Would you be willing to help me?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31389-02.htm">"I'll do it!"</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-03.htm">"I'll do it!"</a>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Dorian:<br>
|
||||
Did you place the flower at the tombstone? Did you notice who was buried in that grave?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-06.htm">Nidrah</a><br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-07.htm">Lidia</a><br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-08.htm">Rose</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Dorian:<br>
|
||||
Yes! Rose rests there... She was the maid Mr. Alfred, my former master, assigned to his daughter. They were about the same age.<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31389-08.htm">"Who is Alfred's daughter?"</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-10.htm">"Who is Alfred's daughter?"</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Dorian:<br>
|
||||
Yes! Rose rests there... She was the maid Mr. Alfred, my former master, assigned to his daughter. They were about the same age.<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-10.htm">"Who is Alfred's daughter?"</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Dorian:<br>
|
||||
Why, she's Lady Lidia, current lord of this manor! She thought highly of Rose, and didn't want her coming back as an undead! Lady Lidia graciously allowed Rose to rest in peace. That's better than most others get around here! <br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31389-09.htm">"How did Rose earn such a privilege?"</a>
|
||||
Why, she's Lady Lidia, current lord of this manor! She thought highly of Rose, and didn't want her coming back as an undead! Lady Lidia graciously allowed Rose to rest in peace. That's better than most others get around here!<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-11.htm">"How did Rose earn such a privilege?"</a>
|
||||
</body></html>
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Dorian:<br>
|
||||
I don't know, exactly. All I know is, my fiance was with Lady Lidia, and died protecting her!<br>
|
||||
Anyway, thank you for taking the flower to Rose's grave.<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31389-10.htm">"It's the least I could do."</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-12.htm">"It's the least I could do."</a>
|
||||
</body></html>
|
@@ -1,6 +1,6 @@
|
||||
<html><body>Dorian:<br>
|
||||
Oh, don't be so modest! You remembered Rose's name! And you asked such respectful questions!<br>
|
||||
You're obviously a wonderful person!<br>Do you suppose you could do something else for me? <br>
|
||||
You're obviously a wonderful person!<br>Do you suppose you could do something else for me?<br>
|
||||
Recently my nights have been dreamless, and I've woken up with wounds that I don't remember getting! Something strange is going on in this village! Will you investigate?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31389-11.htm">"Yes, I will."</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-13.htm">"Yes, I will."</a>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Dorian:<br>
|
||||
I can't remember last night at all, and I'm exhausted! Have you discovered anything?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-16.htm">"There's a vampire!"</a><br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-16a.htm">"The villagers are changing into monsters!"</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Dorian:<br>
|
||||
A vampire, eh?! Hmm... I see. Is the lord of the manor coming down here making the rounds? Hmm...Why am I so tired then?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31389-15.htm">"I'll tell you why! Because you're the vampire!"</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-17.htm">"I'll tell you why! Because you're the vampire!"</a>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Dorian:<br>
|
||||
Don't you dare compare me to those idiots in the village!<br>
|
||||
A monster, eh? And it only comes out at night?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-17.htm">"That's right!"</a>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Dorian:<br>
|
||||
Nooo!<br>
|
||||
It can't be! Me? A vampire? It's true that the lord of the manor I serve is an undead... But that doesn't mean I'm a vampire!<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-18.htm">"Check out this crucifix!"</a>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Dorian:<br>
|
||||
I gave you that! ...I see. Now I remember...<br>
|
||||
Young master Einhart and... and... you! You were standing there... holding the holy symbol!<br>
|
||||
Now I know... why the lord gave me such an order!<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31389-19.htm">"What order?"</a>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Dorian:<br>
|
||||
Oh, come in! Say, you must've dropped this the last time you were here! It looks very valuable! You should keep it in a safe place.
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Dorian:<br>
|
||||
Did you see the maid of the lord? I have no memories after dark, so I have no idea what she's like!<br>
|
||||
I've heard that she's quite beautiful! I was even told that she resembles my fiance!<br>
|
||||
At least she's... alive! What a privilege, even if it's only during the day! Oh, well, I shouldn't be talking about this...
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Long time no see. Things sure are quiet these days!<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-02.htm">"What do you know about an odd doll?"</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
What are you talking about?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-03.htm">"Look at this!"</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Oh, that. It's an amulet to help my puppets collect bone pieces in the forest without getting hurt.<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31522-04.htm">"That's not what I heard."</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-05.htm">"That's not what I heard."</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
It may look a little odd, but it's just an amulet.<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-05.htm">"That's not what I heard."</a>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>Mysterious Wizard:<br>
|
||||
What did you hear?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-06.htm">"That it's related to Wizard Nidrah."</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Where did you hear the name Nidrah?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-07.htm">"From the person who told me to see you about the doll."</a>
|
||||
</body></html>
|
@@ -2,5 +2,5 @@
|
||||
So, you're under the protection of Lady Lidia.<br>
|
||||
We've signed a mutual contract not to harm each other.<br>
|
||||
This doll was made by Nidrah, and tells the Lord of the Forest of the Dead not to attack its bearer.<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31522-07.htm">"How did you get it?"</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-08.htm">"How did you get it?"</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
You trust me now? Tell me about Nidrah!<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-10.htm">"Allright, I'll tell you."</a>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
So tell me!<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-11.htm">"You're gathering materials for the dark arts."</a><br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-13.htm">"You signed a contract."</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Where is your proof?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-12.htm">"Lady Lidia controls all the dead of this earth, a power nearly equal to a god's! One must be granted authority by her to have power over the dead in any capacity."</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
So?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-16.htm">"Nobody is allowed here without permission. That you're here means you have power at least equal to the Lord of the Forest of the Dead."</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
So I made a mistake. What's wrong with that?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-14.htm">"It's impossible to have a real nonaggression contract in this situation!"</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
History is filled with such contracts. Do you know why?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-15.htm">"Nonaggression contracts are signed between two equal powers. It stays in effect only as long as it benefits them. If one party becomes weaker, the contract is nullified."</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Go on.<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-16.htm">"The Lord of the Dead has absolute power here, why would she sign a contract with you? You must have power equal to hers, or else she reaps some benefit from not fighting you."</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
You think I have something to do with Nidrah?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31522-16.htm">"Yes."</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-17.htm">"Yes."</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Let's say for arguments sake that I'm Nidrah. What difference would that make?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31522-17.htm">"Here's the missing page from the diary."</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-19.htm">"Here's the missing page from the diary."</a>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Let's say for arguments sake that I'm Nidrah. What difference would that make?<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-19.htm">"Here's the missing page from the diary."</a>
|
||||
</body></html>
|
@@ -1,5 +1,5 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
You found the diary! You're tracking Nidrah.<br>
|
||||
Going further may be difficult, you're following a dangerous man. If you insist, you'll need the key.<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31522-18.htm">"Key?"</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-20.htm">"Key?"</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
The Priest of the Rune Township has the key. I'll give you the doll, it represents the person who carried the real authority in the Hellmann Forest and Rune Territory, even over Lidia.<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31522-19.htm">"Who is it?"</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31522-21.htm">"Who is it?"</a>
|
||||
</body></html>
|
@@ -1,3 +1,3 @@
|
||||
<html><body>Mysterious Mage:<br>
|
||||
<html><body>Mysterious Wizard:<br>
|
||||
Visit the temple of the Rune Township if you want to learn more about them. Ask about the one who hides the truth...
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Tombstone:<br>
|
||||
<font color="LEVEL">Here lies Rose, a faithful, loving servant. May she rest in peace.</font><br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31531-02.htm">Place flowers on the grave.</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31531-02.htm">Place flowers on the grave.</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Maid of Lidia:<br>
|
||||
My lady thanks you for recovering the Silver Spear. It's a family treasure.<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31532-02.htm">"I was doing my duty."</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31532-02.htm">"I was doing my duty."</a>
|
||||
</body></html>
|
@@ -1,4 +1,4 @@
|
||||
<html><body>Maid of Lidia:<br>
|
||||
She knows how you helped her ancestors rest in peace. My lady knows all that happens in her forest!<br>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForrestOfTheDead 31532-03.htm">"Everything?"</a>
|
||||
<a action="bypass -h Quest Q024_InhabitantsOfTheForestOfTheDead 31532-03.htm">"Everything?"</a>
|
||||
</body></html>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user