A "map rotation script" is a series of user-generated variables in which each one contains a series of commands which include the command which invokes a new map "map <mapname>" and a command which invokes the next variable as nextmap.
This is a simple map rotation script:
set d1 "map aggressor; set nextmap vstr d2"
set d2 "map oa_dm1; set nextmap vstr d3"
set d3 "map wrackdm17; set nextmap vstr d1" // Restart loop
vstr d1 // first loop start - go to d1
"vstr <variable>" is the command which says to "run" the content of a variable as a command. "//" does simply mean what follows is a "comment". d1, d3, d3 are just the user-generated variables names, they may have been named as you prefer (v1, v2, v3; loopa, loopb, loopc; etc.) as long as you don't use the names of existing variables or commands.
I think a classical approach is to create such scripts in apposite .cfg files with a plain text editor to be uploaded in your <baseoa or mod> folder, so you can pre-configure different scripts and choose which map rotation script to run by just executing the cfg file you wish (e.g. "exec rotation1.cfg" or "exec rotation2.cfg"). Or automatically execute the script at startup by putting it in a file named autoexec.cfg.
However, if you don't want to upload files to the server and you don't need to pre-configure multiple scripts, I suppose you may use the console to create the required "user-created variables" using "seta <variable> <value>" (instead of "set <variable> <value>") and then "writeconfig" to have them saved (user-created variables made with "set" are not saved to config, IIRC). See (
DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/Command_console#Set_variables for more infos on CVARS.
Then, you should just enter "vstr d1" when you will want to launch the script to start the rotation.
Note: IIRC,
changing gametype breaks map rotation scripts (I don't know the reason, but I think it's this way since Q3A - After a gametype change, server admin has to start the rotation again, or the server will continue using the same map forever), so I would suggest to either do not allow voting for gametype, or to use "mappools" ((
DO NOT LINK) h t t p s : / / openarena . wikia . com/wiki/G_autonextmap) instead of "map rotation scripts".