Anti Crash v1.0

Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Valued Member xJohn08 is offline
    MemberRank
    Oct 2008 Join Date
    106Posts

    Anti Crash v1.0

    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 :

    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
    * Make Sure Its In Your Server Files Folder *

    All Functions Made By Me Also All Credits Goto Me
    Attached Files Attached Files


  2. #2
    Unity Developer SirTwistedStorm is offline
    MemberRank
    Oct 2008 Join Date
    TexasLocation
    597Posts

    Re: Anti Crash v1.0

    very nice! good work

  3. #3
    Account Upgraded | Title Enabled! chanaz is offline
    MemberRank
    Dec 2007 Join Date
    North CarolinaLocation
    461Posts

    Re: Anti Crash v1.0

    hmm would this make the big ass log fiels like caali's rev 1 used to?

  4. #4
    Ragezone OG FrostElite is offline
    MemberRank
    Sep 2008 Join Date
    United StatesLocation
    1,881Posts

    Re: Anti Crash v1.0

    Nice release.

    Question: Is this PHP?

  5. #5
    Valued Member xJohn08 is offline
    MemberRank
    Oct 2008 Join Date
    106Posts

    Re: Anti Crash v1.0

    No It Dose Not Make A Big Ass Log File It Simply Logs : When It Starts, When A Process Dose Not Exist Or When An Error Is Found And No Its In AutoIt O.o Not PHP

  6. #6
    Account Upgraded | Title Enabled! x103strike is offline
    MemberRank
    Sep 2008 Join Date
    EarthLocation
    993Posts

    Re: Anti Crash v1.0

    I thought this is anti caali crash XD

  7. #7
    Member UltimatieX is offline
    MemberRank
    Sep 2008 Join Date
    80Posts

    Re: Anti Crash v1.0

    desn't work for me
    Code:
    $Return = ($String_2[$String_1['1']] & ' ' & $String_1['2'] & ', ' & $String_1['3'])
    $Return = (^ ERROR

  8. #8
    Valued Member xJohn08 is offline
    MemberRank
    Oct 2008 Join Date
    106Posts

    Re: Anti Crash v1.0

    Make Sure
    #Include <Date.Au3>
    #Include <Process.Au3>
    #NoTrayIcon
    Opt ('WinTitleMatchMode','2')
    Is At The Top If It Dose Not Work Then Idk x_X;

  9. #9
    Account Upgraded | Title Enabled! games2007 is offline
    MemberRank
    May 2008 Join Date
    295Posts

    Re: Anti Crash v1.0

    It will still crash, it will just restart. So the server will still go down and everyone will still get disconnected temporarily...

  10. #10
    Alpha Member GlaphanKing is offline
    MemberRank
    Sep 2008 Join Date
    World of MorrowLocation
    2,594Posts

    Re: Anti Crash v1.0

    not to slam AutoIt but it seems to be an inferior language to that of lower machine languages (i.e. C, C++, VB). You might want to learn these for better and more stable security.

  11. #11

    Re: Anti Crash v1.0

    does it work on rev3? and its only one .au3 file? how does it run?

  12. #12
    Apprentice KevinsComputer is offline
    MemberRank
    Sep 2008 Join Date
    17Posts

    Re: Anti Crash v1.0

    Do it check the CPU % too or only fatal errors ?

  13. #13
    Enthusiast taltol20 is offline
    MemberRank
    Nov 2008 Join Date
    40Posts

    Re: Anti Crash v1.0

    how i make it work jest need to be with server filles ?

  14. #14
    Account Upgraded | Title Enabled! ayboangelus is offline
    MemberRank
    Sep 2008 Join Date
    franceLocation
    715Posts

    Re: Anti Crash v1.0

    you need to compile it with autoIt soft. And it read twice, process and error

  15. #15
    Enthusiast taltol20 is offline
    MemberRank
    Nov 2008 Join Date
    40Posts

    Re: Anti Crash v1.0

    its no work to me .. some ine know how to fix ?



Page 1 of 2 12 LastLast

Advertisement