This commit is contained in:
mobius
2015-01-01 20:02:50 +00:00
parent eeae660458
commit a6a3718849
17894 changed files with 2818932 additions and 0 deletions

View File

@ -0,0 +1,4 @@
<html><body>Rafforty:<br>
I don't know how you got here, but you shouldn't be wandering around by yourself. You must leave this place before the Ice Queen finds out you're here!<br>
(Characters must have achieved at least level 53 to undertake this quest.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Rafforty:<br>
Welcome! You've helped to give our Zinnia Guild a long-term goal. Honestly though, we could use some more help. Could you help us again? We'll give you reward, but I'm not sure if you'll be satisfied with it...<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream ACCEPT">I'll help you.</a>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Rafforty:<br>
Why are you here? Well, since you're here anyway, why you take a little rest and then help us out?<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream ACCEPT">What can I do for you?</a>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Repre:<br>
I'm saying that the lifeforms in this area for the most part have something called Black Ice Crystals inside their bodies. The crystals cause the creatures to become violent, which is why there are a few hunters collecting the crystals for research. If you collect some for them, you'll get a pretty decent reward. Of course, most of the time, you'll find a Silver Ice Crystal rather than a Black Ice Crystal. But even if you bring back some Silver Ice Crystals, you'll still get a reward.<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32020-07.html">"How do I obtain Black Ice Crystals?"</a>
</body></html>

View File

@ -0,0 +1,8 @@
<html><body>Rafforty:<br>
Thank you for your help.<br>
According to the information we acquired from you, to turn Freya back into her old self, we have to collect Ice Crystals that are spread all over this territory and which are grown within creatures' bodies.<br>
They usually have a silver color, and that's why they're called Silver Ice Crystals. If you can bring these back to me, I will reward you for your work. And, I know it will be even more difficult to get Black Ice Crystals, but if you bring those back to me, I will reward you even more.<br>
Oh, yes! And if you ever find any Silver Hemocytes, don't throw them away.<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32020-06.html">How do I get a Black Ice Crystal?</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32020-08.html">Where do I use Silver Hemocytes?</a>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Rafforty:<br>
A Black Ice Crystal can be made out of a Silver Ice Crystal by using the tools on the shelf. Generally, Artisans do this, so it is not easy, but if you can make it into a Black Ice Crystal, then I'll reward you well. Failure will bring you nothing, so be careful.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Rafforty:<br>
You may get a Black Ice Crystal by processing a Silver Ice Crystal using the tools on the shelf. It won't be easy, as it is a job usually done only by professional craftsmen. If you succeed in creating the Black Ice Crystal, I'll pay you very well for it. Be careful, however, because failure won't pay you a thing.<br>
If you were to stay around for a while we might could work out a deal...
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Rafforty:<br>
The blood of the creatures that have been under the control of the Black Ice Crystal for a long time gradually changes to silver. The Ice Queen's pets are enticed by this blood, and we must have it for our plan as well. Please collect the Silver Hemocytes for us. The monsters in the Frozen Labyrinth that have Silver Hemocytes are the Massive Maze Bandersnatch, Panthera, Pronghorn, Ice Tarantula, Frost Tarantula, Frost Buffalo, Lost Buffalo, Ursus, Lost Yeti and Frost Yeti.<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32020-09.html">"Tell me more about your plan."</a>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Rafforty:<br>
As part of the Jinia Guild's goal to restore Queen Freya to her original self, we needed Silver Hemocytes to enter the Ice Queen's Castle. Now that Ice Fairy Sirra has been defeated and we've entered the next stage in our plan... that is to say, fight Freya herself... we no longer need you to bring Silver Hemocytes to the castle. However, when you're strong enough, come back and talk to me about the Guild's new plans regarding Freya.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Rafforty:<br>
Haven't you left yet? I'm telling you again, most of the creatures around here have a Black Ice Crystal in their bodies! It seems like those crystals make them very violent. We need to study those crystals. Bring me some and you'll be well-rewarded! Of course, you probably won't get a Black Ice Crystal at first. You'll get a Silver Ice Crystal. Bring me some Silver Ice Crystals and I'll reward you for them, too.<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32020-07.html">How do I get the Black Ice Crystals?</a>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Rafforty:<br>
It's dangerous outside, so please be careful! I'm telling you, most of the creatures living in the Frozen Labyrinth have a Silver Ice Crystal in their bodies. Bring me these crystals and you'll be well-rewarded. Black Ice Crystals are quite rare, but if you find one and bring it back to me, you'll be rewarded even more!<br>
Oh, by the way... If you ever get any Silver Hemocytes, don't throw them away.<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32020-06.html">How do I get Black Ice Crystals?</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32020-08.html">Where do I use Silver Hemocytes?</a>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Rafforty:<br>
You look like you did something big outside. I can feel the unique energy of Ice Crystals coming from you! You have them, don't you? Don't you want to give it to me? I'll pay you well!<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream ASK">What's the reward?</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream LATER">I'll give it to you later.</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream QUIT">I want to quit doing this.</a>
</body></html>

View File

@ -0,0 +1,8 @@
<html><body>Rafforty:<br>
Any success? You look exhausted, my friend!<br>
I can feel the unique energy of Ice Crystals coming from you! Can I have them? I'll pay you well!<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream ASK">What's the reward?</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream LATER">I'll give it to you later.</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream QUIT">I quit.</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32020-08.html">How do I use Silver Hemocytes?</a>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Rafforty:<br>
Well, of course, I'll pay you with Adena! You can use it anywhere! Are you willing to hand over the Black Ice Crystals to me?<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream REWARD">Here they are.</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream LATER">I'll give them to you later.</a>
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>Rafforty:<br>
Yes. Then will you give the Ice Crystals to me?<br>
Ah! How would you like be paid? Do you want Adena for it all? Or perhaps you'd like to trade for some other items? I must warn you, however... If you want good materials, you'd better have lots of Ice Crystals.<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream REWARD">Give me money.</a><br>
<a action="bypass -h npc_%objectId%_multisell 648">"Show me the items."</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream LATER">I changed my mind. I'll do it later.</a>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Rafforty:<br>
Here's your reward. This should compensate you for your hard work. If you find any more Ice Crystals, come back to see me again.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Rafforty:<br>
Here, I've filled this full of Adena for you. If you find more Ice Crystals, please bring them to me.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Rafforty:<br>
Where did you put the crystals? There's nothing in this pouch.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Rafforty:<br>
OK. If you change your mind, please come back and find me.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Rafforty:<br>
Very well. You know how important those crystals are to us, so I'll wait. Please, be careful!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Rafforty:<br>
OK. I won't do any more business with you. Good-bye.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Rafforty:<br>
Are you really quitting? Is something bothering you?<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32020-23.html">I just need a rest.</a>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Rafforty:<br>
Very well! You've been a lot of help to us! Come back anytime!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ice Shelf:<br>
What am I to do with this? What is important about it?
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ice Shelf:<br>
The ice shards on the shelf indicate that it was used quite recently. Hm...are these shards from the Silver Ice Crystal that Rafforty spoke of?
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Ice Shelf:<br>
It is obvious from looking at this shelf that someone has been using it as a workbench. I have the Silver Ice Crystal...I wonder if it would be reasonable to work on it here?<br>
Here are some old tools on the shelf I can use.<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32023-04.html">Start working</a>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Ice Shelf:<br>
To work, then. Which tool should I use to begin?<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32023-05.html">Trim with a chisel.</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream 32023-06.html">Trim with a scraper.</a>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Ice Shelf:<br>
Now it emits black light. Success is very near! There is but one step left to finish the project.<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream REPLY4">Use the engraving knife.</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream REPLY5">Use the file.</a>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Ice Shelf:<br>
Now it emits black light. Success is very near! There is but one step left to finish the project.<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream REPLY4">Use the engraving knife.</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream REPLY5">Use the file.</a>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ice Shelf:<br>
I have completed the Black Ice Crystal, and its black light appears to absorb all the light around it. Success!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ice Shelf:<br>
Alas! It was all for nothing because of a minor mistake. The tools were not as easy to use as I had thought. It was all a waste of crystals.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Ice Shelf:<br>
Now to apply the finishing touches. What implement should I use?<br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream REPLY4">Use an engraving knife.</a><br>
<a action="bypass -h Quest Q00648_AnIceMerchantsDream REPLY5">Use a file.</a>
</body></html>

View File

@ -0,0 +1,377 @@
/*
* Copyright (C) 2004-2014 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00648_AnIceMerchantsDream;
import java.util.HashMap;
import java.util.Map;
import quests.Q00115_TheOtherSideOfTruth.Q00115_TheOtherSideOfTruth;
import com.l2jserver.gameserver.enums.QuestSound;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
/**
* An Ice Merchant's Dream (648)
* @author netvirus, Adry_85
*/
public final class Q00648_AnIceMerchantsDream extends Quest
{
private static class DropInfo
{
private final double _firstChance;
private final double _secondChance;
public DropInfo(double firstChance, double secondChance)
{
_firstChance = firstChance;
_secondChance = secondChance;
}
public double getFirstChance()
{
return _firstChance;
}
public double getSecondChance()
{
return _secondChance;
}
}
// NPCs
private static final int RAFFORTY = 32020;
private static final int ICE_SHELF = 32023;
// Items
private static final int SILVER_HEMOCYTE = 8057;
private static final int SILVER_ICE_CRYSTAL = 8077;
private static final int BLACK_ICE_CRYSTAL = 8078;
// Misc
private static final int MIN_LVL = 53;
// Monsters
private static final Map<Integer, DropInfo> MONSTERS = new HashMap<>();
static
{
MONSTERS.put(22080, new DropInfo(0.285, 0.048)); // Massive Maze Bandersnatch
MONSTERS.put(22081, new DropInfo(0.443, 0.0)); // Lost Watcher
MONSTERS.put(22082, new DropInfo(0.510, 0.0)); // Elder Lost Watcher
MONSTERS.put(22083, new DropInfo(0.477, 0.049)); // Baby Panthera
MONSTERS.put(22084, new DropInfo(0.477, 0.049)); // Panthera
MONSTERS.put(22085, new DropInfo(0.420, 0.043)); // Lost Gargoyle
MONSTERS.put(22086, new DropInfo(0.490, 0.050)); // Lost Gargoyle Youngling
MONSTERS.put(22087, new DropInfo(0.787, 0.081)); // Pronghorn Spirit
MONSTERS.put(22088, new DropInfo(0.480, 0.049)); // Pronghorn
MONSTERS.put(22089, new DropInfo(0.550, 0.056)); // Ice Tarantula
MONSTERS.put(22090, new DropInfo(0.570, 0.058)); // Frost Tarantula
MONSTERS.put(22091, new DropInfo(0.623, 0.0)); // Lost Iron Golem
MONSTERS.put(22092, new DropInfo(0.623, 0.0)); // Frost Iron Golem
MONSTERS.put(22093, new DropInfo(0.910, 0.093)); // Lost Buffalo
MONSTERS.put(22094, new DropInfo(0.553, 0.057)); // Frost Buffalo
MONSTERS.put(22095, new DropInfo(0.593, 0.061)); // Ursus Cub
MONSTERS.put(22096, new DropInfo(0.593, 0.061)); // Ursus
MONSTERS.put(22097, new DropInfo(0.693, 0.071)); // Lost Yeti
MONSTERS.put(22098, new DropInfo(0.717, 0.074)); // Frost Yeti
}
public Q00648_AnIceMerchantsDream()
{
super(648, Q00648_AnIceMerchantsDream.class.getSimpleName(), "An Ice Merchants Dream");
addStartNpc(RAFFORTY);
addTalkId(RAFFORTY, ICE_SHELF);
addKillId(MONSTERS.keySet());
registerQuestItems(SILVER_HEMOCYTE, SILVER_ICE_CRYSTAL, BLACK_ICE_CRYSTAL);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, false);
final QuestState q115 = player.getQuestState(Q00115_TheOtherSideOfTruth.class.getSimpleName());
if (st == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "ACCEPT":
{
st.startQuest();
if ((q115 != null) && (q115.isCompleted()))
{
htmltext = "32020-04.htm";
}
else
{
st.setCond(2);
htmltext = "32020-05.htm";
}
break;
}
case "ASK":
{
if (st.getCond() >= 1)
{
htmltext = ((q115 != null) && !q115.isCompleted()) ? "32020-14.html" : "32020-15.html";
}
break;
}
case "LATER":
{
if (st.getCond() >= 1)
{
htmltext = ((q115 != null) && !q115.isCompleted()) ? "32020-19.html" : "32020-20.html";
}
break;
}
case "REWARD":
{
if (st.getCond() >= 1)
{
final long silverCryCount = getQuestItemsCount(player, SILVER_ICE_CRYSTAL);
final long blackCryCount = getQuestItemsCount(player, BLACK_ICE_CRYSTAL);
if ((silverCryCount + blackCryCount) > 0)
{
giveAdena(player, (silverCryCount * 300) + (blackCryCount * 1200), true);
takeItems(player, -1, SILVER_ICE_CRYSTAL, BLACK_ICE_CRYSTAL);
htmltext = ((q115 != null) && !q115.isCompleted()) ? "32020-16.html" : "32020-17.html";
}
else
{
htmltext = "32020-18.html";
}
}
break;
}
case "QUIT":
{
if (st.getCond() >= 1)
{
if ((q115 != null) && !q115.isCompleted())
{
htmltext = "32020-21.html";
st.exitQuest(true, true);
}
else
{
htmltext = "32020-22.html";
}
}
break;
}
case "32020-06.html":
case "32020-07.html":
case "32020-08.html":
case "32020-09.html":
{
if (st.getCond() >= 1)
{
htmltext = event;
}
break;
}
case "32020-23.html":
{
if (st.getCond() >= 1)
{
st.exitQuest(true, true);
htmltext = event;
}
break;
}
case "32023-04.html":
{
if ((st.getCond() >= 1) && hasQuestItems(player, SILVER_ICE_CRYSTAL) && (st.getInt("ex") == 0))
{
st.set("ex", ((getRandom(4) + 1) * 10));
htmltext = event;
}
break;
}
case "32023-05.html":
{
if ((st.getCond() >= 1) && hasQuestItems(player, SILVER_ICE_CRYSTAL) && (st.getInt("ex") > 0))
{
takeItems(player, SILVER_ICE_CRYSTAL, 1);
int val = (st.getInt("ex") + 1);
st.set("ex", val);
playSound(player, QuestSound.ITEMSOUND_BROKEN_KEY);
htmltext = event;
}
break;
}
case "32023-06.html":
{
if ((st.getCond() >= 1) && hasQuestItems(player, SILVER_ICE_CRYSTAL) && (st.getInt("ex") > 0))
{
takeItems(player, SILVER_ICE_CRYSTAL, 1);
int val = (st.getInt("ex") + 2);
st.set("ex", val);
playSound(player, QuestSound.ITEMSOUND_BROKEN_KEY);
htmltext = event;
}
break;
}
case "REPLY4":
{
if ((st.getCond() >= 1) && (st.getInt("ex") > 0))
{
int ex = st.getInt("ex");
int val1 = ex / 10;
int val2 = ex - (val1 * 10);
if (val1 == val2)
{
htmltext = "32023-07.html";
giveItems(player, BLACK_ICE_CRYSTAL, 1);
playSound(player, QuestSound.ITEMSOUND_ENCHANT_SUCCESS);
}
else
{
htmltext = "32023-08.html";
playSound(player, QuestSound.ITEMSOUND_ENCHANT_FAILED);
}
st.set("ex", 0);
}
break;
}
case "REPLY5":
{
if ((st.getCond() >= 1) && (st.getInt("ex") > 0))
{
int ex = st.getInt("ex");
int val1 = ex / 10;
int val2 = ((ex - (val1 * 10)) + 2);
if (val1 == val2)
{
htmltext = "32023-07.html";
giveItems(player, BLACK_ICE_CRYSTAL, 1);
playSound(player, QuestSound.ITEMSOUND_ENCHANT_SUCCESS);
}
else
{
htmltext = "32023-08.html";
playSound(player, QuestSound.ITEMSOUND_ENCHANT_FAILED);
}
st.set("ex", 0);
}
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState st = getRandomPartyMemberState(killer, -1, 3, npc);
if (st != null)
{
final DropInfo info = MONSTERS.get(npc.getId());
if (st.getCond() >= 1)
{
giveItemRandomly(st.getPlayer(), npc, SILVER_ICE_CRYSTAL, 1, 0, info.getFirstChance(), true);
}
if (info.getSecondChance() > 0)
{
final QuestState st2 = st.getPlayer().getQuestState(Q00115_TheOtherSideOfTruth.class.getSimpleName());
if ((st.getCond() >= 2) && (st2 != null) && st2.isCompleted())
{
giveItemRandomly(st.getPlayer(), npc, SILVER_HEMOCYTE, 1, 0, info.getSecondChance(), true);
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, true);
final QuestState st2 = player.getQuestState(Q00115_TheOtherSideOfTruth.class.getSimpleName());
String htmltext = getNoQuestMsg(player);
switch (npc.getId())
{
case RAFFORTY:
{
if (st.isCreated())
{
if (player.getLevel() < MIN_LVL)
{
htmltext = "32020-01.htm";
}
else
{
htmltext = ((st2 != null) && (st2.isCompleted())) ? "32020-02.htm" : "32020-03.htm";
}
}
else if (st.isStarted())
{
final long hasQuestItems = getQuestItemsCount(player, SILVER_ICE_CRYSTAL, BLACK_ICE_CRYSTAL);
if ((st2 != null) && st2.isCompleted())
{
htmltext = (hasQuestItems > 0) ? "32020-13.html" : "32020-11.html";
if (st.isCond(1))
{
st.setCond(2, true);
}
}
else
{
htmltext = (hasQuestItems > 0) ? "32020-12.html" : "32020-10.html";
}
}
break;
}
case ICE_SHELF:
{
// TODO: In High Five this quest have an updated reward system.
if (st.isStarted())
{
if (hasQuestItems(player, SILVER_ICE_CRYSTAL))
{
final int val = st.getInt("ex") % 10;
if (val == 0)
{
htmltext = "32023-03.html";
st.set("ex", 0);
}
else
{
htmltext = "32023-09.html";
}
}
else
{
htmltext = "32023-02.html";
}
}
else
{
htmltext = "32023-01.html";
}
break;
}
}
return htmltext;
}
}