View previous topic :: View next topic |
Author |
Message |
starfall
Joined: 03 Sep 2010 Posts: 8
|
Posted: Fri Sep 17, 2010 5:02 Post subject: Can nwnx sound an alert when a player joins a server? |
|
|
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 |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Fri Sep 17, 2010 8:08 Post subject: |
|
|
This is what are hak packs for... _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
starfall
Joined: 03 Sep 2010 Posts: 8
|
Posted: Fri Sep 17, 2010 15:14 Post subject: |
|
|
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 |
|
|
Ravine
Joined: 26 Jul 2006 Posts: 105
|
Posted: Fri Sep 17, 2010 21:31 Post subject: |
|
|
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
However, iirc letoscript had some system calls, which was able to execute programs on server side... |
|
Back to top |
|
|
starfall
Joined: 03 Sep 2010 Posts: 8
|
Posted: Fri Sep 17, 2010 22:44 Post subject: |
|
|
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
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 |
|
|
Ravine
Joined: 26 Jul 2006 Posts: 105
|
Posted: Sat Sep 18, 2010 0:28 Post subject: |
|
|
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 |
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Sat Sep 18, 2010 19:32 Post subject: |
|
|
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 |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Sun Sep 19, 2010 1:46 Post subject: |
|
|
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 |
|
|
starfall
Joined: 03 Sep 2010 Posts: 8
|
Posted: Sun Sep 19, 2010 1:51 Post subject: |
|
|
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 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 |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Mon Sep 20, 2010 10:15 Post subject: |
|
|
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 |
|
|
|