Browse Source

BETA: Implementing '''Jinia''' AI.
'''Note:''' Freya feature.

Adry_85 12 years ago
parent
commit
c97a853c34

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts.cfg

@@ -29,6 +29,7 @@ ai/npc/ForgeOfTheGods/ForgeOfTheGods.java
 ai/npc/ForgeOfTheGods/Rooney.java
 ai/npc/ForgeOfTheGods/TarBeetle.java
 ai/npc/FortuneTelling/FortuneTelling.java
+ai/npc/Jinia/Jinia.java
 ai/npc/KetraOrcSupport/KetraOrcSupport.java
 ai/npc/MercenaryCaptain/MercenaryCaptain.java
 ai/npc/MonumentOfHeroes/MonumentOfHeroes.java
@@ -281,7 +282,9 @@ instances/DemonPrinceFloor/DemonPrinceFloor.java
 instances/FinalEmperialTomb/FinalEmperialTomb.java
 instances/HellboundTown/HellboundTown.java
 instances/HideoutOfTheDawn/HideoutOfTheDawn.java
+#instances/JiniaGuildHideout1/JiniaGuildHideout1.java
 instances/Kamaloka/Kamaloka.java
+#instances/MithrilMine/MithrilMine.java
 instances/NornilsGarden/NornilsGarden.java
 instances/Pailaka/PailakaDevilsLegacy.java
 instances/Pailaka/PailakaSongOfIceAndFire.java
@@ -746,6 +749,10 @@ quests/Q10280_MutatedKaneusSchuttgart/Q10280_MutatedKaneusSchuttgart.java
 quests/Q10281_MutatedKaneusRune/Q10281_MutatedKaneusRune.java
 quests/Q10282_ToTheSeedOfAnnihilation/Q10282_ToTheSeedOfAnnihilation.java
 quests/Q10283_RequestOfIceMerchant/Q10283_RequestOfIceMerchant.java
+#quests/Q10284_AcquisitionOfDivineSword/Q10284_AcquisitionOfDivineSword.java
+#quests/Q10285_MeetingSirra/Q10285_MeetingSirra.java
+#quests/Q10286_ReunionWithSirra/Q10286_ReunionWithSirra.java
+#quests/Q10287_StoryOfThoseLeft/Q10287_StoryOfThoseLeft.java
 quests/Q10288_SecretMission/Q10288_SecretMission.java
 quests/Q10289_FadeToBlack/Q10289_FadeToBlack.java
 quests/Q10290_LandDragonConqueror/Q10290_LandDragonConqueror.java

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Jinia/32781-01.html

@@ -0,0 +1,4 @@
+<html><body>Jinia:<br>
+Sorry. I don't have time, I'm dealing with something important.<br>
+<a action="bypass -h npc_%objectId%_Quest">Quest</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Jinia/32781-02.html

@@ -0,0 +1,5 @@
+<html><body>Jinia:<br>
+This place is so cold I can't feel my nose. I'm sure it's so red, I could lead a pack of flying reindeer.<br>
+<a action="bypass -h Quest Jinia check">"We need a way to stop Freya."</a><br>
+<a action="bypass -h Quest Jinia 32781-05.html">"We're ready now."</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Jinia/32781-03.html

@@ -0,0 +1,3 @@
+<html><body>Jinia:<br>
+Remember, Sirra gave us the Frozen Core. They should be power enough.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Jinia/32781-04.html

@@ -0,0 +1,3 @@
+<html><body>Jinia:<br>
+It's a piece of Frozen Core. But even you might not be able to derive all of its power. Whatever happens be careful, you won't be able to use it very often.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Jinia/32781-05.html

@@ -0,0 +1,5 @@
+<html><body>Jinia:<br>
+We must be prepared before confronting Freya. As the winter cold swells around the castle, she becomes even stronger. We can use blitz tactics and strike her before her power matures fully. Then again, if we wait until she is at full strength, I'm sure the reward will be greater. I leave the choice to you.<br>
+<a action="bypass -h Quest Jinia 32781-06.html">Challenge Freya.</a><br>
+<a action="bypass -h Quest Jinia 32781-07.html">Challenge Freya in the extreme cold.</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Jinia/32781-06.html

@@ -0,0 +1,4 @@
+<html><body>Jinia:<br>
+Be careful. Should anything happen, we'll try to help you.<br>
+<a action="bypass -h Quest Jinia 32781-05.html">"Thanks, Jinia."</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Jinia/32781-07.html

@@ -0,0 +1,5 @@
+<html><body>Jinia:<br>
+Her power is without equal. She truly is a frozen goddess. Are you sure you're ready?<br>
+<a action="bypass -h Quest Jinia 32781-05.html">"It's now or never."</a><br>
+<a action="bypass -h Quest Jinia 32781-08.html">"Perhaps I'll think again."</a>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Jinia/32781-08.html

@@ -0,0 +1,3 @@
+<html><body>Jinia:<br>
+Alright, waking her is not something you can simply undo. Let me know when you're ready.
+</body></html>

+ 86 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Jinia/Jinia.java

@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2004-2013 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.Jinia;
+
+import ai.npc.AbstractNpcAI;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.quest.QuestState;
+
+/**
+ * Jinia AI.
+ * @author Adry_85
+ */
+public class Jinia extends AbstractNpcAI
+{
+	// NPC
+	private static final int JINIA = 32781;
+	// Items
+	private static final int FROZEN_CORE = 15469;
+	private static final int BLACK_FROZEN_CORE = 15470;
+	// Misc
+	private static final int MIN_LEVEL = 82;
+	
+	private Jinia(String name, String descr)
+	{
+		super(name, descr);
+		addStartNpc(JINIA);
+		addFirstTalkId(JINIA);
+		addTalkId(JINIA);
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = event;
+		if ("check".equals(event))
+		{
+			if (hasAtLeastOneQuestItem(player, FROZEN_CORE, BLACK_FROZEN_CORE))
+			{
+				htmltext = "32781-03.html";
+			}
+			else
+			{
+				final QuestState st = player.getQuestState("Q10286_ReunionWithSirra");
+				if ((st != null) && st.isCompleted())
+				{
+					giveItems(player, FROZEN_CORE, 1);
+				}
+				else
+				{
+					giveItems(player, BLACK_FROZEN_CORE, 1);
+				}
+				htmltext = "32781-04.html";
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onFirstTalk(L2Npc npc, L2PcInstance player)
+	{
+		return player.getLevel() < MIN_LEVEL ? "32781-01.html" : "32781-02.html";
+	}
+	
+	public static void main(String[] args)
+	{
+		new Jinia(Jinia.class.getSimpleName(), "ai/npc");
+	}
+}

File diff suppressed because it is too large
+ 182 - 184
L2J_DataPack_BETA/dist/sql/game/spawnlist.sql


Some files were not shown because too many files changed in this diff