Browse Source

JYTHON: Adding quest 661 : Making the Harvest Grounds Safe. This is a rather old contrib from skeleton, which I've finally cleaned up and updated.

Emperorc 17 years ago
parent
commit
5cd154b544

+ 1 - 0
datapack_development/data/scripts.cfg

@@ -431,6 +431,7 @@ quests/652_AnAgedExAdventurer/__init__.py
 quests/653_WildMaiden/__init__.py
 quests/659_IdRatherBeCollectingFairyBreath/__init__.py
 quests/660_AidingtheFloranVillage/__init__.py
+quests/661_TheHarvestGroundsSafe/__init__.py
 quests/688_DefeatTheElrokianRaiders/__init__.py
 quests/999_T1Tutorial/__init__.py
 

+ 4 - 0
datapack_development/data/scripts/quests/661_TheHarvestGroundsSafe/30210-01.htm

@@ -0,0 +1,4 @@
+<html><head><body>Warehouse Keeper Norman:<br>
+Thank you, but this is too dangerous for you. Don't you know? You mast kill monsters in the <font color="LEVEL">Fellmere Harvesting Grounds.</font> But these monsters are too strong for you.<br>
+(Quest for characters level 21 and above.)
+</body></html>

+ 6 - 0
datapack_development/data/scripts/quests/661_TheHarvestGroundsSafe/30210-02.htm

