Browse Source

BETA: Mithril Mines related quest in Java:
* '''Grave Robber Rescue''' (450)
* '''Lucien's Altar''' (451)

malyelfik 12 years ago
parent
commit
6bf7cff998
31 changed files with 414 additions and 288 deletions
  1. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  2. 0 7
      L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-02.htm
  3. 0 6
      L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-03.htm
  4. 0 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-06.htm
  5. 0 119
      L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/__init__.py
  6. 0 107
      L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/__init__.py
  7. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-01.htm
  8. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-02.htm
  9. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-03.html
  10. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-04.htm
  11. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-05.htm
  12. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-06.html
  13. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-07.htm
  14. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-08.html
  15. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-09.html
  16. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-10.html
  17. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32651-01.html
  18. 188 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/Q00450_GraveRobberRescue.java
  19. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-01.htm
  20. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-02.htm
  21. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-03.html
  22. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-04.htm
  23. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-05.htm
  24. 2 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-08.html
  25. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-09.html
  26. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-10.html
  27. 159 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/Q00451_LuciensAltar.java
  28. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/findother.html
  29. 3 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/recharge.html
  30. 27 27
      L2J_DataPack_BETA/dist/sql/game/spawnlist.sql
  31. 2 0
      L2J_DataPack_BETA/dist/sql/game/updates/20121223update.sql

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

@@ -609,8 +609,8 @@ quests/Q00423_TakeYourBestShot/Q00423_TakeYourBestShot.java
 quests/426_FishingShot/__init__.py
 quests/431_WeddingMarch/__init__.py
 quests/Q00432_BirthdayPartySong/Q00432_BirthdayPartySong.java
-quests/450_GraveRobberMemberRescue/__init__.py
-quests/451_LuciensAltar/__init__.py
+quests/Q00450_GraveRobberRescue/Q00450_GraveRobberRescue.java
+quests/Q00451_LuciensAltar/Q00451_LuciensAltar.java
 quests/Q00452_FindingtheLostSoldiers/Q00452_FindingtheLostSoldiers.java
 quests/Q00453_NotStrongEnoughAlone/Q00453_NotStrongEnoughAlone.java
 quests/Q00457_LostAndFound/Q00457_LostAndFound.java

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-02.htm

@@ -1,7 +0,0 @@
-<html><body>Grave Robber Leader Kanemika:<br>
-One day, a Dwarf came to see me. I could not see his face because he was wearing a scarf but...he promised to give me a good sum of Adena if I found something hidden in this mine. <br>
-But he fooled us! We just did what he told us to do, but then evil spirits spread out to every corner of the mine. Gak! Now my followers have been driven mad. <br>
-Would you help me save my followers?<br>
-<a action="bypass -h Quest 450_GraveRobberMemberRescue 32650-03.htm">"I couldn't care less about your problems."</a><br>
-<a action="bypass -h Quest 450_GraveRobberMemberRescue 32650-05.htm">"Yes, I will help you."</a>
-</body></html>

+ 0 - 6
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-03.htm

@@ -1,6 +0,0 @@
-<html><body>Grave Robber Leader Kanemika:<br>
-Hey, look here...even if you think grave robbers are animals -- heh heh -- don't we still have a right to live?<br>
-Please! Please help save my poor followers!<br>
-<a action="bypass -h Quest 450_GraveRobberMemberRescue 32650-04.htm">"This is none of my business. You're on your own."</a><br>
-<a action="bypass -h Quest 450_GraveRobberMemberRescue 32650-05.htm">"I guess you're right. I'll help you."</a>
-</body></html>

+ 0 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-06.htm

@@ -1,4 +0,0 @@
-<html><body>Grave Robber Leader Kanemika:<br>
-If you see any normal  <font color="LEVEL">Grave Robber Warriors</font> roaming through the mine, tell them to hide in a safe place. Bring me  <font color="LEVEL">10 Proofs of Migration</font>as evidence that you were able to persuade them and I'll reward you handsomely.<br>
-Wha...wait! Didn't I already tell you all this?
-</body></html>

+ 0 - 119
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/__init__.py

@@ -1,119 +0,0 @@
-#Created by Bloodshed
-import sys
-from java.lang	import System
-from java.util	import Calendar
-from com.l2jserver.gameserver.ai					import CtrlIntention
-from com.l2jserver.gameserver.model					import L2CharPosition
-from com.l2jserver.gameserver.model.quest			import State
-from com.l2jserver.gameserver.model.quest			import QuestState
-from com.l2jserver.gameserver.model.quest.jython	import QuestJython as JQuest
-from com.l2jserver.gameserver.network				import NpcStringId
-from com.l2jserver.gameserver.network.serverpackets	import NpcSay
-from com.l2jserver.gameserver.network.serverpackets	import ExShowScreenMessage
-
-qn = "450_GraveRobberMemberRescue"
-
-KANEMIKA	= 32650
-WARRIOR_NPC	= 32651
-
-WARRIOR_MON	= 22741
-
-EVIDENCE_OF_MIGRATION	= 14876
-ADENA	= 57
-
-RESET_HOUR = 6
-RESET_MIN  = 30
-
-class Quest (JQuest) :
-
-	def __init__(self,id,name,descr):
-		JQuest.__init__(self,id,name,descr)
-		self.questItemIds = [EVIDENCE_OF_MIGRATION]
-
-	def onAdvEvent (self,event,npc,player) :
-		htmltext = event
-		st = player.getQuestState(qn)
-		if not st : return
-
-		if event == "32650-05.htm" :
-			st.set("cond","1")
-			st.setState(State.STARTED)
-			st.playSound("ItemSound.quest_accept")
-		return htmltext
-
-	def onTalk (self,npc,player) :
-		htmltext = Quest.getNoQuestMsg(player) 
-		st = player.getQuestState(qn) 
-		if not st : return htmltext
-
-		npcId = npc.getNpcId()
-		cond = st.getInt("cond")
-		id = st.getState()
-		if npcId == KANEMIKA :
-			if cond == 0 :
-				reset = st.get("reset")
-				remain = 0
-				if reset and reset.isdigit() :
-					remain = long(reset) - System.currentTimeMillis()
-				if remain <= 0 :
-					if player.getLevel() >= 80 :
-						htmltext = "32650-01.htm"
-					else :
-						htmltext = "32650-00.htm"
-						st.exitQuest(True)
-				else :
-					htmltext = "32650-09.htm"
-			elif cond == 1 :
-				if st.getQuestItemsCount(EVIDENCE_OF_MIGRATION) >= 1 :
-					htmltext = "32650-07.htm"
-				else :
-					htmltext = "32650-06.htm"
-			elif cond == 2 and st.getQuestItemsCount(EVIDENCE_OF_MIGRATION) == 10 :
-				htmltext = "32650-08.htm"
-				st.giveItems(ADENA,65000)
-				st.takeItems(EVIDENCE_OF_MIGRATION,10)
-				st.setState(State.COMPLETED)
-				st.unset("cond")
-				st.exitQuest(False)
-				st.playSound("ItemSound.quest_finish")
-				reset = Calendar.getInstance()
-				reset.set(Calendar.MINUTE, RESET_MIN)
-				# if time is >= RESET_HOUR - roll to the next day
-				if reset.get(Calendar.HOUR_OF_DAY) >= RESET_HOUR :
-					reset.add(Calendar.DATE, 1)
-				reset.set(Calendar.HOUR_OF_DAY, RESET_HOUR)
-				st.set("reset",str(reset.getTimeInMillis()))
-		elif cond == 1 and npcId == WARRIOR_NPC :
-			if self.getRandom(100) < 50 :
-				htmltext = "32651-01.htm"
-				st.giveItems(EVIDENCE_OF_MIGRATION,1)
-				st.playSound("ItemSound.quest_itemget")
-				npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, L2CharPosition(npc.getX()+100, npc.getY()+100, npc.getZ(), 0))
-				npc.getSpawn().decreaseCount(npc)
-				npc.deleteMe()
-				if st.getQuestItemsCount(EVIDENCE_OF_MIGRATION) == 10 :
-					st.set("cond","2")
-					st.playSound("ItemSound.quest_middle")
-			else :
-				htmltext = ""
-				player.sendPacket(ExShowScreenMessage(2, 0, 5, 0, 1, 0, 0, 2, 4000 , 1, "", NpcStringId.THE_GRAVE_ROBBER_WARRIOR_HAS_BEEN_FILLED_WITH_DARK_ENERGY_AND_IS_ATTACKING_YOU))
-				warrior = st.addSpawn(WARRIOR_MON,npc.getX(),npc.getY(),npc.getZ(),npc.getHeading(),True,600000)
-				warrior.setRunning()
-				warrior.addDamageHate(player,0,999)
-				warrior.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player)
-				if self.getRandom(100) < 50 :
-					npc.broadcastPacket(NpcSay(npc.getObjectId(), 0, npc.getNpcId(), NpcStringId.GRUNT_OH))
-					npc.getSpawn().decreaseCount(npc)
-					npc.deleteMe()
-				else :
-					npc.broadcastPacket(NpcSay(npc.getObjectId(), 0, npc.getNpcId(), NpcStringId.GRUNT_WHATS_WRONG_WITH_ME))
-					npc.getSpawn().decreaseCount(npc)
-					npc.deleteMe()
-		return htmltext
-
-QUEST		= Quest(450,qn,"Grave Robber Member Rescue")
-
-QUEST.addStartNpc(KANEMIKA)
-
-QUEST.addTalkId(KANEMIKA)
-QUEST.addTalkId(WARRIOR_NPC)

