Private Hive Tools [PHP]

Lovely tool, thanks. Forgive me if wrong, but I think it needs updating for use with Epoch 1.0.1.3 as new elements of the traders data doesn't show up completely.
 
the tool is awwsome, can I give some suggestions?

* survivor creation date (this is good to catch hackers)
* hive cleaning:
delete deployables with options.[tank traps] [sand bag] [wire sh1t] etc
delete tents no use in x days. something like that.

dunno if there a way to list current survivors online to fast check inventory?
 
no connection to DB or not enough RIGHTS.

When i push "Test", and i enter correct DB information and instalation was sucessful done
 
no connection to DB or not enough RIGHTS.

When i push "Test", and i enter correct DB information and instalation was sucessful done

im getting the same error "no connection to DB or note enough rights.

i've created a separate DB for the tools created a new user - given it elevated rights- i can connect to the DB via HiediSQL.

any ideas
cheers
A
 
im getting the same error "no connection to DB or note enough rights.

i've created a separate DB for the tools created a new user - given it elevated rights- i can connect to the DB via HiediSQL.

any ideas
cheers
A

Ignore the test... I was never able to get that to work on mine either. Fill out all info and install... you can edit the config directly or in "settings" later if you still have issue.

Many thanks nightmare.... this makes life much easier.
 
Ignore the test... I was never able to get that to work on mine either. Fill out all info and install... you can edit the config directly or in "settings" later if you still have issue.

Many thanks nightmare.... this makes life much easier.


i've tried ignoring the test and it does indeed install the tables into the DB but when i go the the web pages there is no survivor/object information, its like its not looking a the day_epoch DB.

On a side note i can get the survivor stats web pages working and showing player information
 
when I hit the install.php page I get a 403 access denied to this resource.

I have PHP installed on my webhost and I even tried to set the permissions on all the files to 757 or 777.

I'm lost :(
 
when I hit the install.php page I get a 403 access denied to this resource.

I have PHP installed on my webhost and I even tried to set the permissions on all the files to 757 or 777.

I'm lost :(

Not sure if it will help cen but I did this -
1. created a subomain
2. put all contents of hive tools into subdomain folder
3. www.hivetool.mysite.com/install.php (info filled out but test not working)
4. locked/added users to my subdomain
5. deleted install.php
6. profit
 
I had it working fine, now the page just won't load. Fresh installation works fine, once the install is complete, blank page again.
 
I tried this on a completely different server, same result. Sometimes it works after waiting a minute or two, sometimes it doesn't. I think the php script is taking to long and timing out.
 
Maybe this script help you!
$rows = explode("\n",$missionfile);
array_shift($rows);
$vehiclecount =0;
$IDQuery = "SELECT id
FROM world_vehicle;";
$resultIDQuery = mysql_query($IDQuery);
while ($row = mysql_fetch_array($resultIDQuery, MYSQL_NUM))
$userDataIDs[] = $row[0];
$id = max($userDataIDs)+1;


