// ==============================================================
// QUAKE 4 server.cfg :: riddla@lrctf.com :: http://www.lrctf.com
// cmd line windows: Quake4Ded.exe +exec server.cfg
// cmd line linux: quake4-dedicated +exec server.cfg
// Default UDP ports :: game/punkbuster: 28004 heartbeat: 27650
//===============================================================
//=========
// GAMETYPE
//=========
seta si_gameType "CTF"
//====================
// SERVER INFO - BASIC
//====================
seta si_name "^2www.quake4world.com ^4CTF"
seta g_motd "#quake3world on gamesurge"
//==========
// PASSWORDS
//==========
seta net_serverRemoteConsolePassword "rcon pass here" //change this!
seta si_usepass "0" //enable client password checking
seta g_password "" //leave as blank quotes for an open server
//=================================================
// PUBLIC INFO FOR GAME BROWSERS (self-explanatory)
//=================================================
sets ".Administrator" "admin name here"
sets ".Connection" "connection specs here"
sets ".CPU" "server specs here"
sets ".Clan" "clan name here"
sets ".Email" "address here"
sets ".Hosted by" "host name here"
sets ".Location" "location here"
sets ".Plug" "something witty here, like btw cocks"
sets ".URL" "http://www.quake4world.com"
//=================
// GENERAL SETTINGS
//=================
seta sv_punkbuster "1" //server side punkbuster
seta si_pure "1" //server does not allow any modified paks
seta si_weaponstay "0" //weaponstay on or off (5 sec respawn when off)
seta si_minPlayers "2" //min to start a game (when warmup enabled)
seta si_maxPlayers "12" //max players allowed on server
seta si_spectators "1" //allow spectators or force all to play
seta g_spectatorChat "0" //let spectators talk to everyone during game
seta si_warmup "1" //pre-game warmup
seta si_countdown "30" //pre-game countdown (warmup time)
seta si_fraglimit "0" //frag limit in FFA modes
seta si_timelimit "15" //time limit in minutes for each game
seta si_tourneyLimit "3" //times a map runs before change in tourney
seta si_allowHitscanTint "2" //1=allow in DM only, 2=team-colored
// remove player bob
seta pm_bobpitch "0.0"
seta pm_bobroll "0.0"
seta pm_bobup "0.0"
seta pm_crouchbob "0.0"
seta pm_runbob "0.0"
seta pm_runpitch "0.0"
seta pm_runroll "0.0"
seta pm_walkbob "0.0"
//==================
// TEAMPLAY SETTINGS
//==================
seta si_capturelimit "8" //score limit for CTF
seta si_autobalance "1" //maintain even teams
seta si_shuffle "1" //shuffle teams after each round
seta si_teamDamage "0" //enable or disable team damage
//======
// VOTING
//======
seta si_allowVoting "1" //enable or disable server option voting
seta g_voteFlags "15" //vote flags. mask of votes not allowed on this server:
//1 (bit 0) restart now
//2 (bit 1) time limit
//4 (bit 2) frag limit
//8 (bit 3) game type
//16 (bit 4) kick player
//32 (bit 5) change map
//64 (bit 6) spectators
//128 (bit 7) next map
//========
// NETWORK
//========
seta net_serverAllowServerMod "0" //allow server-side mods
seta net_serverSnapshotDelay "30" //delay between snapshots in milliseconds
seta net_serverMaxClientRate "16000" //max rate to clients in bytes/sec
seta net_clientDownload "1" //pk4 download policy 0=none 1=ask 2=always
seta net_serverDlBaseURL "" //exact URL to folder containing custom pk4 files
seta net_serverDlTable "" //custom pk4 names allowed to download
// master server lists
seta sv_master1 "q4master.idsoftware.com"
seta sv_master2 "master3.idsoftware.com"
//===========
// MAPCYCLING
//===========
seta si_map "mp/q4ctf2"
seta g_mapCycle "mapcycle"
//=================
// START THE SERVER
//=================
spawnserver
//END OF FILE[/code]
[b]服务器地图循环文件 mapcycle.scriptcfg 样本[/b]
[code]/*
map cycling script sample - select with g_mapCycle
the script is purged and reloaded at each map restart
which happens on map change, but also when hitting GAMEON
for persistance, you need to use the {get,set}Persistant functions
files with .scriptcfg extension can be loaded outside of pure paks
*/
namespace mapcycle {
void cycle() {
// config
float cycle_maps = 1; // 1 = cycle through maps in the current game type, 0 = keep the same map
float cycle_gametypes = 0; // 1 = cycle through game types, 0 = keep the same game type
// cycle maps and game types
float replay_count = sys.getPersistantFloat( "replay_count" );
string si_gameType = sys.getcvar( "si_gameType" );
string si_map = sys.getcvar( "si_map" );
sys.println( "cycle: replay_count = " + replay_count );
if ( replay_count <= 0 ) {
// restart n times before next map
replay_count = 2;
// add in custom replay counts here for current game type
if ( si_gameType == "DM" ) {
;
} else if ( si_gameType == "Tourney" ) {
;
} else if ( si_gameType == "Team DM" ) {
;
} else if ( si_gameType == "CTF" ) {
;
} else if ( si_gameType == "Arena CTF" ) {
;
}
}
replay_count--;
sys.setPersistantArg( "replay_count", replay_count );
if ( replay_count <= 0 ) {
// restart n times before next map
if ( cycle_gametypes > 0 ) {
cycle_maps = 1; // we want to make sure that we transition to a proper map for the new gametype
if ( si_gameType == "DM" ) {
sys.setcvar( "si_gameType", "Tourney" );
} else if ( si_gameType == "Tourney" ) {
sys.setcvar( "si_gameType", "Team DM" );
} else if ( si_gameType == "Team DM" ) {
sys.setcvar( "si_gameType", "CTF" );
} else if ( si_gameType == "CTF" ) {
sys.setcvar( "si_gameType", "Arena CTF" );
} else if ( si_gameType == "Arena CTF" ) {
sys.setcvar( "si_gameType", "DM" );
} else {
sys.setcvar( "si_gameType", "DM" );
}
}
if ( cycle_maps > 0 ) {
if ( si_gameType == "DM" || si_gameType == "Team DM" ) {
if ( si_map == "mp/q4dm1" ) {
sys.setcvar( "si_map", "mp/q4dm2" );
} else if ( si_map == "mp/q4dm2" ) {
sys.setcvar( "si_map", "mp/q4dm3" );
} else if ( si_map == "mp/q4dm3" ) {
sys.setcvar( "si_map", "mp/q4dm4" );
} else if ( si_map == "mp/q4dm4" ) {
sys.setcvar( "si_map", "mp/q4dm5" );
} else if ( si_map == "mp/q4dm5" ) {
sys.setcvar( "si_map", "mp/q4dm6" );
} else if ( si_map == "mp/q4dm6" ) {
sys.setcvar( "si_map", "mp/q4dm7" );
} else if ( si_map == "mp/q4dm7" ) {
sys.setcvar( "si_map", "mp/q4dm8" );
} else if ( si_map == "mp/q4dm8" ) {
sys.setcvar( "si_map", "mp/q4ctf5" );
} else {
sys.setcvar( "si_map", "mp/q4dm1" );
}
} else if ( si_gameType == "Tourney" ) {
if ( si_map == "mp/q4dm11v1" ) {
sys.setcvar( "si_map", "mp/q4dm8" );
} else if ( si_map == "mp/q4dm8" ) {
sys.setcvar( "si_map", "mp/q4dm3" );
} else if ( si_map == "mp/q4dm3" ) {
sys.setcvar( "si_map", "mp/q4dm6" );
} else if ( si_map == "mp/q4dm6" ) {
sys.setcvar( "si_map", "mp/q4dm7" );
} else if ( si_map == "mp/q4dm7" ) {
sys.setcvar( "si_map", "mp/q4ctf5" );
} else {
sys.setcvar( "si_map", "mp/q4dm11v1" );
}
} else if ( si_gameType == "CTF" || si_gameType == "Arena CTF" ) {
if ( si_map == "mp/q4ctf1" ) {
sys.setcvar( "si_map", "mp/q4ctf2" );
} else if ( si_map == "mp/q4ctf2" ) {
sys.setcvar( "si_map", "mp/q4ctf3" );
} else if ( si_map == "mp/q4ctf3" ) {
sys.setcvar( "si_map", "mp/q4ctf4" );
} else if ( si_map == "mp/q4ctf4" ) {
sys.setcvar( "si_map", "mp/q4ctf5" );
} else {
sys.setcvar( "si_map", "mp/q4ctf1" );
}
}
}
} else {
sys.say( "map cycle: restarting current map " + replay_count + " more time(s)" );
}
}
}