This commit is contained in:
6
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-01.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-01.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
Have you seen the Lienrik near Heine? Oh, they're so beautiful... I must have one!<br>
|
||||
Just imagine it. They fly, so they don't get dirty...and those marvelous colors! And their skin feels cool and moist, like a delicious mug of ale on a hot summer day.<br>
|
||||
Warm and furry pets are passé these days. A Lienrik is much more unique.<br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-02.htm">Keep listening.</a>
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-02.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
Its beauty is only the beginning! It's so light you can wrap it around your arm or let it sit on your shoulder! Its combat capability is quite extraordinary!<br>
|
||||
It can fly high in the sky and launch a remote attack! This makes it the best possible pet for the upper class! Alas, there is one flaw.<br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-03.htm">"What flaw?"</a>
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-03.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-03.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
Lienriks are quite headstrong and hard to tame.<br>The training must begin while it's still a baby. However, stealing one of its eggs is almost impossible. The mother of the species puts up a desperate fight, and even if you succeed in catching one, there's no guarantee that you can train it. It's not profitable at all for now. Not at all!<br>
|
||||
If I could get one of its eggs, at least I could try my best to train it. Wouldn't the ladies in town be impressed if I showed up with a tamed lienrik?<br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-04.htm">"I will get a Lienrik Egg for you."</a>
|
||||
</body></html>
|
||||
7
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-04.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-04.htm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
You'll really do it? I knew today was a good day. I'll tell you about the Lienrik.<br>
|
||||
The Lienrik dwells near the <font color="LEVEL">Rest Area of the Animals</font>. There's the Lienrik and the Lienrik Lad. One has a range attack and one spews poison up close.<br>
|
||||
Both have the <font color="LEVEL">Lienrik Egg</font>. That's where the fun begins: The egg determines gender, with the females being the most valuable.<br>
|
||||
I can't pay money for one, but I'll definitely offer a reward. Bring back as many as you can.<br>
|
||||
I might even let you keep one~
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-05.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-05.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
Have you ever seen an animal called a Lienrik? Oh, they're so beautiful... I must have one!<br>
|
||||
What, you don't know what I'm talking about? Hmpph!<br>
|
||||
(Only characters who are level 39 or higher may undertake this quest.)
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-06.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-06.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
Are you still here? Go to the <font color="LEVEL">Rest Area of the Animals</font> and bring back a <font color="LEVEL">Lienrik Egg</font> or a <font color="LEVEL">Lienrik Lad Egg</font>. I'll make it worth your while, I promise you that. Or are you just going to give up?<br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-07.html">Say that you will get the egg.</a><br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-08.html">Say you want to quit.</a>
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-07.html
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-07.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
Ready to do this? Today is a lucky day for both of us! Let me repeat what I told you earlier about Lienrik.<br>Both Lienrik and Lienrik Lads can be found in the <font color="LEVEL">Rest Area of the Animals</font>. Approach both carefully, as once can spew poison from a great distance.<br>
|
||||
Both kinds lay <font color="LEVEL">eggs</font>, but finding a female Lienrik is very rare.<br>
|
||||
Well, if you can do this for me, I'll make it worth your while -- I promise!<br>
|
||||
Even bringing back one would make my day!
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-08.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-08.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
Hmm... a quitter, eh? Go ahead... I can't stop you. I'll do my best with what I have now... But if you change your mind, please stop by. I can always use more eggs.
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-09.html
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-09.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
Oh my! These are Lienrik Eggs! I tried so hard to get one, and now you've done it so easily! It's wonderful to finally have them! Here is the reward I promised!<br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-07.html">"I'll bring you some more eggs."</a><br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-08.html">"I quit."</a><br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-10.html">"When do I get my lienrik?"</a>
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-10.html
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-10.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
Hmm, certainly not until I successfully raise it! This is no docile duck we're talking about here...<br>
|
||||
Let me work on it. Just keep bringing me more eggs. I suspect it will take many tries to get it right. <br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-07.html">"I will bring more eggs."</a><br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-08.html">"I quit."</a>
|
||||
</body></html>
|
||||
6
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-11.html
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/31067-11.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Pet Manager Rood:<br>
|
||||
Oh my! These are Lienrik Eggs! And what's this? Is this a female Lienrik Egg? Such a rarity... You are incredible! I will hatch this and mate her with a male. What a great job! Thank you so very much! Now I must concentrate on raising a lienrik. Here is your reward!<br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-07.html">"I will bring you more eggs."</a><br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-08.html">"I quit."</a><br>
|
||||
<a action="bypass -h Quest Q00352_HelpRoodRaiseANewPet 31067-10.html">"When do I get my lienrik?"</a>
|
||||
</body></html>
|
||||
186
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/Q00352_HelpRoodRaiseANewPet.java
vendored
Normal file
186
trunk/dist/game/data/scripts/quests/Q00352_HelpRoodRaiseANewPet/Q00352_HelpRoodRaiseANewPet.java
vendored
Normal file
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* 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.Q00352_HelpRoodRaiseANewPet;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Help Rood Raise A New Pet! (352)
|
||||
* @author Adry_85
|
||||
*/
|
||||
public final class Q00352_HelpRoodRaiseANewPet extends Quest
|
||||
{
|
||||
private static final class DropInfo
|
||||
{
|
||||
public final int _firstChance;
|
||||
public final int _secondChance;
|
||||
|
||||
public DropInfo(int firstChance, int secondChance)
|
||||
{
|
||||
_firstChance = firstChance;
|
||||
_secondChance = secondChance;
|
||||
}
|
||||
|
||||
public int getFirstChance()
|
||||
{
|
||||
return _firstChance;
|
||||
}
|
||||
|
||||
public int getSecondChance()
|
||||
{
|
||||
return _secondChance;
|
||||
}
|
||||
}
|
||||
|
||||
// NPC
|
||||
private static final int ROOD = 31067;
|
||||
// Items
|
||||
private static final int LIENRIK_EGG1 = 5860;
|
||||
private static final int LIENRIK_EGG2 = 5861;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 39;
|
||||
|
||||
private static final Map<Integer, DropInfo> MOBS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
MOBS.put(20786, new DropInfo(46, 48)); // lienrik
|
||||
MOBS.put(21644, new DropInfo(46, 48)); // lienrik_a
|
||||
MOBS.put(21645, new DropInfo(69, 71)); // lienrik_lad_a
|
||||
}
|
||||
|
||||
public Q00352_HelpRoodRaiseANewPet()
|
||||
{
|
||||
super(352, Q00352_HelpRoodRaiseANewPet.class.getSimpleName(), "Help Rood Raise A New Pet!");
|
||||
addStartNpc(ROOD);
|
||||
addTalkId(ROOD);
|
||||
addKillId(MOBS.keySet());
|
||||
registerQuestItems(LIENRIK_EGG1, LIENRIK_EGG2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
switch (event)
|
||||
{
|
||||
case "31067-02.htm":
|
||||
case "31067-03.htm":
|
||||
case "31067-07.html":
|
||||
case "31067-10.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "31067-04.htm":
|
||||
{
|
||||
qs.setMemoState(1);
|
||||
qs.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "31067-08.html":
|
||||
{
|
||||
qs.exitQuest(true, true);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
|
||||
{
|
||||
final QuestState qs = getQuestState(killer, false);
|
||||
|
||||
if ((qs == null) || !Util.checkIfInRange(1500, npc, killer, true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
final DropInfo info = MOBS.get(npc.getId());
|
||||
final int random = getRandom(100);
|
||||
|
||||
if (random < info.getFirstChance())
|
||||
{
|
||||
qs.giveItemRandomly(npc, LIENRIK_EGG1, 1, 0, 1.0, true);
|
||||
}
|
||||
else if (random < info.getSecondChance())
|
||||
{
|
||||
qs.giveItemRandomly(npc, LIENRIK_EGG2, 1, 0, 1.0, true);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if (qs.isCreated())
|
||||
{
|
||||
htmltext = (player.getLevel() >= MIN_LEVEL) ? "31067-01.htm" : "31067-05.html";
|
||||
}
|
||||
else if (qs.isStarted())
|
||||
{
|
||||
final long LienrikEgg1Count = getQuestItemsCount(player, LIENRIK_EGG1);
|
||||
final long LienrikEgg2Count = getQuestItemsCount(player, LIENRIK_EGG2);
|
||||
|
||||
if ((LienrikEgg1Count == 0) && (LienrikEgg2Count == 0))
|
||||
{
|
||||
htmltext = "31067-06.html";
|
||||
}
|
||||
else if ((LienrikEgg1Count >= 1) && (LienrikEgg2Count == 0))
|
||||
{
|
||||
if (LienrikEgg1Count >= 10)
|
||||
{
|
||||
giveAdena(player, (LienrikEgg1Count * 34) + 4000, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
giveAdena(player, (LienrikEgg1Count * 34) + 2000, true);
|
||||
}
|
||||
|
||||
takeItems(player, LIENRIK_EGG1, -1);
|
||||
htmltext = "31067-10.html";
|
||||
}
|
||||
else if (LienrikEgg1Count >= 1)
|
||||
{
|
||||
giveAdena(player, 4000 + ((LienrikEgg1Count * 34) + (LienrikEgg2Count * 1025)), true);
|
||||
takeItems(player, LIENRIK_EGG1, -1);
|
||||
takeItems(player, LIENRIK_EGG2, -1);
|
||||
htmltext = "31067-11.html";
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user