Jump to content

[RELEASE] Killboard web page


mgm

Recommended Posts

Hey guys,

 

This is not a released script but just a web based killboard solution.

 

Since and had to invest some time to set up something (primitive sadly) using cygwin commands to parse the RPT file.

This beats what we had this morning (no killboard whatsoever) so I'm happy for now until itsatrap releases his nice one.

Some might use this as quick temp solution until we have something proper in place. To use this you will need to have a VPS/dedicated server and Cygwin...

 

You can see it in action here from our live site. And here is a screenshot in spoiler.

HPjUCG3.png

 

 

 

 

 

refresh_killboard.bat

I call this Windows Batch file every minute, using Windows Task Scheduler, which in turn, launches Cygwin bash shell and runs a few commands, then places output in a text file. (the output text file gets included in the killboard HTML page).

@echo off
C:
chdir "C:\my_data\program_files\cygwin64\bin"
bash.exe -c "/cygdrive/c/my_data/program_files/cygwin64/bin/echo.exe Last updated:" > c:\Apache\Apache2\htdocs\kills.txt
bash.exe -c "/cygdrive/c/my_data/program_files/cygwin64/bin/date.exe" >> c:\Apache\Apache2\htdocs\kills.txt
bash.exe -c "/cygdrive/c/my_data/program_files/cygwin64/bin/echo.exe " >> c:\Apache\Apache2\htdocs\kills.txt
bash.exe -c "/cygdrive/c/my_data/program_files/cygwin64/bin/grep.exe \"PKILL\" /cygdrive/c/dayz_mod_server/instance_1_Overpoch_Chernarus/arma2oaserver.RPT | /cygdrive/c/my_data/program_files/cygwin64/bin/sed.exe -e 's/\,//g'   | /cygdrive/c/my_data/program_files/cygwin64/bin/sed.exe -e 's/\PKILL://g' | /cygdrive/c/my_data/program_files/cygwin64/bin/sed.exe -e 's/\"//g' >> c:\Apache\Apache2\htdocs\kills.txt"

 

.

 

 

.

 

 

 

.

Web Server

To make it accessible by web I used freely available Apache web server but any web server including default Windows one IIS should do.

Change this path to your shared web docs directory "c:\Apache\Apache2\htdocs\kills.txt".

 

 

 

 

 

index.html

I used this one below, customize it to meet your requirements.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>DYCORE Killboard</title>
<meta http-equiv="refresh" content="30">
    <script src="jquery.js"></script>
    <script>
    $(function(){
      $("#includedContent").load("kills.html");
    });
    </script>
</head>
<!-- Background white, links blue (unvisited), navy (visited), red
(active) -->
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#000080" alink="#FF0000">
<iframe src="http://free.timeanddate.com/clock/i4anlfxt/n195/tcf90/pc9f0/ahl/avt/fti/tt0/tw1/tm1/th1/ta1/tb4" frameborder="0" width="127" height="36"></iframe><br>Server time: Roubaix, France<br>
Server restart times: 02:00 05:00 08:00 11:00 14:00 17:00 20:00 23:00<br>
<br>
Killboard data and this page automatically refresh every 60 seconds. | Unfortunately some player kills are <b>not</b> displayed.<br>
<br>
<b>LINKS:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://forums.dycoregaming.com/thread-33.html">Step by step connection instructions</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://forums.dycoregaming.com/thread-295.html">Server Features</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.gametracker.com/server_info/92.222.164.242:2302/">Player Stats</a>&nbsp;&nbsp;&nbsp;(Online Players &  All Time Rankings)<br>

<p align=center>
<a href="http://forums.DYCOREgaming.com/index.php"><img src="http://forums.DYCOREgaming.com/images/dycore_logo_with_text2.png" alt="DYCORE Gaming Forums" title="DYCORE Gaming Forums" /></a></div>
</p>

<hr width="50%" size="8" />
<h1 align="center">Killboard</h1>
<p align="center">
Showing all recorded kills from DYCORE Overpoch Chernarus Server since last server restart
</p>

<p align="center">
<object width="1000" height="450" type="text/plain" data="kills.txt" border="1" ></object>
</p>
</body>
</html>

 

 

 

 

 

Top left corner server time clock

TimeAndDate.com they have nice customization options to set your server location and fonts etc..

 

 

 

 

Hope it helps someone save some time...

 

 

 

 

 

Edit1 - added "(kill list) last updated" section.

Edit2 - added server auto restart times to the top.

Edit3 - old version was filtering RPT lines for the keywords "was killed by". New version is filtering RPT lines for the keyword "PKILL". As a result, now we get to see "<PlayerName> killed himself" lines in the Killboard web page which is more informative and preferred. The relevant section above has been updated now.

Edit4 - as per player request added a link to gametracker online players list and all time players stats.

Link to comment
Share on other sites

Hm, what about those who have their server and apache on different servers?

So we have two files here:

  1. index.html <= just the killboard page layout, main title, links, logo. this is static and once you design your template you won't change this much.
  2. kills.txt <= this includes the actual kills list and we extract this from RPT file.

To have game server & web server separate and still have the killboard solution, one should transfer kills.txt somehow from game server to web server (using rsync, ftp, wget and so on methods) web server then can display the latest content.

 

For this solution, the main limitation I guess is being able to parse massive RPT file and create a tiny kills.txt.

You need desktop access to do this, once it is done, pushing tiny kills.txt file is relatively easy.

 

I decided setting up a new web server on the game server host though as I think it will make things easy in the long run.

Link to comment
Share on other sites

After one hour of testing, feedback points out that it'd be a good idea to add "last updated" field as marked in RED below.

I've now added this to refresh_killboard.bat in 1st post...

 

 

PEtOSET.png

 

 

 

Also added a screenshot in 1st post.

Link to comment
Share on other sites

why root?

I just wanted something quick for our use, this one works fine.

 

 

give this for normal User! (Gameserver)

Assuming you need one - I would like to help but I don't know to do this in a game server hosting account as I never had one & no idea what tools are available in the platform.

If it's like cPanel (web hosting) where all you can do is clicking some pre-defined buttons, I can't find a way to do this...

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...