OpenArena Message Boards

OpenArena => Technical Snafus => Topic started by: drarem on January 28, 2008, 05:29:23 PM



Title: how to echo text in intervals throughout the game?
Post by: drarem on January 28, 2008, 05:29:23 PM
How do I display a message or two every 5 minutes?  Running oa server on ubuntu.

Thanks.


Title: Re: how to echo text in intervals throughout the game?
Post by: w1zrd on January 28, 2008, 11:26:22 PM
How do I display a message or two every 5 minutes?  Running oa server on ubuntu.
Thanks.
Do a cronjob with rcon say, nothing more needed.


Title: Re: how to echo text in intervals throughout the game?
Post by: drarem on January 29, 2008, 09:08:16 AM
Yea.. that's what I thought to, this won't display anything for some reason..

cd $HOME/Games/openarena-0.7.0
crontab motd.txt
./ioq3ded.i386 +set dedicated 2 +set net_port 27960 +exec test_server.cfg

motd.txt:
* * * * * export DISPLAY=:0 && rcon <passwd> say "Doh!"

also tried:
* * * * * rcon <passwd> say "Doh!"

and
*/1 * * * * rcon <passwd> say "Doh!"

I do a crontab -l  and it shows the cron job, and cron is running.

Is there something I'm missing?  Note:  crontab doesn't require a user if running non-root.

Update:  I also do a .. > /dev/pts/0  and it writes to the terminal in an echo, but rcon say ... doesn't seem to work unless I'm missing out on the syntax somewhere.


Title: Re: how to echo text in intervals throughout the game?
Post by: drarem on January 31, 2008, 02:26:18 PM
Ok.. how bout this?  Somehow execute another .CFG file instead of manual execution which is just this:

say "Welcome to this server..  please visit www.website.com"
wait 2500
repeat x8

and I don't have to type 'execute text.cfg' from in the server, but have it part of the script automatically.

It works if I run it manually, but to have it run from the server script, it stalls the server for some reason.


Title: Re: how to echo text in intervals throughout the game?
Post by: [TASF]Overkill on March 08, 2008, 10:56:09 AM
I have this running on my server with a script I wrote, but I'm not yet ready to release it until I have fully security tested it. Look for [TASF]CTF.


Title: Re: how to echo text in intervals throughout the game?
Post by: skankychicken on March 23, 2008, 11:04:40 PM
lots of ways to do this

(save file with the free q3ctrl script http://www.google.co.uk/search?&hs=TSz&q=q3ctrl&btnG )
q3ctrl.pl -host 32.5.163.69 -port 30000 -cmd "exec theconfig" -password xxx




put the file as an entry in /etc/crontab
1,14,29,45 * * * * root /usr/local/games/stout.sh  >/dev/null 2>&1

================

Heres a php class which you could run in the crontab. Makes it easier if you want to consider having a simple web page to update the output.

http://misc.slowchop.com/misc/browser/q3query/trunk/q3query.php

=================

hennimation
http://chumps.eu/downloads/tools/hennimation.zip

and some info here http://www.q3ana.de/viewtopic.php?f=3&t=568&p=7513

===================

You can also pipe commands into the main process thats running. i dont remember how my friend done this but was really simple.. well.. i guess it would be if you were familiar with using that kinda stuff :D


Title: Re: how to echo text in intervals throughout the game?
Post by: escapedturkey on March 24, 2008, 04:42:51 PM
You need kkrcon. I can help you set it up over IM. PM me. :)