This Is Like The Other Restarters Except.. This One Checks For The 'Fatal Error' And It Dose Not Have A GUI ( Window ) It Logs All Data To A File Also Its Scripted In AutoIt So You Might Get A False Positive Ill Also Release The Source Code.
How It Works :
Checks Processes ( Servers )
Checks Errors
If There Is An Error Or A Process Not Found It Closes The Other Processes ( Servers ) And Reboots.
* Basic Short And Simple![]()
*
Hot-Key(s) : Alt+Esc = Exit
Source Code :
* Make Sure Its In Your Server Files Folder *Code:#Include <Date.Au3> #Include <Process.Au3> #NoTrayIcon Opt ('WinTitleMatchMode','2') HotKeySet ('!{Esc}','_Exit') _Log ('Anti Crash v1.0 Has Started.') Global $Server['4'] $Server['1'] = ('1. Login Server.exe') $Server['2'] = ('2. Char Server.exe') $Server['3'] = ('3. World Server.exe') While ('1') Sleep ('150') If _Process_Check () = ('0') Or _Error_Check () = ('1') Then _Reboot () WEnd Func _Error_Check () Local $Error If WinExists ('Fatal') Then _Log ('Fatal Error Found On Process : ' & _ProcessGetName (WinGetProcess ('Fatal')) & '.') Sleep ('500') ProcessClose (_ProcessGetName (WinGetProcess ('Fatal'))) $Error = ('1') EndIf If $Error = '1' Then Return ('1') Else Return ('0') EndIf EndFunc Func _Process_Check () Local $Server_Check['4'] $Server_Check['1'] = ('-1') $Server_Check['2'] = ('-1') $Server_Check['3'] = ('-1') For $Array = '1' To '3' If ProcessExists ($Server[$Array]) Then $Server_Check[$Array] = ('1') Else _Log ('Process Not Found : ' & $Server[$Array] & '.') EndIf Next If $Server_Check['1'] = ('1') And $Server_Check['2'] = ('1') And $Server_Check['3'] = ('1') Then Return ('1') Else Return ('0') EndIf EndFunc Func _Close_All () For $Array = '1' To '3' ProcessClose ($Server[$Array]) Sleep ('500') Next EndFunc Func _Reboot () _Close_All () _Log ('Reboot Started.') For $Array = '1' To '3' ShellExecute ($Server[$Array]) Sleep ('500') Next EndFunc Func _Log ($Data) FileWriteLine (@ScriptDir & '\' & _Date_String () & ' - Anti Crash Log.txt','[' & _NowTime () & '] ' & $Data) EndFunc Func _Date_String () Local $Return, $String_1, $String_2, $Month_String = ('January|February|March|April|May|June|July|August|September|October|November|December') $String_1 = StringSplit (_NowDate (), '/') $String_2 = StringSplit ($Month_String, '|') $Return = ($String_2[$String_1['1']] & ' ' & $String_1['2'] & ', ' & $String_1['3']) Return $Return EndFunc Func _Exit () Exit EndFunc Func OnAutoItExit () _Log ('Anti Crash v1.0 Has Exited.') EndFunc
All Functions Made By Me Also All Credits Goto Me


*



