Zamiel

Eden Streak Detector

Jan 16th, 2017
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #!C:\Python34\python.exe
  2.  
  3. +----------------------+
  4. | Eden streak detector |
  5. +----------------------+
  6.  
  7. # Imports
  8. import sys
  9. import struct
  10. import time
  11.  
  12. # Configuration
  13. game_data_file = 'C:/Users/james/Documents/My Games/Binding of Isaac Afterbirth/persistentgamedata2.dat'
  14. output_file = 'D:/Games/PC/Binding of Isaac Rebirth/EdenStreak.txt'
  15.  
  16. # Set up streak and save file
  17. oldstreak = -100
  18.  
  19. # Loop forever
  20. while True:
  21. with open(game_data_file, 'rb') as fin:
  22. # Check the streak
  23. streak = struct.unpack_from('<I', fin.read(), 0x195)[0]
  24.  
  25. # If the streak changed, overwrite the text file
  26. if streak != oldstreak:
  27. fout = open(output_file, 'w')
  28. fout.write("Eden\nStreak:\n{0}".format(streak))
  29. fout.close()
  30. oldstreak = streak
  31.  
  32. # And let the user know
  33. print('Eden Streak updated to:', streak)
  34.  
  35. time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment