• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python quest.Quests类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中toontown.quest.Quests的典型用法代码示例。如果您正苦于以下问题:Python Quests类的具体用法?Python Quests怎么用?Python Quests使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Quests类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: recoverItems

    def recoverItems(self, av, suitsKilled, taskZoneId):
        # Get the avatars current quests.
        avQuests = av.getQuests()
        questList = []
        recoveredItems = []
        unrecoveredItems = []
        taskZoneId = ZoneUtil.getBranchZone(taskZoneId)

        # Iterate through the avatars current quests.
        for i in xrange(0, len(avQuests), 5):
            questDesc = avQuests[i : i + 5]
            questClass = Quests.getQuest(questDesc[QuestIdIndex])
            if questClass.getCompletionStatus(av, questDesc) == Quests.INCOMPLETE:
                if isinstance(questClass, Quests.CogQuest):
                    for suit in suitsKilled:
                        if questClass.doesCogCount(av.doId, suit, taskZoneId, suit['activeToons']):
                            questDesc[QuestProgressIndex] += 1
                elif isinstance(questClass, Quests.RecoverItemQuest):
                    if questClass.getHolder() != Quests.AnyFish:
                        for suit in suitsKilled:
                            if questClass.doesCogCount(av.doId, suit, taskZoneId, suit['activeToons']):
                                baseChance = questClass.getPercentChance()
                                amountRemaining = questClass.getNumItems() - questDesc[QuestProgressIndex]
                                chance = Quests.calcRecoverChance(amountRemaining, baseChance)
                                if chance >= baseChance:
                                    questDesc[QuestProgressIndex] += 1
                                    recoveredItems.append(questClass.getItem())
                                else:
                                    unrecoveredItems.append(questClass.getItem())
            questList.append(questDesc)

        av.b_setQuests(questList)
        return (recoveredItems, unrecoveredItems)
开发者ID:Toontown-Electrified,项目名称:src-feature-the-experiment,代码行数:33,代码来源:QuestManagerAI.py


示例2: initQuestFrame

    def initQuestFrame(self, toon, avQuests):
        self.endTrackFrame.hide()
        self.gagExpFrame.hide()
        self.newGagFrame.hide()
        self.promotionFrame.hide()
        self.questFrame.show()
        self.itemFrame.hide()
        self.cogPartFrame.hide()
        self.missedItemFrame.hide()
        for i in xrange(ToontownGlobals.MaxQuestCarryLimit):
            questLabel = self.questLabelList[i]
            questLabel['text_fg'] = (0, 0, 0, 1)
            questLabel.hide()

        for i in xrange(len(avQuests)):
            questDesc = avQuests[i]
            questId, npcId, toNpcId, rewardId, toonProgress = questDesc
            quest = Quests.getQuest(questId)
            if quest:
                questString = quest.getString()
                progressString = quest.getProgressString(toon, questDesc)
                rewardString = quest.getRewardString(progressString)
                rewardString = Quests.fillInQuestNames(rewardString, toNpcId=toNpcId)
                completed = quest.getCompletionStatus(toon, questDesc) == Quests.COMPLETE
                questLabel = self.questLabelList[i]
                questLabel.show()
                if base.localAvatar.tutorialAck:
                    questLabel['text'] = rewardString
                    if completed:
                        questLabel['text_fg'] = (0, 0.3, 0, 1)
                else:
                    questLabel['text'] = questString + ' :'
开发者ID:frogtongue,项目名称:tonguefrog,代码行数:32,代码来源:RewardPanel.py


示例3: toonCaughtFishingItem

    def toonCaughtFishingItem(self, av):
        # Get the avatars current quests.
        avQuests = av.getQuests()
        fishingItem = -1
        questList = []

        # Iterate through their current quests.
        for i in xrange(0, len(avQuests), 5):
            questDesc = avQuests[i : i + 5]
            questClass = Quests.getQuest(questDesc[QuestIdIndex])
            if fishingItem != -1:
                questList.append(questDesc)
                continue
            if isinstance(questClass, Quests.RecoverItemQuest):
                if not hasattr(questClass, 'getItem'):
                    questList.append(questDesc)
                    continue
                if questClass.getHolder() == Quests.AnyFish:
                    if not questClass.getCompletionStatus(av, questDesc) == Quests.COMPLETE:
                        baseChance = questClass.getPercentChance()
                        amountRemaining = questClass.getNumItems() - questDesc[QuestProgressIndex]
                        chance = Quests.calcRecoverChance(amountRemaining, baseChance)
                        if chance >= baseChance:
                            questDesc[QuestProgressIndex] += 1
                            fishingItem = questClass.getItem()
            questList.append(questDesc)

        av.b_setQuests(questList)
        return fishingItem
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:29,代码来源:QuestManagerAI.py


示例4: trolleyLeft

 def trolleyLeft(self):
     numPlayers = self.countFullSeats()
     if numPlayers > 0:
         newbieIds = []
         for avId in self.seats:
             if avId:
                 toon = self.air.doId2do.get(avId)
                 if toon:
                     if Quests.avatarHasTrolleyQuest(toon):
                         if not Quests.avatarHasCompletedTrolleyQuest(toon):
                             newbieIds.append(avId)
         playerArray = []
         for i in self.seats:
             if i not in [None, 0]:
                 playerArray.append(i)
         mgDict = MinigameCreatorAI.createMinigame(
             self.air, playerArray, self.zoneId, newbieIds=newbieIds)
         minigameZone = mgDict['minigameZone']
         minigameId = mgDict['minigameId']
         for seatIndex in xrange(len(self.seats)):
             avId = self.seats[seatIndex]
             if avId:
                 self.sendUpdateToAvatarId(avId, 'setMinigameZone', [minigameZone, minigameId])
                 self.clearFullNow(seatIndex)
     else:
         self.notify.warning('The trolley left, but was empty.')
     self.enter()
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:27,代码来源:DistributedTrolleyAI.py


示例5: avatarChoseQuest

 def avatarChoseQuest(self, avId, npc, questId, rewardId, building):
     toon = self.air.doId2do.get(avId)
     if not toon:
         return
     fromNpc = Quests.getQuestFromNpcId(questId)
     toNpc = Quests.getQuestToNpcId(questId)
     toon.addQuest([questId, fromNpc, toNpc, rewardId, 0], 0,
                     recordHistory = 0)
     npc.assignQuest(avId, questId, rewardId, toNpc)
     taskMgr.remove(npc.uniqueName('clearMovie'))
开发者ID:InvisbleMario,项目名称:Toontown-Community,代码行数:10,代码来源:QuestManagerAI.py


示例6: requestInteract

 def requestInteract(self, avId, npc):
     toon = self.air.doId2do.get(avId)
     if not toon:
         return
     toonQuestPocketSize = toon.getQuestCarryLimit()
     self.avatarProgressTier(toon)
     toonQuests = toon.getQuests()
     for i in xrange(0, len(toonQuests), 5):
         questDesc = toonQuests[i:i + 5]
         questId, fromNpcId, toNpcId, rewardId, toonProgress = questDesc
         questClass = Quests.getQuest(questId)
         if questClass:
             completeStatus = questClass.getCompletionStatus(toon, questDesc, npc)
         else:
             continue
         if completeStatus == Quests.COMPLETE:
             print 'QuestManager: %s (AvId: %s) Completed QuestId: %s'%(toon.getName(), toon.doId, questId)
             toon.toonUp(toon.maxHp)
             if isinstance(questClass, Quests.TrackChoiceQuest):
                 npc.presentTrackChoice(avId, questId, questClass.getChoices())
                 break
             elif Quests.getNextQuest(questId, npc, toon)[0] != Quests.NA:
                 self.nextQuest(toon, npc, questId)
             else:
                 npc.completeQuest(avId, questId, rewardId)
                 self.completeQuest(toon, questId)
             if isinstance(npc, DistributedNPCSpecialQuestGiverAI):
                 if npc.tutorial and (npc.npcId == 20002):
                     messenger.send('intHqDoor0-{0}'.format(npc.zoneId), [FADoorCodes.WRONG_DOOR_HQ])
                     messenger.send('intHqDoor1-{0}'.format(npc.zoneId), [FADoorCodes.UNLOCKED])
                     streetZone = self.air.tutorialManager.currentAllocatedZones[avId][0]
                     messenger.send('extHqDoor0-{0}'.format(streetZone), [FADoorCodes.GO_TO_PLAYGROUND])
                     messenger.send('extHqDoor1-{0}'.format(streetZone), [FADoorCodes.GO_TO_PLAYGROUND])
                     messenger.send('extShopDoor-{0}'.format(streetZone), [FADoorCodes.GO_TO_PLAYGROUND])
             break
     else:
         if (len(toonQuests) == toonQuestPocketSize*5):
             npc.rejectAvatar(avId)
             return
         elif isinstance(npc, DistributedNPCSpecialQuestGiverAI):
             choices = self.avatarQuestChoice(toon, npc)
             quest = choices[0]
             self.avatarChoseQuest(avId, npc, quest[0], quest[1], 0)
             if npc.tutorial:
                 if npc.npcId == 20000:
                     messenger.send('intShopDoor-{0}'.format(npc.zoneId), [FADoorCodes.UNLOCKED])
             return
         else:
             choices = self.avatarQuestChoice(toon, npc)
             if choices != []:
                 npc.presentQuestChoice(avId, choices)
                 return
             else:
                 npc.rejectAvatar(avId)
                 return
