of course i was change C:\\Example to my directory but this still writing "you fave points" but not show amount.<?
/* ----------------------------------------------------------------------------------
DarkZero's Trade Script for Helbreath Servers
If you find a bug, have a suggestion for another script,
or need to contact me, please contact me one of the following ways:
Email: dz@suckas.net
AIM: DarkZeroPU
ICQ: 157544686
IRC: irc.hbportal.net #h2 #hbredemption
-------------------------------------------------------------------------------------
This file may be distributed freely as long as this part of the code is left intact.
I do not demand it, but please give me credit if you decide to use my script. No, it's
not that good but it did take a long time to make.
Everything herein is Copyright Brian Seeders 2003
-------------------------------------------------------------------------------------
The only thing you need to do is insert your core directory into the line
below (leave off the \ at the end)
-------------------------------------------------------------------------------------
NOTE: If you receive errors regarding undefined indexes, your PHP configuration needs
to be changed.
-------------------------------------------------------------------------------------
Release Notes:
August 28,2003: First release
In the next release:
-Suggestions Needed-
---------------Edit this----------------*/
$dir = 'C:\\Example';
/*-------------Edit this----------------*/
if(!$_GET){
$lines = file('trades.txt');
foreach($lines as $b){
$b = explode(':', $b);
$moo = $moo . '<option value="'.$b[0].'">'.$b[1].' - '.$b[3].' Pts</option>';
}
echo '
<form action='.$_SERVER['PHP_SELF'].'?submit method=post>
<center><h2>Trade points for items</h2>
Account:<input type=text name=acc>
<br>
Password:<input type=password name=pass>
<br>
Character:<input type=text name=char>
<br>
Item:
<select NAME=item>
'.$moo.'
</select>
<p>
<input type=submit name=getitem Value=Trade>
</form>
<hr>
<form action='.$_SERVER['PHP_SELF'].'?submit method=post><h2>Trade in items for points</h2>
Account:<input type=text name=acc>
<br>
Password:<input type=password name=pass>
<br>
Character:<input type=text name=char>
<br>
<input type=submit name=point Value=Trade>
</form>
<hr>
<form action='.$_SERVER['PHP_SELF'].'?submit method=post><h2>See how many points you have</h2>
Account:<input type=text name=acc>
<br>
Password:<input type=password name=pass>
<br>
Character:<input type=text name=char>
<br>
<input type=submit name=tell Value=Submit>'
;
}
else{
if($_POST['point']){
$acc = $_POST['acc'];
$pass = $_POST['pass'];
$char = $_POST['char'];
$fl = substr($acc, 0, 1);
$ascii = ord($fl);
$filename = $dir . '\\Account\\ASCII' . $ascii . '\\' . $acc . '.txt';
$lines = file($filename);
$a=0;
foreach($lines as $a){
$a = trim($a);
if($a == 'account-password = '.$pass.''){ $passflag=TRUE; }
elseif($a == 'account-character = '.$char.''){ $charflag=TRUE; }
}
if(!$passflag){ echo 'Incorrect password'; }
if(!$charflag){ echo 'Character does not seem to be on this account!'; }
else{
$fl = substr($acc, '0', '1');
$casc = ord($char);
$fchar = $dir . '\\Character\\ASCII' . $casc . '\\' . $char . '.txt';
$lines = file($fchar);
$a=0;
$ilines = file('points.txt');
foreach($lines as $b){
foreach($ilines as $c){
$c = explode(':', $c);
if(substr_count($b, $c[0]) > 0){ $lines[$a] = NULL; $points = $points+$c[1];}
}
if(substr_count($b, '[EOF]') > 0){
$eof = $a-1;
}
if(substr_count($b, 'character-EK-Count') > 0){
$eks = str_replace('character-EK-Count = ', NULL, chop($b));
$eks = chop($eks); $lines[$a] = 'character-EK-count = 0';
}
if(substr_count($b, 'trade-points') > 0){ $pointline = $a; }
$a++;
}
if(!$pointline){ $lines[$eof] = 'trade-points = '.$points.''; }
else{
$cpoints = str_replace('trade-points =', NULL, $lines[$pointline]);
$cpoints = $cpoints + $points;
$lines[$pointline] = 'trade-points = '.$cpoints.'';
}
$lines = chop(implode('', $lines));
$fo = fopen("$fchar", 'w+');
fwrite($fo, $lines);
}
echo 'Transaction successful! You now have '.$cpoints.' points.';
}
elseif($_POST['getitem']){
$acc = $_POST['acc'];
$pass = $_POST['pass'];
$char = $_POST['char'];
$fl = substr($acc, 0, 1);
$ascii = ord($fl);
$filename = $dir . '\\Account\\ASCII' . $ascii . '\\' . $acc . '.txt';
if(!is_readable($filename)){ echo 'Account does not exist.'; }
else{
$lines = file($filename);
$a=0;
foreach($lines as $a){
$a = trim($a);
if($a == 'account-password = '.$pass.''){ $passflag=TRUE; }
elseif($a == 'account-character = '.$char.''){ $charflag=TRUE; }
}
if(!$passflag){ echo 'Incorrect password'; }
if(!$charflag){ echo 'Character does not seem to be on this account!'; }
else{
$fl = substr($acc, 0, 1);
$casc = ord($char);
$fchar = $dir . '\\Character\\ASCII' . $casc . '\\' . $char . '.txt';
$lines = file($fchar);
$a = '0';
foreach($lines as $b){
if(substr_count($b, 'trade-points') > 0){ $pointline = $a; }
if(substr_count($b, 'character-item') >0){ $itemline = $a+1; }
$a++;
}
$trades = file('trades.txt');
foreach($trades as $b){
if(substr_count($b, $_POST[item])){ $item = explode(':', $b); }
$a++;
}
$points = str_replace('trade-points =', NULL, $lines[$pointline]);
if($points >= $item[3]){
$points = $points - $item[3];
$lines[$itemline] = "$item[2]
";
$lines[$pointline] = 'trade-points = '.$points.'';
$lines = implode('', $lines);
$fo = fopen($fchar, 'w+');
fwrite($fo, $lines);
echo 'Trade successful! You have '.$points.' points remaining.';
}
else{ echo 'You do not have enough points for that item. You have '.$points.' points, and you need '.$item[3].' points.'; }
}
}
}
elseif($_POST['tell']){
$acc = $_POST['acc'];
$pass = $_POST['pass'];
$char = $_POST['char'];
$fl = substr($acc, 0, 1);
$ascii = ord($fl);
$filename = $dir . '\\Account\\ASCII' . $ascii . '\\' . $acc . '.txt';
$lines = file($filename);
$a=0;
foreach($lines as $a){
$a = trim($a);
if($a == 'account-password = '.$pass.''){ $passflag=TRUE; }
elseif($a == 'account-character = '.$char.''){ $charflag=TRUE; }
}
if(!$passflag){ echo 'Incorrect password'; }
if(!$charflag){ echo 'Character does not seem to be on this account!'; }
else{
$fl = substr($acc, 0, 1);
$casc = ord($char);
$fchar = $dir . '\\Character\\ASCII' . $casc . '\\' . $char . '.txt';
$lines = file($fchar);
$a=0;
foreach($lines as $b){
if(substr_count($b, 'trade-points') > 0){ $pointline = $a; }
$a++;
}
$points = str_replace('trade-points =', NULL, $lines[$pointline]);
echo 'You have '.$points.' points.';
}
}
}
?>
Ball Trade Php Script
yo, i was download a php script from <a href='http://koti.welho.com/ahoyden/download/ ... hSS.tk.zip' target='_blank'>http://koti.welho.com/ahoyden/download/ ... .tk.zip</a> and i have problem with a trade ball script, i think is broken but i dont know where. Is there someone who knows php and can fix it? the code is:
lamer not everyone here is a helper..some in deed need helpbobek wrote: lol hb hacking forum and nobody knows that hahaha
Support Outpost@HBTop50<br><a href='http://hbtop50.berserkvision.com/in.php?id=582' target='_blank'>Outpost@HBTop50</a><br>
yea and so... ? forum if for helping and discussing you "lamer". And not all crackers must know php language.No-1 wrote:lamer not everyone here is a helper..some in deed need helpbobek wrote: lol hb hacking forum and nobody knows that hahaha
Raptile>> Yes what i say i edited this but still is problem. I fear you have right with the serever version ;/
so do you know ?bobek wrote:yea and so... ? forum if for helping and discussing you "lamer". And not all crackers must know php language.No-1 wrote:lamer not everyone here is a helper..some in deed need helpbobek wrote: lol hb hacking forum and nobody knows that hahaha
Raptile>> Yes what i say i edited this but still is problem. I fear you have right with the serever version ;/
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)