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: