Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Script to run L2.exe in single core (L2 Old Skool main use.)
- ;This simple script use "Runfirst from :
- ;
- ;http://www.activeplus.com/Products/RunFirst
- ;
- ;This is provided only for L2 OldSkool Lineage II Server.
- ;It is made by Baoulettes :)
- ;Prevent multi Launcher at once (launcher is closed when L2.exe title as been set.)
- #SingleInstance, Force
- ;This check if L2.exe (main function to be sure the user paste that Launcher in System Folder!)
- IfNotExist, L2.exe
- (
- ;If not simple put a warning window an dkill process.
- MsgBox, Lineage II - Old Skool - Launcher MUST be placed in a System folder !
- ExitApp
- )
- ;If okay install "RunFist.exe"
- FileInstall, D:\Jeux\L2 C3\system\runfirst.exe, %A_ScriptDir%\runfirst.exe,1
- ;Run CMD to CD to the proper direction (thanks to variable to make it so easly.)
- ;and in same line run "runfirst.exe as if L2.exe as been dragged in.)
- ;Hide is used to hide the CMD command so that look and feel clean as it should !
- Run, cmd /c CD %A_ScriptDir% & runfirst.exe L2.exe",,Hide
- ;Get the last L2.exe process launched and change it name to put "Lineage II - Old Skool"
- ;Copy right powa ....
- ;1st it wait to Lineage II window to popup.
- WinWaitActive, Lineage II
- Loop
- {
- ;Check if our little renamed L2.exe is running
- Process, Exist, L2.exe
- {
- If ErrorLevel != 0
- {
- ;If yes then wait it to be active.
- WinWaitActive, Lineage II
- WinSetTitle, Lineage II - Old Skool
- }
- else
- {
- ;Else close our launcher.
- GoTo,Exit
- }
- }
- ;Sleep for a second
- Sleep 1000
- Process, Exist, L2.exe
- {
- If ErrorLevel != 0
- {
- WinWaitNotActive, Lineage II
- WinSetTitle, Lineage II - Old Skool
- }
- else
- {
- GoTo,Exit
- }
- }
- }
- Exit:
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment