Browse Source

BETA: Quests in Java:
* Seekers of the Holy Grail (638)
* Grave Robber Annihilation (644)

Patch by: netvirus
Reviewed by: jurchiks, xban1x, Zoey76
Tested by: Zoey76

Zoey76 11 years ago
parent
commit
0ad0149980
27 changed files with 556 additions and 230 deletions
  1. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  2. 0 5
      L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/31328-01.htm
  3. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/31328-03.htm
  4. 0 94
      L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/__init__.py
  5. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/32017-03.htm
  6. 0 3
      L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/32017-04.htm
  7. 0 9
      L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/32017-06.htm
  8. 0 101
      L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/__init__.py
  9. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-01.htm
  10. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-02.htm
  11. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-03.htm
  12. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-04.html
  13. 4 4
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-05.html
  14. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-06.html
  15. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-07.html
  16. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-08.html
  17. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-09.html
  18. 306 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/Q00638_SeekersOfTheHolyGrail.java
  19. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-01.htm
  20. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-02.htm
  21. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-03.htm
  22. 2 2
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-04.html
  23. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-05.html
  24. 9 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-06.html
  25. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-07.html
  26. 200 0
      L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/Q00644_GraveRobberAnnihilation.java
  27. 2 0
      L2J_DataPack_BETA/dist/sql/game/updates/20130720update.sql

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

@@ -696,12 +696,12 @@ quests/634_InSearchofDimensionalFragments/__init__.py
 quests/Q00635_IntoTheDimensionalRift/Q00635_IntoTheDimensionalRift.java
 quests/Q00636_TruthBeyond/Q00636_TruthBeyond.java
 quests/Q00637_ThroughOnceMore/Q00637_ThroughOnceMore.java
-quests/638_SeekersOfTheHolyGrail/__init__.py
+quests/Q00638_SeekersOfTheHolyGrail/Q00638_SeekersOfTheHolyGrail.java
 quests/Q00639_GuardiansOfTheHolyGrail/Q00639_GuardiansOfTheHolyGrail.java
 quests/Q00641_AttackSailren/Q00641_AttackSailren.java
 quests/Q00642_APowerfulPrimevalCreature/Q00642_APowerfulPrimevalCreature.java
 quests/Q00643_RiseAndFallOfTheElrokiTribe/Q00643_RiseAndFallOfTheElrokiTribe.java
-quests/644_GraveRobberAnnihilation/__init__.py
+quests/Q00644_GraveRobberAnnihilation/Q00644_GraveRobberAnnihilation.java
 quests/Q00645_GhostsOfBatur/Q00645_GhostsOfBatur.java
 quests/Q00646_SignsOfRevolt/Q00646_SignsOfRevolt.java
 quests/Q00647_InfluxOfMachines/Q00647_InfluxOfMachines.java

+ 0 - 5
L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/31328-01.htm

@@ -1,5 +0,0 @@
-<html><body>High Priest Innocentin:<br>
-Recent activities at the Pagan Temple have raised my concerns. Considering the shenanigans that normally go on there, you must surely understand the peril!<br>
-You see, they've set their sights on Saint Solina's Grail of Splendor! I'm sure that if we don`t stop them, something terrible and irrevocable will happen! Will you help us in our time of need?<br>
-<a action="bypass -h Quest 638_SeekersOfTheHolyGrail 31328-02.htm">"I'll do it."</a>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/31328-03.htm

@@ -1,3 +0,0 @@
-<html><body>High Priest Innocentin:<br>
-If you bring me more, I shall reward you again.
-</body></html>

+ 0 - 94
L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/__init__.py

