Main Site | Forum | Rules | Downloads | Wiki | Features | Podcast

NLSC Forum

Talk about NBA Live 07 here.
Post a reply

Save stats patch available

Thu Oct 05, 2006 6:14 am

Hi all ;)

I'm the admin from a Spanish NBA league, and I have made a Save stats patch for NBA Live 07.

http://img182.imageshack.us/img182/4299 ... 012cz4.png
http://img524.imageshack.us/my.php?imag ... 014iy4.png

You can download it here (NLSC Downloads section):

NBA Live Series Center Downloads :: Save Stats Patch

Best Regards from Spain :D
Last edited by chuzo on Sat Dec 09, 2006 5:17 am, edited 3 times in total.

Thu Oct 05, 2006 6:16 am

You are a real CRACK man, i am honored of being a player of your league.

Regards!!!

PD: This post should be sticky!!!!!
Last edited by SHaRiN on Thu Oct 05, 2006 6:18 am, edited 1 time in total.

Thu Oct 05, 2006 6:18 am

Thanks man, for the patch.
I do appreciate it and do owe you a big favor.

Thu Oct 05, 2006 7:08 am

I notice a problem.

If you can possibly re-relase a patch that does NOT save Secondary Posistions it works fine.

Otherwise every game people save they will have to delete 12-15 rows of one column which will mostl ikely end up as cheating.

And i tried to fix the Database to just read this, but I'm dumb and cant figure it out. So....get back to me on this ;)

Thu Oct 05, 2006 7:12 am

djmakaveli wrote:Otherwise every game people save they will have to delete 12-15.


Why? :?: I think you could simply ignore this characters in your php (or another language) script.

Thu Oct 05, 2006 8:00 am

why when I try to instal,at the end it says

"the proccess cannot access the file because it is being used by another proccess." that refering to importar.bat and also the same happens with del.bat

Thu Oct 05, 2006 8:29 am

NBA must be closed when installing patch, it's your case?

Thu Oct 05, 2006 9:04 am

yep, it is closed chuzo.

Thu Oct 05, 2006 9:11 am

Ummm ... sure that main.viv and screens.viv files have write permission. You could find this files in the fe folder, inside NBA installation folder.

Anyone else having this trouble?

Thu Oct 05, 2006 9:13 am

Can you pls explain me how this patch works? i never experienced a stats problem...

Thu Oct 05, 2006 9:16 am

wtf? these screen isnt from nba 06? o_O

Thu Oct 05, 2006 9:30 am

me 2 same problem its just saving 2 Positions and the names dats it :S

Thu Oct 05, 2006 9:36 am

yah only saving 2 positions and names.

Thu Oct 05, 2006 9:41 am

worked now...
he saves after the start of 2nd quarter guys... try again

Thu Oct 05, 2006 12:35 pm

chuzo wrote:
djmakaveli wrote:Otherwise every game people save they will have to delete 12-15.


Why? :?: I think you could simply ignore this characters in your php (or another language) script.


How would i do this? heres the script
Code:
<?
 $fp = fopen("$form_data1", "r");
$flatfile = fread($fp, filesize("$form_data1"));
fclose($fp);
$spaces = str_repeat('          ', 10);
$new_str = str_replace('/', $spaces, $flatfile);
$new_str1 = str_replace('-', '.000', $new_str);
$fp = fopen("$form_data1", "w+");
fwrite($fp, $new_str1);
fclose($fp);
?>
<?
 $fp = fopen("$form_data2", "r");
$flatfile = fread($fp, filesize("$form_data2"));
fclose($fp);
$spaces = str_repeat('          ', 10);
$new_str = str_replace('/', $spaces, $flatfile);
$new_str1 = str_replace('-', '.000', $new_str);
$fp = fopen("$form_data2", "w+");
fwrite($fp, $new_str1);
fclose($fp);
?>
<?
require('connect.php');
require('setting.php');

$season_id=1;
$league_id=1;

mysql_select_db("True2006",$db);
$insertSQL ="INSERT INTO boxscore (season_id, id, team, score, opponent, score1) VALUES ('$season_id', '$game', '$team1', '$score', '$team2','$score1')";
$Result1 = mysql_query($insertSQL, $db) or die(mysql_error());
$query_game = "SELECT id FROM boxscore ORDER BY id DESC LIMIT 1";
$game = mysql_query($query_game, $db) or die(mysql_error());
$row_game = mysql_fetch_assoc($game);
$totalRows_game = mysql_num_rows($game);
$game=$row_game['id'] ;
$team1=$_POST['team1'];
$team2=$_POST['team2'];
$score=$_POST['score'];
$score1=$_POST['score1'];