开发者ID:InvisbleMario,项目名称:Toontown-Community,代码行数:55,代码来源:QuestManagerAI.py


示例7: giveReward

 def giveReward(self, toon, questId, rewardId):
     #Actual reward giving.
     rewardClass = Quests.getReward(rewardId)
     rewardClass.sendRewardAI(toon)
     #Add it to reward history.
     realRewardId = Quests.transformReward(rewardId, toon)
     tier, rewardList = toon.getRewardHistory()
     rewardList.append(rewardId)
     if realRewardId != rewardId:
         rewardList.append(realRewardId)
     toon.b_setRewardHistory(tier, rewardList)
开发者ID:InvisbleMario,项目名称:Toontown-Community,代码行数:11,代码来源:QuestManagerAI.py


示例8: requestSkipTutorial

 def requestSkipTutorial(self):
     avId = self.air.getAvatarIdFromSender()
     av = self.air.doId2do.get(avId)
     if av:
         av.b_setTutorialAck(1)
         av.b_setQuestHistory([110, 100])
         av.addQuest((110, Quests.getQuestFromNpcId(110), Quests.getQuestToNpcId(110), Quests.getQuestReward(110, av), 0), 0)
         self.air.questManager.toonRodeTrolleyFirstTime(av) #gg hacky
         self.d_skipTutorialResponse(avId, 1)
     else:
         self.d_skipTutorialResponse(avId, 0)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:11,代码来源:TutorialManagerAI.py


示例9: recoverItems

    def recoverItems(self, av, suitsKilled, taskZoneId):
        # Get the avatars current quests.
        avQuests = av.getQuests()
        questList = []
        recoveredItems = []
        unrecoveredItems = []
        taskZoneId = ZoneUtil.getBranchZone(taskZoneId)

        # Iterate through the avatars current quests.
        for i in xrange(0, len(avQuests), 5):
            questDesc = avQuests[i : i + 5]
            questClass = Quests.getQuest(questDesc[QuestIdIndex])

            # Check if the Quest isnt already complete
            if questClass.getCompletionStatus(av, questDesc) == Quests.INCOMPLETE:

                # Check if we are dealing with a RecoverItemQuest
                if isinstance(questClass, Quests.RecoverItemQuest):

                    # Iterate through all the Cogs that were killed in the battle
                    for suit in suitsKilled:

                        # Because the RecoveItemQuest class doesn't have a
                        # function to see if a Cog counts. We need to manually
                        # check if the Cog is valid for the Quest
                        if (questClass.getHolder() == Quests.Any) or \
                            (questClass.getHolderType() == 'type' and \
                            questClass.getHolder() == suit['type']) or \
                            (questClass.getHolderType() == 'track' and \
                            questClass.getHolder() == suit['track']) or \
                            (questClass.getHolderType() == 'level' and \
                            questClass.getHolder() <= suit['level']):

                            # It looks like the Cog was valid. Lets see if they
                            # found what they were looking for.
                            baseChance = questClass.getPercentChance()
                            amountRemaining = questClass.getNumItems() - questDesc[QuestProgressIndex]
                            chance = Quests.calcRecoverChance(amountRemaining, baseChance)

                            # They found it! Give them their reward!
                            if chance >= baseChance:
                                questDesc[QuestProgressIndex] += 1
                                recoveredItems.append(questClass.getItem())

                            # Better luck next time :(
                            else:
                                unrecoveredItems.append(questClass.getItem())

            questList.append(questDesc)

        av.b_setQuests(questList)

        return (recoveredItems, unrecoveredItems)
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:53,代码来源:QuestManagerAI.py


示例10: __applyReward

    def __applyReward(self, av, questId, rewardId):
        Quests.getReward(rewardId).sendRewardAI(av)

        transId = Quests.transformReward(rewardId, av)
        
        tier, rewardList = av.getRewardHistory()
        
        rewardList.append(rewardId)
        if transId != rewardId:
            rewardList.append(transId)
            
        av.b_setRewardHistory(tier, rewardList)
