Q00763_ADauntingTask and a few more things.

Contributed by NightBR.
This commit is contained in:
MobiusDevelopment 2019-04-14 14:03:12 +00:00
parent 0a18693a8b
commit 90d0322b99
91 changed files with 512 additions and 504 deletions

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Though it won't be too difficult, there's something that I need to have done. I think you've just the right level of skills to carry it out. Of course, there's something in it for you as well.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-02.htm">"What's the mission?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
You will be assigned to a mission in the same area that your last assignment was in. Go to the <font color="LEVEL">Wall of Argos</font>.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-03.htm">"Sure"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Then, meet the <font color="LEVEL">Giant's Minion Janitt</font>. He will explain your mission to you. After completing the mission, retum to me.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-04.htm">"I have understood all the details, and I am ready."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
I will tell you again. Go to the <font color="LEVEL">Wall of Argos</font>.<br>
Then, meet the <font color="LEVEL">Giant's Minion Janitt</font>. He will explain the details of the mission.<br>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Thanks you for going through with the mission. It couldn't have been easy. I knew there was something about your strength that was different from other explorers. It's no surprise that your ability to successfully carry out missions is so outstanding. It would appear that I am still an excellent judge of talent.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-06.html">"Go on."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Captain Andrei:<br>
This is not the last mission. Surely you have retumed here because there is more for you to do. Retum to me, so that there are no further delays.<br>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Fortunately, the <font color="LEVEL">Eye of Argos</font> didn't fall for <font color="LEVEL">Embryo</font>'s trick. That doesn't mean he trusts us, though. We're going to have to prove ourselves to him.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-02.htm">"What do you suggest?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Giant's Minion Janitt:<br>
You must have had quite some time getting here. We may have met before. Now, I could swear we have...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-02.html">"Tell me what your mission is"</Button>
</body></html>

View File

@ -1,5 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I figure if you go to the <font color="LEVEL">Wall of Argos</font>, kill the monsters there, and collect <font color="LEVEL">Evil Eyes of Darkness</font>, that should get his attention.<br>
Oh, and one more thing!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-03.htm">"What is it?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Giant's Minion Janitt:<br>
Here's your assignment. Slay the monsters at the Wall of Argos, and collect <font color="LEVEL">Evil Dark Malice</font> and <font color="LEVEL">Evil Eye of Darkness</font> as proof.<br>
You'll be able to obtain them by slaying the <font color="LEVEL">Canyon Antelope, Canyon Bandersnatch, Valley Grendel, Valley Buffalo, Canyon Antelope Slave, Canyon Bandersnatch Slave, Valley Grendel Slave, and Valley Buffalo Slave</font>. You'll need at least 200 of each. Remember this.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-03.html">"Sure"</Button>
</body></html>

View File

@ -1,6 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I heard the Eye of Argos talking about some kind of <font color="LEVEL">Powerful Dark Malice</font> you can get from monsters--the same ones that have the Evil Eyes of Darkness, it seems.<br>
Thing is, the <font color="LEVEL">Evil Eyes of Darkness</font> are easy enough to collect if you just keep at it. The Malice, though, I'm not certain. I'm sure it'll come clear once you've worked on the Eyes for long enough.<br>
Tell you what, since the Malice is so tricky, I'll make it worth extra to you. Got it?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-04.htm">"I think I'm with you."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Giant's Minion Janitt:<br>
When you're done, no need to retum to me. Go to <font color="LEVEL">Captain Andrei</font> in the <font color="LEVEL">Town of Goddard</font>. No need to retum to me. Remember this; I've told you twice.<br>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Oh boy... I lost you, didn't I? Listen closely this time.<br>
Kill every monster you see at the <font color="LEVEL">Wall of Argos</font> and bring me <font color="LEVEL">50</font> <font color="LEVEL">Evil Eyes of Darkness</font>, and I'll give you a reward. And there's something extra in it for you for every <font color="LEVEL">Powerful Dark Malice</font> you bring.
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Oh boy... I lost you, didn't I? Listen closely this time.<br>
Kill every monster you see at the <font color="LEVEL">Wall of Argos</font> and bring me <font color="LEVEL">50</font> <font color="LEVEL">Evil Eyes of Darkness</font>, and I'll give you a reward. And there's something extra in it for you for every <font color="LEVEL">Powerful Dark Malice</font> you bring.
</body></html>

View File

@ -1,6 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Well, that's certainly all the Evil Eyes of Darkness I was looking for, but I'm afraid I can't give you any extra if you don't bring me enough Powerful Dark Malice.<br>
Do you want me to give you what reward I can and call it a day? Or will you wait, and collect some more Powerful Dark Malice? Your call.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-08.html">"I'm pooped, thanks."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-07.html">"I'll go collect some more Powerful Dark Malice."</Button>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Keep working at it. The more <font color="LEVEL">Powerful Dark Malice</font> you bring, the better the reward I can give you.
</body></html>

View File

@ -1,5 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
How's this strike you for compensation?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-09.html">Receive the reward</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-07.html">"I'll go collect some more Powerful Dark Malice."</Button>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I've no doubt the Eye of Argos will make more demands of us, so I'll likely have more work for you soon.
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br>
(Ertheia are excluded from this quest.)
</body></html>

View File

@ -16,11 +16,13 @@
*/ */
package quests.Q00763_ADauntingTask; package quests.Q00763_ADauntingTask;
import java.util.Arrays;
import com.l2jmobius.gameserver.enums.QuestSound; import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType; import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.Npc; import com.l2jmobius.gameserver.model.actor.Npc;
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State; import com.l2jmobius.gameserver.model.quest.State;
@ -34,62 +36,41 @@ import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
public final class Q00763_ADauntingTask extends Quest public final class Q00763_ADauntingTask extends Quest
{ {
// NPCs // NPCs
private static final int ANDREI = 31292;
private static final int JANITT = 33851; private static final int JANITT = 33851;
private static final int[] MONSTERS = private static final int[] MONSTERS_MALICE =
{ {
21294, // Canyon Antelope 21294, // Canyon Antelope
21295, // Canyon Antelope Slave
21296, // Canyon Bandersnatch 21296, // Canyon Bandersnatch
21297, // Canyon Bandersnatch Slave
21299, // Valley Buffalo Slave
21300, // Eye of Guide
21301, // Gaze of Nightmares
21302, // Eye of Watchman
21303, // Homunculus
21304, // Valley Grendel Slave
21305, // Eye of Pilgrim
21306, // Disciple of Protection
21307, // Elder Homunculus
21308, // Disciples of Punishment
21310, // Disciples of Authority
21312, // Eye of Ruler
23311, // Valley Buffalo 23311, // Valley Buffalo
23312, // Valley Grendel 23312, // Valley Grendel
23313, // Disciple of Protection };
private static final int[] MONSTERS_EYE =
{
21295, // Canyon Antelope Slave
21297, // Canyon Bandersnatch Slave
21299, // Valley Buffalo Slave
21304, // Valley Grendel Slave
}; };
// Items // Items
private static final int EYE = 36672; // Evil Eye of Darkness private static final ItemHolder EYE = new ItemHolder(36672, 200);
private static final int MALICE = 36673; // Powerful Dark Malice private static final ItemHolder MALICE = new ItemHolder(36673, 200);
private static final int STEEL_DOOR_BOX = 37392; // Steel Door Guild Reward Box (Mid-grade)
// Rewards // Rewards
//@formatter:off private static final long EXP = 474767890;
// Format: min item count, exp reward, sp reward, item count reward private static final int SP = 5026;
private static final int[][] REWARD =
{
{900, 163_296_000, 1_632_960, 10}, //TODO: Custom, SP reward should be decreated since Ertheia
{800, 146_966_400, 1_469_664, 9}, //TODO: Custom, SP reward should be decreated since Ertheia
{700, 130_636_800, 1_306_368, 8}, //TODO: Custom, SP reward should be decreated since Ertheia
{600, 114_307_200, 1_143_072, 7}, //TODO: Custom, SP reward should be decreated since Ertheia
{500, 97_977_600, 979_776, 6}, //TODO: Custom, SP reward should be decreated since Ertheia
{400, 81_648_000, 816_480, 5}, //TODO: Custom, SP reward should be decreated since Ertheia
{300, 65_318_400, 653_184, 4}, //TODO: Custom, SP reward should be decreated since Ertheia
{200, 48_988_800, 489_888, 3}, //TODO: Custom, SP reward should be decreated since Ertheia
{100, 32_659_200, 7_838, 2},
{0, 16_329_600, 3_919, 1},
};
//@formatter:on
// Misc // Misc
private static final int MIN_LEVEL = 70; private static final int MIN_LEVEL = 70;
private static final QuestType QUEST_TYPE = QuestType.REPEATABLE; // REPEATABLE, ONE_TIME, DAILY
public Q00763_ADauntingTask() public Q00763_ADauntingTask()
{ {
super(763); super(763);
addStartNpc(JANITT); addStartNpc(ANDREI);
addTalkId(JANITT); addTalkId(ANDREI, JANITT);
addKillId(MONSTERS); addKillId(MONSTERS_EYE);
registerQuestItems(EYE, MALICE); addKillId(MONSTERS_MALICE);
addCondNotRace(Race.ERTHEIA, "33851-10.html"); registerQuestItems(EYE.getId(), MALICE.getId());
addCondMinLevel(MIN_LEVEL, "33851-11.htm"); addCondMinLevel(MIN_LEVEL, "noLevel.html");
} }
@Override @Override
@ -104,41 +85,40 @@ public final class Q00763_ADauntingTask extends Quest
String htmltext = null; String htmltext = null;
switch (event) switch (event)
{ {
case "33851-02.htm": case "31292-02.htm":
case "33851-03.htm": case "31292-03.htm":
case "33851-07.html": case "33851-02.html":
case "33851-08.html":
{ {
htmltext = event; htmltext = event;
break; break;
} }
case "33851-04.htm": case "31292-04.htm":
{ {
// Starts
qs.startQuest(); qs.startQuest();
htmltext = event;
break;
}
case "33851-03.html":
{
// Killing Cond
qs.setCond(2, true); qs.setCond(2, true);
htmltext = event; htmltext = event;
break; break;
} }
case "33851-09.html": case "31292-06.html":
{ {
if (qs.isCond(3)) if (qs.isCond(3))
{ {
final long itemCount = getQuestItemsCount(player, MALICE); // Rewards
if (player.getLevel() >= MIN_LEVEL)
for (int[] data : REWARD)
{ {
if (itemCount >= data[0]) addExpAndSp(player, EXP, SP);
{
if (player.getLevel() >= MIN_LEVEL)
{
addExpAndSp(player, data[1], data[2]);
}
giveItems(player, STEEL_DOOR_BOX, data[3]);
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
break;
}
} }
takeAllItems(player, EYE, MALICE);
qs.exitQuest(QUEST_TYPE, true);
htmltext = event;
break;
} }
break; break;
} }
@ -156,12 +136,33 @@ public final class Q00763_ADauntingTask extends Quest
{ {
case State.CREATED: case State.CREATED:
{ {
htmltext = "33851-01.htm"; htmltext = "31292-01.htm";
break; break;
} }
case State.STARTED: case State.STARTED:
{ {
htmltext = qs.isCond(2) ? "33851-05.html" : "33851-06.html"; if (npc.getId() == ANDREI)
{
if (qs.isCond(3))
{
htmltext = "31292-05.html";
}
else
{
htmltext = "31292-04.html";
}
}
else if (npc.getId() == JANITT)
{
if (qs.isCond(1))
{
htmltext = "33851-01.html";
}
else
{
htmltext = "33851-03.html";
}
}
break; break;
} }
case State.COMPLETED: case State.COMPLETED:
@ -173,7 +174,7 @@ public final class Q00763_ADauntingTask extends Quest
else else
{ {
qs.setState(State.CREATED); qs.setState(State.CREATED);
htmltext = "33851-01.htm"; htmltext = "31292-01.htm";
} }
break; break;
} }
@ -186,25 +187,32 @@ public final class Q00763_ADauntingTask extends Quest
{ {
final QuestState qs = getQuestState(killer, false); final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(2) && (getRandom(100) < 25)) if ((qs != null) && qs.isCond(2))
{ {
if (getQuestItemsCount(killer, EYE) < 50) if (contains(MONSTERS_EYE, npc.getId()) && (getQuestItemsCount(killer, EYE.getId()) < 200))
{ {
giveItems(killer, EYE, 1); giveItems(killer, EYE.getId(), 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, EYE) >= 50)
{
qs.setCond(3, true);
showOnScreenMsg(killer, NpcStringId.YOU_CAN_GATHER_MORE_POWERFUL_DARK_MALICE, ExShowScreenMessage.TOP_CENTER, 6000);
}
} }
else else if (contains(MONSTERS_MALICE, npc.getId()) && (getQuestItemsCount(killer, MALICE.getId()) < 200))
{ {
giveItems(killer, MALICE, 1); giveItems(killer, MALICE.getId(), 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
} }
if ((getQuestItemsCount(killer, EYE.getId()) >= 200) && (getQuestItemsCount(killer, MALICE.getId()) >= 200))
{
// Finish
qs.setCond(3, true);
showOnScreenMsg(killer, NpcStringId.YOU_CAN_GATHER_MORE_POWERFUL_DARK_MALICE, ExShowScreenMessage.TOP_CENTER, 6000);
}
} }
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);
}
public static boolean contains(int[] arr, Integer item)
{
return Arrays.stream(arr).anyMatch(item::equals);
} }
} }

View File

@ -1,4 +1,4 @@
<html><body>Giant's Minion Janitt:<br> <html><body>Giant's Minion Janitt:<br>
Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br> Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br>
(Only characters Lv. 70 or above may undertake this quest.) (Only characters Lv. 70 or above may undertake this quest.)
</body></html> </body></html>

View File

@ -1604,7 +1604,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Harnak Underground Ruins --> <itemConsumeId>39496</itemConsumeId> <!-- Scroll of Escape: Harnak Underground Ruins -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>
@ -1630,7 +1630,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Kartia's Labyrinth --> <itemConsumeId>39497</itemConsumeId> <!-- Scroll of Escape: Kartia's Labyrinth -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>
@ -1681,7 +1681,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Garden of Genesis --> <itemConsumeId>39499</itemConsumeId> <!-- Scroll of Escape: Garden of Genesis -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>

View File

@ -226,6 +226,10 @@ public class Q00562_BasicMissionAltarOfEvil extends Quest
qs.setCond(7, true); qs.setCond(7, true);
htmltext = "34414-02.html"; htmltext = "34414-02.html";
} }
else
{
htmltext = "34414-01.html";
}
} }
break; break;
} }

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Though it won't be too difficult, there's something that I need to have done. I think you've just the right level of skills to carry it out. Of course, there's something in it for you as well.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-02.htm">"What's the mission?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
You will be assigned to a mission in the same area that your last assignment was in. Go to the <font color="LEVEL">Wall of Argos</font>.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-03.htm">"Sure"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Then, meet the <font color="LEVEL">Giant's Minion Janitt</font>. He will explain your mission to you. After completing the mission, retum to me.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-04.htm">"I have understood all the details, and I am ready."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
I will tell you again. Go to the <font color="LEVEL">Wall of Argos</font>.<br>
Then, meet the <font color="LEVEL">Giant's Minion Janitt</font>. He will explain the details of the mission.<br>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Thanks you for going through with the mission. It couldn't have been easy. I knew there was something about your strength that was different from other explorers. It's no surprise that your ability to successfully carry out missions is so outstanding. It would appear that I am still an excellent judge of talent.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-06.html">"Go on."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Captain Andrei:<br>
This is not the last mission. Surely you have retumed here because there is more for you to do. Retum to me, so that there are no further delays.<br>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Fortunately, the <font color="LEVEL">Eye of Argos</font> didn't fall for <font color="LEVEL">Embryo</font>'s trick. That doesn't mean he trusts us, though. We're going to have to prove ourselves to him.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-02.htm">"What do you suggest?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Giant's Minion Janitt:<br>
You must have had quite some time getting here. We may have met before. Now, I could swear we have...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-02.html">"Tell me what your mission is"</Button>
</body></html>