+ 0 - 107
L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/__init__.py

@@ -1,107 +0,0 @@
-#Created by Bloodshed
-import sys
-from java.lang	import System
-from java.util	import Calendar
-from com.l2jserver.gameserver.model.quest			import State
-from com.l2jserver.gameserver.model.quest			import QuestState
-from com.l2jserver.gameserver.model.quest.jython	import QuestJython as JQuest
-
-qn = "451_LuciensAltar"
-
-DAICHIR	= 30537
-
-REPLENISHED_BEAD	= 14877
-DISCHARGED_BEAD		= 14878
-ADENA	= 57
-
-ALTARS	= {
-	32706:1,
-	32707:2,
-	32708:4,
-	32709:8,
-	32710:16
-	}
-
-RESET_HOUR = 6
-RESET_MIN  = 30
-
-class Quest (JQuest) :
-
-	def __init__(self,id,name,descr):
-		JQuest.__init__(self,id,name,descr)
-		self.questItemIds = [REPLENISHED_BEAD,DISCHARGED_BEAD]
-
-	def onAdvEvent (self,event,npc,player) :
-		htmltext = event
-		st = player.getQuestState(qn)
-		if not st : return
-		if event == "30537-03.htm" :
-			st.set("cond","1")
-			st.set("altars_state","0")
-			st.setState(State.STARTED)
-			st.giveItems(REPLENISHED_BEAD,5)
-			st.playSound("ItemSound.quest_accept")
-		return htmltext
-
-	def onTalk (self,npc,player) :
-		htmltext = Quest.getNoQuestMsg(player) 
-		st = player.getQuestState(qn) 
-		if not st : return htmltext
-
-		npcId = npc.getNpcId()
-		cond = st.getInt("cond")
-		if npcId == DAICHIR :
-			if cond == 0 :
-				reset = st.get("reset")
-				remain = 0
-				if reset and reset.isdigit() :
-					remain = long(reset) - System.currentTimeMillis()
-				if remain <= 0 :
-					if player.getLevel() >= 80 :
-						htmltext = "30537-01.htm"
-					else :
-						htmltext = "30537-00.htm"
-						st.exitQuest(True)
-				else :
-					htmltext = "30537-06.htm"
-			elif cond == 1 :
-				htmltext = "30537-04.htm"
-			elif cond == 2 :
-				htmltext = "30537-05.htm"
-				st.giveItems(ADENA,127690)
-				st.takeItems(DISCHARGED_BEAD,5)
-				st.setState(State.COMPLETED)
-				st.unset("cond")
-				st.unset("altars_state")
-				st.exitQuest(False)
-				st.playSound("ItemSound.quest_finish")
-				reset = Calendar.getInstance()
-				reset.set(Calendar.MINUTE, RESET_MIN)
-				# if time is >= RESET_HOUR - roll to the next day
-				if reset.get(Calendar.HOUR_OF_DAY) >= RESET_HOUR :
-					reset.add(Calendar.DATE, 1)
-				reset.set(Calendar.HOUR_OF_DAY, RESET_HOUR)
-				st.set("reset",str(reset.getTimeInMillis()))
-		elif cond == 1 and npcId in ALTARS.keys() :
-			idx = ALTARS[npcId]
-			state = st.getInt("altars_state")
-			if (state & idx) == 0 :
-				st.set("altars_state",str(state | idx))
-				st.takeItems(REPLENISHED_BEAD,1)
-				st.giveItems(DISCHARGED_BEAD,1)
-				st.playSound("ItemSound.quest_itemget")
-				if st.getQuestItemsCount(DISCHARGED_BEAD) == 5 :
-					st.set("cond","2")
-					st.playSound("ItemSound.quest_middle")
-				htmltext = "recharge.htm"
-			else :
-				htmltext = "findother.htm"
-		return htmltext
-
-QUEST		= Quest(451,qn,"Lucien's Altar")
-
-QUEST.addStartNpc(DAICHIR)
-QUEST.addTalkId(DAICHIR)
-
-for altarId in ALTARS.keys() :
-	QUEST.addTalkId(altarId)

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-01.htm

@@ -1,4 +1,4 @@
 <html><body>Grave Robber Leader Kanemika:<br>
 Yuk yuk! I am Kanemika, leader of these grave robbers. You look strong enough, eh? How about doing me a favor?<br>
-<a action="bypass -h Quest 450_GraveRobberMemberRescue 32650-02.htm">"What is is?"</a>
+<a action="bypass -h Quest Q00450_GraveRobberRescue 32650-04.htm">"What is it?"</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-00.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-02.htm

