[Req] Script

Taevas

New Member
Joined
Aug 23, 2011
Messages
22
Reaction score
0
Hello, I this script after exchanging is changing OnlineHours to <NULL> and now when im ingame it's also <NULL> and I can't exchange anymore hours.
Can someone edit this script to change hours to 0, not <NULL>, please (wasntme)

function online_hours()
{
global $resethours;


$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);

check_inject();

$query = mssql_query("Select memb___id,OnlineHours,ConnectTM,DisConnectTM from MEMB_STAT where memb___id='$account'");
$row = mssql_fetch_row($query);

$querypass = mssql_query("Select memb___id,memb__pwd,memb_name,bloc_code,vip From MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$char = mssql_fetch_row($querypass);


$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);


if($account != $char[0] || $password != $char[1]) { echo"<font color='orange'>Your $char[0] Account or PASSWORD is not correct!</font><br>"; $error=1; }
else
{
if($error != 1) {

$onhourss = $char[3];

$creditshourss = $row[1] * 5;


if($row[1] <= 0) { echo"<font color='orange'>Account <font color=green>$account</font> must have<font color=green> minimum 1 Online hour in game</font> !</font></font><br>"; $error=2;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online !<br></font><font color=orange> Please LogOff First!</font><br>"; $error=2;}



else
{
if($error != 2)
{
echo"<font color='green'>All the hours spent in game were removed and you earned <font color=orange>$creditshourss </font> <font color=green>credits !</font><br>";
$a = mssql_query("DELETE FROM MEMB_STAT Where memb___id='$account'");
$b = mssql_query("Update MEMB_CREDITS set credits = credits+$creditshourss WHERE memb___id='$account'");

}
}

}
}
}
 
PHP:
function online_hours()
{
global $resethours;


$character = secure($_POST['character']);
$account = secure($_POST['login']);
$password = secure($_POST['password']);

check_inject();

$query = mssql_query("Select memb___id,OnlineHours,ConnectTM,DisConnectTM from MEMB_STAT where memb___id='$account'");
$row = mssql_fetch_row($query);

$querypass = mssql_query("Select memb___id,memb__pwd,memb_name,bloc_code,vip From MEMB_INFO where memb___id='$account' and memb__pwd='$password'");
$char = mssql_fetch_row($querypass);


$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'");
$onlinecheck = mssql_num_rows($queryonline);


if($account != $char[0] || $password != $char[1]) { echo"<font color='orange'>Your $char[0] Account or PASSWORD is not correct!</font><br>"; $error=1; }
else
{
if($error != 1) {

$onhourss = $char[3];

$creditshourss = $row[1] * 5;


if($row[1] <= 0) { echo"<font color='orange'>Account <font color=green>$account</font> must have<font color=green> minimum 1 Online hour in game</font> !</font></font><br>"; $error=2;}
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online !<br></font><font color=orange> Please LogOff First!</font><br>"; $error=2;}



else
{
if($error != 2)
{
echo"<font color='green'>All the hours spent in game were removed and you earned <font color=orange>$creditshourss </font> <font color=green>credits !</font><br>";
$a = mssql_query("UPDATE MEMB_STAT SET OnlineHours = '0' WHERE memb___id='$account'");
$b = mssql_query("Update MEMB_CREDITS set credits = credits+$creditshourss WHERE memb___id='$account'");

}
}

}
}
}
 
  • Like
Reactions: Taevas
Script exchange hours and now it's not <NULL> but script don't reset hours to 0, script add 1-2 hours after exchanging and I can exchange again.

PHP:
<?php
function online_hours() 
{ 
global $resethours; 
$character = secure($_POST['character']); 
$account = secure($_POST['login']); 
$password = secure($_POST['password']); 
check_inject(); 
$query = mssql_query("Select memb___id,OnlineHours,ConnectTM,DisConnectTM from MEMB_STAT where memb___id='$account'"); 
$row = mssql_fetch_row($query); 
$querypass = mssql_query("Select memb___id,memb__pwd,memb_name,bloc_code,vip From MEMB_INFO where memb___id='$account' and memb__pwd='$password'"); 
$char = mssql_fetch_row($querypass); 
$queryonline = mssql_query("Select * from MEMB_STAT where memb___id='$account' and connectstat='1'"); 
$onlinecheck = mssql_num_rows($queryonline); 
if($account != $char[0] || $password != $char[1]) { echo"<font color='orange'>Your $char[0] Account or PASSWORD is not correct!</font><br>"; } 
else 
{ 
$onhourss = $char[3]; 
$creditshourss = $row[1] * 5; 
if($row[1] <= 0) { echo"<font color='orange'>Account <font color=green>$account</font> must have<font color=green> minimum 1 Online hour in game</font> !</font></font><br>"; $error=1;} 
if($onlinecheck >= 1) { echo"<font color='red'>Account $account is online !<br></font><font color=orange> Please LogOff First!</font><br>"; $error=1;} 
if($error != 1) {
echo"<font color='green'>All the hours spent in game were removed and you earned <font color=orange>$creditshourss </font> <font color=green>credits !</font><br>"; 
$a = mssql_query("UPDATE MEMB_STAT SET OnlineHours = '0' WHERE memb___id='$account'"); 
$b = mssql_query("Update MEMB_CREDITS set credits = credits+$creditshourss WHERE memb___id='$account'"); 
 }

} 
} 
?>
 
Change this query $a = mssql_query("UPDATE MEMB_STAT SET OnlineHours = '0' WHERE memb___id='$account'"); with the following - $a = mssql_query("UPDATE MEMB_STAT SET OnlineHours=0 WHERE memb___id='$account'") or die(mssql_get_last_message());
 
Last edited:
  • Like
Reactions: Taevas
Again problem :D
After first exchanging it's okay, but after Im online 1 hour ingame, I have again this problem.

Script exchange hours and now it's not <NULL> but script don't reset hours to 0, script add 1-2 hours after exchanging and I can exchange again.