Esempio n. 1
0
 def onEvent(self, event, st):
     htmltext = event
     count = st.getQuestItemsCount(BLOOD_OF_SAINT)
     if event == "31517-1.htm":
         st.set("cond", "1")
         st.setState(State.STARTED)
         st.playSound("ItemSound.quest_accept")
     elif event == "31517-3.htm":
         if count < 300:
             htmltext = "31517-3a.htm"
     elif event == "31517-4.htm":
         if count < 300:
             htmltext = "31517-3a.htm"
         else:
             st.addExpAndSp(162773, 12500)
             ObjectId = st.getPlayer().getObjectId()
             st.getPlayer().broadcastPacket(SocialAction(ObjectId, 3))
             st.takeItems(BLOOD_OF_SAINT, -1)
             st.playSound("ItemSound.quest_finish")
             st.exitQuest(1)
     elif event == "31517-5.htm":
         if count < 300:
             htmltext = "31517-3a.htm"
         else:
             st.rewardItems(ADENA, 100000)
             st.takeItems(BLOOD_OF_SAINT, -1)
             st.playSound("ItemSound.quest_finish")
             st.exitQuest(1)
     return htmltext
Esempio n. 2
0
    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()
        id = st.getState()
        if id == State.COMPLETED:
            htmltext = "<html><body>This quest has already been completed.</body></html>"
        elif npcId == 30368:
            if not st.getInt("cond"):
                htmltext = "30368-04.htm"
            elif st.getInt("cond"):
                if st.getQuestItemsCount(RYLITHS_LETTER_ID):
                    htmltext = "30368-07.htm"
                elif st.getQuestItemsCount(THEONS_DIARY_ID):
                    st.takeItems(THEONS_DIARY_ID, -1)
                    st.unset("cond")
                    st.exitQuest(False)
                    st.playSound("ItemSound.quest_finish")
                    st.addExpAndSp(3000, 0)
                    ObjectId = player.getObjectId()
                    player.broadcastPacket(SocialAction(ObjectId, 3))
                    st.rewardItems(5250, 1)
                    htmltext = "30368-08.htm"
        elif npcId == 30369 and id == State.STARTED:
            if st.getQuestItemsCount(RYLITHS_LETTER_ID):
                htmltext = "30369-02.htm"
            elif st.getQuestItemsCount(THEONS_DIARY_ID):
                htmltext = "30369-05.htm"
        return htmltext
Esempio n. 3
0
 def onEvent (self,event,st) :
   htmltext = event
   if event == "31377-04.htm" :
       if st.getPlayer().getAllianceWithVarkaKetra() == -4 and st.getQuestItemsCount(Varka_Alliance_Four) :
            if st.getPlayer().getLevel() >= 75 :
                    st.set("cond","1")
                    st.setState(State.STARTED)
                    st.playSound("ItemSound.quest_accept")
                    htmltext = "31377-04.htm"
            else :
                htmltext = "31377-03.htm"
                st.exitQuest(1)
       else :
            htmltext = "31377-02.htm"
            st.exitQuest(1)
   elif event == "31377-07.htm" :
       st.takeItems(Tayr_Head,-1)
       st.giveItems(Wisdom_Feather,1)
       st.addExpAndSp(10000,0)
       ObjectId=st.getPlayer().getObjectId()
       st.getPlayer().broadcastPacket(SocialAction(ObjectId,3))
       st.playSound("ItemSound.quest_finish")
       htmltext = "31377-07.htm"
       st.exitQuest(1)
   return htmltext
Esempio n. 4
0
 def onEvent(self, event, st):
     htmltext = event
     if event == "1":
         if st.getPlayer().getLevel() >= 15:
             htmltext = "30368-06.htm"
             st.giveItems(RYLITHS_LETTER_ID, 1)
             st.set("cond", "1")
             st.setState(State.STARTED)
             st.playSound("ItemSound.quest_accept")
         else:
             htmltext = "30368-05.htm"
             st.exitQuest(1)
     elif event == "156_1":
         st.takeItems(RYLITHS_LETTER_ID, -1)
         if not st.getQuestItemsCount(THEONS_DIARY_ID):
             st.giveItems(THEONS_DIARY_ID, 1)
         htmltext = "30369-03.htm"
     elif event == "156_2":
         st.takeItems(RYLITHS_LETTER_ID, -1)
         st.unset("cond")
         st.exitQuest(False)
         st.playSound("ItemSound.quest_finish")
         st.giveItems(5250, 1)
         st.addExpAndSp(3000, 0)
         ObjectId = st.getPlayer().getObjectId()
         st.getPlayer().broadcastPacket(SocialAction(ObjectId, 3))
         htmltext = "30369-04.htm"
     return htmltext
Esempio n. 5
0
    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()
        id = st.getState()
        if id == State.CREATED:
            st.set("cond", "0")
        if st.getInt("cond") == 0:
            if player.getLevel() >= 11:
                htmltext = "30536-02.htm"
            else:
                htmltext = "30536-01.htm"
                st.exitQuest(1)
        else:
            if st.getQuestItemsCount(FLOATING_STONE) < 50:
                htmltext = "30536-04.htm"
            else:
                if st.getQuestItemsCount(RING_OF_FIREFLY) == 0:
                    htmltext = "30536-05.htm"
                    st.giveItems(RING_OF_FIREFLY, 1)
                else:
                    htmltext = "30536-06.htm"
                    st.rewardItems(ADENA, 2400)
                st.addExpAndSp(0, 60)
                ObjectId = player.getObjectId()
                player.broadcastPacket(SocialAction(ObjectId, 3))
                st.playSound("ItemSound.quest_finish")
                st.takeItems(FLOATING_STONE, -1)
                st.exitQuest(1)
        return htmltext
Esempio n. 6
0
 def onEvent(self, event, st):
     htmltext = event
     if event == "accept":
         st.set("cond", "1")
         st.setState(State.STARTED)
         st.playSound("ItemSound.quest_accept")
         htmltext = "31388-04.htm"
     if event == "quit":
         st.takeItems(RIB_BONE, -1)
         st.playSound("ItemSound.quest_finish")
         htmltext = "31388-10.htm"
         st.exitQuest(1)
     elif event == "stay":
         htmltext = "31388-07.htm"
     elif event == "reward":
         if st.getInt("cond") == 2:
             if st.getQuestItemsCount(RIB_BONE) >= 200:
                 st.takeItems(RIB_BONE, 200)
                 st.rewardItems(57, 25000)
                 st.addExpAndSp(305235, 0)
                 ObjectId = st.getPlayer().getObjectId()
                 st.getPlayer().broadcastPacket(SocialAction(ObjectId, 3))
                 st.playSound("ItemSound.quest_finish")
                 st.set("cond", "1")
                 htmltext = "31388-08.htm"
             else:
                 htmltext = "31388-09.htm"
     return htmltext
Esempio n. 7
0
 def onEvent(self, event, st):
     id = st.getState()
     cond = st.getInt("cond")
     htmltext = event
     if event == "31555-1.htm" and id == State.CREATED:
         st.set("cond", "1")
         st.setState(State.STARTED)
         st.playSound("ItemSound.quest_accept")
     elif event == "31665-1.htm" and cond == 1:
         st.set("cond", "2")
         st.playSound("ItemSound.quest_itemget")
         st.giveItems(KRORINS_JOURNAL, 1)
     elif event == "31555-4.htm" and cond == 2:
         st.set("cond", "3")
     elif event == "31661-1.htm" and cond == 3:
         st.set("cond", "4")
     elif event == "31662-1.htm" and cond == 4:
         st.set("cond", "5")
     elif event == "31663-1.htm" and cond == 5:
         st.set("cond", "6")
     elif event == "31664-1.htm" and cond == 6:
         st.set("cond", "7")
         st.playSound("ItemSound.quest_middle")
     elif event == "31555-7.htm" and cond == 7:
         st.takeItems(KRORINS_JOURNAL, -1)
         st.rewardItems(57, 120000)
         st.addExpAndSp(490000, 45880)
         ObjectId = st.getPlayer().getObjectId()
         st.getPlayer().broadcastPacket(SocialAction(ObjectId, 3))
         st.playSound("ItemSound.quest_finish")
         st.exitQuest(False)
     elif event != "31663-0a.htm":
         htmltext = default
     return htmltext
Esempio n. 8
0
 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()
   id = st.getState()

   if id == State.CREATED :
     st.set("cond","0")
   if st.getInt("cond")==0 :
     if player.getLevel() >= 15 :
       htmltext = "30222-02.htm"
     else:
       htmltext = "30222-01.htm"
       st.exitQuest(1)
   else :
     if st.getQuestItemsCount(GIANT_SPIDER_LEG) >= 8 :
       st.rewardItems(ADENA,1000)
       st.takeItems(GIANT_SPIDER_LEG,-1)
       st.addExpAndSp(2000,0)
       ObjectId=player.getObjectId()
       player.broadcastPacket(SocialAction(ObjectId,3))
       htmltext = "30222-05.htm"
       st.checkNewbieQuests()
       st.exitQuest(1)
       st.playSound("ItemSound.quest_finish")
     else:
       htmltext = "30222-04.htm"
Esempio n. 9
0
    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()
        id = st.getState()
        if npcId != 30327 and id != State.STARTED: return htmltext

        if id == State.CREATED:
            st.set("cond", "0")
            cond = 0
        else:
            cond = st.getInt("cond")
        if npcId == 30327:
            if cond == 0:
                htmltext = "30327-01.htm"
            elif cond == 1:
                if st.getQuestItemsCount(TOPAZ_PIECE) == 0:
                    htmltext = "30327-07.htm"
                else:
                    htmltext = "30327-08.htm"
            elif cond == 2:
                if st.getQuestItemsCount(SORIUS_LETTER1) == 0:
                    st.giveItems(SORIUS_LETTER1, 1)
                st.set("cond", "3")
                htmltext = "30327-09.htm"
            elif cond in [3, 4, 5]:
                htmltext = "30327-11.htm"
            elif cond == 6:
                st.rewardItems(57, 81900)
                st.takeItems(KLUTO_BOX, -1)
                player.sendPacket(SocialAction(player.getObjectId(), 3))
                if st.getQuestItemsCount(ELVEN_KNIGHT_BROOCH) == 0:
                    st.giveItems(ELVEN_KNIGHT_BROOCH, 1)
                st.addExpAndSp(228064, 14925)
                htmltext = "30327-10.htm"
                st.set("cond", "0")
                st.exitQuest(False)
                st.playSound("ItemSound.quest_finish")
        elif npcId == 30317:
            if cond == 3:
                htmltext = "30317-01.htm"
            elif cond == 4:
                if st.getQuestItemsCount(EMERALD_PIECE) == 0:
                    htmltext = "30317-03.htm"
                else:
                    htmltext = "30317-04.htm"
            elif cond == 5:
                st.takeItems(EMERALD_PIECE, -1)
                st.takeItems(TOPAZ_PIECE, -1)
                if st.getQuestItemsCount(KLUTO_BOX) == 0:
                    st.giveItems(KLUTO_BOX, 1)
                st.takeItems(KLUTO_MEMO, -1)
                st.set("cond", "6")
                htmltext = "30317-05.htm"
            elif cond == 6:
                htmltext = "30317-06.htm"
        return htmltext
