Char Lvl To 1

Website Scripts for your Helbreath Server.
Post Reply
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

need char lvl set to 1 scripted. eather just 1 char at a time or all char at once will be great thats i would liek all char at once one if not thats kool
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wannabee
Loyal fan
Posts: 270
Joined: Sun Dec 21, 2003 12:42 am

Post by wannabee »

Resets all characters to a specifyed level

Notes:
- Backup all savedfiles before running this script.

Code: Select all

<?
Error_reporting(0);

$dir = 'X:\\hbserver'; //The only config line
$pass = 'password';
$lvl1 = 1; // reset to


if ($_POST['pass'] == $pass) {
function dirList ($directory)
{
    $results = array();
    $handler = opendir($directory);
    while ($file = readdir($handler)) {
        if ($file != '.' && $file != '..')
            $results[] = $file;
    }
    closedir($handler);
    return $results;
}

$chardir = $dir.'\\Character';

$folder = 0;
while ($folder != 256) {
  $listings = array();
  $listings = dirList($chardir."\\ASCII".$folder);

  foreach($listings as $filename){
    $lines = file($filename);
    $a=0;
    $b = 0;
    $c = array();
    foreach($lines as $b){
      if(substr_count($b, 'character-level') > 0) {
        $wline = $a;
      }
      $a++;
    }
    $lines[$a] = 'character-LEVEL = '.$lvl1.'
';
    $lines = chop(implode('', $lines));
    $fo = fopen($filename, 'w+');
    fwrite($fo, $lines);
    $folder++;
  }
}
} else {
  echo "<form action=caper.php method=post>Password:<input type=password name=pass></form>";
}
?>
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Human knowleag belongs to THE WORLD<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>So i highly dislike people who keep to their proud selfs... thats why i wanna share everything i got with you guys :D
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

wannabee wrote: Resets all characters to a specifyed level

Notes:
- Backup all savedfiles before running this script.

Code: Select all

<?
Error_reporting(0);

$dir = 'X:\\hbserver'; //The only config line
$pass = 'password';
$lvl1 = 1; // reset to


if ($_POST['pass'] == $pass) {
function dirList ($directory)
{
    $results = array();
    $handler = opendir($directory);
    while ($file = readdir($handler)) {
        if ($file != '.' && $file != '..')
            $results[] = $file;
    }
    closedir($handler);
    return $results;
}

$chardir = $dir.'\\Character';

$folder = 0;
while ($folder != 256) {
  $listings = array();
  $listings = dirList($chardir."\\ASCII".$folder);

  foreach($listings as $filename){
    $lines = file($filename);
    $a=0;
    $b = 0;
    $c = array();
    foreach($lines as $b){
      if(substr_count($b, 'character-level') > 0) {
        $wline = $a;
      }
      $a++;
    }
    $lines[$a] = 'character-LEVEL = '.$lvl1.'
';
    $lines = chop(implode('', $lines));
    $fo = fopen($filename, 'w+');
    fwrite($fo, $lines);
    $folder++;
  }
}
} else {
  echo "<form action=caper.php method=post>Password:<input type=password name=pass></form>";
}
?>
yes but it dont work its keeps trying to go to caper.php and i chages it at bottom but yet it dont work
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Post Reply