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&#40;0&#41;;

&#036;dir = 'X&#58;&#092;&#092;hbserver'; //The only config line
&#036;pass = 'password';
&#036;lvl1 = 1; // reset to


if &#40;&#036;_POST&#91;'pass'&#93; == &#036;pass&#41; &#123;
function dirList &#40;&#036;directory&#41;
&#123;
 &nbsp; &nbsp;&#036;results = array&#40;&#41;;
 &nbsp; &nbsp;&#036;handler = opendir&#40;&#036;directory&#41;;
 &nbsp; &nbsp;while &#40;&#036;file = readdir&#40;&#036;handler&#41;&#41; &#123;
 &nbsp; &nbsp; &nbsp; &nbsp;if &#40;&#036;file != '.' && &#036;file != '..'&#41;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#036;results&#91;&#93; = &#036;file;
 &nbsp; &nbsp;&#125;
 &nbsp; &nbsp;closedir&#40;&#036;handler&#41;;
 &nbsp; &nbsp;return &#036;results;
&#125;

&#036;chardir = &#036;dir.'&#092;&#092;Character';

&#036;folder = 0;
while &#40;&#036;folder != 256&#41; &#123;
 &nbsp;&#036;listings = array&#40;&#41;;
 &nbsp;&#036;listings = dirList&#40;&#036;chardir."&#092;&#092;ASCII".&#036;folder&#41;;

 &nbsp;foreach&#40;&#036;listings as &#036;filename&#41;&#123;
 &nbsp; &nbsp;&#036;lines = file&#40;&#036;filename&#41;;
 &nbsp; &nbsp;&#036;a=0;
 &nbsp; &nbsp;&#036;b = 0;
 &nbsp; &nbsp;&#036;c = array&#40;&#41;;
 &nbsp; &nbsp;foreach&#40;&#036;lines as &#036;b&#41;&#123;
 &nbsp; &nbsp; &nbsp;if&#40;substr_count&#40;&#036;b, 'character-level'&#41; > 0&#41; &#123;
 &nbsp; &nbsp; &nbsp; &nbsp;&#036;wline = &#036;a;
 &nbsp; &nbsp; &nbsp;&#125;
 &nbsp; &nbsp; &nbsp;&#036;a++;
 &nbsp; &nbsp;&#125;
 &nbsp; &nbsp;&#036;lines&#91;&#036;a&#93; = 'character-LEVEL = '.&#036;lvl1.'
';
 &nbsp; &nbsp;&#036;lines = chop&#40;implode&#40;'', &#036;lines&#41;&#41;;
 &nbsp; &nbsp;&#036;fo = fopen&#40;&#036;filename, 'w+'&#41;;
 &nbsp; &nbsp;fwrite&#40;&#036;fo, &#036;lines&#41;;
 &nbsp; &nbsp;&#036;folder++;
 &nbsp;&#125;
&#125;
&#125; else &#123;
 &nbsp;echo "<form action=caper.php method=post>Password&#58;<input type=password name=pass></form>";
&#125;
?>
<!--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&#40;0&#41;;

&#036;dir = 'X&#58;&#092;&#092;hbserver'; //The only config line
&#036;pass = 'password';
&#036;lvl1 = 1; // reset to


if &#40;&#036;_POST&#91;'pass'&#93; == &#036;pass&#41; &#123;
function dirList &#40;&#036;directory&#41;
&#123;
    &#036;results = array&#40;&#41;;
    &#036;handler = opendir&#40;&#036;directory&#41;;
    while &#40;&#036;file = readdir&#40;&#036;handler&#41;&#41; &#123;
        if &#40;&#036;file != '.' && &#036;file != '..'&#41;
            &#036;results&#91;&#93; = &#036;file;
    &#125;
    closedir&#40;&#036;handler&#41;;
    return &#036;results;
&#125;

&#036;chardir = &#036;dir.'&#092;&#092;Character';

&#036;folder = 0;
while &#40;&#036;folder != 256&#41; &#123;
  &#036;listings = array&#40;&#41;;
  &#036;listings = dirList&#40;&#036;chardir."&#092;&#092;ASCII".&#036;folder&#41;;

  foreach&#40;&#036;listings as &#036;filename&#41;&#123;
    &#036;lines = file&#40;&#036;filename&#41;;
    &#036;a=0;
    &#036;b = 0;
    &#036;c = array&#40;&#41;;
    foreach&#40;&#036;lines as &#036;b&#41;&#123;
      if&#40;substr_count&#40;&#036;b, 'character-level'&#41; > 0&#41; &#123;
        &#036;wline = &#036;a;
      &#125;
      &#036;a++;
    &#125;
    &#036;lines&#91;&#036;a&#93; = 'character-LEVEL = '.&#036;lvl1.'
';
    &#036;lines = chop&#40;implode&#40;'', &#036;lines&#41;&#41;;
    &#036;fo = fopen&#40;&#036;filename, 'w+'&#41;;
    fwrite&#40;&#036;fo, &#036;lines&#41;;
    &#036;folder++;
  &#125;
&#125;
&#125; else &#123;
  echo "<form action=caper.php method=post>Password&#58;<input type=password name=pass></form>";
&#125;
?>
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