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 
 
Can nwnx sound an alert when a player joins a server?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
starfall



Joined: 03 Sep 2010
Posts: 8

PostPosted: Fri Sep 17, 2010 5:02    Post subject: Can nwnx sound an alert when a player joins a server? Reply with quote

is there a plugin or some other setting that let's nwnx sound an alert when a player joins a server? something like playing a midi Chariots of Fire would be good.

thx !
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Fri Sep 17, 2010 8:08    Post subject: Reply with quote

This is what are hak packs for...
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
starfall



Joined: 03 Sep 2010
Posts: 8

PostPosted: Fri Sep 17, 2010 15:14    Post subject: Reply with quote

ShaDoOoW wrote:
This is what are hak packs for...


you mean i can use a hakpak to make nwnx sound an alert whena player joins? is that like a plugin for nwnx?

because i thot most hakpaks for nwn needed to be distributed to all players >< scuses because i do niot know much about nwnx
Back to top
View user's profile Send private message
Ravine



Joined: 26 Jul 2006
Posts: 105

PostPosted: Fri Sep 17, 2010 21:31    Post subject: Reply with quote

Hmm, you want your SERVER to play a sound? Coz nwnx is a server side software...
However, you don't need nwnx to do that, simply make a small proggie to parse the logs, and play something. I do this with php, w/o sounds Smile

However, iirc letoscript had some system calls, which was able to execute programs on server side...
Back to top
View user's profile Send private message
starfall



Joined: 03 Sep 2010
Posts: 8

PostPosted: Fri Sep 17, 2010 22:44    Post subject: Reply with quote

Ravine wrote:
Hmm, you want your SERVER to play a sound? Coz nwnx is a server side software...
However, you don't need nwnx to do that, simply make a small proggie to parse the logs, and play something. I do this with php, w/o sounds Smile

However, iirc letoscript had some system calls, which was able to execute programs on server side...


wait.. you mean write a program to continually scan the last added lines of the current server log file? --- what program can do that? (how do i use php to do that........, ive never actually installed php is it easy..)

can letosript do that? i actually thought leto was a char file editor. did dragonsong write a new scripting language to go with it.. which parses server log files..(?) i think i need an update -.-
Back to top
View user's profile Send private message
Ravine



Joined: 26 Jul 2006
Posts: 105

PostPosted: Sat Sep 18, 2010 0:28    Post subject: Reply with quote

Yeah, continually scan for added lines. If your server is windows, you need only the CLI, which is php.exe (however i'm using linux), and a small script to check the logs.

Letoscript had some system-call functions, NOT log-parsing functions, yeah. I used some in the old times, but i cannot remember the correct coding Sad
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Sat Sep 18, 2010 19:32    Post subject: Reply with quote

Code:
tail nwserverLog1.txt | grep -E '^\[.{19}\] .* \([A-Z0-9]{8}\) Joined as (Player|Game Master) [0-9]+$'


That command (requires tail and grep - part of the standard Linux utilities but Windows probably has an equivalent) will output a line of text on the console every time someone joins or leaves. If you then go on to manipulate this somehow, you're done. Off the top of my head, an expect script on a loop would do the job just fine.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Sun Sep 19, 2010 1:46    Post subject: Reply with quote

starfall wrote:
ShaDoOoW wrote:
This is what are hak packs for...


you mean i can use a hakpak to make nwnx sound an alert whena player joins? is that like a plugin for nwnx?

because i thot most hakpaks for nwn needed to be distributed to all players >< scuses because i do niot know much about nwnx
Sorry badly understood, I thought you want to play sound in game when player joins for all players or DMs etc. Very nice idea play it on server side, especially if one host the server himself.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
starfall



Joined: 03 Sep 2010
Posts: 8

PostPosted: Sun Sep 19, 2010 1:51    Post subject: Reply with quote

Fireboar wrote:
Code:
tail nwserverLog1.txt | grep -E '^\[.{19}\] .* \([A-Z0-9]{8}\) Joined as (Player|Game Master) [0-9]+$'


That command (requires tail and grep - part of the standard Linux utilities but Windows probably has an equivalent) will output a line of text on the console every time someone joins or leaves. If you then go on to manipulate this somehow, you're done. Off the top of my head, an expect script on a loop would do the job just fine.


that's pretty sophisticated for me... i will have to let it sink in for a bit and then come back to it and look around when i have more time Smile if i ever make it ill post it on here for exeryone to criticise/improve.

the reason why im after a sound so that when a player drops in i can log in to help them out as DM or whatever. I could stay logged in with the DM Client or player client but that would consume more resources than i would prefer.
Back to top
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Mon Sep 20, 2010 10:15    Post subject: Reply with quote

Try the 'spawn' plugin (or one of the the OS access ones)
This will let you run a cmd (bat) file 'type ^G' ding!
*Ctrl-G is the bell (I believe)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion 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