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>Elder Cronos:<br>
We've had this conversation about hatchlings before, haven't we, my young friend? As I said before, raising a hatchling requires resolve, which you haven't proven to me yet. But you wouldn't listen, oh no... So here we are... Have you learned anything? Since you are determined to keep it, you should prepare yourself to be the master of a strider. Hone your skills and come back to see me.<br>
(This quest can only be undertaken by a character of level 45 or higher.)
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Elder Cronos:<br>
We've had this conversation about hatchlings before, haven't we, my young friend? As I said before, raising a hatchling requires resolve, which you haven't proven to me yet. But would you listen, oh no... So here we are... Have you learned anything?<br>
Wait, what is this? Why are you carrying all those dragon flutes? A bit greedy, don't you think? You should get rid of all but one of those if you want to own a strider.<br>
(This quest can only be undertaken by a character with one dragon flute.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Elder Cronos:<br>
We've had this conversation about hatchlings before, haven't we, my young friend? As I said before, raising a hatchling requires resolve, which you haven't proven to me yet. But you wouldn't listen, oh no... So here we are... Have you learned anything? Since you are determined to keep it, you should prepare it to be a strider. That cute little fellow isn't ready yet, though!<br>
(Only a hatchling of level 55 or above can transform into a strider.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Elder Cronos:<br>
We've had this conversation before, haven't we? As I said, raising a hatchling requires resolve, which you haven't yet proven. Have you learned your lesson yet? Are you ready to have your hatchling transformed into a strider?<br>
<a action="bypass -h Quest Q00421_LittleWingsBigAdventure 30610-05.htm">"Do you know how to do this?"</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Elder Cronos:<br>
Whether I know how to do it or not is not your concern...<br>
You should talk to <font color="LEVEL">Fairy Mimyu</font> in the Enchanted Valley. Actually, she was the one I got your hatchling from! I have kept in touch with her since our last encounter. We have become friendly. I will send her a letter asking her to take good care of you and your hatchling... Do you understand what I'm saying to you?
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Elder Cronos:<br>
Whether I know how to do it or not is no concern of yours...<br>
The thing about hatchlings is... Wait! What is this? When did you switch the dragon flute? Oh, come on! How long can you go on acting like this?
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Elder Cronos:<br>
Questions, questions, questions! You should mind your own business and go and find <font color="LEVEL">Fairy Mimyu</font> in the Enchanted Valley. She will tell you what you need to do in order to transform your hatchling into a strider.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Fairy Mimyu:<br>
This is so annoying! Please, leave me alone! Oh, its you! You're the one who brought me the Fairy Stone... What have you brought me this time? Nothing?!<br>
What a selfish brute! Why would you visit me emptyhanded? Oh, I remember! Cronos said that you would be visiting me...<br>
<a action="bypass -h Quest Q00421_LittleWingsBigAdventure 30747-04.html">"I wish to change a hatchling to a strider."</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Fairy Mimyu:<br>
Oh, has the baby grown? Summon him, I wish to see him! Hurry!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Fairy Mimyu:<br>
This is not right! This is definitely not the hatchling Cronos mentioned! How dare you attempt to deceive me! I will take it from you now!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Fairy Mimyu:<br>
Oh my, hasn't the baby grown! You've done an admirable job raising him. His mother will be so proud! Yes, he'll make a fine strider!<br>
<a action="bypass -h Quest Q00421_LittleWingsBigAdventure 30747-05.html">"Will you change my hatchling into a strider?"</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Fairy Mimyu:<br>
Nothing would make me happier, unfortunately, the hatchling is responsible for his own transformation. He must find the <font color="LEVEL">four fairy trees</font> and gorge himself on their juice. This task is risky, for the trees are protected by the <font color="LEVEL">ghosts of tree guardians</font>. You must see that this Fairy Leaf is affixed to the tree when his thirst is sated.<br>
<a action="bypass -h Quest Q00421_LittleWingsBigAdventure 30747-07.html">"Please be more specific about what must be done for him to become a strider!"</a>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Fairy Mimyu:<br>
What is the meaning of this? If you persist with your lying I will change the hatchling back into an egg! First let me see the child, then we'll talk!
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Fairy Mimyu:<br>
What more can I tell you?<br>
<a action="bypass -h Quest Q00421_LittleWingsBigAdventure 30747-08.html">"Tell me about the four fairy trees."</a><br>
<a action="bypass -h Quest Q00421_LittleWingsBigAdventure 30747-09.html">"Tell me about the ghosts of tree guardians."</a><br>
<a action="bypass -h Quest Q00421_LittleWingsBigAdventure 30747-10.html">"Tell me about the Fairy Leaf."</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Fairy Mimyu:<br>
The four fairy trees are connected. Their roots traverse unimaginable depths to touch the Mother Tree Glade in the Elven Forest. The Essence of Wind, star, twilight and the abyss respectively flow within the trunks of these trees... These elements are essential for a hatchling to mature properly...Legend says that these trees were planted long ago by King Raul after he met the Lady of the Lake. He did this at the behest of the Lady of the Lake to stop the poisonous smog that was coming over from Dragon Valley. Now, in the northern section of the valley, <font color="LEVEL">those damn hunters have settled down....</font><br>
And there is one thing that you have to be absolutely careful about! While this sap is indispensible for a hatchling's growth, it is a deadly poison to your race. <font color="LEVEL">If you handle a fairy tree, you will likely get sick and die.</font><br>
<a action="bypass -h Quest Q00421_LittleWingsBigAdventure 30747-07.html">Back</a>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Fairy Mimyu:<br>
These are the spirits of elves who protected the Mother Tree Glade in ancient times. In death they have lost their former discretion and attack indiscriminately anyone who ventures near. You will find many souls in each tree. <font color="LEVEL">Your hatchling is certain to be attacked by these spirits when it is drinking the sap of the trees.</font><br>
You must use care when defending your hatchling, for if <font color="LEVEL"> a fairy tree is cut down, the spirits from within that tree will be set loose upon you and your party.</font> This would be disastrous.<br>
<a action="bypass -h Quest Q00421_LittleWingsBigAdventure 30747-07.html">Return</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Fairy Mimyu:<br>
When your hatchling has slaked his thirst, affix the <font color="LEVEL">Fairy Leaf</font> I gave you to the tree from which he drank. This will heal the tree and quieten the spirits within it. You only have enough leaves to use one per tree. Is that clear?<br>
<a action="bypass -h Quest Q00421_LittleWingsBigAdventure 30747-07.html">Return</a>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Fairy Mimyu:<br>
Why have you come back so soon? Your hatchling has not had enough sap! Surely you don't think that someone else will do your job for you? Go now and deal with your responsibilities!<br>
Remember, your hatchling must drink the sap of the <font color="LEVEL">four fairy trees in the forest south of the Town of Aden</font>. <font color="LEVEL">You mustn't touch the sap of the tree as it is a deadly poison to your race. Your hatchling must feed himself!</font> Beware the <font color="LEVEL">ghosts that guard the fairy trees</font>!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Fairy Mimyu:<br>
Go ahead and summon your hatchling! I trust that you completed your task successfully? If not, the forest must be in quite an uproar with those spirits careening about!
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Fairy Mimyu:<br>
Let's have a look... Ah, yes! Good job! Your task was quite challenging. You've made your godmother proud! You've filled yourself with the sap of the fairy trees.<br>
Well, my friend, it is time to play your dragon flute and send this child to the other world. Soon he will grow too large to safely stay here.<br>
Ah! When this child comes back from the other world, all his belongings will disappear. Therefore, move all his belongings to another place and then give me the flute.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Fairy Mimyu:<br>
Let's have a look. Oh my... Well, it is not your fault... Your master thinks himself too clever, and has been switching hatchlings on me.<br>
You are despicable! Although it is just a pet, you are obliged to treat it as a treasured gift! Yet you switch it around like it is no more than a piece of Coal! I find your type of person appalling! I never want to see you again! Leave me now!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Fairy Mimyu:<br>
What is the holdup? You must send this youngster to the other world and give me the flute! Is that clear?
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Fairy Mimyu:<br>
Give me the dragon flute. Your strider will no longer respond to it. You must now use this to call him.<br>
Although your pet looks very different now, if you just continue to give it the love and attention you did before, you will get along fine. Someday he will likely trust you enough to take you flying on his back. There's something to look forward to!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Fairy Mimyu:<br>
Why would anyone carry more than one dragon flute? You aren't collecting hatchlings, are you? I hope you got this hatchling through the proper channels! I do not deal with those who traffic in pets! Pets are not chattel!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Fairy Mimyu:<br>
You are getting on my last nerve! Did you think I wouldn't notice that you switched the dragon flutes? You are reprehensible! I am going to put a curse on you!
</body></html>

View File

@@ -0,0 +1,503 @@
/*
* 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.Q00421_LittleWingsBigAdventure;
import java.util.HashMap;
import java.util.Map;
import com.l2jserver.gameserver.ai.CtrlIntention;
import com.l2jserver.gameserver.enums.QuestSound;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.L2Summon;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;
import com.l2jserver.gameserver.model.quest.State;
import com.l2jserver.gameserver.network.NpcStringId;
import com.l2jserver.gameserver.network.clientpackets.Say2;
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
import com.l2jserver.gameserver.util.Util;
/**
* Little Wing's Big Adventure (421)
* @author Pandragon, jurchiks
*/
public final class Q00421_LittleWingsBigAdventure extends Quest
{
// NPCs
private static final int CRONOS = 30610;
private static final int MIMYU = 30747;
// Items
private static final int DRAGONFLUTE_OF_WIND = 3500;
private static final int DRAGONFLUTE_OF_STAR = 3501;
private static final int DRAGONFLUTE_OF_TWILIGHT = 3502;
private static final int FAIRY_LEAF = 4325;
// Monsters
private static final int TREE_OF_WIND = 27185;
private static final int TREE_OF_STAR = 27186;
private static final int TREE_OF_TWILIGHT = 27187;
private static final int TREE_OF_ABYSS = 27188;
private static final int SOUL_OF_TREE_GUARDIAN = 27189;
// Skills
private static final SkillHolder CURSE_OF_MIMYU = new SkillHolder(4167, 1);
private static final SkillHolder DRYAD_ROOT = new SkillHolder(1201, 33);
private static final SkillHolder VICIOUS_POISON = new SkillHolder(4243, 1);
// Rewards
private static final int DRAGON_BUGLE_OF_WIND = 4422;
private static final int DRAGON_BUGLE_OF_STAR = 4423;
private static final int DRAGON_BUGLE_OF_TWILIGHT = 4424;
// Misc
private static final int MIN_PLAYER_LVL = 45;
private static final int MIN_HACHLING_LVL = 55;
private static final Map<Integer, NpcData> NPC_DATA = new HashMap<>();
static
{
NPC_DATA.put(TREE_OF_WIND, new NpcData(NpcStringId.HEY_YOU_VE_ALREADY_DRUNK_THE_ESSENCE_OF_WIND, 2, 1, 270));
NPC_DATA.put(TREE_OF_STAR, new NpcData(NpcStringId.HEY_YOU_VE_ALREADY_DRUNK_THE_ESSENCE_OF_A_STAR, 4, 2, 400));
NPC_DATA.put(TREE_OF_TWILIGHT, new NpcData(NpcStringId.HEY_YOU_VE_ALREADY_DRUNK_THE_ESSENCE_OF_DUSK, 8, 4, 150));
NPC_DATA.put(TREE_OF_ABYSS, new NpcData(NpcStringId.HEY_YOU_VE_ALREADY_DRUNK_THE_ESSENCE_OF_THE_ABYSS, 16, 8, 270));
}
public Q00421_LittleWingsBigAdventure()
{
super(421, Q00421_LittleWingsBigAdventure.class.getSimpleName(), "Little Wing's Big Adventure");
addStartNpc(CRONOS);
addTalkId(CRONOS, MIMYU);
addAttackId(NPC_DATA.keySet());
addKillId(NPC_DATA.keySet());
registerQuestItems(FAIRY_LEAF);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
String htmltext = null;
if (qs == null)
{
return htmltext;
}
switch (event)
{
case "30610-05.htm":
{
if (qs.isCreated())
{
if (getQuestItemsCount(player, DRAGONFLUTE_OF_WIND, DRAGONFLUTE_OF_STAR, DRAGONFLUTE_OF_TWILIGHT) == 1)
{
final L2ItemInstance flute = getFlute(player);
if (flute.getEnchantLevel() < MIN_HACHLING_LVL)
{
htmltext = "30610-06.html";
}
else
{
qs.startQuest();
qs.setMemoState(100);
qs.set("fluteObjectId", flute.getObjectId());
htmltext = event;
}
}
else
{
htmltext = "30610-06.html";
}
}
break;
}
case "30747-04.html":
{
final L2Summon summon = player.getSummon();
if (summon == null)
{
htmltext = "30747-02.html";
}
else if (summon.getControlObjectId() != qs.getInt("fluteObjectId"))
{
htmltext = "30747-03.html";
}
else
{
htmltext = event;
}
break;
}
case "30747-05.html":
{
final L2Summon summon = player.getSummon();
if (summon == null)
{
htmltext = "30747-06.html";
}
else if (summon.getControlObjectId() != qs.getInt("fluteObjectId"))
{
htmltext = "30747-06.html";
}
else
{
giveItems(player, FAIRY_LEAF, 4);
qs.setCond(2, true);
qs.setMemoState(0);
htmltext = event;
}
break;
}
case "30747-07.html":
case "30747-08.html":
case "30747-09.html":
case "30747-10.html":
{
htmltext = event;
break;
}
case "DESPAWN_GUARDIAN":
{
if (npc != null)
{
npc.deleteMe();
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
final QuestState qs = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
switch (npc.getId())
{
case CRONOS:
{
switch (qs.getState())
{
case State.CREATED:
{
final long fluteCount = getQuestItemsCount(talker, DRAGONFLUTE_OF_WIND, DRAGONFLUTE_OF_STAR, DRAGONFLUTE_OF_TWILIGHT);
if (fluteCount == 0)
{
break; // this quest does not show up if no flute in inventory
}
if (talker.getLevel() < MIN_PLAYER_LVL)
{
htmltext = "30610-01.htm";
}
else if (fluteCount > 1)
{
htmltext = "30610-02.htm";
}
else if (getFlute(talker).getEnchantLevel() < MIN_HACHLING_LVL)
{
htmltext = "30610-03.html";
}
else
{
htmltext = "30610-04.htm";
}
break;
}
case State.STARTED:
{
htmltext = "30610-07.html";
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(talker);
break;
}
}
break;
}
case MIMYU:
{
switch (qs.getMemoState())
{
case 100:
{
qs.setMemoState(200);
htmltext = "30747-01.html";
break;
}
case 200:
{
final L2Summon summon = talker.getSummon();
if (summon == null)
{
htmltext = "30747-02.html";
}
else if (summon.getControlObjectId() != qs.getInt("fluteObjectId"))
{
htmltext = "30747-03.html";
}
else
{
htmltext = "30747-04.html";
}
break;
}
case 0:
{
htmltext = "30747-07.html";
break;
}
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
{
if (hasQuestItems(talker, FAIRY_LEAF))
{
htmltext = "30747-11.html";
}
break;
}
case 15:
{
if (!hasQuestItems(talker, FAIRY_LEAF))
{
final L2Summon summon = talker.getSummon();
if (summon == null)
{
htmltext = "30747-12.html";
}
else if (summon.getControlObjectId() == qs.getInt("fluteObjectId"))
{
qs.setMemoState(16);
htmltext = "30747-13.html";
}
else
{
htmltext = "30747-14.html";
}
}
break;
}
case 16:
{
if (!hasQuestItems(talker, FAIRY_LEAF))
{
if (talker.hasSummon())
{
htmltext = "30747-15.html";
}
else
{
final long fluteCount = getQuestItemsCount(talker, DRAGONFLUTE_OF_WIND, DRAGONFLUTE_OF_STAR, DRAGONFLUTE_OF_TWILIGHT);
if (fluteCount > 1)
{
htmltext = "30747-17.html";
}
else if (fluteCount == 1)
{
final L2ItemInstance flute = getFlute(talker);
if (flute.getObjectId() == qs.getInt("fluteObjectId"))
{
// TODO what if the hatchling has items in his inventory?
// Should they be transfered to the strider or given to the player?
switch (flute.getId())
{
case DRAGONFLUTE_OF_WIND:
takeItems(talker, DRAGONFLUTE_OF_WIND, -1);
giveItems(talker, DRAGON_BUGLE_OF_WIND, 1);
break;
case DRAGONFLUTE_OF_STAR:
takeItems(talker, DRAGONFLUTE_OF_STAR, -1);
giveItems(talker, DRAGON_BUGLE_OF_STAR, 1);
break;
case DRAGONFLUTE_OF_TWILIGHT:
takeItems(talker, DRAGONFLUTE_OF_TWILIGHT, -1);
giveItems(talker, DRAGON_BUGLE_OF_TWILIGHT, 1);
break;
}
qs.exitQuest(true, true);
htmltext = "30747-16.html";
}
else
{
npc.setTarget(talker);
npc.doCast(CURSE_OF_MIMYU.getSkill());
htmltext = "30747-18.html";
}
}
}
}
break;
}
}
break;
}
}
return htmltext;
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
{
final QuestState qs = getQuestState(attacker, false);
if ((qs != null) && qs.isCond(2))
{
if (isSummon)
{
final NpcData data = NPC_DATA.get(npc.getId());
if ((qs.getMemoState() % data.memoStateMod) < data.memoStateValue)
{
if (attacker.getSummon().getControlObjectId() == qs.getInt("fluteObjectId"))
{
final int hits = qs.getInt("hits") + 1;
qs.set("hits", hits);
if (hits < data.minHits)
{
if ((npc.getId() == TREE_OF_ABYSS) && (getRandom(100) < 2))
{
npc.setTarget(attacker);
npc.doCast(DRYAD_ROOT.getSkill());
}
}
else if (getRandom(100) < 2)
{
if (hasQuestItems(attacker, FAIRY_LEAF))
{
npc.broadcastPacket(new NpcSay(npc, Say2.NPC_ALL, NpcStringId.GIVE_ME_A_FAIRY_LEAF));
takeItems(attacker, FAIRY_LEAF, 1);
qs.setMemoState(qs.getMemoState() + data.memoStateValue);
qs.unset("hits");
playSound(attacker, QuestSound.ITEMSOUND_QUEST_MIDDLE);
if (qs.getMemoState() == 15)
{
qs.setCond(3);
}
}
}
}
}
else
{
switch (getRandom(3))
{
case 0:
npc.broadcastPacket(new NpcSay(npc, Say2.NPC_ALL, NpcStringId.WHY_DO_YOU_BOTHER_ME_AGAIN));
break;
case 1:
npc.broadcastPacket(new NpcSay(npc, Say2.NPC_ALL, data.message));
break;
case 2:
npc.broadcastPacket(new NpcSay(npc, Say2.NPC_ALL, NpcStringId.LEAVE_NOW_BEFORE_YOU_INCUR_THE_WRATH_OF_THE_GUARDIAN_GHOST));
break;
}
}
}
else if (getRandom(100) < 30)
{
npc.setTarget(attacker);
npc.doCast(VICIOUS_POISON.getSkill());
}
}
else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.67)) && (getRandom(100) < 30))
{
npc.setTarget(attacker);
npc.doCast(VICIOUS_POISON.getSkill());
}
return super.onAttack(npc, attacker, damage, isSummon);
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
if (Util.checkIfInRange(1500, killer, npc, true))
{
for (int i = 0; i < 20; i++)
{
L2Npc guardian = addSpawn(SOUL_OF_TREE_GUARDIAN, npc);
startQuestTimer("DESPAWN_GUARDIAN", 300000, guardian, null);
if (i == 0)
{
npc.setTarget(killer);
npc.doCast(VICIOUS_POISON.getSkill());
}
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, killer);
}
}
return super.onKill(npc, killer, isSummon);
}
private static L2ItemInstance getFlute(L2PcInstance player)
{
final int fluteItemId;
if (hasQuestItems(player, DRAGONFLUTE_OF_WIND))
{
fluteItemId = DRAGONFLUTE_OF_WIND;
}
else if (hasQuestItems(player, DRAGONFLUTE_OF_STAR))
{
fluteItemId = DRAGONFLUTE_OF_STAR;
}
else
{
fluteItemId = DRAGONFLUTE_OF_TWILIGHT;
}
return player.getInventory().getItemByItemId(fluteItemId);
}
private static final class NpcData
{
public final NpcStringId message;
public final int memoStateMod;
public final int memoStateValue;
public final int minHits;
public NpcData(NpcStringId message, int memoStateMod, int memoStateValue, int minHits)
{
this.message = message;
this.memoStateMod = memoStateMod;
this.memoStateValue = memoStateValue;
this.minHits = minHits;
}
}
}