$query_dw = "SELECT * FROM team WHERE team_name='$team1'";
$dw = mysql_query($query_dw, $db) or die(mysql_error());
$row_dw = mysql_fetch_assoc($dw);
$totalRows_dw = mysql_num_rows($dw);
$query_da = "SELECT * FROM team WHERE team_name='$team2'";
$da = mysql_query($query_da, $db) or die(mysql_error());
$row_da = mysql_fetch_assoc($da);
$totalRows_da = mysql_num_rows($da);

echo $row_dw['Division'];

echo $row_da['Division'];

$division1=$row_dw['Division'];
$division2=$row_da['Division'];
//assuming $points1 are points of $teams[0]['team_id']
if ($score > $score1)  //team1 won
{   
  mysql_query("UPDATE team SET dw=dw+1 WHERE team_name='$team1' AND Division='$division2'");
  mysql_query("UPDATE team SET dl=dl+1 WHERE team_name='$team2' AND Division='$division1'");   
}   
else //team2 won
{   
  mysql_query("UPDATE team SET dw=dw+1 WHERE team_name='$team2' AND Division='$division1'");   
  mysql_query("UPDATE team SET dl=dl+1 WHERE team_name='$team1' AND Division='$division2'");   
}


//assuming $points1 are points of $teams[0]['team_id']
if ($score > $score1)  //team1 won
{   
  mysql_query("UPDATE team SET wins=wins+1 WHERE team_name='$team1'");
    mysql_query("UPDATE team SET aw=aw+1 WHERE team_name='$team1'");   
  mysql_query("UPDATE team SET losses=losses+1 WHERE team_name='$team2'");   
    mysql_query("UPDATE team SET hl=hl+1 WHERE team_name='$team2'");   
}   
else //team2 won
{   
  mysql_query("UPDATE team SET wins=wins+1 WHERE team_name='$team2'"); 
  mysql_query("UPDATE team SET hw=hw+1 WHERE team_name='$team2'"); 
  mysql_query("UPDATE team SET losses=losses+1 WHERE team_name='$team1'");   
  mysql_query("UPDATE team SET al=al+1 WHERE team_name='$team1'");
}
 
 $query_cw = "SELECT * FROM team WHERE team_name='$team1'";
$cw = mysql_query($query_cw, $db) or die(mysql_error());
$row_cw = mysql_fetch_assoc($cw);
$totalRows_cw = mysql_num_rows($cw);
$query_ca = "SELECT * FROM team WHERE team_name='$team2'";
$ca = mysql_query($query_ca, $db) or die(mysql_error());
$row_ca = mysql_fetch_assoc($ca);
$totalRows_ca = mysql_num_rows($ca);

echo $row_cw['Conference'];

echo $row_ca['Conference'];

$Conference1=$row_cw['Conference'];
$Conference2=$row_ca['Conference'];
//assuming $points1 are points of $teams[0]['team_id']
if ($score > $score1)  //team1 won
{   
  mysql_query("UPDATE team SET cw=cw+1 WHERE team_name='$team1' AND Conference='$Conference2'");
  mysql_query("UPDATE team SET cl=cl+1 WHERE team_name='$team2' AND Conference='$Conference1'");   
}   
else //team2 won
{   
  mysql_query("UPDATE team SET cw=cw+1 WHERE team_name='$team2' AND Conference='$Conference1'");   
  mysql_query("UPDATE team SET cl=cl+1 WHERE team_name='$team1' AND Conference='$Conference2'");   
}

?>
<?
 $fp = fopen("$form_data1", "r");
$flatfile = fread($fp, filesize("$form_data1"));
fclose($fp);

for ($i = 1; $i <= 10; $i++) {
  $flatfile = ereg_replace(" {3}", "  ", $flatfile);
}

$csv = ereg_replace(" {2}", ", ", $flatfile);
$csv1 = str_replace(chr(10), chr(10)."$season_id,", $csv);
$csv2 = str_replace(chr(10), chr(10)."$league_id,", $csv1);
$temp1 = str_replace(chr(10), chr(10)."$team2,", $csv2);
$temp = str_replace(chr(10), chr(10)."$team1,", $temp1);


$fp = fopen("$form_data1", "w+");
fwrite($fp, $temp);
fclose($fp);
 