@@ -0,0 +1,6 @@
+<html><head><body>Warehouse Keeper Norman:<br>
+I`ve been looking for someone like you. Go to the <font color="LEVEL">Fellmere Harvesting Grounds</font> and defeat the 
+<font color="LEVEL">Giant Poison Bee, Cloudy Beast and Young Araneid</font> that are impeding our work.
+And dont forget to bring me proof of your kills..<br>
+<a action="bypass -h Quest 661_TheHarvestGroundsSafe 30210-03.htm">"Say you will participate."</a>
+</body></html>

+ 4 - 0
datapack_development/data/scripts/quests/661_TheHarvestGroundsSafe/30210-03.htm

@@ -0,0 +1,4 @@
+<html><head><body>Warehouse Keeper Norman:<br>
+Exellent! Go to the Fellmere Harvesting Grounds and defeat the <font color="LEVEL">Giant Poison Bee, Cloudy Beast and Young Araneid</font> that are impeding our work. 
+And dont forget to bring me proof of your kills... Good luck!
+</body></html>

+ 4 - 0
datapack_development/data/scripts/quests/661_TheHarvestGroundsSafe/30210-04.htm

@@ -0,0 +1,4 @@
+<html><head><body>Warehouse Keeper Norman:<br>
+Oh you're back so soon? You haven't proof? The Lord wants the reconstruction effort started as soon as possible... We relly need your help! Cam you prove that you're valuable enough for the reconstruction effort?<br>
+<a action="bypass -h Quest 661_TheHarvestGroundsSafe 30210-07.htm">"I haven't the proof."</a>
+</body></html>

+ 6 - 0
datapack_development/data/scripts/quests/661_TheHarvestGroundsSafe/30210-05.htm

@@ -0,0 +1,6 @@
+<html><head><body>Warehouse Keeper Norman:<br>
+Oh you're back so soon? The Lord wants the reconstruction effort started as soon 
+as possible... We relly need your help! Can you prove that you're valuable enough 
+for the reconstruction effort?<br>
+<a action="bypass -h Quest 661_TheHarvestGroundsSafe 30210-08.htm">"Here's the proof."</a>
+</body></html>

+ 3 - 0
datapack_development/data/scripts/quests/661_TheHarvestGroundsSafe/30210-06.htm

@@ -0,0 +1,3 @@
+<html><head><body>Warehouse Keeper Norman:<br>
+Then set down your sword and staff now, and go seek rest. May you find tranquility and safety.
+</body></html>

+ 6 - 0
datapack_development/data/scripts/quests/661_TheHarvestGroundsSafe/30210-07.htm

@@ -0,0 +1,6 @@
+<html><head><body>Warehouse Keeper Norman:<br>
+You dont get the reward for your work... The rewards is provided by the Iron Gate Guild  and the Gludio 
+Territory Reconstruction Fund... Wath! You want the reward? Then kill some monsters and bring me proofs!<br>
+<a action="bypass -h Quest 661_TheHarvestGroundsSafe 30210-09.htm">"I'll keep working for you."</a><br>
+<a action="bypass -h Quest 661_TheHarvestGroundsSafe 30210-06.htm">"I quit."</a>
+</body></html>

+ 7 - 0
datapack_development/data/scripts/quests/661_TheHarvestGroundsSafe/30210-08.htm

@@ -0,0 +1,7 @@
+<html><head><body>Warehouse Keeper Norman:<br>
+Here is the reward for your work... The rewards is provided by the Iron Gate Guild 
+and the Gludio Territory Reconstruction Fund... Wath! It's not enough? Then kill
+some more monsters and bring me proofs!<br>
+<a action="bypass -h Quest 661_TheHarvestGroundsSafe 30210-09.htm">"I'll keep working for you."</a><br>
+<a action="bypass -h Quest 661_TheHarvestGroundsSafe 30210-06.htm">"I'll guilt."</a>
+</body></html>

+ 5 - 0
datapack_development/data/scripts/quests/661_TheHarvestGroundsSafe/30210-09.htm

@@ -0,0 +1,5 @@
+<html><head><body>Warehouse Keeper Norman:<br>
+Exellent! Go to the <font color="LEVEL">Fellmere Harvesting Grounds</font> and defeat the 
+<font color="LEVEL">Giant Poison Bee, Cloudy Beast and Young Araneid</font> that are impeding our work.<br>
+And dont forget to bring me proof of your kills... Good luck!
+</body></html>

+ 104 - 0
datapack_development/data/scripts/quests/661_TheHarvestGroundsSafe/__init__.py

@@ -0,0 +1,104 @@
+### ---------------------------------------------------------------------------
+###  Created by Skeleton!!!
+### ---------------------------------------------------------------------------
+#Modified and updated by Emperorc
+
+import sys
+from net.sf.l2j.gameserver.model.quest import State
+from net.sf.l2j.gameserver.model.quest import QuestState
+from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
+
+qn = "661_TheHarvestGroundsSafe"
+
+# NPC
+NORMAN = 30210
+
+# MOBS
+GIANT_POISON_BEE = 21095
+CLOUDY_BEAST = 21096
+YOUNG_ARANEID = 21097
+
+#QUEST ITEMS
+STING_OF_GIANT_POISON = 8283
+TALON_OF_YOUNG_ARANEID = 8285
+CLOUDY_GEM = 8284
+
+#Droplist format - npcId : [item,chance]
+DROPLIST = {
+   GIANT_POISON_BEE : [STING_OF_GIANT_POISON,75],
+   CLOUDY_BEAST : [CLOUDY_GEM,71],
+   YOUNG_ARANEID : [TALON_OF_YOUNG_ARANEID,67]
+   }
+
+class Quest (JQuest) :
+
+ def __init__(self,id,name,descr):
+ 	JQuest.__init__(self,id,name,descr)
+ 	self.questItemIds = range(8283,8286)
+
+ def onEvent (self,event,st) :
+    htmltext = event
+    if event in ["30210-03.htm","30210-09.htm"] :
+       st.set("cond","1")
+       st.setState(State.STARTED)
+       st.playSound("ItemSound.quest_accept")
+    if event == "30210-08.htm" :
+      STING = st.getQuestItemsCount(STING_OF_GIANT_POISON)    
+      TALON = st.getQuestItemsCount(TALON_OF_YOUNG_ARANEID)
+      GEM = st.getQuestItemsCount(CLOUDY_GEM)
+      amount = 0
+      if STING+GEM+TALON >= 10 :
+          amount = 2800
+      st.giveItems(57,STING*50+GEM*60+TALON*70 + amount)
+      st.takeItems(STING_OF_GIANT_POISON,-1)
+      st.takeItems(TALON_OF_YOUNG_ARANEID,-1)
+      st.takeItems(CLOUDY_GEM,-1)
+      st.playSound("ItemSound.quest_middle")
+    elif event == "30210-06.htm" :
+       st.exitQuest(1)
+       st.playSound("ItemSound.quest_finish")
+    return htmltext
+
+ def onTalk (self,npc,player):
+   htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>"
+   st = player.getQuestState(qn)
+   if not st : return htmltext
+   npcid = npc.getNpcId()
+   cond = st.getInt("cond")
+   if cond == 0 :
+      if st.getPlayer().getLevel() >= 21 :
+         htmltext = "30210-02.htm"
+      else :
+         htmltext = "30210-01.htm"
+         st.exitQuest(1)
+   if cond == 1 :
+      S = st.getQuestItemsCount(STING_OF_GIANT_POISON)  
+      T = st.getQuestItemsCount(TALON_OF_YOUNG_ARANEID)
+      C = st.getQuestItemsCount(CLOUDY_GEM)     
+      if S+T+C == 0 :
+         htmltext = "30210-04.htm"
+      else :
+         htmltext = "30210-05.htm"  
+   return htmltext
+
+ def onKill(self,npc,player,isPet):
+    st = player.getQuestState(qn)
+    if not st : return
+    if st.getState() != State.STARTED : return
+    if st.getInt("cond") == 1 :
+        npcId = npc.getNpcId()
+        rand = st.getRandom(100)
+        if npcId in DROPLIST.keys() :
+            item,chance = DROPLIST[npcId]
+            if rand < chance :
+                st.giveItems(item,1)
+                st.playSound("ItemSound.quest_itemget")
+    return
+
+QUEST = Quest(661,qn,"Making the Harvest Grounds Safe")
+
+QUEST.addStartNpc(NORMAN)
+QUEST.addTalkId(NORMAN)
+
+for id in DROPLIST.keys() :
+    QUEST.addKillId(id)