etinfo


(Chruker) #1

Hi

Just wanted to say that I have created a php class which can be used for displaying server information about your ET servers. It also include a function which can read an objective type rotation script and display it nicely.

http://games.chruker.dk/enemy_territory/files/ETInfo-2.4.zip

:cool:


(Chruker) #2

Server info example: http://games.chruker.dk/enemy_territory/etinfo/example_server_info.php

Rotation list example: http://games.chruker.dk/enemy_territory/etinfo/example_rotation_list.php

The rotation is build on the fly from this .cfg file:

//
// Game cycle for objective gametype
//

set d1 "set g_gametype 2 ; map oasis ; set nextmap vstr d2"
set d2 "set g_gametype 2 ; map battery ; set nextmap vstr d3"
set d3 "set g_gametype 2 ; map goldrush ; set nextmap vstr d4"
set d4 "set g_gametype 2 ; map radar ; set nextmap vstr d5"
set d5 "set g_gametype 2 ; map railgun ; set nextmap vstr d6"
set d6 "set g_gametype 2 ; map fueldump ; set nextmap vstr d7"
set d7 "set g_gametype 2 ; map mp_theriver_2nd ; set nextmap vstr d8"
set d8 "set g_gametype 2 ; map et_tank_beta3 ; set nextmap vstr d9"
set d9 "set g_gametype 2 ; map northpole ; set nextmap vstr d10"
set d10 "set g_gametype 2 ; map cathedral_b4 ; set nextmap vstr d11"
set d11 "set g_gametype 2 ; map v2_factory ; set nextmap vstr d12"
set d12 "set g_gametype 2 ; map navarone ; set nextmap vstr d13"
set d13 "set g_gametype 2 ; map falcon2 ; set nextmap vstr d14"
set d14 "set g_gametype 2 ; map et_tundra_beta4a ; set nextmap vstr d1"
vstr d1

(eRRoLfLyNN) #3

For the PHP noob, how install? Just upload and hit the pages?


(meisterbrau) #4

i wrote a php script that will tell u when et2 will be released.


(Sauron|EFG) #5

That’s easy:


<?php
echo "<html><body>";
echo "[b]When it's done.[/b]";
echo "</body></html>";
?>


(Chruker) #6

Yeah, you should be able to use the example pages.

However you need to update the locations in the rotation_list script and the map cache creation script.

There are two locations: you etmain path and the pk3 download url.


([DS]-=Pencil=-) #7

Hy, we use this great Script now.

Thanks:
http://www.darksoldiers.de/page.php?id=7

You Helped

:slight_smile:


(Chruker) #8

Nice :slight_smile:


([DS]-=Pencil=-) #9

btw here is a downloadmirror: http://rtcw-prison.planet-multiplayer.de/prison/downloads.php?release_id=837

Hope I Helped

:slight_smile:


([DS]-=Pencil=-) #10

Another question:

Is it possible to add a “Join” Button so everybody can join the server from this script?

hope you help

:slight_smile:


(Chruker) #11

Do you have any examples where I can see such a Join button?

I found one on serverspy.net where the links should have this format:

gamelauncher://ipaddress:port;rtcwet;mod;password;

That would be easy to add, however it requires that the visitor has their gamelauncher software installed.


([DS]-=Pencil=-) #12

Sorry I do not know such a thing. Only something where you have to install a plugin (like the Q3Q-Serverviewer)…

hope you help

:frowning:


([DS]-=Pencil=-) #13

Do you know how to make tow ETInfo’s under each other (to view and refresh two servers at the same time)?
Would be good if it would work.

Another thing: Can you let display (on an extra file) who wins each time?
So everyone could see clanwars from the internet :slight_smile: with the stats.

Hope You Help

:slight_smile:


(Chruker) #14

It should be possible to have two or more server stats on the same page. You can just duplicate the printing sections so you get something like this:


	include("include/etinfo.inc");
	$server1 = new etinfo();

	$server1_address = "127.0.0.1";
	$server1_port = "27960";

	if ($server1->connect($server_address, $server_port)) {
		echo "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"3\" WIDTH=\"100%\">
";
		echo "	<COLGROUP ALIGN=\"left\" SPAN=\"2\" VALIGN=\"top\" WIDTH=\"50%\">
";
		echo "	</COLGROUP>
";
		echo "	<TBODY>
";
		echo "		<TR>
";
		echo "			<TD COLSPAN=\"2\">
";
		$server1->display_server_info("				");
		echo "			</TD>
";
		echo "		</TR>
";
		echo "		<TR>
";
		echo "			<TD>
";
		$server1->display_axis_team("				");
		echo "			</TD>
";
		echo "			<TD>
";
		$server1->display_allied_team("				");
		echo "			</TD>
";
		echo "		</TR>
";
		echo "		<TR>
";
		echo "			<TD COLSPAN=\"2\">
";
		$server1->display_spectators("				");
		echo "			</TD>
";
		echo "		</TR>
";
		echo "	</TBODY>
";
		echo "</TABLE>
";
		} else {
		echo "Sorry, unable to connect to ".$server1_address.":".$server1_port."

";
		}


	$server2 = new etinfo();

	$server2_address = "127.0.0.1";
	$server2_port = "27960";

	if ($server2->connect($server2_address, $server2_port)) {
		echo "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"3\" WIDTH=\"100%\">
";
		echo "	<COLGROUP ALIGN=\"left\" SPAN=\"2\" VALIGN=\"top\" WIDTH=\"50%\">
";
		echo "	</COLGROUP>
";
		echo "	<TBODY>
";
		echo "		<TR>
";
		echo "			<TD COLSPAN=\"2\">
";
		$server2->display_server_info("				");
		echo "			</TD>
";
		echo "		</TR>
";
		echo "		<TR>
";
		echo "			<TD>
";
		$server2->display_axis_team("				");
		echo "			</TD>
";
		echo "			<TD>
";
		$server2->display_allied_team("				");
		echo "			</TD>
";
		echo "		</TR>
";
		echo "		<TR>
";
		echo "			<TD COLSPAN=\"2\">
";
		$server2->display_spectators("				");
		echo "			</TD>
";
		echo "		</TR>
";
		echo "	</TBODY>
";
		echo "</TABLE>
";
		} else {
		echo "Sorry, unable to connect to ".$server2_address.":".$server2_port."

";
		}

Now I haven’t tested this, but it should be possible. Please let me know if it isn’t.

And in order for it to display who wins the maps, you need something that can parse the server logs. This one can’t do that.


(Chruker) #15

I’ve uploaded version 2.4 to the link in the first post.

That version fixes a bug in how players were placed on the teams, and as a new thing it can be set to color code the names.