View previous topic :: View next topic |
Author |
Message |
peregrinewonder
Joined: 25 Jul 2007 Posts: 2
|
Posted: Wed Jul 25, 2007 20:31 Post subject: Serverstatus PHP Script |
|
|
Hello All,
I am totally clueless here. Is there a script or module of some kind which allows me to get the following info from the DB and display it on a PHP webpage:
user / char name / level / class1 / class2 / class3
?
Please direct me to threads, codes, downloads, or a step/by-step if possible
Thanks in advance! |
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Thu Jul 26, 2007 0:15 Post subject: |
|
|
If you interested in something like my modified serverstatus from lanthar Dalton leave me a pm or an eMail with the contact details. It's possible too complex to shown here in the forum...
An sample can be shown here: Serverstatus _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Fri Jul 27, 2007 11:36 Post subject: |
|
|
For anyone interested in the serverstatus from my site - here are the script and code.
NWN Serverstatus
You have to include the script avn_pctracking.nss into your module and use the function updatePlayerTracking at OnClientEnter and in ModulHB or an PseudoHB to update the database table with your playerdata. The table stucture can be found in the script. The php-script is unchanged only for php-fusion and is in german, so you have to change some things to your likings.
Cheers, Mikel _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
nosfe
Joined: 25 Apr 2007 Posts: 22
|
Posted: Fri Jul 27, 2007 11:48 Post subject: |
|
|
thanks |
|
Back to top |
|
|
peregrinewonder
Joined: 25 Jul 2007 Posts: 2
|
Posted: Sat Jul 28, 2007 5:25 Post subject: |
|
|
How hard would it be to convert this to NWN2 - are most of the handlers etc. similar? |
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Sat Jul 28, 2007 15:00 Post subject: |
|
|
I don't know nothing about nwn2 scripting and available handlers. Theoretical it must also be possible with only some minor changes. _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
TiQ79
Joined: 29 Jul 2007 Posts: 7 Location: Zurich, Switzerland
|
Posted: Sun Jul 29, 2007 23:56 Post subject: |
|
|
I do not have the NWN1 tools installed. Can someone who has just copy the scripts out of nss and post here?
I'd like to have a look at it. |
|
Back to top |
|
|
Sharwin_F
Joined: 22 Jan 2007 Posts: 11 Location: Barcelona
|
Posted: Mon Aug 06, 2007 21:37 Post subject: |
|
|
I used this php script with the linux server and I think this is what you are looking for.
The question is... does it run with the nwn2 windows server?
Code: | $ipaddr = "here_your_IP_or_domain";
$port = "5121";
$timeout = 5;
$connect = fsockopen( "udp://" . $ipaddr, $port, $errno, $errstr, $timeout );
if (!$connect) {
echo "module stopped";
} else {
stream_set_timeout($connect, $timeout);
$send = "\xFE\xFD\x00\xE0\xEB\x2D\x0E\x14\x01\x0B\x01\x05\x08\x0A\x33\x34\x35\x13\x04\x36\x37\x38\x39\x14\x3A\x3B\x3C\x3D\x00\x00";
fwrite($connect, $send);
$output = fread($connect, 5000);
if (!$output) {
echo "loading module";
} else {
$lines = explode("\x00", $output);
echo "module loaded, players: ($lines[5]/$lines[6])";
}
}
fclose($connect); |
|
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Tue Aug 07, 2007 12:03 Post subject: |
|
|
This part is for query server on gamespy - i do not know if the same is possible with nwn2. The php script i submitted uses the same queries for the gamespy data, but have additional mysql queries for the stored playerdata. _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
|