News:

Come Chat with us live! Learn how HERE!

Main Menu

Auto CP

Started by ServerInLAN, March 10, 2008, 10:41:05 PM

ServerInLAN

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?

qfuzion

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.

Rocinante

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)
}MG{Mercenaries Guild
"On my ship, the Rocinante, wheeling through the galaxies, headed for the heart of Cygnus, headlong into mystery." -- Rush, "Cygnus X-1"

doomagent13

...Or you could make a custom game.qvm to auto do it at the appropriate times...

kevlarman

easier to go the cronjob route:
echo -e '\xff\xff\xff\xffrcon $password $command' | netcat -u localhost 30720
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

BugHuman

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.

techhead

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.
I'm playing Tremulous on a Mac!
MGDev fan-club member
Techhead||TH
/"/""\"\
\"\""/"/
\\:.V.://
Copy and paste Granger into your signature!

BugHuman

#7
THANKS SO MUCH ;D and 5000 is how many minutes?

Paradox

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

∧OMG ENTROPY∧

techhead

Quote from: BugHuman on March 12, 2008, 07:18:26 PM
THANKS SO MUCH ;D and 5000 is how many minutes?
.08333... minutes.
In other words, 5 seconds. (Wait wants time in milliseconds)
I'm playing Tremulous on a Mac!
MGDev fan-club member
Techhead||TH
/"/""\"\
\"\""/"/
\\:.V.://
Copy and paste Granger into your signature!

kevlarman

Quote from: techhead on March 12, 2008, 11:48:13 PM
Quote from: BugHuman on March 12, 2008, 07:18:26 PM
THANKS SO MUCH ;D and 5000 is how many minutes?
.08333… minutes.
In other words, 5 seconds. (Wait wants time in milliseconds)
wrong.
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

BugHuman

Who's wrong and why?

pharo212

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.

David

Wait is in frames.  And as i'm sure your all aware, the frame rate changes a lot, so its mostly useless.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.