diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index d4c704c201978f7e677da16e8aa1327c1f9c6018..6729aee96f0ca62d7d1cd84b6479d65ac1b90ec8 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -11,7 +11,6 @@ handlers/MasterHandler.java # AI Section # Npc -ai/npc/SuspiciousStones.java ai/npc/NpcBuffers/BirthdayCake.java ai/npc/NpcBuffers/CabaleBuffer.java ai/npc/NpcBuffers/Totems.java diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/SuspiciousStones.java b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/SuspiciousStones.java deleted file mode 100644 index 50143b245a9c3538985378bebefa4a48ab0b8e72..0000000000000000000000000000000000000000 --- a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/SuspiciousStones.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see <http://www.gnu.org/licenses/>. - */ -package ai.npc; - -import quests.Q00114_ResurrectionOfAnOldManager.Q00114_ResurrectionOfAnOldManager; - -import com.l2jserver.gameserver.datatables.SpawnTable; -import com.l2jserver.gameserver.model.L2Spawn; -import com.l2jserver.gameserver.model.actor.L2Npc; -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.quest.QuestState; -import com.l2jserver.gameserver.network.NpcStringId; -import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; - -/** - * Suspicious-Looking Pile of Stones AI - * @author malyelfik - */ -public class SuspiciousStones extends AbstractNpcAI -{ - private static final int npcId = 32046; - - @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { - if (event.equalsIgnoreCase("check")) - { - for (L2PcInstance pl : npc.getKnownList().getKnownPlayers().values()) - { - if (pl != null) - { - final QuestState st = pl.getQuestState(Q00114_ResurrectionOfAnOldManager.class.getSimpleName()); - if ((st != null) && st.isCond(17)) - { - st.takeItems(8090, 1); - st.giveItems(8091, 1); - st.setCond(18, true); - pl.sendPacket(new ExShowScreenMessage(NpcStringId.THE_RADIO_SIGNAL_DETECTOR_IS_RESPONDING_A_SUSPICIOUS_PILE_OF_STONES_CATCHES_YOUR_EYE, 2, 4500)); - } - } - } - } - return event; - } - - public SuspiciousStones(String name, String descr) - { - super(name, descr); - - L2Npc npc = null; - for (L2Spawn spawn : SpawnTable.getInstance().getSpawnTable()) - { - if ((spawn != null) && (spawn.getNpcid() == npcId)) - { - npc = spawn.getLastSpawn(); - } - } - - if (npc != null) - { - startQuestTimer("check", 1000, npc, null, true); - } - else - { - _log.warning("SuspiciousStones: Can't find npc!"); - } - } - - public static void main(String[] args) - { - new SuspiciousStones(SuspiciousStones.class.getSimpleName(), "ai/npc"); - } -} \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00114_ResurrectionOfAnOldManager/Q00114_ResurrectionOfAnOldManager.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00114_ResurrectionOfAnOldManager/Q00114_ResurrectionOfAnOldManager.java index 5f669bef62d87330202f3783af3c3cb85d9a082f..d8a567d7f64af44e0cd430d56ef47d140a87bf48 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00114_ResurrectionOfAnOldManager/Q00114_ResurrectionOfAnOldManager.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00114_ResurrectionOfAnOldManager/Q00114_ResurrectionOfAnOldManager.java @@ -18,13 +18,16 @@ import quests.Q00121_PavelTheGiant.Q00121_PavelTheGiant; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.model.actor.L2Attackable; +import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.quest.QuestState; import com.l2jserver.gameserver.model.quest.State; +import com.l2jserver.gameserver.model.zone.L2ZoneType; import com.l2jserver.gameserver.network.NpcStringId; import com.l2jserver.gameserver.network.clientpackets.Say2; +import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; import com.l2jserver.gameserver.network.serverpackets.NpcSay; /** @@ -52,6 +55,9 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest // Monster private static final int GUARDIAN = 27318; + // Zones + private static final int[] ZONES = {200032, 200033, 200034}; + private static L2Attackable golem = null; @Override @@ -562,12 +568,31 @@ public class Q00114_ResurrectionOfAnOldManager extends Quest return super.onKill(npc, player, isPet); } + // TODO: Custom until onNpcSee support is done + @Override + public String onEnterZone(L2Character character, L2ZoneType zone) + { + if (character.isPlayer()) + { + final QuestState st = ((L2PcInstance) character).getQuestState(getName()); + if ((st != null) && st.isCond(17)) + { + st.takeItems(DETCTOR, 1); + st.giveItems(DETCTOR2, 1); + st.setCond(18, true); + character.sendPacket(new ExShowScreenMessage(NpcStringId.THE_RADIO_SIGNAL_DETECTOR_IS_RESPONDING_A_SUSPICIOUS_PILE_OF_STONES_CATCHES_YOUR_EYE, 2, 4500)); + } + } + return super.onEnterZone(character, zone); + } + public Q00114_ResurrectionOfAnOldManager(int questId, String name, String descr) { super(questId, name, descr); addStartNpc(YUMI); addTalkId(YUMI, WENDY, BOX, STONES, NEWYEAR); addKillId(GUARDIAN); + addEnterZoneId(ZONES); registerQuestItems(STARSTONE, STARSTONE2, DETCTOR, DETCTOR2, LETTER); } diff --git a/L2J_DataPack_BETA/dist/game/data/zones/custom_script.xml b/L2J_DataPack_BETA/dist/game/data/zones/custom_script.xml index a619778a46a6f302dfca901cc12e33c2ce23899b..aa1445f6898a8774710c34a6c3e4d82c646cfec7 100644 --- a/L2J_DataPack_BETA/dist/game/data/zones/custom_script.xml +++ b/L2J_DataPack_BETA/dist/game/data/zones/custom_script.xml @@ -234,4 +234,21 @@ <node X="-49004" Y="242907" /> <node X="-47530" Y="244402" /> </zone> + <!-- Custom zones for quest 114 --> + <zone name="archaic_laboratory_gate1" id="200032" type="ScriptZone" shape="Cuboid" minZ="-3300" maxZ="-3400"> + <node X="89953" Y="-106250" /> + <node X="90242" Y="-106143" /> + </zone> + <zone name="archaic_laboratory_gate2" id="200033" type="ScriptZone" shape="NPoly" minZ="-3300" maxZ="-3400"> + <node X="91491" Y="-108277" /> + <node X="91409" Y="-108192" /> + <node X="91623" Y="-107981" /> + <node X="91703" Y="-108064" /> + </zone> + <zone name="archaic_laboratory_gate3" id="200034" type="ScriptZone" shape="NPoly" minZ="-3300" maxZ="-3400"> + <node X="88468" Y="-108063" /> + <node X="88549" Y="-107983" /> + <node X="88759" Y="-108195" /> + <node X="88677" Y="-108275" /> + </zone> </list> \ No newline at end of file