View File

@ -1,5 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I figure if you go to the <font color="LEVEL">Wall of Argos</font>, kill the monsters there, and collect <font color="LEVEL">Evil Eyes of Darkness</font>, that should get his attention.<br>
Oh, and one more thing!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-03.htm">"What is it?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Giant's Minion Janitt:<br>
Here's your assignment. Slay the monsters at the Wall of Argos, and collect <font color="LEVEL">Evil Dark Malice</font> and <font color="LEVEL">Evil Eye of Darkness</font> as proof.<br>
You'll be able to obtain them by slaying the <font color="LEVEL">Canyon Antelope, Canyon Bandersnatch, Valley Grendel, Valley Buffalo, Canyon Antelope Slave, Canyon Bandersnatch Slave, Valley Grendel Slave, and Valley Buffalo Slave</font>. You'll need at least 200 of each. Remember this.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-03.html">"Sure"</Button>
</body></html>

View File

@ -1,6 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I heard the Eye of Argos talking about some kind of <font color="LEVEL">Powerful Dark Malice</font> you can get from monsters--the same ones that have the Evil Eyes of Darkness, it seems.<br>
Thing is, the <font color="LEVEL">Evil Eyes of Darkness</font> are easy enough to collect if you just keep at it. The Malice, though, I'm not certain. I'm sure it'll come clear once you've worked on the Eyes for long enough.<br>
Tell you what, since the Malice is so tricky, I'll make it worth extra to you. Got it?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-04.htm">"I think I'm with you."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Giant's Minion Janitt:<br>
When you're done, no need to retum to me. Go to <font color="LEVEL">Captain Andrei</font> in the <font color="LEVEL">Town of Goddard</font>. No need to retum to me. Remember this; I've told you twice.<br>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Oh boy... I lost you, didn't I? Listen closely this time.<br>
Kill every monster you see at the <font color="LEVEL">Wall of Argos</font> and bring me <font color="LEVEL">50</font> <font color="LEVEL">Evil Eyes of Darkness</font>, and I'll give you a reward. And there's something extra in it for you for every <font color="LEVEL">Powerful Dark Malice</font> you bring.
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Oh boy... I lost you, didn't I? Listen closely this time.<br>
Kill every monster you see at the <font color="LEVEL">Wall of Argos</font> and bring me <font color="LEVEL">50</font> <font color="LEVEL">Evil Eyes of Darkness</font>, and I'll give you a reward. And there's something extra in it for you for every <font color="LEVEL">Powerful Dark Malice</font> you bring.
</body></html>

View File

@ -1,6 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Well, that's certainly all the Evil Eyes of Darkness I was looking for, but I'm afraid I can't give you any extra if you don't bring me enough Powerful Dark Malice.<br>
Do you want me to give you what reward I can and call it a day? Or will you wait, and collect some more Powerful Dark Malice? Your call.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-08.html">"I'm pooped, thanks."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-07.html">"I'll go collect some more Powerful Dark Malice."</Button>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Keep working at it. The more <font color="LEVEL">Powerful Dark Malice</font> you bring, the better the reward I can give you.
</body></html>

View File

@ -1,5 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
How's this strike you for compensation?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-09.html">Receive the reward</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-07.html">"I'll go collect some more Powerful Dark Malice."</Button>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I've no doubt the Eye of Argos will make more demands of us, so I'll likely have more work for you soon.
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br>
(Ertheia are excluded from this quest.)
</body></html>

View File

