Author Topic: Auto CP  (Read 6335 times)

ServerInLAN

  • Posts: 18
  • Turrets: +0/-7
Auto CP
« 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?

qfuzion

  • Posts: 5
  • Turrets: +8/-1
Re: Auto CP
« Reply #1 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.

Rocinante

  • Posts: 642
  • Turrets: +252/-668
    • My Homepage
Re: Auto CP
« Reply #2 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)
}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

  • Posts: 506
  • Turrets: +18/-18
Re: Auto CP
« Reply #3 on: March 11, 2008, 02:06:48 am »
...Or you could make a custom game.qvm to auto do it at the appropriate times...

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Re: Auto CP
« Reply #4 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
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok 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

  • Posts: 43
  • Turrets: +0/-2
Re: Auto CP
« Reply #5 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.

techhead

  • Posts: 1496
  • Turrets: +77/-73
    • My (Virtually) Infinite Source of Knowledge (and Trivia)
Re: Auto CP
« Reply #6 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.
I'm playing Tremulous on a Mac!
MGDev fan-club member
Techhead||TH
/"/""\"\
\"\""/"/
\\:.V.://
Copy and paste Granger into your signature!

BugHuman

  • Posts: 43
  • Turrets: +0/-2
Re: Auto CP
« Reply #7 on: March 12, 2008, 08:18:26 pm »
THANKS SO MUCH ;D and 5000 is how many minutes?
« Last Edit: March 12, 2008, 08:20:09 pm by BugHuman »

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: Auto CP
« Reply #8 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

∧OMG ENTROPY∧

techhead

  • Posts: 1496
  • Turrets: +77/-73
    • My (Virtually) Infinite Source of Knowledge (and Trivia)
Re: Auto CP
« Reply #9 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)
I'm playing Tremulous on a Mac!
MGDev fan-club member
Techhead||TH
/"/""\"\
\"\""/"/
\\:.V.://
Copy and paste Granger into your signature!

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Re: Auto CP
« Reply #10 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.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok 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

  • Posts: 43
  • Turrets: +0/-2
Re: Auto CP
« Reply #11 on: March 15, 2008, 02:39:10 pm »
Who's wrong and why?

pharo212

  • Posts: 70
  • Turrets: +3/-18
Re: Auto CP
« Reply #12 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.

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: Auto CP
« Reply #13 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.
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.