From 3c5e6bc8de8c4e802e90d0bb34dd49d8390fb7c1 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 26 Aug 2016 18:50:28 +0000 Subject: [PATCH] Merlot AI. Contributed by crystalgarden. --- .../dist/game/data/multisell/3401800.xml | 66 ++++++++++++ .../dist/game/data/multisell/3401801.xml | 18 ++++ .../areas/HuntersVillage/Merlot/34018-1.htm | 5 + .../areas/HuntersVillage/Merlot/34018-2.htm | 5 + .../areas/HuntersVillage/Merlot/34018-3.htm | 6 ++ .../areas/HuntersVillage/Merlot/34018-5.htm | 3 + .../ai/areas/HuntersVillage/Merlot/34018.htm | 10 ++ .../areas/HuntersVillage/Merlot/Merlot.java | 101 ++++++++++++++++++ .../data/spawns/Hunters/HuntersVillage.xml | 1 + 9 files changed, 215 insertions(+) create mode 100644 L2J_Mobius_Underground/dist/game/data/multisell/3401800.xml create mode 100644 L2J_Mobius_Underground/dist/game/data/multisell/3401801.xml create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-1.htm create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-2.htm create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-3.htm create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-5.htm create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018.htm create mode 100644 L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/Merlot.java diff --git a/L2J_Mobius_Underground/dist/game/data/multisell/3401800.xml b/L2J_Mobius_Underground/dist/game/data/multisell/3401800.xml new file mode 100644 index 0000000000..78fde1a782 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/multisell/3401800.xml @@ -0,0 +1,66 @@ + + + + 34018 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/multisell/3401801.xml b/L2J_Mobius_Underground/dist/game/data/multisell/3401801.xml new file mode 100644 index 0000000000..ed8ecb94f2 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/multisell/3401801.xml @@ -0,0 +1,18 @@ + + + + 34018 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-1.htm b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-1.htm new file mode 100644 index 0000000000..8fe98739ba --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-1.htm @@ -0,0 +1,5 @@ +Merlot:
+Currently, dimensional teleportation is not available. We can't just send you whenever we want.
+We can only send you on weeks when there are no Dimensional Sieges.
+Also, you must be above Lv. 99, since the other dimension is very dangerous. + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-2.htm b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-2.htm new file mode 100644 index 0000000000..d6848c68f5 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-2.htm @@ -0,0 +1,5 @@ +Merlot:
+If you have an Atelia Crystal that you received from defeating the Embryo in this dimension, I'll give you 1 Dimensional Coin and 14 million SP.
+ + + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-3.htm b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-3.htm new file mode 100644 index 0000000000..d84881e4b4 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-3.htm @@ -0,0 +1,6 @@ +Merlot:
+I'm exchanging rewards for Dimensional Coins.
+ + + + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-5.htm b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-5.htm new file mode 100644 index 0000000000..79dc219a8a --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018-5.htm @@ -0,0 +1,3 @@ +Merlot:
+You don't have an Atelia Energy Crystal. Please check again.
+ \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018.htm b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018.htm new file mode 100644 index 0000000000..00ad42259f --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/34018.htm @@ -0,0 +1,10 @@ +Merlot:
+Hello! I'm Merlot.
+Did you know that the Embryo have started appearing in the other dimension? I've been told by Master Mermoden to defeat those Embryo, and I've been searching for people to help me.
+And... I came here... and met Aria... and I kind of, uh... fell in love.
+Well, I'm just here to look for someone who will help me defeat the enemy.
+ + + + + \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/Merlot.java b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/Merlot.java new file mode 100644 index 0000000000..db52d94ad9 --- /dev/null +++ b/L2J_Mobius_Underground/dist/game/data/scripts/ai/areas/HuntersVillage/Merlot/Merlot.java @@ -0,0 +1,101 @@ +/* + * 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 ai.areas.HuntersVillage.Merlot; + +import com.l2jmobius.gameserver.enums.QuestSound; +import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; + +import ai.AbstractNpcAI; + +/** + * Merlot AI. + * @author crystalgarden + */ +public final class Merlot extends AbstractNpcAI +{ + // NPC + private static final int MERLOT = 34018; + // Item + private static final int ATELIA_CRYSTAL = 45610; + private static final int DIMENSIONAL_COIN = 45941; + // Misc + private static final int MIN_LEVEL = 99; + // Location + private static final Location DIMENSIONAL_RAID = new Location(116503, 75392, -2712); // Merlot Position + + private Merlot() + { + addStartNpc(MERLOT); + addTalkId(MERLOT); + addFirstTalkId(MERLOT); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = null; + switch (event) + { + case "34018-2.htm": + case "34018-3.htm": + { + htmltext = event; + break; + } + case "give_coin": + { + if (hasQuestItems(player, ATELIA_CRYSTAL)) + { + giveItems(player, DIMENSIONAL_COIN, 1); + addExpAndSp(player, 0, 14000000); + playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET); + } + else + { + htmltext = "34018-5.htm"; + } + break; + } + case "dimensional_raid": // Need TODO Dimensional Raid + { + if (player.getLevel() < MIN_LEVEL) + { + htmltext = "34018-1.htm"; + } + else + { + player.teleToLocation(DIMENSIONAL_RAID); + } + break; + } + } + return htmltext; + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + return "34018.htm"; + } + + public static void main(String[] args) + { + new Merlot(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Underground/dist/game/data/spawns/Hunters/HuntersVillage.xml b/L2J_Mobius_Underground/dist/game/data/spawns/Hunters/HuntersVillage.xml index 5f05cd2fff..7e8a9a1f9e 100644 --- a/L2J_Mobius_Underground/dist/game/data/spawns/Hunters/HuntersVillage.xml +++ b/L2J_Mobius_Underground/dist/game/data/spawns/Hunters/HuntersVillage.xml @@ -74,6 +74,7 @@ + \ No newline at end of file