Ver Fonte

BETA: Adding two missing quests:
* Jewel of Antharas (10504)
* Jewel of Valakas (10505)
* Minor improvements to quests
* The Call of Antharas (903)
* Dragon Trophy - Antharas (904)
* The Call of Valakas (906)
* Dragon Trophy - Valakas (907)

Zoey76 há 12 anos atrás
pai
commit
b7301fd73f
27 ficheiros alterados com 452 adições e 56 exclusões
  1. 2 0
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  2. 4 10
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00903_TheCallOfAntharas/Q00903_TheCallOfAntharas.java
  3. 5 18
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00904_DragonTrophyAntharas/Q00904_DragonTrophyAntharas.java
  4. 4 10
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00906_TheCallOfValakas/Q00906_TheCallOfValakas.java
  5. 5 18
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00907_DragonTrophyValakas/Q00907_DragonTrophyValakas.java
  6. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-01.htm
  7. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-02.html
  8. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-03.html
  9. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-04.html
  10. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-05.htm
  11. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-06.htm
  12. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-07.html
  13. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-08.html
  14. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-09.html
  15. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-10.html
  16. 173 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/Q10504_JewelOfAntharas.java
  17. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-01.htm
  18. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-02.html
  19. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-03.html
  20. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-04.html
  21. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-05.htm
  22. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-06.htm
  23. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-07.html
  24. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-08.html
  25. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-09.html
  26. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-10.html
  27. 170 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/Q10505_JewelOfValakas.java

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

@@ -724,6 +724,8 @@ quests/Q10288_SecretMission/Q10288_SecretMission.java
 quests/Q10289_FadeToBlack/Q10289_FadeToBlack.java
 quests/Q10290_LandDragonConqueror/Q10290_LandDragonConqueror.java
 quests/Q10291_FireDragonDestroyer/Q10291_FireDragonDestroyer.java
+quests/Q10504_JewelOfAntharas/Q10504_JewelOfAntharas.java
+quests/Q10505_JewelOfValakas/Q10505_JewelOfValakas.java
 
 # Custom
 custom/Nottingale/Nottingale.java

+ 4 - 10
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00903_TheCallOfAntharas/Q00903_TheCallOfAntharas.java

@@ -64,25 +64,19 @@ public class Q00903_TheCallOfAntharas extends Quest
 		}
 		
 		String htmltext = null;
-		if (player.getLevel() >= MIN_LEVEL)
+		if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE))
 		{
 			switch (event)
 			{
 				case "30755-05.htm":
 				{
-					if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE))
-					{
-						htmltext = event;
-					}
+					htmltext = event;
 					break;
 				}
 				case "30755-06.html":
 				{
-					if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE))
-					{
-						st.startQuest();
-						htmltext = event;
-					}
+					st.startQuest();
+					htmltext = event;
 					break;
 				}
 			}

+ 5 - 18
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00904_DragonTrophyAntharas/Q00904_DragonTrophyAntharas.java

@@ -63,33 +63,20 @@ public class Q00904_DragonTrophyAntharas extends Quest
 		}
 		
 		String htmltext = null;
-		if (player.getLevel() >= MIN_LEVEL)
+		if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE))
 		{
 			switch (event)
 			{
 				case "30755-05.htm":
-				{
-					if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE))
-					{
-						htmltext = event;
-					}
-					break;
-				}
 				case "30755-06.htm":
 				{
-					if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE))
-					{
-						htmltext = event;
-					}
+					htmltext = event;
 					break;
 				}
 				case "30755-07.html":
 				{
-					if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE))
-					{
-						st.startQuest();
-						htmltext = event;
-					}
+					st.startQuest();
+					htmltext = event;
 					break;
 				}
 			}
@@ -177,7 +164,7 @@ public class Q00904_DragonTrophyAntharas extends Quest
 	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
 	{
 		final QuestState st = killer.getQuestState(getName());
-		if ((st != null) && Util.checkIfInRange(1500, npc, killer, false))
+		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, killer, false))
 		{
 			st.setCond(2, true);
 		}

+ 4 - 10
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00906_TheCallOfValakas/Q00906_TheCallOfValakas.java

