Browse Source

BETA: Using methods implemented in [L5744]:
* GPLv3 license update for package-info.java files.
* Minor update to Instances.
* Fixed #5399

Zoey76 12 years ago
parent
commit
21a900abaf
17 changed files with 105 additions and 182 deletions
  1. 2 2
      L2J_DataPack_BETA/dist/game/data/instances/SanctumoftheLordsofDawn.xml
  2. 14 10
      L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/package-info.java
  3. 14 10
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/package-info.java
  4. 14 10
      L2J_DataPack_BETA/dist/game/data/scripts/custom/package-info.java
  5. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/instances/FinalEmperialTomb/FinalEmperialTomb.java
  6. 5 3
      L2J_DataPack_BETA/dist/game/data/scripts/instances/SeedOfDestruction/Stage1.java
  7. 3 3
      L2J_DataPack_BETA/dist/game/data/scripts/instances/SeedOfInfinity/HallOfSuffering.java
  8. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00455_WingsOfSand/Q00455_WingsOfSand.java
  9. 9 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00903_TheCallOfAntharas/Q00903_TheCallOfAntharas.java
  10. 3 26
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00904_DragonTrophyAntharas/Q00904_DragonTrophyAntharas.java
  11. 9 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00906_TheCallOfValakas/Q00906_TheCallOfValakas.java
  12. 3 26
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00907_DragonTrophyValakas/Q00907_DragonTrophyValakas.java
  13. 3 26
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10501_ZakenEmbroideredSoulCloak/Q10501_ZakenEmbroideredSoulCloak.java
  14. 3 26
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10502_FreyaEmbroideredSoulCloak/Q10502_FreyaEmbroideredSoulCloak.java
  15. 3 26
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10503_FrintezzaEmbroideredSoulCloak/Q10503_FrintezzaEmbroideredSoulCloak.java
  16. 9 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/Q10504_JewelOfAntharas.java
  17. 9 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/Q10505_JewelOfValakas.java

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/instances/SanctumoftheLordsofDawn.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<instance name="SanctumOftheLordsOfDawn">
+<instance name="SanctumOftheLordsOfDawn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/instance.xsd">
 	<activityTime val="60" />
-	<emptyDestroyTime val="900" />
 	<allowSummon val="false" />
+	<emptyDestroyTime val="900" />
 	<spawnPoint spawnX="-12797" spawnY="122675" spawnZ="-3117" />
 	<doorlist>
 		<door doorId="17240001" />

+ 14 - 10
L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/package-info.java