for($i=0;$i<count($rows);$i++)
{
$direction = 0;
if (strpos($rows[$i],'_this = createVehicle [') !== false)
{
$strings = explode("\"",$rows[$i]);
$firstOpenBracket = strpos($rows[$i], "[");
$secondOpenBracket = strpos($rows[$i], "[", $firstOpenBracket + strlen("]"));
$firstCloseBracket = strpos($rows[$i], "]");

if (strpos($rows[$i+2],'_this setDir') !== false)
{
$firstSpace = strpos($rows[$i+2]," ");
$secondSpace = strpos($rows[$i+2]," ",$firstSpace+strlen(" "));
$thirdSpace = strpos($rows[$i+2]," ",$secondSpace+strlen(" "));
$forthSpace = strpos($rows[$i+2]," ",$thirdSpace+strlen(" "));
$period = strpos($rows[$i+2],".");
$direction = substr($rows[$i+2],$forthSpace+1, $period-$forthSpace-1);
}

$pos = "[$direction," . substr($rows[$i],$secondOpenBracket, $firstCloseBracket-$secondOpenBracket+1) . "]";
$pos = str_replace(array(' '), '',$pos);
$newPos = explode(",",$pos);
if (count($newPos) == 3)
{
$pos = "[$direction," . substr($rows[$i],$secondOpenBracket, $firstCloseBracket-$secondOpenBracket) . ",0]]";
$pos = str_replace(array(' '), '',$pos);
}

//Class Check (Will insert a new classname if it doesnt exist)
$checkClassNameQuery = "SELECT *
FROM vehicle;";
$resultClassNameQuery = mysql_query($checkClassNameQuery);
$userDataClassNameQuery;
$userDataVehicleIDs;
while ($row = mysql_fetch_array($resultClassNameQuery, MYSQL_ASSOC))
$userDataClassNameQuery[] = $row['class_name'];

$matchFound = 0;
for($j=0;$j<count($userDataClassNameQuery)-1;$j++)
{
if ($strings[1] == $userDataClassNameQuery[$j])
{
$matchFound = 1;
}
}
$checkClassNameIDQuery = "SELECT id
FROM vehicle;";
$resultClassNameIDQuery = mysql_query($checkClassNameIDQuery);
while ($row = mysql_fetch_array($resultClassNameIDQuery, MYSQL_NUM))
$userDataVehicleIDs[] = $row[0];
$classCount = max($userDataVehicleIDs) + 1;
if($matchFound == 0)
{
echo "Inserting new Class Name, " . $strings[1] . ", at index, " . $classCount;?><br><?php
$insertClassQuery = "INSERT INTO `vehicle` (`id`, `class_name`, `damage_min`, `damage_max`, `fuel_min`, `fuel_max`, `limit_min`, `limit_max`)
VALUES ('$classCount', '$strings[1]', '0.100', '0.700', '0.200', '0.800', '0', '10');";
$resultInsertClassQuery = mysql_query($insertClassQuery);
}
//Class Check End


$getIDQuery = "SELECT *
FROM vehicle
WHERE class_name = '$strings[1]';";
$resultIDQuery = mysql_query($getIDQuery);
$userDataIDQuery = mysql_fetch_array($resultIDQuery, MYSQL_ASSOC);
$vehicle_id = $userDataIDQuery['id'];

$insertQuery = "INSERT INTO `world_vehicle` (`id`, `vehicle_id`, `world_id`, `worldspace`, `chance`)
VALUES ('$id', '$vehicle_id', '$worldID', '$pos', '$chance');";
$resultInsertQuery = mysql_query($insertQuery);
$vehiclecount++;
$id++;
And this,
if (strpos($pos,'_this = createVehicle') == true){
$pos=str_replace('_this = createVehicle','',$pos);
$pos=str_replace('CAN_COLLIDE','',$pos);
$pos=str_replace(';','',$pos);
$pos=json_decode($pos);
$WORLDSPACE='[0,['.$pos[1][0].','.$pos[1][1].','.$pos[1][2].']]';
$CLASSNAME=$pos[0];

if ($_POST['submit']=='vehicle'){
insert_vehicle($CLASSNAME,$WORLDSPACE);
}
if ($_POST['submit']=='deploy'){
insert_deploy($CLASSNAME,$WORLDSPACE);
}

}
Direction is important parametr, please fix your panel. Sorry for my bad english!
 
Yeah, i create new script with fixes, please add it to your build
<?php
defined('PRIVATEHIVETOOLS') or die('no direct access');
function missionParser($mission){
global $_POST;
$rows = explode("\n",$mission);
array_shift($rows);
for($i=0;$i<count($rows);$i++)
{
$direction = 0;
if (strpos($rows[$i],'_this = createVehicle [') !== false)
{
$strings = explode("\"",$rows[$i]);
$firstOpenBracket = strpos($rows[$i], "[");
$secondOpenBracket = strpos($rows[$i], "[", $firstOpenBracket + strlen("]"));
$firstCloseBracket = strpos($rows[$i], "]");

if (strpos($rows[$i+2],'_this setDir') !== false)
{
$firstSpace = strpos($rows[$i+2]," ");
$secondSpace = strpos($rows[$i+2]," ",$firstSpace+strlen(" "));
$thirdSpace = strpos($rows[$i+2]," ",$secondSpace+strlen(" "));
$forthSpace = strpos($rows[$i+2]," ",$thirdSpace+strlen(" "));
$period = strpos($rows[$i+2],";");
$direction = substr($rows[$i+2],$forthSpace+1, $period-$forthSpace-1);
}

$pos = "[$direction," . substr($rows[$i],$secondOpenBracket, $firstCloseBracket-$secondOpenBracket+1) . "]";
$pos = str_replace(array(' '), '',$pos);
$newPos = explode(",",$pos);
if (count($newPos) == 3)
{
$pos = "[$direction," . substr($rows[$i],$secondOpenBracket, $firstCloseBracket-$secondOpenBracket) . ",0]]";
$pos = str_replace(array(' '), '',$pos);
}
$userDataClassNameQuery[] = $row['class_name'];
$matchFound = 0;
for($j=0;$j<count($userDataClassNameQuery)-1;$j++)
{
if ($strings[1] == $userDataClassNameQuery[$j])
{
$matchFound = 1;
}
}
$id++;
$CLASSNAME = $strings[1];
$WORLDSPACE = $pos;
if ($_POST['submit']=='vehicle'){
insert_vehicle($CLASSNAME,$WORLDSPACE);
}
if ($_POST['submit']=='deploy'){
insert_deploy($CLASSNAME,$WORLDSPACE);
}
}
}
}
function insert_deploy($CLASSNAME,$WORLDSPACE) {
global $db,$INSTANCE,$WORLD_ID;

$TIME = date("Y-m-d G:i:s", time());
$ID = generateID(5);
$unique_id = generateID(30);
$vehicle = $db->query("SELECT `id` FROM `building` WHERE `class_name` = '".secure($CLASSNAME)."' ");
if(mysqli_num_rows($vehicle) == false) {
$db->query("INSERT INTO `building` SET `id` = '".secure($ID)."', `class_name` = '".secure($CLASSNAME)."' ");
}else{
$v = mysqli_fetch_assoc($vehicle);
$ID = $v['id'];
}


$db->query("INSERT INTO `instance_building` SET
`building_id` = '".secure($ID)."',
`instance_id` = '".secure($INSTANCE)."',
`worldspace` = '".secure($WORLDSPACE)."',
`created` = '".$TIME."'
");
return true;
}
function insert_vehicle($CLASSNAME,$WORLDSPACE) {
global $db,$INSTANCE,$WORLD_ID;


$TIME = date("Y-m-d G:i:s", time());
$ID = generateID(4);

$vehicle = $db->query("SELECT `id` FROM `vehicle` WHERE `class_name` = '".secure($CLASSNAME)."' ");
if(mysqli_num_rows($vehicle) == false) {
$db->query("INSERT INTO `vehicle` SET `id` = '".$ID."', `class_name` = '".secure($CLASSNAME)."' ");
}else{
$v = mysqli_fetch_assoc($vehicle);
$ID = $v['id'];
}

$world_vehicle = $db->query("SELECT `id` FROM `world_vehicle` WHERE `vehicle_id` = '".secure($ID)."' ");
if(mysqli_num_rows($world_vehicle) == false) {
$db->query("INSERT INTO `world_vehicle` SET `id` = '".secure($ID)."', `vehicle_id` = '".secure($ID)."', `world_id` = '".secure($WORLD_ID)."' ");
}else{
$wv = mysqli_fetch_assoc($world_vehicle);
$ID = $wv['id'];
}


$db->query("INSERT INTO `instance_vehicle` SET
`world_vehicle_id` = '".$ID."',
`instance_id` = '".secure($INSTANCE)."',
`worldspace` = '".secure($WORLDSPACE)."',
`inventory` = '[]',
`parts` = '[]',
`fuel` = '1',
`damage` = '0',
`last_updated` = '".$TIME."',
`created` = '".$TIME."'
");
return true;

}
?>
 
Yeah, i create new script with fixes, please add it to your build
<?php
defined('PRIVATEHIVETOOLS') or die('no direct access');
function missionParser($mission){
global $_POST;
$rows = explode("\n",$mission);
array_shift($rows);
for($i=0;$i<count($rows);$i++)
{
$direction = 0;
if (strpos($rows[$i],'_this = createVehicle [') !== false)
{
$strings = explode("\"",$rows[$i]);
$firstOpenBracket = strpos($rows[$i], "[");
$secondOpenBracket = strpos($rows[$i], "[", $firstOpenBracket + strlen("]"));
$firstCloseBracket = strpos($rows[$i], "]");

if (strpos($rows[$i+2],'_this setDir') !== false)
{
$firstSpace = strpos($rows[$i+2]," ");
$secondSpace = strpos($rows[$i+2]," ",$firstSpace+strlen(" "));
$thirdSpace = strpos($rows[$i+2]," ",$secondSpace+strlen(" "));
$forthSpace = strpos($rows[$i+2]," ",$thirdSpace+strlen(" "));
$period = strpos($rows[$i+2],";");
$direction = substr($rows[$i+2],$forthSpace+1, $period-$forthSpace-1);
}

$pos = "[$direction," . substr($rows[$i],$secondOpenBracket, $firstCloseBracket-$secondOpenBracket+1) . "]";
$pos = str_replace(array(' '), '',$pos);
$newPos = explode(",",$pos);
if (count($newPos) == 3)
{
$pos = "[$direction," . substr($rows[$i],$secondOpenBracket, $firstCloseBracket-$secondOpenBracket) . ",0]]";
$pos = str_replace(array(' '), '',$pos);
}
$userDataClassNameQuery[] = $row['class_name'];
$matchFound = 0;
for($j=0;$j<count($userDataClassNameQuery)-1;$j++)
{
if ($strings[1] == $userDataClassNameQuery[$j])
{
$matchFound = 1;
}
}
$id++;
$CLASSNAME = $strings[1];
$WORLDSPACE = $pos;
if ($_POST['submit']=='vehicle'){
insert_vehicle($CLASSNAME,$WORLDSPACE);
}
if ($_POST['submit']=='deploy'){
insert_deploy($CLASSNAME,$WORLDSPACE);
}
}
}
}
function insert_deploy($CLASSNAME,$WORLDSPACE) {
global $db,$INSTANCE,$WORLD_ID;

$TIME = date("Y-m-d G:i:s", time());
$ID = generateID(5);
$unique_id = generateID(30);
$vehicle = $db->query("SELECT `id` FROM `building` WHERE `class_name` = '".secure($CLASSNAME)."' ");
if(mysqli_num_rows($vehicle) == false) {
$db->query("INSERT INTO `building` SET `id` = '".secure($ID)."', `class_name` = '".secure($CLASSNAME)."' ");
}else{
$v = mysqli_fetch_assoc($vehicle);
$ID = $v['id'];
}


$db->query("INSERT INTO `instance_building` SET
`building_id` = '".secure($ID)."',
`instance_id` = '".secure($INSTANCE)."',
`worldspace` = '".secure($WORLDSPACE)."',
`created` = '".$TIME."'
");
return true;
}
function insert_vehicle($CLASSNAME,$WORLDSPACE) {
global $db,$INSTANCE,$WORLD_ID;


$TIME = date("Y-m-d G:i:s", time());
$ID = generateID(4);

$vehicle = $db->query("SELECT `id` FROM `vehicle` WHERE `class_name` = '".secure($CLASSNAME)."' ");
if(mysqli_num_rows($vehicle) == false) {
$db->query("INSERT INTO `vehicle` SET `id` = '".$ID."', `class_name` = '".secure($CLASSNAME)."' ");
}else{
$v = mysqli_fetch_assoc($vehicle);
$ID = $v['id'];
}

$world_vehicle = $db->query("SELECT `id` FROM `world_vehicle` WHERE `vehicle_id` = '".secure($ID)."' ");
if(mysqli_num_rows($world_vehicle) == false) {
$db->query("INSERT INTO `world_vehicle` SET `id` = '".secure($ID)."', `vehicle_id` = '".secure($ID)."', `world_id` = '".secure($WORLD_ID)."' ");
}else{
$wv = mysqli_fetch_assoc($world_vehicle);
$ID = $wv['id'];
}


$db->query("INSERT INTO `instance_vehicle` SET
`world_vehicle_id` = '".$ID."',
`instance_id` = '".secure($INSTANCE)."',
`worldspace` = '".secure($WORLDSPACE)."',
`inventory` = '[]',
`parts` = '[]',
`fuel` = '1',
`damage` = '0',
`last_updated` = '".$TIME."',
`created` = '".$TIME."'
");
return true;

}
?>
This script set correctly direction and Z coordinate when you use 3D SQF Mission Parser!

\include\function\reality\mission_parser.func.php
 
Back
Top