@@ -1,5 +1,5 @@
 <html><body>Grave Robber Leader Kanemika:<br>
 What a weakling! Oh, you wouldn't last long.<br>
 I can't ask you. No, no mission for you.<br>
-(Only characters who are level 80 or higher may undertake on this Quest.)
+(Only characters who are level 80 or higher may undertake this quest.)
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-09.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-03.html

@@ -1,5 +1,5 @@
 <html><body>Grave Robber Leader Kanemika:<br>
-You already did what I asked today, remember? <br>
+You already did what I asked today, remember?<br>
 Thanks, but I don't need anything else right now.<br>
 (You can only undertake this quest once a day. It resets every day at 6:30 AM.)
 </body></html>

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-04.htm

@@ -0,0 +1,7 @@
+<html><body>Grave Robber Leader Kanemika:<br>
+One day, a Dwarf came to see me. I could not see his face because he was wearing a scarf but...he promised to give me a good sum of Adena if I found something hidden in this mine.<br>
+But he fooled us! We just did what he told us to do, but then evil spirits spread out to every corner of the mine. Gak! Now my followers have been driven mad.<br
+>Would you help me save my followers?<br>
+<a action="bypass -h Quest Q00450_GraveRobberRescue 32650-05.htm">"I couldn't care less about your problems."</a><br>
+<a action="bypass -h Quest Q00450_GraveRobberRescue 32650-07.htm">"Yes, I will help you."</a>
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-05.htm

@@ -0,0 +1,6 @@
+<html><body>Grave Robber Leader Kanemika:<br>
+Hey, look here...even if you think grave robbers are animals -- heh heh -- don't we still have a right to live?<br>
+Please! Please help save my poor followers!<br>
+<a action="bypass -h Quest Q00450_GraveRobberRescue 32650-06.html">"This is none of my business. You're on your own."</a><br>
+<a action="bypass -h Quest Q00450_GraveRobberRescue 32650-07.htm">"I guess you're right. I'll help you."</a>
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-06.html


+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-07.htm

@@ -1,5 +1,5 @@
 <html><body>Grave Robber Leader Kanemika:<br>
-We can't do anything for the ones who are already possessed by the evil spirits. But there are still some who have escaped their influence. <br>
+We can't do anything for the ones who are already possessed by the evil spirits. But there are still some who have escaped their influence.<br>
 If you see any normal <font color="LEVEL">Grave Robber Warriors</font> roaming through the mine, tell them to hide in a safe place. Bring me <font color="LEVEL">10 Evidence of Migration</font> as proof that you were able to persuade them and I'll reward you handsomely.<br>
-Kuk, but know this: those who are possessed will probably attack you... If that happens, do what you have to do... 
+Kuk, but know this: those who are possessed will probably attack you... If that happens, do what you have to do...
 </body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-08.html

@@ -0,0 +1,4 @@
+<html><body>Grave Robber Leader Kanemika:<br>
+If you see any normal <font color="LEVEL">Grave Robber Warriors</font> roaming through the mine, tell them to hide in a safe place. Bring me <font color="LEVEL">10 Proofs of Migration</font> as evidence that you were able to persuade them and I'll reward you handsomely.<br>
+Wha...wait! Didn't I already tell you all this?
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-07.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-09.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32650-08.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32650-10.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/450_GraveRobberMemberRescue/32651-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/32651-01.html


+ 188 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00450_GraveRobberRescue/Q00450_GraveRobberRescue.java

@@ -0,0 +1,188 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package quests.Q00450_GraveRobberRescue;
+
+import com.l2jserver.gameserver.ai.CtrlIntention;
+import com.l2jserver.gameserver.model.L2CharPosition;
+import com.l2jserver.gameserver.model.actor.L2Attackable;
+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.QuestState.QuestType;
+import com.l2jserver.gameserver.model.quest.State;
+import com.l2jserver.gameserver.network.NpcStringId;
+import com.l2jserver.gameserver.network.clientpackets.Say2;
+import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
+import com.l2jserver.gameserver.network.serverpackets.NpcSay;
+
+/**
+ * Grave Robber Rescue (450)<br>
+ * Original Jython script by Bloodshed.
+ * @author malyelfik
+ */
+public class Q00450_GraveRobberRescue extends Quest
+{
+	// NPCs
+	private static final int KANEMIKA = 32650;
+	private static final int WARRIOR = 32651;
+	
+	// Monster
+	private static final int WARRIOR_MON = 22741;
+	
+	// Items
+	private static final int EVIDENCE_OF_MIGRATION = 14876;
+	
+	// Misc
+	private static final int MIN_LEVEL = 80;
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(getName());
+		
+		if (st == null)
+		{
+			return null;
+		}
+		
+		String htmltext = event;
+		switch (event)
+		{
+			case "32650-04.htm":
+			case "32650-05.htm":
+			case "32650-06.html":
+				break;
+			case "32650-07.htm":
+				st.startQuest();
+				break;
+			case "despawn":
+				npc.setBusy(false);
+				npc.deleteMe();
+				htmltext = null;
+				break;
+			default:
+				htmltext = null;
+				break;
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		final QuestState st = player.getQuestState(getName());
+		
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		if (npc.getNpcId() == KANEMIKA)
+		{
+			switch (st.getState())
+			{
+				case State.COMPLETED:
+					if (!st.isNowAvailable())
+					{
+						htmltext = "32650-03.html";
+						break;
+					}
+					st.setState(State.CREATED);
+				case State.CREATED:
+					htmltext = (player.getLevel() >= MIN_LEVEL) ? "32650-01.htm" : "32650-02.htm";
+					break;
+				case State.STARTED:
+					if (st.isCond(1))
+					{
+						if (!st.hasQuestItems(EVIDENCE_OF_MIGRATION))
+						{
+							htmltext = "32650-08.html";
+						}
+						else
+						{
+							htmltext = "32650-09.html";
+						}
+					}
+					else
+					{
+						st.giveAdena(65000, true); // Glory days reward: 6 886 980 exp, 8 116 410 sp, 371 400 Adena
+						st.exitQuest(QuestType.DAILY, true);
+						htmltext = "32650-10.html";
+					}
+					break;
+			}
+		}
+		else if (st.isCond(1))
+		{
+			if (npc.isBusy())
+			{
+				return null;
+			}
+			
+			if (getRandom(100) < 66)
+			{
+				st.giveItems(EVIDENCE_OF_MIGRATION, 1);
+				st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+				npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(npc.getX() + 100, npc.getY() + 100, npc.getZ(), 0));
+				npc.setBusy(true);
+				
+				startQuestTimer("despawn", 3000, npc, player);
+				
+				if (st.getQuestItemsCount(EVIDENCE_OF_MIGRATION) == 10)
+				{
+					st.setCond(2, true);
+				}
+				htmltext = "32651-01.html";
+			}
+			else
+			{
+				if (getRandom(100) < 50)
+				{
+					npc.broadcastPacket(new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getNpcId(), NpcStringId.GRUNT_OH));
+				}
+				else
+				{
+					npc.broadcastPacket(new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getNpcId(), NpcStringId.GRUNT_WHATS_WRONG_WITH_ME));
+				}
+				npc.deleteMe();
+				htmltext = null;
+				
+				final L2Attackable monster = (L2Attackable) addSpawn(WARRIOR_MON, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 600000);
+				monster.setRunning();
+				monster.addDamageHate(player, 0, 999);
+				monster.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
+				player.sendPacket(new ExShowScreenMessage(NpcStringId.THE_GRAVE_ROBBER_WARRIOR_HAS_BEEN_FILLED_WITH_DARK_ENERGY_AND_IS_ATTACKING_YOU, 5, 5000));
+			}
+		}
+		
+		return htmltext;
+	}
+	
+	public Q00450_GraveRobberRescue(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(KANEMIKA);
+		addTalkId(KANEMIKA, WARRIOR);
+		
+		registerQuestItems(EVIDENCE_OF_MIGRATION);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q00450_GraveRobberRescue(450, Q00450_GraveRobberRescue.class.getSimpleName(), "Grave Robber Rescue");
+	}
+}

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/30537-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-01.htm

@@ -1,5 +1,5 @@
 <html><body>Daichir, Priest of Earth:<br>
 If you're wandering around in a remote place like this, I'm guessing you have some time on your hands. I have need of an adventurer like you...<br>
 It must be the will of the Goddess of Earth that you have come when you did...<br>
-<a action="bypass -h Quest 451_LuciensAltar 30537-02.htm">"What do you need?"</a>
+<a action="bypass -h Quest Q00451_LuciensAltar 30537-04.htm">"What do you need?"</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/30537-00.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-02.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/30537-06.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-03.html


+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/30537-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-04.htm

@@ -2,5 +2,5 @@
 Have you heard about the Ratmen's damaging the magical shield deep inside the Mithril Mine? Now the mine has been shut down and all the miners have been forced to evacuate.<br>
 If the shield is completely destroyed...well, I shudder to think what will happen!<br>
 Will you help us prevent that?<br>
-<a action="bypass -h Quest 451_LuciensAltar 30537-03.htm">Say yes.</a>
+<a action="bypass -h Quest Q00451_LuciensAltar 30537-05.htm">Say yes.</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/30537-03.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-05.htm


