21 Commits

Author SHA1 Message Date
VladMordock
8e28b5b735 Merge pull request #47 from szporwolik/dev
v0.11.0-hotfix
2020-11-06 22:57:03 +01:00
szporowolik
b07ec7b9c3 v0.11.0-hotfix 2020-11-06 22:53:18 +01:00
VladMordock
d591da2c43 Merge pull request #46 from szporwolik/dev
v0.11.0
2020-11-06 17:21:33 +01:00
szporowolik
174bb1e2ef v0.11.1 config 2020-11-06 17:13:52 +01:00
szporowolik
a4ce9ed254 Update for v0.11.0 2020-11-06 17:08:32 +01:00
szporowolik
ff268a47e4 Fixes for: #43 , #44, #45 2020-11-06 16:59:25 +01:00
szporowolik
37fd76c8ae Config for 0.11.0 2020-09-16 01:17:29 +02:00
szporowolik
167f3e9021 Added status tables:
- pe_OnlinePlayers
- pe_OnlineStatus
2020-09-16 01:01:42 +02:00
szporowolik
4723702d28 0.10.2 config prepared 2020-09-15 23:23:30 +02:00
VladMordock
f6d1ec82d5 Merge pull request #41 from szporwolik/master
Merge master with Dev
2020-09-15 23:21:46 +02:00
VladMordock
fd6b0a65ab Added donation link 2020-09-15 00:58:09 +02:00
VladMordock
78310771c3 Merge pull request #40 from szporwolik/dev
0.10.1
2020-09-15 00:45:41 +02:00
szporowolik
18b6d8b0ce Build for 0.10.1 2020-09-15 00:38:53 +02:00
szporowolik
dcb9510802 DB update for 0.10.1 2020-09-15 00:25:27 +02:00
szporowolik
d35ceafab2 Final build for 0.10.1 2020-09-15 00:24:36 +02:00
VladMordock
84e1d97c8e Changed autostart to 500ms 2020-09-15 00:20:24 +02:00
szporowolik
9f22b0e4df Fixed #38 - Scuds shall be counted now 2020-09-15 00:09:38 +02:00
VladMordock
699787c00e Commend line parameter for autostart 2020-09-15 00:01:20 +02:00
szporowolik
403b3df59a - Prepared for 0.10.1 build
- Added autostart parameter
2020-09-14 23:59:20 +02:00
VladMordock
c2fa89e364 Updated ReadMe as per #37
Updated ReadMe as per #37
2020-09-14 23:27:06 +02:00
Szymon Porwolik
5b96f2387e Added PHP integration example
Added PHP integration example per #37
2020-09-14 23:24:01 +02:00
10 changed files with 325 additions and 26 deletions

View File

@@ -22,7 +22,7 @@ Perun.MOTD_L2 = "Wymagamy obecnosci DCS SRS oraz TeamSpeak - szczegoly na forum"
-- ###################### END OF SETTINGS - DO NOT MODIFY OUTSIDE THIS SECTION ######################
-- Variable init
Perun.Version = "v0.10.0"
Perun.Version = "v0.11.0"
Perun.StatusData = {}
Perun.SlotsData = {}
Perun.MissionData = {}
@@ -842,7 +842,7 @@ Perun.onGameEvent = function (eventName,arg1,arg2,arg3,arg4,arg5,arg6,arg7)
_temp_event_type="kill_Infantry"
elseif _temp_category == "Fortification" then
_temp_event_type="kill_Fortification"
elseif _temp_category == "Artillery" then
elseif _temp_category == "Artillery" or _temp_category == "MissilesSS" then
_temp_event_type="kill_Artillery"
else
_temp_event_type="kill_Other"

View File

