From 29042a9311d5156472b9d5a42fe4c644f01c0d30 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 28 May 2017 18:37:26 +0000 Subject: [PATCH] Reworked some scripts. Contributed by Stayway, gigilo1968. --- .../gameserver/model/actor/L2Character.java | 2 +- .../impl/character/OnCreatureAttacked.java | 10 +- .../gameserver/network/NpcStringId.java | 22 ++ .../LargeCocoon/LargeCocoon.java | 2 +- .../areas/TalkingIsland/Toyron/33004-01.html | 3 +- .../areas/TalkingIsland/Toyron/33004-02.html | 4 +- .../ai/areas/TalkingIsland/Toyron/33004.html | 7 +- .../ai/areas/TalkingIsland/Toyron/Toyron.java | 15 +- .../instances/MuseumDungeon/33126-01.html | 3 +- .../MuseumDungeon/MuseumDungeon.java | 309 +++++++++++------- .../Q10320_LetsGoToTheCentralSquare.java | 6 +- .../{32975-03.html => 32975-03.htm} | 0 .../Q10321_QualificationsOfTheSeeker.java | 8 +- .../32972-01.htm | 5 - .../32972-02.htm | 5 - .../32972-03.html | 6 - .../32972-04.html | 5 - .../32972-05.html | 4 - .../32972-06.html | 5 - .../32972-07.html | 6 - .../32972-08.html | 4 - .../32972-09.html | 4 - ...10327_IntruderWhoWantsTheBookOfGiants.java | 131 -------- .../Q10541_TrainLikeTheRealThing.java | 42 ++- .../Q10542_SearchingForNewPower/32974-01.htm | 2 +- .../Q10542_SearchingForNewPower/32974-02.htm | 2 +- .../Q10542_SearchingForNewPower/32974-04.htm | 5 + .../Q10542_SearchingForNewPower/32974-04.html | 6 - .../Q10542_SearchingForNewPower/32974-05.html | 6 +- .../Q10542_SearchingForNewPower/32974-06.html | 5 +- .../Q10542_SearchingForNewPower/32974-07.html | 4 + .../Q10542_SearchingForNewPower/32974-08.html | 3 + .../Q10542_SearchingForNewPower/33004-01.html | 6 + .../Q10542_SearchingForNewPower/33004-02.html | 4 + .../Q10542_SearchingForNewPower/33004-03.html | 4 + .../Q10542_SearchingForNewPower.java | 157 +++++++-- .../Q10543_SheddingWeight.java | 14 +- .../scripts/quests/QuestMasterHandler.java | 2 - .../TalkingIsland/TalkingIslandVillage.xml | 1 + .../gameserver/model/actor/L2Character.java | 2 +- .../impl/character/OnCreatureAttacked.java | 10 +- .../gameserver/network/NpcStringId.java | 22 ++ .../LargeCocoon/LargeCocoon.java | 2 +- .../gameserver/model/actor/L2Character.java | 2 +- .../impl/character/OnCreatureAttacked.java | 10 +- 45 files changed, 487 insertions(+), 390 deletions(-) rename L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/{32975-03.html => 32975-03.htm} (100%) delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-01.htm delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-02.htm delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-03.html delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.html delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.html delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.html delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.html delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.html delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-09.html delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/Q10327_IntruderWhoWantsTheBookOfGiants.java create mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-04.htm delete mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-04.html create mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-07.html create mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-08.html create mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-01.html create mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-02.html create mode 100644 L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-03.html diff --git a/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 71ee3f02eb..8f7e8cea75 100644 --- a/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -963,7 +963,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } // Notify to scripts - final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target), target, TerminateReturn.class); + final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target, null), target, TerminateReturn.class); if ((attackedReturn != null) && attackedReturn.terminate()) { getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); diff --git a/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java b/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java index cd8f222119..518e4a550a 100644 --- a/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java +++ b/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java @@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.events.impl.character; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.IBaseEvent; +import com.l2jmobius.gameserver.model.skills.Skill; /** * An instantly executed event when L2Character is attacked by L2Character. @@ -28,11 +29,13 @@ public class OnCreatureAttacked implements IBaseEvent { private final L2Character _attacker; private final L2Character _target; + private final Skill _skill; - public OnCreatureAttacked(L2Character attacker, L2Character target) + public OnCreatureAttacked(L2Character attacker, L2Character target, Skill skill) { _attacker = attacker; _target = target; + _skill = skill; } public final L2Character getAttacker() @@ -45,6 +48,11 @@ public class OnCreatureAttacked implements IBaseEvent return _target; } + public final Skill getSkill() + { + return _skill; + } + @Override public EventType getType() { diff --git a/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/network/NpcStringId.java b/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/network/NpcStringId.java index 50d733ed00..c2d74b9c75 100644 --- a/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/network/NpcStringId.java +++ b/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/network/NpcStringId.java @@ -13671,6 +13671,24 @@ public final class NpcStringId @ClientString(id = 554107, message = "Defeating the Scarecrow") public static NpcStringId DEFEATING_THE_SCARECROW; + @ClientString(id = 554210, message = "Preapare to use the skill 'Power Strike' or 'Mortal Blow'") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_MORTAL_BLOW; + + @ClientString(id = 554211, message = "Preapare to use the skill 'Wind Strike'") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_WIND_STRIKE; + + @ClientString(id = 554212, message = "Prepare to use the skill ‘Power Strike' or ‘Iron Punch") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_IRON_PUNCH; + + @ClientString(id = 554213, message = "Prepare to use the skill ‘Chill Flame'") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_CHILL_FLAME; + + @ClientString(id = 554214, message = "Prepare to use the skill ‘Spoil'") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_SPOIL; + + @ClientString(id = 554215, message = "Prepare to use the skill ‘Fallen Attack' or ‘Fallen Arrow'") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_FALLEN_ATTACK_OR_FALLEN_ARROW; + @ClientString(id = 570101, message = "The Road to Destruction (Above Lv. 93)") public static NpcStringId THE_ROAD_TO_DESTRUCTION_ABOVE_LV_93; @@ -31901,9 +31919,13 @@ public final class NpcStringId @ClientString(id = 1803275, message = "If the story is still in progress, I can tell it again.") public static NpcStringId IF_THE_STORY_IS_STILL_IN_PROGRESS_I_CAN_TELL_IT_AGAIN; + @ClientString(id = 1803329, message = "Speak with the ‘Adventurers' Guide for Training'.") public static NpcStringId SPEAK_WITH_THE_ADVENTURERS_GUIDE_FOR_TRAINING; + @ClientString(id = 1803330, message = "Speak with Toyron in order to return to Shannon.") + public static NpcStringId SPEAK_WITH_TOYRON_IN_ORDER_TO_RETURN_SHANNON; + @ClientString(id = 1810363, message = "You are too far from the corpse.") public static NpcStringId YOU_ARE_TOO_FAR_FROM_THE_CORPSE; diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/FairySettlement/LargeCocoon/LargeCocoon.java b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/FairySettlement/LargeCocoon/LargeCocoon.java index e3fa1a1f7e..2e319b311b 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/FairySettlement/LargeCocoon/LargeCocoon.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/FairySettlement/LargeCocoon/LargeCocoon.java @@ -66,7 +66,7 @@ public final class LargeCocoon extends AbstractNpcAI { case "attack": { - onCreatureAttacked(new OnCreatureAttacked(player, npc)); + onCreatureAttacked(new OnCreatureAttacked(player, npc, null)); break; } case "attackPowerful": diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004-01.html b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004-01.html index fb814cf24f..4dddad5fe5 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004-01.html +++ b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004-01.html @@ -1,3 +1,4 @@ Toyron:
-You! Aren't you here to find the book? +Alright now, let's search for the intruder. It appears it's the Giant's Book he is after. Let us search around the bookshelf.
+Keep the tension up while searching, as the intruder may suddenly show himself. \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004-02.html b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004-02.html index aba7b39895..5b1c6cf5f1 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004-02.html +++ b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004-02.html @@ -1,4 +1,4 @@ Toyron:
-They're destroying the holy museum!
-Defeat them! +We cannot let the intruder be. Let us find him, and slay him.
+The intruder will not be easy to take down. Please use skills to bring him down. \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004.html b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004.html index ce11fbe758..49f22c2736 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004.html +++ b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/33004.html @@ -1,5 +1,6 @@ Toyron:
This museum displays the Giants' relics. Unfortunately, it's sometimes plagued by thieves.
-There are always more. We still uncover treasures in their ruins.
- - \ No newline at end of file +The Giants disappeared long ago, but we still uncover treasures in their ruins, even now.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/Toyron.java b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/Toyron.java index d18cf794b4..f87713baa1 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/Toyron.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/ai/areas/TalkingIsland/Toyron/Toyron.java @@ -24,7 +24,7 @@ import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.quest.QuestState; import ai.AbstractNpcAI; -import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants; +import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower; /** * Toyron AI. @@ -37,7 +37,7 @@ public final class Toyron extends AbstractNpcAI // Misc private static final int TEMPLATE_ID = 182; // Location - private static final Location MUSEUM_OUT = new Location(-114359, 260120, -1192); + private static final Location MUSEUM_OUT = new Location(-111464, 255828, -1440); private Toyron() { @@ -57,7 +57,10 @@ public final class Toyron extends AbstractNpcAI { world.finishInstance(0); } - player.teleToLocation(MUSEUM_OUT); + else + { + player.teleToLocation(MUSEUM_OUT); + } } return super.onAdvEvent(event, npc, player); } @@ -76,15 +79,15 @@ public final class Toyron extends AbstractNpcAI final Instance world = npc.getInstanceWorld(); if ((world != null) && (world.getTemplateId() == TEMPLATE_ID)) { - final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName()); + final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName()); if (qs != null) { switch (qs.getCond()) { - case 1: + case 3: htmltext = "33004-01.html"; break; - case 2: + case 4: htmltext = "33004-02.html"; break; } diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html b/L2J_Mobius_Helios/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html index 565454c2aa..2290c9073b 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html +++ b/L2J_Mobius_Helios/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html @@ -1,3 +1,4 @@ [Desk]:
-You've found The War of Gods and Giants. Take it back to Pantheon. +You've found The War of Gods and Giants. +Found It! \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java b/L2J_Mobius_Helios/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java index e1cf0c7526..294cf9b456 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java @@ -19,7 +19,9 @@ package instances.MuseumDungeon; import java.util.List; import com.l2jmobius.gameserver.enums.ChatType; +import com.l2jmobius.gameserver.model.StatsSet; import com.l2jmobius.gameserver.model.actor.L2Attackable; +import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.events.EventType; @@ -27,7 +29,11 @@ import com.l2jmobius.gameserver.model.events.ListenerRegisterType; import com.l2jmobius.gameserver.model.events.annotations.Id; import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent; import com.l2jmobius.gameserver.model.events.annotations.RegisterType; +import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureAttacked; +import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDamageReceived; import com.l2jmobius.gameserver.model.events.impl.character.OnCreatureDeath; +import com.l2jmobius.gameserver.model.events.returns.DamageReturn; +import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.instancezone.Instance; import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.skills.Skill; @@ -35,7 +41,7 @@ import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; import instances.AbstractInstance; -import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants; +import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower; /** * Museum Dungeon Instance Zone. @@ -44,14 +50,17 @@ import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheB public final class MuseumDungeon extends AbstractInstance { // NPCs - private static final int PANTHEON = 32972; + private static final int SHANNON = 32974; private static final int TOYRON = 33004; private static final int DESK = 33126; private static final int THIEF = 23121; // Items private static final int THE_WAR_OF_GODS_AND_GIANTS = 17575; + // Skills + private static final SkillHolder SPOIL = new SkillHolder(254, 1); // Misc private static final int TEMPLATE_ID = 182; + private static final double DAMAGE_BY_SKILL = 0.5d; private static final NpcStringId[] THIEF_SHOUT = { @@ -62,9 +71,9 @@ public final class MuseumDungeon extends AbstractInstance public MuseumDungeon() { super(TEMPLATE_ID); - addStartNpc(PANTHEON); + addStartNpc(SHANNON); addFirstTalkId(DESK); - addTalkId(PANTHEON, TOYRON); + addTalkId(SHANNON, TOYRON); addAttackId(THIEF); } @@ -86,19 +95,30 @@ public final class MuseumDungeon extends AbstractInstance toyron.setCanReturnToSpawnPoint(false); } - final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName()); + final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName()); if (qs != null) { - if (qs.isCond(1)) + switch (qs.getCond()) { - showOnScreenMsg(player, NpcStringId.AMONG_THE_4_BOOKSHELVES_FIND_THE_ONE_CONTAINING_A_VOLUME_CALLED_THE_WAR_OF_GODS_AND_GIANTS, ExShowScreenMessage.TOP_CENTER, 4500); - } - else if (qs.isCond(2)) - { - startQuestTimer("TOYRON_FOLLOW", 500, toyron, player); - if (instance.getNpcs(THIEF).isEmpty()) + case 1: { - startQuestTimer("SPAWN_THIEFS_STAGE_2", 500, null, player); + qs.setCond(2, true); + break; + } + case 3: + { + showOnScreenMsg(player, NpcStringId.AMONG_THE_4_BOOKSHELVES_FIND_THE_ONE_CONTAINING_A_VOLUME_CALLED_THE_WAR_OF_GODS_AND_GIANTS, ExShowScreenMessage.TOP_CENTER, 4500); + break; + } + case 4: + { + getTimers().addTimer("TOYRON_FOLLOW", 1500, toyron, player); + toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHEN_DID_THEY_GET_IN_HERE); + + if (instance.getNpcs(THIEF).isEmpty()) + { + instance.spawnGroup("thiefs").forEach(npc -> npc.setIsRunning(true)); + } } } } @@ -111,116 +131,150 @@ public final class MuseumDungeon extends AbstractInstance { enterInstance(player, npc, TEMPLATE_ID); } - else - { - final Instance world = player.getInstanceWorld(); - if (world != null) - { - switch (event) - { - case "TOYRON_FOLLOW": - { - npc.getAI().startFollow(player); - break; - } - case "SPAWN_THIEFS_STAGE_1": - { - final List thiefs = world.spawnGroup("thiefs"); - for (L2Npc thief : thiefs) - { - thief.setIsRunning(true); - addAttackPlayerDesire(thief, player); - thief.broadcastSay(ChatType.NPC_GENERAL, THIEF_SHOUT[getRandom(2)]); - } - final L2Npc toyron = world.getNpc(TOYRON); - toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHEN_DID_THEY_GET_IN_HERE); - startQuestTimer("TOYRON_MSG_1", 2500, toyron, player); - startQuestTimer("SKILL_MSG", 4500, toyron, player); - break; - } - case "SPAWN_THIEFS_STAGE_2": - { - final List thiefs = world.spawnGroup("thiefs"); - for (L2Npc thief : thiefs) - { - thief.setIsRunning(true); - } - break; - } - case "SKILL_MSG": - { - showOnScreenMsg(player, NpcStringId.USE_YOUR_SKILL_ATTACKS_AGAINST_THEM, ExShowScreenMessage.TOP_CENTER, 4500); - break; - } - case "TOYRON_MSG_1": - { - npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOUR_NORMAL_ATTACKS_AREN_T_WORKING); - startQuestTimer("TOYRON_MSG_2", 2500, npc, player); - break; - } - case "TOYRON_MSG_2": - { - npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LOOKS_LIKE_ONLY_SKILL_BASED_ATTACKS_DAMAGE_THEM); - break; - } - } - } - } return super.onAdvEvent(event, npc, player); } - @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { - final Instance world = npc.getInstanceWorld(); - if (world == null) - { - return null; - } - - String htmltext = null; - final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName()); - if ((qs == null) || qs.isCond(2)) - { - htmltext = "33126.html"; - } - else if (qs.isCond(1)) - { - if (npc.getVariables().getBoolean("book", false) && !hasQuestItems(player, THE_WAR_OF_GODS_AND_GIANTS)) - { - qs.setCond(2); - giveItems(player, THE_WAR_OF_GODS_AND_GIANTS, 1); - showOnScreenMsg(player, NpcStringId.WATCH_OUT_YOU_ARE_BEING_ATTACKED, ExShowScreenMessage.TOP_CENTER, 4500); - htmltext = "33126-01.html"; - - final L2Npc toyron = world.getNpc(TOYRON); - startQuestTimer("SPAWN_THIEFS_STAGE_1", 500, null, player); - startQuestTimer("TOYRON_FOLLOW", 500, toyron, player); - } - else - { - htmltext = "33126-02.html"; - } - } - return htmltext; - } - @Override public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill) { - final Instance instance = npc.getInstanceWorld(); - if (instance != null) + if (skill == null) { - final L2Npc toyron = instance.getNpc(TOYRON); - if (!toyron.isInCombat()) + showOnScreenMsg(attacker, NpcStringId.USE_YOUR_SKILL_ATTACKS_AGAINST_THEM, ExShowScreenMessage.TOP_CENTER, 2500); + } + return onAttack(npc, attacker, damage, isSummon); + } + + @Override + public void onTimerEvent(String event, StatsSet params, L2Npc npc, L2PcInstance player) + { + final Instance instance = npc.getInstanceWorld(); + final L2Attackable toyron = (L2Attackable) instance.getNpc(TOYRON); + if (isInInstance(instance)) + { + switch (event) { - toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ENOUGH_OF_THIS_COME_AT_ME); - toyron.reduceCurrentHp(1, npc, null); // TODO: Find better way for attack - npc.reduceCurrentHp(1, toyron, null); - startQuestTimer("TOYRON_FOLLOW", 3000, toyron, attacker); + case "TOYRON_FOLLOW": + { + toyron.getAI().startFollow(player); + toyron.setIsRunning(true); + break; + } + case "SPAWN_THIEFS_STAGE_1": + { + instance.spawnGroup("thiefs").forEach(thief -> + { + thief.setIsRunning(true); + addAttackPlayerDesire(thief, player); + thief.broadcastSay(ChatType.NPC_GENERAL, THIEF_SHOUT[getRandom(2)]); + }); + toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WHEN_DID_THEY_GET_IN_HERE); + getTimers().addRepeatingTimer("TOYRON_MSG_1", 10000, toyron, player); + getTimers().addRepeatingTimer("TOYRON_MSG_2", 12500, toyron, player); + break; + } + case "TOYRON_MSG_1": + { + npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOUR_NORMAL_ATTACKS_AREN_T_WORKING); + break; + } + case "TOYRON_MSG_2": + { + npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.LOOKS_LIKE_ONLY_SKILL_BASED_ATTACKS_DAMAGE_THEM); + break; + } + case "THIEF_DIE": + { + toyron.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.ENOUGH_OF_THIS_COME_AT_ME); + break; + } } } - return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + final Instance instance = npc.getInstanceWorld(); + String htmltext = null; + if (isInInstance(instance)) + { + final L2Npc toyron = instance.getNpc(TOYRON); + + final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName()); + if ((qs == null) || qs.isCond(4) || qs.isCond(5)) + { + htmltext = "33126.html"; + } + else if (qs.isCond(3)) + { + if (npc.getVariables().getBoolean("book", false) && !hasQuestItems(player, THE_WAR_OF_GODS_AND_GIANTS)) + { + qs.setCond(4, true); + giveItems(player, THE_WAR_OF_GODS_AND_GIANTS, 1); + showOnScreenMsg(player, NpcStringId.WATCH_OUT_YOU_ARE_BEING_ATTACKED, ExShowScreenMessage.TOP_CENTER, 4500, true); + getTimers().addTimer("SPAWN_THIEFS_STAGE_1", 1000, npc, player); + getTimers().addTimer("TOYRON_FOLLOW", 1000, toyron, player); + htmltext = "33126-01.html"; + } + else + { + htmltext = "33126-02.html"; + } + } + } + return htmltext; + } + + @RegisterEvent(EventType.ON_CREATURE_ATTACKED) + @RegisterType(ListenerRegisterType.NPC) + @Id(THIEF) + public void onCreatureAttacked(OnCreatureAttacked event) + { + final L2Character creature = event.getAttacker(); + final L2Npc npc = (L2Npc) event.getTarget(); + final Skill skill = event.getSkill(); + final Instance instance = npc.getInstanceWorld(); + + if (isInInstance(instance) && !creature.isPlayer() && npc.isScriptValue(1)) + { + getTimers().addTimer("THIEF_DIE", 500, npc, null); + } + else if (isInInstance(instance) && creature.isPlayer() && (skill == SPOIL.getSkill()) && npc.isScriptValue(0)) + { + final L2Npc toyron = instance.getNpc(TOYRON); + addAttackDesire(toyron, npc); + npc.setScriptValue(1); + } + } + + @RegisterEvent(EventType.ON_CREATURE_DAMAGE_RECEIVED) + @RegisterType(ListenerRegisterType.NPC) + @Id(THIEF) + public DamageReturn onCreatureDamageReceived(OnCreatureDamageReceived event) + { + final L2Character target = event.getTarget(); + if (target.isNpc() && event.getAttacker().isPlayer()) + { + final L2PcInstance player = event.getAttacker().getActingPlayer(); + final Instance instance = player.getInstanceWorld(); + if (isInInstance(instance)) + { + final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName()); + if ((qs != null) && qs.isCond(4)) + { + if (event.getSkill() == null) + { + return new DamageReturn(true, true, true, 0); + } + + final L2Npc toyron = instance.getNpc(TOYRON); + addAttackDesire(toyron, target); + ((L2Npc) target).setScriptValue(1); + return new DamageReturn(false, true, false, target.getMaxHp() * DAMAGE_BY_SKILL); + } + } + } + return null; } @RegisterEvent(EventType.ON_CREATURE_DEATH) @@ -229,16 +283,29 @@ public final class MuseumDungeon extends AbstractInstance public void onCreatureKill(OnCreatureDeath event) { final L2Npc npc = (L2Npc) event.getTarget(); - - final Instance world = npc.getInstanceWorld(); - if (world != null) + final Instance instance = npc.getInstanceWorld(); + if (isInInstance(instance)) { - final L2PcInstance player = world.getFirstPlayer(); - final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName()); - if ((qs != null) && qs.isCond(2) && world.getAliveNpcs(THIEF).isEmpty()) + final L2Attackable toyron = (L2Attackable) instance.getNpc(TOYRON); + + final L2PcInstance player = instance.getFirstPlayer(); + final QuestState qs = player.getQuestState(Q10542_SearchingForNewPower.class.getSimpleName()); + if ((qs != null) && qs.isCond(4)) { - qs.setCond(3, true); - showOnScreenMsg(player, NpcStringId.TALK_TO_TOYRON_TO_RETURN_TO_THE_MUSEUM_LOBBY, ExShowScreenMessage.TOP_CENTER, 4500); + if (instance.getAliveNpcs(THIEF).isEmpty()) + { + qs.setCond(5, true); + showOnScreenMsg(player, NpcStringId.SPEAK_WITH_TOYRON_IN_ORDER_TO_RETURN_SHANNON, ExShowScreenMessage.TOP_CENTER, 4500); + getTimers().cancelTimer("TOYRON_MSG_1", toyron, player); + getTimers().cancelTimer("TOYRON_MSG_2", toyron, player); + } + else + { + final int value = qs.getMemoStateEx(Q10542_SearchingForNewPower.KILL_COUNT_VAR) + 1; + qs.setMemoStateEx(Q10542_SearchingForNewPower.KILL_COUNT_VAR, value); + qs.getQuest().sendNpcLogList(player); + getTimers().addTimer("TOYRON_FOLLOW", 1500, toyron, player); + } } } } diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/Q10320_LetsGoToTheCentralSquare.java b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/Q10320_LetsGoToTheCentralSquare.java index f7952fb9f2..7c95607e4d 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/Q10320_LetsGoToTheCentralSquare.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/Q10320_LetsGoToTheCentralSquare.java @@ -16,7 +16,6 @@ */ package quests.Q10320_LetsGoToTheCentralSquare; -import com.l2jmobius.gameserver.enums.ChatType; import com.l2jmobius.gameserver.enums.Movie; import com.l2jmobius.gameserver.enums.Race; import com.l2jmobius.gameserver.model.actor.L2Character; @@ -31,7 +30,6 @@ 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.model.zone.L2ZoneType; -import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml; /** @@ -89,11 +87,9 @@ public final class Q10320_LetsGoToTheCentralSquare extends Quest { if (qs.isStarted()) { - giveAdena(player, 30, true); - addExpAndSp(player, 30, 5); + addExpAndSp(player, 300, 6); qs.exitQuest(false, true); htmltext = event; - npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.WAIT_WAIT_A_MINUTE_I_STILL_HAVE_TIME); } break; } diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-03.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-03.htm similarity index 100% rename from L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-03.html rename to L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-03.htm diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/Q10321_QualificationsOfTheSeeker.java b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/Q10321_QualificationsOfTheSeeker.java index f70fa3c5ca..55d2bab6d3 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/Q10321_QualificationsOfTheSeeker.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/Q10321_QualificationsOfTheSeeker.java @@ -16,13 +16,11 @@ */ package quests.Q10321_QualificationsOfTheSeeker; -import com.l2jmobius.gameserver.enums.ChatType; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.quest.State; -import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml; import quests.Q10320_LetsGoToTheCentralSquare.Q10320_LetsGoToTheCentralSquare; @@ -60,7 +58,7 @@ public final class Q10321_QualificationsOfTheSeeker extends Quest String htmltext = null; switch (event) { - case "32975-03.html": + case "32975-03.htm": { qs.startQuest(); qs.setCond(2); // arrow hack @@ -78,10 +76,8 @@ public final class Q10321_QualificationsOfTheSeeker extends Quest { if (qs.isStarted()) { - giveAdena(player, 50, true); - addExpAndSp(player, 40, 5); + addExpAndSp(player, 300, 6); qs.exitQuest(false, true); - npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.HM_DON_T_JUST_GO_I_STILL_HAVE_TONS_TO_TEACH_YOU); htmltext = event; } break; diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-01.htm b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-01.htm deleted file mode 100644 index caa9937a87..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-01.htm +++ /dev/null @@ -1,5 +0,0 @@ -Pantheon:
-Gallint is hurt and cannot move, but we must do something about the books before they get stolen.
-They're looking for The War of Gods and Giants mostly, but there are a couple of others they'd probably find useful too.
- - \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-02.htm b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-02.htm deleted file mode 100644 index c9d2adeb70..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-02.htm +++ /dev/null @@ -1,5 +0,0 @@ -Pantheon:
-We think they were looking for anything related to the Giants,and tried to steal The War of Gods and Giants, an ancient book that was discovered in Ye Sagira.
-It has many stories about the powers of the Giants, how that power can be learned, and about others species from their time. Now that the island has crashed, perhaps we should think about safeguarding the book...
- - \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-03.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-03.html deleted file mode 100644 index 206b33213a..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-03.html +++ /dev/null @@ -1,6 +0,0 @@ -Pantheon:
-Thank you! -When you get to the museum, you should see a number of desks - one of them has The War of Giants and Gods on it. Find it, and bring it to me.
-Would you like to go to the museum?
- - \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.html deleted file mode 100644 index a869adc6e0..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.html +++ /dev/null @@ -1,5 +0,0 @@ -Pantheon:
-You're still here -Go into the museum!
- - \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.html deleted file mode 100644 index 68e802d933..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.html +++ /dev/null @@ -1,4 +0,0 @@ -Pantheon:
-I just saw suspicious intruders entering the Museum! I fear for the rare valuable articles inside the Museum. Please hurry into the Museum and deal with the intruders!
- - \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.html deleted file mode 100644 index eaed2d5059..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.html +++ /dev/null @@ -1,5 +0,0 @@ -Pantheon:
-You've brought the book? Good! It must have been difficult to find it amongst all those others!
-I hope you didn't get hurt either - Gallint may be a fool, but plenty have hurt themselves moving books around before him.
- - \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.html deleted file mode 100644 index e516123633..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.html +++ /dev/null @@ -1,6 +0,0 @@ -Pantheon:
-What? The thieves are getting more brash by the day!
-Hmm... So, I wonder if the books related to Giants... are also related to Embryo. It's just speculation, but something worth considering.
-Now, I must apologize for placing you in harm's way. Please accept these Earrings - accessories such as these help protect you against magic!
-Remember: you can wear up to two earrings at a time. Purchase more from the General Merchant if you wish. - diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.html deleted file mode 100644 index c220a4df12..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.html +++ /dev/null @@ -1,4 +0,0 @@ -Pantheon:
-I'm still looking into things, friend. I'll let you know when I find anything
-(You have already completed this quest.) - \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-09.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-09.html deleted file mode 100644 index 4f38460c36..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-09.html +++ /dev/null @@ -1,4 +0,0 @@ -Pantheon:
-This mission can't be give to just anyone!
-(Only characters below 20, who've completed the "Let's Respect Elders" quest, may start this quest.) - \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/Q10327_IntruderWhoWantsTheBookOfGiants.java b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/Q10327_IntruderWhoWantsTheBookOfGiants.java deleted file mode 100644 index d3081e4f2e..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/Q10327_IntruderWhoWantsTheBookOfGiants.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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 . - */ -package quests.Q10327_IntruderWhoWantsTheBookOfGiants; - -import com.l2jmobius.gameserver.model.actor.L2Npc; -import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; -import com.l2jmobius.gameserver.model.quest.Quest; -import com.l2jmobius.gameserver.model.quest.QuestState; -import com.l2jmobius.gameserver.model.quest.State; -import com.l2jmobius.gameserver.network.NpcStringId; -import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; - -//import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower; - -/** - * Intruder Who Wants the Book of Giants (10327) - * @author Gladicek - */ -public final class Q10327_IntruderWhoWantsTheBookOfGiants extends Quest -{ - // NPCs - private static final int PANTHEON = 32972; - // Items - private static final int THE_WAR_OF_GODS_AND_GIANTS = 17575; - // Misc - private static final int MAX_LEVEL = 20; - private static final int APPRENTICE_EARRING = 112; - - public Q10327_IntruderWhoWantsTheBookOfGiants() - { - super(10327); - addStartNpc(PANTHEON); - addTalkId(PANTHEON); - registerQuestItems(THE_WAR_OF_GODS_AND_GIANTS); - addCondMaxLevel(MAX_LEVEL, "32972-09.html"); - // addCondCompletedQuest(Q10542_SearchingForNewPower.class.getSimpleName(), "32972-09.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 "32972-02.htm": - { - htmltext = event; - break; - } - case "32972-03.html": - { - qs.startQuest(); - htmltext = event; - break; - } - case "32972-07.html": - { - if (qs.isCond(3)) - { - showOnScreenMsg(player, NpcStringId.ACCESSORIES_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500); - giveAdena(player, 160, true); - giveItems(player, APPRENTICE_EARRING, 2); - addExpAndSp(player, 7800, 5); - qs.exitQuest(false, true); - } - 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 = "32972-01.htm"; - break; - } - case State.STARTED: - { - if (qs.isCond(1)) - { - htmltext = "32972-04.html"; - break; - } - else if (qs.isCond(2)) - { - htmltext = "32972-05.html"; - break; - } - else if (qs.isCond(3)) - { - htmltext = "32972-06.html"; - break; - } - } - case State.COMPLETED: - { - htmltext = "32972-08.html"; - break; - } - } - return htmltext; - } -} \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10541_TrainLikeTheRealThing/Q10541_TrainLikeTheRealThing.java b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10541_TrainLikeTheRealThing/Q10541_TrainLikeTheRealThing.java index 4c5169f10c..3586bf9469 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10541_TrainLikeTheRealThing/Q10541_TrainLikeTheRealThing.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10541_TrainLikeTheRealThing/Q10541_TrainLikeTheRealThing.java @@ -39,7 +39,7 @@ import quests.Q10321_QualificationsOfTheSeeker.Q10321_QualificationsOfTheSeeker; /** * Train Like the Real Thing (10541) * @URL https://l2wiki.com/Train_Like_the_Real_Thing - * @author GIgi + * @author Gigi */ public final class Q10541_TrainLikeTheRealThing extends Quest { @@ -164,23 +164,30 @@ public final class Q10541_TrainLikeTheRealThing extends Quest { case SHANNON: { - if (qs.isCond(1)) + switch (qs.getCond()) { - htmltext = "32974-05.html"; - } - else if (qs.isCond(2)) - { - startQuestTimer("HTML1", 100, npc, player); - } - else if (qs.isCond(3)) - { - htmltext = "32974-07.html"; - } - else if (qs.isCond(5)) - { - addExpAndSp(player, 2950, 7); - qs.exitQuest(false, true); - startQuestTimer("HTML", 200, npc, player); + case 1: + { + htmltext = "32974-05.html"; + break; + } + case 2: + { + startQuestTimer("HTML1", 100, npc, player); + break; + } + case 3: + { + htmltext = "32974-07.html"; + break; + } + case 5: + { + addExpAndSp(player, 2550, 7); + qs.exitQuest(false, true); + startQuestTimer("HTML", 200, npc, player); + break; + } } break; } @@ -198,7 +205,6 @@ public final class Q10541_TrainLikeTheRealThing extends Quest } } break; - } case State.COMPLETED: { diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-01.htm b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-01.htm index 8690ce8bf3..ca692ced93 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-01.htm +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-01.htm @@ -1,4 +1,4 @@ Shannon:
Are you really thinking of being a seeker? You've got the will, and you seem to have the skills too, but you'll need a bit of polishing. Hmm... I think you'll first need to learn how to use your new powers. What do you think?
- + \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-02.htm b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-02.htm index 3574d07a8c..381747b4a1 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-02.htm +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-02.htm @@ -3,5 +3,5 @@ There are a wide variety of new powers. The Support Magic you just experienced i Of course, if you're going to learn something, experiencing it yourself is always going to be the most effective way.
I happen to have been asked by Pantheon to investigate some strange movement in the Museum.
I think this'll be a good training opportunity for you. Prepare yourself mentally first, and tell me when you're done getting ready.
- + \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-04.htm b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-04.htm new file mode 100644 index 0000000000..de33e37e23 --- /dev/null +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-04.htm @@ -0,0 +1,5 @@ +Shannon:
+Ready already? My, my. Aren't you enthusiastic! Now then, before you head to the Museum, I'll give you some important information first.
+First, take these Spiritshots. They have no grade, but as you get stronger and get better weapons, you can use Grade D, C, B, and eventually R. This is very important in battle.
+First, activate your Spiritshot. + \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-04.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-04.html deleted file mode 100644 index 4047f4809a..0000000000 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-04.html +++ /dev/null @@ -1,6 +0,0 @@ -Shannon:
-Now that you're done preparing, should we head to the museum?
-I'd go with you, but you can't always have me picking up after you, right?
-I've told Toyron at the Museum that I'm sending a promising rookie his way. Go and find Toyron.
- - \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-05.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-05.html index 39d7b037df..2a705aa681 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-05.html +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-05.html @@ -1,4 +1,6 @@ Shannon:
-You've done well. It turns out what you were dealing with wasn't as minor as I thought it was. I have some trust in you know. What did you think? I told Toyron to help you learn to use your skills properly. Did you learn well?
- +Now that you're done preparing, should we head to the museum?
+I'd go with you, but you can't always have me picking up after you, right?
+I've told Toyron at the Museum that I'm sending a promising rookie his way. Go and find Toyron.
+ \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-06.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-06.html index b14d65d55a..3f09998c05 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-06.html +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-06.html @@ -1,3 +1,6 @@ Shannon:
-There's my promising rookie! Good job. +I'm guessing the situation's more dire than we thought. Suspicious intruder, did you say?
+But still, we can't give up. Calm yourself down, and this time, make sure you defeat that intruder!
+I'll send you back into the museum. Don't let your guard down, and make me proud!
+ \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-07.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-07.html new file mode 100644 index 0000000000..74d811a1d7 --- /dev/null +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-07.html @@ -0,0 +1,4 @@ +Shannon:
+You've done well. It turns out what you were dealing with wasn't as minor as I thought it was. I have some trust in you know. What did you think? I told Toyron to help you learn to use your skills properly. Did you learn well?
+ + \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-08.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-08.html new file mode 100644 index 0000000000..61f4178217 --- /dev/null +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/32974-08.html @@ -0,0 +1,3 @@ +Shannon:
+There's my promising rookie! Good job. + \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-01.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-01.html new file mode 100644 index 0000000000..d7b6f22912 --- /dev/null +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-01.html @@ -0,0 +1,6 @@ +Toyron:
+Has Shannon sent you? I don't know how much you know, but it would seem someone after the giants' relics has been here.
+Since nobody has exited since I have entered, the intruder must not have been able to escape. However, before we start the search, since we cannot know how dangerous this intruder is, we must prepare thoroughly.
+Do you know how to use skills? Please learn how to employ skills before you proceed, in order to be better prepared against dangers.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-02.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-02.html new file mode 100644 index 0000000000..4dddad5fe5 --- /dev/null +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-02.html @@ -0,0 +1,4 @@ +Toyron:
+Alright now, let's search for the intruder. It appears it's the Giant's Book he is after. Let us search around the bookshelf.
+Keep the tension up while searching, as the intruder may suddenly show himself. + \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-03.html b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-03.html new file mode 100644 index 0000000000..892bddd38c --- /dev/null +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/33004-03.html @@ -0,0 +1,4 @@ +Toyron:
+You've retrieved the book, and defeated the intruder as well. He was much stronger than anyone we were expecting, but you've done a great job thwarting him. Now return to Shannon, and tell her that the occurrence at the museum has been neutralized.
+ + \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/Q10542_SearchingForNewPower.java b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/Q10542_SearchingForNewPower.java index f84e165316..82f9ddbc5e 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/Q10542_SearchingForNewPower.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10542_SearchingForNewPower/Q10542_SearchingForNewPower.java @@ -16,37 +16,47 @@ */ package quests.Q10542_SearchingForNewPower; +import java.util.HashSet; +import java.util.Set; + +import com.l2jmobius.gameserver.enums.CategoryType; import com.l2jmobius.gameserver.enums.Race; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.NpcLogListHolder; import com.l2jmobius.gameserver.model.quest.Quest; import com.l2jmobius.gameserver.model.quest.QuestState; import com.l2jmobius.gameserver.model.quest.State; import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; +import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml; import quests.Q10541_TrainLikeTheRealThing.Q10541_TrainLikeTheRealThing; /** * Searching for New Power (10542) * @URL https://l2wiki.com/Searching_for_New_Power - * @author GIgi + * @author Gigi */ public final class Q10542_SearchingForNewPower extends Quest { // NPCs private static final int SHANNON = 32974; + private static final int TOYRON = 33004; + private static final int THIEF = 23121; // Items - private static final int SOULSHOT = 1835; private static final int THE_WAR_OF_GODS_AND_GIANTS = 17575; + private static final int SOULSHOTS = 5789; + private static final int SPIRITSHOTS = 5790; // Misc + public static final int KILL_COUNT_VAR = 0; private static final int MAX_LEVEL = 20; public Q10542_SearchingForNewPower() { super(10542); addStartNpc(SHANNON); - addTalkId(SHANNON); + addTalkId(SHANNON, TOYRON); registerQuestItems(THE_WAR_OF_GODS_AND_GIANTS); addCondNotRace(Race.ERTHEIA, "noRace.html"); addCondMaxLevel(MAX_LEVEL, "noLevel.html"); @@ -70,22 +80,41 @@ public final class Q10542_SearchingForNewPower extends Quest htmltext = event; break; } - case "32974-03.htm": + case "check": { qs.startQuest(); - showOnScreenMsg(player, NpcStringId.AUTOMATE_SOULSHOT_AS_SHOWN_IN_THE_TUTORIAL, ExShowScreenMessage.TOP_CENTER, 10000); - if (!hasQuestItems(player, SOULSHOT)) + if (player.isInCategory(CategoryType.MAGE_GROUP)) { - giveItems(player, SOULSHOT, 100); + giveItems(player, SPIRITSHOTS, 100); + showOnScreenMsg(player, NpcStringId.AUTOMATE_SPIRITSHOT_AS_SHOWN_IN_THE_TUTORIAL, ExShowScreenMessage.TOP_CENTER, 4500); + htmltext = "32974-04.htm"; + } + else + { + giveItems(player, SOULSHOTS, 100); + showOnScreenMsg(player, NpcStringId.AUTOMATE_SOULSHOT_AS_SHOWN_IN_THE_TUTORIAL, ExShowScreenMessage.TOP_CENTER, 4500); + htmltext = "32974-03.htm"; } - htmltext = event; break; } - case "32974-06.html": + case "33004-02.html": { - addExpAndSp(player, 3200, 8); - qs.exitQuest(false, true); - htmltext = event; + if (qs.isCond(3)) + { + showOnScreenMsg(player, NpcStringId.AMONG_THE_4_BOOKSHELVES_FIND_THE_ONE_CONTAINING_A_VOLUME_CALLED_THE_WAR_OF_GODS_AND_GIANTS, ExShowScreenMessage.TOP_CENTER, 4500); + htmltext = "32974-08.html"; + } + break; + } + case "32974-08.html": + { + if (qs.isCond(5)) + { + giveItems(player, (player.isInCategory(CategoryType.MAGE_GROUP) ? SPIRITSHOTS : SOULSHOTS), 100); + addExpAndSp(player, 2550, 7); + qs.exitQuest(false, true); + htmltext = "32974-08.html"; + } break; } } @@ -93,10 +122,10 @@ public final class Q10542_SearchingForNewPower extends Quest } @Override - public String onTalk(L2Npc npc, L2PcInstance player) + public String onTalk(L2Npc npc, L2PcInstance player, boolean isSimulated) { + String htmltext = getNoQuestMsg(player); final QuestState qs = getQuestState(player, true); - String htmltext = null; switch (qs.getState()) { @@ -110,14 +139,92 @@ public final class Q10542_SearchingForNewPower extends Quest } case State.STARTED: { - if ((qs.getCond() > 0) && (qs.getCond() < 5)) + if (npc.getId() == SHANNON) { - htmltext = "32974-04.html"; - qs.setCond(2); + switch (qs.getCond()) + { + case 1: + case 2: + case 3: + { + htmltext = "32974-05.html"; + break; + } + case 4: + { + htmltext = "32974-06.html"; + break; + } + case 5: + { + htmltext = "32974-07.html"; + break; + } + } + break; } - else if (qs.isCond(5)) + else if (npc.getId() == TOYRON) { - htmltext = "32974-05.html"; + if (qs.isCond(2)) + { + htmltext = "33004-01.html"; + if (!isSimulated) + { + qs.setCond(3, true); + player.sendPacket(new TutorialShowHtml(npc.getObjectId(), "..\\L2text\\QT_004_skill_01.htm", TutorialShowHtml.LARGE_WINDOW)); + htmltext = "33004-01.html"; + + NpcStringId npcStringId = null; + switch (player.getClassId()) + { + case FIGHTER: + case ELVEN_FIGHTER: + case DARK_FIGHTER: + { + npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_MORTAL_BLOW; + break; + } + case MAGE: + case ELVEN_MAGE: + case DARK_MAGE: + { + npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_WIND_STRIKE; + break; + } + case ORC_FIGHTER: + { + npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_IRON_PUNCH; + break; + } + case ORC_MAGE: + { + npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_CHILL_FLAME; + break; + } + case DWARVEN_FIGHTER: + { + npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_SPOIL; + break; + } + case MALE_SOLDIER: + case FEMALE_SOLDIER: + { + npcStringId = NpcStringId.PREPARE_TO_USE_THE_SKILL_FALLEN_ATTACK_OR_FALLEN_ARROW; + break; + } + default: + break; + } + if (npcStringId != null) + { + showOnScreenMsg(player, npcStringId, ExShowScreenMessage.TOP_CENTER, 4500); + } + } + } + else if (qs.isCond(5)) + { + htmltext = "33004-03.html"; + } } break; } @@ -129,4 +236,16 @@ public final class Q10542_SearchingForNewPower extends Quest } return htmltext; } + + @Override + public Set getNpcLogList(L2PcInstance player) + { + final Set holder = new HashSet<>(); + final QuestState qs = getQuestState(player, false); + if ((qs != null) && qs.isCond(4)) + { + holder.add(new NpcLogListHolder(THIEF, false, qs.getMemoStateEx(KILL_COUNT_VAR))); + } + return holder; + } } \ No newline at end of file diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10543_SheddingWeight/Q10543_SheddingWeight.java b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10543_SheddingWeight/Q10543_SheddingWeight.java index 069468aee0..30d12c5139 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10543_SheddingWeight/Q10543_SheddingWeight.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/Q10543_SheddingWeight/Q10543_SheddingWeight.java @@ -16,6 +16,8 @@ */ package quests.Q10543_SheddingWeight; +import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower; + import com.l2jmobius.gameserver.enums.Race; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; @@ -26,8 +28,6 @@ import com.l2jmobius.gameserver.network.NpcStringId; import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml; -import quests.Q10542_SearchingForNewPower.Q10542_SearchingForNewPower; - /** * Shedding Weight (10543) * @URL https://l2wiki.com/Shedding_Weight @@ -40,12 +40,7 @@ public final class Q10543_SheddingWeight extends Quest private static final int WILFORD = 30005; // Items // private static final int NOVICE_TRAINING_LOG = 1835; // TODO Find item ID - private static final int WOODEN_ARROW = 17; - private static final int APPRENTICE_ADVENTURERS_STAFF = 7816; - private static final int APPRENTICE_ADVENTURERS_BONE_CLUB = 7817; private static final int APPRENTICE_ADVENTURERS_KNIFE = 7818; - private static final int APPRENTICE_ADVENTURERS_CESTUS = 7819; - private static final int APPRENTICE_ADVENTURERS_BOW = 7820; private static final int APPRENTICE_ADVENTURERS_LONG_SWORD = 7821; // Misc private static final int MAX_LEVEL = 20; @@ -88,12 +83,7 @@ public final class Q10543_SheddingWeight extends Quest } case "30005-03.html": { - giveItems(player, WOODEN_ARROW, 500); - giveItems(player, APPRENTICE_ADVENTURERS_STAFF, 1); - giveItems(player, APPRENTICE_ADVENTURERS_BONE_CLUB, 1); giveItems(player, APPRENTICE_ADVENTURERS_KNIFE, 1); - giveItems(player, APPRENTICE_ADVENTURERS_CESTUS, 1); - giveItems(player, APPRENTICE_ADVENTURERS_BOW, 1); giveItems(player, APPRENTICE_ADVENTURERS_LONG_SWORD, 1); player.sendPacket(new TutorialShowHtml(npc.getObjectId(), "..\\L2Text\\QT_007_post_01.htm", TutorialShowHtml.LARGE_WINDOW)); showOnScreenMsg(player, NpcStringId.WEAPONS_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 10000); diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java b/L2J_Mobius_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java index 9eb46336a6..224f68cf4c 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -226,7 +226,6 @@ import quests.Q10317_OrbisWitch.Q10317_OrbisWitch; import quests.Q10318_DecayingDarkness.Q10318_DecayingDarkness; import quests.Q10320_LetsGoToTheCentralSquare.Q10320_LetsGoToTheCentralSquare; import quests.Q10321_QualificationsOfTheSeeker.Q10321_QualificationsOfTheSeeker; -import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants; import quests.Q10330_ToTheRuinsOfYeSagira.Q10330_ToTheRuinsOfYeSagira; import quests.Q10331_StartOfFate.Q10331_StartOfFate; import quests.Q10332_ToughRoad.Q10332_ToughRoad; @@ -646,7 +645,6 @@ public class QuestMasterHandler Q10318_DecayingDarkness.class, Q10320_LetsGoToTheCentralSquare.class, Q10321_QualificationsOfTheSeeker.class, - Q10327_IntruderWhoWantsTheBookOfGiants.class, Q10330_ToTheRuinsOfYeSagira.class, Q10331_StartOfFate.class, Q10332_ToughRoad.class, diff --git a/L2J_Mobius_Helios/dist/game/data/spawns/TalkingIsland/TalkingIslandVillage.xml b/L2J_Mobius_Helios/dist/game/data/spawns/TalkingIsland/TalkingIslandVillage.xml index 6de2ad2dcc..550118e75f 100644 --- a/L2J_Mobius_Helios/dist/game/data/spawns/TalkingIsland/TalkingIslandVillage.xml +++ b/L2J_Mobius_Helios/dist/game/data/spawns/TalkingIsland/TalkingIslandVillage.xml @@ -57,6 +57,7 @@ + diff --git a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 71ee3f02eb..8f7e8cea75 100644 --- a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -963,7 +963,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } // Notify to scripts - final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target), target, TerminateReturn.class); + final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target, null), target, TerminateReturn.class); if ((attackedReturn != null) && attackedReturn.terminate()) { getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); diff --git a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java index cd8f222119..518e4a550a 100644 --- a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java +++ b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java @@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.events.impl.character; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.IBaseEvent; +import com.l2jmobius.gameserver.model.skills.Skill; /** * An instantly executed event when L2Character is attacked by L2Character. @@ -28,11 +29,13 @@ public class OnCreatureAttacked implements IBaseEvent { private final L2Character _attacker; private final L2Character _target; + private final Skill _skill; - public OnCreatureAttacked(L2Character attacker, L2Character target) + public OnCreatureAttacked(L2Character attacker, L2Character target, Skill skill) { _attacker = attacker; _target = target; + _skill = skill; } public final L2Character getAttacker() @@ -45,6 +48,11 @@ public class OnCreatureAttacked implements IBaseEvent return _target; } + public final Skill getSkill() + { + return _skill; + } + @Override public EventType getType() { diff --git a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/network/NpcStringId.java b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/network/NpcStringId.java index 50d733ed00..c2d74b9c75 100644 --- a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/network/NpcStringId.java +++ b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/network/NpcStringId.java @@ -13671,6 +13671,24 @@ public final class NpcStringId @ClientString(id = 554107, message = "Defeating the Scarecrow") public static NpcStringId DEFEATING_THE_SCARECROW; + @ClientString(id = 554210, message = "Preapare to use the skill 'Power Strike' or 'Mortal Blow'") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_MORTAL_BLOW; + + @ClientString(id = 554211, message = "Preapare to use the skill 'Wind Strike'") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_WIND_STRIKE; + + @ClientString(id = 554212, message = "Prepare to use the skill ‘Power Strike' or ‘Iron Punch") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_POWER_STRIKE_OR_IRON_PUNCH; + + @ClientString(id = 554213, message = "Prepare to use the skill ‘Chill Flame'") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_CHILL_FLAME; + + @ClientString(id = 554214, message = "Prepare to use the skill ‘Spoil'") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_SPOIL; + + @ClientString(id = 554215, message = "Prepare to use the skill ‘Fallen Attack' or ‘Fallen Arrow'") + public static NpcStringId PREPARE_TO_USE_THE_SKILL_FALLEN_ATTACK_OR_FALLEN_ARROW; + @ClientString(id = 570101, message = "The Road to Destruction (Above Lv. 93)") public static NpcStringId THE_ROAD_TO_DESTRUCTION_ABOVE_LV_93; @@ -31901,9 +31919,13 @@ public final class NpcStringId @ClientString(id = 1803275, message = "If the story is still in progress, I can tell it again.") public static NpcStringId IF_THE_STORY_IS_STILL_IN_PROGRESS_I_CAN_TELL_IT_AGAIN; + @ClientString(id = 1803329, message = "Speak with the ‘Adventurers' Guide for Training'.") public static NpcStringId SPEAK_WITH_THE_ADVENTURERS_GUIDE_FOR_TRAINING; + @ClientString(id = 1803330, message = "Speak with Toyron in order to return to Shannon.") + public static NpcStringId SPEAK_WITH_TOYRON_IN_ORDER_TO_RETURN_SHANNON; + @ClientString(id = 1810363, message = "You are too far from the corpse.") public static NpcStringId YOU_ARE_TOO_FAR_FROM_THE_CORPSE; diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/FairySettlement/LargeCocoon/LargeCocoon.java b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/FairySettlement/LargeCocoon/LargeCocoon.java index e3fa1a1f7e..2e319b311b 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/FairySettlement/LargeCocoon/LargeCocoon.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/FairySettlement/LargeCocoon/LargeCocoon.java @@ -66,7 +66,7 @@ public final class LargeCocoon extends AbstractNpcAI { case "attack": { - onCreatureAttacked(new OnCreatureAttacked(player, npc)); + onCreatureAttacked(new OnCreatureAttacked(player, npc, null)); break; } case "attackPowerful": diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 71ee3f02eb..8f7e8cea75 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -963,7 +963,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } // Notify to scripts - final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target), target, TerminateReturn.class); + final TerminateReturn attackedReturn = EventDispatcher.getInstance().notifyEvent(new OnCreatureAttacked(this, target, null), target, TerminateReturn.class); if ((attackedReturn != null) && attackedReturn.terminate()) { getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE); diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java index cd8f222119..518e4a550a 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/events/impl/character/OnCreatureAttacked.java @@ -19,6 +19,7 @@ package com.l2jmobius.gameserver.model.events.impl.character; import com.l2jmobius.gameserver.model.actor.L2Character; import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.model.events.impl.IBaseEvent; +import com.l2jmobius.gameserver.model.skills.Skill; /** * An instantly executed event when L2Character is attacked by L2Character. @@ -28,11 +29,13 @@ public class OnCreatureAttacked implements IBaseEvent { private final L2Character _attacker; private final L2Character _target; + private final Skill _skill; - public OnCreatureAttacked(L2Character attacker, L2Character target) + public OnCreatureAttacked(L2Character attacker, L2Character target, Skill skill) { _attacker = attacker; _target = target; + _skill = skill; } public final L2Character getAttacker() @@ -45,6 +48,11 @@ public class OnCreatureAttacked implements IBaseEvent return _target; } + public final Skill getSkill() + { + return _skill; + } + @Override public EventType getType() {