Esempio n. 10
0
 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()
   id = st.getState()
   if npcId == 30312 and st.getInt("cond")==0 and st.getInt("onlyone")==0 :
     if player.getLevel() >= 2 :
       htmltext = "30312-03.htm"
       return htmltext
     else:
       htmltext = "30312-02.htm"
       st.exitQuest(1)
   elif npcId == 30312 and st.getInt("cond")==0 and st.getInt("onlyone")==1 :
        htmltext = "<html><body>This quest has already been completed.</body></html>"
   if id == State.STARTED:
       if npcId == 30312 and st.getInt("cond")>=1 and (st.getQuestItemsCount(FOX_FUR_YARN_ID)==0 and st.getQuestItemsCount(MAIDEN_DOLL_ID)==0) and st.getQuestItemsCount(FOX_FUR_ID)<10 :
            htmltext = "30312-05.htm"
       elif npcId == 30312 and st.getInt("cond")>=1 and st.getQuestItemsCount(FOX_FUR_ID)>=10 :
            htmltext = "30312-08.htm"
       elif npcId == 30051 and st.getInt("cond")>=1 and st.getQuestItemsCount(FOX_FUR_ID)<10 and st.getQuestItemsCount(FOX_FUR_ID)>0 :
            htmltext = "30051-01.htm"
       elif npcId == 30051 and st.getInt("cond")>=1 and st.getQuestItemsCount(FOX_FUR_ID)>=10 and st.getQuestItemsCount(FOX_FUR_YARN_ID)==0 and st.getQuestItemsCount(MAIDEN_DOLL_ID)==0 and st.getQuestItemsCount(MAIDEN_DOLL_ID)<10 :
            htmltext = "30051-02.htm"
            st.giveItems(FOX_FUR_YARN_ID,1)
            st.takeItems(FOX_FUR_ID,st.getQuestItemsCount(FOX_FUR_ID))
            st.set("cond","3")
            st.playSound("ItemSound.quest_middle")
       elif npcId == 30051 and st.getInt("cond")>=1 and st.getQuestItemsCount(FOX_FUR_YARN_ID)>=1 :
            htmltext = "30051-03.htm"
       elif npcId == 30051 and st.getInt("cond")>=1 and st.getQuestItemsCount(MAIDEN_DOLL_ID)==1 :
            htmltext = "30051-04.htm"
       elif npcId == 30312 and st.getInt("cond")>=1 and st.getQuestItemsCount(FOX_FUR_YARN_ID)>=1 :
            htmltext = "30312-06.htm"
       elif npcId == 30055 and st.getInt("cond")>=1 and st.getQuestItemsCount(FOX_FUR_YARN_ID)>=1 :
            htmltext = "30055-01.htm"
            st.giveItems(MAIDEN_DOLL_ID,1)
            st.takeItems(FOX_FUR_YARN_ID,st.getQuestItemsCount(FOX_FUR_YARN_ID))
            st.set("cond","4")
            st.playSound("ItemSound.quest_middle")
       elif npcId == 30055 and st.getInt("cond")>=1 and st.getQuestItemsCount(MAIDEN_DOLL_ID)>=1 :
            htmltext = "30055-02.htm"
       elif npcId == 30055 and st.getInt("cond")>=1 and st.getQuestItemsCount(FOX_FUR_YARN_ID)==0 and st.getQuestItemsCount(MAIDEN_DOLL_ID)==0 :
            htmltext = "30055-03.htm"
       elif npcId == 30312 and st.getInt("cond")>=1 and st.getQuestItemsCount(MAIDEN_DOLL_ID)>=1 and st.getInt("onlyone")==0 :
          if st.getInt("id") != 154 :
            st.set("id","154")
            htmltext = "30312-07.htm"
            st.giveItems(EARING_ID,1)
            st.takeItems(MAIDEN_DOLL_ID,-1)
            st.addExpAndSp(1000,0)
            ObjectId=player.getObjectId()
            player.broadcastPacket(SocialAction(ObjectId,3))
            st.set("cond","0")
            st.exitQuest(False)
            st.playSound("ItemSound.quest_finish")
            st.set("onlyone","1")
   return htmltext
Esempio n. 11
0
 def onEvent(self, event, st):
     htmltext = event
     if event == "1":
         htmltext = "30510-05.htm"
         for var in STATS:
             st.set(var, "1")
         st.setState(State.STARTED)
         st.set("progress", "PART1")
         st.playSound("ItemSound.quest_accept")
     elif event == "30630_1":
         htmltext = "30630-02.htm"
     elif event == "30630_2":
         htmltext = "30630-03.htm"
     elif event == "30630_3":
         htmltext = "30630-04.htm"
         st.giveItems(ORIMS_CONTRACT, 1)
         st.set("Orim", "2")
     elif event == "30682_1":
         htmltext = "30682-02.htm"
         st.giveItems(PEKIRONS_TOTEM, 1)
         st.set("Perkiron", "2")
     elif event == "30515_1":
         htmltext = "30515-02.htm"
         st.giveItems(MANAKIAS_TOTEM, 1)
         st.set("Manakia", "2")
         st.set("Manakia_Queen", "2")
     elif event == "30507_1":
         htmltext = "30507-02.htm"
         st.giveItems(RACOYS_TOTEM, 1)
         st.set("Racoy", "2")
     elif event == "30030_1":
         htmltext = "30030-02.htm"
     elif event == "30030_2":
         htmltext = "30030-03.htm"
     elif event == "30030_3":
         htmltext = "30030-04.htm"
         st.giveItems(VIVIANTES_LETTER, 1)
         st.set("Racoy", "3")
     elif event == "30649_1":
         htmltext = "30649-02.htm"
     elif event == "30649_2":
         st.takeItems(WARSPIRIT_TOTEM, -1)
         st.takeItems(BRAKIS_REMAINS2, -1)
         st.takeItems(HERMODTS_REMAINS2, -1)
         st.takeItems(KIRUNAS_REMAINS2, -1)
         st.addExpAndSp(447444, 30704)
         st.takeItems(TONARS_REMAINS2, -1)
         st.giveItems(MARK_OF_WARSPIRIT, 1)
         st.getPlayer().sendPacket(
             SocialAction(st.getPlayer().getObjectId(), 3))
         st.giveItems(7562, 92)
         htmltext = "30649-03.htm"
         for var in STATS:
             st.unset(var)
         st.exitQuest(False)
         st.playSound("ItemSound.quest_finish")
     return htmltext
Esempio n. 12
0
 def onEvent (self,event,st) :
    htmltext = event
    player = st.getPlayer()
    if event == "30587_1" :
          if player.getClassId().getId() != 0x2c :
            if player.getClassId().getId() == 0x2f :
              htmltext = "30587-02a.htm"
              st.exitQuest(1)
            else:
              htmltext = "30587-02.htm"
              st.exitQuest(1)
          else:
            if player.getLevel() < 18 :
              htmltext = "30587-03.htm"
            else:
              if st.getQuestItemsCount(KHAVATARI_TOTEM) != 0 :
                htmltext = "30587-04.htm"
              else:
                htmltext = "30587-05.htm"
    elif event == "1" :
        st.set("id","0")
        st.set("cond","1")
        st.setState(State.STARTED)
        st.playSound("ItemSound.quest_accept")
        htmltext = "30587-06.htm"
        st.giveItems(POMEGRANATE,1)
    elif event == "30587-09a.htm" :
        st.takeItems(ROSHEEKS_LETTER,1)
        st.giveItems(GANTAKIS_LETTER,1)
        st.set("cond","9")
        st.playSound("ItemSound.quest_middle")
    elif event == "30587-09b.htm" :
        st.takeItems(ROSHEEKS_LETTER,1)
        st.giveItems(GANTAKIS_LETTER,1)
        st.set("cond","14")
        st.playSound("ItemSound.quest_middle")
    elif event == "32056-03.htm" :
        st.set("cond","15")
        st.playSound("ItemSound.quest_middle")
    elif event == "32056-08.htm" :
        st.set("cond","19")
        st.playSound("ItemSound.quest_middle")
        st.takeItems(8546,-1)
    elif event == "31979-03.htm" :
        st.takeItems(SCROLL_FIERY_SPIRIT,1)
        st.rewardItems(57,81900)
        st.giveItems(KHAVATARI_TOTEM,1)
        st.addExpAndSp(295862,19344)
        player.sendPacket(SocialAction(player.getObjectId(),3))
        st.set("cond","0")
        st.set("onlyone","1")
        st.exitQuest(False)
        st.playSound("ItemSound.quest_finish")
    return htmltext
Esempio n. 13
0
 def onEvent(self, event, st):
   htmltext = event
   if event == "32041-2.htm" :
      st.playSound("ItemSound.quest_finish")
      st.addExpAndSp(76960,5793)
      ObjectId=st.getPlayer().getObjectId()
      st.getPlayer().broadcastPacket(SocialAction(ObjectId,3))
      st.unset("cond")
      st.exitQuest(False)
   elif event == "31961-1.htm" :
      st.set("cond","1")
      st.setState(State.STARTED)
      st.playSound("ItemSound.quest_accept")
   return htmltext
Esempio n. 14
0
    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()
        id = st.getState()
        if id == State.CREATED:
            if player.getRace().ordinal() != 1:
                htmltext = "30362-00.htm"
            elif player.getLevel() >= 3:
                htmltext = "30362-03.htm"
                st.set("cond", "0")
            else:
                htmltext = "30362-02.htm"
                st.exitQuest(1)
        elif id == State.COMPLETED:
            htmltext = "<html><body>This quest has already been completed.</body></html>"
        elif id == State.STARTED:
            try:
                cond = st.getInt("cond")
            except:
                cond = None
            if cond == 1:
                if npcId == 30362:
                    htmltext = "30362-05.htm"
                elif npcId == 30371 and st.getQuestItemsCount(
                        ANDELLRIAS_LETTER):
                    htmltext = "30371-01.htm"
                    st.takeItems(ANDELLRIAS_LETTER, 1)
                    st.giveItems(MOTHERTREE_FRUIT, 1)
                    st.set("cond", "2")
                    st.playSound("ItemSound.quest_middle")
            elif cond == 2:
                if npcId == 30362 and st.getQuestItemsCount(MOTHERTREE_FRUIT):
                    htmltext = "30362-06.htm"
                    st.rewardItems(ADENA, 1000)
                    st.takeItems(MOTHERTREE_FRUIT, 1)
                    st.addExpAndSp(1000, 0)
                    ObjectId = player.getObjectId()
                    player.broadcastPacket(SocialAction(ObjectId, 3))
                    st.unset("cond")
                    st.exitQuest(False)
                    st.playSound("ItemSound.quest_finish")
                elif npcId == 30371 and st.getQuestItemsCount(
                        MOTHERTREE_FRUIT):
                    htmltext = "30371-02.htm"
        return htmltext
