Just one thing though pasik, still having that issue where if I manually change the maps using the server console and the commands.xml if there are two commands chained together
Hehe, with the in game commands now the double entering is no longer an issue, weird.
OK, here is an (EDITED)auto server restart batch file - restarts the server every 12 hours (currently 0400 and 1600 GMT for the {SAS} Servers) which should help out with the memory leaks that have been reported. (EDIT - once I figure out the AT command I might be able to set a time for restarts )
Code:
@ECHO OFF :START CLS ECHO Starting Server Processes ECHO. TIMEOUT 5 ECHO Starting RWR Standard Server ECHO. e: CD e:/RWR1 START "RWR Standard" rwr_server.exe TIMEOUT 10 ECHO Starting map rotation script ECHO. CD e:/RWR1/modes START "Map Rotation Script" php gamemode_classic.php TIMEOUT 10 ECHO Starting RWR Invasion Server ECHO. CD e:/RWR2 START "RWR Invasion" rwr_server.exe TIMEOUT 10 ECHO Starting invasion script ECHO. CD e:/RWR2/modes START "Invasion Script" php gamemode_invasion.php ECHO 12 Hour Countdown Started ECHO. TIMEOUT 43200 ECHO Killing Servers ECHO. TASKKILL /f /im rwr_server.exe ECHO. TIMEOUT 30 ECHO Restarting servers ECHO. GOTO START
This single command starts both servers and then after 12 hours kills them both and recalls itself to start all over again. Nice and simple.
And just for you DoomMetal, a cut & paste special for in game map changes
class BasicCommandHandler extends Tracker { protected $metagame = NULL;
// -------------------------------------------- function __construct($metagame) { $this->metagame = $metagame; }
// ---------------------------------------------------- protected function handle_chat_event($doc) { // player_id // player_name // message // global $event = $doc->firstChild;
$message = $event->getAttribute("message"); // for the most part, chat events aren't commands, so check that first if (!starts_with($message, "/")) { return; }
$sender = $event->getAttribute("player_name");
// admin only from here on if (!is_admin($sender)) { return; }
// it's a silent server command, check which one if (check_command($message, "test")) { $this->metagame->comms->send("say test yourself");
} else if (check_command($message, "defend")) { // make ai defend only, both sides for ($i = 0; $i < 2; ++$i) { $command = "<command class='commander_ai'" . " faction='" . $i . "'" . " base_defense='1.0'" . " border_defense='0.0'>" . "</command>"; $this->metagame->comms->send($command); } $this->metagame->comms->send("say defensive ai set");
} else if (check_command($message, "grey_win")) { $this->metagame->comms->send("declare_winner 1");
} else if (check_command($message, "map1")) { $this->metagame->comms->send("map1") ;
} else if (check_command($message, "map2")) { $this->metagame->comms->send("map2") ;
} else if (check_command($message, "map3")) { $this->metagame->comms->send("map3") ;
} else if (check_command($message, "map4")) { $this->metagame->comms->send("map4") ;
} else if (check_command($message, "map5")) { $this->metagame->comms->send("map5") ; } }
// -------------------------------------------- function has_ended() { // always on return false; }
// -------------------------------------------- function has_started() { // always on return true; } }
<!-- initial_occupied_bases: 0 for even, make sure all factions' occupied bases sum up to actual base count in the map, or leave at least one as 0 to make it flexible --> </faction>
<!-- make sure you have as much faction settings as there are factions loaded up in the game -->
</command>
If someone would nice enough to modify my basic_command_handler.php file above to include the faction switch and the generate any in-game command code that pasik posted in this thread that would be ace, I have tried a few times but each time I do it I break it
I am having a lot of trouble getting my server running.. Followed the steps just as you said. I'm running on Ubuntu Server. I make a new screen, run ./launch_server and the server launches. Then I run another screen and i do php server_settings_invasion.php, then I go back to the screen with the server and type start_server. The server starts but with none of my settings.. It isn't using any of the php files... What am I doing wrong?
I am having a lot of trouble getting my server running.. Followed the steps just as you said. I'm running on Ubuntu Server. I make a new screen, run ./launch_server and the server launches. Then I run another screen and i do php server_settings_invasion.php, then I go back to the screen with the server and type start_server. The server starts but with none of my settings.. It isn't using any of the php files... What am I doing wrong?
You shouldn't need to manually start the server if your .php scripts are running properly, are you sure you have PHP installed on your system? Not up to speed on Ubuntu Server I am afraid.
I am having a lot of trouble getting my server running.. Followed the steps just as you said. I'm running on Ubuntu Server. I make a new screen, run ./launch_server and the server launches. Then I run another screen and i do php server_settings_invasion.php, then I go back to the screen with the server and type start_server. The server starts but with none of my settings.. It isn't using any of the php files... What am I doing wrong?
You shouldn't need to manually start the server if your .php scripts are running properly, are you sure you have PHP installed on your system? Not up to speed on Ubuntu Server I am afraid.
Yeah I have php installed. What do you mean I shouldn't have to manually start the server? Do you guys have a linux guide available for running the dedicated server on linux?
I am having a lot of trouble getting my server running.. Followed the steps just as you said. I'm running on Ubuntu Server. I make a new screen, run ./launch_server and the server launches. Then I run another screen and i do php server_settings_invasion.php, then I go back to the screen with the server and type start_server. The server starts but with none of my settings.. It isn't using any of the php files... What am I doing wrong?
You shouldn't need to manually start the server if your .php scripts are running properly, are you sure you have PHP installed on your system? Not up to speed on Ubuntu Server I am afraid.
Yeah I have php installed. What do you mean I shouldn't have to manually start the server? Do you guys have a linux guide available for running the dedicated server on linux?
Yup, you don't have to manually call start_server in the server console, the script is supposed to do it for you (script takes over the server console basically, though you can still intervene in there if needed).
The source of the problem would seem to be that you'd need to start the gamemode script, that's the correct entry point, rather than server settings.
So instead of running "php server_settings_invasion.php", try "php gamemode_invasion.php debug_output".
Users browsing this forum: No registered users and 42 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum