Search the Community
Showing results for tags 'Windows'.
-
Installation Instructions: Place 7dServerUtility.exe in the same directory as 7DaysToDie.exe and run once. It will create a default INI file that you will need to modify for your server. Once you have modified the ini, restart the script and enjoy. If you want to use Putty to safely shutdown the server, then visit http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html and download puttytel.exe . Place puttytel.exe in the same directory as 7dServerUtility.exe Remote Restart Instructions: Run 7dServerRemoteRestart.exe from anywhere. It will create a default INI file that you must modify. Modify the INI file and fill in the server IP and Restart Port. Optionally you can fill in the password field and it will save it so you don't have to type it each time. 7dServerUtility.au3 #include #include <Date.au3>#include <Process.au3>;User VariablesIf FileExists("7dServerUtility.ini") Then Local $GamePort = IniRead("7dServerUtility.ini", "GameServerPort", "GamePort", "25000") Local $ConfigFile = IniRead("7dServerUtility.ini", "GameConfigFile", "ConfigFile", "serverconfig.xml") Local $UseRemoteRestart = IniRead("7dServerUtility.ini", "Use_Remote_Restart?yes/no", "UseRemoteRestart", "no") Local $g_IP = IniRead("7dServerUtility.ini", "IP_To_Listen_On", "ListenIP", "127.0.0.1") Local $g_Port = IniRead("7dServerUtility.ini", "Port_To_Listen_On", "ListenPort", "57539") Local $RestartCode = IniRead("7dServerUtility.ini", "Remote_Restart_Password", "RestartCode", "FVtb2DXgp8SYwj7J") Local $RestartDaily= IniRead("7dServerUtility.ini", "Restart_Daily?yes/no", "RestartDaily", "no") Local $HotHour = IniRead("7dServerUtility.ini", "Restart_Time_Hour?00-23", "HotHour", "00") Local $HotMin = IniRead("7dServerUtility.ini", "Restart_Time_Minute?00-59", "HotMin", "01") Local $ExMem = IniRead("7dServerUtility.ini", "Excessive_Memory_Amount", "ExMem", "2000000000") Local $ExMemRestart = IniRead("7dServerUtility.ini", "Restart_On_Excessive_Mem_Use?yes/no", "ExMemRestart", "no")Else IniWrite("7dServerUtility.ini", "GameServerPort", "GamePort", "25000") IniWrite("7dServerUtility.ini", "GameConfigFile", "ConfigFile", "serverconfig.xml") IniWrite("7dServerUtility.ini", "Use_Remote_Restart?yes/no", "UseRemoteRestart", "no") IniWrite("7dServerUtility.ini", "IP_To_Listen_On", "ListenIP", "127.0.0.1") IniWrite("7dServerUtility.ini", "Port_To_Listen_On", "ListenPort", "57539") IniWrite("7dServerUtility.ini", "Remote_Restart_Password", "RestartCode", "FVtb2DXgp8SYwj7J") IniWrite("7dServerUtility.ini", "Restart_Daily?yes/no", "RestartDaily", "no") IniWrite("7dServerUtility.ini", "Restart_Time_Hour?00-23", "HotHour", "00") IniWrite("7dServerUtility.ini", "Restart_Time_Minute?00-59", "HotMin", "01") IniWrite("7dServerUtility.ini", "Excessive_Memory_Amount", "ExMem", "2000000000") IniWrite("7dServerUtility.ini", "Restart_On_Excessive_Mem_Use?yes/no", "ExMemRestart", "no") MsgBox(4096, "Default INI File Made", "Please Modify Default Values and Restart Script") ExitEndIfOnAutoItExitRegister("CloseServer")Func CloseServer() If FileExists(@ScriptDir & "\puttytel.exe") Then $PuttyPort = $GamePort+3 Run(@ScriptDir & "\puttytel.exe -P "& $PuttyPort & " "& $g_IP) WinWait($g_IP &" - PuTTYtel","") Local $CrashCheck = WinWait("PuTTYtel Fatal Error","",5) If $CrashCheck = 0 Then ControlSend($g_IP &" - PuTTYtel", "", "", "{enter}") ControlSend($g_IP &" - PuTTYtel", "", "", "shutdown{enter}") WinWait("PuTTYtel Fatal Error","",10) Local $PID = ProcessExists("puttytel.exe") If $PID Then ProcessClose($PID) EndIf Else Local $PID = ProcessExists("puttytel.exe") Local $PID2 = ProcessExists("7DaysToDie.exe") If $PID Then ProcessClose($PID) EndIf If $PID2 Then ProcessClose($PID2) EndIf EndIf Else Local $PID = ProcessExists("7DaysToDie.exe") If $PID Then ProcessClose($PID) EndIf EndIfEndFuncFunc _TCP_Server_ClientIP($hSocket) Local $pSocketAddress, $aReturn $pSocketAddress = DllStructCreate("short;ushort;uint;char[8]") $aReturn = DllCall("ws2_32.dll", "int", "getpeername", "int", $hSocket, "ptr", DllStructGetPtr($pSocketAddress), "int*", DllStructGetSize($pSocketAddress)) If @error Or $aReturn[0] <> 0 Then Return $hSocket $aReturn = DllCall("ws2_32.dll", "str", "inet_ntoa", "int", DllStructGetData($pSocketAddress, 3)) If @error Then Return $hSocket $pSocketAddress = 0 Return $aReturn[0] EndFunc ;==>_TCP_Server_ClientIPIf $UseRemoteRestart = "yes" Then; Start The TCP ServicesTCPStartup()Local $MainSocket = TCPListen($g_IP, $g_Port, 100)If $MainSocket = -1 Then ExitEndIfwhile True if WinExists("Oops!") Then ControlSend("Oops!", "", "", "{enter}") Sleep (10000) EndIfIf $UseRemoteRestart = "yes" ThenLocal $ConnectedSocket = TCPAccept($MainSocket)If $ConnectedSocket >= 0 Then;TrayTip("Connected","Someone connected to server.",3)$Count = 0While $Count < 30$RECV = TCPRecv($ConnectedSocket,512) If $RECV = $RestartCode Then Local $PID = ProcessExists("7DaysToDie.exe") ; Will return the PID or 0 if the process isn't found. If $PID Then $IP = _TCP_Server_ClientIP($ConnectedSocket) Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\7dServerUtility_RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Restart Requested by Remote Host: "& $IP) ;ProcessClose($PID) CloseServer() Sleep (10000) ExitLoop EndIf EndIf$Count += 1Sleep (1000)WEndIf $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)EndIfEndIfLocal $PID = ProcessExists("7DaysToDie.exe")If $PID = 0 Then Run(@ScriptDir & "\7DaysToDie.exe -quit -batchmode -nographics -configfile="& $ConfigFile &" -dedicated") Sleep (70000)Else Local $MEM = ProcessGetStats($PID, 0) If $MEM[0] > $ExMem And $ExMemRestart = "no" Then FileWriteLine(@ScriptDir & "\7dServerUtility_ExcessiveMemoryLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1]) Sleep (10000) ElseIf $MEM[0] > $ExMem And $ExMemRestart = "yes" Then FileWriteLine(@ScriptDir & "\7dServerUtility_RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Excessive Memory Use - Restart Requested by 7dServerUtility Script") ;ProcessClose($PID) CloseServer() Sleep (10000) EndIfEndIf If @HOUR = $HotHour And @MIN = $HotMin And $RestartDaily = "yes" Then Local $PID = ProcessExists("7DaysToDie.exe") If $PID Then Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\7dServerUtility_RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Daily Restart Requested by 7dServerUtility Script") ;ProcessClose($PID) CloseServer() EndIf Sleep (10000) EndIfSleep (500)WEnd 7dServerRemoteRestart.au3 ; Start The TCP Services ;============================================== TCPStartup() ; Set Some reusable info ;-------------------------- Local $ConnectedSocket, $szDataIf FileExists("7dServerRemoteRestart.ini") Then Local $szIPADDRESS = IniRead("7dServerRemoteRestart.ini", "GameServerIP", "szIPADDRESS", "127.0.0.1") Local $nPORT = IniRead("7dServerRemoteRestart.ini", "RestartServerPort", "nPORT", "57539") Local $RPassword = IniRead("7dServerRemoteRestart.ini", "DefaultRestartPassword", "RPassword", "")Else IniWrite("7dServerRemoteRestart.ini", "GameServerIP", "szIPADDRESS", "127.0.0.1") IniWrite("7dServerRemoteRestart.ini", "RestartServerPort", "nPORT", "57539") IniWrite("7dServerRemoteRestart.ini", "DefaultRestartPassword", "RPassword", "") MsgBox(4096, "Default INI File Made", "Please Modify Default Values and Restart Script") ExitEndIf ; Initialize a variable to represent a connection ;============================================== $ConnectedSocket = -1 ;Attempt to connect to SERVER at its IP and PORT 57539 ;======================================================= $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) ; If there is an error... show it If @error Then MsgBox(4112, "Error", "TCPConnect failed with WSA error: " & @error) ; If there is no error loop an inputbox for data ; to send to the SERVER. Else ;Loop forever asking for data to send to the SERVER While 1 ; InputBox for data to transmit $szData = InputBox("Reset The 7 Days to Die Server", @LF & @LF & "Enter the code to Reset The 7 Days to Die Server:",$RPassword) ; If they cancel the InputBox or leave it blank we exit our forever loop If @error Or $szData = "" Then ExitLoop ; We should have data in $szData... lets attempt to send it through our connected socket. ; convert AutoIt native UTF-16 to UTF-8 TCPSend($ConnectedSocket, StringToBinary($szData, 4)) ExitLoop ; If the send failed with @error then the socket has disconnected ;---------------------------------------------------------------- If @error Then ExitLoop WEnd EndIfIf $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)TCPShutdown()
- 15 comments
-
- 7 Days to Die
- PC
-
(and 2 more)
Tagged with:
-
I modified my Cube World Server Utility to work with 7 Days to Die. I also added a customizable ini file. NOTE! If you do not use the PuttyTel client to restart all restarts are hard restarts. The server process is closed, and it is closed when you exit the script. I have tested this, and it doesn't seem to be affecting save files, but you have been warned. Features: Optional Daily RestartsKeep Server Alive. Restart on CrashLog Excessive Memory UseOption to Restart on Excessive Memory UseOption to Remotely Restart ServerLogs restart request, current memory being used, and if the utility requested or a certain IPSafely shutdown the server through telnet via puttytel.exe and save server dayThe remote restart utility is a separate program. It allows you to connect and remotely restart a server.You can download the 7dServerUtility and 7dServerRemoteRestart compiled exe's HERE. (VirusScan) You can download the 7dServerUtility and 7dServerRemoteRestart AutoIT Source HERE. A special thanks to Nightmarefrom the 7 days to die forum for the telnet info! Installation Instructions: Place 7dServerUtility.exe in the same directory as 7DaysToDie.exe and run once. It will create a default INI file that you will need to modify for your server. Once you have modified the ini, restart the script and enjoy. If you want to use Putty to safely shutdown the server, then visit http://www.chiark.gr...y/download.html and download puttytel.exe . Place puttytel.exe in the same directory as 7dServerUtility.exe Remote Restart Instructions: Run 7dServerRemoteRestart.exe from anywhere. It will create a default INI file that you must modify. Modify the INI file and fill in the server IP and Restart Port. Optionally you can fill in the password field and it will save it so you don't have to type it each time. 7dServerUtility.au3 #include #include <Date.au3>#include <Process.au3>;User VariablesIf FileExists("7dServerUtility.ini") Then Local $GamePort = IniRead("7dServerUtility.ini", "GameServerPort", "GamePort", "25000") Local $ConfigFile = IniRead("7dServerUtility.ini", "GameConfigFile", "ConfigFile", "serverconfig.xml") Local $UseRemoteRestart = IniRead("7dServerUtility.ini", "Use_Remote_Restart?yes/no", "UseRemoteRestart", "no") Local $g_IP = IniRead("7dServerUtility.ini", "IP_To_Listen_On", "ListenIP", "127.0.0.1") Local $g_Port = IniRead("7dServerUtility.ini", "Port_To_Listen_On", "ListenPort", "57539") Local $RestartCode = IniRead("7dServerUtility.ini", "Remote_Restart_Password", "RestartCode", "FVtb2DXgp8SYwj7J") Local $RestartDaily= IniRead("7dServerUtility.ini", "Restart_Daily?yes/no", "RestartDaily", "no") Local $HotHour = IniRead("7dServerUtility.ini", "Restart_Time_Hour?00-23", "HotHour", "00") Local $HotMin = IniRead("7dServerUtility.ini", "Restart_Time_Minute?00-59", "HotMin", "01") Local $ExMem = IniRead("7dServerUtility.ini", "Excessive_Memory_Amount", "ExMem", "2000000000") Local $ExMemRestart = IniRead("7dServerUtility.ini", "Restart_On_Excessive_Mem_Use?yes/no", "ExMemRestart", "no")Else IniWrite("7dServerUtility.ini", "GameServerPort", "GamePort", "25000") IniWrite("7dServerUtility.ini", "GameConfigFile", "ConfigFile", "serverconfig.xml") IniWrite("7dServerUtility.ini", "Use_Remote_Restart?yes/no", "UseRemoteRestart", "no") IniWrite("7dServerUtility.ini", "IP_To_Listen_On", "ListenIP", "127.0.0.1") IniWrite("7dServerUtility.ini", "Port_To_Listen_On", "ListenPort", "57539") IniWrite("7dServerUtility.ini", "Remote_Restart_Password", "RestartCode", "FVtb2DXgp8SYwj7J") IniWrite("7dServerUtility.ini", "Restart_Daily?yes/no", "RestartDaily", "no") IniWrite("7dServerUtility.ini", "Restart_Time_Hour?00-23", "HotHour", "00") IniWrite("7dServerUtility.ini", "Restart_Time_Minute?00-59", "HotMin", "01") IniWrite("7dServerUtility.ini", "Excessive_Memory_Amount", "ExMem", "2000000000") IniWrite("7dServerUtility.ini", "Restart_On_Excessive_Mem_Use?yes/no", "ExMemRestart", "no") MsgBox(4096, "Default INI File Made", "Please Modify Default Values and Restart Script") ExitEndIfOnAutoItExitRegister("CloseServer")Func CloseServer() If FileExists(@ScriptDir & "\puttytel.exe") Then $PuttyPort = $GamePort+3 Run(@ScriptDir & "\puttytel.exe -P "& $PuttyPort & " "& $g_IP) WinWait($g_IP &" - PuTTYtel","") Local $CrashCheck = WinWait("PuTTYtel Fatal Error","",5) If $CrashCheck = 0 Then ControlSend($g_IP &" - PuTTYtel", "", "", "{enter}") ControlSend($g_IP &" - PuTTYtel", "", "", "shutdown{enter}") WinWait("PuTTYtel Fatal Error","",10) Local $PID = ProcessExists("puttytel.exe") If $PID Then ProcessClose($PID) EndIf Else Local $PID = ProcessExists("puttytel.exe") Local $PID2 = ProcessExists("7DaysToDie.exe") If $PID Then ProcessClose($PID) EndIf If $PID2 Then ProcessClose($PID2) EndIf EndIf Else Local $PID = ProcessExists("7DaysToDie.exe") If $PID Then ProcessClose($PID) EndIf EndIfEndFuncFunc _TCP_Server_ClientIP($hSocket) Local $pSocketAddress, $aReturn $pSocketAddress = DllStructCreate("short;ushort;uint;char[8]") $aReturn = DllCall("ws2_32.dll", "int", "getpeername", "int", $hSocket, "ptr", DllStructGetPtr($pSocketAddress), "int*", DllStructGetSize($pSocketAddress)) If @error Or $aReturn[0] <> 0 Then Return $hSocket $aReturn = DllCall("ws2_32.dll", "str", "inet_ntoa", "int", DllStructGetData($pSocketAddress, 3)) If @error Then Return $hSocket $pSocketAddress = 0 Return $aReturn[0] EndFunc ;==>_TCP_Server_ClientIPIf $UseRemoteRestart = "yes" Then; Start The TCP ServicesTCPStartup()Local $MainSocket = TCPListen($g_IP, $g_Port, 100)If $MainSocket = -1 Then ExitEndIfwhile True if WinExists("Oops!") Then ControlSend("Oops!", "", "", "{enter}") Sleep (10000) EndIfIf $UseRemoteRestart = "yes" ThenLocal $ConnectedSocket = TCPAccept($MainSocket)If $ConnectedSocket >= 0 Then;TrayTip("Connected","Someone connected to server.",3)$Count = 0While $Count < 30$RECV = TCPRecv($ConnectedSocket,512) If $RECV = $RestartCode Then Local $PID = ProcessExists("7DaysToDie.exe") ; Will return the PID or 0 if the process isn't found. If $PID Then $IP = _TCP_Server_ClientIP($ConnectedSocket) Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\7dServerUtility_RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Restart Requested by Remote Host: "& $IP) ;ProcessClose($PID) CloseServer() Sleep (10000) ExitLoop EndIf EndIf$Count += 1Sleep (1000)WEndIf $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)EndIfEndIfLocal $PID = ProcessExists("7DaysToDie.exe")If $PID = 0 Then Run(@ScriptDir & "\7DaysToDie.exe -quit -batchmode -nographics -configfile="& $ConfigFile &" -dedicated") Sleep (70000)Else Local $MEM = ProcessGetStats($PID, 0) If $MEM[0] > $ExMem And $ExMemRestart = "no" Then FileWriteLine(@ScriptDir & "\7dServerUtility_ExcessiveMemoryLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1]) Sleep (10000) ElseIf $MEM[0] > $ExMem And $ExMemRestart = "yes" Then FileWriteLine(@ScriptDir & "\7dServerUtility_RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Excessive Memory Use - Restart Requested by 7dServerUtility Script") ;ProcessClose($PID) CloseServer() Sleep (10000) EndIfEndIf If @HOUR = $HotHour And @MIN = $HotMin And $RestartDaily = "yes" Then Local $PID = ProcessExists("7DaysToDie.exe") If $PID Then Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\7dServerUtility_RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Daily Restart Requested by 7dServerUtility Script") ;ProcessClose($PID) CloseServer() EndIf Sleep (10000) EndIfSleep (500)WEnd 7dServerRemoteRestart.au3 ; Start The TCP Services ;============================================== TCPStartup() ; Set Some reusable info ;-------------------------- Local $ConnectedSocket, $szDataIf FileExists("7dServerRemoteRestart.ini") Then Local $szIPADDRESS = IniRead("7dServerRemoteRestart.ini", "GameServerIP", "szIPADDRESS", "127.0.0.1") Local $nPORT = IniRead("7dServerRemoteRestart.ini", "RestartServerPort", "nPORT", "57539") Local $RPassword = IniRead("7dServerRemoteRestart.ini", "DefaultRestartPassword", "RPassword", "")Else IniWrite("7dServerRemoteRestart.ini", "GameServerIP", "szIPADDRESS", "127.0.0.1") IniWrite("7dServerRemoteRestart.ini", "RestartServerPort", "nPORT", "57539") IniWrite("7dServerRemoteRestart.ini", "DefaultRestartPassword", "RPassword", "") MsgBox(4096, "Default INI File Made", "Please Modify Default Values and Restart Script") ExitEndIf ; Initialize a variable to represent a connection ;============================================== $ConnectedSocket = -1 ;Attempt to connect to SERVER at its IP and PORT 57539 ;======================================================= $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) ; If there is an error... show it If @error Then MsgBox(4112, "Error", "TCPConnect failed with WSA error: " & @error) ; If there is no error loop an inputbox for data ; to send to the SERVER. Else ;Loop forever asking for data to send to the SERVER While 1 ; InputBox for data to transmit $szData = InputBox("Reset The 7 Days to Die Server", @LF & @LF & "Enter the code to Reset The 7 Days to Die Server:",$RPassword) ; If they cancel the InputBox or leave it blank we exit our forever loop If @error Or $szData = "" Then ExitLoop ; We should have data in $szData... lets attempt to send it through our connected socket. ; convert AutoIt native UTF-16 to UTF-8 TCPSend($ConnectedSocket, StringToBinary($szData, 4)) ExitLoop ; If the send failed with @error then the socket has disconnected ;---------------------------------------------------------------- If @error Then ExitLoop WEnd EndIfIf $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)TCPShutdown()Click here to view the article
- 15 replies
-
- 7 Days to Die
- PC
-
(and 2 more)
Tagged with:
-
Once the tutorial is complete the rest of the menu is opened and you are free to enjoy all of the games modes. Campaign, Zombie Survival, Wave Survival, Gladiator matches, Base matches, Death matches, even a league of legends like Space Defense League. The graphics are good for an indie title and the sound is excellent, but what really sets this game apart is the story and universe it creates. With a wonderful sense of humor I haven’t felt since the heyday of Sierra’s games Space Quest and King’s Quest, Ring Runner brings you in and doesn't let up until the nitros soaked thrill ride is over. Gameplay can be executed though mouse and keyboard or gamepad. While ship movement does come with a steeper learning curve than most shoot-em ups, it has an even deeper payoff once mastered. The companion novel that can be found on Amazon showcases the rich history and background this new mythos has to offer. Well-crafted and nicely setting the stage for a budding franchise, Derelict Dreams is that rare engaging story you get lost in, and then suddenly realize its 2 A.M. Even if you’re not prone to indie games, this is the kind of franchise you want to get into on the ground floor and ride as far as it goes.
-
Batch File and AutoIT Script designed to work together. The AutoIT Script is not required, but they work better together. There is a stand alone AutoIT Script below that doesn't require the Batch file. Finally, I have included a AutoIT Script to remotely restart the server when used with one of the Server Scripts. The remote restart will require you edit the source of the AutoIT scripts if you wish to change the listening IP, port, and password required for restart. They should work together by default, but you will need to open port 54321 on the Server. ::V1.1-Added Task Kill of AutoIT Script to be used along side batch----------::::V1.0-Initial Version Created. Simple Loop Script for Server Crashes--------::::-----Also added ability to log server to file------------------------------:: Batch File: @ECHO OFFtitle Cube Server Loop Utility::By Dateranoth - July 7, 2013::Used by http://www.gamercide.org on their server.::Feel free to change, adapt, and distribute::Download batch file here-::http://www.dateranoth.com/gamercide/CWServerUtility.zip::V1.1-Added Task Kill of AutoIT Script to be used along side batch----------::::V1.0-Initial Version Created. Simple Loop Script for Server Crashes--------::::-----Also added ability to log server to file------------------------------::::-----------------------------------------------------------------------------------::::--------------------User Variables--------------------------------- ----------------::::-----------------------------------------------------------------------------------::::Set Server.exe Directory (Be sure to include Trailing Slash)SET ServerPath=C:\Games\Cube World\::Set Time between server Failed or Stopped and Server Restarted (in seconds)SET Timer=10::-----------------------------------------------------------------------------------::::----------------Logging Options - Enable Logging Here------------------------------::::-----------------------------------------------------------------------------------::::If Logging is enabled, the Console will not output current server status. ::All status will be written to file. You can check current status through the log file.::Log Server to file containing todays date. (yes or no)set EnableLog=no::LogPath is the path to the folder where the log file will be saved (Be sure to include Trailing Slash)set LogPath=C:\Games\Cube World\Logs\::LogFileExt is the extension to be used set LogFileExt=.log::LogFile is a descriptive name that will be added after the dateset LogFile=CubeWorldServerLog::Include Time In Log File Name? (yes or no)::Including time will create a log file on each Server.exe start. Not including time will create Daily Log files.set IncludeTime=no::Set the format you would like the date to appear on log files. Default is year(%%g)-month(%%e)-day(%%f). Your windows time format may differ.:: If it does or you would like something different then rearrange the parameters below until satisfied. Results will be format1-format2-format3set dateformat1=%%gset dateformat2=%%eset dateformat3=%%f::------------------------------------------------------------------------------------------------------------------------------::::!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!No Setting Changes Below Here!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!::::------------------------------------------------------------------------------------------------------------------------------:::Start::start /wait /min /d "%ServerPath%" Server.exeIF /i %EnableLog%==yes (goto LoggingStart) ELSE (goto NoLogStart):NoLogStartECHO.ECHO Starting Server Loop.ECHO.cd /d "%ServerPath%""%ServerPath%"Server.exegoto RemainingLoop:LoggingStartsetlocalset LogFileName=%LogFile%%LogFileExt%for /f "tokens=1-5 delims=/\ " %%d in ("%date%") do SET Date1=%dateformat1%-%dateformat2%-%dateformat3%for /f "tokens=1-5 delims=: " %%d in ("%time%") do SET Time1=%%d%%eIF /i %IncludeTime%==yes (set MyLogFile=%Date1%--%Time1%) ELSE (set MyLogFile=%Date1%)set MyLogFile=%LogPath%%MyLogFile%_%LogFileName%If NOT Exist "%LogPath%" (goto makelogdirectory) ELSE (goto checknewlog):makelogdirectorymd "%LogPath%"goto checknewlog::Note that the quotes are REQUIRED around %MyLogFIle% in case it contains a space:checknewlogIf NOT Exist "%MyLogFile%" (goto noseparator)Echo.>>"%MyLogFile%"Echo.===================>>"%MyLogFile%":noseparatorecho.%Date% >>"%MyLogFile%"echo.%Time% >>"%MyLogFile%":startbatchECHO.ECHO Starting Server Loop and Logging.ECHO.ECHO.ECHO Server will not display to Console while logging to file is enabled.ECHO.ECHO To check server status, open:ECHO %MyLogFile%ECHO.ECHO Type q to quit.ECHO.cd /d "%ServerPath%""%ServerPath%"Server.exe >> "%MyLogFile%"goto RemainingLoop::Checks if timer has counted down to 0. If so restarts backup:RemainingLoopsetlocal enableDelayedExpansionfor /l %%N in (%Timer% -1 1) do ( set /a "min=%%N/60, sec=%%N%%60, n-=1" if !sec! lss 10 set sec=0!sec! cls choice /c:CR1 /n /m "Server Restart in !min!:!sec! - Press R to Restart Server Now, or C to Cancel. " /t:1 /d:1 if not errorlevel 3 goto :CheckAnswer):CheckAnswerif errorlevel 2 (goto Start) else (goto End)::Shut Down The Batch File.:Endchoice /c:YN /m "Do you really want to quit"If Errorlevel 2 goto StartIf Errorlevel 1 goto Shutdown:Shutdowntaskkill /f /im "CWServerUtility.exe"Exit::Here in case of any major errors.:CatchAllEndpauseExit Autoit Script (Use with Batch): #include <Date.au3>#include <Process.au3>;User VariablesLocal $g_IP = "127.0.0.1" ;IP Restart Command Should Listen OnLocal $g_Port = "54321" ;Port Restart Command Should Listen OnLocal $RestartCode = "Restart" ;Code to Reset Server;End User VariablesLocal $HotMin = "01"If Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer$sInputBoxAnswer = InputBox("Cube World Auto Restart and Daily Restart","What hour of the day do you want to Restart?" & @CRLF & @CRLF & "Note: Please use a number value between 00 and 23" & @CRLF & " 00 means midnight, 14 would be 2pm, etc." & @CRLF,"10", " M2","400","180","350","350","60")SelectCase @Error = 0 ;OK - The string returned is valid Local $HotHour = $sInputBoxAnswerCase @Error = 1 ;The Cancel button was pushed Exit ; finishedCase @Error = 2 ;Timeout Reached Local $HotHour = "10"Case @Error = 3 ;The InputBox failed to open Exit ; finishedEndSelectFunc _TCP_Server_ClientIP($hSocket) Local $pSocketAddress, $aReturn $pSocketAddress = DllStructCreate("short;ushort;uint;char[8]") $aReturn = DllCall("ws2_32.dll", "int", "getpeername", "int", $hSocket, "ptr", DllStructGetPtr($pSocketAddress), "int*", DllStructGetSize($pSocketAddress)) If @error Or $aReturn[0] <> 0 Then Return $hSocket $aReturn = DllCall("ws2_32.dll", "str", "inet_ntoa", "int", DllStructGetData($pSocketAddress, 3)) If @error Then Return $hSocket $pSocketAddress = 0 Return $aReturn[0] EndFunc ;==>_TCP_Server_ClientIP; Start The TCP ServicesTCPStartup()Local $MainSocket = TCPListen($g_IP, $g_Port, 100)If $MainSocket = -1 Then Exitwhile True if WinExists("Server.exe") Then ControlSend("Server.exe", "", "", "{enter}") Sleep (10000) EndIfIf Not WinExists("Cube Server Loop Utility") Then ;Run(@ScriptDir & "\Server.exe") Run(@ComSpec & " /c " & 'CWServerUtility.bat', @ScriptDir) Sleep (10000)EndIFLocal $ConnectedSocket = TCPAccept($MainSocket)If $ConnectedSocket >= 0 Then;TrayTip("Connected","Someone connected to server.",3)$Count = 0While $Count < 30$RECV = TCPRecv($ConnectedSocket,512) If $RECV = $RestartCode Then Local $PID = ProcessExists("Server.exe") ; Will return the PID or 0 if the process isn't found. If $PID Then $IP = _TCP_Server_ClientIP($ConnectedSocket) Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Restart Requested by Remote Host: "& $IP) ProcessClose($PID) Sleep (10000) ExitLoop EndIf EndIf$Count += 1Sleep (1000)WEndIf $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)EndIf Local $PID = ProcessExists("Server.exe") If $PID Then Local $MEM = ProcessGetStats($PID, 0) If $MEM[0] > 600000000 Then FileWriteLine(@ScriptDir & "\ExcessiveMemoryLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1]) Sleep (10000) ;ElseIf $MEM[0] > 700000000 Then ;ProcessClose($PID) ;ControlSend("Cube Server Loop Utility", "", "", "q {enter}") ;Sleep (10000) EndIfEndIf If @HOUR = $HotHour And @MIN = $HotMin Then Local $PID = ProcessExists("Server.exe") If $PID Then Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Restart Requested by CWServerUtility Script") ;ControlSend("Cube Server Loop Utility", "", "", "q {enter}") ProcessClose($PID) EndIf Sleep (70000) EndIfSleep (500)WEnd AutoIT Script (Stand Alone . No Batch File Required) #include <Date.au3>#include <Process.au3>;User VariablesLocal $g_IP = "127.0.0.1" ;IP Restart Command Should Listen OnLocal $g_Port = "54321" ;Port Restart Command Should Listen OnLocal $RestartCode = "Restart" ;Code to Reset Server;End User VariablesLocal $HotMin = "01"If Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer$sInputBoxAnswer = InputBox("Cube World Auto Restart and Daily Restart","What hour of the day do you want to Restart?" & @CRLF & @CRLF & "Note: Please use a number value between 00 and 23" & @CRLF & " 00 means midnight, 14 would be 2pm, etc." & @CRLF,"10", " M2","400","180","350","350","60")SelectCase @Error = 0 ;OK - The string returned is valid Local $HotHour = $sInputBoxAnswerCase @Error = 1 ;The Cancel button was pushed Exit ; finishedCase @Error = 2 ;Timeout Reached Local $HotHour = "10"Case @Error = 3 ;The InputBox failed to open Exit ; finishedEndSelectFunc _TCP_Server_ClientIP($hSocket) Local $pSocketAddress, $aReturn $pSocketAddress = DllStructCreate("short;ushort;uint;char[8]") $aReturn = DllCall("ws2_32.dll", "int", "getpeername", "int", $hSocket, "ptr", DllStructGetPtr($pSocketAddress), "int*", DllStructGetSize($pSocketAddress)) If @error Or $aReturn[0] <> 0 Then Return $hSocket $aReturn = DllCall("ws2_32.dll", "str", "inet_ntoa", "int", DllStructGetData($pSocketAddress, 3)) If @error Then Return $hSocket $pSocketAddress = 0 Return $aReturn[0] EndFunc ;==>_TCP_Server_ClientIP; Start The TCP ServicesTCPStartup()Local $MainSocket = TCPListen($g_IP, $g_Port, 100)If $MainSocket = -1 Then Exitwhile True if WinExists("Server.exe") Then ControlSend("Server.exe", "", "", "{enter}") Sleep (10000) EndIfLocal $ConnectedSocket = TCPAccept($MainSocket)If $ConnectedSocket >= 0 Then;TrayTip("Connected","Someone connected to server.",3)$Count = 0While $Count < 30$RECV = TCPRecv($ConnectedSocket,512) If $RECV = $RestartCode Then Local $PID = ProcessExists("Server.exe") ; Will return the PID or 0 if the process isn't found. If $PID Then $IP = _TCP_Server_ClientIP($ConnectedSocket) Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Restart Requested by Remote Host: "& $IP) ProcessClose($PID) Sleep (10000) ExitLoop EndIf EndIf$Count += 1Sleep (1000)WEndIf $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)EndIfLocal $PID = ProcessExists("Server.exe")If $PID = 0 Then Run(@ComSpec & " /c " & 'Server.exe', @ScriptDir) Sleep (70000)Else Local $MEM = ProcessGetStats($PID, 0) If $MEM[0] > 600000000 Then FileWriteLine(@ScriptDir & "\ExcessiveMemoryLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1]) Sleep (10000) ;ElseIf $MEM[0] > 700000000 Then ;ProcessClose($PID) ;Sleep (10000) EndIfEndIf If @HOUR = $HotHour And @MIN = $HotMin Then Local $PID = ProcessExists("Server.exe") If $PID Then Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Restart Requested by CWServerUtility Script") ProcessClose($PID) EndIf Sleep (10000) EndIfSleep (500)WEnd Remote Server Restart AutoIT Script (Not required for either utility) ; Start The TCP Services ;============================================== TCPStartup() ; Set Some reusable info ;-------------------------- Local $ConnectedSocket, $szData ; Set $szIPADDRESS to wherever the SERVER is. We will change a PC name into an IP Address ; Local $szServerPC = @ComputerName ;Local $szIPADDRESS = "127.0.0.1" ;@IPAddress1 ;Local $szIPADDRESS = TCPNameToIP("gamercide.org") Local $nPORT = 54321 ;Change If you change Server PortIf Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer$sInputBoxAnswer = InputBox("Cube World Remote Restart","What is the IP of the Server you wish to Restart?" & @CRLF & @CRLF & "Note: Please use IPv4 Only!" & @CRLF & " Example: 127.0.0.1" & @CRLF,"127.0.0.1", " ","400","180","350","350","60")SelectCase @Error = 0 ;OK - The string returned is valid Local $szIPADDRESS = $sInputBoxAnswerCase @Error = 1 ;The Cancel button was pushed Exit ; finishedCase @Error = 2 ;Timeout Reached Local $szIPADDRESS = "127.0.0.1"Case @Error = 3 ;The InputBox failed to open Exit ; finishedEndSelect ; Initialize a variable to represent a connection ;============================================== $ConnectedSocket = -1 ;Attempt to connect to SERVER at its IP and PORT 54321 ;======================================================= $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) ; If there is an error... show it If @error Then MsgBox(4112, "Error", "TCPConnect failed with WSA error: " & @error) ; If there is no error loop an inputbox for data ; to send to the SERVER. Else ;Loop forever asking for data to send to the SERVER While 1 ; InputBox for data to transmit $szData = InputBox("Reset The CW Server", @LF & @LF & "Enter the code to Reset The CW Server:") ; If they cancel the InputBox or leave it blank we exit our forever loop If @error Or $szData = "" Then ExitLoop ; We should have data in $szData... lets attempt to send it through our connected socket. ; convert AutoIt native UTF-16 to UTF-8 TCPSend($ConnectedSocket, StringToBinary($szData, 4)) ExitLoop ; If the send failed with @error then the socket has disconnected ;---------------------------------------------------------------- If @error Then ExitLoop WEnd EndIfIf $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)TCPShutdown()
-
Updated July 20, 2013! Utility for logging Cube World Server, restarting daily, restarting on crashes, closing crash window, and remotely restarting. Download Utility Here (Logging Batch File and AutoIT Script) Download Stand Alone AutoIT Script Here (No Batch File Required) Download Remote Restart Utility Here (Requires one of the AutoIT Scripts to be running. Allows Server to be remotely Restarted)Batch File and AutoIT Script designed to work together. The AutoIT Script is not required, but they work better together. There is a stand alone AutoIT Script below that doesn't require the Batch file. Finally, I have included a AutoIT Script to remotely restart the server when used with one of the Server Scripts. The remote restart will require you edit the source of the AutoIT scripts if you wish to change the listening IP, port, and password required for restart. They should work together by default, but you will need to open port 54321 on the Server. ::V1.1-Added Task Kill of AutoIT Script to be used along side batch----------::::V1.0-Initial Version Created. Simple Loop Script for Server Crashes--------::::-----Also added ability to log server to file------------------------------::Batch File:@ECHO OFFtitle Cube Server Loop Utility::By Dateranoth - July 7, 2013::Used by http://www.gamercide.org on their server.::Feel free to change, adapt, and distribute::Download batch file here-::http://www.dateranoth.com/gamercide/CWServerUtility.zip::V1.1-Added Task Kill of AutoIT Script to be used along side batch----------::::V1.0-Initial Version Created. Simple Loop Script for Server Crashes--------::::-----Also added ability to log server to file------------------------------::::-----------------------------------------------------------------------------------::::--------------------User Variables--------------------------------- ----------------::::-----------------------------------------------------------------------------------::::Set Server.exe Directory (Be sure to include Trailing Slash)SET ServerPath=C:\Games\Cube World\::Set Time between server Failed or Stopped and Server Restarted (in seconds)SET Timer=10::-----------------------------------------------------------------------------------::::----------------Logging Options - Enable Logging Here------------------------------::::-----------------------------------------------------------------------------------::::If Logging is enabled, the Console will not output current server status. ::All status will be written to file. You can check current status through the log file.::Log Server to file containing todays date. (yes or no)set EnableLog=no::LogPath is the path to the folder where the log file will be saved (Be sure to include Trailing Slash)set LogPath=C:\Games\Cube World\Logs\::LogFileExt is the extension to be used set LogFileExt=.log::LogFile is a descriptive name that will be added after the dateset LogFile=CubeWorldServerLog::Include Time In Log File Name? (yes or no)::Including time will create a log file on each Server.exe start. Not including time will create Daily Log files.set IncludeTime=no::Set the format you would like the date to appear on log files. Default is year(%%g)-month(%%e)-day(%%f). Your windows time format may differ.:: If it does or you would like something different then rearrange the parameters below until satisfied. Results will be format1-format2-format3set dateformat1=%%gset dateformat2=%%eset dateformat3=%%f::------------------------------------------------------------------------------------------------------------------------------::::!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!No Setting Changes Below Here!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!::::------------------------------------------------------------------------------------------------------------------------------:::Start::start /wait /min /d "%ServerPath%" Server.exeIF /i %EnableLog%==yes (goto LoggingStart) ELSE (goto NoLogStart):NoLogStartECHO.ECHO Starting Server Loop.ECHO.cd /d "%ServerPath%""%ServerPath%"Server.exegoto RemainingLoop:LoggingStartsetlocalset LogFileName=%LogFile%%LogFileExt%for /f "tokens=1-5 delims=/\ " %%d in ("%date%") do SET Date1=%dateformat1%-%dateformat2%-%dateformat3%for /f "tokens=1-5 delims=: " %%d in ("%time%") do SET Time1=%%d%%eIF /i %IncludeTime%==yes (set MyLogFile=%Date1%--%Time1%) ELSE (set MyLogFile=%Date1%)set MyLogFile=%LogPath%%MyLogFile%_%LogFileName%If NOT Exist "%LogPath%" (goto makelogdirectory) ELSE (goto checknewlog):makelogdirectorymd "%LogPath%"goto checknewlog::Note that the quotes are REQUIRED around %MyLogFIle% in case it contains a space:checknewlogIf NOT Exist "%MyLogFile%" (goto noseparator)Echo.>>"%MyLogFile%"Echo.===================>>"%MyLogFile%":noseparatorecho.%Date% >>"%MyLogFile%"echo.%Time% >>"%MyLogFile%":startbatchECHO.ECHO Starting Server Loop and Logging.ECHO.ECHO.ECHO Server will not display to Console while logging to file is enabled.ECHO.ECHO To check server status, open:ECHO %MyLogFile%ECHO.ECHO Type q to quit.ECHO.cd /d "%ServerPath%""%ServerPath%"Server.exe >> "%MyLogFile%"goto RemainingLoop::Checks if timer has counted down to 0. If so restarts backup:RemainingLoopsetlocal enableDelayedExpansionfor /l %%N in (%Timer% -1 1) do ( set /a "min=%%N/60, sec=%%N%%60, n-=1" if !sec! lss 10 set sec=0!sec! cls choice /c:CR1 /n /m "Server Restart in !min!:!sec! - Press R to Restart Server Now, or C to Cancel. " /t:1 /d:1 if not errorlevel 3 goto :CheckAnswer):CheckAnswerif errorlevel 2 (goto Start) else (goto End)::Shut Down The Batch File.:Endchoice /c:YN /m "Do you really want to quit"If Errorlevel 2 goto StartIf Errorlevel 1 goto Shutdown:Shutdowntaskkill /f /im "CWServerUtility.exe"Exit::Here in case of any major errors.:CatchAllEndpauseExitAutoit Script (Use with Batch): #include <Date.au3>#include <Process.au3>;User VariablesLocal $g_IP = "127.0.0.1" ;IP Restart Command Should Listen OnLocal $g_Port = "54321" ;Port Restart Command Should Listen OnLocal $RestartCode = "Restart" ;Code to Reset Server;End User VariablesLocal $HotMin = "01"If Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer$sInputBoxAnswer = InputBox("Cube World Auto Restart and Daily Restart","What hour of the day do you want to Restart?" & @CRLF & @CRLF & "Note: Please use a number value between 00 and 23" & @CRLF & " 00 means midnight, 14 would be 2pm, etc." & @CRLF,"10", " M2","400","180","350","350","60")SelectCase @Error = 0 ;OK - The string returned is valid Local $HotHour = $sInputBoxAnswerCase @Error = 1 ;The Cancel button was pushed Exit ; finishedCase @Error = 2 ;Timeout Reached Local $HotHour = "10"Case @Error = 3 ;The InputBox failed to open Exit ; finishedEndSelectFunc _TCP_Server_ClientIP($hSocket) Local $pSocketAddress, $aReturn $pSocketAddress = DllStructCreate("short;ushort;uint;char[8]") $aReturn = DllCall("ws2_32.dll", "int", "getpeername", "int", $hSocket, "ptr", DllStructGetPtr($pSocketAddress), "int*", DllStructGetSize($pSocketAddress)) If @error Or $aReturn[0] <> 0 Then Return $hSocket $aReturn = DllCall("ws2_32.dll", "str", "inet_ntoa", "int", DllStructGetData($pSocketAddress, 3)) If @error Then Return $hSocket $pSocketAddress = 0 Return $aReturn[0] EndFunc ;==>_TCP_Server_ClientIP; Start The TCP ServicesTCPStartup()Local $MainSocket = TCPListen($g_IP, $g_Port, 100)If $MainSocket = -1 Then Exitwhile True if WinExists("Server.exe") Then ControlSend("Server.exe", "", "", "{enter}") Sleep (10000) EndIfIf Not WinExists("Cube Server Loop Utility") Then ;Run(@ScriptDir & "\Server.exe") Run(@ComSpec & " /c " & 'CWServerUtility.bat', @ScriptDir) Sleep (10000)EndIFLocal $ConnectedSocket = TCPAccept($MainSocket)If $ConnectedSocket >= 0 Then;TrayTip("Connected","Someone connected to server.",3)$Count = 0While $Count < 30$RECV = TCPRecv($ConnectedSocket,512) If $RECV = $RestartCode Then Local $PID = ProcessExists("Server.exe") ; Will return the PID or 0 if the process isn't found. If $PID Then $IP = _TCP_Server_ClientIP($ConnectedSocket) Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Restart Requested by Remote Host: "& $IP) ProcessClose($PID) Sleep (10000) ExitLoop EndIf EndIf$Count += 1Sleep (1000)WEndIf $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)EndIf Local $PID = ProcessExists("Server.exe") If $PID Then Local $MEM = ProcessGetStats($PID, 0) If $MEM[0] > 600000000 Then FileWriteLine(@ScriptDir & "\ExcessiveMemoryLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1]) Sleep (10000) ;ElseIf $MEM[0] > 700000000 Then ;ProcessClose($PID) ;ControlSend("Cube Server Loop Utility", "", "", "q {enter}") ;Sleep (10000) EndIfEndIf If @HOUR = $HotHour And @MIN = $HotMin Then Local $PID = ProcessExists("Server.exe") If $PID Then Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Restart Requested by CWServerUtility Script") ;ControlSend("Cube Server Loop Utility", "", "", "q {enter}") ProcessClose($PID) EndIf Sleep (70000) EndIfSleep (500)WEnd AutoIT Script (Stand Alone . No Batch File Required)#include <Date.au3>#include <Process.au3>;User VariablesLocal $g_IP = "127.0.0.1" ;IP Restart Command Should Listen OnLocal $g_Port = "54321" ;Port Restart Command Should Listen OnLocal $RestartCode = "Restart" ;Code to Reset Server;End User VariablesLocal $HotMin = "01"If Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer$sInputBoxAnswer = InputBox("Cube World Auto Restart and Daily Restart","What hour of the day do you want to Restart?" & @CRLF & @CRLF & "Note: Please use a number value between 00 and 23" & @CRLF & " 00 means midnight, 14 would be 2pm, etc." & @CRLF,"10", " M2","400","180","350","350","60")SelectCase @Error = 0 ;OK - The string returned is valid Local $HotHour = $sInputBoxAnswerCase @Error = 1 ;The Cancel button was pushed Exit ; finishedCase @Error = 2 ;Timeout Reached Local $HotHour = "10"Case @Error = 3 ;The InputBox failed to open Exit ; finishedEndSelectFunc _TCP_Server_ClientIP($hSocket) Local $pSocketAddress, $aReturn $pSocketAddress = DllStructCreate("short;ushort;uint;char[8]") $aReturn = DllCall("ws2_32.dll", "int", "getpeername", "int", $hSocket, "ptr", DllStructGetPtr($pSocketAddress), "int*", DllStructGetSize($pSocketAddress)) If @error Or $aReturn[0] <> 0 Then Return $hSocket $aReturn = DllCall("ws2_32.dll", "str", "inet_ntoa", "int", DllStructGetData($pSocketAddress, 3)) If @error Then Return $hSocket $pSocketAddress = 0 Return $aReturn[0] EndFunc ;==>_TCP_Server_ClientIP; Start The TCP ServicesTCPStartup()Local $MainSocket = TCPListen($g_IP, $g_Port, 100)If $MainSocket = -1 Then Exitwhile True if WinExists("Server.exe") Then ControlSend("Server.exe", "", "", "{enter}") Sleep (10000) EndIfLocal $ConnectedSocket = TCPAccept($MainSocket)If $ConnectedSocket >= 0 Then;TrayTip("Connected","Someone connected to server.",3)$Count = 0While $Count < 30$RECV = TCPRecv($ConnectedSocket,512) If $RECV = $RestartCode Then Local $PID = ProcessExists("Server.exe") ; Will return the PID or 0 if the process isn't found. If $PID Then $IP = _TCP_Server_ClientIP($ConnectedSocket) Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Restart Requested by Remote Host: "& $IP) ProcessClose($PID) Sleep (10000) ExitLoop EndIf EndIf$Count += 1Sleep (1000)WEndIf $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)EndIfLocal $PID = ProcessExists("Server.exe")If $PID = 0 Then Run(@ComSpec & " /c " & 'Server.exe', @ScriptDir) Sleep (70000)Else Local $MEM = ProcessGetStats($PID, 0) If $MEM[0] > 600000000 Then FileWriteLine(@ScriptDir & "\ExcessiveMemoryLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1]) Sleep (10000) ;ElseIf $MEM[0] > 700000000 Then ;ProcessClose($PID) ;Sleep (10000) EndIfEndIf If @HOUR = $HotHour And @MIN = $HotMin Then Local $PID = ProcessExists("Server.exe") If $PID Then Local $MEM = ProcessGetStats($PID, 0) FileWriteLine(@ScriptDir & "\RestartLog.txt", @MON &"-"& @MDAY &"-"& @YEAR &" "& @HOUR &":"& @MIN &" --Work Memory:"& $MEM[0] & _ " --Peak Memory:"& $MEM[1] &" Restart Requested by CWServerUtility Script") ProcessClose($PID) EndIf Sleep (10000) EndIfSleep (500)WEnd Remote Server Restart AutoIT Script (Not required for either utility) ; Start The TCP Services ;============================================== TCPStartup() ; Set Some reusable info ;-------------------------- Local $ConnectedSocket, $szData ; Set $szIPADDRESS to wherever the SERVER is. We will change a PC name into an IP Address ; Local $szServerPC = @ComputerName ;Local $szIPADDRESS = "127.0.0.1" ;@IPAddress1 ;Local $szIPADDRESS = TCPNameToIP("gamercide.org") Local $nPORT = 54321 ;Change If you change Server PortIf Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer$sInputBoxAnswer = InputBox("Cube World Remote Restart","What is the IP of the Server you wish to Restart?" & @CRLF & @CRLF & "Note: Please use IPv4 Only!" & @CRLF & " Example: 127.0.0.1" & @CRLF,"127.0.0.1", " ","400","180","350","350","60")SelectCase @Error = 0 ;OK - The string returned is valid Local $szIPADDRESS = $sInputBoxAnswerCase @Error = 1 ;The Cancel button was pushed Exit ; finishedCase @Error = 2 ;Timeout Reached Local $szIPADDRESS = "127.0.0.1"Case @Error = 3 ;The InputBox failed to open Exit ; finishedEndSelect ; Initialize a variable to represent a connection ;============================================== $ConnectedSocket = -1 ;Attempt to connect to SERVER at its IP and PORT 54321 ;======================================================= $ConnectedSocket = TCPConnect($szIPADDRESS, $nPORT) ; If there is an error... show it If @error Then MsgBox(4112, "Error", "TCPConnect failed with WSA error: " & @error) ; If there is no error loop an inputbox for data ; to send to the SERVER. Else ;Loop forever asking for data to send to the SERVER While 1 ; InputBox for data to transmit $szData = InputBox("Reset The CW Server", @LF & @LF & "Enter the code to Reset The CW Server:") ; If they cancel the InputBox or leave it blank we exit our forever loop If @error Or $szData = "" Then ExitLoop ; We should have data in $szData... lets attempt to send it through our connected socket. ; convert AutoIt native UTF-16 to UTF-8 TCPSend($ConnectedSocket, StringToBinary($szData, 4)) ExitLoop ; If the send failed with @error then the socket has disconnected ;---------------------------------------------------------------- If @error Then ExitLoop WEnd EndIfIf $ConnectedSocket <> -1 Then TCPCloseSocket($ConnectedSocket)TCPShutdown()Click here to view the article
-
As I said, I have never touched a Dead Island game before and I was worried I wouldn’t be the right person to review its follow-up, however after playing the game; I think my fears were unwarranted. While the game isn’t great, it’s not terrible by any means. The visceral feeling of dismembering zombies with all sorts of weapons really works, especially in co-op. There are tons of quests, environments, weapons, and zombie types to keep things fresh throughout. Also, the character progression system is much like other games of the type and gives you the “One More Level” feeling that any good game should. You will find yourself up to the wee hours of the morning before you know it. The game features, as expected, 4 player co-op and this is where the game really shines. I was only able to test it out with 2 players, but what I can imagine 4 players would only enhance the experience greatly. The character classes complement each other so well. I chose Sam B. and my co-op partner was Xian. Where Xian would work to sneak behind the zombies to use her bladed weapons with sneak attacks, I would face them head on and bash their heads in with mainly blunt weapons. The co-op is also great because no matter your level, you will always be fighting zombies at your same level. While your partner, who may be at a lower/higher level than you, will be fighting zombies at their same level. I’ve read this was patched in to the original game later and really is a good feature. This allows you to play with your buddies and keeps you from managing multiple characters at various levels. Now, you may have noticed I have yet to mention anything about the story in Dead Island Riptide. This is for good reason and brings me to my first issue with the game. The story is useless here and very much seems like an afterthought. Almost as if the game and environment were created and the story was tacked on later. Picking up where the first game left off and moving the survivors (And a new survivor apparently) to a new island full of rampaging zombies just isn’t inventive or taking any type of story leap. The cut scenes move the story along fairly well. Voice acting is mixed here. Some are quite good, others are just awful. A useless story isn’t always a bad thing though. In this case, strategizing before heading out on a mission can be done at almost any time without worrying about missing anything in a cut scene or during dialogue. Speaking of cut scenes, this brings me to my next semi-gripe with the game. It’s not pretty. Screen tearing, texture pop in/out, frame drop issues, etc all plague the game. It doesn’t ever become a real problem, but in today’s gaming world, these things shouldn’t ever be an issue. Reports online show that the PS3 shows the most problems and the PC is the most solid overall. Playing on the Xbox 360 did show some of these issues but I’ve not run in to anything game breaking. Being an RPG, Riptide succeeds in keeping you busy. Story missions, side quests, team missions, and just general exploration keeps you from ever getting bored while on the island. All these things keep the game fun and help you to ignore its shortcomings. I think if these weren’t there the game would fare much worse. The only stumble the game makes in this area is not giving you an open world to explore after you complete the game. Be sure to get your missions done prior to making the push to the end. Overall Dead Island Riptide is a solid RPG. Never playing the first game doesn’t pose any problems and honestly may help some to overlook some of the issues. Graphically the game isn’t a stunner, which is extremely disappointing in today’s gaming climate. Also, the story really needs to be looked at for any more sequels. Hopefully it can be salvaged down the line. However, the game play actually saves the day. Dismembering zombies with buddies and having an overflowing quest log of things to do is great fun. In summation, Dead Island Riptide is a decent game. If you’re looking for something fun to play with friends or are a fan of the first game, I’d recommend picking this one up.
-
Developed by: Techland Published by: Deep Silver Distributed by: Square Enix Platforms: PC, Xbox 360, PS3 Release Date: April 23, 2013 Available on Steam for $39.99 Physical Copy Available for $49.99 Dead Island Riptide is the follow up to the 2011 game Dead Island. The original was fairly well received and sold very well. That said I’ve never touched the original game. Will this be a hindrance or a blessing for Riptide? Read on and find out if I had as much fun bashing zombies around as most or if I put down my machete and walked away disappointed. As I said, I have never touched a Dead Island game before and I was worried I wouldn’t be the right person to review its follow-up, however after playing the game; I think my fears were unwarranted. While the game isn’t great, it’s not terrible by any means. The visceral feeling of dismembering zombies with all sorts of weapons really works, especially in co-op. There are tons of quests, environments, weapons, and zombie types to keep things fresh throughout. Also, the character progression system is much like other games of the type and gives you the “One More Level” feeling that any good game should. You will find yourself up to the wee hours of the morning before you know it. The game features, as expected, 4 player co-op and this is where the game really shines. I was only able to test it out with 2 players, but what I can imagine 4 players would only enhance the experience greatly. The character classes complement each other so well. I chose Sam B. and my co-op partner was Xian. Where Xian would work to sneak behind the zombies to use her bladed weapons with sneak attacks, I would face them head on and bash their heads in with mainly blunt weapons. The co-op is also great because no matter your level, you will always be fighting zombies at your same level. While your partner, who may be at a lower/higher level than you, will be fighting zombies at their same level. I’ve read this was patched in to the original game later and really is a good feature. This allows you to play with your buddies and keeps you from managing multiple characters at various levels. Now, you may have noticed I have yet to mention anything about the story in Dead Island Riptide. This is for good reason and brings me to my first issue with the game. The story is useless here and very much seems like an afterthought. Almost as if the game and environment were created and the story was tacked on later. Picking up where the first game left off and moving the survivors (And a new survivor apparently) to a new island full of rampaging zombies just isn’t inventive or taking any type of story leap. The cut scenes move the story along fairly well. Voice acting is mixed here. Some are quite good, others are just awful. A useless story isn’t always a bad thing though. In this case, strategizing before heading out on a mission can be done at almost any time without worrying about missing anything in a cut scene or during dialogue. Speaking of cut scenes, this brings me to my next semi-gripe with the game. It’s not pretty. Screen tearing, texture pop in/out, frame drop issues, etc all plague the game. It doesn’t ever become a real problem, but in today’s gaming world, these things shouldn’t ever be an issue. Reports online show that the PS3 shows the most problems and the PC is the most solid overall. Playing on the Xbox 360 did show some of these issues but I’ve not run in to anything game breaking. Being an RPG, Riptide succeeds in keeping you busy. Story missions, side quests, team missions, and just general exploration keeps you from ever getting bored while on the island. All these things keep the game fun and help you to ignore its shortcomings. I think if these weren’t there the game would fare much worse. The only stumble the game makes in this area is not giving you an open world to explore after you complete the game. Be sure to get your missions done prior to making the push to the end. Overall Dead Island Riptide is a solid RPG. Never playing the first game doesn’t pose any problems and honestly may help some to overlook some of the issues. Graphically the game isn’t a stunner, which is extremely disappointing in today’s gaming climate. Also, the story really needs to be looked at for any more sequels. Hopefully it can be salvaged down the line. However, the game play actually saves the day. Dismembering zombies with buddies and having an overflowing quest log of things to do is great fun. In summation, Dead Island Riptide is a decent game. If you’re looking for something fun to play with friends or are a fan of the first game, I’d recommend picking this one up. Click here to view the article
-
AirBuccaneers originally was conceived back in 2004 as a mod within Unreal Tournament III during Epic's "Make Something Unreal" contest. Now almost ten years later a new and improved standalone version has graced my PC's hard drive and I have to admit to you I'm completely hooked! There is just something so mind-bogglingly satisfying about taking to the skies in a hot air balloon of death and watching your enemies plummet to the ground in a fiery blaze after a hail of cannon fire. Original Unreal Tournament III screenshot. The game, while simple in premise, offers enough diversity to keep you occupied for a long time. Once you've selected your side, Viking or Buccaneer, you're thrown into a match and set off on your conquest to destroy your opponents and their ships. There really isn't any ground combat to speak of here, unless your enemies somehow manage to get close enough to your base to spawn camp you, so expect to spend practically all your time upon one of AirBuccaneer's four available ships. The fragile Kamikaze ship that explodes on impact. A balloon with no cannons who's pilot must maneuver through enemy cannon fire in order to bring down other balloons with a single blast. Generally piloted by a single player, although some brave souls may attempt to catch a ride with you leading usually to hilarious results. The single cannoned Cog ship. A small balloon usually reserved for two, helmsman and gunner. The mighty Battleship. This larger balloon, which I like to refer to as the "Party Boat", comes complete with a total of four cannons. A competent and complete crew can make this ship a force to be feared! The Flying Fortress. This huge floating island ship has three absolutely huge and devastating long range cannons. Unable to move unless using the "boost" ability, this ship is tricky to pilot and deadly when positioned properly. Yeah, I call it the "Party Boat" for a reason! AirBuccaneers is best played as a team game, and attempting to take on your enemies alone is almost always a recipe for doom (unless you're "that guy" who always takes the Kamikaze!). You'll need to coordinate with your team to make sure your balloon is manned properly. What good is your balloon if you don't have someone to fire the cannons as you fly? How are you going to keep your ship in the air unless you have a pal swinging his support staff (which I jokingly refer to as the "baby rattle") away to repair your hull? Those incoming cannonballs and air mines are going to put a hurt on you unless you have someone using their musket to knock them away! Feel like hopping off your balloon to attempt to board an enemy ship? Go for it! There are multiple roles to fill and they're all extremely important to your success. Thankfully the game rewards players with experience depending on the role you've been filling (Helmsman, Gunner, Support). Featuring a large skill tree that unlocks both Perks and Flaws as your fulfill your duties will keep you coming back again and again as well as encourage you to try your hand at each of the three roles. I really enjoyed this system of Perks and Flaws as it becomes a tradeoff of sorts for your abilities. Want to be able to pilot your balloon faster? Be prepared to take a Flaw also, like being a drunken sailor that erratically moves your balloon in various directions at the most random of times! It's a great idea and often times leads to hilarious results. More often than not my drunken Viking gets sucked into that damn maelstrom! I really only have two complaints about the game which are mostly minor detail stuff that hasn't really detracted from my experiences. The more major of the two is something I expected slightly considering this is an indie title. Occasionally they're just not many people playing the game. This makes choosing a server when you start something of a no-brainer and always going with the most populated one, although this tends to be a European one (Always Ireland it seems for me!). I haven't encountered really any lag so to speak that has hampered my gameplay, but it would be nice to have more options. The second complaint is the melee combat. Boarding enemy ships is something that absolutely without a doubt happen to you, and mastering the sword has been a problem for me. There isn't any hit detection feedback that I've noticed, like staggering your opponent or even being able to tell if you hit your foe or not. This leads to furious clicking of the mouse and fumbling around your ship. More times than not I get killed by this as I'm trying to pilot my balloon and I've learned that an enemy boarding my ship is a death sentence for me. For this reason I always try to keep my distance and rely on my ship's weaponry (although getting in close to unleash my flamethrowers is tempting!). AirBuccanneers is beautiful, hilarious, crazy and an incredible amount of fun for an indie game that is basically a rehash of a ten year old UTIII mod. It's not perfect, and no game is, but I'm going to continue to bark orders at my crewmates for many months to come! Speaking of barking orders..... FIX THE SHIIIIIIIIIIIIIIIP!!!!!!!!!!!!!!!!!! *screenshots rehosted from Google images*
-
Developed by: LudoCraft Ltd. Published by: LudoCraft Ltd. Platforms: PC Release Date: Dec 5th, 2012 Available on Steam for $14.99 (3/25/13 - On sale today for $5.09 which is 66% off!!!) If last year you approached me to say you had an idea to create a game where you pilot hot air balloons which are loaded up with cannons, rockets and flamethrowers I would have to say my interest would have been piqued. Throw in persistent character leveling, hilarious taunts (you really have to hear these to believe them), ship boarding, round it all out with two opposing forces of vikings and pirates and I would have told you to shut up and take my money! Thanks to Steam's GreenLight service this is exactly what happened when gamers united to give LudoCraft Ltd the go to release their fantastic fantasy balloon battling title, AirBuccaneers.AirBuccaneers originally was conceived back in 2004 as a mod within Unreal Tournament III during Epic's "Make Something Unreal" contest. Now almost ten years later a new and improved standalone version has graced my PC's hard drive and I have to admit to you I'm completely hooked! There is just something so mind-bogglingly satisfying about taking to the skies in a hot air balloon of death and watching your enemies plummet to the ground in a fiery blaze after a hail of cannon fire. Original Unreal Tournament III screenshot. The game, while simple in premise, offers enough diversity to keep you occupied for a long time. Once you've selected your side, Viking or Buccaneer, you're thrown into a match and set off on your conquest to destroy your opponents and their ships. There really isn't any ground combat to speak of here, unless your enemies somehow manage to get close enough to your base to spawn camp you, so expect to spend practically all your time upon one of AirBuccaneer's four available ships.The fragile Kamikaze ship that explodes on impact. A balloon with no cannons who's pilot must maneuver through enemy cannon fire in order to bring down other balloons with a single blast. Generally piloted by a single player, although some brave souls may attempt to catch a ride with you leading usually to hilarious results.The single cannoned Cog ship. A small balloon usually reserved for two, helmsman and gunner.The mighty Battleship. This larger balloon, which I like to refer to as the "Party Boat", comes complete with a total of four cannons. A competent and complete crew can make this ship a force to be feared!The Flying Fortress. This huge floating island ship has three absolutely huge and devastating long range cannons. Unable to move unless using the "boost" ability, this ship is tricky to pilot and deadly when positioned properly. Yeah, I call it the "Party Boat" for a reason! AirBuccaneers is best played as a team game, and attempting to take on your enemies alone is almost always a recipe for doom (unless you're "that guy" who always takes the Kamikaze!). You'll need to coordinate with your team to make sure your balloon is manned properly. What good is your balloon if you don't have someone to fire the cannons as you fly? How are you going to keep your ship in the air unless you have a pal swinging his support staff (which I jokingly refer to as the "baby rattle") away to repair your hull? Those incoming cannonballs and air mines are going to put a hurt on you unless you have someone using their musket to knock them away! Feel like hopping off your balloon to attempt to board an enemy ship? Go for it! There are multiple roles to fill and they're all extremely important to your success.Thankfully the game rewards players with experience depending on the role you've been filling (Helmsman, Gunner, Support). Featuring a large skill tree that unlocks both Perks and Flaws as your fulfill your duties will keep you coming back again and again as well as encourage you to try your hand at each of the three roles. I really enjoyed this system of Perks and Flaws as it becomes a tradeoff of sorts for your abilities. Want to be able to pilot your balloon faster? Be prepared to take a Flaw also, like being a drunken sailor that erratically moves your balloon in various directions at the most random of times! It's a great idea and often times leads to hilarious results. More often than not my drunken Viking gets sucked into that damn maelstrom! I really only have two complaints about the game which are mostly minor detail stuff that hasn't really detracted from my experiences. The more major of the two is something I expected slightly considering this is an indie title. Occasionally they're just not many people playing the game. This makes choosing a server when you start something of a no-brainer and always going with the most populated one, although this tends to be a European one (Always Ireland it seems for me!). I haven't encountered really any lag so to speak that has hampered my gameplay, but it would be nice to have more options.The second complaint is the melee combat. Boarding enemy ships is something that absolutely without a doubt happen to you, and mastering the sword has been a problem for me. There isn't any hit detection feedback that I've noticed, like staggering your opponent or even being able to tell if you hit your foe or not. This leads to furious clicking of the mouse and fumbling around your ship. More times than not I get killed by this as I'm trying to pilot my balloon and I've learned that an enemy boarding my ship is a death sentence for me. For this reason I always try to keep my distance and rely on my ship's weaponry (although getting in close to unleash my flamethrowers is tempting!). AirBuccanneers is beautiful, hilarious, crazy and an incredible amount of fun for an indie game that is basically a rehash of a ten year old UTIII mod. It's not perfect, and no game is, but I'm going to continue to bark orders at my crewmates for many months to come! Speaking of barking orders..... FIX THE SHIIIIIIIIIIIIIIIP!!!!!!!!!!!!!!!!!! *screenshots rehosted from Google images*Click here to view the article
-
Graphics card maker nVidia has issued an apology to GeForce GPU users who have encountered "major performance and stability issues" with Tomb Raider in maximum settings. Tomb Raider (2013) Screenshot nVidia's Andrew Burnes placed the blame on Crystal Dynamics failing to provide a final build of the game with enough lead time ahead of its release, which introduced new issues that were not present in previously-provided builds. "We are aware of major performance and stability issues with GeForce GPUs running Tomb Raider with maximum settings," said Burnes. Read on Source/Credit [CVG]
-
Coming Soon to PC/Mac/iOS/Android
-
Coming Soon to PC/Mac/iOS/Android Click here to view the article
-
Released today. Buy on Steam
-
Released today. Buy on Steam Click here to view the article