Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!C:\Python34\python.exe
- +----------------------+
- | Eden streak detector |
- +----------------------+
- # Imports
- import sys
- import struct
- import time
- # Configuration
- game_data_file = 'C:/Users/james/Documents/My Games/Binding of Isaac Afterbirth/persistentgamedata2.dat'
- output_file = 'D:/Games/PC/Binding of Isaac Rebirth/EdenStreak.txt'
- # Set up streak and save file
- oldstreak = -100
- # Loop forever
- while True:
- with open(game_data_file, 'rb') as fin:
- # Check the streak
- streak = struct.unpack_from('<I', fin.read(), 0x195)[0]
- # If the streak changed, overwrite the text file
- if streak != oldstreak:
- fout = open(output_file, 'w')
- fout.write("Eden\nStreak:\n{0}".format(streak))
- fout.close()
- oldstreak = streak
- # And let the user know
- print('Eden Streak updated to:', streak)
- time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment