Example #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(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(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(STARTED)
             q2.notifyEvent("30621-01.htm", npc, player)
         return
     return htmltext
Example #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() == COMPLETED:
            if qs.getQuestItemsCount(Certificate) :
                qs3 = self.newQuestState(player)
                qs3.setState(STARTED)
            else :
                qs5 = q5.newQuestState(player)
                qs5.setState(STARTED)
        elif qs2 and qs2.getState() == COMPLETED:
            if qs2.getQuestItemsCount(Certificate) :
                qs4 = q4.newQuestState(player)
                qs4.setState(STARTED)
            else :
                qs5 = q5.newQuestState(player)
                qs5.setState(STARTED)
    npc.showChatWindow(player)
    return None
Example #3
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(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(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(STARTED)
             q2.notifyEvent("30621-01.htm",npc,player)
         return
     return htmltext
Example #4
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() == COMPLETED:
             if qs.getQuestItemsCount(Certificate):
                 qs3 = self.newQuestState(player)
                 qs3.setState(STARTED)
             else:
                 qs5 = q5.newQuestState(player)
                 qs5.setState(STARTED)
         elif qs2 and qs2.getState() == COMPLETED:
             if qs2.getQuestItemsCount(Certificate):
                 qs4 = q4.newQuestState(player)
                 qs4.setState(STARTED)
             else:
                 qs5 = q5.newQuestState(player)
                 qs5.setState(STARTED)
     npc.showChatWindow(player)
     return None
Example #5
0
 def onEvent (self,event,st) :
    htmltext = event
    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)
       st.setState(COMPLETED)
       qs = player.getQuestState("998_FallenAngelSelect")
       if not qs:
           q = QuestManager.getInstance().getQuest("998_FallenAngelSelect")
           if q :
               qs = q.newQuestState(player)
       qs.setState(STARTED)
    return htmltext
Example #6
0
 def onEvent(self, event, st):
     htmltext = event
     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)
         st.setState(COMPLETED)
         qs = player.getQuestState("998_FallenAngelSelect")
         if not qs:
             q = QuestManager.getInstance().getQuest(
                 "998_FallenAngelSelect")
             if q:
                 qs = q.newQuestState(player)
         qs.setState(STARTED)
     return htmltext