开发者ID:Teku16,项目名称:MikeyTheRepository,代码行数:12,代码来源:QuestManagerAI.py


示例11: requestInteract

 def requestInteract(self, avId, npc):
     av = self.air.doId2do.get(avId)
     if not av:
         self.notify.warning("Got requestInteract with unknown avId: %s" % avId)
         return
                     
     # check if the avatar wants to turn in a quest
     quests = av.getQuests()
     for i in xrange(0, len(quests), 5):
         quest = quests[i:i + 5]
         klass = Quests.getQuest(quest[0])
         
         if not klass:
             self.notify.debug('Quest %s has no class.' % quest[0])
             continue
             
         if klass.getCompletionStatus(av, quest, npc) == Quests.COMPLETE:
             # complete quest, the avatar is turning it in
             self.notify.debug("Toon %s completed quest %s" % (av.doId, quest[0]))
             
             # fill the laff
             av.toonUp(av.maxHp)
             
             if isinstance(klass, Quests.TrackChoiceQuest):
                 npc.presentTrackChoice(avId, quest[0], klass.getChoices())
                 return 1
                 
             nextQuest = Quests.getNextQuest(quest[0], npc, av)
             if nextQuest[0] != Quests.NA:
                 self.__goToNextQuest(av, npc, quest[0], nextQuest)
                 
             else:
                 npc.completeQuest(avId, quest[0], quest[-2])
                 self.__questCompleted(av, quest[0])
                 
             return 1
             
     if self.__considerProgressTier(av):
         npc.rejectAvatarTierNotDone(avId)
         return 0
             
     # give choices if the av doesn't have enough quests already
     if len(quests) / 5 < av.getQuestCarryLimit():
         choices = Quests.chooseBestQuests(av.getRewardTier(), npc, av)
         if choices:
             npc.presentQuestChoice(avId, choices)
             return 1
     
     return 0
开发者ID:Teku16,项目名称:MikeyTheRepository,代码行数:49,代码来源:QuestManagerAI.py


示例12: giveReward

    def giveReward(self, av, questId, rewardId):
        # Give the reward.
        rewardClass = Quests.getReward(rewardId)
        if rewardClass is None:
            self.notify.warning('rewardClass was None for rewardId: %s.' % rewardId)
        else:
            rewardClass.sendRewardAI(av)

        # Add the rewardId to the avatars rewardHistory.
        rewardTier, rewardHistory = av.getRewardHistory()
        transformedRewardId = Quests.transformReward(rewardId, av)
        if transformedRewardId != rewardId:
            rewardHistory.append(rewardId)

        av.b_setRewardHistory(rewardTier, rewardHistory)
开发者ID:Teku16,项目名称:Toontown-Crystal-Master,代码行数:15,代码来源:QuestManagerAI.py


示例13: __tasksChanged

    def __tasksChanged(self):
        self.clearMenu()
        try:
            lt = base.localAvatar
        except:
            return

        phrases = []

        def addTerminal(terminal, self=self, phrases=phrases):
            displayText = terminal.getDisplayText()
            if displayText not in phrases:
                self.append(terminal)
                phrases.append(displayText)

        for task in lt.quests:
            taskId, fromNpcId, toNpcId, rewardId, toonProgress = task
            q = Quests.getQuest(taskId)
            if q is None:
                continue
            msgs = q.getSCStrings(toNpcId, toonProgress)
            if type(msgs) != type([]):
                msgs = [msgs]
            for i in xrange(len(msgs)):
                addTerminal(TTSCToontaskTerminal(msgs[i], taskId, toNpcId, toonProgress, i))

        needToontask = 1
        if hasattr(lt, "questCarryLimit"):
            needToontask = len(lt.quests) != lt.questCarryLimit
        if needToontask:
            addTerminal(SCStaticTextTerminal(1299))
        return
开发者ID:BmanGames,项目名称:Toontown-Level-Editor,代码行数:32,代码来源:TTSCToontaskMenu.py