$fp = fopen("$form_data1", "w+");   
fwrite($fp, $temp);   
fclose($fp);
$game_id_sql = "SELECT MAX(id) AS game_id FROM boxscore"; 
$game_result = mysql_query($game_id_sql); 
$game_row = mysql_fetch_assoc($game_result); 
$game_id = ",$game";
 
$data2 = file("$form_data1"); 
for($i=0;$i<count($data2);$i++) 

     $data2[$i] = "$game_id, " . $data2[$i]; 

$data2 = implode('\n\r', $data2); 
$fp = fopen("$form_data1", "w+");   
fwrite($fp, $data2);   
fclose($fp);     
$fp = fopen("$form_data1", "rb");
$csvdata = fread($fp, filesize("$form_data1"));
fclose($fp);
$lines = explode('\n\r',$csvdata);
unset($lines[count($lines)-1]);
for($i=5;$i<count($lines);$i++)
{
$separated[$i-5] = explode(',',$lines[$i]);
$sql = 'INSERT INTO stats VALUES(NULL';
for($x=1;$x<=27;$x++)
{
$sql .= ',"'.$separated[$i-5][$x].'"';
}
$sql .= ')';
echo $sql.'<br>';
$result = mysql_query($sql) or die(mysql_error());
}?>
<?
$fp = fopen("$form_data2", "r");
$flatfile = fread($fp, filesize("$form_data2"));
fclose($fp);

for ($i = 1; $i <= 10; $i++) {
  $flatfile = ereg_replace(" {3}", "  ", $flatfile);
}

$csv = ereg_replace(" {2}", ", ", $flatfile);
$csv1 = str_replace(chr(10), chr(10)."$season_id,", $csv);
$csv2 = str_replace(chr(10), chr(10)."$league_id,", $csv1);
$temp1 = str_replace(chr(10), chr(10)."$team1,", $csv2);
$temp = str_replace(chr(10), chr(10)."$team2,", $temp1);

$fp = fopen("$form_data2", "w+");
fwrite($fp, $temp);
fclose($fp);

$fp = fopen("$form_data2", "w+");   
fwrite($fp, $temp);   
fclose($fp);
$game_id_sql = "SELECT MAX(id) AS game_id FROM boxscore"; 
$game_result = mysql_query($game_id_sql); 
$game_row = mysql_fetch_assoc($game_result); 
$game_id = ",$game"; 
 
$data2 = file("$form_data2"); 
for($i=0;$i<count($data2);$i++) 

     $data2[$i] = "$game_id, " . $data2[$i]; 

$data2 = implode('\n\r', $data2); 
$fp = fopen("$form_data2", "w+");   
fwrite($fp, $data2);   
fclose($fp);     
$fp = fopen("$form_data2", "rb");
$csvdata = fread($fp, filesize("$form_data1"));
fclose($fp);
$lines = explode('\n\r',$csvdata);
unset($lines[count($lines)-1]);
for($i=5;$i<count($lines);$i++)
{
$separated[$i-5] = explode(',',$lines[$i]);
$sql = 'INSERT INTO stats VALUES(NULL';
for($x=1;$x<=27;$x++)
{
$sql .= ',"'.$separated[$i-5][$x].'"';
}
$sql .= ')';
echo $sql.'<br>';
$result = mysql_query($sql) or die(mysql_error());
}
   