+ 2 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/30537-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-08.html

@@ -1,6 +1,5 @@
 <html><body>Daichir, Priest of Earth:<br>
-You made it back safely, thanks be to Maphr! The magical shield in the Mithril Mine seems to have been stabilized... at least for now.<br>
+You made it back safely, thanks be to Maphr! The magical shield in the Mithril Mine seems to have again been stabilized...at least for now.<br>
 Thank you for your help! Here is the reward I promised -- use it well. I fear this positive change is only temporary, though, so I hope you will help us if the shield begins to weaken again.<br>
-Until then, may Maphr shield you from all harm!<br1>
-<font color="LEVEL">Karna Maprera!</font>
+Until then, may Maphr shield you from all harm! <font color="LEVEL">Karna Maprera!</font>
 </body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/30537-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-09.html

@@ -1,5 +1,5 @@
 <html><body>Daichir, Priest of Earth:<br>
-If you lack the courage for this mission, tell me now. No? <font color="LEVEL">Karna Maprera!<br>
-Then hurry and use this <font color="LEVEL">Replenished Power Bead</font> to recharge the <font color="LEVEL">Lucien's Altars in the mine. Do not forget that <font color="LEVEL">you must visit all 5 altars</font>!<br>
+If you lack the courage for this mission, tell me now. No? <font color="LEVEL">Karna Maprera!</font><br>
+Then hurry and use this <font color="LEVEL">Replenished Power Bead</font>to recharge the <font color="LEVEL">Lucien's Altars</font> in the mine. Do not forget that <font color="LEVEL">you must visit all 5 altars</font>!<br>
 Good luck! <font color="LEVEL">Karna Maprera!</font>
 </body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/30537-10.html

@@ -0,0 +1,4 @@
+<html><body>Daichir, Priest of Earth:<br>
+Did you forget? <font color="LEVEL">You must visit all 5 altars</font>, just as I told you. Hurry back after you have completed the mission.<br>
+May Maphr forgive your slowness... <font color="LEVEL">Karna Maprera!</font>
+</body></html>

+ 159 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/Q00451_LuciensAltar.java

@@ -0,0 +1,159 @@
+/*
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+package quests.Q00451_LuciensAltar;
+
+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.QuestState.QuestType;
+import com.l2jserver.gameserver.model.quest.State;
+
+/**
+ * Lucien's Altar (451)<br>
+ * Original Jython script by Bloodshed.
+ * @author malyelfik
+ */
+public class Q00451_LuciensAltar extends Quest
+{
+	// NPCs
+	private static final int DAICHIR = 30537;
+	private static final int[] ALTARS =
+	{
+		32706,
+		32707,
+		32708,
+		32709,
+		32710
+	};
+	
+	// Items
+	private static final int REPLENISHED_BEAD = 14877;
+	private static final int DISCHARGED_BEAD = 14878;
+	
+	// Misc
+	private static final int MIN_LEVEL = 80;
+	
+	@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 (event.equals("30537-04.htm"))
+		{
+			htmltext = event;
+		}
+		else if (event.equals("30537-05.htm"))
+		{
+			st.startQuest();
+			st.giveItems(REPLENISHED_BEAD, 5);
+			htmltext = event;
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = getNoQuestMsg(player);
+		final QuestState st = player.getQuestState(getName());
+		
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		final int npcId = npc.getNpcId();
+		if (npcId == DAICHIR)
+		{
+			switch (st.getState())
+			{
+				case State.COMPLETED:
+					if (!st.isNowAvailable())
+					{
+						htmltext = "30537-03.html";
+						break;
+					}
+					st.setState(State.CREATED);
+				case State.CREATED:
+					htmltext = (player.getLevel() >= MIN_LEVEL) ? "30537-01.htm" : "30537-02.htm";
+					break;
+				case State.STARTED:
+					if (st.isCond(1))
+					{
+						if (st.isSet("32706") || st.isSet("32707") || st.isSet("32708") || st.isSet("32709") || st.isSet("32710"))
+						{
+							htmltext = "30537-10.html";
+						}
+						else
+						{
+							htmltext = "30537-09.html";
+						}
+					}
+					else
+					{
+						st.giveAdena(255380, true); // Tauti reward: 13 773 960 exp, 16 232 820 sp, 742 800 Adena
+						st.exitQuest(QuestType.DAILY, true);
+						htmltext = "30537-08.html";
+					}
+					break;
+			}
+		}
+		else if (st.isCond(1) && st.hasQuestItems(REPLENISHED_BEAD))
+		{
+			if (st.getInt(String.valueOf(npcId)) == 0)
+			{
+				st.set(String.valueOf(npcId), "1");
+				st.takeItems(REPLENISHED_BEAD, 1);
+				st.giveItems(DISCHARGED_BEAD, 1);
+				st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+				
+				if (st.getQuestItemsCount(DISCHARGED_BEAD) >= 5)
+				{
+					st.setCond(2, true);
+				}
+				
+				htmltext = "recharge.html";
+			}
+			else
+			{
+				htmltext = "findother.html";
+			}
+		}
+		
+		return htmltext;
+	}
+	
+	public Q00451_LuciensAltar(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(DAICHIR);
+		addTalkId(ALTARS);
+		addTalkId(DAICHIR);
+		
+		registerQuestItems(REPLENISHED_BEAD, DISCHARGED_BEAD);
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q00451_LuciensAltar(451, Q00451_LuciensAltar.class.getSimpleName(), "Lucien's Altar");
+	}
+}

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/findother.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/findother.html

