From d5a85ec14c5009174bf07ccc6e7434d20f9ab85b Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 12 Aug 2015 12:48:47 +0000 Subject: [PATCH] Quest Request of the Seeker (10363). Contributed by spider. --- .../Q10363_RequestOfTheSeeker/33450-01.htm | 5 + .../Q10363_RequestOfTheSeeker/33450-02.htm | 6 + .../Q10363_RequestOfTheSeeker/33450-03.htm | 5 + .../Q10363_RequestOfTheSeeker/33450-04.html | 3 + .../Q10363_RequestOfTheSeeker/33450-05.html | 7 + .../Q10363_RequestOfTheSeeker/33450-06.html | 4 + .../Q10363_RequestOfTheSeeker/33451-01.html | 4 + .../Q10363_RequestOfTheSeeker/33451-02.html | 6 + .../Q10363_RequestOfTheSeeker/33451-03.html | 4 + .../Q10363_RequestOfTheSeeker.java | 214 ++++++++++++++++++ .../Q10363_RequestOfTheSeeker/no_level.htm | 3 + .../no_prequest.html | 2 + .../scripts/quests/QuestMasterHandler.java | 2 + .../gameserver/model/actor/L2Character.java | 71 +++--- .../model/actor/instance/L2PcInstance.java | 94 ++++++-- .../character/npc/OnNpcSocialActionSee.java | 10 +- .../gameserver/model/quest/Quest.java | 14 +- .../network/serverpackets/SocialAction.java | 5 + 18 files changed, 391 insertions(+), 68 deletions(-) create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-04.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-05.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-06.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-01.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-02.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-03.html create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/Q10363_RequestOfTheSeeker.java create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_level.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_prequest.html diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-01.htm b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-01.htm new file mode 100644 index 0000000000..a66a647f43 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-01.htm @@ -0,0 +1,5 @@ +Nagel:
+Do you hear that?
+I've heard noises every since I came to this damned place. It's not just me, either. Others have heard it, and it freaks us all out.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-02.htm b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-02.htm new file mode 100644 index 0000000000..b230813bda --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-02.htm @@ -0,0 +1,6 @@ +Nagel:
+Crying, that's what.
+I can hear the cries of the people who've died here... the cries of the soldiers who were sacrificed to defend heir families and friends...
+Please - stop their suffering.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-03.htm b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-03.htm new file mode 100644 index 0000000000..ba315f24aa --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-03.htm @@ -0,0 +1,5 @@ +Nagel:
+Thank you!
+Listen, you'll find the corpses beyond the cracked gap. You must show sorrow before five corpses, and show them that we grieve for them.
+(To show your grief, select a corpse, and open your Action Window(Alt+C), then click Sorrow.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-04.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-04.html new file mode 100644 index 0000000000..da6429f839 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-04.html @@ -0,0 +1,3 @@ +Nagel:
+You can find the corpses beyond the cracked gap. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-05.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-05.html new file mode 100644 index 0000000000..33b594d438 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-05.html @@ -0,0 +1,7 @@ +Nagel:
+Thank you!
+The pain will hopefully start to subside now... hopefully.
+Listen, I have one more favor to ask. The other rangers all knew I was suffering the most, and were all looking out for me, Celin especially.
+Could you tell Celin what's happened? I'd appreciate it...
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-06.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-06.html new file mode 100644 index 0000000000..b31e7a0a28 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-06.html @@ -0,0 +1,4 @@ +Nagel:
+Thank you!
+Celin is in Exploration Zone 3. Thank you again! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-01.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-01.html new file mode 100644 index 0000000000..efe44a767b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-01.html @@ -0,0 +1,4 @@ +Celin:
+Did you hear crying on your way here? I think the noises have died down, but mayby I'm finally getting used to them...
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-02.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-02.html new file mode 100644 index 0000000000..dfc37674e4 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-02.html @@ -0,0 +1,6 @@ +Celin:
+You have? Oh... oh thank you!
+Maybe now we can finally get some rest, and actually get some work done around here! The noises were so upsetting...
+Please, tell me how Nagel is? We all found it tough, but he dealt with everything much worse than the rest of us.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-03.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-03.html new file mode 100644 index 0000000000..e511e323b3 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-03.html @@ -0,0 +1,4 @@ +Celin:
+Good! I'm glad to hear that.
+He hadn't slept or eaten in days, you know. Carry on the way you've been going and you'll be a great ranger. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/Q10363_RequestOfTheSeeker.java b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/Q10363_RequestOfTheSeeker.java new file mode 100644 index 0000000000..2c8ac1d8b9 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/Q10363_RequestOfTheSeeker.java @@ -0,0 +1,214 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server 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 . + */ +package quests.Q10363_RequestOfTheSeeker; + +import quests.Q10362_CertificationOfTheSeeker.Q10362_CertificationOfTheSeeker; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.holders.ItemHolder; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; +import com.l2jserver.gameserver.network.NpcStringId; +import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; + +/** + * Request of the Seeker (10363) + * @author spider + */ +public class Q10363_RequestOfTheSeeker extends Quest +{ + // NPCs + private static final int NAGEL = 33450; + private static final int CELIN = 33451; + private static final int[] CORPSES = + { + 32961, + 32962, + 32963, + 32964 + }; + // Rewards + private static final int ADENA_REWARD = 48000; + private static final int EXP_REWARD = 72000; + private static final int SP_REWARD = 16; + private static final ItemHolder HEALING_POTIONS = new ItemHolder(1060, 100); + private static final ItemHolder WOODEN_HELMET = new ItemHolder(43, 1); + // Others + private static final int SORROW_ID = 13; + private static final int MIN_LEVEL = 12; + private static final int MAX_LEVEL = 20; + + public Q10363_RequestOfTheSeeker() + { + super(10363, Q10363_RequestOfTheSeeker.class.getSimpleName(), "Request of the Seeker"); + addStartNpc(NAGEL); + addTalkId(NAGEL, CELIN); + addSocialActionSeeId(CORPSES); + addCondLevel(MIN_LEVEL, MAX_LEVEL, "no_level.htm"); + addCondCompletedQuest(Q10362_CertificationOfTheSeeker.class.getSimpleName(), "no_prequest.html"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "33450-02.htm": + { + htmltext = event; + break; + } + case "33450-03.htm": // start quest + { + qs.startQuest(); + htmltext = event; + break; + } + case "33450-06.html": + { + if (qs.getCond() == 6) + { + qs.setCond(7); + htmltext = event; + } + break; + } + case "33451-02.html": + { + htmltext = event; + break; + } + case "33451-03.html": + { + if (qs.isCond(7)) + { + giveAdena(player, ADENA_REWARD, true); + addExpAndSp(player, EXP_REWARD, SP_REWARD); + giveItems(player, WOODEN_HELMET); + giveItems(player, HEALING_POTIONS); + qs.exitQuest(false, true); + htmltext = event; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = null; + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = npc.getId() == NAGEL ? "33450-01.htm" : getNoQuestMsg(player); + break; + } + case State.STARTED: + { + switch (qs.getCond()) + { + case 1: + { + htmltext = npc.getId() == NAGEL ? "33450-04.html" : getNoQuestMsg(player); + break; + } + case 6: + { + htmltext = npc.getId() == NAGEL ? "33450-05.html" : getNoQuestMsg(player); + break; + } + case 7: + { + htmltext = npc.getId() == NAGEL ? "33450-06.html" : "33451-01.html"; + break; + } + } + break; + } + case State.COMPLETED: + { + htmltext = getAlreadyCompletedMsg(player); + break; + } + } + return htmltext; + } + + @Override + public String onSocialActionSee(L2Npc npc, L2PcInstance caster, int actionId) + { + + final QuestState qs = getQuestState(caster, false); + if ((qs != null) && (qs.getCond() >= 1) && (qs.getCond() < 6) && (actionId == SORROW_ID) && (caster.getTarget().getObjectId() == npc.getObjectId())) + { + switch (qs.getCond()) + { + case 1: + { + showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_ONE_CORPSE, ExShowScreenMessage.TOP_CENTER, 5000); + qs.setCond(2); + npc.deleteMe(); + break; + } + case 2: + { + showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_SECOND_CORPSE, ExShowScreenMessage.TOP_CENTER, 5000); + qs.setCond(3); + npc.deleteMe(); + break; + } + case 3: + { + showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_THIRD_CORPSE, ExShowScreenMessage.TOP_CENTER, 5000); + qs.setCond(4); + npc.deleteMe(); + break; + } + case 4: + { + showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_FOURTH_CORPSE, ExShowScreenMessage.TOP_CENTER, 5000); + qs.setCond(5); + npc.deleteMe(); + break; + } + case 5: + { + showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_FIFTH_CORPSE, ExShowScreenMessage.TOP_CENTER, 5000); + qs.setCond(6); + npc.deleteMe(); + break; + } + } + } + return super.onSocialActionSee(npc, caster, actionId); + } +} diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_level.htm b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_level.htm new file mode 100644 index 0000000000..4a2589974c --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_level.htm @@ -0,0 +1,3 @@ +You don't meet level requirements
+(Quest available from level 10 to level 20) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_prequest.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_prequest.html new file mode 100644 index 0000000000..3343f3b538 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_prequest.html @@ -0,0 +1,2 @@ +To begin this quest, you need to complete Roles of the Seeker quest first. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java index f0cf72c187..fe41c518b7 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -206,6 +206,7 @@ import quests.Q10358_DividedSakumPoslof.Q10358_DividedSakumPoslof; import quests.Q10359_SakumsTrace.Q10359_SakumsTrace; import quests.Q10361_RolesOfTheSeeker.Q10361_RolesOfTheSeeker; import quests.Q10362_CertificationOfTheSeeker.Q10362_CertificationOfTheSeeker; +import quests.Q10363_RequestOfTheSeeker.Q10363_RequestOfTheSeeker; import quests.Q10365_SeekerEscort.Q10365_SeekerEscort; import quests.Q10368_RebellionOfMonsters.Q10368_RebellionOfMonsters; import quests.Q10390_KekropusLetter.Q10390_KekropusLetter; @@ -432,6 +433,7 @@ public class QuestMasterHandler Q10359_SakumsTrace.class, Q10361_RolesOfTheSeeker.class, Q10362_CertificationOfTheSeeker.class, + Q10363_RequestOfTheSeeker.class, Q10365_SeekerEscort.class, Q10368_RebellionOfMonsters.class, Q10390_KekropusLetter.class, diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java b/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java index 0caebc305a..2ecb481037 100644 --- a/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java +++ b/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java @@ -523,8 +523,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe /** * Remove the L2Character from the world when the decay task is launched.
- * Caution : This method DOESN'T REMOVE the object from _allObjects of L2World
- * Caution : This method DOESN'T SEND Server->Client packets to players + * Caution : This method DOESN'T REMOVE the object from _allObjects of L2World
Caution : This method DOESN'T SEND Server->Client packets to players */ public void onDecay() { @@ -3583,13 +3582,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe * A L2Character owns a table of Calculators called _calculators.
* Each Calculator (a calculator per state) own a table of Func object.
* A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).
- * Caution : This method is ONLY for L2PcInstance
- * Example of use: - * + * Caution : This method is ONLY for L2PcInstance
Example of use: * @param functions The list of Func objects to add to the Calculator corresponding to the state affected */ public final void addStatFuncs(List functions) @@ -3679,12 +3672,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe * A L2Character owns a table of Calculators called _calculators.
* Each Calculator (a calculator per state) own a table of Func object.
* A Func object is a mathematic function that permit to calculate the modifier of a state (ex : REGENERATE_HP_RATE...).
- * Caution : This method is ONLY for L2PcInstance
- * Example of use: - * + * Caution : This method is ONLY for L2PcInstance
Example of use: * @param functions The list of Func objects to add to the Calculator corresponding to the state affected */ public final void removeStatFuncs(AbstractFunction[] functions) @@ -4137,8 +4125,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe * That's why, client send regularly a Client->Server ValidatePosition packet to eventually correct the gap on the server.
* But, it's always the server position that is used in range calculation. At the end of the estimated movement time,
* the L2Character position is automatically set to the destination position even if the movement is not finished.
- * Caution: The current Z position is obtained FROM THE CLIENT by the Client->Server ValidatePosition Packet.
- * But x and y positions must be calculated to avoid that players try to modify their movement speed.
+ * Caution: The current Z position is obtained FROM THE CLIENT by the Client->Server ValidatePosition Packet.
But x and y positions must be calculated to avoid that players try to modify their movement speed.
* @return True if the movement is finished */ public boolean updatePosition() @@ -4220,7 +4207,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe double delta = (dx * dx) + (dy * dy); if ((delta < 10000) && ((dz * dz) > 2500) // close enough, allows error between client and server geodata if it cannot be avoided - && !isFloating) + && !isFloating) { delta = Math.sqrt(delta); } @@ -4429,11 +4416,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe *
  • Add the L2Character to movingObjects of the GameTimeController
  • *
  • Create a task to notify the AI that L2Character arrives at a check point of the movement
  • * - * Caution: This method DOESN'T send Server->Client packet MoveToPawn/CharMoveToLocation.
    - * Example of use: - *