logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Serverstatus PHP Script

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
peregrinewonder



Joined: 25 Jul 2007
Posts: 2

PostPosted: Wed Jul 25, 2007 20:31    Post subject: Serverstatus PHP Script Reply with quote

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 Smile

Thanks in advance!
Back to top
View user's profile Send private message
Mikel of Avalon



Joined: 29 Dec 2004
Posts: 72
Location: Germany

PostPosted: Thu Jul 26, 2007 0:15    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Fri Jul 27, 2007 10:35    Post subject: Reply with quote

Or, you can simply look at the links on this page, and replace on of the ips with yours. Easy.

http://highergroundpoa.proboards3.com/index.cgi?board=ServerInfo&action=display&thread=1129444491

Sample url for 222.333.44.555:5121:

http://www.rfhq.com/hqq/nwnwq.php?ip=222.333.44.555&port=5121

Funky
Back to top
View user's profile Send private message
Mikel of Avalon



Joined: 29 Dec 2004
Posts: 72
Location: Germany

PostPosted: Fri Jul 27, 2007 11:36    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nosfe



Joined: 25 Apr 2007
Posts: 22

PostPosted: Fri Jul 27, 2007 11:48    Post subject: Reply with quote

thanks Very Happy
Back to top
View user's profile Send private message
peregrinewonder



Joined: 25 Jul 2007
Posts: 2

PostPosted: Sat Jul 28, 2007 5:25    Post subject: Reply with quote

How hard would it be to convert this to NWN2 - are most of the handlers etc. similar?
Back to top
View user's profile Send private message
Mikel of Avalon



Joined: 29 Dec 2004
Posts: 72
Location: Germany

PostPosted: Sat Jul 28, 2007 15:00    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
TiQ79



Joined: 29 Jul 2007
Posts: 7
Location: Zurich, Switzerland

PostPosted: Sun Jul 29, 2007 23:56    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Sharwin_F



Joined: 22 Jan 2007
Posts: 11
Location: Barcelona

PostPosted: Mon Aug 06, 2007 21:37    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Mikel of Avalon



Joined: 29 Dec 2004
Posts: 72
Location: Germany

PostPosted: Tue Aug 07, 2007 12:03    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group