Quest Come to me (245).

Contributed by gigilo1868.
This commit is contained in:
MobiusDev 2017-08-20 19:01:43 +00:00
parent 3cb33a8029
commit c614e8d7a7
60 changed files with 1077 additions and 3 deletions

View File

@ -1,4 +1,3 @@
245 Come to Me
353 Power of Darkness
480 Another Legacy of Cruma Tower
482 Recertification of Value

View File

@ -0,0 +1,5 @@
<html><body>Head Blacksmith Ferris:<br>
It is important that you see to your own maturation and development. You'd think that would be easy, but it can be quite a challenge, not becoming complacent and falling into a rut.<br>
However, I happen to know that there are currently challenging opportunities available for Academy apprentices. With your qualifications, I bet you'd have no problem tackling such a challenge.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00245_ComeToMe 30847-04.htm">"Interesting. Tell me more."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
It is important to keep challenging yourself. Don't you agree? Growth is one of nature's laws. To stay still is to become stagnant. What you need is a good opportunity. Something that will challenge you and enable you to develop yourself. If you only had the right qualifications...<br>
(This quest can only be fulfilled by a level 70 through 75 character, who belongs to the clan academy, and who has a sponsor.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
The ring, it's useful, yes?<br>
(You have already completed this quest.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
I'm trying to make a ring. Or a necklace, but I think a ring would be the best place to start. Anyway, in order to make it I'll need some simple ingredients.<br>
It shouldn't be too much of a challenge for you to collect what I need. Go to the <font color="LEVEL">Blazing Swamp</font>, defeat <font color="LEVEL">Lava Wyrms and Swamp Predators</font>, and bring me back <font color="LEVEL">15 Blazing Ashes</font>. Once you get those, we can hit up your sponsor for the rest of ingredients I need.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Oh, come on now! It's not that hard! Just meander on over to the <font color="LEVEL">Blazing Swamp</font>, defeat some <font color="LEVEL">Lava Wyrms and Swamp Predators</font>, and collect <font color="LEVEL">15 Blazing Ashes</font> for me. That's all I need you to do. I'll get everything else I need from your sponsor. Hop to it!
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Good. That covers my basic ingredient needs. Now it's time to talk to your sponsor. To make the ring, I'll also need <font color="LEVEL">100 Crystals (A-grade)</font>. Ask your sponsor to procure those, then come talk to me.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00245_ComeToMe 30847-07.html">"I'll pass on your message."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Oh, and you'll need to be here when I talk to your sponsor. This is, after all, supposed to be a learning experience for you. Bye now. I look forward to seeing you, your sponsor, and a pack of crystals later!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Where is your sponsor?
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Why are you here alone? Where's your sponsor? Don't you have one? Well... I can't help you without a sponsor. Go find one and then bring him by to see me.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Is that your sponsor? He does talk, doesn't he? Can you get him to talk to me? Hmm?
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Ah, there you are. Do you remember what I need? I need <font color="LEVEL">100 Crystals (A-grade)</font> to make your Apprentice's Ring. Did you bring them?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00245_ComeToMe 30847-13.htm">"Here are 100 Crystals (A-grade)."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Who are you? A sponsor? I don't know who you're sponsoring. Please visit me again with your apprentice, then we can talk.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Good work. I'm impressed by the way you and your apprentice work together. You make a good team. I'm glad to be able to provide this growth opportunity to the both of you. There might be a chance for you to increase your enlightenment, while I'm working on this. Now, I'll need some time to make the ring.<br>
Ah, I need to talk to your apprentice about this. Could you please let your apprentice know?
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Hmm... there aren't enough ingredients. I need <font color="LEVEL">100 Crystals: A grade</font> to make the ring.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Preparations to make the ring are now complete. It will just take me a little while to get this flame hot enough. While I'm working on this, I don't know if your sponsor mentioned it, but you can acquire increased enlightenment. Enlightenment while you wait! What could be better?<br>
All you need to do is to go to the <font color="LEVEL">Blazing Swamp</font> and catch <font color="LEVEL">Hames Orc Footsoldier, Hames Orc Sniper, Hames Orc Shaman, and Hames Orc Prefects</font>. Then, collect <font color="LEVEL">12 Crystals of Experience</font>. <font color="LEVEL">The trick, there's always a trick, is that you must kill them while your sponsor is watching. If you don't, you won't be able to find any Crystals of Experience.</font> Strange, I know. But that's just how it works. And, it gives you a wonderful opportunity to show off to your sponsor, or... if you need it... your sponsor can give you a helping hand. Go on now. Have a good time.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Go to the <font color="LEVEL">Blazing Swamp</font> and catch <font color="LEVEL">Hames Orc Footsoldier, Hames Orc Sniper, Hames Orc Shaman, and Hames Orc Prefects</font>. Then, collect <font color="LEVEL">12 Crystals of Experience</font>. <font color="LEVEL">But... make sure that your sponsor is watching when you kill them, or you won't be able to find any Crystals of Experience.</font> There's some magical bonding mojo going on there. It makes for a great opportunity for team building. Have fun now!
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Good work. Now, using these transference bellows, I can heat the Crystals of Experience and make this manifestation of your training become part of your essence. Hold still now!<br>
There we go! That's it! So, how do you feel? Do you feel the enlightenment? It tickles, doesn't it? I know it's not a huge amount, but every little bit helps you grow. Ah, and here is your ring. I got it finished while you were out collecting crystals. I hope it helps you in your future endeavors.
</body></html>

View File

@ -0,0 +1,296 @@
/*
* 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.Q00245_ComeToMe;
import java.util.Collection;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.instancemanager.MentorManager;
import com.l2jmobius.gameserver.model.L2Mentee;
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.util.Util;
/**
* Come To Me (245)
* @URL https://l2wiki.com/Come_to_Me
* @author Gigi
* @date 2017-08-18 - [13:01:14]
*/
public class Q00245_ComeToMe extends Quest
{
// NPC
private static final int FERRIS = 30847;
// Monsters
private final static int[] BLAZING_MOBS_1 = new int[]
{
21110, // Swamp Predator
21111 // Lava Wyrm
};
private final static int[] BLAZING_MOBS_2 = new int[]
{
21112, // Hames Orc Foot Soldier
21113, // Hames Orc Sniper
21115, // Hames Orc Shaman
21116 // Hames Orc Prefect
};
// Items
private final static int FLAME_ASHES = 30322;
private final static int CRYSTALS_OF_EXPERIENCE = 30323;
private final static int CRYSTAL_A = 1461;
private final static int MENTOR_RING = 30383;
private final static int ACADEMY_DYE_STR = 47205;
private final static int ACADEMY_DYE_WIT = 47210;
// Misc
private static final int MIN_LEVEL = 70;
private static final int MAX_LEVEL = 75;
public Q00245_ComeToMe()
{
super(245);
addStartNpc(FERRIS);
addTalkId(FERRIS);
addKillId(BLAZING_MOBS_1);
addKillId(BLAZING_MOBS_2);
addFirstTalkId(FERRIS);
registerQuestItems(FLAME_ASHES, CRYSTALS_OF_EXPERIENCE);
addCondLevel(MIN_LEVEL, MAX_LEVEL, "30847-02.htm");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (player.isMentor() && event.equals("30847-13.html"))
{
L2PcInstance mentee = getCurrentMentee(player);
if (mentee != null)
{
if (player.destroyItemByItemId("quest_245", CRYSTAL_A, 100, npc, true))
{
mentee.getQuestState(getName()).setCond(3, true);
return event;
}
return "30847-14.html";
}
return "30847-12.html";
}
QuestState st = getQuestState(player, false);
if (st == null)
{
return event;
}
else if (event.equals("30847-04.htm"))
{
st.startQuest();
}
else if (event.equals("30847-07.htm"))
{
st.set("talk", "1");
takeItems(player, FLAME_ASHES, -1);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
return event;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
if (st == null)
{
return htmltext;
}
if (npc.getId() == FERRIS)
{
switch (st.getState())
{
case State.CREATED:
{
if (player.isMentee() && player.isAcademyMember())
{
htmltext = "30847-01.htm";
}
else
{
htmltext = "30847-02.htm";
}
break;
}
case State.STARTED:
{
switch (st.getCond())
{
case 1:
{
htmltext = "30847-05.html";
break;
}
case 2:
{
if (!st.isSet("talk"))
{
htmltext = "30847-06.html";
}
else
{
if (player.isMentee())
{
L2PcInstance mentor = MentorManager.getInstance().getMentor(player.getObjectId()).getPlayerInstance();
if ((mentor != null) && mentor.isOnline() && Util.checkIfInRange(200, npc, mentor, true))
{
htmltext = "30847-10.html";
}
else
{
htmltext = "30847-08.html";
}
}
else
{
htmltext = "30847-09.html";
}
}
break;
}
case 3:
{
st.setCond(4, true);
htmltext = "30847-17.html";
break;
}
case 4:
{
htmltext = "30847-18.html";
break;
}
case 5:
{
if (player.getLevel() >= MIN_LEVEL)
{
if (player.isAcademyMember())
{
player.getClan().addReputationScore(500, true);
}
addExpAndSp(player, 2_018_733, 484);
giveItems(player, MENTOR_RING, 1);
giveItems(player, getRandom(ACADEMY_DYE_STR, ACADEMY_DYE_WIT), 10);
htmltext = "30847-19.html";
}
else
{
htmltext = getNoQuestLevelRewardMsg(player);
}
st.exitQuest(QuestType.ONE_TIME, true);
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = "30847-03.htm";
break;
}
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState st = getQuestState(killer, true);
if ((npc == null) || (st == null))
{
return super.onKill(npc, killer, isSummon);
}
if (st.getCond() == 1)
{
if (CommonUtil.contains(BLAZING_MOBS_1, npc.getId()) && (getRandom(100) < 50))
{
giveItems(killer, FLAME_ASHES, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, FLAME_ASHES) >= 15)
{
st.setCond(2, true);
}
}
}
else if (st.getCond() == 4)
{
if (CommonUtil.contains(BLAZING_MOBS_2, npc.getId()))
{
if (killer.isMentee())
{
L2PcInstance mentor = MentorManager.getInstance().getMentor(killer.getObjectId()).getPlayerInstance();
if ((mentor != null) && Util.checkIfInRange(500, killer, mentor, false))
{
giveItems(killer, CRYSTALS_OF_EXPERIENCE, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, CRYSTALS_OF_EXPERIENCE) >= 12)
{
st.setCond(5, true);
}
}
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
if (player.isMentor() && (npc.getId() == FERRIS))
{
final L2PcInstance mentee = getCurrentMentee(player);
if (mentee != null)
{
return "30847-11.html";
}
}
npc.showChatWindow(player);
return null;
}
private L2PcInstance getCurrentMentee(L2PcInstance mentor)
{
L2PcInstance mentee = null;
final Collection<L2Mentee> mentees = MentorManager.getInstance().getMentees(mentor.getObjectId());
for (L2Mentee pl : mentees)
{
if (pl.isOnline() && Util.checkIfInRange(400, mentor, pl.getPlayerInstance(), false))
{
final QuestState st = getQuestState(pl.getPlayerInstance(), true);
if ((st != null) && (st.getCond() == 2))
{
mentee = pl.getPlayerInstance();
}
}
}
return mentee;
}
}

View File

@ -92,6 +92,7 @@ import quests.Q00237_WindsOfChange.Q00237_WindsOfChange;
import quests.Q00238_SuccessFailureOfBusiness.Q00238_SuccessFailureOfBusiness;
import quests.Q00239_WontYouJoinUs.Q00239_WontYouJoinUs;
import quests.Q00240_ImTheOnlyOneYouCanTrust.Q00240_ImTheOnlyOneYouCanTrust;
import quests.Q00245_ComeToMe.Q00245_ComeToMe;
import quests.Q00254_LegendaryTales.Q00254_LegendaryTales;
import quests.Q00270_TheOneWhoEndsSilence.Q00270_TheOneWhoEndsSilence;
import quests.Q00278_HomeSecurity.Q00278_HomeSecurity;
@ -532,6 +533,7 @@ public class QuestMasterHandler
Q00238_SuccessFailureOfBusiness.class,
Q00239_WontYouJoinUs.class,
Q00240_ImTheOnlyOneYouCanTrust.class,
Q00245_ComeToMe.class,
Q00254_LegendaryTales.class,
Q00270_TheOneWhoEndsSilence.class,
Q00278_HomeSecurity.class,

View File

@ -1,4 +1,3 @@
245 Come to Me
482 Recertification of Value
504 Competition for the Bandit Stronghold
655 A Grand Plan for Taming Wild Beasts

View File

@ -0,0 +1,5 @@
<html><body>Head Blacksmith Ferris:<br>
It is important that you see to your own maturation and development. You'd think that would be easy, but it can be quite a challenge, not becoming complacent and falling into a rut.<br>
However, I happen to know that there are currently challenging opportunities available for Academy apprentices. With your qualifications, I bet you'd have no problem tackling such a challenge.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00245_ComeToMe 30847-04.htm">"Interesting. Tell me more."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
It is important to keep challenging yourself. Don't you agree? Growth is one of nature's laws. To stay still is to become stagnant. What you need is a good opportunity. Something that will challenge you and enable you to develop yourself. If you only had the right qualifications...<br>
(This quest can only be fulfilled by a level 70 through 75 character, who belongs to the clan academy, and who has a sponsor.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
The ring, it's useful, yes?<br>
(You have already completed this quest.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
I'm trying to make a ring. Or a necklace, but I think a ring would be the best place to start. Anyway, in order to make it I'll need some simple ingredients.<br>
It shouldn't be too much of a challenge for you to collect what I need. Go to the <font color="LEVEL">Blazing Swamp</font>, defeat <font color="LEVEL">Lava Wyrms and Swamp Predators</font>, and bring me back <font color="LEVEL">15 Blazing Ashes</font>. Once you get those, we can hit up your sponsor for the rest of ingredients I need.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Oh, come on now! It's not that hard! Just meander on over to the <font color="LEVEL">Blazing Swamp</font>, defeat some <font color="LEVEL">Lava Wyrms and Swamp Predators</font>, and collect <font color="LEVEL">15 Blazing Ashes</font> for me. That's all I need you to do. I'll get everything else I need from your sponsor. Hop to it!
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Good. That covers my basic ingredient needs. Now it's time to talk to your sponsor. To make the ring, I'll also need <font color="LEVEL">100 Crystals (A-grade)</font>. Ask your sponsor to procure those, then come talk to me.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00245_ComeToMe 30847-07.html">"I'll pass on your message."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Oh, and you'll need to be here when I talk to your sponsor. This is, after all, supposed to be a learning experience for you. Bye now. I look forward to seeing you, your sponsor, and a pack of crystals later!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Where is your sponsor?
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Why are you here alone? Where's your sponsor? Don't you have one? Well... I can't help you without a sponsor. Go find one and then bring him by to see me.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Is that your sponsor? He does talk, doesn't he? Can you get him to talk to me? Hmm?
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Ah, there you are. Do you remember what I need? I need <font color="LEVEL">100 Crystals (A-grade)</font> to make your Apprentice's Ring. Did you bring them?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00245_ComeToMe 30847-13.htm">"Here are 100 Crystals (A-grade)."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Who are you? A sponsor? I don't know who you're sponsoring. Please visit me again with your apprentice, then we can talk.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Good work. I'm impressed by the way you and your apprentice work together. You make a good team. I'm glad to be able to provide this growth opportunity to the both of you. There might be a chance for you to increase your enlightenment, while I'm working on this. Now, I'll need some time to make the ring.<br>
Ah, I need to talk to your apprentice about this. Could you please let your apprentice know?
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Hmm... there aren't enough ingredients. I need <font color="LEVEL">100 Crystals: A grade</font> to make the ring.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Preparations to make the ring are now complete. It will just take me a little while to get this flame hot enough. While I'm working on this, I don't know if your sponsor mentioned it, but you can acquire increased enlightenment. Enlightenment while you wait! What could be better?<br>
All you need to do is to go to the <font color="LEVEL">Blazing Swamp</font> and catch <font color="LEVEL">Hames Orc Footsoldier, Hames Orc Sniper, Hames Orc Shaman, and Hames Orc Prefects</font>. Then, collect <font color="LEVEL">12 Crystals of Experience</font>. <font color="LEVEL">The trick, there's always a trick, is that you must kill them while your sponsor is watching. If you don't, you won't be able to find any Crystals of Experience.</font> Strange, I know. But that's just how it works. And, it gives you a wonderful opportunity to show off to your sponsor, or... if you need it... your sponsor can give you a helping hand. Go on now. Have a good time.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Go to the <font color="LEVEL">Blazing Swamp</font> and catch <font color="LEVEL">Hames Orc Footsoldier, Hames Orc Sniper, Hames Orc Shaman, and Hames Orc Prefects</font>. Then, collect <font color="LEVEL">12 Crystals of Experience</font>. <font color="LEVEL">But... make sure that your sponsor is watching when you kill them, or you won't be able to find any Crystals of Experience.</font> There's some magical bonding mojo going on there. It makes for a great opportunity for team building. Have fun now!
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Good work. Now, using these transference bellows, I can heat the Crystals of Experience and make this manifestation of your training become part of your essence. Hold still now!<br>
There we go! That's it! So, how do you feel? Do you feel the enlightenment? It tickles, doesn't it? I know it's not a huge amount, but every little bit helps you grow. Ah, and here is your ring. I got it finished while you were out collecting crystals. I hope it helps you in your future endeavors.
</body></html>

View File

@ -0,0 +1,296 @@
/*
* 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.Q00245_ComeToMe;
import java.util.Collection;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.instancemanager.MentorManager;
import com.l2jmobius.gameserver.model.L2Mentee;
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.util.Util;
/**
* Come To Me (245)
* @URL https://l2wiki.com/Come_to_Me
* @author Gigi
* @date 2017-08-18 - [13:01:14]
*/
public class Q00245_ComeToMe extends Quest
{
// NPC
private static final int FERRIS = 30847;
// Monsters
private final static int[] BLAZING_MOBS_1 = new int[]
{
21110, // Swamp Predator
21111 // Lava Wyrm
};
private final static int[] BLAZING_MOBS_2 = new int[]
{
21112, // Hames Orc Foot Soldier
21113, // Hames Orc Sniper
21115, // Hames Orc Shaman
21116 // Hames Orc Prefect
};
// Items
private final static int FLAME_ASHES = 30322;
private final static int CRYSTALS_OF_EXPERIENCE = 30323;
private final static int CRYSTAL_A = 1461;
private final static int MENTOR_RING = 30383;
private final static int ACADEMY_DYE_STR = 47205;
private final static int ACADEMY_DYE_WIT = 47210;
// Misc
private static final int MIN_LEVEL = 70;
private static final int MAX_LEVEL = 75;
public Q00245_ComeToMe()
{
super(245);
addStartNpc(FERRIS);
addTalkId(FERRIS);
addKillId(BLAZING_MOBS_1);
addKillId(BLAZING_MOBS_2);
addFirstTalkId(FERRIS);
registerQuestItems(FLAME_ASHES, CRYSTALS_OF_EXPERIENCE);
addCondLevel(MIN_LEVEL, MAX_LEVEL, "30847-02.htm");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (player.isMentor() && event.equals("30847-13.html"))
{
L2PcInstance mentee = getCurrentMentee(player);
if (mentee != null)
{
if (player.destroyItemByItemId("quest_245", CRYSTAL_A, 100, npc, true))
{
mentee.getQuestState(getName()).setCond(3, true);
return event;
}
return "30847-14.html";
}
return "30847-12.html";
}
QuestState st = getQuestState(player, false);
if (st == null)
{
return event;
}
else if (event.equals("30847-04.htm"))
{
st.startQuest();
}
else if (event.equals("30847-07.htm"))
{
st.set("talk", "1");
takeItems(player, FLAME_ASHES, -1);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
return event;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
if (st == null)
{
return htmltext;
}
if (npc.getId() == FERRIS)
{
switch (st.getState())
{
case State.CREATED:
{
if (player.isMentee() && player.isAcademyMember())
{
htmltext = "30847-01.htm";
}
else
{
htmltext = "30847-02.htm";
}
break;
}
case State.STARTED:
{
switch (st.getCond())
{
case 1:
{
htmltext = "30847-05.html";
break;
}
case 2:
{
if (!st.isSet("talk"))
{
htmltext = "30847-06.html";
}
else
{
if (player.isMentee())
{
L2PcInstance mentor = MentorManager.getInstance().getMentor(player.getObjectId()).getPlayerInstance();
if ((mentor != null) && mentor.isOnline() && Util.checkIfInRange(200, npc, mentor, true))
{
htmltext = "30847-10.html";
}
else
{
htmltext = "30847-08.html";
}
}
else
{
htmltext = "30847-09.html";
}
}
break;
}
case 3:
{
st.setCond(4, true);
htmltext = "30847-17.html";
break;
}
case 4:
{
htmltext = "30847-18.html";
break;
}
case 5:
{
if (player.getLevel() >= MIN_LEVEL)
{
if (player.isAcademyMember())
{
player.getClan().addReputationScore(500, true);
}
addExpAndSp(player, 2_018_733, 484);
giveItems(player, MENTOR_RING, 1);
giveItems(player, getRandom(ACADEMY_DYE_STR, ACADEMY_DYE_WIT), 10);
htmltext = "30847-19.html";
}
else
{
htmltext = getNoQuestLevelRewardMsg(player);
}
st.exitQuest(QuestType.ONE_TIME, true);
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = "30847-03.htm";
break;
}
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState st = getQuestState(killer, true);
if ((npc == null) || (st == null))
{
return super.onKill(npc, killer, isSummon);
}
if (st.getCond() == 1)
{
if (CommonUtil.contains(BLAZING_MOBS_1, npc.getId()) && (getRandom(100) < 50))
{
giveItems(killer, FLAME_ASHES, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, FLAME_ASHES) >= 15)
{
st.setCond(2, true);
}
}
}
else if (st.getCond() == 4)
{
if (CommonUtil.contains(BLAZING_MOBS_2, npc.getId()))
{
if (killer.isMentee())
{
L2PcInstance mentor = MentorManager.getInstance().getMentor(killer.getObjectId()).getPlayerInstance();
if ((mentor != null) && Util.checkIfInRange(500, killer, mentor, false))
{
giveItems(killer, CRYSTALS_OF_EXPERIENCE, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, CRYSTALS_OF_EXPERIENCE) >= 12)
{
st.setCond(5, true);
}
}
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
if (player.isMentor() && (npc.getId() == FERRIS))
{
final L2PcInstance mentee = getCurrentMentee(player);
if (mentee != null)
{
return "30847-11.html";
}
}
npc.showChatWindow(player);
return null;
}
private L2PcInstance getCurrentMentee(L2PcInstance mentor)
{
L2PcInstance mentee = null;
final Collection<L2Mentee> mentees = MentorManager.getInstance().getMentees(mentor.getObjectId());
for (L2Mentee pl : mentees)
{
if (pl.isOnline() && Util.checkIfInRange(400, mentor, pl.getPlayerInstance(), false))
{
final QuestState st = getQuestState(pl.getPlayerInstance(), true);
if ((st != null) && (st.getCond() == 2))
{
mentee = pl.getPlayerInstance();
}
}
}
return mentee;
}
}

View File

@ -85,6 +85,7 @@ import quests.Q00237_WindsOfChange.Q00237_WindsOfChange;
import quests.Q00238_SuccessFailureOfBusiness.Q00238_SuccessFailureOfBusiness;
import quests.Q00239_WontYouJoinUs.Q00239_WontYouJoinUs;
import quests.Q00240_ImTheOnlyOneYouCanTrust.Q00240_ImTheOnlyOneYouCanTrust;
import quests.Q00245_ComeToMe.Q00245_ComeToMe;
import quests.Q00254_LegendaryTales.Q00254_LegendaryTales;
import quests.Q00270_TheOneWhoEndsSilence.Q00270_TheOneWhoEndsSilence;
import quests.Q00278_HomeSecurity.Q00278_HomeSecurity;
@ -504,6 +505,7 @@ public class QuestMasterHandler
Q00238_SuccessFailureOfBusiness.class,
Q00239_WontYouJoinUs.class,
Q00240_ImTheOnlyOneYouCanTrust.class,
Q00245_ComeToMe.class,
Q00254_LegendaryTales.class,
Q00270_TheOneWhoEndsSilence.class,
Q00278_HomeSecurity.class,

View File

@ -1,4 +1,3 @@
245 Come to Me
480 Another Legacy of Cruma Tower
482 Recertification of Value
504 Competition for the Bandit Stronghold

View File

@ -0,0 +1,5 @@
<html><body>Head Blacksmith Ferris:<br>
It is important that you see to your own maturation and development. You'd think that would be easy, but it can be quite a challenge, not becoming complacent and falling into a rut.<br>
However, I happen to know that there are currently challenging opportunities available for Academy apprentices. With your qualifications, I bet you'd have no problem tackling such a challenge.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00245_ComeToMe 30847-04.htm">"Interesting. Tell me more."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
It is important to keep challenging yourself. Don't you agree? Growth is one of nature's laws. To stay still is to become stagnant. What you need is a good opportunity. Something that will challenge you and enable you to develop yourself. If you only had the right qualifications...<br>
(This quest can only be fulfilled by a level 70 through 75 character, who belongs to the clan academy, and who has a sponsor.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
The ring, it's useful, yes?<br>
(You have already completed this quest.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
I'm trying to make a ring. Or a necklace, but I think a ring would be the best place to start. Anyway, in order to make it I'll need some simple ingredients.<br>
It shouldn't be too much of a challenge for you to collect what I need. Go to the <font color="LEVEL">Blazing Swamp</font>, defeat <font color="LEVEL">Lava Wyrms and Swamp Predators</font>, and bring me back <font color="LEVEL">15 Blazing Ashes</font>. Once you get those, we can hit up your sponsor for the rest of ingredients I need.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Oh, come on now! It's not that hard! Just meander on over to the <font color="LEVEL">Blazing Swamp</font>, defeat some <font color="LEVEL">Lava Wyrms and Swamp Predators</font>, and collect <font color="LEVEL">15 Blazing Ashes</font> for me. That's all I need you to do. I'll get everything else I need from your sponsor. Hop to it!
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Good. That covers my basic ingredient needs. Now it's time to talk to your sponsor. To make the ring, I'll also need <font color="LEVEL">100 Crystals (A-grade)</font>. Ask your sponsor to procure those, then come talk to me.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00245_ComeToMe 30847-07.html">"I'll pass on your message."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Oh, and you'll need to be here when I talk to your sponsor. This is, after all, supposed to be a learning experience for you. Bye now. I look forward to seeing you, your sponsor, and a pack of crystals later!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Where is your sponsor?
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Why are you here alone? Where's your sponsor? Don't you have one? Well... I can't help you without a sponsor. Go find one and then bring him by to see me.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Is that your sponsor? He does talk, doesn't he? Can you get him to talk to me? Hmm?
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Ah, there you are. Do you remember what I need? I need <font color="LEVEL">100 Crystals (A-grade)</font> to make your Apprentice's Ring. Did you bring them?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00245_ComeToMe 30847-13.htm">"Here are 100 Crystals (A-grade)."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Who are you? A sponsor? I don't know who you're sponsoring. Please visit me again with your apprentice, then we can talk.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Good work. I'm impressed by the way you and your apprentice work together. You make a good team. I'm glad to be able to provide this growth opportunity to the both of you. There might be a chance for you to increase your enlightenment, while I'm working on this. Now, I'll need some time to make the ring.<br>
Ah, I need to talk to your apprentice about this. Could you please let your apprentice know?
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Hmm... there aren't enough ingredients. I need <font color="LEVEL">100 Crystals: A grade</font> to make the ring.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Preparations to make the ring are now complete. It will just take me a little while to get this flame hot enough. While I'm working on this, I don't know if your sponsor mentioned it, but you can acquire increased enlightenment. Enlightenment while you wait! What could be better?<br>
All you need to do is to go to the <font color="LEVEL">Blazing Swamp</font> and catch <font color="LEVEL">Hames Orc Footsoldier, Hames Orc Sniper, Hames Orc Shaman, and Hames Orc Prefects</font>. Then, collect <font color="LEVEL">12 Crystals of Experience</font>. <font color="LEVEL">The trick, there's always a trick, is that you must kill them while your sponsor is watching. If you don't, you won't be able to find any Crystals of Experience.</font> Strange, I know. But that's just how it works. And, it gives you a wonderful opportunity to show off to your sponsor, or... if you need it... your sponsor can give you a helping hand. Go on now. Have a good time.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Head Blacksmith Ferris:<br>
Go to the <font color="LEVEL">Blazing Swamp</font> and catch <font color="LEVEL">Hames Orc Footsoldier, Hames Orc Sniper, Hames Orc Shaman, and Hames Orc Prefects</font>. Then, collect <font color="LEVEL">12 Crystals of Experience</font>. <font color="LEVEL">But... make sure that your sponsor is watching when you kill them, or you won't be able to find any Crystals of Experience.</font> There's some magical bonding mojo going on there. It makes for a great opportunity for team building. Have fun now!
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Head Blacksmith Ferris:<br>
Good work. Now, using these transference bellows, I can heat the Crystals of Experience and make this manifestation of your training become part of your essence. Hold still now!<br>
There we go! That's it! So, how do you feel? Do you feel the enlightenment? It tickles, doesn't it? I know it's not a huge amount, but every little bit helps you grow. Ah, and here is your ring. I got it finished while you were out collecting crystals. I hope it helps you in your future endeavors.
</body></html>

View File

@ -0,0 +1,296 @@
/*
* 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.Q00245_ComeToMe;
import java.util.Collection;
import com.l2jmobius.commons.util.CommonUtil;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.QuestType;
import com.l2jmobius.gameserver.instancemanager.MentorManager;
import com.l2jmobius.gameserver.model.L2Mentee;
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.util.Util;
/**
* Come To Me (245)
* @URL https://l2wiki.com/Come_to_Me
* @author Gigi
* @date 2017-08-18 - [13:01:14]
*/
public class Q00245_ComeToMe extends Quest
{
// NPC
private static final int FERRIS = 30847;
// Monsters
private final static int[] BLAZING_MOBS_1 = new int[]
{
21110, // Swamp Predator
21111 // Lava Wyrm
};
private final static int[] BLAZING_MOBS_2 = new int[]
{
21112, // Hames Orc Foot Soldier
21113, // Hames Orc Sniper
21115, // Hames Orc Shaman
21116 // Hames Orc Prefect
};
// Items
private final static int FLAME_ASHES = 30322;
private final static int CRYSTALS_OF_EXPERIENCE = 30323;
private final static int CRYSTAL_A = 1461;
private final static int MENTOR_RING = 30383;
private final static int ACADEMY_DYE_STR = 47205;
private final static int ACADEMY_DYE_WIT = 47210;
// Misc
private static final int MIN_LEVEL = 70;
private static final int MAX_LEVEL = 75;
public Q00245_ComeToMe()
{
super(245);
addStartNpc(FERRIS);
addTalkId(FERRIS);
addKillId(BLAZING_MOBS_1);
addKillId(BLAZING_MOBS_2);
addFirstTalkId(FERRIS);
registerQuestItems(FLAME_ASHES, CRYSTALS_OF_EXPERIENCE);
addCondLevel(MIN_LEVEL, MAX_LEVEL, "30847-02.htm");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (player.isMentor() && event.equals("30847-13.html"))
{
L2PcInstance mentee = getCurrentMentee(player);
if (mentee != null)
{
if (player.destroyItemByItemId("quest_245", CRYSTAL_A, 100, npc, true))
{
mentee.getQuestState(getName()).setCond(3, true);
return event;
}
return "30847-14.html";
}
return "30847-12.html";
}
QuestState st = getQuestState(player, false);
if (st == null)
{
return event;
}
else if (event.equals("30847-04.htm"))
{
st.startQuest();
}
else if (event.equals("30847-07.htm"))
{
st.set("talk", "1");
takeItems(player, FLAME_ASHES, -1);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
return event;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
if (st == null)
{
return htmltext;
}
if (npc.getId() == FERRIS)
{
switch (st.getState())
{
case State.CREATED:
{
if (player.isMentee() && player.isAcademyMember())
{
htmltext = "30847-01.htm";
}
else
{
htmltext = "30847-02.htm";
}
break;
}
case State.STARTED:
{
switch (st.getCond())
{
case 1:
{
htmltext = "30847-05.html";
break;
}
case 2:
{
if (!st.isSet("talk"))
{
htmltext = "30847-06.html";
}
else
{
if (player.isMentee())
{
L2PcInstance mentor = MentorManager.getInstance().getMentor(player.getObjectId()).getPlayerInstance();
if ((mentor != null) && mentor.isOnline() && Util.checkIfInRange(200, npc, mentor, true))
{
htmltext = "30847-10.html";
}
else
{
htmltext = "30847-08.html";
}
}
else
{
htmltext = "30847-09.html";
}
}
break;
}
case 3:
{
st.setCond(4, true);
htmltext = "30847-17.html";
break;
}
case 4:
{
htmltext = "30847-18.html";
break;
}
case 5:
{
if (player.getLevel() >= MIN_LEVEL)
{
if (player.isAcademyMember())
{
player.getClan().addReputationScore(500, true);
}
addExpAndSp(player, 2_018_733, 484);
giveItems(player, MENTOR_RING, 1);
giveItems(player, getRandom(ACADEMY_DYE_STR, ACADEMY_DYE_WIT), 10);
htmltext = "30847-19.html";
}
else
{
htmltext = getNoQuestLevelRewardMsg(player);
}
st.exitQuest(QuestType.ONE_TIME, true);
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = "30847-03.htm";
break;
}
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState st = getQuestState(killer, true);
if ((npc == null) || (st == null))
{
return super.onKill(npc, killer, isSummon);
}
if (st.getCond() == 1)
{
if (CommonUtil.contains(BLAZING_MOBS_1, npc.getId()) && (getRandom(100) < 50))
{
giveItems(killer, FLAME_ASHES, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, FLAME_ASHES) >= 15)
{
st.setCond(2, true);
}
}
}
else if (st.getCond() == 4)
{
if (CommonUtil.contains(BLAZING_MOBS_2, npc.getId()))
{
if (killer.isMentee())
{
L2PcInstance mentor = MentorManager.getInstance().getMentor(killer.getObjectId()).getPlayerInstance();
if ((mentor != null) && Util.checkIfInRange(500, killer, mentor, false))
{
giveItems(killer, CRYSTALS_OF_EXPERIENCE, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
if (getQuestItemsCount(killer, CRYSTALS_OF_EXPERIENCE) >= 12)
{
st.setCond(5, true);
}
}
}
}
}
return super.onKill(npc, killer, isSummon);
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
if (player.isMentor() && (npc.getId() == FERRIS))
{
final L2PcInstance mentee = getCurrentMentee(player);
if (mentee != null)
{
return "30847-11.html";
}
}
npc.showChatWindow(player);
return null;
}
private L2PcInstance getCurrentMentee(L2PcInstance mentor)
{
L2PcInstance mentee = null;
final Collection<L2Mentee> mentees = MentorManager.getInstance().getMentees(mentor.getObjectId());
for (L2Mentee pl : mentees)
{
if (pl.isOnline() && Util.checkIfInRange(400, mentor, pl.getPlayerInstance(), false))
{
final QuestState st = getQuestState(pl.getPlayerInstance(), true);
if ((st != null) && (st.getCond() == 2))
{
mentee = pl.getPlayerInstance();
}
}
}
return mentee;
}
}

View File

@ -94,6 +94,7 @@ import quests.Q00237_WindsOfChange.Q00237_WindsOfChange;
import quests.Q00238_SuccessFailureOfBusiness.Q00238_SuccessFailureOfBusiness;
import quests.Q00239_WontYouJoinUs.Q00239_WontYouJoinUs;
import quests.Q00240_ImTheOnlyOneYouCanTrust.Q00240_ImTheOnlyOneYouCanTrust;
import quests.Q00245_ComeToMe.Q00245_ComeToMe;
import quests.Q00254_LegendaryTales.Q00254_LegendaryTales;
import quests.Q00270_TheOneWhoEndsSilence.Q00270_TheOneWhoEndsSilence;
import quests.Q00278_HomeSecurity.Q00278_HomeSecurity;
@ -561,6 +562,7 @@ public class QuestMasterHandler
Q00238_SuccessFailureOfBusiness.class,
Q00239_WontYouJoinUs.class,
Q00240_ImTheOnlyOneYouCanTrust.class,
Q00245_ComeToMe.class,
Q00254_LegendaryTales.class,
Q00270_TheOneWhoEndsSilence.class,
Q00278_HomeSecurity.class,