Esempio n. 15
0
 def onEvent(self, event, st):
     htmltext = event
     if event == "1":
         htmltext = "0a.htm"
         st.set("cond", "1")
         st.setState(State.STARTED)
         st.playSound("ItemSound.quest_accept")
     if event == "2":  #and cond == 1
         htmltext = "1a.htm"
         st.set("cond", "2")
     if event == "3":  #and cond == 2
         htmltext = "2a.htm"
         st.set("cond", "3")
     if event == "4":  #and cond == 3
         htmltext = "3a.htm"
         st.set("cond", "4")
     if event == "5":  #and cond == 4
         htmltext = "4a.htm"
         st.set("cond", "5")
         st.giveItems(ENGRAVED_HAMMER, 1)
     if event == "6" and st.getQuestItemsCount(ENGRAVED_HAMMER):
         htmltext = "5a.htm"
         st.set("cond", "6")
     if event == "7" and st.getQuestItemsCount(ENGRAVED_HAMMER):
         htmltext = "6a.htm"
         st.set("cond", "7")
     if event == "8" and st.getQuestItemsCount(GREY_STAR):
         htmltext = "7a.htm"
         st.takeItems(GREY_STAR, 1)
         st.set("cond", "9")
     if event == "9" and st.getQuestItemsCount(ENGRAVED_HAMMER):
         htmltext = "8a.htm"
         st.takeItems(ENGRAVED_HAMMER, 1)
         st.set("cond", "10")
     if event == "10":
         htmltext = "9b.htm"
         st.rewardItems(57, 17647)
         st.addExpAndSp(107387, 7369)
         ObjectId = st.getPlayer().getObjectId()
         st.getPlayer().broadcastPacket(SocialAction(ObjectId, 3))
         st.playSound("ItemSound.quest_finish")
         st.exitQuest(False)
     return htmltext
Esempio n. 16
0
def exit503(completed,st):
    if completed:
      st.giveItems(Proof_Aspiration,1)
      st.addExpAndSp(0,250000)
      ObjectId=st.getPlayer().getObjectId()
      st.getPlayer().broadcastPacket(SocialAction(ObjectId,3))
      for var in STATS:
        st.unset(var)
      st.exitQuest(False)
    else:
      st.exitQuest(1)
    st.takeItems(Scepter_Judgement,-1)
    try:
      members = st.getPlayer().getClan().getOnlineMembers(0)[0]
      for i in members:
        st.getPlayer().getClan().getClanMember(i).getPlayerInstance().getQuestState(qn).exitQuest(1)
      offlineMemberExit(st)
    except:
      return "You dont have any members in your Clan, so you can't finish the Pursuit of Aspiration"
    return "Congratulations, you have finished the Pursuit of Clan Ambition"
Esempio n. 17
0
 def onEvent (self,event,st) :
   htmltext = event
   cond = st.getInt("cond")
   if event == "31302-1.htm" :
     st.set("cond","1")
     st.setState(State.STARTED)
     st.playSound("ItemSound.quest_accept")
   if event == "31518-1.htm" :
     if cond == 1 :
       st.set("cond","2")
       st.playSound("ItemSound.quest_middle")
   if event == "31517-1.htm" :
     if cond == 2 :
       st.addExpAndSp(350531,28204)
       ObjectId=st.getPlayer().getObjectId()
       st.getPlayer().broadcastPacket(SocialAction(ObjectId,3))
       st.unset("cond")
       st.playSound("ItemSound.quest_finish")
       st.exitQuest(False)
   return htmltext
Esempio n. 18
0
    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")
        id = st.getState()
        if id == State.COMPLETED:
            htmltext = "<html><body>This quest has already been completed.</body></html>"
        elif id == State.CREATED and npcId == HIERARCH:
            st2 = player.getQuestState("17_LightAndDarkness")
            if st2 and st2.getState() == State.COMPLETED:
                if player.getLevel() >= 62:
                    htmltext = "31517-0.htm"
                else:
                    htmltext = "<html><body>(Only characters level 62 and above are permitted to undertake this quest.) </body></html>"
                    st.exitQuest(1)
            else:
                htmltext = "<html><body>Quest Light and Darkness need to be finished first.</body></html>"
                st.exitQuest(1)
        elif id == State.STARTED:
            if npcId == EVIL_ALTAR_1 and cond == 1:
                htmltext = "31512-0.htm"
            if npcId == EVIL_ALTAR_2 and cond == 2:
                htmltext = "31513-0.htm"
            if npcId == EVIL_ALTAR_3 and cond == 3:
                htmltext = "31514-0.htm"
            if npcId == EVIL_ALTAR_4 and cond == 4:
                htmltext = "31515-0.htm"
            if npcId == EVIL_ALTAR_5 and cond == 5:
                htmltext = "31516-0.htm"
            if npcId == HIERARCH and cond == 6:
                st.addExpAndSp(865187, 69172)
                ObjectId = player.getObjectId()
                player.broadcastPacket(SocialAction(ObjectId, 3))
                st.set("cond", "0")
                st.exitQuest(False)
                st.playSound("ItemSound.quest_finish")
                htmltext = "31517-3.htm"
        return htmltext
Esempio n. 19
0
 def onEvent(self, event, st):
     cond = st.getInt("cond")
     htmltext = event
     leaf = st.getQuestItemsCount(LEAF_OF_FLAVA)
     meat = st.getQuestItemsCount(BUFFALO_MEAT)
     horn = st.getQuestItemsCount(ANTELOPE_HORN)
     if event == "31521-03.htm" and cond == 0:
         if st.getPlayer().getLevel() >= 71:
             st.set("cond", "1")
             st.setState(State.STARTED)
             st.playSound("ItemSound.quest_accept")
         else:
             htmltext = "31521-02.htm"
             st.exitQuest(1)
     elif event == "31521-07.htm":
         if cond == 2 and leaf == meat == horn == 100:
             htmltext = "31521-06.htm"
             st.playSound("ItemSound.quest_finish")
             random = st.getRandom(100)
             i = 0
             while i < len(REWARDS):
                 item, adena, chance, chance2 = REWARDS[i]
                 if chance <= random <= chance2:
                     break
                 i = i + 1
             st.rewardItems(57, adena)
             if item:
                 st.giveItems(item, 1)
             else:
                 st.addExpAndSp(230000, 18250)
                 ObjectId = st.getPlayer().getObjectId()
                 st.getPlayer().broadcastPacket(SocialAction(ObjectId, 3))
             st.takeItems(LEAF_OF_FLAVA, -1)
             st.takeItems(BUFFALO_MEAT, -1)
             st.takeItems(ANTELOPE_HORN, -1)
             st.exitQuest(1)
     return htmltext
Esempio n. 20
0
 def onEvent (self,event,st) :
   htmltext = event
   carn=st.getQuestItemsCount(CARNIVORE_SPORE)
   herb=st.getQuestItemsCount(HERBIBOROUS_SPORE)
   if event == "30717-5.htm" :
     if st.getPlayer().getLevel() >= 43 :
       st.set("cond","1")
       st.setState(State.STARTED)
       st.playSound("ItemSound.quest_accept")
     else :
       htmltext = "30717-4.htm"
       st.exitQuest(1)
   elif event in [ "30717-10.htm", "30717-9.htm" ] and (carn>=50 and herb>=50) :
     if event == "30717-9.htm" :
        st.rewardItems(57,44000)
     else :
        st.addExpAndSp(36000,2600)
        ObjectId=st.getPlayer().getObjectId()
        st.getPlayer().broadcastPacket(SocialAction(ObjectId,3))
     st.takeItems(CARNIVORE_SPORE,-1)
     st.takeItems(HERBIBOROUS_SPORE,-1)
     st.playSound("ItemSound.quest_finish")
     st.exitQuest(1)
   return htmltext
Esempio n. 21
0
 def onEvent (self,event,st) :
   htmltext = event
   if event == "30333-1a.htm" :
     st.set("cond","1")
     st.giveItems(PATROLS_REPORT,1)
     st.setState(State.STARTED)
     st.set("awaitGem","1")
     st.set("awaitRedGem","1")
     st.playSound("ItemSound.quest_accept")
   if event == "30344-1.htm" :
     st.takeItems(PATROLS_REPORT,1)
     st.set("cond","2")
   if event == "30344-3.htm" :
     if st.getQuestItemsCount(SHINING_RED_GEM) == st.getQuestItemsCount(SHINING_GEM) == 50 :
       st.takeItems(SHINING_GEM,-1)
       st.takeItems(SHINING_RED_GEM,-1)
       st.addExpAndSp(0,42000)
       ObjectId=st.getPlayer().getObjectId()
       st.getPlayer().broadcastPacket(SocialAction(ObjectId,3))
       st.playSound("ItemSound.quest_finish")
       st.exitQuest(1)
     else :
       htmltext = "You don't have required items"
   return htmltext
Esempio n. 22
0
 def onEvent (self,event,st) :
     htmltext = event
     if event == "31314-03.htm" :
       if st.getPlayer().getLevel() >= 66 :
         st.set("cond","1")
         st.setState(State.STARTED)
         st.playSound("ItemSound.quest_accept")
       else :
         htmltext = "31314-02.htm"
         st.exitQuest(1)
     elif event == "31315-02.htm" :
       st.set("cond","2")
       htmltext = "31315-02.htm"
       st.giveItems(BOX,1)
     elif event == "31555-02.htm" :
       st.rewardItems(57,40000)
       st.takeItems(BOX,-1)
       st.addExpAndSp(126668,11731)
       ObjectId=st.getPlayer().getObjectId()
       st.getPlayer().broadcastPacket(SocialAction(ObjectId,3))
       st.unset("cond")
       st.playSound("ItemSound.quest_finish")
       st.exitQuest(False)
     return htmltext
Esempio n. 23
0
 def onEvent(self, event, st):
     htmltext = event
     player = st.getPlayer()
     if event == "1":
         st.set("id", "0")
         st.set("cond", "1")
         st.setState(State.STARTED)
         st.playSound("ItemSound.quest_accept")
         htmltext = "30585-06.htm"
         st.giveItems(FIRE_CHARM, 1)
     elif event == "32057_1":
         htmltext = "32057-02.htm"
         st.playSound("ItemSound.quest_middle")
         st.set("cond", "14")
     elif event == "32057_2":
         htmltext = "32057-05.htm"
         st.playSound("ItemSound.quest_middle")
         st.set("cond", "21")
     elif event == "32090_1":
         htmltext = "32090-04.htm"
         st.playSound("ItemSound.quest_middle")
         st.set("cond", "18")
     elif event == "30585_1":
         if player.getClassId().getId() != 0x31:
             if player.getClassId().getId() == 0x32:
                 htmltext = "30585-02a.htm"
             else:
                 htmltext = "30585-02.htm"
         else:
             if player.getLevel() < 18:
                 htmltext = "30585-03.htm"
             else:
                 if st.getQuestItemsCount(MASK_OF_MEDIUM) != 0:
                     htmltext = "30585-04.htm"
                 else:
                     htmltext = "30585-05.htm"
                     return htmltext
     elif event == "30585_1a":
         htmltext = "30585-10a.htm"
     elif event == "30585_2":
         htmltext = "30585-11.htm"
         st.takeItems(TOTEM_SPIRIT_CLAW, 1)
         st.giveItems(TATARUS_LETTER, 1)
         st.set("cond", "5")
         st.playSound("ItemSound.quest_middle")
     elif event == "30585_3":
         htmltext = "30585-11a.htm"
         st.takeItems(TOTEM_SPIRIT_CLAW, 1)
         st.playSound("ItemSound.quest_middle")
         st.set("cond", "12")
     elif event == "30592_1":
         htmltext = "30592-02.htm"
     elif event == "30592_2":
         htmltext = "30592-03.htm"
         st.takeItems(HESTUI_MASK, 1)
         st.takeItems(FIERY_EGG2, 1)
         st.giveItems(TOTEM_SPIRIT_CLAW, 1)
         st.set("cond", "4")
         st.playSound("ItemSound.quest_middle")
     elif event == "30502_2":
         htmltext = "30502-07.htm"
         st.rewardItems(57, 81900)
         st.takeItems(TOTEM_SPIRIT_BLOOD,
                      st.getQuestItemsCount(TOTEM_SPIRIT_BLOOD))
         st.giveItems(MASK_OF_MEDIUM, 1)
         st.addExpAndSp(295862, 18194)
         player.sendPacket(SocialAction(player.getObjectId(), 3))
         player.sendPacket(SocialAction(player.getObjectId(), 15))
         st.set("cond", "0")
         st.exitQuest(False)
         st.playSound("ItemSound.quest_finish")
     elif event == "30593_1":
         htmltext = "30593-02.htm"
     elif event == "30593_2":
         htmltext = "30593-03.htm"
         st.takeItems(BLOOD_CAULDRON, 1)
         st.giveItems(SPIRIT_NET, 1)
         st.set("cond", "9")
         st.playSound("ItemSound.quest_middle")
     return htmltext
