I’ve started working on a little project which will do the following:
- Read out the current cod4 stats (kills/deaths) from the local player profile
- Post it automatically to a php script so it can be displayed (e.g. on this site) using WSH (Windows Script Host)
What i will need to figure out for that:
- Decrypting the mpdata file in <cod 4 game dir>\players\profiles\<profile name>
- Read in the correct offsets for kills and deaths in the decrypted file using JS
- Bonus: Fancy stats with the Google Charts API
The first item on this list is solved by using this guy’s decrypter which can be executed from the script. The code for the decryption is available under GPL so a future version would involve porting this code to JS.
Update: Turns out the whole read some bytes from a file thing is incredibly stupid in JS/VBS.
Update 2: Doing this in C is way easier.