@@ -93,6 +93,38 @@ public class DatabaseController
SQLQueryTxt += "UPDATE `pe_DataRaw` SET `pe_dataraw_payload` = @PAR_TCPFramePayload, `pe_dataraw_updated`=" + TCPFrameTimestamp + " WHERE `pe_dataraw_type`=" + TCPFrameType + " AND `pe_dataraw_instance` = " + TCPFrameInstance + ";";
}
// Handling of special data (like parsing JSONs to DB)
switch (Int32.Parse(TCPFrameType))
{
case 1:
// General status information
SQLQueryTxt += "INSERT INTO `pe_OnlineStatus` (`pe_OnlineStatus_instance`) SELECT '" + Int32.Parse(TCPFrameInstance) + "' FROM DUAL WHERE NOT EXISTS(SELECT * FROM `pe_OnlineStatus` WHERE `pe_OnlineStatus_instance` = '" + Int32.Parse(TCPFrameInstance) + "');";
SQLQueryTxt += "UPDATE `pe_OnlineStatus` SET `pe_OnlineStatus_perunversion_winapp` = '" + TCPFrame.payload.v_win + "', `pe_OnlineStatus_perunversion_dcshook` ='" + TCPFrame.payload.v_dcs_hook + "' WHERE `pe_OnlineStatus_instance` = '" + Int32.Parse(TCPFrameInstance) + "' ;";
break;
case 2:
// SRS Data
SQLQueryTxt += "DELETE FROM pe_OnlinePlayers WHERE pe_OnlinePlayers_instance = " + Int32.Parse(TCPFrameInstance) +";";
int player_count = 0;
foreach (var record_player in TCPFrame.payload.players)
{
SQLQueryTxt += "INSERT INTO `pe_OnlinePlayers` (`pe_OnlinePlayers_id`, `pe_OnlinePlayers_instance`, `pe_OnlinePlayers_ping`, `pe_OnlinePlayers_side`, `pe_OnlinePlayers_slot`, `pe_OnlinePlayers_ucid`) VALUES ("+ record_player.id + ", '"+ Int32.Parse(TCPFrameInstance) + "', '" + record_player.ping + "', '" + record_player.side + "', '" + record_player.slot + "', '" + record_player.ucid + "');";
player_count++;
}
//SQLQueryTxt += "DELETE FROM pe_OnlineStatus WHERE pe_OnlineStatus_instance = " + Int32.Parse(TCPFrameInstance) + ";";
SQLQueryTxt += "INSERT INTO `pe_OnlineStatus` (`pe_OnlineStatus_instance`) SELECT '" + Int32.Parse(TCPFrameInstance) + "' FROM DUAL WHERE NOT EXISTS(SELECT * FROM `pe_OnlineStatus` WHERE `pe_OnlineStatus_instance` = '" + Int32.Parse(TCPFrameInstance) + "');";
SQLQueryTxt += "UPDATE `pe_OnlineStatus` SET `pe_OnlineStatus_theatre` = '" + TCPFrame.payload.mission.theatre + "', `pe_OnlineStatus_name` = '" + TCPFrame.payload.mission.name + "' , `pe_OnlineStatus_pause` = '" + TCPFrame.payload.mission.pause + "', `pe_OnlineStatus_multiplayer` = '" + TCPFrame.payload.mission.multiplayer + "', `pe_OnlineStatus_realtime` = '" + TCPFrame.payload.mission.realtime + "', `pe_OnlineStatus_modeltime` = '" + TCPFrame.payload.mission.modeltime + "', `pe_OnlineStatus_players` = " + player_count + " WHERE `pe_OnlineStatus_instance` = '" + Int32.Parse(TCPFrameInstance) + "';";
break;
default:
break;
}
// Connect to mysql and execute sql
try
{

View File

@@ -77,6 +77,7 @@
this.con_img_dcs = new System.Windows.Forms.PictureBox();
this.con_img_db = new System.Windows.Forms.PictureBox();
this.con_Button_Add_Marker = new System.Windows.Forms.Button();
this.TIM_Autostart = new System.Windows.Forms.Timer(this.components);
this.con_GroupBox_1.SuspendLayout();
this.con_GroupBox_2.SuspendLayout();
this.con_GroupBox_3.SuspendLayout();
@@ -524,6 +525,10 @@
this.con_Button_Add_Marker.UseVisualStyleBackColor = true;
this.con_Button_Add_Marker.Click += new System.EventHandler(this.con_Button_Add_Marker_Click);
//
// TIM_Autostart
//
this.TIM_Autostart.Interval = 500;
//
// form_Main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -573,7 +578,10 @@
((System.ComponentModel.ISupportInitialize)(this.con_img_db)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
// TIM_Autostart
//
this.TIM_Autostart.Tick += new System.EventHandler(this.TIM_Autostart_Tick);
//
}
#endregion
@@ -625,6 +633,7 @@
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button con_Button_Add_Marker;
private System.Windows.Forms.Timer TIM_Autostart;
}
}

View File

@@ -36,36 +36,65 @@ namespace Perun_v1
{
// Get argument server port
if (args[1] != null)
{
if (args[1] != "-1")
{
con_txt_dcs_server_port.Text = args[1];
}
}
}
if (args.Length > 2)
{
// Get argument instance id
if (args[2] != null)
{
if (args[2] != "-1")
{
con_txt_dcs_instance.Text = args[2];
}
}
}
if (args.Length > 3)
{
// Get argument DCS SRS file path
if (args[3] != null)
{
if (args[3] != "-1")
{
con_txt_3rd_srs.Text = args[3];
con_check_3rd_srs.Checked = true;
}
}
}
if (args.Length > 4)
{
// Get argument lotATC file path
if (args[4] != null)
{
if (args[4] != "-1")
{
con_txt_3rd_lotatc.Text = args[4];
con_check_3rd_lotatc.Checked = true;
}
}
}
if (args.Length > 5)
{
// Get argument lotATC file path
if (args[5] != null)
{
if (args[5] == "1")
{
if (args[5] != "-1")
{
TIM_Autostart.Enabled = true;
PerunHelper.AddLog(ref Globals.AppLogHistory, "Autostart parameter provided", 0, 1);
}
}
}
}
// Initialize controls
con_img_db.Image = (Image)Properties.Resources.ResourceManager.GetObject("status_disconnected");
@@ -197,6 +226,7 @@ namespace Perun_v1
// Send initial data
Tim_MySQL_Tick(null, null);
tim_3rdparties_Tick(null, null);
TIM_Autostart.Enabled = false;
}
private void con_Button_Listen_OFF_Click(object sender, EventArgs e)
@@ -623,5 +653,12 @@ namespace Perun_v1
// Added user marker
PerunHelper.AddLog(ref Globals.AppLogHistory, "User Marker", 0, 1);
}
private void TIM_Autostart_Tick(object sender, EventArgs e)
{
// Handle autostart parameter from command line
TIM_Autostart.Enabled = false; // Disable timer
con_Button_Listen_ON_Click(sender,e); // Simulate button click
}
}
}

View File

@@ -419,6 +419,9 @@
<metadata name="tim_MySQL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>687, 19</value>
</metadata>
<metadata name="TIM_Autostart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>800, 4</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>26</value>
</metadata>

View File

@@ -32,7 +32,7 @@
<SuiteName>Perun</SuiteName>
<WebPage>Perun.htm</WebPage>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>0.10.0.%2a</ApplicationVersion>
<ApplicationVersion>0.11.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>

View File

@@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
// Możesz określić wszystkie wartości lub użyć domyślnych numerów kompilacji i poprawki
// przy użyciu symbolu „*”, tak jak pokazano poniżej:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.10.0.0")]
[assembly: AssemblyFileVersion("0.10.0.0")]
[assembly: AssemblyVersion("0.11.1.0")]
[assembly: AssemblyFileVersion("0.11.1.0")]
[assembly: NeutralResourcesLanguage("en")]

View File

