Tremulous Forum

Community => Servers => Topic started by: ServerInLAN on March 10, 2008, 11:41:05 pm

Title: Auto CP
Post by: ServerInLAN on March 10, 2008, 11:41:05 pm
Ok, so I have a server and I want a cp to automatically happen at the begining of every game, or every 30 minutes. So how do I do that?
Title: Re: Auto CP
Post by: qfuzion on March 11, 2008, 12:27:17 am
You can either put it in a cfg file that is executed at the beginning of every game, or you can send it to the server with a cron job or something of that sort if you're on a *nix os.
Title: Re: Auto CP
Post by: Rocinante on March 11, 2008, 02:03:05 am
The only problem with beginning of a game is timing it just right - if it's too soon, not all of the players will have connected in time to see it happen.  Otherwise, as was already said a cron job every 30m which sends the data to the server would work fine.  Perhaps if David sees this thread he'll paste the magic string we used before, I can't remember how it goes (netcat something \xff\xff\xff\xffrcon <rconpassword> cp Your Text Here)
Title: Re: Auto CP
Post by: doomagent13 on March 11, 2008, 02:06:48 am
...Or you could make a custom game.qvm to auto do it at the appropriate times...
Title: Re: Auto CP
Post by: kevlarman on March 11, 2008, 02:14:24 am
easier to go the cronjob route:
Code: [Select]
echo -e '\xff\xff\xff\xffrcon $password $command' | netcat -u localhost 30720
Title: Re: Auto CP
Post by: BugHuman on March 11, 2008, 10:13:38 pm
lol wats a cronjob and how do i do it, and with the timing thing wat the command to say pause 5 seconds for timing issue.
Title: Re: Auto CP
Post by: techhead on March 11, 2008, 11:23:47 pm
AFAIK, 'wait 5000'.
However, whenever I try the 'wait' command in client-side scripting, it locks up my client until its done waiting, except for a couple of functions.
Title: Re: Auto CP
Post by: BugHuman on March 12, 2008, 08:18:26 pm
THANKS SO MUCH ;D and 5000 is how many minutes?
Title: Re: Auto CP
Post by: Paradox on March 12, 2008, 11:46:05 pm
Actually, P-G-Qvm 1.5+ has this feature.

g_msg sets the message, use \n for newlines
g_msgTime is the time in min.

http://p-g-qvm.googlecode.com
Title: Re: Auto CP
Post by: techhead on March 13, 2008, 12:48:13 am
THANKS SO MUCH ;D and 5000 is how many minutes?
.08333… minutes.
In other words, 5 seconds. (Wait wants time in milliseconds)
Title: Re: Auto CP
Post by: kevlarman on March 13, 2008, 02:29:09 am
THANKS SO MUCH ;D and 5000 is how many minutes?
.08333… minutes.
In other words, 5 seconds. (Wait wants time in milliseconds)
wrong.
Title: Re: Auto CP
Post by: BugHuman on March 15, 2008, 02:39:10 pm
Who's wrong and why?
Title: Re: Auto CP
Post by: pharo212 on March 15, 2008, 04:51:58 pm
I'm assuming he means 5000 doesn't equal five seconds, wait doesn't want it in milliseconds, or 5 seconds doesn't equal .083333... minutes.
Title: Re: Auto CP
Post by: David on March 15, 2008, 06:02:08 pm
Wait is in frames.  And as i'm sure your all aware, the frame rate changes a lot, so its mostly useless.