@@ -1,94 +0,0 @@
-#Seeker of the holy grail by TheOne
-import sys
-from com.l2jserver import Config
-from com.l2jserver.gameserver.model.quest import State
-from com.l2jserver.gameserver.model.quest import QuestState
-from com.l2jserver.gameserver.model.quest import Quest as JQuest
-
-qn = "638_SeekersOfTheHolyGrail"
-
-#NPC
-INNOCENTIN = 31328
-
-#MOBS
-MOBS = range(22138,22175)
-
-#ITEM
-TOTEM = 8068
-
-# Drop chance
-DROP_CHANCE = 30
-
-class Quest (JQuest) :
-
- def __init__(self,id,name,descr):
-     JQuest.__init__(self,id,name,descr)
-     self.questItemIds = [TOTEM]
-
- def onAdvEvent (self,event,npc, player) :
-    htmltext = event
-    st = player.getQuestState(qn)
-    if not st : return
-    if event == "31328-02.htm" :
-      st.set("cond","1")
-      st.setState(State.STARTED)
-      st.playSound("ItemSound.quest_accept")
-    elif event == "31328-06.htm" :
-      st.playSound("ItemSound.quest_finish")
-      st.exitQuest(1)
-    return htmltext
-
- def onTalk (self, npc, player) :
-    htmltext = Quest.getNoQuestMsg(player)
-    st = player.getQuestState(qn)
-    if not st : return htmltext
-
-    level = player.getLevel()
-    id = st.getState()
-    if level >= 73 :
-      if id == State.CREATED :
-        htmltext = "31328-01.htm"
-      elif id == State.STARTED and st.getQuestItemsCount(TOTEM) >= 2000 :
-        rr = self.getRandom(3)
-        if rr == 0 :
-          st.takeItems(TOTEM,2000)
-          st.rewardItems(959,self.getRandom(4)+3)
-          st.playSound("ItemSound.quest_middle")
-        if rr == 1 :
-          st.takeItems(TOTEM,2000)
-          st.rewardItems(57,3576000)
-          st.playSound("ItemSound.quest_middle")
-        if rr == 2 :
-          st.takeItems(TOTEM,2000)
-          st.rewardItems(960,self.getRandom(4)+3)
-          st.playSound("ItemSound.quest_middle")
-        htmltext = "31328-03.htm"
-      else :
-        htmltext = "31328-04.htm"
-    else :
-      htmltext = "31328-00.htm"
-    return htmltext
-
- def onKill(self, npc, player, isPet) :
-    partyMember = self.getRandomPartyMember(player, 1)
-    if not partyMember: return
-    st = partyMember.getQuestState(qn)
-    if st :
-      count = st.getQuestItemsCount(TOTEM)
-      if st.getInt("cond") == 1 :
-        numItems, chance = divmod(DROP_CHANCE * Config.RATE_QUEST_DROP,100)
-        if self.getRandom(100) < chance :
-           numItems += 1
-        if numItems :
-           st.playSound("ItemSound.quest_itemget")
-           st.giveItems(TOTEM,int(numItems))
-    return
-
-QUEST       = Quest(638,qn,"Seekers of the Holy Grail")
-
-QUEST.addStartNpc(INNOCENTIN)
-
-QUEST.addTalkId(INNOCENTIN)
-
-for i in MOBS :
-    QUEST.addKillId(i)

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/32017-03.htm

@@ -1,3 +0,0 @@
-<html><body>Karuda:<br>
-My investigation confirms that the grave robbers plundered<font color="LEVEL"> almost 120</font> graves. If you defeat them and bring back the<font color="LEVEL"> stolen Orcish burial goods</font>, I will give you a reward. I have heard that the grave robbers' hideout is based in the south. Best of luck to you.
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/32017-04.htm

@@ -1,3 +0,0 @@
-<html><body>Karuda:<br>
-Have you forgotten already your promise to defeat grave robbers'? Keep your promise and go!
-</body></html>

+ 0 - 9
L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/32017-06.htm

@@ -1,9 +0,0 @@
-<html><body>Karuda:<br>
-Yes, I certify that these are all of the stolen items. I shall reward you for your hard work as best I can. I don't have much to give you, but I can give you your choice of:<br>
-<a action="bypass -h Quest 644_GraveRobberAnnihilation 1">Varnish</a><br>
-<a action="bypass -h Quest 644_GraveRobberAnnihilation 2">Animal Skin</a><br>
-<a action="bypass -h Quest 644_GraveRobberAnnihilation 3">Animal Bone</a><br>
-<a action="bypass -h Quest 644_GraveRobberAnnihilation 4">Charcoal</a><br>
-<a action="bypass -h Quest 644_GraveRobberAnnihilation 5">Coal</a><br>
-<a action="bypass -h Quest 644_GraveRobberAnnihilation 6">Iron Ore</a>
-</body></html>

+ 0 - 101
L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/__init__.py

@@ -1,101 +0,0 @@
-#Made by Kerb
-import sys
-from com.l2jserver import Config
-from com.l2jserver.gameserver.model.quest import State
-from com.l2jserver.gameserver.model.quest import QuestState
-from com.l2jserver.gameserver.model.quest import Quest as JQuest 
-
-qn = "644_GraveRobberAnnihilation" 
-
-#Drop rate
-DROP_CHANCE = 75
-#Npc
-KARUDA = 32017
-#Items
-ORC_GOODS = 8088
-#Rewards
-REWARDS = {
-    "1" : [1865 , 30], #Varnish
-    "2" : [1867 , 40], #Animal Skin
-    "3" : [1872 , 40], #Animal Bone
-    "4" : [1871 , 30], #Charcoal
-    "5" : [1870 , 30], #Coal
-    "6" : [1869 , 30], #Iron Ore
-    }
-#Mobs
-MOBS = [ 22003,22004,22005,22006,22008 ]
-
-class Quest (JQuest) :
- def __init__(self,id,name,descr):
-    JQuest.__init__(self,id,name,descr)
-    self.questItemIds = [ORC_GOODS]
-
- def onAdvEvent (self,event,npc, player) :
-   htmltext = event
-   st = player.getQuestState(qn)
-   if not st : return
-   cond = st.getInt("cond")
-   if event == "32017-03.htm" :
-      if st.getPlayer().getLevel() < 20 : 
-         htmltext = "32017-02.htm"
-         st.exitQuest(1)
-      else :
-         st.set("cond","1")
-         st.setState(State.STARTED)
-         st.playSound("ItemSound.quest_accept")
-   elif event in REWARDS.keys() :
-       item, amount = REWARDS[event]
-       st.takeItems(ORC_GOODS,-1)
-       st.rewardItems(item, amount)
-       st.playSound("ItemSound.quest_finish")
-       st.exitQuest(1)
-       return
-   return htmltext
-
- def onTalk (self,npc,player):
-   htmltext = Quest.getNoQuestMsg(player)
-   st = player.getQuestState(qn)
-   if st :
-     npcId = npc.getNpcId()
-     id = st.getState()
-     cond = st.getInt("cond")
-     if cond == 0 :
-         htmltext = "32017-01.htm"
-     elif cond == 1 :
-         htmltext = "32017-04.htm"
-     elif cond == 2 :
-         if st.getQuestItemsCount(ORC_GOODS) >= 120 :
-             htmltext = "32017-05.htm"
-         else :
-             htmltext = "32017-04.htm"
-   return htmltext
-
- def onKill(self,npc,player,isPet):
-   partyMember = self.getRandomPartyMember(player, 1)
-   if not partyMember: return
-   st = partyMember.getQuestState(qn)
-   if st :
-      if st.getState() == State.STARTED :
-         count = st.getQuestItemsCount(ORC_GOODS)
-         if st.getInt("cond") == 1 and count < 120 :
-            chance = DROP_CHANCE * Config.RATE_QUEST_DROP
-            numItems, chance = divmod(chance,100)
-            if self.getRandom(100) < chance : 
-               numItems += 1
-            if numItems :
-               if count + numItems >= 120 :
-                  numItems = 120 - count
-                  st.playSound("ItemSound.quest_middle")
-                  st.set("cond","2")
-               else:
-                  st.playSound("ItemSound.quest_itemget")   
-               st.giveItems(ORC_GOODS,int(numItems))       
-   return
-
-QUEST       = Quest(644, qn, "Grave Robber Annihilation")
-
-QUEST.addStartNpc(KARUDA)
-QUEST.addTalkId(KARUDA) 
-
-for i in MOBS :
-  QUEST.addKillId(i)

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-01.htm

@@ -0,0 +1,5 @@
+<html><body>High Priest Innocentin:<br>
+Recent activities at the <font color="LEVEL">Pagan Temple</font> have raised my concerns. Considering the shenanigans that normally go on there, you must surely understand the peril!<br>
+You see, they've set their sights on Saint Solina's <font color="LEVEL">Grail of Splendor</font>! I'm sure that if we don't stop them, something terrible and irrevocable will happen! Will you help us in our time of need?<br>
+<a action="bypass -h Quest Q00638_SeekersOfTheHolyGrail 31328-03.htm">I'll do it.</a>
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/31328-00.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-02.htm


+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/31328-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-03.htm

@@ -1,4 +1,4 @@
 <html><body>High Priest Innocentin:<br>
-Splendid! Please go to the <font color="LEVEL">Pagan Temple</font> and defeat the evil ones that inhabit it! After you've destroyed them, bring me their <font color="LEVEL">Pagan Totems</font>. You'll be well-rewarded if bring me more than <font color="LEVEL">2000</font> of them! Of course, our definitions of large rewards might differ...<br>
-As you must have guessed, the Pagan Temple is heavily defended and will not be easily overtaken. <font color="LEVEL">Priest Eliyah could give you guidance on how to penetrate their defenses</font>.
+Splendid! Please go to the <font color="LEVEL">Pagan Temple</font> and defeat the evil ones that inhabit it! After you've destroyed them, bring me their <font color="LEVEL">Pagan Totems</font>. You'll be well-rewarded if you bring more than <font color="LEVEL">2000</font> of them! Of course, our definitions of large rewards might differ...<br>
+As you must have guessed, the Pagan Temple is heavily defended and will not be easily overtaken. <font color="LEVEL">Priest Eliyah could give you guidance on how to penetrate their defenses.</font>
 </body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-04.html

@@ -0,0 +1,6 @@
+<html><body>High Priest Innocentin:<br>
+Did they put up much of a fight? Well, your efforts have saved the grail! And I see you brought some Pagan Totems!<br>
+Are you ready for your reward?<br>
+<a action="bypass -h Quest Q00638_SeekersOfTheHolyGrail 31328-06.html">Not right now, thanks.</a><br>
+<a action="bypass -h Quest Q00638_SeekersOfTheHolyGrail reward">Yes, I'm ready for my reward.</a>
+</body></html>

