This commit is contained in:
6
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-01.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-01.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Soldier Orbyu:<br>
|
||||
I manage this wharf and oversee the many tasks necessary to keep these airships coming and going. My job allows me the chance to look at the sky often. Sometimes, I feel like I spend all day looking up.<br>
|
||||
Can't say I dislike it. In fact, I used to daydream about flying as a child.<br>
|
||||
Sigh...that was such a long time ago. Who would have thought that things would change so much?<br>
|
||||
<a action="bypass -h Quest Q00700_CursedLife 32560-02.htm">"Tell me more."</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-02.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-02.htm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Soldier Orbyu:<br>
|
||||
I first fell in love with flying because of <font color="LEVEL">Rok</font>.<br>
|
||||
Watching it spread its massive wings and soar through the sky stirred something deep in me. My people called Rok the <font color="LEVEL">King of Birds</font> because of its power and dignity.<br>
|
||||
But even Rok couldn't avoid the corruption that befell Gracia. This noble creature became a vile undead.<br>
|
||||
And there's more...<br>
|
||||
<a action="bypass -h Quest Q00700_CursedLife 32560-04.htm">"What else?"</a>
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-03.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-03.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Soldier Orbyu:<br>
|
||||
No, I shouldn't have said all this to worry you, adventurer. You can listen to my complaints but look too inexperienced to resolve my problem. If you have more experience and become more capable, will you come and see me some time?<br>
|
||||
(Only characters level 75 and above and who cleared the quest on a good day for flying are permitted to take on this quest.)
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-04.htm
vendored
Normal file
8
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-04.htm
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>Soldier Orbyu:<br>
|
||||
The bigger problem is <font color="LEVEL">Rok</font>, who became undead because of the evil power of the Seed of Infinity. The Rok and its followers, <font color="LEVEL">Mutant Birds and Dra Hawks</font> are viciously attacking everyone in their sight.<br>
|
||||
They have attacked and eaten people before, but not like this.<br>
|
||||
The army has been ordered to destroy them. I'm in charge of recruiting the adventurers we need for the task.<br>
|
||||
I guess it's better this way. Only by destroying their accursed lives can we truly liberate these once-noble creatures.<br>
|
||||
Will you help us?<br>
|
||||
<a action="bypass -h Quest Q00700_CursedLife 32560-05.htm">Say yes.</a>
|
||||
</body></html>
|
7
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-05.htm
vendored
Normal file
7
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-05.htm
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<html><body>Soldier Orbyu:<br>
|
||||
Really? Thank you.<br>
|
||||
If you hunt <font color="LEVEL">Rok</font> and open its stomach, you will find undigested remains. The same is true of the <font color="LEVEL">Mutant Birds and Dra Hawks</font>, although you'll find fewer remains in them.<br>
|
||||
Bring me <font color="LEVEL">Swallowed Skulls</font> as evidence, as well as <font color="LEVEL">Swallowed Sternums</font> and <font color="LEVEL">Swallowed Bones</font>. We will reward you for your efforts -- especially for the skulls you bring back.<br>
|
||||
One more thing: Rok fears the Dark Black Dragon's followers. That's why it emerges only when the Seed of Infinity is <font color="LEVEL">stabilized</font>. That means <font color="LEVEL">Rok can only be hunted when the Seed is occupied</font>. Remember that!<br>
|
||||
Good luck and good hunting.
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-06.html
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-06.html
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Soldier Orbyu:<br>
|
||||
Hurry! They appear in the skies above the <font color="LEVEL">Seed of Infinity</font>.<br>
|
||||
Hunt <font color="LEVEL">Rok, Mutant Birds and Dra Hawks</font> and bring back <font color="LEVEL">Swallowed Skulls, Swallowed Sternums and Swallowed Bones</font> as proof.<br>
|
||||
Remember that Rok will only emerge when the Seed of Immortiality is stabilized.<br>
|
||||
I'm counting on you!
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-07.html
vendored
Normal file
8
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-07.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>Soldier Orbyu:<br>
|
||||
How was your hunting? Let me see the remains I asked you to bring back.<br>
|
||||
Hmm... I'd hoped for more. Perhaps you haven't yet found the <font color="LEVEL">Rok</font>.<br>
|
||||
But since you brought the remains from some of the lesser birds, I will give you the reward I promised.<br>
|
||||
You're going back out, aren't you?<br>
|
||||
<a action="bypass -h Quest Q00700_CursedLife 32560-09.html">"I'll do better next time."</a><br>
|
||||
<a action="bypass -h Quest Q00700_CursedLife 32560-10.html">"I want to quit."</a>
|
||||
</body></html>
|
8
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-08.html
vendored
Normal file
8
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-08.html
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<html><body>Soldier Orbyu:<br>
|
||||
Have you finished your hunting? Then show me the remains I asked you to bring back.<br>
|
||||
Let's see...<br>
|
||||
Oh...you brought back a lot! From this, I can tell that you caught <font color="LEVEL">Rok</font> and split its stomach open. Either that or you must have hunted a great many <font color="LEVEL">Mutant Birds</font>and <font color="LEVEL">Dra Hawks</font>!<br>
|
||||
Here is the reward I promised. Let me ask you, though -- are you interested in hunting more of the creatures?<br>
|
||||
<a action="bypass -h Quest Q00700_CursedLife 32560-09.html">Say yes.</a><br>
|
||||
<a action="bypass -h Quest Q00700_CursedLife 32560-10.html">Say you've had enough.</a>
|
||||
</body></html>
|
5
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-09.html
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-09.html
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<html><body>Soldier Orbyu:<br>
|
||||
Leave now! Remember that Rok appears only when the <font color="LEVEL">Seed of Immortaility is stabilized</font>.<br>
|
||||
Hunt <font color="LEVEL">Rok, Mutant Birds and Dra Hawks</font> and bring back <font color="LEVEL">Swallowed Skulls, Swallowed Sternums and Swallowed Bones</font> recovered from their stomachs.<br>
|
||||
Good hunting!
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-10.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/32560-10.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Soldier Orbyu:<br>
|
||||
I see. Well, I understand. It's regrettable, but I guess I'll have to look for someone else. Farewell.
|
||||
</body></html>
|
270
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/Q00700_CursedLife.java
vendored
Normal file
270
trunk/dist/game/data/scripts/quests/Q00700_CursedLife/Q00700_CursedLife.java
vendored
Normal file
@@ -0,0 +1,270 @@
|
||||
/*
|
||||
* 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.Q00700_CursedLife;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import quests.Q10273_GoodDayToFly.Q10273_GoodDayToFly;
|
||||
|
||||
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;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Cursed Life (700)
|
||||
* @author xban1x
|
||||
*/
|
||||
public class Q00700_CursedLife extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int ORBYU = 32560;
|
||||
// Monsters
|
||||
private static final int ROK = 25624;
|
||||
private static final Map<Integer, Integer[]> MONSTERS = new HashMap<>();
|
||||
//@formatter:off
|
||||
static
|
||||
{
|
||||
MONSTERS.put(22602, new Integer[] { 15, 139, 965}); // Mutant Bird lvl 1
|
||||
MONSTERS.put(22603, new Integer[] { 15, 143, 999}); // Mutant Bird lvl 2
|
||||
MONSTERS.put(25627, new Integer[] { 14, 125, 993}); // Mutant Bird lvl 3
|
||||
MONSTERS.put(22604, new Integer[] { 5, 94, 994}); // Dra Hawk lvl 1
|
||||
MONSTERS.put(22605, new Integer[] { 5, 99, 993}); // Dra Hawk lvl 2
|
||||
MONSTERS.put(25628, new Integer[] { 3, 73, 991}); // Dra Hawk lvl 3
|
||||
}
|
||||
//@formatter:on
|
||||
// Items
|
||||
private static final int SWALLOWED_BONES = 13874;
|
||||
private static final int SWALLOWED_STERNUM = 13873;
|
||||
private static final int SWALLOWED_SKULL = 13872;
|
||||
// Misc
|
||||
private static final int MIN_LVL = 75;
|
||||
private static final int SWALLOWED_BONES_ADENA = 500;
|
||||
private static final int SWALLOWED_STERNUM_ADENA = 5000;
|
||||
private static final int SWALLOWED_SKULL_ADENA = 50000;
|
||||
private static final int BONUS = 16670;
|
||||
|
||||
public Q00700_CursedLife()
|
||||
{
|
||||
super(700, Q00700_CursedLife.class.getSimpleName(), "Cursed Life");
|
||||
addStartNpc(ORBYU);
|
||||
addTalkId(ORBYU);
|
||||
addKillId(ROK);
|
||||
addKillId(MONSTERS.keySet());
|
||||
registerQuestItems(SWALLOWED_BONES, SWALLOWED_STERNUM, SWALLOWED_SKULL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
QuestState st = getQuestState(player, false);
|
||||
String htmltext = null;
|
||||
if (st != null)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case "32560-02.htm":
|
||||
{
|
||||
st = player.getQuestState(Q10273_GoodDayToFly.class.getSimpleName());
|
||||
htmltext = ((player.getLevel() < MIN_LVL) || (st == null) || (!st.isCompleted())) ? "32560-03.htm" : event;
|
||||
break;
|
||||
}
|
||||
case "32560-04.htm":
|
||||
case "32560-09.html":
|
||||
{
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32560-05.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
case "32560-10.html":
|
||||
{
|
||||
st.exitQuest(true, true);
|
||||
htmltext = event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
if (st != null)
|
||||
{
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = "32560-01.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
long bones = st.getQuestItemsCount(SWALLOWED_BONES);
|
||||
long ribs = st.getQuestItemsCount(SWALLOWED_STERNUM);
|
||||
long skulls = st.getQuestItemsCount(SWALLOWED_SKULL);
|
||||
long sum = bones + ribs + skulls;
|
||||
if (sum > 0)
|
||||
{
|
||||
st.giveAdena(((bones * SWALLOWED_BONES_ADENA) + (ribs * SWALLOWED_STERNUM_ADENA) + (skulls * SWALLOWED_SKULL_ADENA) + (sum >= 10 ? BONUS : 0)), true);
|
||||
takeItems(player, -1, SWALLOWED_BONES, SWALLOWED_STERNUM, SWALLOWED_SKULL);
|
||||
htmltext = sum < 10 ? "32560-07.html" : "32560-08.html";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "32560-06.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st != null)
|
||||
{
|
||||
if (npc.getId() == ROK)
|
||||
{
|
||||
int amount = 0, chance = getRandom(1000);
|
||||
if (chance < 700)
|
||||
{
|
||||
amount = 1;
|
||||
}
|
||||
else if (chance < 885)
|
||||
{
|
||||
amount = 2;
|
||||
}
|
||||
else if (chance < 949)
|
||||
{
|
||||
amount = 3;
|
||||
}
|
||||
else if (chance < 966)
|
||||
{
|
||||
amount = getRandom(5) + 4;
|
||||
}
|
||||
else if (chance < 985)
|
||||
{
|
||||
amount = getRandom(9) + 4;
|
||||
}
|
||||
else if (chance < 993)
|
||||
{
|
||||
amount = getRandom(7) + 13;
|
||||
}
|
||||
else if (chance < 997)
|
||||
{
|
||||
amount = getRandom(15) + 9;
|
||||
}
|
||||
else if (chance < 999)
|
||||
{
|
||||
amount = getRandom(23) + 53;
|
||||
}
|
||||
else
|
||||
{
|
||||
amount = getRandom(49) + 76;
|
||||
}
|
||||
st.giveItems(SWALLOWED_BONES, amount);
|
||||
chance = getRandom(1000);
|
||||
if (chance < 520)
|
||||
{
|
||||
amount = 1;
|
||||
}
|
||||
else if (chance < 771)
|
||||
{
|
||||
amount = 2;
|
||||
}
|
||||
else if (chance < 836)
|
||||
{
|
||||
amount = 3;
|
||||
}
|
||||
else if (chance < 985)
|
||||
{
|
||||
amount = getRandom(2) + 4;
|
||||
}
|
||||
else if (chance < 995)
|
||||
{
|
||||
amount = getRandom(4) + 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
amount = getRandom(8) + 6;
|
||||
}
|
||||
st.giveItems(SWALLOWED_STERNUM, amount);
|
||||
chance = getRandom(1000);
|
||||
if (chance < 185)
|
||||
{
|
||||
amount = getRandom(2) + 1;
|
||||
}
|
||||
else if (chance < 370)
|
||||
{
|
||||
amount = getRandom(6) + 2;
|
||||
}
|
||||
else if (chance < 570)
|
||||
{
|
||||
amount = getRandom(6) + 7;
|
||||
}
|
||||
else if (chance < 850)
|
||||
{
|
||||
amount = getRandom(6) + 12;
|
||||
}
|
||||
else
|
||||
{
|
||||
amount = getRandom(6) + 17;
|
||||
}
|
||||
st.giveItems(SWALLOWED_SKULL, amount);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
else
|
||||
{
|
||||
Integer[] chances = MONSTERS.get(npc.getId());
|
||||
int chance = getRandom(1000);
|
||||
if (chance < chances[0])
|
||||
{
|
||||
st.giveItems(SWALLOWED_BONES, 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
else if (chance < chances[1])
|
||||
{
|
||||
st.giveItems(SWALLOWED_STERNUM, 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
else if (chance < chances[2])
|
||||
{
|
||||
st.giveItems(SWALLOWED_SKULL, 1);
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user