This is an alteration of Papillon' original php web status script to work with the 1.32 changes. Version 1.32 broke the original script, and closed off the player list queries. I include a nwnx database updating system in an erf that must be added to your module. NOTE: Requires mySQL database (Access may work with sql changes). The system updates a database table via nwnx, every heartbeat, or every couple of heartbeats (code included, pick one). The table tracks levels, classes, xp, dm or not, and a bunch of other things are stored on first entry. It uses a last_seen value to show who is currently on. Updated: Fixed status querying, and added full server info below characters (toggleable with one tiny change.) 10-7-03: altered to avoid checking db if server is known to be down.
Updated my script to 1.3 which no longer requires NWNX/ODBC or MySQL DB, and instead reads the built-in Bioware-generated FPT file. ^^ _________________________ Link
Posted by Lanthar D'Alton ( 65.68.xxx.xxx ) at 2004-07-02 15:50:00
You might need to go change the tracking_inc to remove the use of two of the constants. Just open tracking_inc and put:
void main() {}
into it and compile. This will expose the line numbers of the constants that bioware removed, so you can delete those lines.
I'm assuming from the newer dates of the posts that this will work with HOTU 1.62? I'd like to use this for my world but want to be sure it works with both expansion packs.
Thanks!---Aidonor
Dragon's Prophecy PW Admin
XCR dev team member _________________________ ---Aidonor
Dragon's Prophecy PW Admin
aidonor@(removeifnotspam)dragonsprophecy.net
Posted by Lanthar D'Alton ( ..xxx.xxx ) at 2004-03-05 17:14:00
Okay, first, that heartbeat script is wrong (my bad on that), it should loop through the players...
As for the php...
You changed the target IP and port to match those for your server, right? What that error means to me (not 100% certain) is that it is failing to get to your nwn server from your web server. Hope that helps.
-Lanthar
Posted by SoulDeaD ( ..xxx.xxx ) at 2004-03-04 15:12:00
i have the same problem...
i put in OnHeartBear module this script
#include "aps_include"
#include "tracking_inc"
void main()
{
updatePlayerTracking(oPC);
}
but tell this error:
variable defined without type.
and the serverinfo.php (the php file modified) says that:
Fatal error: Maximum execution time of 30 seconds exceeded in /home/bioware/public_html/status/index.php on line 183
This is a compilation of the old system into a single score. There were 3 that made this score of 9.33 then rounded to 9.
Posted by Lanthar D'Alton ( ..xxx.xxx ) at 2004-02-16 10:39:00
H3r0n & Sco357:
I'll email you the solution h3r0n... but sco posted no address...:/
Anyway, the system was written for use with servers using NWNX already, and most already have the aps_include file as part of their heartbeat... All you need to do is add this line at the top of your heartbeat file:
#include "aps_include"
That should fix it.
Blackie:
Impact on the server is minimal. I do not notice any impact on my own. If it becomes an issue for you, you can strip columns from the queries and only store player name, pc name, and timestamp...
The toolset generate an error like this : VARIABLE DEFINED WITHOUT TYPE
Please help me! :) thx
p.s. : Sorry for my bad english :s
Posted by PrplPplEater ( ..xxx.xxx ) at 2003-12-09 12:27:00
Sounds good and all, except the erf in the file says I need an expansion pack to install.
Got a native 1.32 version of this ?
Posted by darwinscusp ( ..xxx.xxx ) at 2003-10-12 05:07:00
Great update Lanthar! Thanks!
Posted by Lanthar D'Alton ( ..xxx.xxx ) at 2003-10-06 22:29:00
Realizing that only 5 people grabbed V2.1, but those that did should grab V2.2 because 2.1 would try to check the mySQL DB even if the game server was down. That was a bit foolish, since it will result in no players, and possible mySQL errors if the mySQL server is down too (i.e. on the same box as the game server). Anyway... grab this update. It's a very minor change from 2.1, but it makes a big difference.
-Lanthar
Posted by Lanthar D'Alton ( ..xxx.xxx ) at 2003-10-06 21:34:00
Okay, I've updated this to actually check whether it got anything back... (duh)
Anyway, I also added the full server info response received that shows everything but the player names at the bottom of the page. To show this, just change:
$printjunk=0;
to
$printjunk=1;
It also now shows the live servername/modulename if online.
Posted by darwinscusp ( ..xxx.xxx ) at 2003-10-04 11:34:00
Works well. Doesn't seem to detect server online/offline status properly on linux though.
Posted by buu ( ..xxx.xxx ) at 2003-10-01 12:20:00
i already said evertying in the nwnx forum ;)
Posted by No one special ( ..xxx.xxx ) at 2003-10-01 03:05:00
Good work, yo da man!
You must be Logged In to post comments in this section.