+ 4 - 4
L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/31328-04.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-05.html

@@ -1,6 +1,6 @@
 <html><body>High Priest Innocentin:<br>
-Please go to the <font color="LEVEL">Pagan Temple</font> and defeat the evil ones that inhabit it! After you've destroyed them, bring me their <font color="LEVEL">Pagan Totems</font>. You'll be well-rewarded if you bring more that <font color="LEVEL">2000</font> of them! Of course, our definitions of large rewards might differ...<br>
-As you must have guessed, the Pagan Temple is heavily defended and will not easily overtaken. <font color="LEVEL">Priest Eliyah could give you guidance on how to penetrate their defence</font>.<br>
-<a action="bypass -h Quest 638_SeekersOfTheHolyGrail 31328-05.htm">"I'll continue."</a><br>
-<a action="bypass -h Quest 638_SeekersOfTheHolyGrail 31328-06.htm">"I want to quit."</a>
+Please go to the <font color="LEVEL">Pagan Temple</font> and defeat the evil ones that inhabit it! After you've destroyed them, bring me their <font color="LEVEL">Pagan Totems</font>. You'll be well-rewarded if you bring more than <font color="LEVEL">2000</font> of them! Of course, our definitions of large rewards might differ...<br>
+As you must have guessed, the Pagan Temple is heavily defended and will not be easily overtaken. <font color="LEVEL">Priest Eliyah could give you guidance on how to penetrate their defenses.<br>
+<a action="bypass -h Quest Q00638_SeekersOfTheHolyGrail 31328-06.html">I'll continue.</a><br>
+<a action="bypass -h Quest Q00638_SeekersOfTheHolyGrail 31328-09.html">I want to quit.</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/31328-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-06.html


+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-07.html

@@ -0,0 +1,3 @@
+<html><body>High Priest Innocentin:<br>
+Thank you! Let's see... What's this? The Totem of a high-ranking Pagan is mixed in here! Your efforts have thwarted their evil plan! Please take this as a token of my appreciation. Keep up the good work!
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-08.html

@@ -0,0 +1,3 @@
+<html><body>High Priest Innocentin:<br>
+Thank you! Your efforts have definitely put a crimp in the evil plans of the Pagans!
+</body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/638_SeekersOfTheHolyGrail/31328-06.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/31328-09.html

@@ -1,3 +1,3 @@
-<html><body>High Priest Innocentin:<br>
+<html><body>Priest Innocentin:<br>
 Oh, I'm sorry to see you go! Your efforts have done much to thwart the evil plans of the Pagans! If you have some spare time in the future, come back and help us again!
 </body></html>

+ 306 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00638_SeekersOfTheHolyGrail/Q00638_SeekersOfTheHolyGrail.java