@@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS `pe_Config` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `pe_Config` (`pe_Config_id`, `pe_Config_payload`) VALUES
(1, 'v0.10.0');
(1, 'v0.11.0');
DROP TABLE IF EXISTS `pe_DataMissionHashes`;
CREATE TABLE IF NOT EXISTS `pe_DataMissionHashes` (
@@ -41,7 +41,6 @@ CREATE TABLE IF NOT EXISTS `pe_DataPlayers` (
UNIQUE KEY `UNIQUE_UCID` (`pe_DataPlayers_ucid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `pe_DataRaw`;
CREATE TABLE IF NOT EXISTS `pe_DataRaw` (
`pe_dataraw_type` tinyint(4) NOT NULL,
@@ -116,6 +115,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogStats` (
`pe_LogStats_typeid` int(11) DEFAULT NULL,
`pe_LogStats_masterslot` int(11) DEFAULT NULL,
`pe_LogStats_seat` int(10) DEFAULT NULL,
`ps_kills_X` int(11) UNSIGNED NOT NULL DEFAULT '0',
`ps_pvp` int(11) UNSIGNED NOT NULL DEFAULT '0',
`ps_deaths` int(11) UNSIGNED NOT NULL DEFAULT '0',
`ps_ejections` int(11) UNSIGNED NOT NULL DEFAULT '0',
@@ -129,7 +129,7 @@ CREATE TABLE IF NOT EXISTS `pe_LogStats` (
`ps_kills_infantry` int(11) UNSIGNED NOT NULL DEFAULT '0',
`ps_kills_ships` int(11) UNSIGNED NOT NULL DEFAULT '0',
`ps_kills_fortification` int(10) UNSIGNED NOT NULL DEFAULT '0',
`ps_kills_artillery` int(10) UNSIGNED NOT NULL DEFAULT '0',
`ps_kills_artillery` int(10) NOT NULL DEFAULT '0',
`ps_kills_other` int(11) UNSIGNED NOT NULL DEFAULT '0',
`ps_airfield_takeoffs` int(11) UNSIGNED NOT NULL DEFAULT '0',
`ps_airfield_landings` int(11) UNSIGNED NOT NULL DEFAULT '0',
@@ -150,7 +150,6 @@ CREATE TABLE IF NOT EXISTS `pe_LogStats` (
KEY `pe_LogStats_mstatus` (`pe_LogStats_mstatus`),
KEY `pe_LogStats_seat` (`pe_LogStats_seat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TRIGGER IF EXISTS `pe_LogStats_UPDATE`;
DELIMITER $$
CREATE TRIGGER `pe_LogStats_UPDATE` BEFORE UPDATE ON `pe_LogStats` FOR EACH ROW BEGIN
@@ -173,6 +172,32 @@ END
$$
DELIMITER ;
DROP TABLE IF EXISTS `pe_OnlinePlayers`;
CREATE TABLE IF NOT EXISTS `pe_OnlinePlayers` (
`pe_OnlinePlayers_id` int(11) NOT NULL,
`pe_OnlinePlayers_instance` int(11) NOT NULL,
`pe_OnlinePlayers_ping` int(11) NOT NULL,
`pe_OnlinePlayers_side` int(11) NOT NULL,
`pe_OnlinePlayers_slot` varchar(255) NOT NULL,
`pe_OnlinePlayers_ucid` varchar(255) NOT NULL,
`pe_OnlinePlayers_updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `pe_OnlineStatus`;
CREATE TABLE IF NOT EXISTS `pe_OnlineStatus` (
`pe_OnlineStatus_instance` int(11) NOT NULL,
`pe_OnlineStatus_theatre` varchar(255) NOT NULL,
`pe_OnlineStatus_name` varchar(255) NOT NULL,
`pe_OnlineStatus_pause` varchar(255) NOT NULL,
`pe_OnlineStatus_multiplayer` varchar(255) NOT NULL,
`pe_OnlineStatus_realtime` varchar(255) NOT NULL,
`pe_OnlineStatus_modeltime` varchar(255) NOT NULL,
`pe_OnlineStatus_players` int(11) NOT NULL,
`pe_OnlineStatus_perunversion_winapp` varchar(255) NOT NULL,
`pe_OnlineStatus_perunversion_dcshook` varchar(255) NOT NULL,
`pe_OnlineStatus_updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `pe_DataMissionHashes` ADD FULLTEXT KEY `pe_DataMissionHashes_hash` (`pe_DataMissionHashes_hash`);

View File

@@ -0,0 +1,183 @@
<!-- This is integration example for https://github.com/szporwolik/perun - please keep the code as simple and straightforward as possible -->
<!DOCTYPE html>
<html>
<head>
<title>Perun - Example of PHP Integration</title>
<meta charset="utf-8">
<meta name="description" content="Example of PHP integration of Perun for DCS World">
<meta name="keywords" content="dcs world perun">
<meta name="author" content="VladMordock">
<style>
body {
background-color: #eeeeee;
padding: 0 20px 0 20px;
}
h1,h2,h3 {
color: navy;
}
#header{
padding: 10px 0 10px 0px;
}
#content{
border-top: 1px solid navy;
border-bottom: 1px solid navy;
padding: 10px 0 10px 0px;
}
#footer{
padding: 10px 0 10px 0px;
text-align: right;
}
table, td{
border: 1px solid navy;
}
</style>
</head>
<body>
<div id="header">
<h1>Perun Integration Example</h2>
<h2>PHP Integration example for Perun for DCS World</h2>
<h3>Get support at our <a href="https://discord.gg/MTahREx">Discord</a>
</div>
<div id="content">
<?php
// Configure database connection - put your database address and credentials here
$config_db_username="CHANGE_ME"; // <<=== CHANGE TO YOUR MYSQL SERVER USERNAME
$config_db_password="CHANGE_ME"; // <<=== CHANGE TO YOUR MYSQL SERVER PASSWORD
$config_db_host="CHANGE_ME"; // <<=== CHANGE TO YOUR MYSQL SERVER ADDRESS
$config_db_database="CHANGE_ME"; // <<=== CHANGE TO YOUR MYSQL DATABASE
// Try to connect to the database
$mysqli = new mysqli($config_db_host, $config_db_username, $config_db_password, $config_db_database);
// Check connection
if ($mysqli->connect_errno) {
printf("Connect failed: %s\n", $mysqli->connect_error);
exit();
}
// Some Examples
// List last 5 missions at the server
echo "<h3>List last 5 missions at the server</h3>";
if ($result = $mysqli->query("SELECT * FROM `pe_DataMissionHashes` ORDER BY `pe_DataMissionHashes`.`pe_DataMissionHashes_datetime` DESC LIMIT 5")) {
echo "<table>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['pe_DataMissionHashes_id'] . "</td>";
echo "<td>" . $row['pe_DataMissionHashes_hash'] . "</td>";
echo "<td>" . $row['pe_DataMissionHashes_datetime'] . "</td>";
echo "</tr>";
}
echo "</table>";
$result->close();
}
// List last 5
echo "<h3>List last 5 players known server </h3>";
if ($result = $mysqli->query("SELECT * FROM `pe_DataPlayers` ORDER BY `pe_DataPlayers`.`pe_DataPlayers_updated` DESC LIMIT 5")) {
echo "<table>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['pe_DataPlayers_id'] . "</td>";
echo "<td>" . $row['pe_DataPlayers_ucid'] . "</td>";
echo "<td>" . $row['pe_DataPlayers_lastname'] . "</td>";
echo "<td>" . $row['pe_DataPlayers_updated'] . "</td>";
echo "</tr>";
}
echo "</table>";
$result->close();
}
// List last 5 chat messages
echo "<h3>List last 5 chat messages (note: INNER JOIN is used to pull the player's name from other table)</h3>";
if ($result = $mysqli->query("SELECT * FROM `pe_LogChat` INNER JOIN `pe_DataPlayers` on `pe_LogChat`.pe_LogChat_playerid = `pe_DataPlayers`.pe_DataPlayers_id ORDER BY `pe_LogChat`.`pe_LogChat_datetime` DESC LIMIT 5")) {
echo "<table>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['pe_LogChat_datetime'] . "</td>";
echo "<td>" . $row['pe_DataPlayers_lastname'] . "</td>";
echo "<td>" . $row['pe_LogChat_msg'] . "</td>";
echo "</tr>";
}
echo "</table>";
$result->close();
}
// List last 5 events
echo "<h3>List last 5 events</h3>";
if ($result = $mysqli->query("SELECT * FROM `pe_LogEvent` ORDER BY `pe_LogEvent_datetime` DESC LIMIT 5")) {
echo "<table>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['pe_LogEvent_datetime'] . "</td>";
echo "<td>" . $row['pe_LogEvent_content'] . "</td>";
echo "</tr>";
}
echo "</table>";
$result->close();
}
// List last statistics
echo "<h3>List last statistics (note: multiple INNER JOINs is used to pull information from other table)</h3>";
if ($result = $mysqli->query("SELECT * FROM `pe_LogStats` INNER JOIN `pe_DataMissionHashes` ON `pe_LogStats`.pe_LogStats_missionhash_id = `pe_DataMissionHashes`.pe_DataMissionHashes_id INNER JOIN `pe_DataPlayers` ON `pe_LogStats`.pe_LogStats_playerid = `pe_DataPlayers`.pe_DataPlayers_id INNER JOIN `pe_DataTypes` ON `pe_LogStats`.pe_LogStats_typeid = `pe_DataTypes`.pe_DataTypes_id ORDER BY pe_LogStats_datetime desc LIMIT 5")) {
echo "<table>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['pe_LogStats_datetime'] . "</td>";
echo "<td>" . $row['pe_DataPlayers_lastname'] . "</td>";
echo "<td>" . $row['pe_DataTypes_name'] . "</td>";
echo "<td>" . $row['ps_crashes'] . "</td>";
echo "<td>" . $row['ps_kills_planes'] . "</td>";
echo "<td>" . $row['ps_kills_armor'] . "</td>";
// TIP: See documentation there is many more counted events which can be displayed here
echo "<td>" . $row['pe_LogStats_mstatus'] . "</td>";
echo "</tr>";
}
echo "</table>";
$result->close();
}
// Get JSON objects with actual server information including LotATC and DCS SRS information
echo "<h3>Get JSON objects with actual server information including LotATC and DCS SRS information</h3>";
if ($result = $mysqli->query("SELECT * FROM `pe_DataRaw`")) {
echo "<table>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['pe_dataraw_updated'] . "</td>";
echo "<td>" . $row['pe_dataraw_payload'] . "</td>";
echo "</tr>";
}
echo "</table>";
$result->close();
}
// Close database connection
$mysqli->close();
?>
</div>
<div id="footer">
<a href="https://github.com/szporwolik/perun">
<img src="https://camo.githubusercontent.com/50a1df184e069b36f3ddf9223bf16582f49aa16c/68747470733a2f2f692e696d6775722e636f6d2f5072496b714e412e706e67" alt="Perun_Logo">
</a>
</div>
</body>
</html>

View File

@@ -2,6 +2,7 @@
![alt text](https://img.shields.io/github/license/szporwolik/perun.svg "MIT")
![alt text](https://img.shields.io/github/release-pre/szporwolik/perun.svg "Latest release")
![alt text](https://img.shields.io/github/release-date-pre/szporwolik/perun.svg "Latest release date")
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ZBW8R5L25A8QW&currency_code=EUR&source=url)
![Perun logo](https://i.imgur.com/PrIkqNA.png)
@@ -47,8 +48,9 @@ Windows app supports command line arguments, what may be handy in case of multip
The following arguments are accepted (keep the order!):
* server port (shall be the same as in the lua file!)
* instance ID (shall be the same as in the lua file!)
* path to SRS client-list.json
* path to LotATC stats.json
* path to SRS client-list.json OR put -1 if you do not want to use DCS SRS
* path to LotATC stats.json OR put -1 if you do not want to use LotATC
* numeric value (without quotes), set 1 for Autostart (Perun will start within 500ms after starting up)
Example for windows shortcut:
```
@@ -60,6 +62,8 @@ Data displaying and handling is not in the current scope of this project. Since
![Mission statistics](https://i.imgur.com/uiRSa9e.png)
Due to resource limitations, "Perun for DCS World" will focus on pulling the data from DCS (and external modules) and pushing it to MySQL server, but if anyone would like to develop open sourced PHP applets for data/statistics displaying we're willing to cooperate and support such projects. Unfortunetly it's not possible to share the hardcoded code from forum.gildia.org.
Basic example was provided [HERE](/04_Misc/05_PHP_Example/index.php) , support is available via Perun community at our [Discord](https://discord.gg/MTahREx).
## Troubleshooting - FAQ
- [I keep getting 1305 MySQL error](#i-keep-getting-1305-mysql-error)
- [Carrier landing are not tracked correctly](#carrier-landing-are-not-tracked-correctly)
@@ -84,6 +88,8 @@ DCS API does not track carrier or FARP operations natively, so there is a trick
* table: pe_LogLogins - holds login to server event history
* table: pe_LogStats - holds static information
![Database Scheme](https://i.imgur.com/zJsFxV0.png "MIT")
## Data packets - send from lua to TCP port
* ```ID: 1```, contains version/diagnostic information
* perun version - for server administration usage
@@ -127,6 +133,10 @@ See also the list of [contributors](https://github.com/szporwolik/perun/contribu
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
## Donation
This software is provide "as it is" without any warranties, but if you would like to thank me for development/support please
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ZBW8R5L25A8QW&currency_code=EUR&source=url)
## Acknowledgments
![Gildia.org Logo](https://images.weserv.nl/?url=https://i.imgur.com/nFHxQMy.png&w=140&il)