Lootboxes

Status
Not open for further replies.
Socius Decennalis
Decennium
Joined
Apr 29, 2013
Messages
68
Reaction score
1
Highly doubting this but does anyone have a flag_pole_01.sco that will fix lootboxes?

Code:
LootBox: !!!! m_LootBoxID 301130 does NOT have items inside
000026.252| !!! OnCreate failed for obj=obj_ItemSpawnPoint, filename=data/objectsdepot/capture_points/flag_pole_01.sco
I do have this .sco there

Edit: I'm using the ragezone community source that DNC had and is developing.
 
Last edited:
@Hycker Did the code you mentioned work?

Code:
<?php
$server = 'localhost';
$link = mssql_connect($server, 'sa', 'sapassword');
if (!$link) {
    die('noob');
}
?>
 
Upvote 0
yes its works. i just tried to troubleshoot whats tha wrong. means my php+iis config is proper
and my php knowledge not enough to fix the php files. debugging with echo is.....
the full code which is comes with DNC's release is

dbinfo.inc.php
Code:
<?php
	$db_apikey = "ACOR4823G%sjYU*@476xnDvYaK@!56";
	function db_connect()
	{
		$db_user   = "wz_api_user";
		$db_pass   = "g54vxca5Ez";
		$db_dbname = "WarZ";

		$db_serverName     = "localhost";
		$db_connectionInfo = array(
			"UID" => $db_user,
			"PWD" => $db_pass,
			"Database" => $db_dbname,
			"CharacterSet" => "UTF-8"
			//"ReturnDatesAsStrings" => true
			);
		$conn = sqlsrv_connect($db_serverName, $db_connectionInfo);

		if(! $conn)
		{
			//echo "Connection could not be established.\n";
			die( print_r( sqlsrv_errors(), true));
			exit();
		}

		return $conn;
	}
	
	function db_exec($conn, $tsql, $params)
	{
		$stmt  = sqlsrv_query($conn, $tsql, $params);
		if(! $stmt)
		{
			echo "exec failed.\n";
			die( print_r( sqlsrv_errors(), true));
		}

		$member = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC);
		return $member;
	}

	$conn = db_connect();
?>

php error somewhere from
Code:
	function db_exec($conn, $tsql, $params)
 
Upvote 0
Test this code:
Code:
<?php
$db_serverName     = "localhost";
$db_connectionInfo = array(
 "UID" => "wz_api_user",
 "PWD" => "g54vxca5Ez",
 "Database" => "WarZ"
 );
$link = sqlsrv_connect($db_serverName, $db_connectionInfo);
if (!$link) {
    die('noob');
}
?>
Tell me if it worked.

EDIT: I don't think db_exec function is ever called in the whole api.
 
Last edited:
Upvote 0
its works. means blank result, so connected to database
EDIT: I don't think db_exec function is ever called in the whole api.

if you have DNC's rls check tha dbinfo.inc.php
 
Last edited:
Upvote 0
result:
chrome result:
Code:
Server error
The website encountered an error while retrieving http://localhost/api/php/api_GetLootBoxConfig.php?serverkey=9F179EB9-C74E-4933-85B5-EB135E16F5EF. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

dont think me noob, i changed the masterserver.cfg to: webAPIDomainBaseURL = /api/

edit: result in firefox:
Code:
XML parsing error: no element
http://localhost/api/php/api_GetLootBoxConfig.php?serverkey=9F179EB9-C74E-4933-85B5-EB135E16F5EF
1. row, 1. column:
^
 
Last edited:
Upvote 0
dbinfo.inc.php seems to be working fine, but the queries made to the database seem to be failing.
Create a new php file with this code:
Code:
<?php
 require_once('dbinfo.inc.php');
 $tsql   = "select * from Items_Generic where Category=7";
 $params = array();
 $stmt   = sqlsrv_query($conn, $tsql, $params);
 if(! $stmt)
 {
  echo "exec failed.\n";
  die( print_r( sqlsrv_errors(), true));
 }
?>
Then access it and tell me the results.
 
Upvote 0
thats lol. in firefox i'll getting blank result, in chrome:
Code:
Server error
The website encountered an error while retrieving http://localhost/api/php/lofasz.php. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
 
Upvote 0
I don't know why Chrome is getting error 500, it's working in Firefox.
Change the code in lofasz.php to this:
Code:
<?php
 require_once('dbinfo.inc.php');
 $tsql   = "select * from Items_Generic where Category=7";
 $params = array();
 $stmt   = sqlsrv_query($conn, $tsql, $params);
 if(! $stmt)
 {
  echo "exec failed.\n";
  die( print_r( sqlsrv_errors(), true));
 }
 while($member = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC))
 {
  $itemid=$member['ItemID'];

  $tsql2   = "select * from Items_LootData where LootID=$itemid order by Chance asc";
  $params2 = array();
  $stmt2   = sqlsrv_query($conn, $tsql2, $params2);
  if(! $stmt2)
  {
   echo "exec failed.\n";
   die( print_r( sqlsrv_errors(), true));
  }
 }
 exit();
?>

EDIT: Changed the code.
 
Upvote 0
and the same result....
anyway im up since 28h or idk yet, so i gtg sleep before i hit the keyboard with my head. my full php folder zipped if any1 enough pervert to find whats tha wrong with it. i would press a big fucking like for any usefull info
View attachment php.zip
 
Upvote 0
Your phps seem to be in order. But it seems that the phps can't connect to your database correctly.
Maybe there's something wrong with you PHP drivers for SQL. Let us know which version of the driver did you install.
 
Upvote 0
Status
Not open for further replies.
Back