Browse Source

Fixing a few tickets:
Redoing onFirstTalk in quest 136, should fix #2246 (Thx bigbro for reporting), also doing similar cleanup in SagasSuperclass
Fixing z coord of spawn for Evil Eye Lord, according to _DS_, fixes #2234

Emperorc 17 years ago
parent
commit
bafaa2ff1d

+ 12 - 10
datapack_development/data/scripts/quests/136_MoreThanMeetsTheEye/__init__.py

@@ -2,7 +2,6 @@
 # Quest: More Than Meets The Eye
 import sys
 from net.sf.l2j import Config
-from net.sf.l2j.gameserver.model import L2Multisell
 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
@@ -25,7 +24,13 @@ ADENA=57
 TRANSFORM_BOOK=9648
 
 # mobId:[itemId,chance1,chance2]
-DROPLIST = {20636:[ECTOPLASM,45,0],20637:[ECTOPLASM,50,5],20638:[ECTOPLASM,55,10],20639:[ECTOPLASM,60,120],20215:[MORDEO_CRYSTAL,100,0]}
+DROPLIST = {
+    20636:[ECTOPLASM,45,0],
+    20637:[ECTOPLASM,50,5],
+    20638:[ECTOPLASM,55,10],
+    20639:[ECTOPLASM,60,120],
+    20215:[MORDEO_CRYSTAL,100,0]
+    }
 # itemId:[max,cond]
 DROPCONFIG = {ECTOPLASM:[35,"4"],MORDEO_CRYSTAL:[5,"8"]}
 
@@ -113,14 +118,11 @@ class Quest (JQuest) :
  def onFirstTalk (self,npc,player):
    st = player.getQuestState(qn)
    npcId = npc.getNpcId()
-   if npcId == AVANTGARDE :
-     htmltext = None
-     if not st : return htmltext
+   if npcId == AVANTGARDE and st:
      if st.getState() == State.COMPLETED :
-          htmltext = "32323-00.htm"
-   if htmltext == None:
-     npc.showChatWindow(player)
-   return htmltext
+          return "32323-00.htm"
+   npc.showChatWindow(player)
+   return None
 
  def onKill(self,npc,player,isPet):
    st = player.getQuestState(qn)
@@ -159,4 +161,4 @@ QUEST.addTalkId(CLAYTON)
 QUEST.addFirstTalkId(AVANTGARDE)
 
 for mob in DROPLIST.keys() :
-  QUEST.addKillId(mob)
+  QUEST.addKillId(mob)

+ 29 - 28
datapack_development/data/scripts/quests/SagasSuperclass/__init__.py

@@ -504,37 +504,38 @@ class Quest (JQuest) :
     return htmltext
 
  def onFirstTalk (self,npc,player):
-    htmltext = ""
+    htmltext = None
     st = player.getQuestState(self.qn)
     npcId = npc.getNpcId()
-    if st :
+    if st and npcId == self.NPC[4] :
       cond = st.getInt("cond")
-      if npcId == self.NPC[4] :
-          if cond == 17 :
-              st2 = self.findRightState(player,npc)
-              if st2 :
-                  if st == st2 :
-                      if st.getInt("Tab") == 1 :
-                          if st.getInt("Quest0") == 0 :
-                              htmltext = "4-04.htm"
-                          elif st.getInt("Quest0") == 1 :
-                              htmltext = "4-06.htm"
-                      else :
-                          if st.getInt("Quest0") == 0 :
-                              htmltext = "4-01.htm"
-                          elif st.getInt("Quest0") == 1 :
-                              htmltext = "4-03.htm"
-                  else:
-                      if st.getInt("Tab") == 1 :
-                          if st.getInt("Quest0") == 0 :
-                              htmltext = "4-05.htm"
-                          elif st.getInt("Quest0") == 1 :
-                              htmltext = "4-07.htm"
-                      else :
-                          if st.getInt("Quest0") == 0 :
-                              htmltext = "4-02.htm"
-          elif cond == 18 :
-              htmltext = "4-08.htm"
+      if cond == 17 :
+          st2 = self.findRightState(player,npc)
+          if st2 :
+              if st == st2 :
+                  if st.getInt("Tab") == 1 :
+                      if st.getInt("Quest0") == 0 :
+                          htmltext = "4-04.htm"
+                      elif st.getInt("Quest0") == 1 :
+                          htmltext = "4-06.htm"
+                  else :
+                      if st.getInt("Quest0") == 0 :
+                          htmltext = "4-01.htm"
+                      elif st.getInt("Quest0") == 1 :
+                          htmltext = "4-03.htm"
+              else:
+                  if st.getInt("Tab") == 1 :
+                      if st.getInt("Quest0") == 0 :
+                          htmltext = "4-05.htm"
+                      elif st.getInt("Quest0") == 1 :
+                          htmltext = "4-07.htm"
+                  else :
+                      if st.getInt("Quest0") == 0 :
+                          htmltext = "4-02.htm"
+      elif cond == 18 :
+          htmltext = "4-08.htm"
+    if htmltext == None :
+        npc.showChatWindow(player)
     return htmltext
 
  def onAttack (self, npc, player, damage, isPet):

+ 2 - 2
datapack_development/sql/spawnlist.sql

@@ -28737,7 +28737,7 @@ INSERT INTO `spawnlist` VALUES
 (29579,'lyonn01_qm2014_02',1,20779,10360,-90709,-2868,0,0,19846,180,0,0),
 (29580,'lyonn01_qm2014_02',1,20779,13736,-92925,-2680,0,0,6524,180,0,0),
 (29581,'lyonn01_qm2014_02',1,20779,11876,-93037,-2782,0,0,58095,180,0,0),
-(29582,'lyonn01_qm2014_04',1,27133,16156,-119917,-3196,0,0,0,180,0,0),
+(29582,'lyonn01_qm2014_04',1,27133,16156,-119917,-3168,0,0,0,180,0,0),
 (29583,'schuttgart01_qm2312_0',1,27200,125124,-174219,-1062,0,0,0,180,0,0),
 (29584,'schuttgart01_qm2312_0',1,27200,125526,-174219,-1062,0,0,0,180,0,0),
 (29585,'schuttgart01_qm2312_0',1,27200,125326,-173863,-1062,0,0,0,180,0,0),
@@ -41415,7 +41415,7 @@ INSERT INTO spawnlist VALUES
 (null,'TEMP Divine Emissary',1,27323,96199,77001,-3574,0,0,275,60,0,0),
 (null,'TEMP Divine Emissary',1,27323,95999,76801,-3574,0,0,275,60,0,0),
 (null,'TEMP Divine Emissary',1,27323,96399,76801,-3574,0,0,275,60,0,0);
-INSERT INTO spawnlist VALUES
+INSERT INTO spawnlist VALUES 
 (null,'TEMP Baar Dre Vanul',1,21118,8635,-121667,-1734,0,0,57960,60,0,0),
 (null,'TEMP Baar Dre Vanul',1,21118,8491,-121455,-1721,0,0,29473,60,0,0),
 (null,'TEMP Baar Dre Vanul',1,21118,9081,-121787,-1668,0,0,56206,60,0,0),