IRC: #woop-clan (Internet Relay Chat channel)

News :: Woop clan

Feed icon

Team setting script (Sauerbraten)

This script, for Sauerbraten, will begin a game and then set teams and continue the game automatically. Useful for any games when your players are getting shuffled around.

Add this to autoexec.cfg:

ssgame = [
    $arg1
    pausegame 1
    ssetteam $arg3 $arg4
    pausegame 0
]
ssetteam = [
    n = (listlen $arg1)
    loop i $n [
       cn = (at $arg1 $i)
       spectator 1 $cn
       setteam $cn good
       spectator 0 $cn
    ]
    n = (listlen $arg2)
    loop i $n [
       cn = (at $arg2 $i)
       spectator 1 $cn
       setteam $cn evil
       spectator 0 $cn
    ]
]

Example usage:

/ssgame [instactf face-capture] "5 1 3" "0 2 4"

This will launch a game of instactf in face-capture and set clients 5, 1, and 3 to team good, and clients 0, 2 and 4 to team evil. To see the client numbers, enter the following:

/showclientnums 1

Don't forget that you need to have admin status on that server, which you can take by using:

/setmaster <password>

Posted on Monday, 8th June 2009 by Drakas
© Woop clan 2017.