From 3a5cda1f0f47ca687afafe5765f235cbc1c3d745 Mon Sep 17 00:00:00 2001 From: St3eT <St3eT@users.noreply.github.com> Date: Sun, 2 Mar 2014 21:33:47 +0000 Subject: [PATCH] BETA: Implementing '''!FortressArcherCaptain''' AI. * Reviewed by: Nos, Adry_85 * Requested by: Gladicek --- L2J_DataPack_BETA/dist/game/data/scripts.cfg | 1 + .../FortressArcherCaptain-01.html | 3 + .../FortressArcherCaptain.html | 3 + .../FortressArcherCaptain.java | 76 +++++++++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain-01.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain.html create mode 100644 L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain.java diff --git a/L2J_DataPack_BETA/dist/game/data/scripts.cfg b/L2J_DataPack_BETA/dist/game/data/scripts.cfg index 3f1cbdd150..a022be5ff9 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts.cfg +++ b/L2J_DataPack_BETA/dist/game/data/scripts.cfg @@ -31,6 +31,7 @@ ai/npc/FameManager/FameManager.java ai/npc/ForgeOfTheGods/ForgeOfTheGods.java ai/npc/ForgeOfTheGods/Rooney.java ai/npc/ForgeOfTheGods/TarBeetle.java +ai/npc/FortressArcherCaptain/FortressArcherCaptain.java ai/npc/FortuneTelling/FortuneTelling.java ai/npc/FreyasSteward/FreyasSteward.java ai/npc/Jinia/Jinia.java diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain-01.html b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain-01.html new file mode 100644 index 0000000000..68a68fb6da --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain-01.html @@ -0,0 +1,3 @@ +<html><body> +Can't you see that I am busy? Continue to bother me and you'll finish your days as a toad in the castle pond!<br><br> +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain.html b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain.html new file mode 100644 index 0000000000..466e228ac7 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain.html @@ -0,0 +1,3 @@ +<html><body> +I can even shoot an arrow and hit a bird at 100 meters! +</body></html> \ No newline at end of file diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain.java b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain.java new file mode 100644 index 0000000000..02fe6d4be3 --- /dev/null +++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/FortressArcherCaptain/FortressArcherCaptain.java @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2004-2014 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J DataPack 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.FortressArcherCaptain; + +import ai.npc.AbstractNpcAI; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; + +/** + * Fortress Archer Captain AI. + * @author St3eT + */ +public final class FortressArcherCaptain extends AbstractNpcAI +{ + // NPCs + private static final int[] ARCHER_CAPTAIN = + { + 35661, // Shanty Fortress + 35692, // Southern Fortress + 35730, // Hive Fortress + 35761, // Valley Fortress + 35799, // Ivory Fortress + 35830, // Narsell Fortress + 35861, // Bayou Fortress + 35899, // White Sands Fortress + 35930, // Borderland Fortress + 35968, // Swamp Fortress + 36006, // Archaic Fortress + 36037, // Floran Fortress + 36075, // Cloud Mountain + 36113, // Tanor Fortress + 36144, // Dragonspine Fortress + 36175, // Antharas's Fortress + 36213, // Western Fortress + 36251, // Hunter's Fortress + 36289, // Aaru Fortress + 36320, // Demon Fortress + 36358, // Monastic Fortress + }; + + private FortressArcherCaptain() + { + super(FortressArcherCaptain.class.getSimpleName(), "ai/npc"); + addStartNpc(ARCHER_CAPTAIN); + addFirstTalkId(ARCHER_CAPTAIN); + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + final int fortOwner = npc.getFort().getOwnerClan() == null ? 0 : npc.getFort().getOwnerClan().getId(); + return ((player.getClan() != null) && (player.getClanId() == fortOwner)) ? "FortressArcherCaptain.html" : "FortressArcherCaptain-01.html"; + } + + public static void main(String[] args) + { + new FortressArcherCaptain(); + } +} \ No newline at end of file -- GitLab