@@ -1,3 +1,3 @@
-<html><body>Lucien's Altar:<br>
+<html><body>Altar of Lucien:<br>
 (Find another altar. This one has already been recharged.)
 </body></html>

+ 3 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/451_LuciensAltar/recharge.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00451_LuciensAltar/recharge.html

@@ -1,4 +1,4 @@
-<html><body>Lucien's Altar:<br>
-(Mysterious energy flows out from the bead into the altar as the Recharged Power Bead is brought closer to it. After its power is exhausted, the bead becomes a Depleted Black Bead.<br>
-The process appears to be completed. Find more Lucien's Crystals elsewhere.)
+<html><body>Lucien's Altar:<br>
+(Mysterious energy flows out from the bead into the altar as the Recharged Power Bead is brought closer to it. After its power is exhausted, the bead becomes a Depleted Black Bead.<br>
+The process appears to be completed. Find more Lucien's Crystals elsewhere.)
 </body></html>

+ 27 - 27
L2J_DataPack_BETA/dist/sql/game/spawnlist.sql

@@ -43337,33 +43337,33 @@ INSERT INTO `spawnlist` VALUES
 -- Kanemika
 ("Mithril Mines", 1, 32650, 173244, -182048, -1896, 0, 0, 0, 60, 0, 0),
 -- Grave Robber Warrior
-("Mithril Mines", 1, 32651, 179074, -180194, 251, 0, 0, 62454, 60, 0, 0),
-("Mithril Mines", 1, 32651, 179739, -179363, 251, 0, 0, 7069, 60, 0, 0),
-("Mithril Mines", 1, 32651, 180812, -173652, -228, 0, 0, 19620, 60, 0, 0),
-("Mithril Mines", 1, 32651, 180838, -172973, -239, 0, 0, 6092, 60, 0, 0),
-("Mithril Mines", 1, 32651, 175599, -173398, -239, 0, 0, 23661, 60, 0, 0),
-("Mithril Mines", 1, 32651, 174912, -173887, -242, 0, 0, 5365, 60, 0, 0),
-("Mithril Mines", 1, 32651, 176416, -178068, -519, 0, 0, 53772, 60, 0, 0),
-("Mithril Mines", 1, 32651, 176893, -178021, -519, 0, 0, 62644, 60, 0, 0),
-("Mithril Mines", 1, 32651, 182326, -178261, -787, 0, 0, 65033, 60, 0, 0),
-("Mithril Mines", 1, 32651, 183916, -182036, -1657, 0, 0, 34003, 60, 0, 0),
-("Mithril Mines", 1, 32651, 183281, -181606, -1657, 0, 0, 23852, 60, 0, 0),
-("Mithril Mines", 1, 32651, 179924, -183708, -1900, 0, 0, 13866, 60, 0, 0),
-("Mithril Mines", 1, 32651, 180229, -183253, -1900, 0, 0, 12199, 60, 0, 0),
-("Mithril Mines", 1, 32651, 176667, -172843, 3181, 0, 0, 37793, 60, 0, 0),
-("Mithril Mines", 1, 32651, 177103, -172696, 3181, 0, 0, 22994, 60, 0, 0),
-("Mithril Mines", 1, 32651, 175690, -176325, 2881, 0, 0, 36216, 60, 0, 0),
-("Mithril Mines", 1, 32651, 173279, -175813, 2325, 0, 0, 57343, 60, 0, 0),
-("Mithril Mines", 1, 32651, 175664, -179673, 2021, 0, 0, 63840, 60, 0, 0),
-("Mithril Mines", 1, 32651, 177417, -179870, 2021, 0, 0, 48568, 60, 0, 0),
-("Mithril Mines", 1, 32651, 177419, -174276, 1350, 0, 0, 8046, 60, 0, 0),
-("Mithril Mines", 1, 32651, 178144, -174552, 1350, 0, 0, 40435, 60, 0, 0),
-("Mithril Mines", 1, 32651, 174477, -179473, 1046, 0, 0, 12493, 60, 0, 0),
-("Mithril Mines", 1, 32651, 174490, -178637, 1061, 0, 0, 49373, 60, 0, 0),
-("Mithril Mines", 1, 32651, 177039, -175851, 438, 0, 0, 57575, 60, 0, 0),
-("Mithril Mines", 1, 32651, 177612, -182950, -1900, 0, 0, 57343, 60, 0, 0),
-("Mithril Mines", 1, 32651, 178743, -182794, -1903, 0, 0, 35728, 60, 0, 0),
-("Mithril Mines", 1, 32651, 178333, -180524, -1903, 0, 0, 39237, 60, 0, 0),
+("Mithril Mines", 1, 32651, 179074, -180194, 251, 0, 0, 62454, 240, 0, 0),
+("Mithril Mines", 1, 32651, 179739, -179363, 251, 0, 0, 7069, 240, 0, 0),
+("Mithril Mines", 1, 32651, 180812, -173652, -228, 0, 0, 19620, 240, 0, 0),
+("Mithril Mines", 1, 32651, 180838, -172973, -239, 0, 0, 6092, 240, 0, 0),
+("Mithril Mines", 1, 32651, 175599, -173398, -239, 0, 0, 23661, 240, 0, 0),
+("Mithril Mines", 1, 32651, 174912, -173887, -242, 0, 0, 5365, 240, 0, 0),
+("Mithril Mines", 1, 32651, 176416, -178068, -519, 0, 0, 53772, 240, 0, 0),
+("Mithril Mines", 1, 32651, 176893, -178021, -519, 0, 0, 62644, 240, 0, 0),
+("Mithril Mines", 1, 32651, 182326, -178261, -787, 0, 0, 65033, 240, 0, 0),
+("Mithril Mines", 1, 32651, 183916, -182036, -1657, 0, 0, 34003, 240, 0, 0),
+("Mithril Mines", 1, 32651, 183281, -181606, -1657, 0, 0, 23852, 240, 0, 0),
+("Mithril Mines", 1, 32651, 179924, -183708, -1900, 0, 0, 13866, 240, 0, 0),
+("Mithril Mines", 1, 32651, 180229, -183253, -1900, 0, 0, 12199, 240, 0, 0),
+("Mithril Mines", 1, 32651, 176667, -172843, 3181, 0, 0, 37793, 240, 0, 0),
+("Mithril Mines", 1, 32651, 177103, -172696, 3181, 0, 0, 22994, 240, 0, 0),
+("Mithril Mines", 1, 32651, 175690, -176325, 2881, 0, 0, 36216, 240, 0, 0),
+("Mithril Mines", 1, 32651, 173279, -175813, 2325, 0, 0, 57343, 240, 0, 0),
+("Mithril Mines", 1, 32651, 175664, -179673, 2021, 0, 0, 63840, 240, 0, 0),
+("Mithril Mines", 1, 32651, 177417, -179870, 2021, 0, 0, 48568, 240, 0, 0),
+("Mithril Mines", 1, 32651, 177419, -174276, 1350, 0, 0, 8046, 240, 0, 0),
+("Mithril Mines", 1, 32651, 178144, -174552, 1350, 0, 0, 40435, 240, 0, 0),
+("Mithril Mines", 1, 32651, 174477, -179473, 1046, 0, 0, 12493, 240, 0, 0),
+("Mithril Mines", 1, 32651, 174490, -178637, 1061, 0, 0, 49373, 240, 0, 0),
+("Mithril Mines", 1, 32651, 177039, -175851, 438, 0, 0, 57575, 240, 0, 0),
+("Mithril Mines", 1, 32651, 177612, -182950, -1900, 0, 0, 57343, 240, 0, 0),
+("Mithril Mines", 1, 32651, 178743, -182794, -1903, 0, 0, 35728, 240, 0, 0),
+("Mithril Mines", 1, 32651, 178333, -180524, -1903, 0, 0, 39237, 240, 0, 0),
 -- Teleport Crystal
 ("Mithril Mines", 1, 32652, 173147, -173762, 3480, 0, 0, 51272, 60, 0, 0),
 ("Mithril Mines", 1, 32652, 179560, -182956, -256, 0, 0, 32404, 60, 0, 0),

+ 2 - 0
L2J_DataPack_BETA/dist/sql/game/updates/20121223update.sql

@@ -0,0 +1,2 @@
+UPDATE character_quests SET name='Q00450_GraveRobberRescue' WHERE name='450_GraveRobberMemberRescue';
+UPDATE character_quests SET name='Q00451_LuciensAltar' WHERE name='451_LuciensAltar';