mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2024-11-30 04:26:03 +00:00
14 lines
357 B
PHP
14 lines
357 B
PHP
<?php
|
|
|
|
require_once './src/D2Functions.php';
|
|
|
|
$filename = "D:\Diablo II\MODS\ironman-dev\save\Barb.d2s";
|
|
$fp = fopen($filename, "rb+");
|
|
|
|
fseek($fp, 12);
|
|
fwrite($fp, pack('I', 0)); // produces 4 bytes
|
|
$fileData = unpack('C*', file_get_contents($filename));
|
|
fseek($fp, 12);
|
|
fwrite($fp, pack('H8', checksum($fileData)));
|
|
dump(checksum($fileData));
|
|
fclose($fp); |