示例14: toonKilledCogs

 def toonKilledCogs(self, av, suits, zoneId, activeToons):
     if self.air.topToonsMgr:
         self.air.topToonsMgr.toonKilledCogs(av, suits)
         
     quests = av.getQuests()
     newQuests = []
     
     for i in xrange(0, len(quests), 5):
         quest = quests[i:i + 5]
         klass = Quests.getQuest(quest[0])
         
         if not klass:
             continue
                         
         if isinstance(klass, Quests.CogQuest):
             for suit in suits:
                 if klass.getCompletionStatus(av, quest) == Quests.COMPLETE:
                     break
                     
                 if klass.doesCogCount(av.doId, suit, zoneId, suit['activeToons']):
                     quest[4] += 1
         
         newQuests.append(quest)
         
     av.b_setQuests(newQuests)
开发者ID:vincent15k,项目名称:Toontown-House,代码行数:25,代码来源:QuestManagerAI.py


示例15: toonKilledCogs

    def toonKilledCogs(self, av, suitsKilled, zoneId):
        # Get the avatar's current quests.
        messenger.send("topToonsManager-event", [av.doId, TopToonsGlobals.CAT_COGS, len(suitsKilled)])
        avQuests = av.getQuests()
        questList = []

        # Iterate through the avatar's current quests.
        for i in xrange(0, len(avQuests), 5):
            questDesc = avQuests[i : i + 5]
            questClass = Quests.getQuest(questDesc[QuestIdIndex])

            # Check if they are doing a cog quest
            if isinstance(questClass, Quests.CogQuest):
                # Check if the cog counts...
                for suit in suitsKilled:
                    if questClass.doesCogCount(av.doId, suit, zoneId):
                        # Looks like the cog counts!
                        if questClass.getCompletionStatus(av, questDesc) != Quests.COMPLETE:
                            questDesc[QuestProgressIndex] += 1

            # Add the quest to the questList
            questList.append(questDesc)

        # Update the avatar's quests
        av.b_setQuests(questList)
开发者ID:BmanGames,项目名称:ToontownStride,代码行数:25,代码来源:QuestManagerAI.py


示例16: isNewbie

    def isNewbie(self, avId):
        # Does avId have the "ride the Trolley" quest?
        toon = self.air.doId2do.get(avId)
        if not toon:
            return False

        return Quests.avatarHasTrolleyQuest(toon)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:7,代码来源:DistributedTrolleyAI.py


示例17: recoverItems

 def recoverItems(self, toon, suitsKilled, taskZoneId):
     flattenedQuests = toon.getQuests()
     questList = [] #unflattened
     recoveredItems = []
     unrecoveredItems = []
     taskZoneId = ZoneUtil.getBranchZone(taskZoneId)
     for i in xrange(0, len(flattenedQuests), 5):
         questDesc = flattenedQuests[i : i + 5]
         questClass = Quests.getQuest(questDesc[0])
         if questClass.getCompletionStatus(toon, questDesc) == Quests.INCOMPLETE:
             if isinstance(questClass, Quests.CogQuest):
                 for suit in suitsKilled:
                     if questClass.doesCogCount(toon.doId, suit, taskZoneId, suit['activeToons']):
                         questDesc[4] += 1
             elif isinstance(questClass, Quests.RecoverItemQuest):
                 if questClass.getHolder() != Quests.AnyFish:
                     for suit in suitsKilled:
                         if questClass.doesCogCount(toon.doId, suit, taskZoneId, suit['activeToons']):
                             minchance = questClass.getPercentChance()
                             import random
                             chance = random.randint(minchance - 40, 100)
                             if chance <= minchance:
                                 questDesc[4] += 1
                                 recoveredItems.append(questClass.getItem())
                             else:
                                 unrecoveredItems.append(questClass.getItem())
         questList.append(questDesc)
     toon.b_setQuests(questList)
     return (recoveredItems, unrecoveredItems)
开发者ID:InvisbleMario,项目名称:Toontown-Community,代码行数:29,代码来源:QuestManagerAI.py


示例18: updateQuestInfo

    def updateQuestInfo(self):
        for marker in self.buildingMarkers:
            marker.destroy()

        self.buildingMarkers = []
        dnaData = base.cr.playGame.dnaData
        for questIndex in self.av.questPage.quests.keys():
            questDesc = self.av.questPage.quests.get(questIndex)
            if questDesc is None:
                continue
            mapIndex = questIndex + 1
            questId, fromNpcId, toNpcId, rewardId, toonProgress = questDesc
            quest = Quests.getQuest(questId)
            fComplete = quest.getCompletionStatus(self.av, questDesc) == Quests.COMPLETE
            if not fComplete:
                if quest.getType() == Quests.RecoverItemQuest:
                    if quest.getHolder() == Quests.AnyFish:
                        self.putBuildingMarker(self.fishingSpotInfo, mapIndex=mapIndex)
                    continue
                elif quest.getType() != Quests.DeliverGagQuest and quest.getType() != Quests.DeliverItemQuest and quest.getType() != Quests.VisitQuest and quest.getType() != Quests.TrackChoiceQuest:
                    continue
            if toNpcId == Quests.ToonHQ:
                self.putBuildingMarker(self.hqPosInfo, mapIndex=mapIndex)
            else:
                npcZone = NPCToons.getNPCZone(toNpcId)
                hoodId = ZoneUtil.getCanonicalHoodId(npcZone)
                branchId = ZoneUtil.getCanonicalBranchZone(npcZone)
                if self.hoodId == hoodId and self.zoneId == branchId:
                    for blockId, block in dnaData.getBlocks():
                        zone = block.zone
                        branchZone = zone - zone % 100
                        finalZone = branchZone + 500 + blockId
                        if npcZone == finalZone:
                            building = block.node
                            self.putBuildingMarker(Point3(building.getPos()), building.getHpr(), mapIndex=mapIndex)
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leak,代码行数:35,代码来源:QuestMap.py


示例19: enter

 def enter(self):
     doneStatus = {}
     questHistory = base.localAvatar.getQuestHistory()
     imgScale = 0.5
     if questHistory != [] and questHistory != [1000] and questHistory != [101, 110]:
         doneStatus['mode'] = 'complete'
         messenger.send(self.doneEvent, [doneStatus])
     elif len(base.localAvatar.quests) > 1 or len(base.localAvatar.quests) == 0:
         doneStatus['mode'] = 'complete'
         messenger.send(self.doneEvent, [doneStatus])
     elif base.localAvatar.quests[0][0] != Quests.TROLLEY_QUEST_ID:
         doneStatus['mode'] = 'complete'
         messenger.send(self.doneEvent, [doneStatus])
     else:
         base.localAvatar.b_setAnimState('neutral', 1)
         doneStatus['mode'] = 'incomplete'
         self.doneStatus = doneStatus
         imageModel = loader.loadModel('phase_4/models/gui/tfa_images')
         if Quests.avatarHasTrolleyQuest(base.localAvatar):
             if base.localAvatar.quests[0][4] != 0:
                 imgNodePath = imageModel.find('**/hq-dialog-image')
                 imgPos = (0, 0, -0.02)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage2
             else:
                 imgNodePath = imageModel.find('**/trolley-dialog-image')
                 imgPos = (0, 0, 0.04)
                 msg = TTLocalizer.NPCForceAcknowledgeMessage
         self.dialog = TTDialog.TTDialog(text=msg, command=self.handleOk, style=TTDialog.Acknowledge)
         imgLabel = DirectLabel.DirectLabel(parent=self.dialog, relief=None, pos=imgPos, scale=TTLocalizer.NPCFimgLabel, image=imgNodePath, image_scale=imgScale)
     return
开发者ID:Toonerz,项目名称:Toontown-World-Online-Leaked-Source,代码行数:30,代码来源:NPCForceAcknowledge.py


示例20: toonKilledCogs

    def toonKilledCogs(self, av, suitsKilled, zoneId, activeToonList):
         # Get the avatar's current quests.
        avQuests = av.getQuests()
        questList = []

        # Make a list of the activeToonDoIds
        activeToonDoIds = [toon.doId for toon in activeToonList if not None]

        # Iterate through the avatar's current quests.
        for i in xrange(0, len(avQuests), 5):
            questDesc = avQuests[i : i + 5]
            questClass = Quests.getQuest(questDesc[QuestIdIndex], av.doId)

            # Check if they are doing a cog quest
            if isinstance(questClass, Quests.CogQuest):

                # Check if the cog counts...
                for suit in suitsKilled:
                    if questClass.doesCogCount(av.doId, suit, zoneId, activeToonDoIds):

                        # Looks like the cog counts!
                        if questClass.getCompletionStatus(av, questDesc) != Quests.COMPLETE:
                            questDesc[QuestProgressIndex] += 1

            # Add the quest to the questList
            questList.append(questDesc)

        # Update the avatar's quests
        av.b_setQuests(questList)
开发者ID:MasterLoopyBM,项目名称:Toontown,代码行数:29,代码来源:QuestManagerAI.py



注:本文中的toontown.quest.Quests类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python racing.RaceGlobals类代码示例发布时间:2022-05-27
下一篇:
Python pets.PetUtil类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap