Merged with released L2J-Unity files.

This commit is contained in:
mobiusdev
2016-06-12 01:34:09 +00:00
parent e003e87887
commit 635557f5da
18352 changed files with 3245113 additions and 2892959 deletions

View File

@@ -0,0 +1,4 @@
<html><body>Mysterious Wizard:<br>
You there! Come closer, let me get a look at you. Hmm, you seem trustworthy enough, but let's find out. Recently, an <font color="LEVEL">unidentified group of people</font> came barging into this area of the forest. I don't care who they are or what they are after, but they've interrupted my research, and I can't have that.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00762_AnOminousRequest 31522-02.htm">"What do you want me to do about it?"</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Mysterious Wizard:<br>
I'm glad you asked.<br>
Kill the Undead in the <font color="LEVEL">Forest of the Dead</font> and bring me some <font color="LEVEL">Monster Bones</font>.<br>
And one more thing...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00762_AnOminousRequest 31522-03.htm">"Go on... "</Button>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Mysterious Wizard:<br>
I need <font color="LEVEL">Monster Blood</font> as well. With a bit more effort, you should be able to extract it from the same <font color="LEVEL">Undead</font>.<br>
Once you've killed a few, and <font color="LEVEL">collected all the Monster Bones</font> I need, you'll know how to get the blood. Bring enough, and I will give you an additional reward.<br>
Understand?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00762_AnOminousRequest 31522-04.htm">"Mostly. Kill, collect, collect more."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mysterious Wizard:<br>
You make it sound so base. This is top level research! Kill every <font color="LEVEL">Undead</font> you see in the <font color="LEVEL">Forest of the Dead</font>.<br>
If you bring <font color="LEVEL">50</font> <font color="LEVEL">Monster Bones</font>, I will give you a reward. For <font color="LEVEL">Monster Blood</font>, my generosity will scale based on the amount you bring me.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Mysterious Wizard:<br>
Kill every <font color="LEVEL">Undead</font> you see in the <font color="LEVEL">Forest of the Dead</font> and bring me <font color="LEVEL">50</font> <font color="LEVEL">Monster Bones</font>. As for <font color="LEVEL">Monster Blood</font>, I've reserved an additional reward based on your effort.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Mysterious Wizard:<br>
You've brought enough Monster Bones for my studies, but not enough Monster Blood for even a token reward.<br>
What do you want? A basic payoff, or will you try a little harder to please me?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00762_AnOminousRequest 31522-08.html">"I'm pooped, thanks."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00762_AnOminousRequest 31522-07.html">"Wait a sec. I'll be back with some more."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Mysterious Wizard:<br>
Please try harder. You've clearly mastered the art of extracting <font color="LEVEL">Monster Blood</font>, and I will give you additional rewards according to the amount you bring.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Mysterious Wizard:<br>
Here you are then. A basic reward, for your minimum effort. I hope it will be useful for you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00762_AnOminousRequest 31522-09.html">"I want a reward now"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00762_AnOminousRequest 31522-07.html">"I'd like to collect some more."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Mysterious Wizard:<br>
When I need your help again, I will let you know.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mysterious Wizard:<br>
On second thought, I don't think you can help me with this.<br>
(Ertheia is excluded from this quest.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mysterious Wizard:<br>
On second thought, I don't think you can help me with this.<br>
(This quest is for Sorcerers level 65 or above.)
</body></html>

View File

@@ -0,0 +1,235 @@
/*
* 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 quests.Q00762_AnOminousRequest;
import com.l2jmobius.gameserver.enums.CategoryType;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
/**
* An Ominous Request (762)
* @author St3eT
*/
public final class Q00762_AnOminousRequest extends Quest
{
// NPCs
private static final int MYSTERIOUS_WIZARD = 31522;
private static final int[] MONSTERS =
{
21547, // Corrupted Knight
21551, // Resurrected Royal Guard
21553, // Trampled Man
21557, // Bone Snatcher
21559, // Bone Maker
21561, // Sacrificed Man
21563, // Bone Collector
21565, // Bone Animator
21567, // Bone Slayer
21570, // Ghost of Betrayer
21572, // Bone Sweeper
21574, // Bone Grinder
21578, // Behemoth Zombie
21580, // Bone Caster
21581, // Bone Puppeteer
21583, // Bone Scavenger
21587, // Vampire Warrior
21590, // Vampire Magister
21593, // Vampire Warlord
21596, // Requiem Lord
21599, // Requiem Priest
21549, // Corrupted Royal Guard
21555, // Slaughter Executioner
21560, // Bone Shaper
21562, // Guillotine's Ghost
21564, // Skull Collector
21566, // Skull Animator
21568, // Devil Bat
21571, // Ghost of Rebel Soldier
21573, // Atrox
21576, // Ghost of Guillotine
21579, // Ghost of Rebel Leader
21582, // Vampire Soldier
21585, // Vampire Magician
21586, // Vampire Adept
21588, // Vampire Wizard
21591, // Vampire Magister
21595, // Vampire Warlord
21599, // Requiem Priest
};
// Items
private static final int BONE = 36670; // Monster Bone
private static final int BLOOD = 36671; // Monster Blood
private static final int STEEL_DOOR_BOX = 37391; // Steel Door Guild Reward Box (Low-grade)
// Rewards
//@formatter:off
// Format: min item count, exp reward, sp reward, item count reward
private static final int[][] REWARD =
{
{900, 141_403_500, 33_930, 10},
{800, 127_263_150, 30_537, 9},
{700, 113_122_800, 27_144, 8},
{600, 98_982_450, 23_751, 7},
{500, 84_842_100, 20_358, 6},
{400, 70_701_750, 16_965, 5},
{300, 56_546_400, 13_572, 4},
{200, 42_421_050, 10_179, 3},
{100, 28_280_700, 6789, 2},
{0, 14_140_350, 3393, 1},
};
//@formatter:on
// Misc
private static final int MIN_LEVEL = 65;
private static final int MAX_LEVEL = 70;
public Q00762_AnOminousRequest()
{
super(762);
addStartNpc(MYSTERIOUS_WIZARD);
addTalkId(MYSTERIOUS_WIZARD);
addKillId(MONSTERS);
registerQuestItems(BONE, BLOOD);
addCondNotRace(Race.ERTHEIA, "31522-10.html");
addCondLevel(MIN_LEVEL, MAX_LEVEL, "31522-11.htm");
addCondInCategory(CategoryType.MAGE_GROUP, "31522-11.htm");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, false);
if (st == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "31522-02.htm":
case "31522-03.htm":
case "31522-07.html":
case "31522-08.html":
{
htmltext = event;
break;
}
case "31522-04.htm":
{
st.startQuest();
htmltext = event;
break;
}
case "31522-09.html":
{
if (st.isCond(2))
{
final long itemCount = getQuestItemsCount(player, BLOOD);
for (int[] data : REWARD)
{
if (itemCount >= data[0])
{
if (player.getLevel() >= MIN_LEVEL)
{
addExpAndSp(player, data[1], data[2]);
}
giveItems(player, STEEL_DOOR_BOX, data[3]);
st.exitQuest(QuestType.DAILY, true);
htmltext = event;
break;
}
}
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated)
{
final QuestState st = getQuestState(player, true);
String htmltext = null;
switch (st.getState())
{
case State.CREATED:
{
htmltext = "31522-01.htm";
break;
}
case State.STARTED:
{
htmltext = st.isCond(1) ? "31522-05.html" : "31522-06.html";
break;
}
case State.COMPLETED:
{
if (!st.isNowAvailable())
{
htmltext = getAlreadyCompletedMsg(player, QuestType.DAILY);
}
else
{
if (!isSimulated)
{
st.setState(State.CREATED);
}
htmltext = "31522-01.htm";
}
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState st = getQuestState(killer, false);
if ((st != null) && (st.isCond(1) || st.isCond(2)) && (getRandom(100) < 15))
{
if (getQuestItemsCount(killer, BONE) < 50)
{
giveItems(killer, BONE, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, BONE) >= 50)
{
st.setCond(2, true);
showOnScreenMsg(killer, NpcStringId.YOU_CAN_GATHER_MORE_MONSTER_BLOOD, ExShowScreenMessage.TOP_CENTER, 6000);
}
}
else
{
giveItems(killer, BLOOD, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
return super.onKill(npc, killer, isSummon);
}
}