@@ -62,25 +62,19 @@ public class Q00906_TheCallOfValakas extends Quest
 		}
 		
 		String htmltext = null;
-		if (player.getLevel() >= MIN_LEVEL)
+		if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE))
 		{
 			switch (event)
 			{
 				case "31540-05.htm":
 				{
-					if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE))
-					{
-						htmltext = event;
-					}
+					htmltext = event;
 					break;
 				}
 				case "31540-06.html":
 				{
-					if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE))
-					{
-						st.startQuest();
-						htmltext = event;
-					}
+					st.startQuest();
+					htmltext = event;
 					break;
 				}
 			}

+ 5 - 18
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00907_DragonTrophyValakas/Q00907_DragonTrophyValakas.java

@@ -60,33 +60,20 @@ public class Q00907_DragonTrophyValakas extends Quest
 		}
 		
 		String htmltext = null;
-		if (player.getLevel() >= MIN_LEVEL)
+		if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE))
 		{
 			switch (event)
 			{
 				case "31540-05.htm":
-				{
-					if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE))
-					{
-						htmltext = event;
-					}
-					break;
-				}
 				case "31540-06.htm":
 				{
-					if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE))
-					{
-						htmltext = event;
-					}
+					htmltext = event;
 					break;
 				}
 				case "31540-07.html":
 				{
-					if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE))
-					{
-						st.startQuest();
-						htmltext = event;
-					}
+					st.startQuest();
+					htmltext = event;
 					break;
 				}
 			}
@@ -174,7 +161,7 @@ public class Q00907_DragonTrophyValakas extends Quest
 	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
 	{
 		final QuestState st = killer.getQuestState(getName());
-		if ((st != null) && Util.checkIfInRange(1500, npc, killer, false))
+		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, killer, false))
 		{
 			st.setCond(2, true);
 		}

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-01.htm

@@ -0,0 +1,4 @@
+<html><body>Watcher of Antharas Theodric:<br>
+You have a <font color="LEVEL">Portal Stone</font>... it means that you are one of the few who can challenge Antharas. I have a task that may interest you.<br>
+<a action="bypass -h Quest Q10504_JewelOfAntharas 30755-05.htm">Continue listening.</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-02.html

@@ -0,0 +1,4 @@
+<html><body>Watcher of Antharas Theodric:<br>
+You do not have the ability to hear my request... Please come back after raising your caliber...<br>
+(Only characters above level 84 can undertake this quest.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-03.html

@@ -0,0 +1,4 @@
+<html><body>Watcher of Antharas Theodric:<br>
+Praise unto you for your great achievement in fulfilling my request...<br>
+(You have already completed this quest.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-04.html

@@ -0,0 +1,4 @@
+<html><body>Watcher of Antharas Theodric:<br>
+The fact that you don't have the <font color="LEVEL">Portal Stone</font> means you did not satisfy the minimum requirement for this mission.<br>
+If you really want to hear my request, you must first be recognized by <font color="LEVEL">Gabriel</font> in Giran Village.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-05.htm

@@ -0,0 +1,4 @@
+<html><body>Watcher of Antharas Theodric:<br>
+Actually, it is more of a challenge than a task. I have this <font color="LEVEL">Clear Crystal</font> I would like you to fill with the energy of Antharas.<br>
+<a action="bypass -h Quest Q10504_JewelOfAntharas 30755-06.htm">"Fill the crystal with energy... this sounds familiar."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-06.htm

@@ -0,0 +1,4 @@
+<html><body>Watcher of Antharas Theodric:<br>
+I have no idea what you are talking about. Maybe you are mistaking me for another Watcher and another Dragon. With this crystal in your possession, once you have defeated Antharas it should draw the energy of the land dragon into the crystal.<br>
+<a action="bypass -h Quest Q10504_JewelOfAntharas 30755-07.html">Accept the mission.</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-07.html

@@ -0,0 +1,5 @@
+<html><body>Watcher of Antharas Theodric:<br>
+Excellent. Take this <font color="LEVEL">Clear Crystal</font>.<br>
+I must warn you however, you will need <font color="LEVEL">many soldiers of equal skill in order to challenge Antharas.</font><br>
+Best of luck to you, sir!
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-08.html

@@ -0,0 +1,3 @@
+<html><body>Watcher of Antharas Theodric:<br>
+Apologies, sir! It does not appear as though you have defeated the land dragon. If you did that <font color="LEVEL">Clear Crystal</font> would be filled with Antharas’s energy. Good try though, sir! I’ll be keeping an eye on you and your shenanigans.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-09.html

@@ -0,0 +1,3 @@
+<html><body>Watcher of Antharas Theodric:<br>
+Without the <font color="LEVEL">Clear Crystal</font>, you cannot contain Antharas's energy even after defeating it. So please take this Clear Crystal.
+</body></html>

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/30755-10.html

@@ -0,0 +1,7 @@
+<html><body>Watcher of Antharas Theodric:<br>
+Amazing! I congratulate you on your accomplishment!<br>
+The crystal is filled with the energy of the land dragon.<br>
+You have brought back the land dragon's energy.<br>
+Alas... this victory is short lived. Though Antharas has been defeated and we may celebrate peace for now... the land dragon will return some day. <br>
+As always, I shall sit here and wait for that time to come. And when it does I await your return to vanquish the land dragon again. Please, take this... it should help you when the time comes again.
+</body></html>

+ 173 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/Q10504_JewelOfAntharas.java

@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2004-2013 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server 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 Server 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 quests.Q10504_JewelOfAntharas;
+
+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.util.Util;
+
+/**
+ * Jewel of Antharas (10504)
+ * @author Zoey76
+ */
+public class Q10504_JewelOfAntharas extends Quest
+{
+	// NPC
+	private static final int THEODRIC = 30755;
+	// Monsters
+	private static final int ANTHARAS_OLD = 29019;
+	private static final int ANTHARAS_WEAK = 29066;
+	private static final int ANTHARAS_NORMAL = 29067;
+	private static final int ANTHARAS_STRONG = 29068;
+	// Items
+	private static final int CLEAR_CRYSTAL = 21905;
+	private static final int FILLED_CRYSTAL_ANTHARAS_ENERGY = 21907;
+	private static final int JEWEL_OF_ANTHARAS = 21898;
+	private static final int PORTAL_STONE = 3865;
+	// Misc
+	private static final int MIN_LEVEL = 84;
+	
+	private Q10504_JewelOfAntharas(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(THEODRIC);
+		addTalkId(THEODRIC);
+		addKillId(ANTHARAS_OLD, ANTHARAS_WEAK, ANTHARAS_NORMAL, ANTHARAS_STRONG);
+		registerQuestItems(CLEAR_CRYSTAL, FILLED_CRYSTAL_ANTHARAS_ENERGY);
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(getName());
+		if (st == null)
+		{
+			return null;
+		}
+		
+		String htmltext = null;
+		if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(PORTAL_STONE))
+		{
+			switch (event)
+			{
+				case "30755-05.htm":
+				case "30755-06.htm":
+				{
+					htmltext = event;
+					break;
+				}
+				case "30755-07.html":
+				{
+					st.startQuest();
+					st.giveItems(CLEAR_CRYSTAL, 1);
+					htmltext = event;
+					break;
+				}
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(getName());
+		if (st == null)
+		{
+			return getNoQuestMsg(player);
+		}
+		
+		String htmltext = getNoQuestMsg(player);
+		switch (st.getState())
+		{
+			case State.CREATED:
+			{
+				if (player.getLevel() < MIN_LEVEL)
+				{
+					htmltext = "30755-02.html";
+				}
+				else if (!st.hasQuestItems(PORTAL_STONE))
+				{
+					htmltext = "30755-04.html";
+				}
+				else
+				{
+					htmltext = "30755-01.htm";
+				}
+				break;
+			}
+			case State.STARTED:
+			{
+				switch (st.getCond())
+				{
+					case 1:
+					{
+						if (st.hasQuestItems(CLEAR_CRYSTAL))
+						{
+							htmltext = "30755-08.html";
+						}
+						else
+						{
+							st.giveItems(CLEAR_CRYSTAL, 1);
+							htmltext = "30755-09.html";
+						}
+						break;
+					}
+					case 2:
+					{
+						st.giveItems(JEWEL_OF_ANTHARAS, 1);
+						st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+						st.exitQuest(false, true);
+						htmltext = "30755-10.html";
+						break;
+					}
+				}
+				break;
+			}
+			case State.COMPLETED:
+			{
+				htmltext = "30755-03.html";
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
+	{
+		final QuestState st = killer.getQuestState(getName());
+		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, killer, false))
+		{
+			st.takeItems(CLEAR_CRYSTAL, -1);
+			st.giveItems(FILLED_CRYSTAL_ANTHARAS_ENERGY, 1);
+			st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+			st.setCond(2, true);
+		}
+		return super.onKill(npc, killer, isPet);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q10504_JewelOfAntharas(10504, Q10504_JewelOfAntharas.class.getSimpleName(), "Jewel of Antharas");
+	}
+}

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-01.htm

@@ -0,0 +1,4 @@
+<html><body>Watcher of Valakas Klein:<br>
+You again... I thought I gave you a different errand. Or was it someone else?<br>
+<a action="bypass -h Quest Q10505_JewelOfValakas 31540-05.htm">"No, you've given me a few things to do."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-02.html

@@ -0,0 +1,4 @@
+<html><body>Watcher of Valakas Klein:<br>
+You do not have the ability to hear my request... Please come back after raising your caliber...<br>
+(Only characters above level 83 can undertake this quest.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-03.html

@@ -0,0 +1,4 @@
+<html><body>Watcher of Valakas Klein:<br>
+Praise unto you for your great achievement in fulfilling my request...<br>
+(You have already completed this quest.)
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-04.html

@@ -0,0 +1,4 @@
+<html><body>Watcher of Valakas Klein:<br>
+The fact that you don't have the <font color="LEVEL">Vacualite Floating Stone</font> means you did not satisfy the minimum requirement for this mission.<br>
+If you really want to hear my request, you must first obtain a <font color="LEVEL">Vacualite Floating Stone</font>.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-05.htm

@@ -0,0 +1,5 @@
+<html><body>Watcher of Valakas Klein:<br>
+Really? Okay... Hmm... <br>
+Why don't you take... ah... this <font color="LEVEL">Empty Crystal</font> and... fill it with... the energy of Valakas.<br>
+<a action="bypass -h Quest Q10505_JewelOfValakas 31540-06.htm">"Fill the crystal with energy... why?"</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-06.htm

@@ -0,0 +1,5 @@
+<html><body>Watcher of Valakas Klein:<br>
+Never you mind, that's why! <br>
+You think it is easy coming up with different reasons for you adventurers to go fight Valakas? He's big, bad, evil and scary. You want a reward for killing him then you bring me back a <font color="LEVEL">Crystal filled with the energy of Valakas!</font><br>
+<a action="bypass -h Quest Q10505_JewelOfValakas 31540-07.html">"Okay... I'll go fill the crystal with the energy of Valakas"</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-07.html

@@ -0,0 +1,5 @@
+<html><body>Watcher of Valakas Klein:<br>
+Good. Here is the <font color="LEVEL">Empty Crystal</font>.<br>
+As always, the same rules apply. Don't go alone, it's dangerous in there, be sure to <font color="LEVEL">gather a large group of skilled adventurers</font>, and try not to die.<br>
+Kill the beast, grab the energy, and visit me once you have completed your task.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-08.html

@@ -0,0 +1,3 @@
+<html><body>Watcher of Valakas Klein:<br>
+If you truly defeat the fire dragon, that <font color="LEVEL">Empty Crystal</font> shall be filled with Valakas's energy. Now, please be on your way. I shall be watching you.
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-09.html

@@ -0,0 +1,6 @@
+<html><body>Watcher of Valakas Klein:<br>
+Excellent. I can finally make my Valakas Martini. I would share with you, but given your condition of being alive I wouldn't recommend it. It has a killer bite... literally.<br>
+Oh, don't look so upset... once you've become undead maybe you can try a sip, but until that time you are just going to have to accept the consolation prize.<br>
+The Jewel of Valakas... a one way trip straight to the doorstep of Valakas himself. It will come in handy so you don't have to go through the business just to get there.<br>
+Now if you will excuse me... its me time.
+</body></html>

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/31540-10.html

@@ -0,0 +1,7 @@
+<html><body>Watcher of Valakas Klein:<br>
+Praise unto you for your great feat!<br>
+You have heard my request.<br>
+You have obtained the fire dragon's energy.<br>
+But the fire dragon has not fully retreated...<br>
+When you go against the beast in earnest, I shall give this to you...
+</body></html>

+ 170 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/Q10505_JewelOfValakas.java

@@ -0,0 +1,170 @@
+/*
+ * Copyright (C) 2004-2013 L2J Server
+ * 
+ * This file is part of L2J Server.
+ * 
+ * L2J Server 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 Server 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 quests.Q10505_JewelOfValakas;
+
+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.util.Util;
+
+/**
+ * Jewel of Valakas (10505)
+ * @author Zoey76
+ */
+public class Q10505_JewelOfValakas extends Quest
+{
+	// NPC
+	private static final int KLEIN = 31540;
+	// Monster
+	private static final int VALAKAS = 29028;
+	// Items
+	private static final int EMPTY_CRYSTAL = 21906;
+	private static final int FILLED_CRYSTAL_VALAKAS_ENERGY = 21908;
+	private static final int JEWEL_OF_VALAKAS = 21898;
+	private static final int VACUALITE_FLOATING_STONE = 7267;
+	// Misc
+	private static final int MIN_LEVEL = 83;
+	
+	private Q10505_JewelOfValakas(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(KLEIN);
+		addTalkId(KLEIN);
+		addKillId(VALAKAS);
+		registerQuestItems(EMPTY_CRYSTAL, FILLED_CRYSTAL_VALAKAS_ENERGY);
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(getName());
+		if (st == null)
+		{
+			return null;
+		}
+		
+		String htmltext = null;
+		if ((player.getLevel() >= MIN_LEVEL) && st.hasQuestItems(VACUALITE_FLOATING_STONE))
+		{
+			switch (event)
+			{
+				case "31540-05.htm":
+				case "31540-06.htm":
+				{
+					htmltext = event;
+					break;
+				}
+				case "31540-07.html":
+				{
+					st.startQuest();
+					st.giveItems(EMPTY_CRYSTAL, 1);
+					htmltext = event;
+					break;
+				}
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(getName());
+		if (st == null)
+		{
+			return getNoQuestMsg(player);
+		}
+		
+		String htmltext = getNoQuestMsg(player);
+		switch (st.getState())
+		{
+			case State.CREATED:
+			{
+				if (player.getLevel() < MIN_LEVEL)
+				{
+					htmltext = "31540-02.html";
+				}
+				else if (!st.hasQuestItems(VACUALITE_FLOATING_STONE))
+				{
+					htmltext = "31540-04.html";
+				}
+				else
+				{
+					htmltext = "31540-01.htm";
+				}
+				break;
+			}
+			case State.STARTED:
+			{
+				switch (st.getCond())
+				{
+					case 1:
+					{
+						if (st.hasQuestItems(EMPTY_CRYSTAL))
+						{
+							htmltext = "31540-08.html";
+						}
+						else
+						{
+							st.giveItems(EMPTY_CRYSTAL, 1);
+							htmltext = "31540-09.html";
+						}
+						break;
+					}
+					case 2:
+					{
+						st.giveItems(JEWEL_OF_VALAKAS, 1);
+						st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+						st.exitQuest(false, true);
+						htmltext = "31540-10.html";
+						break;
+					}
+				}
+				break;
+			}
+			case State.COMPLETED:
+			{
+				htmltext = "31540-03.html";
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
+	{
+		final QuestState st = killer.getQuestState(getName());
+		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, killer, false))
+		{
+			st.takeItems(EMPTY_CRYSTAL, -1);
+			st.giveItems(FILLED_CRYSTAL_VALAKAS_ENERGY, 1);
+			st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+			st.setCond(2, true);
+		}
+		return super.onKill(npc, killer, isPet);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q10505_JewelOfValakas(10505, Q10505_JewelOfValakas.class.getSimpleName(), "Jewel of Valakas");
+	}
+}