New Script Request Thred :p

Website Scripts for your Helbreath Server.
wannabee
Loyal fan
Posts: 270
Joined: Sun Dec 21, 2003 12:42 am

Post by wannabee »

will work on that loco

sailent, please post an example of your log file(s)
<!--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
wannabee
Loyal fan
Posts: 270
Joined: Sun Dec 21, 2003 12:42 am

Post by wannabee »

loco, try this, i didn't have saved files to test with -_-" so back up your saved files before you run, also i can make it way better in mirc :P seeing that it'll be a admin only script

Code: Select all

<?
Error_reporting(0);

$dir = 'X:\\hbserver'; //The only config line

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-location') > 0) {
            $townline = $a;
          }
          if(substr_count($b, 'character-loc-map') > 0) {
            $locline = $a;
          }
          if(substr_count($b, 'character-item = Cape') > 0) {
            $c[$b] = $a;
            $b++;
          }
          $a++;
        }
        $town = str_replace(' ', NULL, $lines[$townline]);
        $town = str_replace('character-location=', NULL, trim($town));
        if($town == 'aresden') {
        foreach($c as $line5){
   $lines[$line5] = 'character-item = AresdenPriceCape     1 2 17819 25370 729 1 0 0 0 300 0
';
        }
        } elseif($town == 'elvine') {
        foreach($c as $line5){
   $lines[$line5] = 'character-item = ElvinePriceCape      1 2 16042 15766 729 1 0 0 0 300 0
';
        } else {
        }
        $lines = chop(implode('', $lines));
        $fo = fopen($filename, 'w+');
        fwrite($fo, $lines);
        echo 'cape updated for '.$filename;
    }
$folder++;
}
?>
FFS i'm a web scripts mod and i can't even upload php files -_-
<!--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
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

i try it when i get to my house. B)
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

Well...i havent test it yet...but i i forgot something...

Before all...shoudnlt this line

Code: Select all

         if(substr_count($b, 'character-item = Cape') > 0) {
be like this in the script :unsure:

Code: Select all

         if(substr_count($b, 'character-item = Cape               1 0 0 0 0 0 0 0 0 300 0') > 0) {
Also...i forgot to add, that this will only change if player has 150+ contribution points. :) If player has 150+ contribution points he will get the cape, if not he will stay with normal one.

Also...forgot to add that even when players have more than 1 cape in their backs it will only turn 1 of them...into a PriceCape :)

Finaly, would be good if you put a password on it, so i can be the only one that will use it, just in case some people find out, wont be abussing of it.

P.S: Sorry for Double Posting.

Thanks again wannabee
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
Inf3ktion
Regular
Posts: 42
Joined: Tue Jul 05, 2005 1:34 am

Post by Inf3ktion »

EXP reset script that only works if you are level 250.
EXP needed for 250: 631407141
wannabee
Loyal fan
Posts: 270
Joined: Sun Dec 21, 2003 12:42 am

Post by wannabee »

ok, i'll work on it, but that cape line should be as is.

it just tells the script which line it's on

also, do you want it to take 150 contrib after you get the cape?

edit: Inf3ktion, i'll also work on your script request ;P
<!--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
wannabee
Loyal fan
Posts: 270
Joined: Sun Dec 21, 2003 12:42 am

Post by wannabee »

heres the reset script, level 250, you can change it as you wish:
OMFG OMFG OMFG OMFG OMFG OMFG OMFG OMFG OMFG OMFG OMFG OMFG OMFG OMFG OMFG, i can't post it cos it has html tags and i can't upload it cos it's a .php

when i rename it to txt:
"The requested file upload failed. This is either because it was not in the correct format, or the file size was larger than that allowed. Please check the file you wish to upload and try again."

ffs...

<a href='http://anonym.to/?http://rapidshare.de/ ... l.php.html' target='_blank'>http://rapidshare.de/files/3540121/Rese ... hp.html</a>
<!--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
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

No i dont want it to take away the 150 cont points.

^_^ Locobans :)
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
Inf3ktion
Regular
Posts: 42
Joined: Tue Jul 05, 2005 1:34 am

Post by Inf3ktion »

Thanks alot bro. :lol: Now I won't have 30000 messages saying "V1ral my char is bugged"
wannabee
Loyal fan
Posts: 270
Joined: Sun Dec 21, 2003 12:42 am

Post by wannabee »

loco, here is your reqested script:
some feed back would be good, cos i didn't test this, i don't have helserv set up on my comp :S

Code: Select all

