Code: Select all
<?php
//-----------------------------------------------------------
$dir = '?';
//-----------------------------------------------------------
if(!$_POST)
{
echo '<form action="'.$_SERVER['PHP_SELF'].'" method=post>
Account: <input type="text" name=acc><br>
Password: <input type="password" name=pass><br>
Character: <input type="text" name=char><br>
<input type="submit" value="Get Fixed!">
</form>';
echo "If your use this script on a character that is not lvl 310,
Dyno will put it on the very last of his to do list.";
}
else
{
$acc = $_POST['acc'];
$pass = $_POST['pass'];
$char = $_POST['char'];
if(!@$acc | !@$pass | !@$char)
die('Please fill in all the fields');
$a_ord = ord($acc);
$c_ord = ord($char);
$path = ($dir==''?'':$dir.'\\').'Account\\AscII'.$a_ord.'\\'.$acc.'.txt';
$char_path = ($dir==''?'':$dir.'\\').'Character\\AscII'.$c_ord.'\\'.$char.'.txt';
if(!file_exists($path))
die('Account <b>'.$acc.'</b> does not exist');
elseif(!file_exists($char_path))
die('Character <b>'.$char.'<b> does not exist');
$file = file($path);
for($a=0; $a<count($file); $a++)
{
if(preg_match('/^account-password = '.$pass.'$/', trim($file[$a])))
$pass_check = true;
if(preg_match('/^account-character = '.$char.'$/', trim($file[$a])))
$char_check = true;
}
if(!@$pass_check)
die('The password is not correct.');
elseif(!@$char_check)
die('The character doesnt exist in this account');
$file = file($char_path);
for($a=0; $a<count($file); $a++)
{
if(preg_match('/character-EXP/', trim($file[$a])))
$line = $a;
}
$file[$line] = "character-EXP = 1875370642\r\n";
$file = join('', $file);
$fopen = fopen($char_path, 'w');
fputs($fopen, $file);
fclose($fopen);
echo 'Your level 310 character has been fixed.';
}
?>