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 index a66a647f43..2e66392d56 100644 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-01.htm +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-01.htm @@ -1,5 +1,5 @@ Nagel:
-Do you hear that?
+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 index b230813bda..23c2eeab18 100644 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-02.htm +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-02.htm @@ -1,6 +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...
+I can hear the cries of the people who've died here... the cries of the soldiers who were sacrificed to defend their 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 index ba315f24aa..232f7a4ae5 100644 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-03.htm +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-03.htm @@ -1,5 +1,6 @@ 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.) +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.
+You must not smile or dance. Remember that.
+(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 index da6429f839..8f11cc2394 100644 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-04.html +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-04.html @@ -1,3 +1,3 @@ Nagel:
-You can find the corpses beyond the cracked gap. +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 index 33b594d438..95ec36a859 100644 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-05.html +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-05.html @@ -1,7 +1,7 @@ Nagel:
-Thank you!
+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.
+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 index b31e7a0a28..e640ef3fcf 100644 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-06.html +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-06.html @@ -1,4 +1,4 @@ Nagel:
-Thank you!
+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/33450-07.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-07.html new file mode 100644 index 0000000000..5b6ae20d2f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-07.html @@ -0,0 +1,4 @@ +Nagel:
+The sounds haven't gone away, but at least they are much quieter now than they were before.
+(You have already completed the quest) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-08.htm b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-08.htm new file mode 100644 index 0000000000..9904108c4f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33450-08.htm @@ -0,0 +1,4 @@ +Nagel:
+Please... help us.
+(Only characters between level 10-20, and who have completed the "Verification of Ranger" quest, may start this quest) + \ 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 index efe44a767b..ccdbeede97 100644 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-01.html +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-01.html @@ -1,4 +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...
- +Did you hear crying on your way here? I think the noises have died down, but maybe 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 index dfc37674e4..6c9ea53f40 100644 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-02.html +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-02.html @@ -1,6 +1,6 @@ Celin:
-You have? Oh... oh thank you!
+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-04.html b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-04.html new file mode 100644 index 0000000000..0e950698f8 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/33451-04.html @@ -0,0 +1,4 @@ +Celin:
+Things are much better now, all thanks to you!
+(The quest has already been completed) + \ 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 index 7b27e9f189..6ea3ee596c 100644 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/Q10363_RequestOfTheSeeker.java +++ b/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/Q10363_RequestOfTheSeeker.java @@ -16,6 +16,7 @@ */ package quests.Q10363_RequestOfTheSeeker; +import com.l2jmobius.gameserver.model.Location; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.holders.ItemHolder; @@ -29,7 +30,7 @@ import quests.Q10362_CertificationOfTheSeeker.Q10362_CertificationOfTheSeeker; /** * Request of the Seeker (10363) - * @author spider + * @author spider, gyo */ public class Q10363_RequestOfTheSeeker extends Quest { @@ -43,16 +44,25 @@ public class Q10363_RequestOfTheSeeker extends Quest 32963, 32964 }; + // Monsters + private static final int CRAWLER = 22991; + private static final int STALKER = 22992; + private static final int RESURRECTED_VENGEFUL_SPIRIT1 = 19157; + private static final int RESURRECTED_VENGEFUL_SPIRIT2 = 19158; // 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); + // Social Action IDs + private static final int LAUGH = 10; + private static final int DANCE = 12; + private static final int SORROW = 13; // Others - private static final int SORROW_ID = 13; private static final int MIN_LEVEL = 12; private static final int MAX_LEVEL = 20; + private static final int distanceLimit = 70; public Q10363_RequestOfTheSeeker() { @@ -60,8 +70,8 @@ public class Q10363_RequestOfTheSeeker extends Quest addStartNpc(NAGEL); addTalkId(NAGEL, CELIN); addSocialActionSeeId(CORPSES); - addCondLevel(MIN_LEVEL, MAX_LEVEL, "no_level.htm"); - addCondCompletedQuest(Q10362_CertificationOfTheSeeker.class.getSimpleName(), "no_prequest.html"); + addCondLevel(MIN_LEVEL, MAX_LEVEL, "33450-08.htm"); + addCondCompletedQuest(Q10362_CertificationOfTheSeeker.class.getSimpleName(), "33450-08.htm"); } @Override @@ -114,6 +124,11 @@ public class Q10363_RequestOfTheSeeker extends Quest } break; } + case "life_over": + { + npc.deleteMe(); + return null; + } } return htmltext; } @@ -135,6 +150,10 @@ public class Q10363_RequestOfTheSeeker extends Quest switch (qs.getCond()) { case 1: + case 2: + case 3: + case 4: + case 5: { htmltext = npc.getId() == NAGEL ? "33450-04.html" : getNoQuestMsg(player); break; @@ -154,7 +173,7 @@ public class Q10363_RequestOfTheSeeker extends Quest } case State.COMPLETED: { - htmltext = getAlreadyCompletedMsg(player); + htmltext = npc.getId() == NAGEL ? "33450-07.html" : "33451-04.html"; break; } } @@ -164,47 +183,107 @@ public class Q10363_RequestOfTheSeeker extends Quest @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())) + if ((caster == null) || (npc == null)) { - switch (qs.getCond()) + return super.onSocialActionSee(npc, caster, actionId); + } + if ((caster.getTarget() == null) || !caster.getTarget().isNpc()) + { + return super.onSocialActionSee(npc, caster, actionId); + } + + final double distance = caster.calculateDistance(caster.getTarget().getLocation(), true, false); + final QuestState qs = getQuestState(caster, false); + if (actionId == SORROW) + { + if (distance > distanceLimit) { - case 1: + showOnScreenMsg(caster, NpcStringId.YOU_ARE_TOO_FAR_FROM_THE_CORPSE_TO_SHOW_YOUR_CONDOLENCES, ExShowScreenMessage.TOP_CENTER, 10000); + npc.deleteMe(); + } + else if (qs != null) + { + switch (qs.getCond()) { - 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; + case 1: + { + showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_ONE_CORPSE, ExShowScreenMessage.TOP_CENTER, 10000); + qs.setCond(2, true); + npc.deleteMe(); + break; + } + case 2: + { + showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_SECOND_CORPSE, ExShowScreenMessage.TOP_CENTER, 10000); + qs.setCond(3, true); + npc.deleteMe(); + break; + } + case 3: + { + showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_THIRD_CORPSE, ExShowScreenMessage.TOP_CENTER, 10000); + qs.setCond(4, true); + npc.deleteMe(); + break; + } + case 4: + { + showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_FOURTH_CORPSE, ExShowScreenMessage.TOP_CENTER, 10000); + qs.setCond(5, true); + npc.deleteMe(); + break; + } + case 5: + { + showOnScreenMsg(caster, NpcStringId.YOU_VE_SHOWN_YOUR_CONDOLENCES_TO_A_FIFTH_CORPSE, ExShowScreenMessage.TOP_CENTER, 10000); + qs.setCond(6, true); + npc.deleteMe(); + break; + } + default: + { + showOnScreenMsg(caster, NpcStringId.GRUDGE_OF_YE_SAGIRA_VICTIMS_HAVE_BEEN_RELIEVED_WITH_YOUR_TEARS, ExShowScreenMessage.TOP_CENTER, 10000); + npc.deleteMe(); + break; + } } } + else + { + showOnScreenMsg(caster, NpcStringId.GRUDGE_OF_YE_SAGIRA_VICTIMS_HAVE_BEEN_RELIEVED_WITH_YOUR_TEARS, ExShowScreenMessage.TOP_CENTER, 10000); + npc.deleteMe(); + } + } + else if ((actionId == LAUGH) || (actionId == DANCE)) + { + if (distance > distanceLimit) + { + showOnScreenMsg(caster, NpcStringId.YOU_ARE_TOO_FAR_FROM_THE_CORPSE, ExShowScreenMessage.TOP_CENTER, 10000); + npc.deleteMe(); + } + else if ((qs == null) || (qs.getState() != State.STARTED)) + { + addSpawn(getRandom(1) == 0 ? CRAWLER : STALKER, npc.getLocation()); + npc.deleteMe(); + } + else + { + showOnScreenMsg(caster, NpcStringId.DON_T_TOY_WITH_THE_DEAD, ExShowScreenMessage.TOP_CENTER, 10000); + L2Npc Spirit1 = addSpawn(RESURRECTED_VENGEFUL_SPIRIT1, new Location(caster.getX() - getRandom(100), caster.getY() - getRandom(100), caster.getZ(), 0)); + Spirit1.setCurrentHp(Spirit1.getMaxHp() / 2); + addAttackDesire(Spirit1, caster); + startQuestTimer("life_over", 20000, Spirit1, caster); + L2Npc Spirit2 = addSpawn(RESURRECTED_VENGEFUL_SPIRIT2, new Location(caster.getX() - getRandom(100), caster.getY() - getRandom(100), caster.getZ(), 0)); + Spirit2.setCurrentHp(Spirit2.getMaxHp() / 2); + addAttackDesire(Spirit2, caster); + startQuestTimer("life_over", 20000, Spirit2, caster); + npc.deleteMe(); + } + } + else + { + addSpawn(getRandom(1) == 0 ? CRAWLER : STALKER, ((L2Npc) caster.getTarget()).getLocation()); + npc.deleteMe(); } 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 deleted file mode 100644 index 4a2589974c..0000000000 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_level.htm +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 3343f3b538..0000000000 --- a/trunk/dist/game/data/scripts/quests/Q10363_RequestOfTheSeeker/no_prequest.html +++ /dev/null @@ -1,2 +0,0 @@ -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/stats/npcs/19100-19199.xml b/trunk/dist/game/data/stats/npcs/19100-19199.xml index d61066b6a5..35f8000bcd 100644 --- a/trunk/dist/game/data/stats/npcs/19100-19199.xml +++ b/trunk/dist/game/data/stats/npcs/19100-19199.xml @@ -1409,9 +1409,10 @@ - + HUMANOID + @@ -1420,12 +1421,12 @@ - - + + 333 - + @@ -1435,9 +1436,10 @@ - + HUMAN + @@ -1446,12 +1448,12 @@ - - + + 333 - + diff --git a/trunk/dist/game/data/stats/npcs/32900-32999.xml b/trunk/dist/game/data/stats/npcs/32900-32999.xml index 3f18f86040..183256850f 100644 --- a/trunk/dist/game/data/stats/npcs/32900-32999.xml +++ b/trunk/dist/game/data/stats/npcs/32900-32999.xml @@ -1541,7 +1541,7 @@ 398 - + @@ -1566,7 +1566,7 @@ 398 - + @@ -1591,7 +1591,7 @@ 398 - + @@ -1616,7 +1616,7 @@ 398 - + diff --git a/trunk/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/trunk/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 2207242de3..2865dd54bd 100644 --- a/trunk/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/trunk/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -6655,17 +6655,10 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe return; } - final Collection objs = getKnownList().getKnownObjects().values(); - for (L2Object npc : objs) + L2Object target = getTarget(); + if ((target != null) && target.isNpc()) { - if ((npc != null) && npc.isNpc()) - { - final L2Npc npcMob = (L2Npc) npc; - if (npcMob.isInsideRadius(this, 150, true, true)) // 150 radius? - { - EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee(npcMob, getActingPlayer(), id), npcMob); - } - } + EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee((L2Npc) target, getActingPlayer(), id), (L2Npc) target); } } diff --git a/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 2c14fe0802..bcc5718aae 100644 --- a/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/trunk/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -4372,17 +4372,10 @@ public final class L2PcInstance extends L2Playable public final void broadcastPacket(SocialAction sa) { - final Collection objs = getKnownList().getKnownObjects().values(); - for (L2Object npc : objs) + L2Object target = getTarget(); + if ((target != null) && target.isNpc()) { - if ((npc != null) && npc.isNpc()) - { - final L2Npc npcMob = (L2Npc) npc; - if (npcMob.isInsideRadius(this, 100, true, true)) // 150 radius? - { - EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee(npcMob, getActingPlayer(), sa.getId()), npcMob); - } - } + EventDispatcher.getInstance().notifyEventAsync(new OnNpcSocialActionSee((L2Npc) target, getActingPlayer(), sa.getId()), (L2Npc) target); } broadcastPacket((L2GameServerPacket) sa); }