From 44d5ef5a189192cad547367ac778a1e6ef7d42fe Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 23 Mar 2015 14:16:25 +0200 Subject: [PATCH 1/5] Toontorial update! #1 Fixed giving gags at start of toontorial #2 Don't force toontorial skip #3 Properly show tutorial reward scene #4 Remove Japanese bullshit #5 Fix Clara - she now shows the preview for all gag tracks #6 Fix Localizer - they don't lie anymore - You have no gags! Duh I have. #7 Fix Flunky task. --- astron/dclass/united.dc | 2 +- config/release/dev.prc | 2 +- toontown/ai/QuestManagerAI.py | 1 - toontown/battle/Movie.py | 87 +++++++------------ toontown/quest/QuestParser.py | 32 +++---- toontown/toonbase/TTLocalizerEnglish.py | 7 +- .../tutorial/DistributedBattleTutorialAI.py | 6 ++ toontown/tutorial/TutorialManagerAI.py | 10 ++- 8 files changed, 62 insertions(+), 85 deletions(-) diff --git a/astron/dclass/united.dc b/astron/dclass/united.dc index fd12a42f..c9a94df2 100644 --- a/astron/dclass/united.dc +++ b/astron/dclass/united.dc @@ -896,7 +896,7 @@ dclass DistributedToon : DistributedPlayer { setTrackAccess(uint16[] = [0,0,0,0,1,1,0]) required broadcast ownrecv db; setTrackProgress(int8 = -1, uint32 = 0) required ownrecv db; setTrackBonusLevel(int8[] = [-1,-1,-1,-1,-1,-1,-1]) required broadcast ownrecv db; - setInventory(blob = [0*7, 0*7, 0*7, 0*7, 1, 0*6, 1, 0*6, 0*7]) required ownrecv db; + setInventory(blob = [0*7, 0*7, 0*7, 0*7, 0, 0*6, 0, 0*6, 0*7]) required ownrecv db; setMaxNPCFriends(uint16 = 16) required ownrecv db; setNPCFriendsDict(FriendEntry[] = []) required ownrecv db; setDefaultShard(uint32 = 0) required ownrecv broadcast db; diff --git a/config/release/dev.prc b/config/release/dev.prc index 8cc1e031..c5dcd433 100644 --- a/config/release/dev.prc +++ b/config/release/dev.prc @@ -37,5 +37,5 @@ want-glove-npc #t # Developer options: show-population #t -force-skip-tutorial #t +force-skip-tutorial #f want-instant-parties #t \ No newline at end of file diff --git a/toontown/ai/QuestManagerAI.py b/toontown/ai/QuestManagerAI.py index d7d53dfb..71125c5f 100644 --- a/toontown/ai/QuestManagerAI.py +++ b/toontown/ai/QuestManagerAI.py @@ -11,7 +11,6 @@ QuestToNpcIdIndex = 2 QuestRewardIdIndex = 3 QuestProgressIndex = 4 - class QuestManagerAI: notify = directNotify.newCategory('QuestManagerAI') diff --git a/toontown/battle/Movie.py b/toontown/battle/Movie.py index 0d2c5884..98ae4a2a 100644 --- a/toontown/battle/Movie.py +++ b/toontown/battle/Movie.py @@ -53,6 +53,7 @@ class Movie(DirectObject.DirectObject): self.hasBeenReset = 0 self.reset() self.rewardHasBeenReset = 0 + self.tutRewardDialog = None self.resetReward() return @@ -299,47 +300,29 @@ class Movie(DirectObject.DirectObject): self.rewardHasBeenReset = 0 self.rewardPanel = RewardPanel.RewardPanel(name) self.rewardCallback = callback - self.questList = self.rewardPanel.getQuestIntervalList(base.localAvatar, [0, - 1, - 1, - 0], [base.localAvatar], base.localAvatar.quests[0], [], [base.localAvatar.getDoId()]) + self.questList = self.rewardPanel.getQuestIntervalList(base.localAvatar, [0, 1, 1, 0], [base.localAvatar], base.localAvatar.quests[0], [], [base.localAvatar.getDoId()]) camera.setPosHpr(0, 8, base.localAvatar.getHeight() * 0.66, 179, 15, 0) - self.playTutorialReward_1() + self.rewardPanel.initGagFrame(base.localAvatar, [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0], noSkip=True) + self.playTutorialReward_1(None, self.toonRewardDicts[0]['earnedExp']) - def playTutorialReward_1(self): - self.tutRewardDialog_1 = TTDialog.TTDialog(text=TTLocalizer.MovieTutorialReward1, command=self.playTutorialReward_2, style=TTDialog.Acknowledge, fadeScreen=None, pos=(0.65, 0, 0.5), scale=0.8) - self.tutRewardDialog_1.hide() - self._deleteTrack() - self.track = Sequence(name='tutorial-reward-1') - self.track.append(Func(self.rewardPanel.initGagFrame, base.localAvatar, [0, - 0, - 0, - 0, - 0, - 0, - 0], [0, - 0, - 0, - 0], noSkip=True)) - self.track += self.rewardPanel.getTrackIntervalList(base.localAvatar, THROW_TRACK, 0, 1, 0) - self.track.append(Func(self.tutRewardDialog_1.show)) - self.track.start() - return - - def playTutorialReward_2(self, value): - self.tutRewardDialog_1.cleanup() - self.tutRewardDialog_2 = TTDialog.TTDialog(text=TTLocalizer.MovieTutorialReward2, command=self.playTutorialReward_3, style=TTDialog.Acknowledge, fadeScreen=None, pos=(0.65, 0, 0.5), scale=0.8) - self.tutRewardDialog_2.hide() - self._deleteTrack() - self.track = Sequence(name='tutorial-reward-2') - self.track.append(Wait(1.0)) - self.track += self.rewardPanel.getTrackIntervalList(base.localAvatar, SQUIRT_TRACK, 0, 1, 0) - self.track.append(Func(self.tutRewardDialog_2.show)) - self.track.start() - return - - def playTutorialReward_3(self, value): - self.tutRewardDialog_2.cleanup() + def playTutorialReward_1(self, result, earnedXp, tutTrack=0): + if self.tutRewardDialog: + self.tutRewardDialog.cleanup() + elif tutTrack >= len(earnedXp): + self.playTutorialReward_2() + return + + xp = earnedXp[tutTrack] + + if xp > 0: + self.tutRewardDialog = TTDialog.TTDialog(text=TTLocalizer.MovieTutorialReward1 % (xp, TTLocalizer.BattleGlobalTracks[tutTrack].capitalize()), command=self.playTutorialReward_1, extraArgs=[earnedXp, tutTrack + 1], style=TTDialog.Acknowledge, fadeScreen=None, pos=(0.65, 0, 0.5), scale=0.8) + sequence = Sequence() + sequence += self.rewardPanel.getTrackIntervalList(base.localAvatar, tutTrack, 0, xp, 0) + sequence.start() + else: + self.playTutorialReward_1(None, earnedXp, tutTrack + 1) + + def playTutorialReward_2(self, value=None): from toontown.toon import Toon from toontown.toon import ToonDNA @@ -355,40 +338,28 @@ class Movie(DirectObject.DirectObject): self.tutorialTom = Toon.Toon() dna = ToonDNA.ToonDNA() - dnaList = ('dls', 'ms', 'm', 'm', 7, 0, 7, 7, 2, 6, 2, 6, 2, 16) - dna.newToonFromProperties(*dnaList) + dna.newToonFromProperties(*('dls', 'ms', 'm', 'm', 7, 0, 7, 7, 2, 6, 2, 6, 2, 16)) self.tutorialTom.setDNA(dna) self.tutorialTom.setName(TTLocalizer.NPCToonNames[20000]) self.tutorialTom.setPickable(0) self.tutorialTom.setPlayerType(NametagGlobals.CCNonPlayer) self.tutorialTom.uniqueName = uniqueName - if base.config.GetString('language', 'english') == 'japanese': - self.tomDialogue03 = base.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward01.ogg') - self.tomDialogue04 = base.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward02.ogg') - self.tomDialogue05 = base.loadSfx('phase_3.5/audio/dial/CC_tom_movie_tutorial_reward03.ogg') - self.musicVolume = base.config.GetFloat('tutorial-music-volume', 0.5) - else: - self.tomDialogue03 = None - self.tomDialogue04 = None - self.tomDialogue05 = None - self.musicVolume = 0.9 + self.musicVolume = 0.9 music = base.cr.playGame.place.loader.battleMusic if self.questList: - self.track1 = Sequence(Wait(1.0), Func(self.rewardPanel.initQuestFrame, base.localAvatar, copy.deepcopy(base.localAvatar.quests)), Wait(1.0), Sequence(*self.questList), Wait(1.0), Func(self.rewardPanel.hide), Func(camera.setPosHpr, render, 34, 19.88, 3.48, -90, -2.36, 0), Func(base.localAvatar.animFSM.request, 'neutral'), Func(base.localAvatar.setPosHpr, 40.31, 22.0, -0.47, 150.0, 360.0, 0.0), Wait(0.5), Func(self.tutorialTom.reparentTo, render), Func(self.tutorialTom.show), Func(self.tutorialTom.setPosHpr, 40.29, 17.9, -0.47, 11.31, 0.0, 0.07), Func(self.tutorialTom.animFSM.request, 'TeleportIn'), Wait(1.517), Func(self.tutorialTom.animFSM.request, 'neutral'), Func(self.acceptOnce, self.tutorialTom.uniqueName('doneChatPage'), doneChat1), Func(self.tutorialTom.addActive), Func(music.setVolume, self.musicVolume), Func(self.tutorialTom.setLocalPageChat, TTLocalizer.MovieTutorialReward3, 0, None, [self.tomDialogue03]), name='tutorial-reward-3a') - self.track2 = Sequence(Func(self.acceptOnce, self.tutorialTom.uniqueName('doneChatPage'), doneChat2), Func(self.tutorialTom.setLocalPageChat, TTLocalizer.MovieTutorialReward4, 1, None, [self.tomDialogue04]), Func(self.tutorialTom.setPlayRate, 1.5, 'right-hand-start'), Func(self.tutorialTom.play, 'right-hand-start'), Wait(self.tutorialTom.getDuration('right-hand-start') / 1.5), Func(self.tutorialTom.loop, 'right-hand'), name='tutorial-reward-3b') - self.track3 = Parallel(Sequence(Func(self.tutorialTom.setPlayRate, -1.8, 'right-hand-start'), Func(self.tutorialTom.play, 'right-hand-start'), Wait(self.tutorialTom.getDuration('right-hand-start') / 1.8), Func(self.tutorialTom.animFSM.request, 'neutral'), name='tutorial-reward-3ca'), Sequence(Wait(0.5), Func(self.tutorialTom.setChatAbsolute, TTLocalizer.MovieTutorialReward5, CFSpeech | CFTimeout, self.tomDialogue05), Wait(1.0), Func(self.tutorialTom.animFSM.request, 'TeleportOut'), Wait(self.tutorialTom.getDuration('teleport')), Wait(1.0), Func(self.playTutorialReward_4, 0), name='tutorial-reward-3cb'), name='tutorial-reward-3c') + self.track1 = Sequence(Wait(1.0), Func(self.rewardPanel.initQuestFrame, base.localAvatar, copy.deepcopy(base.localAvatar.quests)), Wait(1.0), Sequence(*self.questList), Wait(1.0), Func(self.rewardPanel.hide), Func(camera.setPosHpr, render, 34, 19.88, 3.48, -90, -2.36, 0), Func(base.localAvatar.animFSM.request, 'neutral'), Func(base.localAvatar.setPosHpr, 40.31, 22.0, -0.47, 150.0, 360.0, 0.0), Wait(0.5), Func(self.tutorialTom.reparentTo, render), Func(self.tutorialTom.show), Func(self.tutorialTom.setPosHpr, 40.29, 17.9, -0.47, 11.31, 0.0, 0.07), Func(self.tutorialTom.animFSM.request, 'TeleportIn'), Wait(1.517), Func(self.tutorialTom.animFSM.request, 'neutral'), Func(self.acceptOnce, self.tutorialTom.uniqueName('doneChatPage'), doneChat1), Func(self.tutorialTom.addActive), Func(music.setVolume, self.musicVolume), Func(self.tutorialTom.setLocalPageChat, TTLocalizer.MovieTutorialReward3, 0, None, [None]), name='tutorial-reward-3a') + self.track2 = Sequence(Func(self.acceptOnce, self.tutorialTom.uniqueName('doneChatPage'), doneChat2), Func(self.tutorialTom.setLocalPageChat, TTLocalizer.MovieTutorialReward4, 1, None, [None]), Func(self.tutorialTom.setPlayRate, 1.5, 'right-hand-start'), Func(self.tutorialTom.play, 'right-hand-start'), Wait(self.tutorialTom.getDuration('right-hand-start') / 1.5), Func(self.tutorialTom.loop, 'right-hand'), name='tutorial-reward-3b') + self.track3 = Parallel(Sequence(Func(self.tutorialTom.setPlayRate, -1.8, 'right-hand-start'), Func(self.tutorialTom.play, 'right-hand-start'), Wait(self.tutorialTom.getDuration('right-hand-start') / 1.8), Func(self.tutorialTom.animFSM.request, 'neutral'), name='tutorial-reward-3ca'), Sequence(Wait(0.5), Func(self.tutorialTom.setChatAbsolute, TTLocalizer.MovieTutorialReward5, CFSpeech | CFTimeout), Wait(1.0), Func(self.tutorialTom.animFSM.request, 'TeleportOut'), Wait(self.tutorialTom.getDuration('teleport')), Wait(1.0), Func(self.playTutorialReward_3, 0), name='tutorial-reward-3cb'), name='tutorial-reward-3c') self.track1.start() else: - self.playTutorialReward_4(0) - return + self.playTutorialReward_3() - def playTutorialReward_4(self, value): + def playTutorialReward_3(self, value=None): base.localAvatar.setH(270) self.tutorialTom.removeActive() self.tutorialTom.delete() self.questList = None self.rewardCallback() - return def stop(self): if self.track: diff --git a/toontown/quest/QuestParser.py b/toontown/quest/QuestParser.py index e78864bb..7d53d83e 100644 --- a/toontown/quest/QuestParser.py +++ b/toontown/quest/QuestParser.py @@ -432,12 +432,12 @@ class NPCMoviePlayer(DirectObject.DirectObject): iList.append(self.parseFunction(line)) elif command == 'BLACK_CAT_LISTEN': iList.append(self.parseBlackCatListen(line)) - elif command == 'SHOW_THROW_SQUIRT_PREVIEW': + elif command == 'SHOW_PREVIEW': if uponTimeout: - self.notify.error('SHOW_THROW_SQUIRT_PREVIEW not allowed in an UPON_TIMEOUT') - nextEvent = 'doneThrowSquirtPreview' + self.notify.error('SHOW_PREVIEW not allowed in an UPON_TIMEOUT') + nextEvent = 'donePreview' iList.append(Func(self.acceptOnce, nextEvent, self.playNextChapter, [nextEvent])) - iList.append(self.parseThrowSquirtPreview(line)) + iList.append(self.parsePreview(line)) self.closePreviousChapter(iList) chapterList = [] self.currentEvent = nextEvent @@ -989,14 +989,14 @@ class NPCMoviePlayer(DirectObject.DirectObject): return Func(disableBlackCatListen) - def parseThrowSquirtPreview(self, line): - oldTrackAccess = [None] + def parsePreview(self, line): + oldTrackAccess = None def grabCurTrackAccess(oldTrackAccess = oldTrackAccess): - oldTrackAccess[0] = copy.deepcopy(base.localAvatar.getTrackAccess()) + oldTrackAccess = copy.deepcopy(base.localAvatar.getTrackAccess()) def restoreTrackAccess(oldTrackAccess = oldTrackAccess): - base.localAvatar.setTrackAccess(oldTrackAccess[0]) + base.localAvatar.setTrackAccess(oldTrackAccess) minGagLevel = ToontownBattleGlobals.MIN_LEVEL_INDEX + 1 maxGagLevel = ToontownBattleGlobals.MAX_LEVEL_INDEX + 1 @@ -1007,15 +1007,15 @@ class NPCMoviePlayer(DirectObject.DirectObject): if newGagLevel == curGagLevel: return curGagLevel = newGagLevel - base.localAvatar.setTrackAccess([0, - 0, - 0, - 0, - curGagLevel, - curGagLevel, - 0]) + access = [0, 0, 0, 0, 0, 0] + + for i in len(access): + if oldTrackAccess[i] == 1: + access[i] = newGagLevel + + base.localAvatar.setTrackAccess(access) - return Sequence(Func(grabCurTrackAccess), LerpFunctionInterval(updateGagLevel, fromData=1, toData=7, duration=0.3), WaitInterval(3.5), LerpFunctionInterval(updateGagLevel, fromData=7, toData=1, duration=0.3), Func(restoreTrackAccess), Func(messenger.send, 'doneThrowSquirtPreview')) + return Sequence(Func(grabCurTrackAccess), LerpFunctionInterval(updateGagLevel, fromData=1, toData=7, duration=0.3), WaitInterval(3.5), LerpFunctionInterval(updateGagLevel, fromData=7, toData=1, duration=0.3), Func(restoreTrackAccess), Func(messenger.send, 'donePreview')) searchPath = DSearchPath() if __debug__: diff --git a/toontown/toonbase/TTLocalizerEnglish.py b/toontown/toonbase/TTLocalizerEnglish.py index 69c0aa22..fd9cbcdc 100644 --- a/toontown/toonbase/TTLocalizerEnglish.py +++ b/toontown/toonbase/TTLocalizerEnglish.py @@ -4849,8 +4849,7 @@ NPCForceAcknowledgeMessage7 = "Don't forget to make a friend!\n\n\n\n\n\n\nClick NPCForceAcknowledgeMessage8 = 'Great! You made a new friend!\n\n\n\n\n\n\n\n\nYou should go back at Toon Headquarters now.' NPCForceAcknowledgeMessage9 = 'Good job using the phone!\n\n\n\n\n\n\n\n\nReturn to Toon Headquarters to claim your reward.' ToonSleepString = '. . . ZZZ . . .' -MovieTutorialReward1 = 'You received 1 Throw point! When you get 10, you will get a new gag!' -MovieTutorialReward2 = 'You received 1 Squirt point! When you get 10, you will get a new gag!' +MovieTutorialReward1 = 'You received %s %s point! When you get 10, you will get a new gag!' MovieTutorialReward3 = 'Good job! You completed your first ToonTask!' MovieTutorialReward4 = 'Go to Toon Headquarters for your reward!' MovieTutorialReward5 = 'Have fun!' @@ -5547,7 +5546,7 @@ QuestScript110_2 = 'The book is full of good stuff.' QuestScript110_3 = "Open it, and I'll show you." QuestScript110_4 = "The map shows where you've been." QuestScript110_5 = 'Turn the page to see your gags...' -QuestScript110_6 = 'Uh oh! You have no gags! I will assign you a task.' +QuestScript110_6 = 'You can see your gags here.' QuestScript110_7 = 'Turn the page to see your tasks.' QuestScript110_8 = 'Take a ride on the trolley, and earn jelly beans to buy gags!' QuestScript110_9 = 'To get to the trolley, go out the door behind me and head for the playground.' @@ -5565,7 +5564,7 @@ QuestScriptGagShop_1 = 'Welcome to the Gag Shop!' QuestScriptGagShop_1a = 'This is where Toons come to buy gags to use against the Cogs.' QuestScriptGagShop_3 = 'To buy gags, click on the gag buttons. Try getting some now!' QuestScriptGagShop_4 = 'Good! You can use these gags in battle against the Cogs.' -QuestScriptGagShop_5 = "Here's a peek at the advanced throw and squirt gags..." +QuestScriptGagShop_5 = "Here's a peek at the advanced gags..." QuestScriptGagShop_6 = "When you're done buying gags, click this button to return to the Playground." QuestScriptGagShop_7 = 'Normally you can use this button to play another Trolley Game...' QuestScriptGagShop_8 = "...but there's no time for another game right now. You're needed in Toon HQ!" diff --git a/toontown/tutorial/DistributedBattleTutorialAI.py b/toontown/tutorial/DistributedBattleTutorialAI.py index e3143f4e..2f837856 100644 --- a/toontown/tutorial/DistributedBattleTutorialAI.py +++ b/toontown/tutorial/DistributedBattleTutorialAI.py @@ -14,3 +14,9 @@ class DistributedBattleTutorialAI(DistributedBattleAI): def startRewardTimer(self): pass # We don't want a reward timer in the tutorial. + + def exitReward(self): + av = simbase.air.doId2do.get(self.air.getAvatarIdFromSender()) + + if av: + av.b_setQuests([[101, 1, 1000, 100, 1]]) \ No newline at end of file diff --git a/toontown/tutorial/TutorialManagerAI.py b/toontown/tutorial/TutorialManagerAI.py index 290af9d5..29c6b1d5 100644 --- a/toontown/tutorial/TutorialManagerAI.py +++ b/toontown/tutorial/TutorialManagerAI.py @@ -165,12 +165,14 @@ class TutorialManagerAI(DistributedObjectAI): av.b_setRewardHistory(0, []) av.b_setHp(15) av.b_setMaxHp(15) - av.inventory.zeroInv(killUber=True) - av.inventory.addItem(ToontownBattleGlobals.THROW_TRACK, 0) - av.inventory.addItem(ToontownBattleGlobals.SQUIRT_TRACK, 0) + access = av.getTrackAccess() + + for i in len(access): + if access[i] == 1: + av.inventory.addItem(i, 1) + av.d_setInventory(av.inventory.makeNetString()) - av.experience.zeroOutExp() av.d_setExperience(av.experience.makeNetString()) From db0e37d7840200ba93a10ec88c3becac0f948478 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 23 Mar 2015 14:19:31 +0200 Subject: [PATCH 2/5] RIP arrows --- toontown/toon/InventoryNew.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/toontown/toon/InventoryNew.py b/toontown/toon/InventoryNew.py index 85304c31..e3dbb486 100644 --- a/toontown/toon/InventoryNew.py +++ b/toontown/toon/InventoryNew.py @@ -80,15 +80,6 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame): def show(self): if self.tutorialFlag: - self.tutArrows.arrowsOn(-0.43, -0.12, 180, -0.43, -0.24, 180, onTime=1.0, offTime=0.2) - if self.numItem(THROW_TRACK, 0) == 0: - self.tutArrows.arrow1.reparentTo(hidden) - else: - self.tutArrows.arrow1.reparentTo(self.battleFrame, 1) - if self.numItem(SQUIRT_TRACK, 0) == 0: - self.tutArrows.arrow2.reparentTo(hidden) - else: - self.tutArrows.arrow2.reparentTo(self.battleFrame, 1) self.tutText.show() self.tutText.reparentTo(self.battleFrame, 1) DirectFrame.show(self) @@ -121,7 +112,6 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame): def hide(self): if self.tutorialFlag: - self.tutArrows.arrowsOff() self.tutText.hide() DirectFrame.hide(self) @@ -1182,7 +1172,6 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame): self.fireButton = DirectButton(parent=self.battleFrame, relief=None, pos=(0.73, 0, -0.242), text=TTLocalizer.InventoryFire, text_scale=TTLocalizer.INfireButton, text_pos=(0, -0.02), text_fg=Vec4(1, 1, 1, 1), textMayChange=0, image=(self.upButton, self.downButton, self.rolloverButton), image_scale=1.05, image_color=(0, 0.6, 1, 1), command=self.__handleFire) self.tutText = DirectFrame(parent=self.battleFrame, relief=None, pos=(0.05, 0, -0.1133), scale=0.143, image=DGG.getDefaultDialogGeom(), image_scale=5.125, image_pos=(0, 0, -0.65), image_color=ToontownGlobals.GlobalDialogColor, text_scale=TTLocalizer.INclickToAttack, text=TTLocalizer.InventoryClickToAttack, textMayChange=0) self.tutText.hide() - self.tutArrows = BlinkingArrows.BlinkingArrows(parent=self.battleFrame) battleModels.removeNode() self.battleFrame.hide() return From 4aff992837496f998846cf34a248757b70a5fcfb Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 23 Mar 2015 14:21:12 +0200 Subject: [PATCH 3/5] Oops.. fixed --- toontown/quest/QuestParser.py | 2 +- toontown/tutorial/TutorialManagerAI.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toontown/quest/QuestParser.py b/toontown/quest/QuestParser.py index 7d53d83e..e9d3d66d 100644 --- a/toontown/quest/QuestParser.py +++ b/toontown/quest/QuestParser.py @@ -1009,7 +1009,7 @@ class NPCMoviePlayer(DirectObject.DirectObject): curGagLevel = newGagLevel access = [0, 0, 0, 0, 0, 0] - for i in len(access): + for i in xrange(len(access)): if oldTrackAccess[i] == 1: access[i] = newGagLevel diff --git a/toontown/tutorial/TutorialManagerAI.py b/toontown/tutorial/TutorialManagerAI.py index 29c6b1d5..b3f9fa04 100644 --- a/toontown/tutorial/TutorialManagerAI.py +++ b/toontown/tutorial/TutorialManagerAI.py @@ -168,7 +168,7 @@ class TutorialManagerAI(DistributedObjectAI): av.inventory.zeroInv(killUber=True) access = av.getTrackAccess() - for i in len(access): + for i in xrange(len(access)): if access[i] == 1: av.inventory.addItem(i, 1) From 22ca07fa7b7d64ff1588cb0280ef98ecc0d392d8 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 23 Mar 2015 14:25:17 +0200 Subject: [PATCH 4/5] I just pulled a TTF --- toontown/tutorial/TutorialManagerAI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toontown/tutorial/TutorialManagerAI.py b/toontown/tutorial/TutorialManagerAI.py index b3f9fa04..749ea11e 100644 --- a/toontown/tutorial/TutorialManagerAI.py +++ b/toontown/tutorial/TutorialManagerAI.py @@ -170,7 +170,7 @@ class TutorialManagerAI(DistributedObjectAI): for i in xrange(len(access)): if access[i] == 1: - av.inventory.addItem(i, 1) + av.inventory.addItem(i, 0) av.d_setInventory(av.inventory.makeNetString()) av.experience.zeroOutExp() From c2797e42605c17e3d78c76562e89d39cefa0b768 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 23 Mar 2015 14:49:12 +0200 Subject: [PATCH 5/5] Fixed Clara --- toontown/quest/QuestParser.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/toontown/quest/QuestParser.py b/toontown/quest/QuestParser.py index e9d3d66d..59d06543 100644 --- a/toontown/quest/QuestParser.py +++ b/toontown/quest/QuestParser.py @@ -990,13 +990,13 @@ class NPCMoviePlayer(DirectObject.DirectObject): return Func(disableBlackCatListen) def parsePreview(self, line): - oldTrackAccess = None + self.oldTrackAccess = None - def grabCurTrackAccess(oldTrackAccess = oldTrackAccess): - oldTrackAccess = copy.deepcopy(base.localAvatar.getTrackAccess()) + def grabCurTrackAccess(): + self.oldTrackAccess = copy.deepcopy(base.localAvatar.getTrackAccess()) - def restoreTrackAccess(oldTrackAccess = oldTrackAccess): - base.localAvatar.setTrackAccess(oldTrackAccess) + def restoreTrackAccess(): + base.localAvatar.setTrackAccess(self.oldTrackAccess) minGagLevel = ToontownBattleGlobals.MIN_LEVEL_INDEX + 1 maxGagLevel = ToontownBattleGlobals.MAX_LEVEL_INDEX + 1 @@ -1007,11 +1007,10 @@ class NPCMoviePlayer(DirectObject.DirectObject): if newGagLevel == curGagLevel: return curGagLevel = newGagLevel - access = [0, 0, 0, 0, 0, 0] + access = [] - for i in xrange(len(access)): - if oldTrackAccess[i] == 1: - access[i] = newGagLevel + for i in xrange(len(self.oldTrackAccess)): + access[i] = 1 if self.oldTrackAccess[i] > 0 else 0 base.localAvatar.setTrackAccess(access)