Auto Launcher Server

Results 1 to 6 of 6
  1. #1
    Account Upgraded | Title Enabled! asianking is offline
    MemberRank
    Aug 2009 Join Date
    273Posts

    Auto Launcher Server

    Got permission from Yangc10:

    Just thought I share my little code to auto start your server. One thing does comes in mind is my coordinates might be different than yours. You can also customize these codes to your needs. Don't forget to compile with autoit.

    Note that you'll have to open Certification manually as autoit doesn't open it as expected. Always gives me an error. Once saved; toss these two codes inside the server folder then make OpenServer.exe as short-cut to desktop. OpenServer.exe will call out to GSDown.exe.

    OpenServer.exe
    Open Server
    Code:
    OpenServer()
    
    Func OpenServer()
    ShellExecute("GlobalManager.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("MachineManager.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("GatewayServer.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("DownloadServer.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("FarmManager.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("SR_ShardManager.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("AgentServer_no_xtrap.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("SR_GameServer.exe", @WorkingDir)
    sleep(15000)
    _Opensmc()
    EndFunc
    
    Func _Opensmc()
    ShellExecute("smc_independent.exe", @WorkingDir) ;open and run smc
    WinActivate("[CLASS:#32770]","")
    sleep(1000)
    send("YOURUSERNAME")
    sleep(1000)
    send("{TAB}")
    sleep(1000)
    send("YOURPASSWORD")
    send("{ENTER}")
    sleep(1000)
    SMC()
    EndFunc
    
    Func SMC()
    WinActivate("[CLASS:SMC]","") ;can't combine with class32770 smc
    mouseclick("LEFT", 332,80, 1)
    sleep(500)
    MouseClick("LEFT", 329,103, 1)
    sleep(15000)
    Mouseclick("LEFT", 640, 101, 1)
    sleep(3000)
    Mouseclick("LEFT", 478, 132, 1)
    sleep(500)
    MouseClick("LEFT", 669, 132, 1)
    sleep(500)
    MouseClick("LEFT", 1097,130, 1)
    sleep(300000)
    MouseClick("RIGHT", 328, 210, 1) ;start Global and up
    sleep(1000)
    MouseClick("LEFT", 382, 305, 1)
    sleep(500)
    send("{ENTER}")
    sleep(3000)
    Mouseclick("RIGHT", 519, 216, 1) ; start Agent and up
    sleep(1000)
    MouseClick("LEFT", 563,309, 1)
    sleep(500)
    Send("{Enter}")
    ShellExecute("GSDown.exe", @WorkingDir) ;open and run smc
    Exit
    EndFunc
    GSDOWN.exe
    OPEN SR_GameServer if it closed
    Code:
    HotKeySet("{ESC}", "_Quit")
    
    Main()
    
    Func Main()
    While 1
    	WinWait("[CLASS:SR_GameServer]")
    	WinWaitClose("[CLASS:SR_GameServer]")
    	Run("SR_GameServer.exe", @WorkingDir)
    	Sleep(145000)
    	CloseHim()
    WEnd
    EndFunc
    
    Func _Quit()
    	Exit
    EndFunc
    
    Func CloseHim()
    If WinExists("[CLASS:#32770]","") Then 
       WinActivate("[CLASS:#32770]","")
       sleep(1000)
       MouseClick("LEFT", 869, 362, 1)
       SMC()
    Else
       SMC()
    EndIf
    EndFunc
    
    Func SMC()
    WinActivate("[CLASS:SMC]","") ;can't combine with class32770 smc
    sleep(5000)
    MouseClick("RIGHT", 328, 210, 1) ;start Global and up
    sleep(1000)
    MouseClick("LEFT", 382, 305, 1)
    sleep(500)
    send("{ENTER}")
    sleep(3000)
    Mouseclick("RIGHT", 519, 216, 1) ; start Agent and up
    sleep(1000)
    MouseClick("LEFT", 563,309, 1)
    sleep(500)
    Send("{Enter}")
    Main()
    EndFunc
    Like if you think it helped you!:D


  2. #2
    Enthusiast kelly2009 is offline
    MemberRank
    Oct 2009 Join Date
    44Posts

    Re: Auto Launcher Server

    You should add this feature
    ----------------------------------------------
    IniWrite (If the design gui "InputBox")
    IniRead (Running through the module files. Ini)
    ----------------------------------------------

    Add run: Custom Certification Server _RunDos()

  3. #3
    Account Upgraded | Title Enabled! asianking is offline
    MemberRank
    Aug 2009 Join Date
    273Posts

    Re: Auto Launcher Server

    alright; here's my modification of yangc10 coding. Secondly, yangc10 forgot to mention that you will need to change the admin user/pass shown bold below OpenServer. With this; you do not need to open the Certification.bat manually anymore.

    Open Server
    Code:
    OpenServer()
    
    Func OpenServer()
    ShellExecute("bin\CustomCertificationServer.exe", "bin\packt.dat")
    sleep(2000)
    ShellExecute("GlobalManager.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("MachineManager.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("GatewayServer.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("DownloadServer.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("FarmManager.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("SR_ShardManager.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("AgentServer_no_xtrap.exe", @WorkingDir)
    sleep(2000)
    ShellExecute("SR_GameServer.exe", @WorkingDir)
    sleep(15000)
    _Opensmc()
    EndFunc
    
    Func _Opensmc()
    ShellExecute("smc_independent.exe", @WorkingDir) ;open and run smc
    WinActivate("[CLASS:#32770]","")
    sleep(1000)
    send("YOURUSER")
    sleep(1000)
    send("{TAB}")
    sleep(1000)
    send("YOURPASS")
    send("{ENTER}")
    sleep(1000)
    SMC()
    EndFunc
    
    Func SMC()
    WinActivate("[CLASS:SMC]","") ;can't combine with class32770 smc
    WinSetState("[CLASS:SMC]", "", @SW_MAXIMIZE)
    mouseclick("LEFT", 39, 32, 1)
    sleep(500)
    MouseClick("LEFT", 37, 52, 1)
    sleep(15000)
    Mouseclick("LEFT", 343, 51, 1)
    sleep(3000)
    Mouseclick("LEFT", 184, 85, 1)
    sleep(500)
    MouseClick("LEFT", 374, 85, 1)
    sleep(500)
    MouseClick("LEFT", 807, 85, 1)
    sleep(300000)
    MouseClick("RIGHT", 31, 161, 1) ;start Global and up
    sleep(1000)
    MouseClick("LEFT", 89, 250, 1)
    sleep(500)
    send("{ENTER}")
    sleep(3000)
    Mouseclick("RIGHT", 222, 161, 1) ; start Agent and up
    sleep(1000)
    MouseClick("LEFT", 277, 251, 1)
    sleep(500)
    Send("{Enter}")
    ShellExecute("GSDown.exe", @WorkingDir)
    ShellExecute("Delme.exe", @WorkingDir)
    Exit
    EndFunc
    GSDown
    Code:
    HotKeySet("{ESC}", "_Quit")
    
    Main()
    
    Func Main()
    While 1
    	WinWait("[CLASS:SR_GameServer]")
    	WinWaitClose("[CLASS:SR_GameServer]")
    	Run("SR_GameServer.exe", @WorkingDir)
    	Sleep(145000)
    	CloseHim()
    WEnd
    EndFunc
    
    Func _Quit()
    	Exit
    EndFunc
    
    Func CloseHim()
    If WinExists("[CLASS:#32770]","") Then 
       WinActivate("[CLASS:#32770]","")
       sleep(1000)
       ControlClick("[TITLE:Alarm]", "", "[CLASS:Button; INSTANCE:2]")
       SMC()
    Else
       SMC()
    EndIf
    EndFunc
    
    Func SMC()
    WinActivate("[CLASS:SMC]","") ;can't combine with class32770 smc
    WinSetState("[CLASS:SMC]","", @SW_MAXIMIZE)
    sleep(5000)
    Mouseclick("RIGHT", 519, 216, 1) ; start Agent and up
    sleep(1000)
    MouseClick("LEFT", 563,309, 1)
    sleep(500)
    Send("{Enter}")
    Main()
    EndFunc
    Got it from autoit site, but did a little modification:

    Delete dumps file every 1second it finds.

    Delme.exe
    Code:
    HotKeySet("{ESC}", "_Quit")
    
    $filetype = "*.log"
    
    AdlibRegister("Deleteit", 1000)
    
    While sleep(1000)
    WEnd
    
    Func Deleteit()
    	if FileExists($filetype) Then
    		FileDelete($filetype)
    	EndIf
    EndFunc
    
    Func _Quit()
    	Exit
    EndFunc
    Last edited by asianking; 24-07-13 at 11:18 PM.

  4. #4
    Account Upgraded | Title Enabled! LeMbo is offline
    MemberRank
    Sep 2012 Join Date
    241Posts

    Re: Auto Launcher Server

    it's Released before by jangan
    Perfection Server Starter Script

  5. #5
    Account Upgraded | Title Enabled! asianking is offline
    MemberRank
    Aug 2009 Join Date
    273Posts

    Re: Auto Launcher Server

    thing is; his doesn't start all services which this starts all services. Usually GameServer sometimes close by itself either by map region bug or whatever. This script will open GameServer and wait til it finish then start all services again without the need to manually start services.

  6. #6
    Account Upgraded | Title Enabled! LeMbo is offline
    MemberRank
    Sep 2012 Join Date
    241Posts

    Re: Auto Launcher Server

    aha okay :) nice one



Advertisement