Browse Source

update in quest Yoke of The Past, tnx Charus

Kerberos 16 years ago
parent
commit
2114b84564

+ 1 - 1
datapack_development/data/scripts/quests/385_YokeofthePast/16.htm

@@ -3,6 +3,6 @@ As i said, go into the sacred area, slay <font color="LEVEL">the guardians of an
 Then I will remove the magic power from the scroll and give you a <font color="LEVEL">Blank Scroll</font> as a reward. That is the only reward I can give you.<br>
 A Blank Scroll will also be helpful to you if you trade with the <font color="LEVEL">Merchant of Mammon</font> who appears in the sacred area once in a while.<br>
 <a action="bypass -h Quest 385_YokeofthePast 17.htm">"I want to quit."</a><br>
-<a action="bypass -h Quest 385_YokeofthePast 14.htm">"I will bring back the scrolls."</a><br>
+<a action="bypass -h Quest 385_YokeofthePast 18.htm">"I will bring back the scrolls."</a><br>
 <a action="bypass -h Quest 385_YokeofthePast 15.htm">"Who are the guardians of ancient cult?"</a>
 </body></html>

+ 9 - 12
datapack_development/data/scripts/quests/385_YokeofthePast/__init__.py

@@ -64,12 +64,13 @@ class Quest (JQuest) :
 
  def __init__(self,id,name,descr):
      JQuest.__init__(self,id,name,descr)
-     self.questItemIds = [ANCIENT_SCROLL]
+     self.questItemIds = []
 
  def onEvent (self,event,st) :
     htmltext = event
     if event == "14.htm" :
       st.setState(State.STARTED)
+      st.playSound("ItemSound.quest_accept")
       st.set("cond","1")
     elif event == "17.htm" :
       st.playSound("ItemSound.quest_finish")
@@ -84,18 +85,14 @@ class Quest (JQuest) :
    npcId = npc.getNpcId()
    id = st.getState()
    if id == State.CREATED :
-       htmltext = "10.htm"
-       st.playSound("ItemSound.quest_accept")
-       st.set("cond","0")
+     htmltext = "10.htm"
    elif st.getInt("cond") == 1 and st.getQuestItemsCount(ANCIENT_SCROLL) == 0 :
-       htmltext = "16.htm"
-   elif st.getInt("cond") == 1 and st.getQuestItemsCount(ANCIENT_SCROLL):
-       htmltext = "16.htm"
-       numancientscrolls = st.getQuestItemsCount(ANCIENT_SCROLL)
-       st.giveItems(5965,numancientscrolls)
-       st.takeItems(ANCIENT_SCROLL,-1)
-   else:
-     st.exitQuest(1)  # cond is always 1 if he acceptet the quest, but we have no way to check if he hasnt the quest, so we delete it if he didnt accept by first talk
+     htmltext = "16.htm"
+   elif st.getInt("cond") == 1 and st.getQuestItemsCount(ANCIENT_SCROLL) :
+     numancientscrolls = st.getQuestItemsCount(ANCIENT_SCROLL)
+     st.giveItems(5965,numancientscrolls)
+     st.takeItems(ANCIENT_SCROLL,-1)
+     htmltext = "16.htm"
    return htmltext
 
  def onKill(self,npc,player,isPet):

+ 3 - 3
datapack_development/data/scripts/teleports/1103_OracleTeleport/__init__.py

@@ -32,7 +32,7 @@ RETURN_LOCS = [[-80555,150337,-3040],[-13953,121404,-2984],[16354,142820,-2696],
               [85129,-142103,-1542],[116642,77510,-2688],[-41572,209731,-5087],[-52872,-250283,-7908], \
               [45256,123906,-5411],[46192,170290,-4981],[111273,174015,-5437],[-20604,-250789,-8165], \
               [-21726, 77385,-5171],[140405, 79679,-5427],[-52366, 79097,-4741],[118311,132797,-4829], \
-              [172185,-17602,-4901],[ 83000,209213,-5439],[-19500, 13508,-4901],[113865, 84543,-6541], \
+              [172185,-17602,-4901],[ 83000,209213,-5439],[-19500, 13508,-4901],[12525, -248496,-9580], \
               [-415611,209225,-5087],[45242,124466,-5413],[110711,174010,-5439],[-22341,77375,-5173], \
               [-52889,79098,-4741],[117760,132794,-4831],[171792,-17609,-4901],[82564,209207,-5439], \
               [-41565,210048,-5085],[45278,123608,-5411],[111510,174013,-5437],[-21489,77372,-5171], \
@@ -133,7 +133,7 @@ class Quest (JQuest) :
        else :
           st.setState(State.CREATED)
           htmltext="4.htm"
-    elif npcId in range(31095,31111)+range(31114,31125):
+    elif npcId in range(31095,31111)+range(31114,31126):
        playerLevel = player.getLevel()
        if playerLevel < 20 :
           st.exitQuest(1)
@@ -168,6 +168,6 @@ class Quest (JQuest) :
 
 QUEST      = Quest(1103, qn, "Teleports")
 
-for i in TELEPORTERS.keys() + TEMPLE_PRIEST + range(31494,31508)+range(31095,31111)+range(31114,31125):
+for i in TELEPORTERS.keys() + TEMPLE_PRIEST + range(31494,31508)+range(31095,31111)+range(31114,31126):
     QUEST.addStartNpc(i)
     QUEST.addTalkId(i)