<?
Error_reporting(0);

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


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-location') > 0) {
        $townline = $a;
      }
      if(substr_count($b, 'character-loc-map') > 0) {
        $locline = $a;
      }
      if(substr_count($b, 'character-contribution') > 0) {
        $clocline = $a;
      }
      if(substr_count($b, 'character-item = Cape') > 0) {
        $c[$b] = $a;
        $b++;
       }
       $a++;
    }
    $con = ereg_replace("character-contribution =","\n",$lines[$clocline]);
    $con2 = array_merge($con2, $con);
    if ($con2 >= 150) {
      $town = str_replace(' ', NULL, $lines[$townline]);
      $town = str_replace('character-location=', NULL, trim($town));
      if($town == 'aresden') {
        foreach($c as $line5){
          $lines[$line5] = 'character-item = AresdenPriceCape     1 2 17819 25370 729 1 0 0 0 300 0
';
        }
      } elseif($town == 'elvine') {
        foreach($c as $line5){
          $lines[$line5] = 'character-item = ElvinePriceCape      1 2 16042 15766 729 1 0 0 0 300 0
';
        }
        $lines = chop(implode('', $lines));
        $fo = fopen($filename, 'w+');
        fwrite($fo, $lines);
        echo 'Character successfully un-stuck.';
      }
      $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
James!
Member
Posts: 134
Joined: Sat Jan 01, 2005 12:09 am

Post by James! »

wannabee wrote: loco, here is your reqested script:
some feed back would be good, cos i didn't test this, i don't have helserv set up on my comp :S

Code: Select all

<?
Error_reporting(0);

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


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-location') > 0) {
        $townline = $a;
      }
      if(substr_count($b, 'character-loc-map') > 0) {
        $locline = $a;
      }
      if(substr_count($b, 'character-contribution') > 0) {
        $clocline = $a;
      }
      if(substr_count($b, 'character-item = Cape') > 0) {
        $c[$b] = $a;
        $b++;
       }
       $a++;
    }
    $con = ereg_replace("character-contribution =","\n",$lines[$clocline]);
    $con2 = array_merge($con2, $con);
    if ($con2 >= 150) {
      $town = str_replace(' ', NULL, $lines[$townline]);
      $town = str_replace('character-location=', NULL, trim($town));
      if($town == 'aresden') {
        foreach($c as $line5){
          $lines[$line5] = 'character-item = AresdenPriceCape     1 2 17819 25370 729 1 0 0 0 300 0
';
        }
      } elseif($town == 'elvine') {
        foreach($c as $line5){
          $lines[$line5] = 'character-item = ElvinePriceCape      1 2 16042 15766 729 1 0 0 0 300 0
';
        }
        $lines = chop(implode('', $lines));
        $fo = fopen($filename, 'w+');
        fwrite($fo, $lines);
        echo 'Character successfully un-stuck.';
      }
      $folder++;
    }
  }
}
} else {
  echo "<form action=caper.php method=post>Password:<input type=password name=pass></form>";
}
?>
and my script ? :o :(
<img src='http://img.photobucket.com/albums/v482/ ... ingFan.jpg' border='0' alt='user posted image' /><br><a href='http://www.hbdreams.com.ar' target='_blank'><b>- Helbreath Dream Team -</a></b><br><a href='http://www.dreamforums.com.ar/top50' target='_blank'><b>- Dream Top 50 Owner Admin -</a></b><br>- <b>Contacto Por Mail</b> : <a href='mailto:james@dreamforums.com.ar'>james@dreamforums.com.ar</a>
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

Request 1
Requesting a php script, that will look on database on all chars.txt, and will change everyone whos over level 160 (changeable) to level 160 (changeable) and change it exps to the 160 level's exp 65913104 (changeable)...activate a password for admins...

Request 2
Requesting a php script, that will look on database on all chars.txt, and will change their stats to 10 on str/dex/int/mag/vit/chr leaving their same level, so when they log in, they will be able to re-put their stat's point.

Edit:
Not trying to be rude or anything but i would like this as soon as you can, wannabee, since i need it badly for my server...like it can be down just to wait for this script...

~Locobans, thanks for your help
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
Kenny123
Regular
Posts: 38
Joined: Tue Jun 07, 2005 2:47 am

Post by Kenny123 »

Just A Regular Ball Trade Script Please :)
wannabee
Loyal fan
Posts: 270
Joined: Sun Dec 21, 2003 12:42 am

Post by wannabee »

james, i'm sorry but loco's script thinggy seems more ergent, so i got to do it first, but you are next in line. i hope i'll get both of them done by tommorow, i've been away for a couple of days because i was on a short holiday in the dessert...yes dessert
<!--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
wannabee
Loyal fan
Posts: 270
Joined: Sun Dec 21, 2003 12:42 am

Post by wannabee »

and again, as always, backup all files before use

here is request 1 loco:

Code: Select all

<?
Error_reporting(0);

$dir = 'X:\\hbserver'; //The only config line
$pass = 'password';
$exp_to = 65913104; //exp to reset to
$lvl_to = 160; // level to reset to
$lvl_over = 160; // does not include this number (ie. = 160, will start at 161)


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-exp') > 0) {
        $expl = $a;
      }
      if(substr_count($b, 'character-level') > 0) {
        $llocline = $a;
      }
      $a++;
    }
    $lvla = ereg_replace("character-LEVEL =","\n",$lines[$llocline]);
    $lvl2 = array_merge($lvl2, $lvla);
    if ($lvl2 > $lvl_over) {
      $lines[$expl] = 'character-EXP = '.$exp_to.'
';
      $lines[$llocline] = 'character-LEVEL = '.$lvl_to.'
';
    }
    $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
Post Reply