@@ -1,16 +1,20 @@
 /*
- * 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.
+ * Copyright (C) 2004-2013 L2J DataPack
  * 
- * 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.
+ * This file is part of L2J DataPack.
  * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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/>.
  */
 
 /**

+ 14 - 10
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/Teleports/package-info.java

@@ -1,16 +1,20 @@
 /*
- * 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.
+ * Copyright (C) 2004-2013 L2J DataPack
  * 
- * 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.
+ * This file is part of L2J DataPack.
  * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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/>.
  */
 
 /**

+ 14 - 10
L2J_DataPack_BETA/dist/game/data/scripts/custom/package-info.java

@@ -1,16 +1,20 @@
 /*
- * 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.
+ * Copyright (C) 2004-2013 L2J DataPack
  * 
- * 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.
+ * This file is part of L2J DataPack.
  * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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/>.
  */
 
 /**

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/instances/FinalEmperialTomb/FinalEmperialTomb.java

@@ -804,7 +804,7 @@ public class FinalEmperialTomb extends Quest
 						}
 						break;
 				}
-				world.setStatus(world.getStatus() + 1);
+				world.incStatus();
 				return true;
 			}
 			finally

+ 5 - 3
L2J_DataPack_BETA/dist/game/data/scripts/instances/SeedOfDestruction/Stage1.java

@@ -552,7 +552,7 @@ public class Stage1 extends Quest
 					// instance end
 					break;
 				}
-				world.setStatus(world.getStatus() + 1);
+				world.incStatus();
 				return true;
 			}
 			finally
@@ -788,7 +788,9 @@ public class Stage1 extends Quest
 			else if (world.getStatus() == 2)
 			{
 				if (checkKillProgress(npc, world))
-					world.setStatus(world.getStatus() + 1);
+				{
+					world.incStatus();
+				}
 			}
 			else if (world.getStatus() == 4 && npc.getNpcId() == OBELISK)
 			{
@@ -808,7 +810,7 @@ public class Stage1 extends Quest
 			{
 				if (npc.getNpcId() == TIAT)
 				{
-					world.setStatus(world.getStatus() + 1);
+					world.incStatus();
 					for(int objId : world.getAllowed())
 					{
 						L2PcInstance pl = L2World.getInstance().getPlayer(objId);

+ 3 - 3
L2J_DataPack_BETA/dist/game/data/scripts/instances/SeedOfInfinity/HallOfSuffering.java

@@ -264,12 +264,12 @@ public class HallOfSuffering extends Quest
 		mob.setIsImmobilized(true);
 		mob.setCurrentHp(mob.getMaxHp()*0.5);
 		world.npcList.put(mob, false);
-		world.setStatus(world.getStatus() + 1);
+		world.incStatus();
 	}
 	
 	protected void runTwins(HSWorld world)
 	{
-		world.setStatus(world.getStatus() + 1);
+		world.incStatus();
 		world.klodekus = addSpawn(TWIN_SPAWNS[0][0], TWIN_SPAWNS[0][1], TWIN_SPAWNS[0][2], TWIN_SPAWNS[0][3], 0, false,0,false,world.getInstanceId());
 		world.klanikus = addSpawn(TWIN_SPAWNS[1][0], TWIN_SPAWNS[1][1], TWIN_SPAWNS[1][2], TWIN_SPAWNS[1][3], 0, false,0,false,world.getInstanceId());
 		world.klanikus.setIsMortal(false);
@@ -520,7 +520,7 @@ public class HallOfSuffering extends Quest
 			{
 				if (world.klanikus.isDead() && world.klodekus.isDead())
 				{
-					world.setStatus(world.getStatus() + 1);
+					world.incStatus();
 					// instance end
 					calcRewardItemId(world);
 					world.klanikus = null;

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00455_WingsOfSand/Q00455_WingsOfSand.java

@@ -32,7 +32,7 @@ import com.l2jserver.gameserver.util.Util;
  */
 public class Q00455_WingsOfSand extends Quest
 {
-	// NPC
+	// NPCs
 	private static final int[] SEPARATED_SOULS =
 	{
 		32864,

+ 9 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00903_TheCallOfAntharas/Q00903_TheCallOfAntharas.java

@@ -163,8 +163,15 @@ public class Q00903_TheCallOfAntharas extends Quest
 	@Override
 	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
 	{
-		final QuestState st = killer.getQuestState(getName());
-		if ((st != null) && Util.checkIfInRange(1500, npc, killer, false))
+		executeForEachPlayer(killer, npc, isPet, true, false);
+		return super.onKill(npc, killer, isPet);
+	}
+	
+	@Override
+	public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isPet)
+	{
+		final QuestState st = player.getQuestState(getName());
+		if ((st != null) && Util.checkIfInRange(1500, npc, player, false))
 		{
 			switch (npc.getNpcId())
 			{
@@ -187,7 +194,6 @@ public class Q00903_TheCallOfAntharas extends Quest
 				st.setCond(2, true);
 			}
 		}
-		return super.onKill(npc, killer, isPet);
 	}
 	
 	public static void main(String[] args)

+ 3 - 26
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00904_DragonTrophyAntharas/Q00904_DragonTrophyAntharas.java

@@ -18,7 +18,6 @@
  */
 package quests.Q00904_DragonTrophyAntharas;
 
-import com.l2jserver.gameserver.model.L2Party;
 import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.quest.Quest;
@@ -164,34 +163,12 @@ public class Q00904_DragonTrophyAntharas extends Quest
 	@Override
 	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
 	{
-		if (killer.isInParty())
-		{
-			if (killer.getParty().isInCommandChannel())
-			{
-				for (L2Party party : killer.getParty().getCommandChannel().getPartys())
-				{
-					for (L2PcInstance player : party.getMembers())
-					{
-						rewardPlayer(player, npc);
-					}
-				}
-			}
-			else
-			{
-				for (L2PcInstance player : killer.getParty().getMembers())
-				{
-					rewardPlayer(player, npc);
-				}
-			}
-		}
-		else
-		{
-			rewardPlayer(killer, npc);
-		}
+		executeForEachPlayer(killer, npc, isPet, true, true);
 		return super.onKill(npc, killer, isPet);
 	}
 	
-	private final void rewardPlayer(L2PcInstance player, L2Npc npc)
+	@Override
+	public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isPet)
 	{
 		final QuestState st = player.getQuestState(getName());
 		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, player, false))

+ 9 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00906_TheCallOfValakas/Q00906_TheCallOfValakas.java

@@ -161,14 +161,20 @@ public class Q00906_TheCallOfValakas extends Quest
 	@Override
 	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
 	{
-		final QuestState st = killer.getQuestState(getName());
-		if ((st != null) && Util.checkIfInRange(1500, npc, killer, false))
+		executeForEachPlayer(killer, npc, isPet, true, false);
+		return super.onKill(npc, killer, isPet);
+	}
+	
+	@Override
+	public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isPet)
+	{
+		final QuestState st = player.getQuestState(getName());
+		if ((st != null) && Util.checkIfInRange(1500, npc, player, false))
 		{
 			st.giveItems(LAVASAURUS_ALPHA_FRAGMENT, 1);
 			st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
 			st.setCond(2, true);
 		}
-		return super.onKill(npc, killer, isPet);
 	}
 	
 	public static void main(String[] args)

+ 3 - 26
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00907_DragonTrophyValakas/Q00907_DragonTrophyValakas.java

@@ -18,7 +18,6 @@
  */
 package quests.Q00907_DragonTrophyValakas;
 
-import com.l2jserver.gameserver.model.L2Party;
 import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.quest.Quest;
@@ -161,34 +160,12 @@ public class Q00907_DragonTrophyValakas extends Quest
 	@Override
 	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
 	{
-		if (killer.isInParty())
-		{
-			if (killer.getParty().isInCommandChannel())
-			{
-				for (L2Party party : killer.getParty().getCommandChannel().getPartys())
-				{
-					for (L2PcInstance player : party.getMembers())
-					{
-						rewardPlayer(player, npc);
-					}
-				}
-			}
-			else
-			{
-				for (L2PcInstance player : killer.getParty().getMembers())
-				{
-					rewardPlayer(player, npc);
-				}
-			}
-		}
-		else
-		{
-			rewardPlayer(killer, npc);
-		}
+		executeForEachPlayer(killer, npc, isPet, true, true);
 		return super.onKill(npc, killer, isPet);
 	}
 	
-	private final void rewardPlayer(L2PcInstance player, L2Npc npc)
+	@Override
+	public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isPet)
 	{
 		final QuestState st = player.getQuestState(getName());
 		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, player, false))

+ 3 - 26
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10501_ZakenEmbroideredSoulCloak/Q10501_ZakenEmbroideredSoulCloak.java

@@ -18,7 +18,6 @@
  */
 package quests.Q10501_ZakenEmbroideredSoulCloak;
 
-import com.l2jserver.gameserver.model.L2Party;
 import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.quest.Quest;
@@ -116,34 +115,12 @@ public class Q10501_ZakenEmbroideredSoulCloak extends Quest
 	@Override
 	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
 	{
-		if (killer.isInParty())
-		{
-			if (killer.getParty().isInCommandChannel())
-			{
-				for (L2Party party : killer.getParty().getCommandChannel().getPartys())
-				{
-					for (L2PcInstance player : party.getMembers())
-					{
-						rewardPlayer(player, npc);
-					}
-				}
-			}
-			else
-			{
-				for (L2PcInstance player : killer.getParty().getMembers())
-				{
-					rewardPlayer(player, npc);
-				}
-			}
-		}
-		else
-		{
-			rewardPlayer(killer, npc);
-		}
+		executeForEachPlayer(killer, npc, isPet, true, true);
 		return super.onKill(npc, killer, isPet);
 	}
 	
-	private final void rewardPlayer(L2PcInstance player, L2Npc npc)
+	@Override
+	public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isPet)
 	{
 		final QuestState st = player.getQuestState(getName());
 		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, player, false))

+ 3 - 26
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10502_FreyaEmbroideredSoulCloak/Q10502_FreyaEmbroideredSoulCloak.java

@@ -18,7 +18,6 @@
  */
 package quests.Q10502_FreyaEmbroideredSoulCloak;
 
-import com.l2jserver.gameserver.model.L2Party;
 import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.quest.Quest;
@@ -116,34 +115,12 @@ public class Q10502_FreyaEmbroideredSoulCloak extends Quest
 	@Override
 	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
 	{
-		if (killer.isInParty())
-		{
-			if (killer.getParty().isInCommandChannel())
-			{
-				for (L2Party party : killer.getParty().getCommandChannel().getPartys())
-				{
-					for (L2PcInstance player : party.getMembers())
-					{
-						rewardPlayer(player, npc);
-					}
-				}
-			}
-			else
-			{
-				for (L2PcInstance player : killer.getParty().getMembers())
-				{
-					rewardPlayer(player, npc);
-				}
-			}
-		}
-		else
-		{
-			rewardPlayer(killer, npc);
-		}
+		executeForEachPlayer(killer, npc, isPet, true, true);
 		return super.onKill(npc, killer, isPet);
 	}
 	
-	private final void rewardPlayer(L2PcInstance player, L2Npc npc)
+	@Override
+	public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isPet)
 	{
 		final QuestState st = player.getQuestState(getName());
 		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, player, false))

+ 3 - 26
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10503_FrintezzaEmbroideredSoulCloak/Q10503_FrintezzaEmbroideredSoulCloak.java

@@ -18,7 +18,6 @@
  */
 package quests.Q10503_FrintezzaEmbroideredSoulCloak;
 
-import com.l2jserver.gameserver.model.L2Party;
 import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.quest.Quest;
@@ -116,34 +115,12 @@ public class Q10503_FrintezzaEmbroideredSoulCloak extends Quest
 	@Override
 	public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
 	{
-		if (killer.isInParty())
-		{
-			if (killer.getParty().isInCommandChannel())
-			{
-				for (L2Party party : killer.getParty().getCommandChannel().getPartys())
-				{
-					for (L2PcInstance player : party.getMembers())
-					{
-						rewardPlayer(player, npc);
-					}
-				}
-			}
-			else
-			{
-				for (L2PcInstance player : killer.getParty().getMembers())
-				{
-					rewardPlayer(player, npc);
-				}
-			}
-		}
-		else
-		{
-			rewardPlayer(killer, npc);
-		}
+		executeForEachPlayer(killer, npc, isPet, true, true);
 		return super.onKill(npc, killer, isPet);
 	}
 	
-	private final void rewardPlayer(L2PcInstance player, L2Npc npc)
+	@Override
+	public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isPet)
 	{
 		final QuestState st = player.getQuestState(getName());
 		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, player, false))

+ 9 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10504_JewelOfAntharas/Q10504_JewelOfAntharas.java

@@ -155,15 +155,21 @@ public class Q10504_JewelOfAntharas extends Quest
 	@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))
+		executeForEachPlayer(killer, npc, isPet, true, true);
+		return super.onKill(npc, killer, isPet);
+	}
+	
+	@Override
+	public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isPet)
+	{
+		final QuestState st = player.getQuestState(getName());
+		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, player, 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)

+ 9 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q10505_JewelOfValakas/Q10505_JewelOfValakas.java

@@ -152,15 +152,21 @@ public class Q10505_JewelOfValakas extends Quest
 	@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))
+		executeForEachPlayer(killer, npc, isPet, true, true);
+		return super.onKill(npc, killer, isPet);
+	}
+	
+	@Override
+	public void actionForEachPlayer(L2PcInstance player, L2Npc npc, boolean isPet)
+	{
+		final QuestState st = player.getQuestState(getName());
+		if ((st != null) && st.isCond(1) && Util.checkIfInRange(1500, npc, player, 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)