@@ -0,0 +1,306 @@
+/*
+ * 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 quests.Q00638_SeekersOfTheHolyGrail;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.l2jserver.Config;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
+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;
+
+/**
+ * Seekers Of The Holy Grail (638)
+ * @author netvirus
+ */
+public final class Q00638_SeekersOfTheHolyGrail extends Quest
+{
+	private static class DropInfo
+	{
+		private final int _itemId;
+		private final int _chance;
+		private final int _keyId;
+		private final int _keyChance;
+		private final int _keyCount;
+		
+		public DropInfo(int itemId, int chance)
+		{
+			this(itemId, chance, 0, 0, 0);
+		}
+		
+		public DropInfo(int itemId, int chance, int keyId, int keyChance, int count)
+		{
+			_itemId = itemId;
+			_chance = chance;
+			_keyId = keyId;
+			_keyChance = keyChance;
+			_keyCount = count;
+		}
+		
+		public int getItemId()
+		{
+			return _itemId;
+		}
+		
+		public int getChance()
+		{
+			return _chance;
+		}
+		
+		public int getKeyId()
+		{
+			return _keyId;
+		}
+		
+		public int getKeyChance()
+		{
+			return _keyChance;
+		}
+		
+		public int getKeyCount()
+		{
+			return _keyCount;
+		}
+	}
+	
+	// Npc
+	private static final int INNOCENTIN = 31328;
+	// Items
+	private static final int TOTEM = 8068;
+	private static final int ANTEROOM_KEY = 8273;
+	private static final int CHAPEL_KEY = 8274;
+	private static final int KEY_OF_DARKNESS = 8275;
+	// Miscs
+	private static final int MIN_LVL = 73;
+	private static final int TOTEMS_REQUIRED_COUNT = 2000;
+	// Rewards
+	private static final int SCROLL_ENCHANT_W_S = 959;
+	private static final int SCROLL_ENCHANT_A_S = 960;
+	// Mobs
+	private static final Map<Integer, DropInfo> MOBS_DROP_CHANCES = new HashMap<>();
+	
+	static
+	{
+		MOBS_DROP_CHANCES.put(22136, new DropInfo(TOTEM, 55)); // Gatekeeper Zombie
+		MOBS_DROP_CHANCES.put(22137, new DropInfo(TOTEM, 6)); // Penance Guard
+		MOBS_DROP_CHANCES.put(22138, new DropInfo(TOTEM, 6)); // Chapel Guard
+		MOBS_DROP_CHANCES.put(22139, new DropInfo(TOTEM, 54)); // Old Aristocrat's Soldier
+		MOBS_DROP_CHANCES.put(22140, new DropInfo(TOTEM, 54)); // Zombie Worker
+		MOBS_DROP_CHANCES.put(22141, new DropInfo(TOTEM, 55)); // Forgotten Victim
+		MOBS_DROP_CHANCES.put(22142, new DropInfo(TOTEM, 54)); // Triol's Layperson
+		MOBS_DROP_CHANCES.put(22143, new DropInfo(TOTEM, 62, CHAPEL_KEY, 100, 1)); // Triol's Believer
+		MOBS_DROP_CHANCES.put(22144, new DropInfo(TOTEM, 54)); // Resurrected Temple Knight
+		MOBS_DROP_CHANCES.put(22145, new DropInfo(TOTEM, 53)); // Ritual Sacrifice
+		MOBS_DROP_CHANCES.put(22146, new DropInfo(TOTEM, 54, KEY_OF_DARKNESS, 10, 1)); // Triol's Priest
+		MOBS_DROP_CHANCES.put(22147, new DropInfo(TOTEM, 55)); // Ritual Offering
+		MOBS_DROP_CHANCES.put(22148, new DropInfo(TOTEM, 45)); // Triol's Believer
+		MOBS_DROP_CHANCES.put(22149, new DropInfo(TOTEM, 54, ANTEROOM_KEY, 100, 6)); // Ritual Offering
+		MOBS_DROP_CHANCES.put(22150, new DropInfo(TOTEM, 46)); // Triol's Believer
+		MOBS_DROP_CHANCES.put(22151, new DropInfo(TOTEM, 62, KEY_OF_DARKNESS, 10, 1)); // Triol's Priest
+		MOBS_DROP_CHANCES.put(22152, new DropInfo(TOTEM, 55)); // Temple Guard
+		MOBS_DROP_CHANCES.put(22153, new DropInfo(TOTEM, 54)); // Temple Guard Captain
+		MOBS_DROP_CHANCES.put(22154, new DropInfo(TOTEM, 53)); // Ritual Sacrifice
+		MOBS_DROP_CHANCES.put(22155, new DropInfo(TOTEM, 75)); // Triol's High Priest
+		MOBS_DROP_CHANCES.put(22156, new DropInfo(TOTEM, 67)); // Triol's Priest
+		MOBS_DROP_CHANCES.put(22157, new DropInfo(TOTEM, 66)); // Triol's Priest
+		MOBS_DROP_CHANCES.put(22158, new DropInfo(TOTEM, 67)); // Triol's Believer
+		MOBS_DROP_CHANCES.put(22159, new DropInfo(TOTEM, 75)); // Triol's High Priest
+		MOBS_DROP_CHANCES.put(22160, new DropInfo(TOTEM, 67)); // Triol's Priest
+		MOBS_DROP_CHANCES.put(22161, new DropInfo(TOTEM, 78)); // Ritual Sacrifice
+		MOBS_DROP_CHANCES.put(22162, new DropInfo(TOTEM, 67)); // Triol's Believer
+		MOBS_DROP_CHANCES.put(22163, new DropInfo(TOTEM, 87)); // Triol's High Priest
+		MOBS_DROP_CHANCES.put(22164, new DropInfo(TOTEM, 67)); // Triol's Believer
+		MOBS_DROP_CHANCES.put(22165, new DropInfo(TOTEM, 66)); // Triol's Priest
+		MOBS_DROP_CHANCES.put(22166, new DropInfo(TOTEM, 66)); // Triol's Believer
+		MOBS_DROP_CHANCES.put(22167, new DropInfo(TOTEM, 75)); // Triol's High Priest
+		MOBS_DROP_CHANCES.put(22168, new DropInfo(TOTEM, 66)); // Triol's Priest
+		MOBS_DROP_CHANCES.put(22169, new DropInfo(TOTEM, 78)); // Ritual Sacrifice
+		MOBS_DROP_CHANCES.put(22170, new DropInfo(TOTEM, 67)); // Triol's Believer
+		MOBS_DROP_CHANCES.put(22171, new DropInfo(TOTEM, 87)); // Triol's High Priest
+		MOBS_DROP_CHANCES.put(22172, new DropInfo(TOTEM, 78)); // Ritual Sacrifice
+		MOBS_DROP_CHANCES.put(22173, new DropInfo(TOTEM, 66)); // Triol's Priest
+		MOBS_DROP_CHANCES.put(22174, new DropInfo(TOTEM, 67)); // Triol's Priest
+		MOBS_DROP_CHANCES.put(22175, new DropInfo(TOTEM, 3)); // Andreas' Captain of the Royal Guard
+		MOBS_DROP_CHANCES.put(22176, new DropInfo(TOTEM, 3)); // Andreas' Royal Guards
+		MOBS_DROP_CHANCES.put(22188, new DropInfo(TOTEM, 3)); // Andreas' Captain of the Royal Guard
+		MOBS_DROP_CHANCES.put(22189, new DropInfo(TOTEM, 3)); // Andreas' Royal Guards
+		MOBS_DROP_CHANCES.put(22190, new DropInfo(TOTEM, 3)); // Ritual Sacrifice
+		MOBS_DROP_CHANCES.put(22191, new DropInfo(TOTEM, 3)); // Andreas' Captain of the Royal Guard
+		MOBS_DROP_CHANCES.put(22192, new DropInfo(TOTEM, 3)); // Andreas' Royal Guards
+		MOBS_DROP_CHANCES.put(22193, new DropInfo(TOTEM, 3)); // Andreas' Royal Guards
+		MOBS_DROP_CHANCES.put(22194, new DropInfo(TOTEM, 3)); // Penance Guard
+		MOBS_DROP_CHANCES.put(22194, new DropInfo(TOTEM, 3)); // Ritual Sacrifice
+	}
+	
+	private Q00638_SeekersOfTheHolyGrail(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(INNOCENTIN);
+		addTalkId(INNOCENTIN);
+		addKillId(MOBS_DROP_CHANCES.keySet());
+		registerQuestItems(TOTEM);
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(getName());
+		String htmltext = null;
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		switch (event)
+		{
+			case "31328-03.htm":
+			{
+				if (st.isCreated())
+				{
+					st.startQuest();
+					htmltext = event;
+				}
+				break;
+			}
+			case "31328-06.html":
+			{
+				if (st.isStarted())
+				{
+					htmltext = event;
+				}
+				break;
+			}
+			case "reward":
+			{
+				if (st.isStarted() && (st.getQuestItemsCount(TOTEM) >= TOTEMS_REQUIRED_COUNT))
+				{
+					if (getRandom(100) < 80)
+					{
+						if (getRandomBoolean())
+						{
+							st.rewardItems(SCROLL_ENCHANT_A_S, 1);
+						}
+						else
+						{
+							st.rewardItems(SCROLL_ENCHANT_W_S, 1);
+						}
+						htmltext = "31328-07.html";
+					}
+					else
+					{
+						st.giveAdena(3576000, true);
+						htmltext = "31328-08.html";
+					}
+					st.takeItems(TOTEM, 2000);
+				}
+				break;
+			}
+			case "31328-09.html":
+			{
+				if (st.isStarted())
+				{
+					st.exitQuest(true, true);
+					htmltext = "31328-09.html";
+				}
+			}
+			
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
+	{
+		final List<QuestState> randomList = new ArrayList<>();
+		final QuestState st = killer.getQuestState(getName());
+		if ((st != null) && st.isStarted())
+		{
+			randomList.add(st);
+			randomList.add(st);
+		}
+		
+		if (killer.isInParty())
+		{
+			for (L2PcInstance member : killer.getParty().getMembers())
+			{
+				final QuestState st2 = member.getQuestState(getName());
+				if ((st2 != null) && st2.isStarted())
+				{
+					randomList.add(st2);
+				}
+			}
+		}
+		
+		if (!randomList.isEmpty())
+		{
+			final DropInfo info = MOBS_DROP_CHANCES.get(npc.getNpcId());
+			final QuestState st3 = randomList.get(getRandom(randomList.size()));
+			if ((getRandom(100) < info.getChance()) && Util.checkIfInRange(1500, npc, st3.getPlayer(), true))
+			{
+				final int rate = (npc.isChampion()) ? (int) Config.L2JMOD_CHAMPION_REWARDS : (int) Config.RATE_QUEST_DROP;
+				st3.giveItems(info.getItemId(), 1 * rate);
+				st3.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+				if ((info.getKeyId() > 0) && (getRandom(100) < info.getKeyChance()))
+				{
+					((L2MonsterInstance) npc).dropItem(killer, info.getKeyId(), info.getKeyCount());
+				}
+			}
+		}
+		return super.onKill(npc, killer, isSummon);
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(getName());
+		String htmltext = getNoQuestMsg(player);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		switch (st.getState())
+		{
+			case State.CREATED:
+			{
+				htmltext = (player.getLevel() >= MIN_LVL) ? "31328-01.htm" : "31328-02.htm";
+				break;
+			}
+			case State.STARTED:
+			{
+				htmltext = (st.getQuestItemsCount(TOTEM) >= TOTEMS_REQUIRED_COUNT) ? "31328-04.html" : "31328-05.html";
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q00638_SeekersOfTheHolyGrail(638, Q00638_SeekersOfTheHolyGrail.class.getSimpleName(), "Seekers Of The Holy Grail");
+	}
+	
+}

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/32017-01.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-01.htm

@@ -2,5 +2,5 @@
 Greetings, and welcome! We are the followers of Pa'agrio, as we are fated to be. Are you free to help us?<br>
 This is the graveyard of a lost tribe, but grave robbers seek to plunder the burial grounds within. And thus, the spirits of the dead have become restless.<br>
 We have decided to drive the grave robbers from this place, but we're short of capable hands and need your help. Can you help us?<br>
-<a action="bypass -h Quest 644_GraveRobberAnnihilation 32017-03.htm">"How can I help you?"</a>
+<a action="bypass -h Quest Q00644_GraveRobberAnnihilation 32017-03.htm">How can I help you?</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/32017-02.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-02.htm


+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-03.htm

@@ -0,0 +1,3 @@
+<html><body>Karuda:<br>
+My investigation confirms that the grave robbers plundered <font color="LEVEL">almost 120</font> graves. If you defeat them and bring back the <font color="LEVEL">stolen Orcish burial goods</font>, I will give you a reward. I have heard that the grave robbers' hideout is based in the south. Best of luck to you.
+</body></html>

+ 2 - 2
L2J_DataPack_BETA/dist/game/data/scripts/quests/644_GraveRobberAnnihilation/32017-05.htm → L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-04.html

@@ -1,5 +1,5 @@
 <html><body>Karuda:<br>
-Have you recovered all of the stolen burial goods? Swift work! I think you must have had the blessing of Pa'agrio!<br>
+Have you recovered all of the stolen burial goods? Swift work! I think you must have had the blessings of Pa'agrio!<br>
 Please return the burial goods to me. I will see to their proper disposition.<br>
-<a action="bypass -h Quest 644_GraveRobberAnnihilation 32017-06.htm">Hand over the burial goods.</a>
+<a action="bypass -h Quest Q00644_GraveRobberAnnihilation 32017-06.html">Hand over the burial goods.</a>
 </body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-05.html

@@ -0,0 +1,3 @@
+<html><body>Karuda:<br>
+We have confirmed that grave robbers plundered almost 120 graves. If you defeat them and bring back all of the <font color="LEVEL">stolen Orcish burial goods</font>, I will give you a reward. I have heard that the grave robbers' hideout is based in the south. Best of luck.
+</body></html>

+ 9 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-06.html

@@ -0,0 +1,9 @@
+<html><body>Karuda:<br>
+Yes, I certify that these are all of the stolen items. I shall reward you for your hard work as best I can. I don't have much to give you, but I can give you your choice of:<br>
+<a action="bypass -h Quest Q00644_GraveRobberAnnihilation varnish">Varnish</a><br>
+<a action="bypass -h Quest Q00644_GraveRobberAnnihilation animalskin">Animal Skin</a><br>
+<a action="bypass -h Quest Q00644_GraveRobberAnnihilation animalbone">Animal Bone</a><br>
+<a action="bypass -h Quest Q00644_GraveRobberAnnihilation charcoal">Charcoal</a><br>
+<a action="bypass -h Quest Q00644_GraveRobberAnnihilation coal">Coal</a><br>
+<a action="bypass -h Quest Q00644_GraveRobberAnnihilation ironore">Iron Ore</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/32017-07.html

@@ -0,0 +1,4 @@
+<html><body>Karuda:<br>
+Here, and may Pa'agrio bless and protect you!<br>
+Perhaps we will meet again, if it is His will.
+</body></html>

+ 200 - 0
L2J_DataPack_BETA/dist/game/data/scripts/quests/Q00644_GraveRobberAnnihilation/Q00644_GraveRobberAnnihilation.java

@@ -0,0 +1,200 @@
+/*
+ * 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 quests.Q00644_GraveRobberAnnihilation;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.l2jserver.Config;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.holders.ItemHolder;
+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;
+
+/**
+ * Grave Robber Annihilation (644)
+ * @author netvirus
+ */
+public final class Q00644_GraveRobberAnnihilation extends Quest
+{
+	// Npc
+	private static final int KARUDA = 32017;
+	// Item
+	private static final int ORC_GOODS = 8088;
+	// Miscs
+	private static final int MIN_LVL = 20;
+	private static final int ORC_GOODS_REQUIRED_COUNT = 120;
+	// Monsters
+	private static final Map<Integer, Integer> MONSTER_DROP_CHANCES = new HashMap<>();
+	// Rewards
+	private static final Map<String, ItemHolder> REWARDS = new HashMap<>();
+	
+	static
+	{
+		MONSTER_DROP_CHANCES.put(22003, 714); // Grave Robber Scout
+		MONSTER_DROP_CHANCES.put(22004, 841); // Grave Robber Lookout
+		MONSTER_DROP_CHANCES.put(22005, 778); // Grave Robber Ranger
+		MONSTER_DROP_CHANCES.put(22006, 746); // Grave Robber Guard
+		MONSTER_DROP_CHANCES.put(22008, 810); // Grave Robber Fighter
+		
+		REWARDS.put("varnish", new ItemHolder(1865, 30)); // Varnish
+		REWARDS.put("animalskin", new ItemHolder(1867, 40)); // Animal Skin
+		REWARDS.put("animalbone", new ItemHolder(1872, 40)); // Animal Bone
+		REWARDS.put("charcoal", new ItemHolder(1871, 30)); // Charcoal
+		REWARDS.put("coal", new ItemHolder(1870, 30)); // Coal
+		REWARDS.put("ironore", new ItemHolder(1869, 30)); // Iron Ore
+	}
+	
+	private Q00644_GraveRobberAnnihilation(int questId, String name, String descr)
+	{
+		super(questId, name, descr);
+		addStartNpc(KARUDA);
+		addTalkId(KARUDA);
+		addKillId(MONSTER_DROP_CHANCES.keySet());
+		registerQuestItems(ORC_GOODS);
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(getName());
+		String htmltext = null;
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		switch (event)
+		{
+			case "32017-03.htm":
+			{
+				if (st.isCreated())
+				{
+					st.startQuest();
+					htmltext = event;
+				}
+				break;
+			}
+			case "32017-06.html":
+			{
+				if (st.isCond(2) && (st.getQuestItemsCount(ORC_GOODS) >= ORC_GOODS_REQUIRED_COUNT))
+				{
+					htmltext = event;
+				}
+				break;
+			}
+			case "varnish":
+			case "animalskin":
+			case "animalbone":
+			case "charcoal":
+			case "coal":
+			case "ironore":
+			{
+				if (st.isCond(2))
+				{
+					final ItemHolder reward = REWARDS.get(event);
+					st.rewardItems(reward.getId(), reward.getCount());
+					st.exitQuest(true, true);
+					htmltext = "32017-07.html";
+				}
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	@Override
+	public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
+	{
+		final List<QuestState> randomList = new ArrayList<>();
+		final QuestState st = killer.getQuestState(getName());
+		if ((st != null) && st.isCond(1))
+		{
+			randomList.add(st);
+			randomList.add(st);
+		}
+		
+		if (killer.isInParty())
+		{
+			for (L2PcInstance member : killer.getParty().getMembers())
+			{
+				final QuestState st2 = member.getQuestState(getName());
+				if ((st2 != null) && st2.isCond(1))
+				{
+					randomList.add(st2);
+				}
+			}
+		}
+		
+		if (!randomList.isEmpty())
+		{
+			final QuestState st3 = randomList.get(getRandom(randomList.size()));
+			if (((getRandom(1000) < MONSTER_DROP_CHANCES.get(npc.getNpcId())) && Util.checkIfInRange(1500, npc, st3.getPlayer(), true)))
+			{
+				final int rate = (npc.isChampion()) ? (int) Config.L2JMOD_CHAMPION_REWARDS : (int) Config.RATE_QUEST_DROP;
+				st3.giveItems(ORC_GOODS, 1 * rate);
+				if ((st3.getQuestItemsCount(ORC_GOODS)) >= ORC_GOODS_REQUIRED_COUNT)
+				{
+					st3.setCond(2, true);
+				}
+				else
+				{
+					st3.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+				}
+			}
+		}
+		return super.onKill(npc, killer, isSummon);
+	}
+	
+	@Override
+	public String onTalk(L2Npc npc, L2PcInstance player)
+	{
+		final QuestState st = player.getQuestState(getName());
+		String htmltext = getNoQuestMsg(player);
+		if (st == null)
+		{
+			return htmltext;
+		}
+		
+		switch (st.getState())
+		{
+			case State.CREATED:
+			{
+				htmltext = (player.getLevel() >= MIN_LVL) ? "32017-01.htm" : "32017-02.htm";
+				break;
+			}
+			case State.STARTED:
+			{
+				htmltext = (st.isCond(2) && (st.getQuestItemsCount(ORC_GOODS) >= ORC_GOODS_REQUIRED_COUNT)) ? "32017-04.html" : "32017-05.html";
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	public static void main(String[] args)
+	{
+		new Q00644_GraveRobberAnnihilation(644, Q00644_GraveRobberAnnihilation.class.getSimpleName(), "Grave Robber Annihilation");
+	}
+}

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

@@ -0,0 +1,2 @@
+UPDATE character_quests SET name='Q00644_GraveRobberAnnihilation' WHERE name='644_GraveRobberAnnihilation';
+UPDATE character_quests SET name='Q00638_SeekersOfTheHolyGrail' WHERE name='638_SeekersOfTheHolyGrail';