Exemple #1
0
 def onAdvEvent(self, event, npc, player):
     st = player.getQuestState(qn)
     if not st: return
     htmltext = event
     if event == "30512-03.htm":
         st.playSound("ItemSound.quest_accept")
         st.set("cond", "1")
         st.setState(State.STARTED)
     elif event == "30673-04.htm":
         st.set("cond", "2")
         st.playSound("ItemSound.quest_middle")
     elif event == "30621-02.htm":
         if player.getLevel() < 50:
             st.addExpAndSp(60000, 3000)
         st.giveItems(57, 18100)
         st.exitQuest(False)
         st.playSound("ItemSound.quest_finish")
     elif event == "Contract":
         q1 = QuestManager.getInstance().getQuest(
             "184_Nikolas_Cooperation_Contract")
         if q1:
             qs1 = q1.newQuestState(player)
             qs1.setState(State.STARTED)
             q1.notifyEvent("30621-01.htm", npc, player)
         return
     elif event == "Consideration":
         q2 = QuestManager.getInstance().getQuest(
             "185_Nikolas_Cooperation_Consideration")
         if q2:
             qs2 = q2.newQuestState(st.getPlayer())
             qs2.setState(State.STARTED)
             q2.notifyEvent("30621-01.htm", npc, player)
         return
     return htmltext
Exemple #2
0
 def onFirstTalk(self, npc, player):
     qs = player.getQuestState("184_Nikolas_Cooperation_Contract")
     qs2 = player.getQuestState("185_Nikolas_Cooperation_Consideration")
     qs3 = player.getQuestState("186_Contract_Execution")
     qs4 = player.getQuestState("187_Nikolas_Heart")
     qs5 = player.getQuestState("188_Seal_Removal")
     q4 = QuestManager.getInstance().getQuest("187_Nikolas_Heart")
     q5 = QuestManager.getInstance().getQuest("188_Seal_Removal")
     if qs or qs2:
         if qs3 or qs4 or qs5 or not q4 or not q5:
             npc.showChatWindow(player)
             return None
         if qs and qs.getState() == State.COMPLETED:
             if qs.getQuestItemsCount(Certificate):
                 qs3 = self.newQuestState(player)
                 qs3.setState(State.STARTED)
             else:
                 qs5 = q5.newQuestState(player)
                 qs5.setState(State.STARTED)
         elif qs2 and qs2.getState() == State.COMPLETED:
             if qs2.getQuestItemsCount(Certificate):
                 qs4 = q4.newQuestState(player)
                 qs4.setState(State.STARTED)
             else:
                 qs5 = q5.newQuestState(player)
                 qs5.setState(State.STARTED)
     npc.showChatWindow(player)
     return None
Exemple #3
0
 def onAdvEvent(self, event, npc, player):
     htmltext = event
     st = player.getQuestState(qn)
     if not st: return
     id = st.getState()
     cond = st.getInt("cond")
     if event == "30894-02.htm":
         st.set("cond", "1")
         st.playSound("ItemSound.quest_accept")
     elif event == "30894-04.htm":
         st.set("cond", "2")
         st.playSound("ItemSound.quest_middle")
     elif event == "30894-15.htm":
         st.set("cond", "4")
         st.unset("talk")
         st.playSound("ItemSound.quest_middle")
     elif event == "30894-18.htm":
         st.playSound("ItemSound.quest_finish")
         st.exitQuest(False)
         st.giveItems(57, 88888)
         player = st.getPlayer()
         if player.getLevel() >= 37 and player.getLevel() <= 42:
             st.addExpAndSp(278005, 17058)
         qs = player.getQuestState("998_FallenAngelSelect")
         if not qs:
             q = QuestManager.getInstance().getQuest(
                 "998_FallenAngelSelect")
             if q:
                 qs = q.newQuestState(player)
         qs.setState(State.STARTED)
     return htmltext
Exemple #4
0
 def onFirstTalk(self, npc, player):
     st = player.getQuestState(qn)
     q2 = QuestManager.getInstance().getQuest("184_Nikolas_Cooperation_Contract")
     if st:
         player.setLastQuestNpcObject(npc.getObjectId())
         return "32367-01.htm"
     elif q2:
         player.setLastQuestNpcObject(npc.getObjectId())
         q2.notifyEvent("32367-01.htm", npc, player)
     return None
Exemple #5
0
 def onEvent(self, event, st):
     if event == "dawn":
         q1 = QuestManager.getInstance().getQuest(
             "142_FallenAngelRequestOfDawn")
         if q1:
             qs1 = q1.newQuestState(st.getPlayer())
             qs1.setState(State.STARTED)
             q1.notifyEvent("30894-01.htm", None, st.getPlayer())
             st.setState(State.COMPLETED)
         return
     elif event == "dusk":
         q2 = QuestManager.getInstance().getQuest(
             "143_FallenAngelRequestOfDusk")
         if q2:
             qs2 = q2.newQuestState(st.getPlayer())
             qs2.setState(State.STARTED)
             q2.notifyEvent("30894-01.htm", None, st.getPlayer())
             st.setState(State.COMPLETED)
         return
     return event