Esempio n. 24
0
    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()
        id = st.getState()
        if npcId != 30585 and id != State.STARTED: return htmltext

        if npcId == 30585 and st.getInt("cond") == 0:
            htmltext = "30585-01.htm"
        elif npcId == 30585 and st.getInt("cond") == 12:
            htmltext = "30585-11a.htm"
        elif npcId == 31979 and st.getInt("cond") == 12:
            htmltext = "31979-01.htm"
            st.playSound("ItemSound.quest_middle")
            st.set("cond", "13")
        elif npcId == 31979 and st.getInt("cond") == 21:
            htmltext = "31979-03.htm"
            st.giveItems(MASK_OF_MEDIUM, 1)
            st.rewardItems(57, 81900)
            st.addExpAndSp(295862, 18194)
            player.sendPacket(SocialAction(player.getObjectId(), 3))
            player.sendPacket(SocialAction(player.getObjectId(), 15))
            st.set("cond", "0")
            st.exitQuest(False)
            st.playSound("ItemSound.quest_finish")
        elif npcId == 31979 and st.getInt("cond") == 13:
            htmltext = "31979-02.htm"
        elif npcId == 32057 and st.getInt("cond") == 13:
            htmltext = "32057-01.htm"
        elif npcId == 32057 and st.getInt("cond") == 14:
            htmltext = "32057-03.htm"
        elif npcId == 32057 and st.getInt("cond") == 20:
            htmltext = "32057-04.htm"
        elif npcId == 32057 and st.getInt("cond") == 21:
            htmltext = "32057-05.htm"
        elif npcId == 32090 and st.getInt("cond") == 15:
            htmltext = "32090-01.htm"
            st.playSound("ItemSound.quest_middle")
            st.set("cond", "16")
        elif npcId == 32090 and st.getInt("cond") == 16:
            htmltext = "32090-01.htm"
        elif npcId == 32090 and st.getInt("cond") == 17:
            htmltext = "32090-02.htm"
        elif npcId == 32090 and st.getInt("cond") == 18:
            htmltext = "32090-05.htm"
        elif npcId == 32090 and st.getInt("cond") == 19:
            htmltext = "32090-06.htm"
            st.playSound("ItemSound.quest_middle")
            st.set("cond", "20")
        elif npcId == 32090 and st.getInt("cond") == 20:
            htmltext = "32090-06.htm"
        elif npcId == 30585 and st.getInt("cond") and st.getQuestItemsCount(
                FIRE_CHARM) == 1 and (
                    (st.getQuestItemsCount(KASHA_BEAR_PELT) +
                     st.getQuestItemsCount(KASHA_BSPIDER_HUSK) +
                     st.getQuestItemsCount(FIERY_EGG1)) < 3):
            htmltext = "30585-07.htm"
        elif npcId == 30585 and st.getInt("cond") and st.getQuestItemsCount(
                FIRE_CHARM) == 1 and (
                    (st.getQuestItemsCount(KASHA_BEAR_PELT) +
                     st.getQuestItemsCount(KASHA_BSPIDER_HUSK) +
                     st.getQuestItemsCount(FIERY_EGG1)) >= 3):
            htmltext = "30585-08.htm"
            st.takeItems(FIRE_CHARM, 1)
            st.takeItems(KASHA_BEAR_PELT, 1)
            st.takeItems(KASHA_BSPIDER_HUSK, 1)
            st.takeItems(FIERY_EGG1, 1)
            st.giveItems(HESTUI_MASK, 1)
            st.giveItems(FIERY_EGG2, 1)
            st.set("cond", "3")
            st.playSound("ItemSound.quest_middle")
        elif npcId == 30585 and st.getInt("cond") and st.getQuestItemsCount(
                HESTUI_MASK) == 1 and st.getQuestItemsCount(FIERY_EGG2) == 1:
            htmltext = "30585-09.htm"
        elif npcId == 30585 and st.getInt("cond") and st.getQuestItemsCount(
                TOTEM_SPIRIT_CLAW) == 1:
            htmltext = "30585-10.htm"
        elif npcId == 30585 and st.getInt("cond") and st.getQuestItemsCount(
                TATARUS_LETTER) == 1:
            htmltext = "30585-12.htm"
        elif npcId == 30585 and st.getInt("cond") and (
                st.getQuestItemsCount(GRIZZLY_BLOOD)
                or st.getQuestItemsCount(FLAME_CHARM)
                or st.getQuestItemsCount(BLOOD_CAULDRON)
                or st.getQuestItemsCount(SPIRIT_NET)
                or st.getQuestItemsCount(BOUND_DURKA_SPIRIT)
                or st.getQuestItemsCount(TOTEM_SPIRIT_BLOOD)):
            htmltext = "30585-13.htm"
        elif npcId == 30592 and st.getInt("cond") and st.getQuestItemsCount(
                HESTUI_MASK) and st.getQuestItemsCount(FIERY_EGG2):
            htmltext = "30592-01.htm"
        elif npcId == 30592 and st.getInt("cond") and st.getQuestItemsCount(
                TOTEM_SPIRIT_CLAW):
            htmltext = "30592-04.htm"
        elif npcId == 30592 and st.getInt("cond") and (
                st.getQuestItemsCount(GRIZZLY_BLOOD)
                or st.getQuestItemsCount(FLAME_CHARM)
                or st.getQuestItemsCount(BLOOD_CAULDRON)
                or st.getQuestItemsCount(SPIRIT_NET)
                or st.getQuestItemsCount(BOUND_DURKA_SPIRIT)
                or st.getQuestItemsCount(TOTEM_SPIRIT_BLOOD)
                or st.getQuestItemsCount(TATARUS_LETTER)):
            htmltext = "30592-05.htm"
        elif npcId == 30502 and st.getInt("cond") and st.getQuestItemsCount(
                TATARUS_LETTER):
            htmltext = "30502-01.htm"
            st.giveItems(FLAME_CHARM, 1)
            st.takeItems(TATARUS_LETTER, 1)
            st.set("cond", "6")
            st.playSound("ItemSound.quest_middle")
        elif npcId == 30502 and st.getInt("cond") and st.getQuestItemsCount(
                FLAME_CHARM) == 1 and st.getQuestItemsCount(GRIZZLY_BLOOD) < 3:
            htmltext = "30502-02.htm"
        elif npcId == 30502 and st.getInt("cond") and st.getQuestItemsCount(
                FLAME_CHARM
        ) == 1 and st.getQuestItemsCount(GRIZZLY_BLOOD) >= 3:
            htmltext = "30502-03.htm"
            st.takeItems(FLAME_CHARM, 1)
            st.takeItems(GRIZZLY_BLOOD, st.getQuestItemsCount(GRIZZLY_BLOOD))
            st.giveItems(BLOOD_CAULDRON, 1)
            st.set("cond", "8")
            st.playSound("ItemSound.quest_middle")
        elif npcId == 30502 and st.getInt("cond") and st.getQuestItemsCount(
                BLOOD_CAULDRON) == 1:
            htmltext = "30502-04.htm"
        elif npcId == 30502 and st.getInt("cond") and (
                st.getQuestItemsCount(BOUND_DURKA_SPIRIT) == 1
                or st.getQuestItemsCount(SPIRIT_NET) == 1):
            htmltext = "30502-05.htm"
        elif npcId == 30502 and st.getInt("cond") and st.getQuestItemsCount(
                TOTEM_SPIRIT_BLOOD) == 1:
            htmltext = "30502-06.htm"
        elif npcId == 30593 and st.getInt("cond") and st.getQuestItemsCount(
                BLOOD_CAULDRON):
            htmltext = "30593-01.htm"
        elif npcId == 30593 and st.getInt("cond") and st.getQuestItemsCount(
                SPIRIT_NET) and st.getQuestItemsCount(BOUND_DURKA_SPIRIT) == 0:
            htmltext = "30593-04.htm"
        elif npcId == 30593 and st.getInt("cond") and st.getQuestItemsCount(
                SPIRIT_NET) == 0 and st.getQuestItemsCount(BOUND_DURKA_SPIRIT):
            htmltext = "30593-05.htm"
            st.takeItems(BOUND_DURKA_SPIRIT, 1)
            st.giveItems(TOTEM_SPIRIT_BLOOD, 1)
            st.set("cond", "11")
            st.playSound("ItemSound.quest_middle")
        elif npcId == 30593 and st.getInt(
                "cond") == 1 and st.getQuestItemsCount(TOTEM_SPIRIT_BLOOD):
            htmltext = "30593-06.htm"
        return htmltext
Esempio n. 25
0
    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()
        id = st.getState()
        if npcId != KARUKIA and id != State.STARTED: return htmltext

        playerClassID = player.getClassId().getId()
        playerLvl = player.getLevel()
        cond = st.getInt("cond")

        if npcId == KARUKIA and cond == 0:
            if playerLvl >= 18 and playerClassID == 0x2c and st.getQuestItemsCount(
                    MARK_OF_RAIDER) == 0 and st.getQuestItemsCount(
                        GOBLIN_DWELLING_MAP) == 0:
                htmltext = "30570-01.htm"
            elif playerClassID != 0x2c:
                if playerClassID == 0x2d:
                    htmltext = "30570-02a.htm"
                else:
                    htmltext = "30570-03.htm"
            elif playerLvl < 18 and playerClassID == 0x2c:
                htmltext = "30570-02.htm"
            elif playerLvl >= 18 and playerClassID == 0x2c and st.getQuestItemsCount(
                    MARK_OF_RAIDER) == 1:
                htmltext = "30570-04.htm"
            else:
                htmltext = "30570-02.htm"
        elif npcId == KARUKIA and cond and st.getQuestItemsCount(
                GOBLIN_DWELLING_MAP
        ) == 1 and st.getQuestItemsCount(KURUKA_RATMAN_TOOTH) < 10:
            htmltext = "30570-06.htm"
        elif npcId == KARUKIA and cond and st.getQuestItemsCount(
                GOBLIN_DWELLING_MAP) == 1 and st.getQuestItemsCount(
                    KURUKA_RATMAN_TOOTH) >= 10 and st.getQuestItemsCount(
                        BETRAYER_UMBAR_REPORT) == 0:
            htmltext = "30570-07.htm"
        elif npcId == KARUKIA and cond > 5:
            htmltext = "30570-07b.htm"
        elif npcId == KARUKIA and cond and st.getQuestItemsCount(
                BETRAYER_UMBAR_REPORT
        ) and st.getQuestItemsCount(HEAD_OF_BETRAYER) < 2:
            htmltext = "30570-08.htm"
        elif npcId == KARUKIA and cond and st.getQuestItemsCount(
                BETRAYER_UMBAR_REPORT) and st.getQuestItemsCount(
                    HEAD_OF_BETRAYER) == 2:
            htmltext = "30570-09.htm"
        elif npcId == KASMAN and cond and st.getQuestItemsCount(
                BETRAYER_UMBAR_REPORT) and st.getQuestItemsCount(
                    HEAD_OF_BETRAYER) == 0:
            htmltext = "30501-01.htm"
        elif npcId == KASMAN and cond and st.getQuestItemsCount(
                HEAD_OF_BETRAYER) > 0 and st.getQuestItemsCount(
                    HEAD_OF_BETRAYER) < 2:
            htmltext = "30501-02.htm"
        elif npcId == KASMAN and cond and st.getQuestItemsCount(
                HEAD_OF_BETRAYER) == 2:
            htmltext = "30501-03.htm"
            st.rewardItems(57, 81900)
            st.takeItems(HEAD_OF_BETRAYER, -1)
            st.takeItems(BETRAYER_UMBAR_REPORT, -1)
            st.giveItems(MARK_OF_RAIDER, 1)
            st.addExpAndSp(295862, 17354)
            player.sendPacket(SocialAction(player.getObjectId(), 3))
            st.unset("cond")
            st.exitQuest(False)
            st.playSound("ItemSound.quest_finish")
        elif npcId == TAZEER:
            if cond == 5:
                htmltext = "31978-01.htm"
            elif cond == 6:
                htmltext = "31978-04.htm"
            elif cond == 7:
                htmltext = "31978-05.htm"
                st.takeItems(TIMORA_ORC_HEAD, -1)
                st.giveItems(MARK_OF_RAIDER, 1)
                st.rewardItems(57, 81900)
                st.addExpAndSp(160267, 10656)
                player.sendPacket(SocialAction(player.getObjectId(), 3))
                st.unset("cond")
                st.exitQuest(False)
                st.playSound("ItemSound.quest_finish")
        return htmltext
Esempio n. 26
0
    def onTalk(self, npc, player):

        npcId = npc.getNpcId()
        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

        id = st.getState()
        if npcId == 30568 and id == State.COMPLETED:
            htmltext = "<html><body>This quest has already been completed.</body></html>"
        elif npcId == 30568 and id == State.CREATED:
            if player.getRace().ordinal() != 3:
                htmltext = "30568-00.htm"
                st.exitQuest(1)
            elif player.getLevel() >= 10:
                htmltext = "30568-02.htm"
                return htmltext
            else:
                htmltext = "30568-01.htm"
                st.exitQuest(1)
        elif npcId == 30568 and st.getInt("cond") == 1 and (
                st.getQuestItemsCount(HATOSS_ORDER1_ID)
                or st.getQuestItemsCount(HATOSS_ORDER2_ID)
                or st.getQuestItemsCount(HATOSS_ORDER3_ID)) and (
                    (st.getQuestItemsCount(LETTER_TO_ELF_ID) +
                     st.getQuestItemsCount(LETTER_TO_HUMAN_ID) +
                     st.getQuestItemsCount(LETTER_TO_DARKELF_ID)) == 0):
            htmltext = "30568-04.htm"
        elif npcId == 30568 and st.getInt("cond") == 1 and (
                st.getQuestItemsCount(HATOSS_ORDER1_ID)
                or st.getQuestItemsCount(HATOSS_ORDER2_ID)
                or st.getQuestItemsCount(HATOSS_ORDER3_ID)) and (
                    (st.getQuestItemsCount(LETTER_TO_ELF_ID) +
                     st.getQuestItemsCount(LETTER_TO_HUMAN_ID) +
                     st.getQuestItemsCount(LETTER_TO_DARKELF_ID)) == 1):
            htmltext = "30568-05.htm"
        elif npcId == 30568 and st.getInt("cond") == 1 and (
                st.getQuestItemsCount(HATOSS_ORDER1_ID)
                or st.getQuestItemsCount(HATOSS_ORDER2_ID)
                or st.getQuestItemsCount(HATOSS_ORDER3_ID)) and (
                    (st.getQuestItemsCount(LETTER_TO_ELF_ID) +
                     st.getQuestItemsCount(LETTER_TO_HUMAN_ID) +
                     st.getQuestItemsCount(LETTER_TO_DARKELF_ID)) == 2):
            htmltext = "30568-08.htm"
        elif npcId == 30568 and st.getInt("cond") == 1 and (
                st.getQuestItemsCount(HATOSS_ORDER1_ID)
                or st.getQuestItemsCount(HATOSS_ORDER2_ID)
                or st.getQuestItemsCount(HATOSS_ORDER3_ID)) and (
                    (st.getQuestItemsCount(LETTER_TO_ELF_ID) +
                     st.getQuestItemsCount(LETTER_TO_HUMAN_ID) +
                     st.getQuestItemsCount(LETTER_TO_DARKELF_ID)) == 3):
            if st.getInt("id") != 107:
                st.set("id", "107")
                htmltext = "30568-10.htm"
                st.takeItems(LETTER_TO_DARKELF_ID, 1)
                st.takeItems(LETTER_TO_HUMAN_ID, 1)
                st.takeItems(LETTER_TO_ELF_ID, 1)
                st.takeItems(HATOSS_ORDER3_ID, 1)
                st.giveItems(57, 14666)
                st.giveItems(LESSER_HEALING_ID,
                             int(100 * Config.RATE_QUESTS_REWARD_ITEMS))
                st.giveItems(BUTCHER_ID, 1)
                st.giveItems(CRYSTAL_BATTLE,
                             int(10 * Config.RATE_QUESTS_REWARD_ITEMS))
                st.giveItems(CRYSTAL_LOVE,
                             int(10 * Config.RATE_QUESTS_REWARD_ITEMS))
                st.giveItems(CRYSTAL_SOLITUDE,
                             int(10 * Config.RATE_QUESTS_REWARD_ITEMS))
                st.giveItems(CRYSTAL_FEAST,
                             int(10 * Config.RATE_QUESTS_REWARD_ITEMS))
                st.giveItems(CRYSTAL_CELEBRATION,
                             int(10 * Config.RATE_QUESTS_REWARD_ITEMS))
                # check the player state against this quest newbie rewarding mark.
                newbie = player.getNewbie()
                if newbie | NEWBIE_REWARD != newbie:
                    player.setNewbie(newbie | NEWBIE_REWARD)
                    if player.getClassId().isMage():
                        st.giveItems(SPIRITSHOT_NO_GRADE_FOR_BEGINNERS, 3000)
                        st.playTutorialVoice("tutorial_voice_027")
                    else:
                        st.giveItems(SOULSHOT_NO_GRADE_FOR_BEGINNERS, 7000)
                        st.playTutorialVoice("tutorial_voice_026")
                st.unset("cond")
                st.addExpAndSp(34565, 2962)
                player.sendPacket(SocialAction(player.getObjectId(), 3))
                st.exitQuest(False)
                st.playSound("ItemSound.quest_finish")
        elif npcId == 30580 and st.getInt(
                "cond") == 1 and id == State.STARTED and (
                    st.getQuestItemsCount(HATOSS_ORDER1_ID)
                    or st.getQuestItemsCount(HATOSS_ORDER2_ID)
                    or st.getQuestItemsCount(HATOSS_ORDER3_ID)):
            htmltext = "30580-01.htm"
        return htmltext
Esempio n. 27
0
    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()
        id = st.getState()
        if id == State.CREATED:
            st.set("cond", "0")
            if player.getRace().ordinal() == 2:
                if player.getLevel() >= 2:
                    htmltext = "30130-03.htm"
                    return htmltext
                else:
                    htmltext = "30130-00.htm"
                    st.exitQuest(1)
            else:
                htmltext = "30130-02.htm"
                st.exitQuest(1)
        elif id == State.COMPLETED:
            htmltext = "<html><body>This quest has already been completed.</body></html>"
        elif npcId == 30130:
            if st.getInt("cond") and st.getQuestItemsCount(UNDRES_LETTER_ID):
                if (st.getQuestItemsCount(GARMIELS_SCRIPTURE_ID) +
                        st.getQuestItemsCount(DREVIANT_WINE_ID) +
                        st.getQuestItemsCount(CEREMONIAL_DAGGER_ID) == 0):
                    htmltext = "30130-05.htm"
                elif st.getQuestItemsCount(
                        CEREMONIAL_DAGGER_ID) == st.getQuestItemsCount(
                            DREVIANT_WINE_ID) == st.getQuestItemsCount(
                                GARMIELS_SCRIPTURE_ID) == 1:
                    htmltext = "30130-06.htm"
                    st.takeItems(CEREMONIAL_DAGGER_ID, 1)
                    st.takeItems(DREVIANT_WINE_ID, 1)
                    st.takeItems(GARMIELS_SCRIPTURE_ID, 1)
                    st.takeItems(UNDRES_LETTER_ID, 1)
                    st.rewardItems(ADENA_ID, 2966)
                    st.addExpAndSp(5672, 446)
                    ObjectId = player.getObjectId()
                    player.broadcastPacket(SocialAction(ObjectId, 3))
                    st.set("cond", "0")
                    st.exitQuest(False)
                    st.playSound("ItemSound.quest_finish")
        elif id == State.STARTED:
            if npcId == 30135:
                if st.getQuestItemsCount(UNDRES_LETTER_ID):
                    if not st.getQuestItemsCount(CEREMONIAL_DAGGER_ID):
                        st.giveItems(CEREMONIAL_DAGGER_ID, 1)
                        htmltext = "30135-01.htm"
                    else:
                        htmltext = "30135-02.htm"
            elif npcId == 30139:
                if st.getQuestItemsCount(UNDRES_LETTER_ID):
                    if not st.getQuestItemsCount(DREVIANT_WINE_ID):
                        st.giveItems(DREVIANT_WINE_ID, 1)
                        htmltext = "30139-01.htm"
                    else:
                        htmltext = "30139-02.htm"
            elif npcId == 30143:
                if st.getQuestItemsCount(UNDRES_LETTER_ID):
                    if not st.getQuestItemsCount(GARMIELS_SCRIPTURE_ID):
                        st.giveItems(GARMIELS_SCRIPTURE_ID, 1)
                        htmltext = "30143-01.htm"
                    else:
                        htmltext = "30143-02.htm"
            if st.getQuestItemsCount(UNDRES_LETTER_ID) and (
                    st.getQuestItemsCount(CEREMONIAL_DAGGER_ID) +
                    st.getQuestItemsCount(DREVIANT_WINE_ID) +
                    st.getQuestItemsCount(GARMIELS_SCRIPTURE_ID) >= 3):
                st.set("cond", "2")
                st.playSound("ItemSound.quest_middle")
        return htmltext