mysql_query("UPDATE stats SET team = 'Atlanta' WHERE team = ' Atlanta'"); 
mysql_query("UPDATE stats SET team = 'Boston' WHERE team = ' Boston'");
mysql_query("UPDATE stats SET team = 'Cleveland' WHERE team = ' Cleveland'"); 
mysql_query("UPDATE stats SET team = 'Chicago' WHERE team = ' Chicago'"); 
mysql_query("UPDATE stats SET team = 'Dallas' WHERE team = ' Dallas'"); 
mysql_query("UPDATE stats SET team = 'Denver' WHERE team = ' Denver'"); 
mysql_query("UPDATE stats SET team = 'Detroit' WHERE team = ' Detroit'"); 
mysql_query("UPDATE stats SET team = 'Golden State' WHERE team = ' Golden State'"); 
mysql_query("UPDATE stats SET team = 'Houston' WHERE team = ' Houston'"); 
mysql_query("UPDATE stats SET team = 'Indiana' WHERE team = ' Indiana'"); 
mysql_query("UPDATE stats SET team = 'LA Clippers' WHERE team = ' LA Clippers'"); 
mysql_query("UPDATE stats SET team = 'LA Lakers' WHERE team = ' LA Lakers'"); 
mysql_query("UPDATE stats SET team = 'Memphis' WHERE team = ' Memphis'"); 
mysql_query("UPDATE stats SET team = 'Miami' WHERE team = ' Miami'"); 
mysql_query("UPDATE stats SET team = 'Milwaukee' WHERE team = ' Milwaukee'"); 
mysql_query("UPDATE stats SET team = 'Minnesota' WHERE team = ' Minnesota'");
mysql_query("UPDATE stats SET team = 'Philadelphia' WHERE team = ' Philadelphia'"); 
mysql_query("UPDATE stats SET team = 'New Jersey' WHERE team = ' New Jersey'"); 
mysql_query("UPDATE stats SET team = 'New York' WHERE team = ' New York'");
mysql_query("UPDATE stats SET team = 'New Orleans' WHERE team = ' New Orleans'");
mysql_query("UPDATE stats SET team = 'Sacramento' WHERE team = ' Sacramento'");
mysql_query("UPDATE stats SET team = 'San Antonio' WHERE team = ' San Antonio'");
mysql_query("UPDATE stats SET team = 'Seattle' WHERE team = ' Seattle'");
mysql_query("UPDATE stats SET team = 'Portland' WHERE team = ' Portland'");
mysql_query("UPDATE stats SET team = 'Phoenix' WHERE team = ' Phoenix'");   
mysql_query("UPDATE stats SET team = 'Utah' WHERE team = ' Utah'");   
mysql_query("UPDATE stats SET team = 'Toronto' WHERE team = ' Toronto'");   
mysql_query("UPDATE stats SET team = 'Charlotte' WHERE team = ' Charlotte'");   
mysql_query("UPDATE stats SET team = 'Washington' WHERE team = ' Washington'");   
mysql_query("UPDATE stats SET team = 'Orlando' WHERE team = ' Orlando'");   
mysql_query("UPDATE stats SET team = 'Toronto' WHERE team = ' Toronto'");   

mysql_query("DELETE FROM stats WHERE name=' ' "); 
mysql_query("DELETE FROM stats WHERE Minutes='0' ");
mysql_query('REPLACE INTO fullstats SELECT season_id, id, name,
SUM(points) AS Points,
SUM(Minutes) AS Minutes,
SUM(FGM) AS FGM,
SUM(FGA) AS FGA,
SUM(threepm) AS threepm,
SUM(threepa) AS threepa,
SUM(FTM) AS FTM,
SUM(FTA) AS FTA,
SUM(Orebounds) AS Orebounds,
SUM(Drebounds) AS Drebounds,
SUM(Orebounds)+SUM(Drebounds) AS Rebounds,
SUM(assist) AS Assist ,
SUM(block) AS block,
SUM(Steal) AS Steal,
SUM(Turnovers) AS turnovers,
SUM(Fouls) AS Fouls,
COUNT(name) AS gps
FROM stats WHERE minutes>=1 GROUP BY name ');
?>

<div align="center">
  <SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
window.location="http://www.truelegitballers.com/";
// End -->
</script>

Thu Oct 05, 2006 1:29 pm

This truely shows how sad EA is.

Some guy in Spain released a patch for NBA Live before EA did. :roll:

Thu Oct 05, 2006 2:04 pm

sweet, now all we need is a patch that fixes the subbing problems. :)

Thu Oct 05, 2006 2:31 pm

mucho gracios =)))
respect man , awasome job !

Thu Oct 05, 2006 2:43 pm

Btw Spasnish masta ....... could i request to you Shoot Control CPU online option patch ? , cause sometimes game lagging and hard to shoot in time :(

Thu Oct 05, 2006 6:30 pm

gmamustang wrote:these screen isnt from nba 06? o_O


Similar stats screen from 06, but 07 is the game ;)

I'm also working in adding save stats button in the new 07 boxscore style screen:

Image

but it isn't working 100% by now :?

Thu Oct 05, 2006 7:19 pm

Num33Baller wrote:This truely shows how sad EA is.

Some guy in Spain released a patch for NBA Live before EA did. :roll:


chuzo > EA

:applaud:

Thu Oct 05, 2006 7:22 pm

gracias tio

Thu Oct 05, 2006 10:04 pm

CHUZO > ea :roll:

thx Chuzo :!: :wink:

Fri Oct 06, 2006 2:59 am

Thanks man !!

Espero que tambien tengas el parche para las substituciones :mrgreen:

Btw , very nice work (Y)

Fri Oct 06, 2006 3:15 am

I SALUTE YOU! :D
Post a reply