To whom it may concern:
Who know how to reset the MBrahmanPoints in both .TAD and MSSQL. I know its easy doing it MSSQL but in .TAD I don't have any knowledge. Please shred me some lights. Thanks.
To whom it may concern:
Who know how to reset the MBrahmanPoints in both .TAD and MSSQL. I know its easy doing it MSSQL but in .TAD I don't have any knowledge. Please shred me some lights. Thanks.
Update to this??
Still don't know why do you need this, but here you go.
Just put it on your apache server with php or whatever you have and update the directories of course!PHP Code:<?php
$accountsPath = 'D:\\account';
$accountsPathZeroMP = 'D:\\account_zero_mp';
function endsWith($haystack, $needle)
{
return $needle === "" || substr($haystack, -strlen($needle)) === $needle;
}
function find($path){
global $accountsPath, $accountsPathZeroMP;
foreach( glob( $path . "\\*" ) as $filename ) {
if(filetype($filename) == 'dir')
find($filename);
if(endsWith($filename,'.TAD') or endsWith($filename,'.tad')){
$open = fopen($filename,'rb');
$read = fread($open,filesize($filename));
$newTAD = substr_replace(substr_replace(substr_replace(bin2hex($read),'00000000',272,8),'00000000',3648,8),'00000000',7024,8); //reset to zero master point
$newTAD = substr_replace(substr_replace(substr_replace($newTAD,'00000000',2816,8),'00000000',6192,8),'00000000',9568,8); // reset to zero monthly master point
fclose($open);
$newFileName = str_replace($accountsPath,$accountsPathZeroMP,$filename);
if(!file_exists(dirname($newFileName))){
mkdir(dirname($newFileName), 0777, true);
}
$target = fopen($newFileName,'wb');
fwrite($target,hex2bin($newTAD));
fclose($target);
}
}
}
find($accountsPath);
echo 'Finished';
?>
Well done alxndr. Have you tested this code already?
@jbeitz107 just tested on some *.TAD files and compared the modified and the original one at binary level nothing else, but it seems it's ok :)
@A v a r a just comment or delete the line of code where master point are being replaced.
@A v a r a post a .TAD file and i'm going to show a demonstration.
Here you go ESOJ.rar
@A v a r a just made this showcase, check.
@A v a r a yeah, it's better to backup the original just in case.
Update to alxndr's code. This will reset all master points in a single directory. Use with caution. It has been tested here but, may not work for everyone. Please test it first. It was designed for older versions of xampp prior to 1.8.1. Thanks again alxndr for your code. I will continue to work on single accounts but, tonight I am too tired. Lol
PHP Code:<?php
//Change to your directory for your accounts.
$accdir="C:\Server\YourDirectorylocation";
echo "READY TO BEGIN RESETTING MASTER POINTS<br>";
if ($_POST['action'] == 'submitted'){
$accountsPath = $accdir;
$accountsPathZeroMP = $accdir;
function endsWith($haystack, $needle)
{
return $needle === "" || substr($haystack, -strlen($needle)) === $needle;
}
function find($path){
global $accountsPath, $accountsPathZeroMP;
foreach( glob( $path . "\\*") as $filename ) {
if(filetype($filename) == 'dir')
find($filename);
if(endsWith($filename,'.TAD') or endsWith($filename,'.tad')){
$open = fopen($filename,'rb');
$read = fread($open,filesize($filename));
$newTAD = substr_replace(substr_replace(substr_replace(bin2hex($read),'00000000',272,8),'00000000',3648,8),'00000000',7024,8); //reset to zero master point
$newTAD = substr_replace(substr_replace(substr_replace($newTAD,'00000000',2816,8),'00000000',6192,8),'00000000',9568,8); // reset to zero monthly master point
fclose($open);
$newFileName = str_replace($accountsPath,$accountsPathZeroMP,$filename);
if(!file_exists(dirname($newFileName))){
mkdir(dirname($newFileName), 0777, true);
}
$target = fopen($newFileName,'wb');
//New Mod for older php versions
fwrite($target,pack('H*',$newTAD));
fclose($target);
}
}
}
find($accountsPath);
echo '<b><font color=green>Finished Resetting all Master Points</font></b><br>';
}
?>
<form id="resetmp" method="POST" action="resetmp.php">
<input type="Submit" Value="Reset All Accounts Master Points">
<input type="hidden" name="action" value="submitted">
</form>![]()
Last edited by jbeitz107; 25-08-14 at 10:34 AM.