Esempio n. 28
0
 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()
   id = st.getState()
   if npcId != 30022 and id != State.STARTED : return htmltext

   npcId = npc.getNpcId()
   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>" 
   id = st.getState()
   if npcId == 30022 and st.getInt("cond")==0 :
       if st.getQuestItemsCount(MARK_OF_FAITH) == 0 :
           htmltext = "30022-01.htm"
           return htmltext
       else:
           htmltext = "30022-04.htm"
   elif npcId == 30022 and st.getInt("cond") and st.getQuestItemsCount(LETTER_OF_ORDER2)==1 and st.getQuestItemsCount(LEMONIELLS_COVENANT)==0 :
        htmltext = "30022-07.htm"
   elif npcId == 30022 and st.getInt("cond") and st.getQuestItemsCount(LETTER_OF_ORDER2)==1 and st.getQuestItemsCount(LEMONIELLS_COVENANT)==1 :
        htmltext = "30022-09.htm"
        st.rewardItems(57,81900)
        st.takeItems(LETTER_OF_ORDER2,1)
        st.takeItems(LEMONIELLS_COVENANT,1)
        st.giveItems(MARK_OF_FAITH,1)
        st.addExpAndSp(295862,17664)
        st.set("cond","0")
        st.exitQuest(False)
        st.playSound("ItemSound.quest_finish")
        player.sendPacket(SocialAction(player.getObjectId(),3))
   elif npcId == 30022 and st.getInt("cond") and st.getQuestItemsCount(LETTER_OF_ORDER1)==1 :
        if st.getQuestItemsCount(BOOK_OF_VIVI) == 1 and st.getQuestItemsCount(BOOK_OF_SIMLON)>0 and st.getQuestItemsCount(BOOK_OF_PRAGA) == 1 :
            htmltext = "30022-08.htm"
            st.takeItems(BOOK_OF_PRAGA,1)
            st.takeItems(BOOK_OF_VIVI,1)
            st.takeItems(BOOK_OF_SIMLON,3)
            st.takeItems(LETTER_OF_ORDER1,1)
            st.giveItems(LETTER_OF_ORDER2,1)
            st.set("cond","3")
        else:
            htmltext = "30022-06.htm"
   elif npcId == 30253 and st.getInt("cond") and st.getQuestItemsCount(LETTER_OF_ORDER1)==1 :
        if st.getQuestItemsCount(BOOK_OF_SIMLON) == 0 :
            htmltext = "30253-01.htm"
            st.giveItems(BOOK_OF_SIMLON,3)
        elif st.getQuestItemsCount(BOOK_OF_SIMLON)>0 :
            htmltext = "30253-02.htm"
   elif npcId == 30030 and st.getInt("cond") and st.getQuestItemsCount(LETTER_OF_ORDER1)==1 :
        if st.getQuestItemsCount(BOOK_OF_VIVI) == 0 :
            htmltext = "30030-01.htm"
            st.giveItems(BOOK_OF_VIVI,1)
        elif st.getQuestItemsCount(BOOK_OF_VIVI) == 1 :
            htmltext = "30030-02.htm"
   elif npcId == 30333 and st.getInt("cond") and st.getQuestItemsCount(LETTER_OF_ORDER1)==1 :
        if st.getQuestItemsCount(BOOK_OF_PRAGA) == 0 and st.getQuestItemsCount(NECKLACE_OF_MOTHER) == 0 :
            htmltext = "30333-01.htm"
            st.giveItems(NECKLACE_OF_MOTHER,1)
        elif st.getQuestItemsCount(BOOK_OF_PRAGA) == 0 and st.getQuestItemsCount(NECKLACE_OF_MOTHER) == 1 and st.getQuestItemsCount(PENDANT_OF_MOTHER) == 0 :
            htmltext = "30333-02.htm"
        elif st.getQuestItemsCount(BOOK_OF_PRAGA) == 0 and st.getQuestItemsCount(NECKLACE_OF_MOTHER) == 1 and st.getQuestItemsCount(PENDANT_OF_MOTHER) == 1 :
            htmltext = "30333-03.htm"
            st.takeItems(NECKLACE_OF_MOTHER,1)
            st.takeItems(PENDANT_OF_MOTHER,1)
            st.giveItems(BOOK_OF_PRAGA,1)
            st.set("cond","2")
        elif st.getQuestItemsCount(BOOK_OF_PRAGA)>0 :
            htmltext = "30333-04.htm"
   elif npcId == 30408 and st.getInt("cond") :
        if st.getQuestItemsCount(LETTER_OF_ORDER2) == 0 :
          htmltext = "30408-02.htm"
        elif st.getQuestItemsCount(LETTER_OF_ORDER2) == 1 and st.getQuestItemsCount(BOOK_OF_LEMONIELL) == 0 and st.getQuestItemsCount(LEMONIELLS_COVENANT) == 0 and st.getQuestItemsCount(CERTIFICATE_OF_GALLINT) == 0 :
            htmltext = "30408-01.htm"
            st.giveItems(BOOK_OF_LEMONIELL,1)
            st.set("cond","4")
        elif st.getQuestItemsCount(LETTER_OF_ORDER2) == 1 and st.getQuestItemsCount(BOOK_OF_LEMONIELL) == 1 and st.getQuestItemsCount(LEMONIELLS_COVENANT) == 0 and st.getQuestItemsCount(CERTIFICATE_OF_GALLINT) == 0 :
            htmltext = "30408-03.htm"
        elif st.getQuestItemsCount(LETTER_OF_ORDER2) == 1 and st.getQuestItemsCount(BOOK_OF_LEMONIELL) == 0 and st.getQuestItemsCount(LEMONIELLS_COVENANT) == 0 and st.getQuestItemsCount(CERTIFICATE_OF_GALLINT) == 1 :
            htmltext = "30408-04.htm"
            st.takeItems(CERTIFICATE_OF_GALLINT,1)
            st.giveItems(LEMONIELLS_COVENANT,1)
            st.set("cond","6")
        elif st.getQuestItemsCount(LETTER_OF_ORDER2) == 1 and st.getQuestItemsCount(BOOK_OF_LEMONIELL) == 0 and st.getQuestItemsCount(LEMONIELLS_COVENANT) == 1 and st.getQuestItemsCount(CERTIFICATE_OF_GALLINT) == 0 :
            htmltext = "30408-05.htm"
   elif npcId == 30017 and st.getInt("cond") and st.getQuestItemsCount(LETTER_OF_ORDER2)==1 and st.getQuestItemsCount(LEMONIELLS_COVENANT)==0 :
        if st.getQuestItemsCount(BOOK_OF_LEMONIELL) == 1 and st.getQuestItemsCount(CERTIFICATE_OF_GALLINT) == 0 :
            htmltext = "30017-01.htm"
            st.takeItems(BOOK_OF_LEMONIELL,1)
            st.giveItems(CERTIFICATE_OF_GALLINT,1)
            st.set("cond","5")
        elif st.getQuestItemsCount(BOOK_OF_LEMONIELL) == 0 and st.getQuestItemsCount(CERTIFICATE_OF_GALLINT) == 1 :
            htmltext = "30017-02.htm"
   return htmltext
Esempio n. 29
0
 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()
   id = st.getState()
   if npcId != 30104 and id != State.STARTED : return htmltext
   if npcId == 30104 and st.getInt("cond")==0 and st.getInt("onlyone")==0 :
        if player.getRace().ordinal() != 4 :
          htmltext = "30104-01.htm"
          st.exitQuest(1)
        else:
          if player.getLevel() < 37 :
            htmltext = "30104-02.htm"
            st.exitQuest(1)
          else:
            htmltext = "30104-03.htm"
   elif npcId == 30104 and st.getInt("cond")==0 and st.getInt("onlyone")==1 :
      htmltext = "<html><body>This quest has already been completed.</body></html>"
   elif npcId == 30104 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID)==1 :
        if st.getQuestItemsCount(OLD_ACCOUNT_BOOK_ID) and st.getQuestItemsCount(BLESSED_SEED_ID) and st.getQuestItemsCount(RECIPE_OF_EMILLY_ID) and st.getQuestItemsCount(LILITH_ELVEN_WAFER_ID) :
          htmltext = "30104-06.htm"
        else:
          htmltext = "30104-05.htm"
   elif npcId == 30104 and st.getInt("cond")>=1 and st.getQuestItemsCount(PARMANS_INSTRUCTIONS_ID)==1 :
        if player.getLevel() < 37 :
          htmltext = "30104-09.htm"
        else:
          htmltext = "30104-10.htm"
          st.giveItems(RING_OF_TESTIMONY2_ID,1)
          st.takeItems(PARMANS_INSTRUCTIONS_ID,1)
          st.giveItems(PARMANS_LETTER_ID,1)
   elif npcId == 30104 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID) and st.getQuestItemsCount(PARMANS_LETTER_ID) and st.getQuestItemsCount(MAPHR_TABLET_FRAGMENT_ID) == 0 :
        htmltext = "30104-11.htm"
   elif npcId == 30104 and st.getInt("cond")>=1 and (st.getQuestItemsCount(CLAY_DOUGH_ID) or st.getQuestItemsCount(PATTERN_OF_KEYHOLE_ID) or st.getQuestItemsCount(NIKOLAS_LIST_ID)) and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID)==1 :
        htmltext = "30104-12.htm"
   elif npcId == 30104 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID) and st.getQuestItemsCount(MAPHR_TABLET_FRAGMENT_ID) :
          st.addExpAndSp(599979,40040)
          st.giveItems(57,108841)
          st.giveItems(7562,50)
          st.takeItems(RING_OF_TESTIMONY2_ID,1)
          st.giveItems(MARK_OF_PROSPERITY_ID,1)
          st.takeItems(MAPHR_TABLET_FRAGMENT_ID,1)
          htmltext = "30104-13.htm"
          st.set("cond","0")
          st.set("onlyone","1")
          st.exitQuest(False)
          st.playSound("ItemSound.quest_finish")
          player.sendPacket(SocialAction(player.getObjectId(),3))
   elif npcId == 30531 and st.getInt("cond")>=1 and st.getQuestItemsCount(OLD_ACCOUNT_BOOK_ID) == 0 and st.getQuestItemsCount(COLLECTION_LICENSE_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID)==1 :
        htmltext = "30531-01.htm"
   elif npcId == 30531 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) :
        if st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION1_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION2_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION3_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION4_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION5_ID) :
          htmltext = "30531-05.htm"
          st.giveItems(OLD_ACCOUNT_BOOK_ID,1)
          st.takeItems(COLLECTION_LICENSE_ID,1)
          st.takeItems(RECEIPT_OF_CONTRIBUTION1_ID,1)
          st.takeItems(RECEIPT_OF_CONTRIBUTION2_ID,1)
          st.takeItems(RECEIPT_OF_CONTRIBUTION3_ID,1)
          st.takeItems(RECEIPT_OF_CONTRIBUTION4_ID,1)
          st.takeItems(RECEIPT_OF_CONTRIBUTION5_ID,1)
          if st.getQuestItemsCount(OLD_ACCOUNT_BOOK_ID) and st.getQuestItemsCount(BLESSED_SEED_ID) and st.getQuestItemsCount(RECIPE_OF_EMILLY_ID) and st.getQuestItemsCount(LILITH_ELVEN_WAFER_ID) :
             st.set("cond","2")
             st.playSound("ItemSound.quest_middle")
        else:
          htmltext = "30531-04.htm"
   elif npcId == 30531 and st.getInt("cond") >= 1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(OLD_ACCOUNT_BOOK_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID)==0 :
        htmltext = "30531-06.htm"
   elif npcId == 30531 and st.getInt("cond") >= 1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID) == 1 :
        htmltext = "30531-07.htm"
   elif npcId == 30532 and st.getInt("cond") >= 1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(LOCKIRINS_NOTICE1_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION1_ID) == 0 and st.getQuestItemsCount(CONTRIBUTION_OF_CHALI_ID) == 0 :
        htmltext = "30532-01.htm"
        st.takeItems(LOCKIRINS_NOTICE1_ID,1)
   elif npcId == 30532 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION1_ID) == 0 and st.getQuestItemsCount(CONTRIBUTION_OF_CHALI_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE1_ID) == 0 :
        htmltext = "30532-02.htm"
   elif npcId == 30532 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(CONTRIBUTION_OF_CHALI_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION1_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE1_ID) == 0 :
        htmltext = "30532-03.htm"
        st.giveItems(RECEIPT_OF_CONTRIBUTION1_ID,1)
        st.takeItems(CONTRIBUTION_OF_CHALI_ID,1)
   elif npcId == 30532 and st.getInt("cond")>=1 and st.getQuestItemsCount(CONTRIBUTION_OF_CHALI_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE1_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION1_ID) :
        htmltext = "30532-04.htm"
   elif npcId == 30533 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(LOCKIRINS_NOTICE2_ID) and st.getQuestItemsCount(LOCKIRINS_NOTICE2_ID)==1 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION2_ID)==0 and (st.getQuestItemsCount(CONTRIBUTION_OF_MION_ID)+st.getQuestItemsCount(CONTRIBUTION_OF_MARIFE_ID)<2) :
        htmltext = "30533-01.htm"
        st.takeItems(LOCKIRINS_NOTICE2_ID,1)
   elif npcId == 30533 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(LOCKIRINS_NOTICE2_ID)==0 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION2_ID)==0 and (st.getQuestItemsCount(CONTRIBUTION_OF_MION_ID)+st.getQuestItemsCount(CONTRIBUTION_OF_MARIFE_ID)<2) :
        htmltext = "30533-02.htm"
   elif npcId == 30533 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION2_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE2_ID) == 0 and (st.getQuestItemsCount(CONTRIBUTION_OF_MION_ID)+st.getQuestItemsCount(CONTRIBUTION_OF_MARIFE_ID)>=2) :
        htmltext = "30533-03.htm"
        st.takeItems(CONTRIBUTION_OF_MARIFE_ID,1)
        st.giveItems(RECEIPT_OF_CONTRIBUTION2_ID,1)
        st.takeItems(CONTRIBUTION_OF_MION_ID,1)
   elif npcId == 30533 and st.getInt("cond")>=1 and st.getQuestItemsCount(LOCKIRINS_NOTICE2_ID)==0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION2_ID) and (st.getQuestItemsCount(CONTRIBUTION_OF_MION_ID)+st.getQuestItemsCount(CONTRIBUTION_OF_MARIFE_ID)<2) :
        htmltext = "30533-04.htm"
   elif npcId == 30534 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(LOCKIRINS_NOTICE3_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION3_ID) == 0 and st.getQuestItemsCount(PROCURATION_OF_TOROCCO_ID) == 0 :
        htmltext = "30534-01.htm"
        st.takeItems(LOCKIRINS_NOTICE3_ID,1)
   elif npcId == 30534 and st.getInt("cond")>=1 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION3_ID) == 0 and st.getQuestItemsCount(PROCURATION_OF_TOROCCO_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE3_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) :
        htmltext = "30534-02.htm"
   elif npcId == 30534 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(PROCURATION_OF_TOROCCO_ID) and st.getQuestItemsCount(LOCKIRINS_NOTICE3_ID) == 0 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION3_ID) == 0 :
        htmltext = "30534-03.htm"
   elif npcId == 30534 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION3_ID) and st.getQuestItemsCount(PROCURATION_OF_TOROCCO_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE3_ID) == 0 :
        htmltext = "30534-04.htm"
   elif npcId == 30535 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(LOCKIRINS_NOTICE4_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION4_ID) == 0 and st.getQuestItemsCount(RECEIPT_OF_BOLTER_ID) == 0 :
        htmltext = "30535-01.htm"
        st.takeItems(LOCKIRINS_NOTICE4_ID,1)
   elif npcId == 30535 and st.getInt("cond")>=1 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION4_ID) == 0 and st.getQuestItemsCount(RECEIPT_OF_BOLTER_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE4_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) :
        htmltext = "30535-02.htm"
   elif npcId == 30535 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(RECEIPT_OF_BOLTER_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION4_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE4_ID) == 0 :
        htmltext = "30535-03.htm"
        st.giveItems(RECEIPT_OF_CONTRIBUTION4_ID,1)
        st.takeItems(RECEIPT_OF_BOLTER_ID,1)
   elif npcId == 30535 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION4_ID) and st.getQuestItemsCount(RECEIPT_OF_BOLTER_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE4_ID) == 0 :
        htmltext = "30535-04.htm"
   elif npcId == 30536 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(LOCKIRINS_NOTICE5_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION5_ID) == 0 and st.getQuestItemsCount(CONTRIBUTION_OF_TOMA_ID) == 0 :
        htmltext = "30536-01.htm"
        st.takeItems(LOCKIRINS_NOTICE5_ID,1)
   elif npcId == 30536 and st.getInt("cond")>=1 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION5_ID) == 0 and st.getQuestItemsCount(CONTRIBUTION_OF_TOMA_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE5_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) :
        htmltext = "30536-02.htm"
   elif npcId == 30536 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(CONTRIBUTION_OF_TOMA_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION5_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE5_ID) == 0 :
        htmltext = "30536-03.htm"
        st.giveItems(RECEIPT_OF_CONTRIBUTION5_ID,1)
        st.takeItems(CONTRIBUTION_OF_TOMA_ID,1)
   elif npcId == 30536 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION5_ID) and st.getQuestItemsCount(CONTRIBUTION_OF_TOMA_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE5_ID) == 0 :
        htmltext = "30536-04.htm"
   elif npcId == 30517 and st.getInt("cond")>=1 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION1_ID) == 0 and st.getQuestItemsCount(CONTRIBUTION_OF_CHALI_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE1_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) :
        htmltext = "30517-01.htm"
        st.giveItems(CONTRIBUTION_OF_CHALI_ID,1)
   elif npcId == 30517 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(CONTRIBUTION_OF_CHALI_ID) and st.getQuestItemsCount(LOCKIRINS_NOTICE1_ID) == 0 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION1_ID) == 0 :
        htmltext = "30517-02.htm"
   elif npcId == 30519 and st.getInt("cond")>=1 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION2_ID) == 0 and st.getQuestItemsCount(CONTRIBUTION_OF_MION_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE2_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) :
        htmltext = "30519-01.htm"
        st.giveItems(CONTRIBUTION_OF_MION_ID,1)
   elif npcId == 30519 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(CONTRIBUTION_OF_MION_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION2_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE2_ID) == 0 :
        htmltext = "30519-02.htm"
   elif npcId == 30553 and st.getInt("cond")>=1 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION2_ID) == 0 and st.getQuestItemsCount(CONTRIBUTION_OF_MARIFE_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE2_ID) == 0 and st.getQuestItemsCount(MARIFES_REQUEST_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) :
        htmltext = "30553-01.htm"
        st.giveItems(MARIFES_REQUEST_ID,1)
   elif npcId == 30553 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(MARIFES_REQUEST_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION2_ID) == 0 and st.getQuestItemsCount(CONTRIBUTION_OF_MARIFE_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE2_ID) == 0 :
        if st.getQuestItemsCount(ANIMAL_SKIN_ID) < 100 :
          htmltext = "30553-02.htm"
        else:
          htmltext = "30553-03.htm"
          st.takeItems(ANIMAL_SKIN_ID,100)
          st.giveItems(CONTRIBUTION_OF_MARIFE_ID,1)
          st.takeItems(MARIFES_REQUEST_ID,1)
   elif npcId == 30553 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(CONTRIBUTION_OF_MARIFE_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION2_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE2_ID) == 0 and st.getQuestItemsCount(MARIFES_REQUEST_ID) == 0 :
        htmltext = "30553-04.htm"
   elif npcId == 30555 and st.getInt("cond")>=1 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION3_ID) == 0 and st.getQuestItemsCount(PROCURATION_OF_TOROCCO_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE3_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) :
        htmltext = "30555-01.htm"
   elif npcId == 30555 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(PROCURATION_OF_TOROCCO_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION3_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE3_ID) == 0 :
        htmltext = "30555-03.htm"
   elif npcId == 30554 and st.getInt("cond")>=1 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION4_ID) == 0 and st.getQuestItemsCount(RECEIPT_OF_BOLTER_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE4_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) :
        htmltext = "30554-01.htm"
        st.giveItems(RECEIPT_OF_BOLTER_ID,1)
   elif npcId == 30554 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(RECEIPT_OF_BOLTER_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION4_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE4_ID) == 0 :
        htmltext = "30554-02.htm"
   elif npcId == 30556 and st.getInt("cond")>=1 and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION5_ID) == 0 and st.getQuestItemsCount(CONTRIBUTION_OF_TOMA_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE5_ID) == 0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) :
        htmltext = "30556-01.htm"
        st.giveItems(CONTRIBUTION_OF_TOMA_ID,1)
   elif npcId == 30556 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(COLLECTION_LICENSE_ID) and st.getQuestItemsCount(CONTRIBUTION_OF_TOMA_ID) and st.getQuestItemsCount(RECEIPT_OF_CONTRIBUTION5_ID) == 0 and st.getQuestItemsCount(LOCKIRINS_NOTICE5_ID) == 0 :
        htmltext = "30556-02.htm"
   elif npcId == 30597 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID)==1 and st.getQuestItemsCount(BLESSED_SEED_ID)==0 :
        htmltext = "30597-01.htm"
   elif npcId == 30597 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID)==1 and st.getQuestItemsCount(BLESSED_SEED_ID)==1 :
        htmltext = "30597-03.htm"
   elif npcId == 30597 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID)==1 :
        htmltext = "30597-04.htm"
   elif npcId == 30005 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID)==1 and st.getQuestItemsCount(LILITH_ELVEN_WAFER_ID) == 0 and st.getQuestItemsCount(CRYSTAL_BROOCH_ID) == 0 :
        htmltext = "30005-01.htm"
   elif npcId == 30005 and st.getInt("cond")>=1 and st.getQuestItemsCount(LILITH_ELVEN_WAFER_ID)==0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(CRYSTAL_BROOCH_ID) :
        htmltext = "30005-05.htm"
   elif npcId == 30005 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(LILITH_ELVEN_WAFER_ID) :
        htmltext = "30005-06.htm"
   elif npcId == 30005 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID)==1 :
        htmltext = "30005-07.htm"
   elif npcId == 30368 and st.getInt("cond")>=1 and st.getQuestItemsCount(CRYSTAL_BROOCH_ID) and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(LILITH_ELVEN_WAFER_ID)==0 :
        htmltext = "30368-01.htm"
   elif npcId == 30368 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(LILITH_ELVEN_WAFER_ID) and st.getQuestItemsCount(CRYSTAL_BROOCH_ID)==0 :
        htmltext = "30368-04.htm"
   elif npcId == 30368 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID)==1 :
        htmltext = "30368-05.htm"
   elif npcId == 30466 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID)==1 and st.getQuestItemsCount(RECIPE_OF_EMILLY_ID) == 0 and st.getQuestItemsCount(BRIGHTS_LIST_ID) == 0 and st.getQuestItemsCount(MANDRAGORA_BOUQUET_ID) == 0 :
        htmltext = "30466-01.htm"
   elif npcId == 30466 and st.getInt("cond")>=1 and st.getQuestItemsCount(RECIPE_OF_EMILLY_ID)==0 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(BRIGHTS_LIST_ID) :
        if st.getQuestItemsCount(MANDRAGORA_PETAL_ID) < 20 or st.getQuestItemsCount(CRIMSON_MOSS_ID) < 10 :
          htmltext = "30466-04.htm"
        else:
          htmltext = "30466-05.htm"
          st.takeItems(MANDRAGORA_PETAL_ID,st.getQuestItemsCount(MANDRAGORA_PETAL_ID))
          st.takeItems(CRIMSON_MOSS_ID,st.getQuestItemsCount(CRIMSON_MOSS_ID))
          st.giveItems(MANDRAGORA_BOUQUET_ID,1)
          st.takeItems(BRIGHTS_LIST_ID,1)
   elif npcId == 30466 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(MANDRAGORA_BOUQUET_ID) and st.getQuestItemsCount(RECIPE_OF_EMILLY_ID) == 0 and st.getQuestItemsCount(BRIGHTS_LIST_ID) == 0 :
        htmltext = "30466-06.htm"
   elif npcId == 30466 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(RECIPE_OF_EMILLY_ID) :
        htmltext = "30466-07.htm"
   elif npcId == 30466 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID)==1 :
        htmltext = "30466-08.htm"
   elif npcId == 30620 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(MANDRAGORA_BOUQUET_ID) and st.getQuestItemsCount(RECIPE_OF_EMILLY_ID) == 0 and st.getQuestItemsCount(BRIGHTS_LIST_ID) == 0 :
        htmltext = "30620-01.htm"
   elif npcId == 30620 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY1_ID) and st.getQuestItemsCount(RECIPE_OF_EMILLY_ID) :
        htmltext = "30620-04.htm"
   elif npcId == 30620 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID)==1 :
        htmltext = "30620-05.htm"
   elif npcId == 30621 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID)==1 and st.getQuestItemsCount(CLAY_DOUGH_ID) == 0 and st.getQuestItemsCount(PATTERN_OF_KEYHOLE_ID) == 0 and st.getQuestItemsCount(NIKOLAS_LIST_ID) == 0 and st.getQuestItemsCount(MAPHR_TABLET_FRAGMENT_ID) == 0 :
        htmltext = "30621-01.htm"
   elif npcId == 30621 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID) and st.getQuestItemsCount(CLAY_DOUGH_ID) and st.getQuestItemsCount(PATTERN_OF_KEYHOLE_ID) == 0 and st.getQuestItemsCount(NIKOLAS_LIST_ID) == 0 and st.getQuestItemsCount(MAPHR_TABLET_FRAGMENT_ID) == 0 :
        htmltext = "30621-05.htm"
   elif npcId == 30621 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID) and st.getQuestItemsCount(PATTERN_OF_KEYHOLE_ID) and st.getQuestItemsCount(CLAY_DOUGH_ID) == 0 and st.getQuestItemsCount(NIKOLAS_LIST_ID) == 0 and st.getQuestItemsCount(MAPHR_TABLET_FRAGMENT_ID) == 0 :
        htmltext = "30621-06.htm"
        st.giveItems(NIKOLAS_LIST_ID,1)
        st.takeItems(PATTERN_OF_KEYHOLE_ID,1)
        st.giveItems(RP_TITAN_KEY_ID,1)
        st.takeItems(PARMANS_LETTER_ID,1)
        st.set("cond","7")
        st.playSound("ItemSound.quest_middle")
   elif npcId == 30621 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID) and st.getQuestItemsCount(NIKOLAS_LIST_ID) and st.getQuestItemsCount(CLAY_DOUGH_ID) == 0 and st.getQuestItemsCount(PATTERN_OF_KEYHOLE_ID) == 0 and st.getQuestItemsCount(MAPHR_TABLET_FRAGMENT_ID) == 0 and st.getQuestItemsCount(KEY_OF_TITAN_ID) == 0 :
        htmltext = "30621-07.htm"
   elif npcId == 30621 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID) and st.getQuestItemsCount(NIKOLAS_LIST_ID) and st.getQuestItemsCount(KEY_OF_TITAN_ID) and st.getQuestItemsCount(CLAY_DOUGH_ID) == 0 and st.getQuestItemsCount(PATTERN_OF_KEYHOLE_ID) == 0 and st.getQuestItemsCount(MAPHR_TABLET_FRAGMENT_ID) == 0 :
        htmltext = "30621-08.htm"
   elif npcId == 30621 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID) and st.getQuestItemsCount(MAPHR_TABLET_FRAGMENT_ID) and st.getQuestItemsCount(CLAY_DOUGH_ID) == 0 and st.getQuestItemsCount(PATTERN_OF_KEYHOLE_ID) == 0 and st.getQuestItemsCount(NIKOLAS_LIST_ID) == 0 :
        htmltext = "30621-09.htm"
   elif npcId == 30622 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID) and st.getQuestItemsCount(CLAY_DOUGH_ID) and st.getQuestItemsCount(PATTERN_OF_KEYHOLE_ID)==0 :
        htmltext = "30622-01.htm"
   elif npcId == 30622 and st.getInt("cond")>=1 and st.getQuestItemsCount(RING_OF_TESTIMONY2_ID) and st.getQuestItemsCount(KEY_OF_TITAN_ID) and st.getQuestItemsCount(MAPHR_TABLET_FRAGMENT_ID)==0 :
        htmltext = "30622-03.htm"
   return htmltext