@ -16,11 +16,13 @@
*/ */
package quests.Q00763_ADauntingTask; package quests.Q00763_ADauntingTask;
import java.util.Arrays;
import com.l2jmobius.gameserver.enums.QuestSound; import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType; import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.Npc; import com.l2jmobius.gameserver.model.actor.Npc;
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State; import com.l2jmobius.gameserver.model.quest.State;
@ -34,62 +36,41 @@ import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
public final class Q00763_ADauntingTask extends Quest public final class Q00763_ADauntingTask extends Quest
{ {
// NPCs // NPCs
private static final int ANDREI = 31292;
private static final int JANITT = 33851; private static final int JANITT = 33851;
private static final int[] MONSTERS = private static final int[] MONSTERS_MALICE =
{ {
21294, // Canyon Antelope 21294, // Canyon Antelope
21295, // Canyon Antelope Slave
21296, // Canyon Bandersnatch 21296, // Canyon Bandersnatch
21297, // Canyon Bandersnatch Slave
21299, // Valley Buffalo Slave
21300, // Eye of Guide
21301, // Gaze of Nightmares
21302, // Eye of Watchman
21303, // Homunculus
21304, // Valley Grendel Slave
21305, // Eye of Pilgrim
21306, // Disciple of Protection
21307, // Elder Homunculus
21308, // Disciples of Punishment
21310, // Disciples of Authority
21312, // Eye of Ruler
23311, // Valley Buffalo 23311, // Valley Buffalo
23312, // Valley Grendel 23312, // Valley Grendel
23313, // Disciple of Protection };
private static final int[] MONSTERS_EYE =
{
21295, // Canyon Antelope Slave
21297, // Canyon Bandersnatch Slave
21299, // Valley Buffalo Slave
21304, // Valley Grendel Slave
}; };
// Items // Items
private static final int EYE = 36672; // Evil Eye of Darkness private static final ItemHolder EYE = new ItemHolder(36672, 200);
private static final int MALICE = 36673; // Powerful Dark Malice private static final ItemHolder MALICE = new ItemHolder(36673, 200);
private static final int STEEL_DOOR_BOX = 37392; // Steel Door Guild Reward Box (Mid-grade)
// Rewards // Rewards
//@formatter:off private static final long EXP = 474767890;
// Format: min item count, exp reward, sp reward, item count reward private static final int SP = 5026;
private static final int[][] REWARD =
{
{900, 163_296_000, 1_632_960, 10}, //TODO: Custom, SP reward should be decreated since Ertheia
{800, 146_966_400, 1_469_664, 9}, //TODO: Custom, SP reward should be decreated since Ertheia
{700, 130_636_800, 1_306_368, 8}, //TODO: Custom, SP reward should be decreated since Ertheia
{600, 114_307_200, 1_143_072, 7}, //TODO: Custom, SP reward should be decreated since Ertheia
{500, 97_977_600, 979_776, 6}, //TODO: Custom, SP reward should be decreated since Ertheia
{400, 81_648_000, 816_480, 5}, //TODO: Custom, SP reward should be decreated since Ertheia
{300, 65_318_400, 653_184, 4}, //TODO: Custom, SP reward should be decreated since Ertheia
{200, 48_988_800, 489_888, 3}, //TODO: Custom, SP reward should be decreated since Ertheia
{100, 32_659_200, 7_838, 2},
{0, 16_329_600, 3_919, 1},
};
//@formatter:on
// Misc // Misc
private static final int MIN_LEVEL = 70; private static final int MIN_LEVEL = 70;
private static final QuestType QUEST_TYPE = QuestType.REPEATABLE; // REPEATABLE, ONE_TIME, DAILY
public Q00763_ADauntingTask() public Q00763_ADauntingTask()
{ {
super(763); super(763);
addStartNpc(JANITT); addStartNpc(ANDREI);
addTalkId(JANITT); addTalkId(ANDREI, JANITT);
addKillId(MONSTERS); addKillId(MONSTERS_EYE);
registerQuestItems(EYE, MALICE); addKillId(MONSTERS_MALICE);
addCondNotRace(Race.ERTHEIA, "33851-10.html"); registerQuestItems(EYE.getId(), MALICE.getId());
addCondMinLevel(MIN_LEVEL, "33851-11.htm"); addCondMinLevel(MIN_LEVEL, "noLevel.html");
} }
@Override @Override
@ -104,41 +85,40 @@ public final class Q00763_ADauntingTask extends Quest
String htmltext = null; String htmltext = null;
switch (event) switch (event)
{ {
case "33851-02.htm": case "31292-02.htm":
case "33851-03.htm": case "31292-03.htm":
case "33851-07.html": case "33851-02.html":
case "33851-08.html":
{ {
htmltext = event; htmltext = event;
break; break;
} }
case "33851-04.htm": case "31292-04.htm":
{ {
// Starts
qs.startQuest(); qs.startQuest();
htmltext = event;
break;
}
case "33851-03.html":
{
// Killing Cond
qs.setCond(2, true); qs.setCond(2, true);
htmltext = event; htmltext = event;
break; break;
} }
case "33851-09.html": case "31292-06.html":
{ {
if (qs.isCond(3)) if (qs.isCond(3))
{ {
final long itemCount = getQuestItemsCount(player, MALICE); // Rewards
if (player.getLevel() >= MIN_LEVEL)
for (int[] data : REWARD)
{ {
if (itemCount >= data[0]) addExpAndSp(player, EXP, SP);
{
if (player.getLevel() >= MIN_LEVEL)
{
addExpAndSp(player, data[1], data[2]);
}
giveItems(player, STEEL_DOOR_BOX, data[3]);
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
break;
}
} }
takeAllItems(player, EYE, MALICE);
qs.exitQuest(QUEST_TYPE, true);
htmltext = event;
break;
} }
break; break;
} }
@ -156,12 +136,33 @@ public final class Q00763_ADauntingTask extends Quest
{ {
case State.CREATED: case State.CREATED:
{ {
htmltext = "33851-01.htm"; htmltext = "31292-01.htm";
break; break;
} }
case State.STARTED: case State.STARTED:
{ {
htmltext = qs.isCond(2) ? "33851-05.html" : "33851-06.html"; if (npc.getId() == ANDREI)
{
if (qs.isCond(3))
{
htmltext = "31292-05.html";
}
else
{
htmltext = "31292-04.html";
}
}
else if (npc.getId() == JANITT)
{
if (qs.isCond(1))
{
htmltext = "33851-01.html";
}
else
{
htmltext = "33851-03.html";
}
}
break; break;
} }
case State.COMPLETED: case State.COMPLETED:
@ -173,7 +174,7 @@ public final class Q00763_ADauntingTask extends Quest
else else
{ {
qs.setState(State.CREATED); qs.setState(State.CREATED);
htmltext = "33851-01.htm"; htmltext = "31292-01.htm";
} }
break; break;
} }
@ -186,25 +187,32 @@ public final class Q00763_ADauntingTask extends Quest
{ {
final QuestState qs = getQuestState(killer, false); final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(2) && (getRandom(100) < 25)) if ((qs != null) && qs.isCond(2))
{ {
if (getQuestItemsCount(killer, EYE) < 50) if (contains(MONSTERS_EYE, npc.getId()) && (getQuestItemsCount(killer, EYE.getId()) < 200))
{ {
giveItems(killer, EYE, 1); giveItems(killer, EYE.getId(), 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, EYE) >= 50)
{
qs.setCond(3, true);
showOnScreenMsg(killer, NpcStringId.YOU_CAN_GATHER_MORE_POWERFUL_DARK_MALICE, ExShowScreenMessage.TOP_CENTER, 6000);
}
} }
else else if (contains(MONSTERS_MALICE, npc.getId()) && (getQuestItemsCount(killer, MALICE.getId()) < 200))
{ {
giveItems(killer, MALICE, 1); giveItems(killer, MALICE.getId(), 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
} }
if ((getQuestItemsCount(killer, EYE.getId()) >= 200) && (getQuestItemsCount(killer, MALICE.getId()) >= 200))
{
// Finish
qs.setCond(3, true);
showOnScreenMsg(killer, NpcStringId.YOU_CAN_GATHER_MORE_POWERFUL_DARK_MALICE, ExShowScreenMessage.TOP_CENTER, 6000);
}
} }
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);
}
public static boolean contains(int[] arr, Integer item)
{
return Arrays.stream(arr).anyMatch(item::equals);
} }
} }

View File

@ -1,4 +1,4 @@
<html><body>Giant's Minion Janitt:<br> <html><body>Giant's Minion Janitt:<br>
Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br> Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br>
(Only characters Lv. 70 or above may undertake this quest.) (Only characters Lv. 70 or above may undertake this quest.)
</body></html> </body></html>

View File

@ -1604,7 +1604,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Harnak Underground Ruins --> <itemConsumeId>39496</itemConsumeId> <!-- Scroll of Escape: Harnak Underground Ruins -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>
@ -1630,7 +1630,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Kartia's Labyrinth --> <itemConsumeId>39497</itemConsumeId> <!-- Scroll of Escape: Kartia's Labyrinth -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>
@ -1681,7 +1681,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Garden of Genesis --> <itemConsumeId>39499</itemConsumeId> <!-- Scroll of Escape: Garden of Genesis -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>

View File

@ -226,6 +226,10 @@ public class Q00562_BasicMissionAltarOfEvil extends Quest
qs.setCond(7, true); qs.setCond(7, true);
htmltext = "34414-02.html"; htmltext = "34414-02.html";
} }
else
{
htmltext = "34414-01.html";
}
} }
break; break;
} }

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Though it won't be too difficult, there's something that I need to have done. I think you've just the right level of skills to carry it out. Of course, there's something in it for you as well.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-02.htm">"What's the mission?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
You will be assigned to a mission in the same area that your last assignment was in. Go to the <font color="LEVEL">Wall of Argos</font>.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-03.htm">"Sure"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Then, meet the <font color="LEVEL">Giant's Minion Janitt</font>. He will explain your mission to you. After completing the mission, retum to me.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-04.htm">"I have understood all the details, and I am ready."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
I will tell you again. Go to the <font color="LEVEL">Wall of Argos</font>.<br>
Then, meet the <font color="LEVEL">Giant's Minion Janitt</font>. He will explain the details of the mission.<br>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Thanks you for going through with the mission. It couldn't have been easy. I knew there was something about your strength that was different from other explorers. It's no surprise that your ability to successfully carry out missions is so outstanding. It would appear that I am still an excellent judge of talent.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-06.html">"Go on."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Captain Andrei:<br>
This is not the last mission. Surely you have retumed here because there is more for you to do. Retum to me, so that there are no further delays.<br>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Fortunately, the <font color="LEVEL">Eye of Argos</font> didn't fall for <font color="LEVEL">Embryo</font>'s trick. That doesn't mean he trusts us, though. We're going to have to prove ourselves to him.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-02.htm">"What do you suggest?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Giant's Minion Janitt:<br>
You must have had quite some time getting here. We may have met before. Now, I could swear we have...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-02.html">"Tell me what your mission is"</Button>
</body></html>

View File

@ -1,5 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I figure if you go to the <font color="LEVEL">Wall of Argos</font>, kill the monsters there, and collect <font color="LEVEL">Evil Eyes of Darkness</font>, that should get his attention.<br>
Oh, and one more thing!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-03.htm">"What is it?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Giant's Minion Janitt:<br>
Here's your assignment. Slay the monsters at the Wall of Argos, and collect <font color="LEVEL">Evil Dark Malice</font> and <font color="LEVEL">Evil Eye of Darkness</font> as proof.<br>
You'll be able to obtain them by slaying the <font color="LEVEL">Canyon Antelope, Canyon Bandersnatch, Valley Grendel, Valley Buffalo, Canyon Antelope Slave, Canyon Bandersnatch Slave, Valley Grendel Slave, and Valley Buffalo Slave</font>. You'll need at least 200 of each. Remember this.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-03.html">"Sure"</Button>
</body></html>

View File

@ -1,6 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I heard the Eye of Argos talking about some kind of <font color="LEVEL">Powerful Dark Malice</font> you can get from monsters--the same ones that have the Evil Eyes of Darkness, it seems.<br>
Thing is, the <font color="LEVEL">Evil Eyes of Darkness</font> are easy enough to collect if you just keep at it. The Malice, though, I'm not certain. I'm sure it'll come clear once you've worked on the Eyes for long enough.<br>
Tell you what, since the Malice is so tricky, I'll make it worth extra to you. Got it?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-04.htm">"I think I'm with you."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Giant's Minion Janitt:<br>
When you're done, no need to retum to me. Go to <font color="LEVEL">Captain Andrei</font> in the <font color="LEVEL">Town of Goddard</font>. No need to retum to me. Remember this; I've told you twice.<br>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Oh boy... I lost you, didn't I? Listen closely this time.<br>
Kill every monster you see at the <font color="LEVEL">Wall of Argos</font> and bring me <font color="LEVEL">50</font> <font color="LEVEL">Evil Eyes of Darkness</font>, and I'll give you a reward. And there's something extra in it for you for every <font color="LEVEL">Powerful Dark Malice</font> you bring.
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Oh boy... I lost you, didn't I? Listen closely this time.<br>
Kill every monster you see at the <font color="LEVEL">Wall of Argos</font> and bring me <font color="LEVEL">50</font> <font color="LEVEL">Evil Eyes of Darkness</font>, and I'll give you a reward. And there's something extra in it for you for every <font color="LEVEL">Powerful Dark Malice</font> you bring.
</body></html>

View File

@ -1,6 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Well, that's certainly all the Evil Eyes of Darkness I was looking for, but I'm afraid I can't give you any extra if you don't bring me enough Powerful Dark Malice.<br>
Do you want me to give you what reward I can and call it a day? Or will you wait, and collect some more Powerful Dark Malice? Your call.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-08.html">"I'm pooped, thanks."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-07.html">"I'll go collect some more Powerful Dark Malice."</Button>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Keep working at it. The more <font color="LEVEL">Powerful Dark Malice</font> you bring, the better the reward I can give you.
</body></html>

View File

@ -1,5 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
How's this strike you for compensation?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-09.html">Receive the reward</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-07.html">"I'll go collect some more Powerful Dark Malice."</Button>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I've no doubt the Eye of Argos will make more demands of us, so I'll likely have more work for you soon.
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br>
(Ertheia are excluded from this quest.)
</body></html>

View File

@ -16,11 +16,13 @@
*/ */
package quests.Q00763_ADauntingTask; package quests.Q00763_ADauntingTask;
import java.util.Arrays;
import com.l2jmobius.gameserver.enums.QuestSound; import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType; import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.Npc; import com.l2jmobius.gameserver.model.actor.Npc;
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State; import com.l2jmobius.gameserver.model.quest.State;
@ -34,62 +36,41 @@ import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
public final class Q00763_ADauntingTask extends Quest public final class Q00763_ADauntingTask extends Quest
{ {
// NPCs // NPCs
private static final int ANDREI = 31292;
private static final int JANITT = 33851; private static final int JANITT = 33851;
private static final int[] MONSTERS = private static final int[] MONSTERS_MALICE =
{ {
21294, // Canyon Antelope 21294, // Canyon Antelope
21295, // Canyon Antelope Slave
21296, // Canyon Bandersnatch 21296, // Canyon Bandersnatch
21297, // Canyon Bandersnatch Slave
21299, // Valley Buffalo Slave
21300, // Eye of Guide
21301, // Gaze of Nightmares
21302, // Eye of Watchman
21303, // Homunculus
21304, // Valley Grendel Slave
21305, // Eye of Pilgrim
21306, // Disciple of Protection
21307, // Elder Homunculus
21308, // Disciples of Punishment
21310, // Disciples of Authority
21312, // Eye of Ruler
23311, // Valley Buffalo 23311, // Valley Buffalo
23312, // Valley Grendel 23312, // Valley Grendel
23313, // Disciple of Protection };
private static final int[] MONSTERS_EYE =
{
21295, // Canyon Antelope Slave
21297, // Canyon Bandersnatch Slave
21299, // Valley Buffalo Slave
21304, // Valley Grendel Slave
}; };
// Items // Items
private static final int EYE = 36672; // Evil Eye of Darkness private static final ItemHolder EYE = new ItemHolder(36672, 200);
private static final int MALICE = 36673; // Powerful Dark Malice private static final ItemHolder MALICE = new ItemHolder(36673, 200);
private static final int STEEL_DOOR_BOX = 37392; // Steel Door Guild Reward Box (Mid-grade)
// Rewards // Rewards
//@formatter:off private static final long EXP = 474767890;
// Format: min item count, exp reward, sp reward, item count reward private static final int SP = 5026;
private static final int[][] REWARD =
{
{900, 163_296_000, 1_632_960, 10}, //TODO: Custom, SP reward should be decreated since Ertheia
{800, 146_966_400, 1_469_664, 9}, //TODO: Custom, SP reward should be decreated since Ertheia
{700, 130_636_800, 1_306_368, 8}, //TODO: Custom, SP reward should be decreated since Ertheia
{600, 114_307_200, 1_143_072, 7}, //TODO: Custom, SP reward should be decreated since Ertheia
{500, 97_977_600, 979_776, 6}, //TODO: Custom, SP reward should be decreated since Ertheia
{400, 81_648_000, 816_480, 5}, //TODO: Custom, SP reward should be decreated since Ertheia
{300, 65_318_400, 653_184, 4}, //TODO: Custom, SP reward should be decreated since Ertheia
{200, 48_988_800, 489_888, 3}, //TODO: Custom, SP reward should be decreated since Ertheia
{100, 32_659_200, 7_838, 2},
{0, 16_329_600, 3_919, 1},
};
//@formatter:on
// Misc // Misc
private static final int MIN_LEVEL = 70; private static final int MIN_LEVEL = 70;
private static final QuestType QUEST_TYPE = QuestType.REPEATABLE; // REPEATABLE, ONE_TIME, DAILY
public Q00763_ADauntingTask() public Q00763_ADauntingTask()
{ {
super(763); super(763);
addStartNpc(JANITT); addStartNpc(ANDREI);
addTalkId(JANITT); addTalkId(ANDREI, JANITT);
addKillId(MONSTERS); addKillId(MONSTERS_EYE);
registerQuestItems(EYE, MALICE); addKillId(MONSTERS_MALICE);
addCondNotRace(Race.ERTHEIA, "33851-10.html"); registerQuestItems(EYE.getId(), MALICE.getId());
addCondMinLevel(MIN_LEVEL, "33851-11.htm"); addCondMinLevel(MIN_LEVEL, "noLevel.html");
} }
@Override @Override
@ -104,41 +85,40 @@ public final class Q00763_ADauntingTask extends Quest
String htmltext = null; String htmltext = null;
switch (event) switch (event)
{ {
case "33851-02.htm": case "31292-02.htm":
case "33851-03.htm": case "31292-03.htm":
case "33851-07.html": case "33851-02.html":
case "33851-08.html":
{ {
htmltext = event; htmltext = event;
break; break;
} }
case "33851-04.htm": case "31292-04.htm":
{ {
// Starts
qs.startQuest(); qs.startQuest();
htmltext = event;
break;
}
case "33851-03.html":
{
// Killing Cond
qs.setCond(2, true); qs.setCond(2, true);
htmltext = event; htmltext = event;
break; break;
} }
case "33851-09.html": case "31292-06.html":
{ {
if (qs.isCond(3)) if (qs.isCond(3))
{ {
final long itemCount = getQuestItemsCount(player, MALICE); // Rewards
if (player.getLevel() >= MIN_LEVEL)
for (int[] data : REWARD)
{ {
if (itemCount >= data[0]) addExpAndSp(player, EXP, SP);
{
if (player.getLevel() >= MIN_LEVEL)
{
addExpAndSp(player, data[1], data[2]);
}
giveItems(player, STEEL_DOOR_BOX, data[3]);
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
break;
}
} }
takeAllItems(player, EYE, MALICE);
qs.exitQuest(QUEST_TYPE, true);
htmltext = event;
break;
} }
break; break;
} }
@ -156,12 +136,33 @@ public final class Q00763_ADauntingTask extends Quest
{ {
case State.CREATED: case State.CREATED:
{ {
htmltext = "33851-01.htm"; htmltext = "31292-01.htm";
break; break;
} }
case State.STARTED: case State.STARTED:
{ {
htmltext = qs.isCond(2) ? "33851-05.html" : "33851-06.html"; if (npc.getId() == ANDREI)
{
if (qs.isCond(3))
{
htmltext = "31292-05.html";
}
else
{
htmltext = "31292-04.html";
}
}
else if (npc.getId() == JANITT)
{
if (qs.isCond(1))
{
htmltext = "33851-01.html";
}
else
{
htmltext = "33851-03.html";
}
}
break; break;
} }
case State.COMPLETED: case State.COMPLETED:
@ -173,7 +174,7 @@ public final class Q00763_ADauntingTask extends Quest
else else
{ {
qs.setState(State.CREATED); qs.setState(State.CREATED);
htmltext = "33851-01.htm"; htmltext = "31292-01.htm";
} }
break; break;
} }
@ -186,25 +187,32 @@ public final class Q00763_ADauntingTask extends Quest
{ {
final QuestState qs = getQuestState(killer, false); final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(2) && (getRandom(100) < 25)) if ((qs != null) && qs.isCond(2))
{ {
if (getQuestItemsCount(killer, EYE) < 50) if (contains(MONSTERS_EYE, npc.getId()) && (getQuestItemsCount(killer, EYE.getId()) < 200))
{ {
giveItems(killer, EYE, 1); giveItems(killer, EYE.getId(), 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, EYE) >= 50)
{
qs.setCond(3, true);
showOnScreenMsg(killer, NpcStringId.YOU_CAN_GATHER_MORE_POWERFUL_DARK_MALICE, ExShowScreenMessage.TOP_CENTER, 6000);
}
} }
else else if (contains(MONSTERS_MALICE, npc.getId()) && (getQuestItemsCount(killer, MALICE.getId()) < 200))
{ {
giveItems(killer, MALICE, 1); giveItems(killer, MALICE.getId(), 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
} }
if ((getQuestItemsCount(killer, EYE.getId()) >= 200) && (getQuestItemsCount(killer, MALICE.getId()) >= 200))
{
// Finish
qs.setCond(3, true);
showOnScreenMsg(killer, NpcStringId.YOU_CAN_GATHER_MORE_POWERFUL_DARK_MALICE, ExShowScreenMessage.TOP_CENTER, 6000);
}
} }
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);
}
public static boolean contains(int[] arr, Integer item)
{
return Arrays.stream(arr).anyMatch(item::equals);
} }
} }

View File

@ -1,4 +1,4 @@
<html><body>Giant's Minion Janitt:<br> <html><body>Giant's Minion Janitt:<br>
Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br> Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br>
(Only characters Lv. 70 or above may undertake this quest.) (Only characters Lv. 70 or above may undertake this quest.)
</body></html> </body></html>

View File

@ -1598,7 +1598,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Harnak Underground Ruins --> <itemConsumeId>39496</itemConsumeId> <!-- Scroll of Escape: Harnak Underground Ruins -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>
@ -1624,7 +1624,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Kartia's Labyrinth --> <itemConsumeId>39497</itemConsumeId> <!-- Scroll of Escape: Kartia's Labyrinth -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>
@ -1675,7 +1675,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Garden of Genesis --> <itemConsumeId>39499</itemConsumeId> <!-- Scroll of Escape: Garden of Genesis -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>

View File

@ -226,6 +226,10 @@ public class Q00562_BasicMissionAltarOfEvil extends Quest
qs.setCond(7, true); qs.setCond(7, true);
htmltext = "34414-02.html"; htmltext = "34414-02.html";
} }
else
{
htmltext = "34414-01.html";
}
} }
break; break;
} }

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Though it won't be too difficult, there's something that I need to have done. I think you've just the right level of skills to carry it out. Of course, there's something in it for you as well.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-02.htm">"What's the mission?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
You will be assigned to a mission in the same area that your last assignment was in. Go to the <font color="LEVEL">Wall of Argos</font>.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-03.htm">"Sure"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Then, meet the <font color="LEVEL">Giant's Minion Janitt</font>. He will explain your mission to you. After completing the mission, retum to me.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-04.htm">"I have understood all the details, and I am ready."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
I will tell you again. Go to the <font color="LEVEL">Wall of Argos</font>.<br>
Then, meet the <font color="LEVEL">Giant's Minion Janitt</font>. He will explain the details of the mission.<br>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Captain Andrei:<br>
Thanks you for going through with the mission. It couldn't have been easy. I knew there was something about your strength that was different from other explorers. It's no surprise that your ability to successfully carry out missions is so outstanding. It would appear that I am still an excellent judge of talent.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 31292-06.html">"Go on."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Captain Andrei:<br>
This is not the last mission. Surely you have retumed here because there is more for you to do. Retum to me, so that there are no further delays.<br>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Fortunately, the <font color="LEVEL">Eye of Argos</font> didn't fall for <font color="LEVEL">Embryo</font>'s trick. That doesn't mean he trusts us, though. We're going to have to prove ourselves to him.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-02.htm">"What do you suggest?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Giant's Minion Janitt:<br>
You must have had quite some time getting here. We may have met before. Now, I could swear we have...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-02.html">"Tell me what your mission is"</Button>
</body></html>

View File

@ -1,5 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I figure if you go to the <font color="LEVEL">Wall of Argos</font>, kill the monsters there, and collect <font color="LEVEL">Evil Eyes of Darkness</font>, that should get his attention.<br>
Oh, and one more thing!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-03.htm">"What is it?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Giant's Minion Janitt:<br>
Here's your assignment. Slay the monsters at the Wall of Argos, and collect <font color="LEVEL">Evil Dark Malice</font> and <font color="LEVEL">Evil Eye of Darkness</font> as proof.<br>
You'll be able to obtain them by slaying the <font color="LEVEL">Canyon Antelope, Canyon Bandersnatch, Valley Grendel, Valley Buffalo, Canyon Antelope Slave, Canyon Bandersnatch Slave, Valley Grendel Slave, and Valley Buffalo Slave</font>. You'll need at least 200 of each. Remember this.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-03.html">"Sure"</Button>
</body></html>

View File

@ -1,6 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I heard the Eye of Argos talking about some kind of <font color="LEVEL">Powerful Dark Malice</font> you can get from monsters--the same ones that have the Evil Eyes of Darkness, it seems.<br>
Thing is, the <font color="LEVEL">Evil Eyes of Darkness</font> are easy enough to collect if you just keep at it. The Malice, though, I'm not certain. I'm sure it'll come clear once you've worked on the Eyes for long enough.<br>
Tell you what, since the Malice is so tricky, I'll make it worth extra to you. Got it?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-04.htm">"I think I'm with you."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Giant's Minion Janitt:<br>
When you're done, no need to retum to me. Go to <font color="LEVEL">Captain Andrei</font> in the <font color="LEVEL">Town of Goddard</font>. No need to retum to me. Remember this; I've told you twice.<br>
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Oh boy... I lost you, didn't I? Listen closely this time.<br>
Kill every monster you see at the <font color="LEVEL">Wall of Argos</font> and bring me <font color="LEVEL">50</font> <font color="LEVEL">Evil Eyes of Darkness</font>, and I'll give you a reward. And there's something extra in it for you for every <font color="LEVEL">Powerful Dark Malice</font> you bring.
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Oh boy... I lost you, didn't I? Listen closely this time.<br>
Kill every monster you see at the <font color="LEVEL">Wall of Argos</font> and bring me <font color="LEVEL">50</font> <font color="LEVEL">Evil Eyes of Darkness</font>, and I'll give you a reward. And there's something extra in it for you for every <font color="LEVEL">Powerful Dark Malice</font> you bring.
</body></html>

View File

@ -1,6 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Well, that's certainly all the Evil Eyes of Darkness I was looking for, but I'm afraid I can't give you any extra if you don't bring me enough Powerful Dark Malice.<br>
Do you want me to give you what reward I can and call it a day? Or will you wait, and collect some more Powerful Dark Malice? Your call.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-08.html">"I'm pooped, thanks."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-07.html">"I'll go collect some more Powerful Dark Malice."</Button>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Keep working at it. The more <font color="LEVEL">Powerful Dark Malice</font> you bring, the better the reward I can give you.
</body></html>

View File

@ -1,5 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
How's this strike you for compensation?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-09.html">Receive the reward</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00763_ADauntingTask 33851-07.html">"I'll go collect some more Powerful Dark Malice."</Button>
</body></html>

View File

@ -1,3 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
I've no doubt the Eye of Argos will make more demands of us, so I'll likely have more work for you soon.
</body></html>

View File

@ -1,4 +0,0 @@
<html><body>Giant's Minion Janitt:<br>
Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br>
(Ertheia are excluded from this quest.)
</body></html>

View File

@ -16,11 +16,13 @@
*/ */
package quests.Q00763_ADauntingTask; package quests.Q00763_ADauntingTask;
import java.util.Arrays;
import com.l2jmobius.gameserver.enums.QuestSound; import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType; import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.Npc; import com.l2jmobius.gameserver.model.actor.Npc;
import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State; import com.l2jmobius.gameserver.model.quest.State;
@ -34,62 +36,41 @@ import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
public final class Q00763_ADauntingTask extends Quest public final class Q00763_ADauntingTask extends Quest
{ {
// NPCs // NPCs
private static final int ANDREI = 31292;
private static final int JANITT = 33851; private static final int JANITT = 33851;
private static final int[] MONSTERS = private static final int[] MONSTERS_MALICE =
{ {
21294, // Canyon Antelope 21294, // Canyon Antelope
21295, // Canyon Antelope Slave
21296, // Canyon Bandersnatch 21296, // Canyon Bandersnatch
21297, // Canyon Bandersnatch Slave
21299, // Valley Buffalo Slave
21300, // Eye of Guide
21301, // Gaze of Nightmares
21302, // Eye of Watchman
21303, // Homunculus
21304, // Valley Grendel Slave
21305, // Eye of Pilgrim
21306, // Disciple of Protection
21307, // Elder Homunculus
21308, // Disciples of Punishment
21310, // Disciples of Authority
21312, // Eye of Ruler
23311, // Valley Buffalo 23311, // Valley Buffalo
23312, // Valley Grendel 23312, // Valley Grendel
23313, // Disciple of Protection };
private static final int[] MONSTERS_EYE =
{
21295, // Canyon Antelope Slave
21297, // Canyon Bandersnatch Slave
21299, // Valley Buffalo Slave
21304, // Valley Grendel Slave
}; };
// Items // Items
private static final int EYE = 36672; // Evil Eye of Darkness private static final ItemHolder EYE = new ItemHolder(36672, 200);
private static final int MALICE = 36673; // Powerful Dark Malice private static final ItemHolder MALICE = new ItemHolder(36673, 200);
private static final int STEEL_DOOR_BOX = 37392; // Steel Door Guild Reward Box (Mid-grade)
// Rewards // Rewards
//@formatter:off private static final long EXP = 474767890;
// Format: min item count, exp reward, sp reward, item count reward private static final int SP = 5026;
private static final int[][] REWARD =
{
{900, 163_296_000, 1_632_960, 10}, //TODO: Custom, SP reward should be decreated since Ertheia
{800, 146_966_400, 1_469_664, 9}, //TODO: Custom, SP reward should be decreated since Ertheia
{700, 130_636_800, 1_306_368, 8}, //TODO: Custom, SP reward should be decreated since Ertheia
{600, 114_307_200, 1_143_072, 7}, //TODO: Custom, SP reward should be decreated since Ertheia
{500, 97_977_600, 979_776, 6}, //TODO: Custom, SP reward should be decreated since Ertheia
{400, 81_648_000, 816_480, 5}, //TODO: Custom, SP reward should be decreated since Ertheia
{300, 65_318_400, 653_184, 4}, //TODO: Custom, SP reward should be decreated since Ertheia
{200, 48_988_800, 489_888, 3}, //TODO: Custom, SP reward should be decreated since Ertheia
{100, 32_659_200, 7_838, 2},
{0, 16_329_600, 3_919, 1},
};
//@formatter:on
// Misc // Misc
private static final int MIN_LEVEL = 70; private static final int MIN_LEVEL = 70;
private static final QuestType QUEST_TYPE = QuestType.REPEATABLE; // REPEATABLE, ONE_TIME, DAILY
public Q00763_ADauntingTask() public Q00763_ADauntingTask()
{ {
super(763); super(763);
addStartNpc(JANITT); addStartNpc(ANDREI);
addTalkId(JANITT); addTalkId(ANDREI, JANITT);
addKillId(MONSTERS); addKillId(MONSTERS_EYE);
registerQuestItems(EYE, MALICE); addKillId(MONSTERS_MALICE);
addCondNotRace(Race.ERTHEIA, "33851-10.html"); registerQuestItems(EYE.getId(), MALICE.getId());
addCondMinLevel(MIN_LEVEL, "33851-11.htm"); addCondMinLevel(MIN_LEVEL, "noLevel.html");
} }
@Override @Override
@ -104,41 +85,40 @@ public final class Q00763_ADauntingTask extends Quest
String htmltext = null; String htmltext = null;
switch (event) switch (event)
{ {
case "33851-02.htm": case "31292-02.htm":
case "33851-03.htm": case "31292-03.htm":
case "33851-07.html": case "33851-02.html":
case "33851-08.html":
{ {
htmltext = event; htmltext = event;
break; break;
} }
case "33851-04.htm": case "31292-04.htm":
{ {
// Starts
qs.startQuest(); qs.startQuest();
htmltext = event;
break;
}
case "33851-03.html":
{
// Killing Cond
qs.setCond(2, true); qs.setCond(2, true);
htmltext = event; htmltext = event;
break; break;
} }
case "33851-09.html": case "31292-06.html":
{ {
if (qs.isCond(3)) if (qs.isCond(3))
{ {
final long itemCount = getQuestItemsCount(player, MALICE); // Rewards
if (player.getLevel() >= MIN_LEVEL)
for (int[] data : REWARD)
{ {
if (itemCount >= data[0]) addExpAndSp(player, EXP, SP);
{
if (player.getLevel() >= MIN_LEVEL)
{
addExpAndSp(player, data[1], data[2]);
}
giveItems(player, STEEL_DOOR_BOX, data[3]);
qs.exitQuest(QuestType.DAILY, true);
htmltext = event;
break;
}
} }
takeAllItems(player, EYE, MALICE);
qs.exitQuest(QUEST_TYPE, true);
htmltext = event;
break;
} }
break; break;
} }
@ -156,12 +136,33 @@ public final class Q00763_ADauntingTask extends Quest
{ {
case State.CREATED: case State.CREATED:
{ {
htmltext = "33851-01.htm"; htmltext = "31292-01.htm";
break; break;
} }
case State.STARTED: case State.STARTED:
{ {
htmltext = qs.isCond(2) ? "33851-05.html" : "33851-06.html"; if (npc.getId() == ANDREI)
{
if (qs.isCond(3))
{
htmltext = "31292-05.html";
}
else
{
htmltext = "31292-04.html";
}
}
else if (npc.getId() == JANITT)
{
if (qs.isCond(1))
{
htmltext = "33851-01.html";
}
else
{
htmltext = "33851-03.html";
}
}
break; break;
} }
case State.COMPLETED: case State.COMPLETED:
@ -173,7 +174,7 @@ public final class Q00763_ADauntingTask extends Quest
else else
{ {
qs.setState(State.CREATED); qs.setState(State.CREATED);
htmltext = "33851-01.htm"; htmltext = "31292-01.htm";
} }
break; break;
} }
@ -186,25 +187,32 @@ public final class Q00763_ADauntingTask extends Quest
{ {
final QuestState qs = getQuestState(killer, false); final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isCond(2) && (getRandom(100) < 25)) if ((qs != null) && qs.isCond(2))
{ {
if (getQuestItemsCount(killer, EYE) < 50) if (contains(MONSTERS_EYE, npc.getId()) && (getQuestItemsCount(killer, EYE.getId()) < 200))
{ {
giveItems(killer, EYE, 1); giveItems(killer, EYE.getId(), 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, EYE) >= 50)
{
qs.setCond(3, true);
showOnScreenMsg(killer, NpcStringId.YOU_CAN_GATHER_MORE_POWERFUL_DARK_MALICE, ExShowScreenMessage.TOP_CENTER, 6000);
}
} }
else else if (contains(MONSTERS_MALICE, npc.getId()) && (getQuestItemsCount(killer, MALICE.getId()) < 200))
{ {
giveItems(killer, MALICE, 1); giveItems(killer, MALICE.getId(), 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
} }
if ((getQuestItemsCount(killer, EYE.getId()) >= 200) && (getQuestItemsCount(killer, MALICE.getId()) >= 200))
{
// Finish
qs.setCond(3, true);
showOnScreenMsg(killer, NpcStringId.YOU_CAN_GATHER_MORE_POWERFUL_DARK_MALICE, ExShowScreenMessage.TOP_CENTER, 6000);
}
} }
return super.onKill(npc, killer, isSummon); return super.onKill(npc, killer, isSummon);
}
public static boolean contains(int[] arr, Integer item)
{
return Arrays.stream(arr).anyMatch(item::equals);
} }
} }

View File

@ -1,4 +1,4 @@
<html><body>Giant's Minion Janitt:<br> <html><body>Giant's Minion Janitt:<br>
Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br> Sorry, but I need someone a little more, uh, imposing. Come back when you're stronger, ok?<br>
(Only characters Lv. 70 or above may undertake this quest.) (Only characters Lv. 70 or above may undertake this quest.)
</body></html> </body></html>

View File

@ -1623,7 +1623,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Harnak Underground Ruins --> <itemConsumeId>39496</itemConsumeId> <!-- Scroll of Escape: Harnak Underground Ruins -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>
@ -1649,7 +1649,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Kartia's Labyrinth --> <itemConsumeId>39497</itemConsumeId> <!-- Scroll of Escape: Kartia's Labyrinth -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>
@ -1700,7 +1700,7 @@
<hitTime>1000</hitTime> <hitTime>1000</hitTime>
<isMagic>2</isMagic> <!-- Static Skill --> <isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount> <itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>39498</itemConsumeId> <!-- Scroll of Escape: Garden of Genesis --> <itemConsumeId>39499</itemConsumeId> <!-- Scroll of Escape: Garden of Genesis -->
<magicLvl>1</magicLvl> <magicLvl>1</magicLvl>
<cond msgId="113" addName="1"> <cond msgId="113" addName="1">
<and> <and>