Esempio n. 30
0
 def onAdvEvent(self, event, npc, player):
     htmltext = event
     st = player.getQuestState(qn)
     if not st: return
     if event == "1":
         htmltext = "30103-06.htm"
         st.set("cond", "1")
         st.setState(State.STARTED)
         st.playSound("ItemSound.quest_accept")
         st.giveItems(VALKONS_RECOMMEND_ID, 1)
         st.takeItems(ADENA_ID, 2000)
     elif event == "30103_1":
         htmltext = "30103-04.htm"
     elif event == "30103_2":
         if st.getQuestItemsCount(ADENA_ID) >= 2000:
             htmltext = "30103-05.htm"
         else:
             htmltext = "30103-05a.htm"
     elif event == "30103_3":
         htmltext = "30103-09a.htm"
         st.set("cond", "0")
         st.set("onlyone", "1")
         st.exitQuest(False)
         st.playSound("ItemSound.quest_finish")
         st.addExpAndSp(514739, 33384)
         st.giveItems(57, 93803)
         st.giveItems(7562, 85)
         st.takeItems(JOURNEYMAN_RING_ID, -1)
         st.takeItems(ALLTRANS_INSTRUCTIONS_ID, 1)
         st.takeItems(RP_JOURNEYMAN_RING_ID, 1)
         st.giveItems(MARK_OF_GUILDSMAN_ID, 1)
         st.getPlayer().sendPacket(
             SocialAction(st.getPlayer().getObjectId(), 3))
     elif event == "30103_4":
         st.addExpAndSp(514739, 33384)
         st.giveItems(57, 93803)
         st.giveItems(7562, 85)
         htmltext = "30103-09b.htm"
         st.set("cond", "0")
         st.set("onlyone", "1")
         st.exitQuest(False)
         st.playSound("ItemSound.quest_finish")
         st.takeItems(JOURNEYMAN_RING_ID, -1)
         st.takeItems(ALLTRANS_INSTRUCTIONS_ID, 1)
         st.takeItems(RP_JOURNEYMAN_RING_ID, 1)
         st.giveItems(MARK_OF_GUILDSMAN_ID, 1)
         st.getPlayer().sendPacket(
             SocialAction(st.getPlayer().getObjectId(), 3))
     elif event == "30283_1":
         htmltext = "30283-03.htm"
         st.giveItems(ALLTRANS_INSTRUCTIONS_ID, 1)
         st.takeItems(VALKONS_RECOMMEND_ID, 1)
         st.giveItems(RP_JOURNEYMAN_RING_ID, 1)
         st.takeItems(MANDRAGORA_BERRY_ID, 1)
         st.giveItems(ALLTRANS_RECOMMEND1_ID, 1)
         st.giveItems(ALLTRANS_RECOMMEND2_ID, 1)
         st.playSound("ItemSound.quest_middle")
         st.set("cond", "5")
     elif event == "30210_1":
         htmltext = "30210-02.htm"
     elif event == "30210_2":
         htmltext = "30210-03.htm"
     elif event == "30210_3":
         htmltext = "30210-04.htm"
         st.giveItems(NORMANS_INSTRUCTIONS_ID, 1)
         st.takeItems(ALLTRANS_RECOMMEND1_ID, 1)
         st.giveItems(NORMANS_RECEIPT_ID, 1)
     elif event == "30210_4":
         htmltext = "30210-08.htm"
     elif event == "30210_5":
         htmltext = "30210-09.htm"
     elif event == "30210_6":
         htmltext = "30210-10.htm"
         st.takeItems(DUNINGS_KEY_ID, st.getQuestItemsCount(DUNINGS_KEY_ID))
         st.giveItems(NORMANS_LIST_ID, 1)
         st.takeItems(NORMANS_INSTRUCTIONS_ID, 1)
     elif event == "30688_1":
         htmltext = "30688-02.htm"
         st.giveItems(DUNINGS_INSTRUCTIONS_ID, 1)
         st.takeItems(NORMANS_RECEIPT_ID, 1)
     elif event == "30298_1":
         htmltext = "30298-03.htm"
     elif event == "30298_2":
         if st.getPlayer().getClassId().getId() == 0x36:
             htmltext = "30298-04.htm"
             st.giveItems(PINTERS_INSTRUCTIONS_ID, 1)
             st.takeItems(ALLTRANS_RECOMMEND2_ID, 1)
         else:
             htmltext = "30298-05.htm"
             st.giveItems(RP_AMBER_BEAD_ID, 1)
             st.takeItems(ALLTRANS_RECOMMEND2_ID, 1)
             st.giveItems(PINTERS_INSTRUCTIONS_ID, 1)
     return htmltext